CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
TrackerMap.h
Go to the documentation of this file.
1 #ifndef _TrackerMap_h_
2 #define _TrackerMap_h_
3 #include <string>
4 #include <iostream>
5 #include <fstream>
6 #include <sstream>
7 #include <cmath>
8 #include <map>
12 #include "TColor.h"
13 
14 class TmModule;
15 class TmApvPair;
16 class EventSetup;
17 class TmCcu;
18 class TmPsu;
19 
20 class TrackerMap {
21  public:
22  //TrackerMap(){TrackerMap(" ");}; //!< default constructor
23  TrackerMap(std::string s=" ",int xsize1=340,int ysize1=200);
24  TrackerMap(const edm::ParameterSet & iConfig);
26  ~TrackerMap();
27 
28  void build();
29  void init();
30  void drawModule(TmModule * mod, int key, int layer, bool total, std::ofstream * file);
31  void print(bool print_total=true,float minval=0., float maxval=0.,std::string s="svgmap");
32  void printall(bool print_total=true,float minval=0., float maxval=0.,std::string s="svgmap");
33  void printonline();
34  void printlayers(bool print_total=true,float minval=0., float maxval=0.,std::string s="layer");
35  void save(bool print_total=true,float minval=0., float maxval=0.,std::string s="svgmap.svg",int width=1500, int height=800);
36  void save_as_fedtrackermap(bool print_total=true,float minval=0., float maxval=0.,std::string s="fed_svgmap.svg",int width=1500, int height=800);
37  void save_as_fectrackermap(bool print_total=true,float minval=0., float maxval=0.,std::string s="fec_svgmap.svg",int width=1500, int height=800);
38  void save_as_psutrackermap(bool print_total=true,float minval=0., float maxval=0.,std::string s="psu_svgmap.svg",int width=1500, int height=800);
39  void save_as_HVtrackermap(bool print_total=true,float minval=0., float maxval=0.,std::string s="psu_svgmap.svg",int width=1500, int height=800);
40  void drawApvPair( int crate, int numfed_incrate, bool total, TmApvPair* apvPair,std::ofstream * file,bool useApvPairValue);
41  void drawCcu( int crate, int numfed_incrate, bool total, TmCcu* ccu,std::ofstream * file,bool useCcuValue);
42  void drawPsu(int rack,int numcrate_inrack, bool print_total, TmPsu* psu,ofstream * svgfile,bool usePsuValue);
43  void drawHV2(int rack,int numcrate_inrack, bool print_total, TmPsu* psu,ofstream * svgfile,bool usePsuValue);
44  void drawHV3(int rack,int numcrate_inrack, bool print_total, TmPsu* psu,ofstream * svgfile,bool usePsuValue);
45  void fill_current_val(int idmod, float current_val );
46  void fill(int layer , int ring, int nmod, float x );
47  void fill(int idmod, float qty );
48  void fillc(int idmod, int RGBcode) {fillc(idmod,(RGBcode>>16) & 0xFF , (RGBcode>>8) & 0xFF, RGBcode & 0xFF);}
49  void fillc(int idmod, int red, int green, int blue);
50  void fillc(int layer,int ring, int nmod, int red, int green, int blue);
51  void fillc_all_blank();
52  void fill_all_blank();
53  void fill_current_val_fed_channel(int fedId,int fedCh, float current_val );
54  void fill_fed_channel(int fedId,int fedCh, float qty );
55  void fill_fed_channel(int modId, float qty );
56  void fillc_fed_channel(int fedId,int fedCh, int red, int green, int blue);
57  void fillc_fec_channel(int crate,int slot, int ring, int addr, int red, int green, int blue );
58  void fill_fec_channel(int crate,int slot, int ring, int addr, float qty );
59  void fill_lv_channel(int rack,int crate, int board, float qty );
60  void fillc_lv_channel(int rack,int crate, int board, int red, int green, int blue);
61  void fill_hv_channel2(int rack,int crate, int board, float qty );
62  void fillc_hv_channel2(int rack,int crate, int board, int red, int green, int blue);
63  void fill_hv_channel3(int rack,int crate, int board, float qty );
64  void fillc_hv_channel3(int rack,int crate, int board, int red, int green, int blue);
65  int module(int fedId,int fedCh);
66  void setText(int idmod , std::string s );
67  void setText(int layer, int ring, int nmod , std::string s );
68  void setPalette(int numpalette){palette=numpalette;}
69  void drawPalette(std::ofstream * file);
70  void showPalette(bool printflag1){printflag=printflag1;};
71  void setTitle(std::string s){title=s;};
72  void setRange(float min,float max){gminvalue=min;gmaxvalue=max;};
73  void addPixel(bool addPixelfl){addPixelFlag=addPixelfl;};
74  void reset();
75  void load(std::string s="tmap.svg");
76  int getxsize(){return xsize;};
77  int getysize(){return ysize;};
78  int getcolor(float value, int palette);
79  std::ifstream * findfile(std::string filename);
80  int getNumMod(){return number_modules;};
81  std::vector<TColor*> vc;
82  typedef std::map<const int , TmModule *> SmoduleMap;
84  typedef std::map<const int , TmModule *> ImoduleMap;
86  typedef std::map<const int , TmApvPair*> SvgApvPair;
88  typedef std::multimap<const int , TmApvPair*> ModApvPair;
90  typedef std::map<const int , int> SvgFed;
92  typedef std::map<const int , TmCcu*> MapCcu;
94  typedef std::multimap<TmCcu* , TmModule*> FecModule;
96  typedef std::map<const int , TmPsu*> MapPsu;
98  typedef std::multimap<TmPsu* , TmModule*> PsuModule;
100  int palette;
101  bool printflag;
106  int ndet; //number of detectors
107  int npart; //number of detectors parts
108  std::string title;
109  std::string jsfilename,infilename;
110  std::string jsPath;
112  double phival(double x, double y){
113  double phi;
114  double phi1=atan(y/x);
115  phi = phi1;
116  if(y<0. && x>0) phi = phi1+2.*M_PI;
117  if(x<0.)phi=phi1+M_PI;
118  if(fabs(y)<0.000001 && x>0)phi=0;
119  if(fabs(y)<0.000001&&x<0)phi=M_PI;
120  if(fabs(x)<0.000001&&y>0)phi=M_PI/2.;
121  if(fabs(x)<0.000001&&y<0)phi=3.*M_PI/2.;
122 
123  return phi;
124  }
125 
126  int find_layer(int ix, int iy)
127  {
128  int add;
129  int layer=0;
130  if(iy <= xsize){//endcap+z
131  add = 15;
132  layer = ix/ysize;
133  layer = layer+add+1;
134  }
135  if(iy > xsize && iy< 3*xsize){//barrel
136  add=30;
137  if(ix < 2*ysize){
138  layer=1;
139  }else {
140  layer = ix/(2*ysize);
141  if(iy < 2*xsize)layer=layer*2+1; else layer=layer*2;
142  }
143  layer = layer+add;
144  }
145  if(iy >= 3*xsize){ //endcap-z
146  layer = ix/ysize;
147  layer = 15-layer;
148  }
149  return layer;
150  }
151 
152  int getlayerCount(int subdet, int partdet){
153  int ncomponent=0;
154  if(subdet == 1){ //1=pixel
155  if(partdet == 1 || partdet == 3){ //1-3=encap
156  ncomponent = 3;
157  }
158  else { ncomponent = 3; } //barrel
159  }
160  if(subdet== 2){ //2=inner silicon
161  if(partdet == 1 || partdet == 3){ //1-3=encap
162  ncomponent = 3;
163  }
164  else { ncomponent = 4; } //barrel
165  }
166  if(subdet== 3){ //3=outer silicon
167  if(partdet == 1 || partdet == 3){ //1-3=encap
168  ncomponent = 9;
169  }
170  else { ncomponent = 6; } //barrel
171  }
172  return(ncomponent);
173  }
174  double xdpixel(double x){
175  double res;
176  if(saveAsSingleLayer)res= ((x-xmin)/(xmax-xmin)*xsize);
177  else res= ((x-xmin)/(xmax-xmin)*xsize)+ix;
178  return res;
179  }
180  double ydpixel(double y){
181  double res=0;
182  double y1;
183  y1 = (y-ymin)/(ymax-ymin);
184  if(nlay>30)
185  {
186  if(nlay <34) res= 2*ysize - (y1*2*ysize);
187  if(nlay==34) res= 2.4*ysize - (y1*2.4*ysize);
188  if(nlay>34) res= 2.5*ysize - (y1*2.5*ysize);
189  }
190  else res= xsize - (y1*xsize);
191  if(!saveAsSingleLayer) res=res+iy;
192  return res;
193  }
194  double xdpixelc(double x){
195  double res;
196  if(saveAsSingleLayer)res= ((x-xmin)/(xmax-xmin)*xsize);
197  else res= ((x-xmin)/(xmax-xmin)*xsize)+ix;
198  return res;
199  }
200  double ydpixelc(double y){
201  double res;
202  double y1;
203  y1 = (y-ymin)/(ymax-ymin);
204  if(saveAsSingleLayer)res= 2*ysize - (y1*2*ysize);
205  else res= 2*ysize - (y1*2*ysize)+iy;
206  return res;
207  }
208  double xdpixelfec(double x){
209  double res;
210  if(saveAsSingleLayer)res= ((x-xmin)/(xmax-xmin)*xsize);
211  else res= ((x-xmin)/(xmax-xmin)*xsize)+ix;
212  return res;
213  }
214  double ydpixelfec(double y){
215  double res;
216  double y1;
217  y1 = (y-ymin)/(ymax-ymin);
218  if(saveAsSingleLayer)res= 2*ysize - (y1*2*ysize);
219  else res= 2*ysize - (y1*2*ysize)+iy;
220  return res;
221  }
222  double xdpixelpsu(double x){
223  double res;
224  if(saveAsSingleLayer)res= ((x-xmin)/(xmax-xmin)*xsize);
225  else res= ((x-xmin)/(xmax-xmin)*xsize)+ix;
226  return res;
227  }
228  double ydpixelpsu(double y){
229  double res;
230  double y1;
231  y1 = (y-ymin)/(ymax-ymin);
232  if(saveAsSingleLayer)res= 2*ysize - (y1*2*ysize);
233  else res= 2*ysize - (y1*2*ysize)+iy;
234  return res;
235  }
236 
237  void defcwindow(int num_crate){
238  ncrate = num_crate;
239  int xoffset=xsize/3;
240  int yoffset=ysize;
241  xmin=-1.;xmax=63.; ymin = -1.; ymax=37.;
242  if((ncrate%3)==2)ix = xoffset+xsize*4/3;
243  if((ncrate%3)==1)ix = xoffset+2*xsize*4/3;
244  if((ncrate%3)==0)ix = xoffset;
245  iy = yoffset+((ncrate-1)/3)*ysize*2;
246  }
247  void deffecwindow(int num_crate){
248  ncrate = num_crate;
249  int xoffset=xsize/3;
250  int yoffset=2*ysize;
251  xmin=-1.;xmax=37.; ymin = -10.; ymax=40.;
252  if(ncrate==1||ncrate==3)ix = xoffset+xsize*2;
253  if(ncrate==2||ncrate==4)ix = xoffset;
254  iy = yoffset+((ncrate-1)/2)*ysize*4;
255  }
256  void defpsuwindow(int num_rack){
257  nrack = num_rack;
258  int xoffset=xsize/5;
259  int yoffset=ysize;
260  xmin=-1.;xmax=63.; ymin = -1.; ymax=37.;
261 
262  if((nrack%5)==1)ix = xoffset+4*int(xsize/1.5);
263  if((nrack%5)==2)ix = xoffset+3*int(xsize/1.5);
264  if((nrack%5)==3)ix = xoffset+2*int(xsize/1.5);
265  if((nrack%5)==4)ix = xoffset+int(xsize/1.5);
266  if((nrack%5)==0)ix = xoffset;
267 
268  iy = yoffset+((nrack-1)/5)*ysize*2;
269 
270  }
271 
272 
273 void defwindow(int num_lay){
274  nlay = num_lay;
275  if(posrel){ // separated modules
276  xmin=-2.;ymin=-2.;xmax=2.;ymax=2.;
277  if(nlay >12 && nlay < 19){
278  xmin=-.40;xmax=.40;ymin=-.40;ymax=.40;
279  }
280  if(nlay>30){
281  xmin=-0.1;xmax=3.;ymin=-0.1;ymax=8.5;
282  if(nlay<34){xmin=-0.3;xmax=1.0;}
283  if(nlay>33&&nlay<38){xmax=2.0;}
284  if(nlay>37){ymax=8.;}//inner
285  }
286  }else{ //overlayed modules
287  xmin=-1.3;ymin=-1.3;xmax=1.3;ymax=1.3;
288  if(nlay >12 && nlay < 19){
289  xmin=-.20;xmax=.20;ymin=-.20;ymax=.20;
290  }
291  if(nlay>30){
292  xmin=-1.5;xmax=1.5;ymin=-1.;ymax=28.;
293  if(nlay<34){xmin=-0.5;xmax=0.5;}
294  if(nlay>33&&nlay<38){xmin=-1.;xmax=1.;}
295  }
296 
297  }
298  if(nlay<16){
299  ix=0;
300  if(nlay==15||nlay==14)iy=(15-nlay)*2*ysize; else
301  {if(nlay>9&&nlay<13)iy=4*ysize-(int)(ysize/2.)+(12-nlay)*(int)(ysize/1.50);else iy=6*ysize+(9-nlay)*(int)(ysize*1.3);}}
302  if(nlay>15&&nlay<31){
303  ix=3*xsize;
304  if(nlay==16||nlay==17)iy=(nlay-16)*2*ysize; else
305  {if(nlay>18&&nlay<22)iy=4*ysize-(int)(ysize/2.)+(nlay-19)*(int)(ysize/1.50);else iy=6*ysize+(nlay-22)*(int)(ysize*1.3);}}
306  if(nlay>30){
307  if(nlay==31){ix=(int)(1.5*xsize);iy=0;}
308  if(nlay==32){int il=(nlay-30)/2;ix=xsize;iy=il*2*ysize;}
309  if(nlay==33){int il=(nlay-30)/2;ix=2*xsize;iy=il*2*ysize;}
310  if(nlay==34){int il=(nlay-30)/2;ix=xsize;iy=il*(int)(2.57*ysize);}
311  if(nlay>34 && nlay%2==0){int il=(nlay-30)/2;ix=xsize;iy=il*(int)(2.5*ysize);}
312  if(nlay>34 && nlay%2!=0){int il=(nlay-30)/2;ix=2*xsize;iy=il*(int)(2.5*ysize);}
313  }
314  }
315 
316  int getringCount(int subdet, int partdet, int layer){
317  int ncomponent=0;
318  if(subdet== 1){ //1=pixel
319  if(partdet== 1 || partdet== 3){ //end-cap
320  ncomponent = 7;
321  }
322  else{ncomponent = 8;} //barrel
323  }
324  if(subdet== 2){ //inner-silicon
325  if(partdet== 1 || partdet== 3){ //end-cap
326  ncomponent = 3;
327  }
328  else{ncomponent = 12;} //barrel
329  }
330  if(subdet== 3){ //outer-silicon
331  if(partdet== 1){ //end-cap-z
332  if (layer== 1) ncomponent = 4;
333  if (layer== 2 || layer== 3) ncomponent = 5;
334  if (layer== 4 || layer== 5 || layer== 6) ncomponent = 6;
335  if (layer== 7 || layer== 8 || layer== 9) ncomponent = 7;
336  }
337  if(partdet== 3){ //endcap+z
338  if (layer== 9) ncomponent = 4;
339  if (layer== 8 || layer== 7) ncomponent = 5;
340  if (layer== 6 || layer== 5 || layer== 4) ncomponent = 6;
341  if (layer== 3 || layer== 2 || layer== 1) ncomponent = 7;
342  }
343  if(partdet== 2){ //barrel
344  ncomponent = 12;
345  }
346  }
347  return(ncomponent);
348  }
349  int getmoduleCount(int subdet, int partdet, int layer, int ring){
350  int ncomponent=0;
351  int spicchif[] ={24,24,40,56,40,56,80};
352  int spicchib[] ={20,32,44,30,38,46,56,42,48,54,60,66,74};
353  int numero_layer = 0;
354 
355  if(partdet == 2){ //barrel
356  numero_layer = layer-1;
357  if(subdet== 2){ //inner
358  numero_layer = numero_layer+3;
359  }
360  if(subdet == 3){ //outer
361  numero_layer = numero_layer+7;
362  }
363  ncomponent = spicchib[numero_layer];
364  }
365  if(partdet!= 2){ //endcap
366  if(subdet== 1)ncomponent=24;//pixel
367  else
368  ncomponent = spicchif[ring-1];
369  }
370  return(ncomponent);
371  }
372  static int layerno(int subdet,int leftright,int layer){
373  if(subdet==6&&leftright==1)return(10-layer);
374  if(subdet==6&&leftright==2)return(layer+21);
375  if(subdet==4&&leftright==1)return(4-layer+9);
376  if(subdet==4&&leftright==2)return(layer+18);
377  if(subdet==2&&leftright==1)return(4-layer+12);
378  if(subdet==2&&leftright==2)return(layer+15);
379  if(subdet==1)return(layer+30);
380  if(subdet==3)return(layer+33);
381  if(subdet==5)return(layer+37);
382  }
383 
384  static bool isRingStereo(int key){
385  int layer=key/100000;
386  int ring = key - layer*100000;
387  ring = ring/1000;
388  if(layer==34 || layer==35 || layer==38 || layer==39) return true;
389  if(layer<13 || (layer>18&&layer<31))
390  if(ring==1 || ring==2 || ring==5)return true;
391  return false;
392  }
393  int nlayer(int det,int part,int lay){
394  if(det==3 && part==1) return lay;
395  if(det==2 && part==1) return lay+9;
396  if(det==1 && part==1) return lay+12;
397  if(det==1 && part==3) return lay+15;
398  if(det==2 && part==3) return lay+18;
399  if(det==3 && part==3) return lay+21;
400  if(det==1 && part==2) return lay+30;
401  if(det==2 && part==2) return lay+33;
402  if(det==3 && part==2) return lay+37;
403  return -1;
404  }
405 
406  std::string layername(int layer){
407  std::string s= " ";
408  std::ostringstream ons;
409 
410  if(layer < 10) ons << "TEC -z Layer " << layer;
411  if(layer < 13 && layer > 9) ons << "TID -z Layer " << layer-9;
412  if(layer < 16 && layer > 12) ons << "FPIX -z Layer " << layer-12;
413  if(layer < 19 && layer > 15) ons << "FPIX +z Layer " << layer-15;
414  if(layer < 22 && layer > 18) ons << "TID +z Layer " << layer-18;
415  if(layer < 31 && layer > 21) ons << "TEC +z Layer " << layer-21;
416  if(layer < 34 && layer > 30) ons << "TPB Layer " << layer-30;
417  if(layer < 38 && layer > 33) ons << "TIB Layer " << layer-33;
418  if(layer > 37) ons << "TOB Layer " << layer-37;
419  s = ons.str();
420  return s;
421  }
422  int ntotRing[43];
423  int firstRing[43];
424 
425  protected:
426  int nlay;
427  int ncrate;
428  int nrack;
429  int ncrates;
432  double xmin,xmax,ymin,ymax;
434  bool posrel;
435  bool firstcall;
436  std::ofstream * svgfile;
437  std::ofstream * savefile;
438  std::ifstream * jsfile;
439  std::ifstream * inputfile;
440  std::ifstream * ccufile;
445 
446  private:
447 
448  float oldz;
451 };
452 #endif
453 
void drawHV3(int rack, int numcrate_inrack, bool print_total, TmPsu *psu, ofstream *svgfile, bool usePsuValue)
Definition: TrackerMap.cc:1129
void reset()
Definition: TrackerMap.cc:390
void fill_hv_channel2(int rack, int crate, int board, float qty)
Definition: TrackerMap.cc:2431
void build()
Definition: TrackerMap.cc:2580
float minvalue
Definition: TrackerMap.h:442
TrackerMap(std::string s=" ", int xsize1=340, int ysize1=200)
Definition: TrackerMap.cc:379
ModApvPair apvModuleMap
Definition: TrackerMap.h:89
double ydpixelc(double y)
Definition: TrackerMap.h:200
std::ifstream * findfile(std::string filename)
Definition: TrackerMap.cc:3251
int nfeccrates
Definition: TrackerMap.h:430
void fillc_all_blank()
Definition: TrackerMap.cc:2504
double ydpixelfec(double y)
Definition: TrackerMap.h:214
std::string layername(int layer)
Definition: TrackerMap.h:406
int getmoduleCount(int subdet, int partdet, int layer, int ring)
Definition: TrackerMap.h:349
MapCcu ccuMap
Definition: TrackerMap.h:93
void save_as_psutrackermap(bool print_total=true, float minval=0., float maxval=0., std::string s="psu_svgmap.svg", int width=1500, int height=800)
Definition: TrackerMap.cc:1700
void fillc_hv_channel2(int rack, int crate, int board, int red, int green, int blue)
Definition: TrackerMap.cc:2403
SmoduleMap smoduleMap
Definition: TrackerMap.h:83
std::ifstream * inputfile
Definition: TrackerMap.h:439
std::ofstream * savefile
Definition: TrackerMap.h:437
int getxsize()
Definition: TrackerMap.h:76
bool psetAvailable
Definition: TrackerMap.h:111
void addPixel(bool addPixelfl)
Definition: TrackerMap.h:73
~TrackerMap()
default destructor
Definition: TrackerMap.cc:448
void drawPsu(int rack, int numcrate_inrack, bool print_total, TmPsu *psu, ofstream *svgfile, bool usePsuValue)
Definition: TrackerMap.cc:996
int module(int fedId, int fedCh)
Definition: TrackerMap.cc:2460
bool enableFecProcessing
Definition: TrackerMap.h:103
double xmin
Definition: TrackerMap.h:432
std::multimap< const int, TmApvPair * > ModApvPair
Definition: TrackerMap.h:88
void defwindow(int num_lay)
Definition: TrackerMap.h:273
void save_as_HVtrackermap(bool print_total=true, float minval=0., float maxval=0., std::string s="psu_svgmap.svg", int width=1500, int height=800)
Definition: TrackerMap.cc:1435
std::map< const int, int > SvgFed
Definition: TrackerMap.h:90
double xdpixelc(double x)
Definition: TrackerMap.h:194
void defpsuwindow(int num_rack)
Definition: TrackerMap.h:256
bool addPixelFlag
Definition: TrackerMap.h:450
int number_modules
Definition: TrackerMap.h:443
std::string infilename
Definition: TrackerMap.h:109
int getlayerCount(int subdet, int partdet)
Definition: TrackerMap.h:152
int npsuracks
Definition: TrackerMap.h:431
void fill_current_val_fed_channel(int fedId, int fedCh, float current_val)
Definition: TrackerMap.cc:2337
void add(const std::vector< const T * > &source, std::vector< const T * > &dest)
bool enableFedProcessing
Definition: TrackerMap.h:102
#define min(a, b)
Definition: mlp_lapack.h:161
ImoduleMap imoduleMap
Definition: TrackerMap.h:85
int firstRing[43]
Definition: TrackerMap.h:423
int getNumMod()
Definition: TrackerMap.h:80
float gminvalue
Definition: TrackerMap.h:441
std::multimap< TmPsu *, TmModule * > PsuModule
Definition: TrackerMap.h:98
void fillc_fec_channel(int crate, int slot, int ring, int addr, int red, int green, int blue)
Definition: TrackerMap.cc:2348
void setTitle(std::string s)
Definition: TrackerMap.h:71
std::string jsPath
Definition: TrackerMap.h:110
bool enableHVProcessing
Definition: TrackerMap.h:105
double xdpixelfec(double x)
Definition: TrackerMap.h:208
bool posrel
Definition: TrackerMap.h:434
int getysize()
Definition: TrackerMap.h:77
double phival(double x, double y)
Definition: TrackerMap.h:112
void fill_all_blank()
Definition: TrackerMap.cc:2512
std::map< const int, TmPsu * > MapPsu
Definition: TrackerMap.h:96
void fillc_lv_channel(int rack, int crate, int board, int red, int green, int blue)
Definition: TrackerMap.cc:2376
std::map< const int, TmApvPair * > SvgApvPair
Definition: TrackerMap.h:86
void showPalette(bool printflag1)
Definition: TrackerMap.h:70
int getringCount(int subdet, int partdet, int layer)
Definition: TrackerMap.h:316
double xdpixelpsu(double x)
Definition: TrackerMap.h:222
double ymax
Definition: TrackerMap.h:432
const T & max(const T &a, const T &b)
std::ifstream * ccufile
Definition: TrackerMap.h:440
std::map< const int, TmModule * > SmoduleMap
Definition: TrackerMap.h:82
void setPalette(int numpalette)
Definition: TrackerMap.h:68
void save(bool print_total=true, float minval=0., float maxval=0., std::string s="svgmap.svg", int width=1500, int height=800)
Definition: TrackerMap.cc:632
void drawHV2(int rack, int numcrate_inrack, bool print_total, TmPsu *psu, ofstream *svgfile, bool usePsuValue)
Definition: TrackerMap.cc:1062
bool saveAsSingleLayer
Definition: TrackerMap.h:449
void deffecwindow(int num_crate)
Definition: TrackerMap.h:247
bool temporary_file
Definition: TrackerMap.h:444
void drawPalette(std::ofstream *file)
Definition: TrackerMap.cc:2277
std::ofstream * svgfile
Definition: TrackerMap.h:436
void load(std::string s="tmap.svg")
Definition: TrackerMap.cc:2175
double xmax
Definition: TrackerMap.h:432
list mod
Load physics model.
std::map< const int, TmCcu * > MapCcu
Definition: TrackerMap.h:92
double ydpixel(double y)
Definition: TrackerMap.h:180
void drawModule(TmModule *mod, int key, int layer, bool total, std::ofstream *file)
Definition: TrackerMap.cc:495
void drawApvPair(int crate, int numfed_incrate, bool total, TmApvPair *apvPair, std::ofstream *file, bool useApvPairValue)
Definition: TrackerMap.cc:847
void init()
Definition: TrackerMap.cc:398
void fillc_fed_channel(int fedId, int fedCh, int red, int green, int blue)
Definition: TrackerMap.cc:2310
int getcolor(float value, int palette)
Definition: TrackerMap.cc:2623
double ymin
Definition: TrackerMap.h:432
void fillc(int idmod, int RGBcode)
Definition: TrackerMap.h:48
static int layerno(int subdet, int leftright, int layer)
Definition: TrackerMap.h:372
void printlayers(bool print_total=true, float minval=0., float maxval=0., std::string s="layer")
Definition: TrackerMap.cc:3268
void drawCcu(int crate, int numfed_incrate, bool total, TmCcu *ccu, std::ofstream *file, bool useCcuValue)
Definition: TrackerMap.cc:931
#define M_PI
Definition: BFit3D.cc:3
SvgFed fedMap
Definition: TrackerMap.h:91
PsuModule psuModuleMap
Definition: TrackerMap.h:99
part
Definition: HCALResponse.h:21
void fill_hv_channel3(int rack, int crate, int board, float qty)
Definition: TrackerMap.cc:2443
bool printflag
Definition: TrackerMap.h:101
FecModule fecModuleMap
Definition: TrackerMap.h:95
void setRange(float min, float max)
Definition: TrackerMap.h:72
std::string title
Definition: TrackerMap.h:108
double xdpixel(double x)
Definition: TrackerMap.h:174
void printonline()
Definition: TrackerMap.cc:2644
int nlayer(int det, int part, int lay)
Definition: TrackerMap.h:393
list key
Definition: combine.py:13
int find_layer(int ix, int iy)
Definition: TrackerMap.h:126
SvgApvPair apvMap
Definition: TrackerMap.h:87
void print(bool print_total=true, float minval=0., float maxval=0., std::string s="svgmap")
Definition: TrackerMap.cc:2210
tuple filename
Definition: lut2db_cfg.py:20
void save_as_fedtrackermap(bool print_total=true, float minval=0., float maxval=0., std::string s="fed_svgmap.svg", int width=1500, int height=800)
Definition: TrackerMap.cc:1950
void fill_fec_channel(int crate, int slot, int ring, int addr, float qty)
Definition: TrackerMap.cc:2361
float gmaxvalue
Definition: TrackerMap.h:441
void fill_current_val(int idmod, float current_val)
Definition: TrackerMap.cc:2522
float maxvalue
Definition: TrackerMap.h:442
void setText(int idmod, std::string s)
Definition: TrackerMap.cc:2560
bool enableLVProcessing
Definition: TrackerMap.h:104
bool firstcall
Definition: TrackerMap.h:435
x
Definition: VDTMath.h:216
MapPsu psuMap
Definition: TrackerMap.h:97
static bool isRingStereo(int key)
Definition: TrackerMap.h:384
Definition: TmCcu.h:5
float oldz
Definition: TrackerMap.h:448
void defcwindow(int num_crate)
Definition: TrackerMap.h:237
std::ifstream * jsfile
Definition: TrackerMap.h:438
Definition: TmPsu.h:6
void fill_lv_channel(int rack, int crate, int board, float qty)
Definition: TrackerMap.cc:2390
std::map< const int, TmModule * > ImoduleMap
Definition: TrackerMap.h:84
std::vector< TColor * > vc
Definition: TrackerMap.h:80
void fill(int layer, int ring, int nmod, float x)
Definition: TrackerMap.cc:2549
double ydpixelpsu(double y)
Definition: TrackerMap.h:228
void save_as_fectrackermap(bool print_total=true, float minval=0., float maxval=0., std::string s="fec_svgmap.svg", int width=1500, int height=800)
Definition: TrackerMap.cc:1194
void printall(bool print_total=true, float minval=0., float maxval=0., std::string s="svgmap")
Definition: TrackerMap.cc:2945
void fill_fed_channel(int fedId, int fedCh, float qty)
Definition: TrackerMap.cc:2470
std::multimap< TmCcu *, TmModule * > FecModule
Definition: TrackerMap.h:94
void fillc_hv_channel3(int rack, int crate, int board, int red, int green, int blue)
Definition: TrackerMap.cc:2416
int ntotRing[43]
Definition: TrackerMap.h:422
Definition: DDAxes.h:10
std::string jsfilename
Definition: TrackerMap.h:109