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