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 <utility>
4 #include <string>
5 #include <iostream>
6 #include <fstream>
7 #include <sstream>
8 #include <cmath>
9 #include <map>
13 #include "TColor.h"
14 #include <cassert>
15 
16 /*
17 #define NUMFEDCH_INCOLUMN 12
18 #define NUMFEDCH_INROW 8
19 #define NUMFED_INCOLUMN 6
20 #define NUMFED_INROW 4
21 #define NUMFEDCRATE_INCOLUMN 3
22 #define XFEDCSIZE 340
23 #define YFEDCSIZE 400
24 */
25 
26 /*
27 #define NUMFEDCH_INCOLUMN 12
28 #define NUMFEDCH_INROW 8
29 #define NUMFED_INCOLUMN 1
30 #define NUMFED_INROW 21
31 //#define NUMFEDCRATE_INCOLUMN 11
32 //#define NUMFEDCRATE_INROW 3
33 #define NUMFEDCRATE_INCOLUMN 16
34 #define NUMFEDCRATE_INROW 2
35 //#define XFEDCSIZE 160 // 14 boxes
36 //#define YFEDCSIZE 2100 // 9*21 boxes
37 #define XFEDCSIZE 140 // 14 boxes
38 #define YFEDCSIZE 1890 // 9*21 boxes
39 */
40 
41 #define NUMPSUCH_INROW 18
42 #define NUMPSUCRATE_INCOLUMN 5
43 #define NUMPSURACK_INCOLUMN 6
44 #define NUMPSURACK_INROW 5
45 #define XPSURSIZE 150 // (5)*1.5 boxes
46 #define YPSURSIZE 360 // 18 boxes
47 #define XPSUOFFSET 50
48 #define YPSUOFFSET 100
49 
50 #define NUMFEDCH_INCOLUMN 12
51 #define NUMFEDCH_INROW 8
52 #define NUMFED_INCOLUMN 21
53 #define NUMFED_INROW 1
54 //#define NUMFEDCRATE_INCOLUMN 11
55 //#define NUMFEDCRATE_INROW 3
56 #define NUMFEDCRATE_INCOLUMN 1
57 #define NUMFEDCRATE_INROW 31
58 //#define XFEDCSIZE 160 // 14 boxes
59 //#define YFEDCSIZE 2100 // 9*21 boxes
60 #define XFEDCSIZE 2940 // 14*21 boxes
61 #define YFEDCSIZE 90 // 9 boxes
62 #define XFEDOFFSET 150
63 #define YFEDOFFSET 100
64 
65 class TmModule;
66 class TmApvPair;
67 class EventSetup;
68 class TmCcu;
69 class TmPsu;
70 class TrackerTopology;
71 
72 class TrackerMap {
73  public:
74  //TrackerMap(){TrackerMap(" ");}; //!< default constructor
75  TrackerMap(std::string s=" ",int xsize1=340,int ysize1=200);
76  TrackerMap(const edm::ParameterSet & iConfig);
77  TrackerMap(const edm::ParameterSet & iConfig,const SiStripFedCabling* tkFed,const TrackerTopology* const topology);
78  ~TrackerMap();
79 
80  void build();
81  void init();
82  void drawModule(TmModule * mod, int key, int layer, bool total, std::ofstream * file);
83  void print(bool print_total=true,float minval=0., float maxval=0.,std::string s="svgmap");
84  void printall(bool print_total=true,float minval=0., float maxval=0.,std::string s="svgmap",int width=6000, int height=3200);
85  void printonline();
86  void printlayers(bool print_total=true,float minval=0., float maxval=0.,std::string s="layer");
87  void save(bool print_total=true,float minval=0., float maxval=0.,std::string s="svgmap.svg",int width=1500, int height=800);
88  void save_as_fedtrackermap(bool print_total=true,float minval=0., float maxval=0.,std::string s="fed_svgmap.svg",
91  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);
92  void save_as_psutrackermap(bool print_total=true,float minval=0., float maxval=0.,std::string s="psu_svgmap.svg",
95  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);
96  void drawApvPair( int crate, int numfed_incrate, bool total, TmApvPair* apvPair,std::ofstream * file,bool useApvPairValue);
97  void drawCcu( int crate, int numfed_incrate, bool total, TmCcu* ccu,std::ofstream * file,bool useCcuValue);
98  void drawPsu(int rack,int numcrate_inrack, bool print_total, TmPsu* psu,std::ofstream * svgfile,bool usePsuValue);
99  void drawHV2(int rack,int numcrate_inrack, bool print_total, TmPsu* psu,std::ofstream * svgfile,bool usePsuValue);
100  void drawHV3(int rack,int numcrate_inrack, bool print_total, TmPsu* psu,std::ofstream * svgfile,bool usePsuValue);
101  void fill_current_val(int idmod, float current_val );
102  void fill(int layer , int ring, int nmod, float x );
103  void fill(int idmod, float qty );
104  void fillc(int idmod, int RGBcode) {fillc(idmod,(RGBcode>>16) & 0xFF , (RGBcode>>8) & 0xFF, RGBcode & 0xFF);}
105  void fillc(int idmod, int red, int green, int blue);
106  void fillc(int layer,int ring, int nmod, int red, int green, int blue);
107  void fillc_all_blank();
108  void fill_all_blank();
109  void fill_current_val_fed_channel(int fedId,int fedCh, float current_val );
110  void fill_fed_channel(int fedId,int fedCh, float qty );
111  void fill_fed_channel(int modId, float qty );
112  void fillc_fed_channel(int fedId,int fedCh, int red, int green, int blue);
113  void fillc_fec_channel(int crate,int slot, int ring, int addr, int red, int green, int blue );
114  void fill_fec_channel(int crate,int slot, int ring, int addr, float qty );
115  void fill_lv_channel(int rack,int crate, int board, float qty );
116  void fillc_lv_channel(int rack,int crate, int board, int red, int green, int blue);
117  void fill_hv_channel2(int rack,int crate, int board, float qty );
118  void fillc_hv_channel2(int rack,int crate, int board, int red, int green, int blue);
119  void fill_hv_channel3(int rack,int crate, int board, float qty );
120  void fillc_hv_channel3(int rack,int crate, int board, int red, int green, int blue);
121  int module(int fedId,int fedCh);
122  void setText(int idmod , std::string s );
123  void setText(int layer, int ring, int nmod , std::string s );
124  void setPalette(int numpalette){palette=numpalette;}
125  void drawPalette(std::ofstream * file, int xoffset=3660, int yoffset=1540);
126  void showPalette(bool printflag1){printflag=printflag1;};
128  void setRange(float min,float max);
129  std::pair<float,float>getAutomaticRange();
130  void addPixel(bool addPixelfl){addPixelFlag=addPixelfl;};
131  void onlyPixel(bool onlyPixelfl){onlyPixelFlag=onlyPixelfl;};
132  void reset();
133  void load(std::string s="tmap.svg");
134  int getxsize(){return xsize;};
135  int getysize(){return ysize;};
136  int getcolor(float value, int palette);
137  std::ifstream * findfile(std::string filename);
138  int getNumMod(){return number_modules;};
139  std::vector<TColor*> vc;
140  typedef std::map<const int , TmModule *> SmoduleMap;
142  typedef std::map<const int , TmModule *> ImoduleMap;
144  typedef std::map<const int , TmApvPair*> SvgApvPair;
146  typedef std::multimap<const int , TmApvPair*> ModApvPair;
148  typedef std::map<const int , int> SvgFed;
151  typedef std::map<const int , TmCcu*> MapCcu;
153  typedef std::multimap<TmCcu* , TmModule*> FecModule;
155  typedef std::map<const int , TmPsu*> MapPsu;
157  typedef std::multimap<TmPsu* , TmModule*> PsuModule;
159  int palette;
160  bool printflag;
167  bool tkMapLog;
168  int ndet; //number of detectors
169  int npart; //number of detectors parts
174  double phival(double x, double y){
175  double phi;
176  double phi1=atan(y/x);
177  phi = phi1;
178  if(y<0. && x>0) phi = phi1+2.*M_PI;
179  if(x<0.)phi=phi1+M_PI;
180  if(fabs(y)<0.000001 && x>0)phi=0;
181  if(fabs(y)<0.000001&&x<0)phi=M_PI;
182  if(fabs(x)<0.000001&&y>0)phi=M_PI/2.;
183  if(fabs(x)<0.000001&&y<0)phi=3.*M_PI/2.;
184 
185  return phi;
186  }
187 
188  int find_layer(int ix, int iy)
189  {
190  int add;
191  int layer=0;
192  if(iy <= xsize){//endcap+z
193  add = 15;
194  layer = ix/ysize;
195  layer = layer+add+1;
196  }
197  if(iy > xsize && iy< 3*xsize){//barrel
198  add=30;
199  if(ix < 2*ysize){
200  layer=1;
201  }else {
202  layer = ix/(2*ysize);
203  if(iy < 2*xsize)layer=layer*2+1; else layer=layer*2;
204  }
205  layer = layer+add;
206  }
207  if(iy >= 3*xsize){ //endcap-z
208  layer = ix/ysize;
209  layer = 15-layer;
210  }
211  return layer;
212  }
213 
214  int getlayerCount(int subdet, int partdet){
215  int ncomponent=0;
216  if(subdet == 1){ //1=pixel
217  if(partdet == 1 || partdet == 3){ //1-3=encap
218  ncomponent = 3;
219  }
220  else { ncomponent = 3; } //barrel
221  }
222  if(subdet== 2){ //2=inner silicon
223  if(partdet == 1 || partdet == 3){ //1-3=encap
224  ncomponent = 3;
225  }
226  else { ncomponent = 4; } //barrel
227  }
228  if(subdet== 3){ //3=outer silicon
229  if(partdet == 1 || partdet == 3){ //1-3=encap
230  ncomponent = 9;
231  }
232  else { ncomponent = 6; } //barrel
233  }
234  return(ncomponent);
235  }
236  double xdpixel(double x){
237  double res;
238  if(saveAsSingleLayer)res= ((x-xmin)/(xmax-xmin)*xsize);
239  else res= ((x-xmin)/(xmax-xmin)*xsize)+ix;
240  return res;
241  }
242  double ydpixel(double y){
243  double res=0;
244  double y1;
245  y1 = (y-ymin)/(ymax-ymin);
246  if(nlay>30)
247  {
248  if(nlay <34) res= 2*ysize - (y1*2*ysize);
249  if(nlay==34) res= 2.4*ysize - (y1*2.4*ysize);
250  if(nlay>34) res= 2.5*ysize - (y1*2.5*ysize);
251  }
252  else res= xsize - (y1*xsize);
253  if(!saveAsSingleLayer) res=res+iy;
254  return res;
255  }
256  double xdpixelc(double x){
257  double res;
258  if(saveAsSingleLayer)res= ((x-xmin)/(xmax-xmin)*XFEDCSIZE);
259  else res= ((x-xmin)/(xmax-xmin)*XFEDCSIZE)+ix;
260  return res;
261  }
262  double ydpixelc(double y){
263  double res;
264  double y1;
265  y1 = (y-ymin)/(ymax-ymin);
266  if(saveAsSingleLayer)res= YFEDCSIZE - (y1*YFEDCSIZE);
267  else res= YFEDCSIZE - (y1*YFEDCSIZE)+iy;
268  return res;
269  }
270  double xdpixelfec(double x){
271  double res;
272  if(saveAsSingleLayer)res= ((x-xmin)/(xmax-xmin)*xsize);
273  else res= ((x-xmin)/(xmax-xmin)*xsize)+ix;
274  return res;
275  }
276  double ydpixelfec(double y){
277  double res;
278  double y1;
279  y1 = (y-ymin)/(ymax-ymin);
280  if(saveAsSingleLayer)res= 2*ysize - (y1*2*ysize);
281  else res= 2*ysize - (y1*2*ysize)+iy;
282  return res;
283  }
284  double xdpixelpsu(double x){
285  double res;
286  if(saveAsSingleLayer)res= ((x-xmin)/(xmax-xmin)*XPSURSIZE);
287  else res= ((x-xmin)/(xmax-xmin)*XPSURSIZE)+ix;
288  return res;
289  }
290  double ydpixelpsu(double y){
291  double res;
292  double y1;
293  y1 = (y-ymin)/(ymax-ymin);
294  if(saveAsSingleLayer)res=YPSURSIZE - (y1*YPSURSIZE);
295  else res= YPSURSIZE - (y1*YPSURSIZE)+iy;
296  return res;
297  }
298 
299  void defcwindow(int num_crate){
300  // ncrate = num_crate;
301  int xoffset=XFEDOFFSET;
302  int yoffset=YFEDOFFSET;
304 
305  ix = xoffset+((NUMFEDCRATE_INCOLUMN-1)-((num_crate-1)%NUMFEDCRATE_INCOLUMN))*(XFEDCSIZE+XFEDOFFSET);
306  iy = yoffset+((num_crate-1)/NUMFEDCRATE_INCOLUMN)*(YFEDCSIZE+YFEDOFFSET);
307  }
308  void deffecwindow(int num_crate){
309  // ncrate = num_crate;
310  int xoffset=xsize/3;
311  int yoffset=2*ysize;
312  xmin=-1.;xmax=37.; ymin = -10.; ymax=40.;
313  if(num_crate==1||num_crate==3)ix = xoffset+xsize*2;
314  if(num_crate==2||num_crate==4)ix = xoffset;
315  iy = yoffset+((num_crate-1)/2)*ysize*4;
316  }
317  void defpsuwindow(int num_rack){
318  // nrack = num_rack;
319  int xoffset=XPSUOFFSET;
320  int yoffset=YPSUOFFSET;
321  xmin=0; xmax=(NUMPSUCRATE_INCOLUMN)*1.5;
323 
324  ix = xoffset+((NUMPSURACK_INCOLUMN-1)-((num_rack-1)%NUMPSURACK_INCOLUMN))*(XPSURSIZE+XPSUOFFSET);
325  iy = yoffset+((num_rack-1)/NUMPSURACK_INCOLUMN)*(YPSURSIZE+YPSUOFFSET);
326  }
327 
328 
329 void defwindow(int num_lay){
330  // nlay = num_lay;
331  if(posrel){ // separated modules
332  xmin=-2.;ymin=-2.;xmax=2.;ymax=2.;
333  if(num_lay >12 && num_lay < 19){
334  xmin=-.40;xmax=.40;ymin=-.40;ymax=.40;
335  }
336  if(num_lay>30){
337  xmin=-0.1;xmax=3.;ymin=-0.1;ymax=8.5;
338  if(num_lay<34){xmin=-0.3;xmax=1.0;}
339  if(num_lay>33&&num_lay<38){xmax=2.0;}
340  if(num_lay>37){ymax=8.;}//inner
341  }
342  }else{ //overlayed modules
343  xmin=-1.3;ymin=-1.3;xmax=1.3;ymax=1.3;
344  if(num_lay >12 && num_lay < 19){
345  xmin=-.20;xmax=.20;ymin=-.20;ymax=.20;
346  }
347  if(num_lay>30){
348  xmin=-1.5;xmax=1.5;ymin=-1.;ymax=28.;
349  if(num_lay<34){xmin=-0.5;xmax=0.5;}
350  if(num_lay>33&&num_lay<38){xmin=-1.;xmax=1.;}
351  }
352 
353  }
354  if(num_lay<16){
355  ix=0;
356  if(num_lay==15||num_lay==14)iy=(15-num_lay)*2*ysize; else
357  {if(num_lay>9&&num_lay<13)iy=4*ysize-(int)(ysize/2.)+(12-num_lay)*(int)(ysize/1.50);else iy=6*ysize+(9-num_lay)*(int)(ysize*1.3);}}
358  if(num_lay>15&&num_lay<31){
359  ix=3*xsize;
360  if(num_lay==16||num_lay==17)iy=(num_lay-16)*2*ysize; else
361  {if(num_lay>18&&num_lay<22)iy=4*ysize-(int)(ysize/2.)+(num_lay-19)*(int)(ysize/1.50);else iy=6*ysize+(num_lay-22)*(int)(ysize*1.3);}}
362  if(num_lay>30){
363  if(num_lay==31){ix=(int)(1.5*xsize);iy=0;}
364  if(num_lay==32){int il=(num_lay-30)/2;ix=xsize;iy=il*2*ysize;}
365  if(num_lay==33){int il=(num_lay-30)/2;ix=2*xsize;iy=il*2*ysize;}
366  if(num_lay==34){int il=(num_lay-30)/2;ix=xsize;iy=il*(int)(2.57*ysize);}
367  if(num_lay>34 && num_lay%2==0){int il=(num_lay-30)/2;ix=xsize;iy=il*(int)(2.5*ysize);}
368  if(num_lay>34 && num_lay%2!=0){int il=(num_lay-30)/2;ix=2*xsize;iy=il*(int)(2.5*ysize);}
369  }
370 }
371 
372  int getringCount(int subdet, int partdet, int layer){
373  int ncomponent=0;
374  if(subdet== 1){ //1=pixel
375  if(partdet== 1 || partdet== 3){ //end-cap
376  ncomponent = 7;
377  }
378  else{ncomponent = 8;} //barrel
379  }
380  if(subdet== 2){ //inner-silicon
381  if(partdet== 1 || partdet== 3){ //end-cap
382  ncomponent = 3;
383  }
384  else{ncomponent = 12;} //barrel
385  }
386  if(subdet== 3){ //outer-silicon
387  if(partdet== 1){ //end-cap-z
388  if (layer== 1) ncomponent = 4;
389  if (layer== 2 || layer== 3) ncomponent = 5;
390  if (layer== 4 || layer== 5 || layer== 6) ncomponent = 6;
391  if (layer== 7 || layer== 8 || layer== 9) ncomponent = 7;
392  }
393  if(partdet== 3){ //endcap+z
394  if (layer== 9) ncomponent = 4;
395  if (layer== 8 || layer== 7) ncomponent = 5;
396  if (layer== 6 || layer== 5 || layer== 4) ncomponent = 6;
397  if (layer== 3 || layer== 2 || layer== 1) ncomponent = 7;
398  }
399  if(partdet== 2){ //barrel
400  ncomponent = 12;
401  }
402  }
403  return(ncomponent);
404  }
405  int getmoduleCount(int subdet, int partdet, int layer, int ring){
406  int ncomponent=0;
407  int spicchif[] ={24,24,40,56,40,56,80};
408  int spicchib[] ={20,32,44,30,38,46,56,42,48,54,60,66,74};
409  int numero_layer = 0;
410 
411  if(partdet == 2){ //barrel
412  numero_layer = layer-1;
413  if(subdet== 2){ //inner
414  numero_layer = numero_layer+3;
415  }
416  if(subdet == 3){ //outer
417  numero_layer = numero_layer+7;
418  }
419  ncomponent = spicchib[numero_layer];
420  }
421  if(partdet!= 2){ //endcap
422  if(subdet== 1)ncomponent=24;//pixel
423  else
424  ncomponent = spicchif[ring-1];
425  }
426  return(ncomponent);
427  }
428  static int layerno(int subdet,int leftright,int layer){
429  if(subdet==6&&leftright==1)return(10-layer);
430  if(subdet==6&&leftright==2)return(layer+21);
431  if(subdet==4&&leftright==1)return(4-layer+9);
432  if(subdet==4&&leftright==2)return(layer+18);
433  if(subdet==2&&leftright==1)return(4-layer+12);
434  if(subdet==2&&leftright==2)return(layer+15);
435  if(subdet==1)return(layer+30);
436  if(subdet==3)return(layer+33);
437  if(subdet==5)return(layer+37);
438  assert(false);
439  }
440 
441  static bool isRingStereo(int key){
442  int layer=key/100000;
443  int ring = key - layer*100000;
444  ring = ring/1000;
445  if(layer==34 || layer==35 || layer==38 || layer==39) return true;
446  if(layer<13 || (layer>18&&layer<31))
447  if(ring==1 || ring==2 || ring==5)return true;
448  return false;
449  }
450  int nlayer(int det,int part,int lay){
451  if(det==3 && part==1) return lay;
452  if(det==2 && part==1) return lay+9;
453  if(det==1 && part==1) return lay+12;
454  if(det==1 && part==3) return lay+15;
455  if(det==2 && part==3) return lay+18;
456  if(det==3 && part==3) return lay+21;
457  if(det==1 && part==2) return lay+30;
458  if(det==2 && part==2) return lay+33;
459  if(det==3 && part==2) return lay+37;
460  return -1;
461  }
462 
463  std::string layername(int layer){
464  std::string s= " ";
465  std::ostringstream ons;
466 
467  if(layer < 10) ons << "TEC -z Layer " << layer;
468  if(layer < 13 && layer > 9) ons << "TID -z Layer " << layer-9;
469  if(layer < 16 && layer > 12) ons << "FPIX -z Layer " << layer-12;
470  if(layer < 19 && layer > 15) ons << "FPIX +z Layer " << layer-15;
471  if(layer < 22 && layer > 18) ons << "TID +z Layer " << layer-18;
472  if(layer < 31 && layer > 21) ons << "TEC +z Layer " << layer-21;
473  if(layer < 34 && layer > 30) ons << "TPB Layer " << layer-30;
474  if(layer < 38 && layer > 33) ons << "TIB Layer " << layer-33;
475  if(layer > 37) ons << "TOB Layer " << layer-37;
476  s = ons.str();
477  return s;
478  }
479  int ntotRing[43];
480  int firstRing[43];
481 
482  protected:
483  int nlay;
484  // int ncrate;
485  // int nrack;
486  int ncrates;
490  double xmin,xmax,ymin,ymax;
492  bool posrel;
493  bool firstcall;
494  std::ofstream * svgfile;
495  std::ofstream * savefile;
496  std::ifstream * jsfile;
497  std::ifstream * inputfile;
498  std::ifstream * ccufile;
503 
504  private:
505 
506  float oldz;
510 };
511 #endif
512 
void reset()
Definition: TrackerMap.cc:431
bool tkMapLog
Definition: TrackerMap.h:167
void fill_hv_channel2(int rack, int crate, int board, float qty)
Definition: TrackerMap.cc:2659
#define NUMFEDCRATE_INCOLUMN
Definition: TrackerMap.h:56
void build()
Definition: TrackerMap.cc:2808
float minvalue
Definition: TrackerMap.h:500
TrackerMap(std::string s=" ", int xsize1=340, int ysize1=200)
Definition: TrackerMap.cc:412
ModApvPair apvModuleMap
Definition: TrackerMap.h:147
double ydpixelc(double y)
Definition: TrackerMap.h:262
std::ifstream * findfile(std::string filename)
Definition: TrackerMap.cc:3510
int nfeccrates
Definition: TrackerMap.h:488
void fillc_all_blank()
Definition: TrackerMap.cc:2732
#define NUMPSURACK_INCOLUMN
Definition: TrackerMap.h:43
double ydpixelfec(double y)
Definition: TrackerMap.h:276
std::string layername(int layer)
Definition: TrackerMap.h:463
int getmoduleCount(int subdet, int partdet, int layer, int ring)
Definition: TrackerMap.h:405
MapCcu ccuMap
Definition: TrackerMap.h:152
void fillc_hv_channel2(int rack, int crate, int board, int red, int green, int blue)
Definition: TrackerMap.cc:2631
SmoduleMap smoduleMap
Definition: TrackerMap.h:141
std::ifstream * inputfile
Definition: TrackerMap.h:497
std::ofstream * savefile
Definition: TrackerMap.h:495
int getxsize()
Definition: TrackerMap.h:134
bool psetAvailable
Definition: TrackerMap.h:173
void addPixel(bool addPixelfl)
Definition: TrackerMap.h:130
#define YFEDOFFSET
Definition: TrackerMap.h:63
void save_as_psutrackermap(bool print_total=true, float minval=0., float maxval=0., std::string s="psu_svgmap.svg", int width=100+(360+100)*5+300, int height=50+(150+50)*6+300)
Definition: TrackerMap.cc:1844
CaloTopology const * topology(0)
~TrackerMap()
default destructor
Definition: TrackerMap.cc:490
bool saveGeoTrackerMap
Definition: TrackerMap.h:162
int module(int fedId, int fedCh)
Definition: TrackerMap.cc:2688
bool enableFecProcessing
Definition: TrackerMap.h:164
double xmin
Definition: TrackerMap.h:490
#define XPSURSIZE
Definition: TrackerMap.h:45
std::multimap< const int, TmApvPair * > ModApvPair
Definition: TrackerMap.h:146
void defwindow(int num_lay)
Definition: TrackerMap.h:329
assert(m_qm.get())
#define NUMFEDCH_INCOLUMN
Definition: TrackerMap.h:50
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:1562
std::map< const int, int > SvgFed
Definition: TrackerMap.h:148
double xdpixelc(double x)
Definition: TrackerMap.h:256
void defpsuwindow(int num_rack)
Definition: TrackerMap.h:317
bool addPixelFlag
Definition: TrackerMap.h:508
int number_modules
Definition: TrackerMap.h:501
bool saveWebInterface
Definition: TrackerMap.h:161
std::string infilename
Definition: TrackerMap.h:171
int getlayerCount(int subdet, int partdet)
Definition: TrackerMap.h:214
int npsuracks
Definition: TrackerMap.h:489
void fill_current_val_fed_channel(int fedId, int fedCh, float current_val)
Definition: TrackerMap.cc:2565
void add(const std::vector< const T * > &source, std::vector< const T * > &dest)
#define YFEDCSIZE
Definition: TrackerMap.h:61
bool enableFedProcessing
Definition: TrackerMap.h:163
ImoduleMap imoduleMap
Definition: TrackerMap.h:143
int firstRing[43]
Definition: TrackerMap.h:480
int getNumMod()
Definition: TrackerMap.h:138
float gminvalue
Definition: TrackerMap.h:499
#define NUMFEDCRATE_INROW
Definition: TrackerMap.h:57
std::multimap< TmPsu *, TmModule * > PsuModule
Definition: TrackerMap.h:157
void fillc_fec_channel(int crate, int slot, int ring, int addr, int red, int green, int blue)
Definition: TrackerMap.cc:2576
void setTitle(std::string s)
Definition: TrackerMap.h:127
std::string jsPath
Definition: TrackerMap.h:172
bool enableHVProcessing
Definition: TrackerMap.h:166
double xdpixelfec(double x)
Definition: TrackerMap.h:270
bool posrel
Definition: TrackerMap.h:492
int getysize()
Definition: TrackerMap.h:135
double phival(double x, double y)
Definition: TrackerMap.h:174
void fill_all_blank()
Definition: TrackerMap.cc:2740
std::map< const int, TmPsu * > MapPsu
Definition: TrackerMap.h:155
void fillc_lv_channel(int rack, int crate, int board, int red, int green, int blue)
Definition: TrackerMap.cc:2604
std::map< const int, TmApvPair * > SvgApvPair
Definition: TrackerMap.h:144
void showPalette(bool printflag1)
Definition: TrackerMap.h:126
int getringCount(int subdet, int partdet, int layer)
Definition: TrackerMap.h:372
double xdpixelpsu(double x)
Definition: TrackerMap.h:284
double ymax
Definition: TrackerMap.h:490
void drawHV3(int rack, int numcrate_inrack, bool print_total, TmPsu *psu, std::ofstream *svgfile, bool usePsuValue)
Definition: TrackerMap.cc:1238
std::ifstream * ccufile
Definition: TrackerMap.h:498
std::map< const int, TmModule * > SmoduleMap
Definition: TrackerMap.h:140
void setPalette(int numpalette)
Definition: TrackerMap.h:124
#define NUMFED_INCOLUMN
Definition: TrackerMap.h:52
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:699
bool saveAsSingleLayer
Definition: TrackerMap.h:507
void deffecwindow(int num_crate)
Definition: TrackerMap.h:308
bool temporary_file
Definition: TrackerMap.h:502
bool onlyPixelFlag
Definition: TrackerMap.h:509
std::ofstream * svgfile
Definition: TrackerMap.h:494
void load(std::string s="tmap.svg")
Definition: TrackerMap.cc:2398
#define XFEDCSIZE
Definition: TrackerMap.h:60
double xmax
Definition: TrackerMap.h:490
T min(T a, T b)
Definition: MathUtil.h:58
std::map< const int, TmCcu * > MapCcu
Definition: TrackerMap.h:151
double ydpixel(double y)
Definition: TrackerMap.h:242
void drawModule(TmModule *mod, int key, int layer, bool total, std::ofstream *file)
Definition: TrackerMap.cc:537
string key
FastSim: produces sample of signal events, overlayed with premixed minbias events.
void drawApvPair(int crate, int numfed_incrate, bool total, TmApvPair *apvPair, std::ofstream *file, bool useApvPairValue)
Definition: TrackerMap.cc:943
void init()
Definition: TrackerMap.cc:439
void fillc_fed_channel(int fedId, int fedCh, int red, int green, int blue)
Definition: TrackerMap.cc:2538
int getcolor(float value, int palette)
Definition: TrackerMap.cc:2851
double ymin
Definition: TrackerMap.h:490
void fillc(int idmod, int RGBcode)
Definition: TrackerMap.h:104
#define M_PI
static int layerno(int subdet, int leftright, int layer)
Definition: TrackerMap.h:428
void printlayers(bool print_total=true, float minval=0., float maxval=0., std::string s="layer")
Definition: TrackerMap.cc:3527
SvgFed slotMap
Definition: TrackerMap.h:150
void drawHV2(int rack, int numcrate_inrack, bool print_total, TmPsu *psu, std::ofstream *svgfile, bool usePsuValue)
Definition: TrackerMap.cc:1171
void drawCcu(int crate, int numfed_incrate, bool total, TmCcu *ccu, std::ofstream *file, bool useCcuValue)
Definition: TrackerMap.cc:1029
void save_as_fedtrackermap(bool print_total=true, float minval=0., float maxval=0., std::string s="fed_svgmap.svg", int width=100+(90+100)*31+300, int height=150+(2940+150)*1+300)
Definition: TrackerMap.cc:2126
SvgFed fedMap
Definition: TrackerMap.h:149
PsuModule psuModuleMap
Definition: TrackerMap.h:158
#define YPSUOFFSET
Definition: TrackerMap.h:48
part
Definition: HCALResponse.h:20
void fill_hv_channel3(int rack, int crate, int board, float qty)
Definition: TrackerMap.cc:2671
#define NUMPSUCRATE_INCOLUMN
Definition: TrackerMap.h:42
bool printflag
Definition: TrackerMap.h:160
int firstcrate
Definition: TrackerMap.h:487
FecModule fecModuleMap
Definition: TrackerMap.h:154
Contains cabling info at the device level, including DetId, APV pair numbers, hardware addresses...
void setRange(float min, float max)
Definition: TrackerMap.cc:671
void drawPalette(std::ofstream *file, int xoffset=3660, int yoffset=1540)
Definition: TrackerMap.cc:2500
#define YPSURSIZE
Definition: TrackerMap.h:46
std::string title
Definition: TrackerMap.h:170
double xdpixel(double x)
Definition: TrackerMap.h:236
void printonline()
Definition: TrackerMap.cc:2878
int nlayer(int det, int part, int lay)
Definition: TrackerMap.h:450
#define NUMFED_INROW
Definition: TrackerMap.h:53
int find_layer(int ix, int iy)
Definition: TrackerMap.h:188
SvgApvPair apvMap
Definition: TrackerMap.h:145
void print(bool print_total=true, float minval=0., float maxval=0., std::string s="svgmap")
Definition: TrackerMap.cc:2433
tuple filename
Definition: lut2db_cfg.py:20
void fill_fec_channel(int crate, int slot, int ring, int addr, float qty)
Definition: TrackerMap.cc:2589
float gmaxvalue
Definition: TrackerMap.h:499
void fill_current_val(int idmod, float current_val)
Definition: TrackerMap.cc:2750
float maxvalue
Definition: TrackerMap.h:500
void setText(int idmod, std::string s)
Definition: TrackerMap.cc:2788
#define XFEDOFFSET
Definition: TrackerMap.h:62
bool enableLVProcessing
Definition: TrackerMap.h:165
#define NUMPSURACK_INROW
Definition: TrackerMap.h:44
bool firstcall
Definition: TrackerMap.h:493
MapPsu psuMap
Definition: TrackerMap.h:156
static bool isRingStereo(int key)
Definition: TrackerMap.h:441
Definition: TmCcu.h:5
float oldz
Definition: TrackerMap.h:506
void defcwindow(int num_crate)
Definition: TrackerMap.h:299
std::ifstream * jsfile
Definition: TrackerMap.h:496
T mod(const T &a, const T &b)
Definition: ecalDccMap.h:4
Definition: TmPsu.h:6
#define XPSUOFFSET
Definition: TrackerMap.h:47
void fill_lv_channel(int rack, int crate, int board, float qty)
Definition: TrackerMap.cc:2618
std::map< const int, TmModule * > ImoduleMap
Definition: TrackerMap.h:142
std::vector< TColor * > vc
Definition: TrackerMap.h:138
#define NUMPSUCH_INROW
Definition: TrackerMap.h:41
void onlyPixel(bool onlyPixelfl)
Definition: TrackerMap.h:131
void printall(bool print_total=true, float minval=0., float maxval=0., std::string s="svgmap", int width=6000, int height=3200)
Definition: TrackerMap.cc:3179
void drawPsu(int rack, int numcrate_inrack, bool print_total, TmPsu *psu, std::ofstream *svgfile, bool usePsuValue)
Definition: TrackerMap.cc:1094
void fill(int layer, int ring, int nmod, float x)
Definition: TrackerMap.cc:2777
double ydpixelpsu(double y)
Definition: TrackerMap.h:290
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:1303
void fill_fed_channel(int fedId, int fedCh, float qty)
Definition: TrackerMap.cc:2698
#define NUMFEDCH_INROW
Definition: TrackerMap.h:51
std::multimap< TmCcu *, TmModule * > FecModule
Definition: TrackerMap.h:153
void fillc_hv_channel3(int rack, int crate, int board, int red, int green, int blue)
Definition: TrackerMap.cc:2644
int ntotRing[43]
Definition: TrackerMap.h:479
std::pair< float, float > getAutomaticRange()
Definition: TrackerMap.cc:675
std::string jsfilename
Definition: TrackerMap.h:171