test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
ME.cc
Go to the documentation of this file.
1 #include <cassert>
2 #include <cstdio>
3 #include <cstdlib>
4 #include <iostream>
5 #include <time.h>
6 
10 
11 //GHM ClassImp(ME)
12 
13 using namespace std;
14 
15 const ME::TimeStamp ME::kLowMask=0xFFFFFFFF;
16 
17 TString ME::granularity[ME::iSizeG] = {
18  "R", "SM", "LMR", "LMM", "SC", "C"
19 };
20 
21 TString ME::APDPrimVar[ME::iSizeAPD] = {
22  "FLAG", "MEAN", "RMS", "M3",
23  "APD_OVER_PNA_MEAN", "APD_OVER_PNA_RMS", "APD_OVER_PNA_M3",
24  "APD_OVER_PNB_MEAN", "APD_OVER_PNB_RMS", "APD_OVER_PNB_M3",
25  "APD_OVER_PN_MEAN", "APD_OVER_PN_RMS", "APD_OVER_PN_M3",
26  "SHAPE_COR", "ALPHA", "BETA",
27  "TIME_MEAN", "TIME_RMS", "TIME_M3", "TIME_NEVT"
28 };
29 
30 TString ME::PNPrimVar[ME::iSizePN] = {
31  "FLAG", "MEAN", "RMS", "M3",
32  "PNA_OVER_PNB_MEAN", "PNA_OVER_PNB_RMS", "PNA_OVER_PNB_M3",
33 };
34 
35 TString ME::MTQPrimVar[ME::iSizeMTQ] = {
36  "FIT_METHOD",
37  "MTQ_AMPL", "MTQ_TIME", "MTQ_RISE",
38  "MTQ_FWHM", "MTQ_FW20", "MTQ_FW80", "MTQ_SLIDING"
39 };
40 
42  "FLAG", "MEAN", "RMS", "M3", "NEVT"
43 };
44 
45 TString ME::TPPNPrimVar[ME::iSizeTPPN] = {
46  "GAIN", "MEAN", "RMS", "M3"
47 };
48 
49 TString ME::type[ME::iSizeT] = {
50  "Laser", "TestPulse"
51 };
52 
53 TString ME::color[ME::iSizeC] = {
54  "Blue", "Green", "Red", "IRed", "LED1", "LED2"
55 };
56 
57 std::vector<MEChannel*> ME::_trees = std::vector<MEChannel*>(4,(MEChannel*)0);
58 
59 bool ME::useElectronicNumbering = false;
60 
61 TString
62 ME::lmdataPath( int lmr )
63 {
64  TString out_(getenv("MELMDAT"));
65  out_ += "/";
66  out_ += ME::smName(lmr);
67  out_ += "/";
68  return out_;
69 }
70 
71 TString
72 ME::primPath( int lmr )
73 {
74  TString out_(getenv("MESTORE"));
75  out_ += "/";
76  out_ += ME::smName(lmr);
77  out_ += "/";
78  return out_;
79 }
80 
81 TString
83 {
84  return TString(getenv("MUSECAL"))+"/";
85 }
86 
87 TString
89 {
90  // get the laser monitoring region and super-module
91  int lmr_ = ME::lmr( header.dcc, header.side );
92  TString outfile_ = primPath( lmr_ );
93  outfile_ += "LMF_";
94  outfile_ += ME::smName( lmr_ );
95  outfile_ += "_"; outfile_ += header.side;
96  if( settings.type==ME::iLaser )
97  {
98  switch( settings.wavelength )
99  {
100  case iBlue: outfile_ += "_BlueLaser"; break;
101  case iGreen: outfile_ += "_GreenLaser"; break;
102  case iRed: outfile_ += "_RedLaser"; break;
103  case iIRed: outfile_ += "_IRedLaser"; break;
104  default: break;
105  }
106  }
107  else if( settings.type==ME::iTestPulse )
108  {
109  outfile_ += "_testPulse";
110  }
111  outfile_ += "_"; outfile_ += header.rundir.c_str();
112  outfile_ += "_TS"; outfile_ += header.ts_beg;
113  outfile_ += ".root";
114  return outfile_;
115 }
116 
117 TString
118 ME::runListName( int lmr, int type, int color )
119 {
120  TString outfile_ = primPath( lmr );
121  if( type==iLaser )
122  {
123  outfile_ += "runlist_";
124  switch( color )
125  {
126  case ME::iBlue: outfile_+="Blue_"; break;
127  case ME::iGreen: outfile_+="Red_"; break;
128  case ME::iRed: outfile_+="Red_"; break;
129  case ME::iIRed: outfile_+="IRed_"; break;
130  default: abort();
131  }
132  outfile_ += "Laser";
133  }
134  else if( type==iTestPulse )
135  {
136  outfile_ += "runlist_Test_Pulse";
137  }
138  return outfile_;
139 }
140 
141 std::vector< ME::Time >
142 ME::timeDiff( Time t1, Time t2, short int& sign )
143 {
144  sign = 1;
145  // Time t1 = time_high( T1 );
146  // Time t2 = time_high( T2 );
147  Time dt_s(0);
148  if( t1>t2 )
149  {
150  dt_s = t1-t2;
151  }
152  else
153  {
154  sign = -1;
155  dt_s = t2-t1;
156  }
157  Time dt_min = dt_s/60;
158  Time n_s = dt_s-dt_min*60;
159  Time dt_h = dt_min/60;
160  Time n_min = dt_min-dt_h*60;
161  Time dt_day = dt_h/24;
162  Time n_h = dt_h-dt_day*24;
163  Time n_day = dt_day;
164 
165 
166  std::vector< Time > vec_;
167  vec_.push_back( n_day );
168  vec_.push_back( n_h );
169  vec_.push_back( n_min );
170  vec_.push_back( n_s );
171 
172  return vec_;
173 }
174 
175 float
176 ME::timeDiff( Time t1, Time t0, int tunit )
177 {
178  float sign = 1.;
179  Time dt(0);
180  if( t1>t0 )
181  {
182  dt = t1-t0;
183  }
184  else
185  {
186  sign = -1.;
187  dt = t0-t1;
188  }
189  float dt_f = ((float) dt)*sign;
190  switch( tunit )
191  {
192  case iDay:
193  return dt_f/86400.;
194  break;
195  case iHour:
196  return dt_f/3600.;
197  break;
198  case iMinute:
199  return dt_f/60.;
200  break;
201  default:
202  return dt_f;
203  };
204  return 0;
205 }
206 
207 ME::Time
208 ME::time( float dt, Time t0, int tunit )
209 {
210  short int sign = 1;
211  if( dt<0 ) sign = -1;
212  float t_ = sign*dt;
213  switch( tunit )
214  {
215  case iDay:
216  t_*=86400;
217  break;
218  case iHour:
219  t_*=3600;
220  break;
221  case iMinute:
222  t_*=60;
223  break;
224  };
225  ME::Time it_ = static_cast<ME::Time>(t_);
226  std::cout << "dt/it/t0/ " << dt << "/" << it_ << "/" << t0 << std::endl;
227  if( sign==1 ) return t0+it_;
228  else return t0-it_;
229 }
230 
231 ME::Time
233 {
234  return static_cast<Time>(kLowMask&t);
235 }
236 
237 ME::Time
239 {
240  return static_cast<Time>(t>>32);
241 }
242 
243 TString
245  "EE-", "EB-", "EB+", "EE+"
246 };
247 
248 int
249 ME::ecalRegion( int ilmr )
250 {
251  assert( ilmr>0 && ilmr<=92 );
252  if( ilmr<=36 ) return iEBM;
253  ilmr-=36;
254  if( ilmr<=36 ) return iEBP;
255  ilmr-=36;
256  if( ilmr<=10 ) return iEEP;
257  return iEEM;
258 }
259 
260 int
261 ME::lmr( int idcc, int side )
262 {
263  int ilmr=0;
264 
265  assert( side==0 || side==1 );
266 
267  if( idcc>600 ) idcc-=600;
268  assert( idcc>=1 && idcc<=54 );
269  int ireg;
270  if( idcc<=9 ) ireg = iEEM;
271  else
272  {
273  idcc -= 9;
274  if( idcc<=18 ) ireg = iEBM;
275  else
276  {
277  idcc -= 18;
278  if( idcc<=18 ) ireg = iEBP;
279  else
280  {
281  idcc -= 18;
282  if( idcc<=9 ) ireg = iEEP;
283  else
284  abort();
285  }
286  }
287  }
288  if( ireg==iEEM || ireg==iEEP )
289  {
290  if( side==1 && idcc!=8 )
291  {
292  return -1;
293  }
294  ilmr = idcc;
295  if( idcc==9 ) ilmr++;
296  if( idcc==8 && side==1 ) ilmr++;
297  }
298  else if( ireg==iEBM || ireg==iEBP )
299  {
300  ilmr = 2*(idcc-1) + side + 1;
301  }
302  else
303  abort();
304 
305  if( ireg==iEBP ) ilmr+=36;
306  else if( ireg==iEEP ) ilmr+=72;
307  else if( ireg==iEEM ) ilmr+=82;
308 
309  return ilmr;
310 }
311 
312 std::pair< int, int >
313 ME::dccAndSide( int ilmr )
314 {
315  int idcc=0;
316  int side=0;
317 
318  int ireg = ecalRegion( ilmr );
319  if( ireg==iEEM ) ilmr-=82;
320  else if( ireg==iEBP ) ilmr-=36;
321  else if( ireg==iEEP ) ilmr-=72;
322 
323  if( ireg==iEEM || ireg==iEEP )
324  {
325  assert( ilmr>=1 && ilmr<=10 );
326  side = 0;
327  idcc = ilmr;
328  if( ilmr>=9 ) idcc--;
329  if( ilmr==9 ) side=1;
330  }
331  else
332  {
333  assert( ilmr>=1 && ilmr<=36 );
334  idcc = (ilmr-1)/2+1;
335  side = (ilmr-1)%2;
336  }
337 
338  if( ireg>iEEM ) idcc+=9;
339  if( ireg>iEBM ) idcc+=18;
340  if( ireg>iEBP ) idcc+=18;
341 
342  // idcc += 600;
343 
344  return std::pair< int,int >( idcc, side );
345 }
346 
347 void
348 ME::regionAndSector( int ilmr, int& ireg, int& ism, int& idcc, int& side )
349 {
350  ireg = ecalRegion( ilmr );
351 
352  std::pair< int, int > ipair_ = dccAndSide( ilmr );
353  idcc = ipair_.first;
354  side = ipair_.second;
355 
356  ism = 0;
357  if( ireg==iEEM || ireg==iEEP )
358  {
359  if( idcc>600 ) idcc-=600; // also works with FEDids
360  if( idcc>=1 && idcc<=9 )
361  {
362  ism = 6+idcc;
363  if( ism>9 ) ism-=9;
364  ism+=9;
365  }
366  else if( idcc>=46 && idcc<=54 )
367  {
368  ism = idcc-46+7;
369  if( ism>9 ) ism-=9;
370  }
371  else
372  abort();
373  }
374  else if( ireg==iEBM || ireg==iEBP )
375  {
376  if( idcc>600 ) idcc-=600; // also works with FEDids
377  assert( idcc>=10 && idcc<=45 );
378  ism=idcc-9;
379  if( ism>18 ) ism-=18;
380  else ism+=18;
381  }
382  else
383  abort();
384 }
385 
386 TString
387 ME::smName( int ireg, int ism )
388 {
389  TString out;
390  if( ireg==ME::iEEM || ireg==ME::iEEP )
391  {
392  assert( ism>=1 && ism<=18 );
393  out = "EE+";
394  if( ireg==ME::iEEM ) out = "EE-";
395  if( ism>9 ) ism -= 9;
396  out += ism;
397  }
398  else if( ireg==ME::iEBM || ireg==ME::iEBP )
399  {
400  assert( ism>=1 && ism<=36 );
401  out = "EB+";
402  if( ism>18 )
403  {
404  out = "EB-";
405  ism -= 18;
406  }
407  out += ism;
408  }
409  else
410  abort();
411  return out;
412 }
413 
414 TString
415 ME::smName( int ilmr )
416 {
417  TString out;
418  int reg_(0);
419  int sm_(0);
420  int dcc_(0);
421  int side_(0);
422  ME::regionAndSector( ilmr, reg_, sm_, dcc_, side_ );
423  out = smName( reg_, sm_ );
424  return out;
425 }
426 
427 TString
428 ME::smNameFromDcc( int idcc )
429 {
430  int ilmr = lmr( idcc,0 );
431  return smName( ilmr );
432 }
433 
434 MEChannel*
435 ME::lmrTree( int ilmr )
436 {
437  return regTree( ecalRegion( ilmr ) )->getDescendant( iLMRegion, ilmr );
438 }
439 
440 MEChannel*
441 ME::regTree( int ireg )
442 {
443  assert( ireg>=iEEM && ireg<=iEEP );
444  if( _trees[ireg]!=0 ) return _trees[ireg];
445 
446  int iEcalRegion_ = ireg;
447  int iSector_ = 0;
448  int iLMRegion_ = 0;
449  int iLMModule_ = 0;
450  int iSuperCrystal_ = 0;
451  int iCrystal_ = 0;
452  MEChannel* leaf_(0);
453  MEChannel* tree_(0);
454 
455  if( iEcalRegion_==iEBM || iEcalRegion_==iEBP )
456  {
457  for( int isect=1; isect<=18; isect++ )
458  {
459  iSector_ = isect;
460  if( iEcalRegion_==iEBM ) iSector_+=18;
461  if( _trees[iEcalRegion_]==0 )
462  {
463  // std::cout << "Building the tree of crystals -- "
464  // << ME::region[iEcalRegion_];
465  _trees[iEcalRegion_] = new MEChannel( 0, 0, iEcalRegion_, 0 );
466  }
467  tree_=_trees[iEcalRegion_];
468  for( int iX=0; iX<17; iX++ )
469  {
470  for( int iY=0; iY<4; iY++ )
471  {
472  iSuperCrystal_ = MEEBGeom::tt_channel( iX, iY );
473  iLMModule_ = MEEBGeom::lm_channel( iX, iY );
474  for( int jx=0; jx<5; jx++ )
475  {
476  for( int jy=0; jy<5; jy++ )
477  {
478  int ix=5*iX+jx;
479  int iy=5*iY+jy;
480  if( useElectronicNumbering )
481  {
482  iCrystal_ = MEEBGeom::electronic_channel(ix,iy);
483  }
484  else
485  {
486  iCrystal_ = MEEBGeom::crystal_channel(ix,iy);
487  }
488  MEEBGeom::EtaPhiCoord globalCoord =
489  MEEBGeom::globalCoord( iSector_, ix, iy );
490  int ieta = globalCoord.first;
491  int iphi = globalCoord.second;
492  iLMRegion_ = MEEBGeom::lmr( ieta, iphi );
493  leaf_ = tree_;
494  leaf_ = leaf_->getDaughter( ieta, iphi, iSector_ );
495  leaf_ = leaf_->getDaughter( ieta, iphi, iLMRegion_ );
496  leaf_ = leaf_->getDaughter( ieta, iphi, iLMModule_ );
497  leaf_ = leaf_->getDaughter( ieta, iphi, iSuperCrystal_ );
498  leaf_ = leaf_->getDaughter( ieta, iphi, iCrystal_ );
499  }
500  }
501  }
502  }
503  }
504  }
505  else if( iEcalRegion_==iEEM || iEcalRegion_==iEEP )
506  {
507  int iz=1;
508  if( iEcalRegion_==iEEM ) iz=-1;
509  if( _trees[iEcalRegion_]==0 )
510  {
511  // std::cout << "Building the tree of crystals -- "
512  // << ME::region[iEcalRegion_];
513  _trees[iEcalRegion_] = new MEChannel( 0, 0, iEcalRegion_, 0 );
514  }
515  tree_=_trees[iEcalRegion_];
516 
517  for( int ilmr=72; ilmr<=92; ilmr++ ) // force the order of Monitoring Regions
518  {
519  if( ecalRegion( ilmr )!=iEcalRegion_ ) continue;
520  for( int ilmm=1; ilmm<=19; ilmm++ ) // force the order of Monitoring Modules
521  {
522  for( int iXX=1; iXX<=10; iXX++ )
523  {
524  for( int iside=1; iside<=2; iside++ ) // symmetrize wrt y-axis
525  {
526  int iX=iXX;
527  if( iside==2 ) iX = 20-iXX+1;
528  for( int iY=1; iY<=20; iY++ )
529  {
530  //int iSector_ = MEEEGeom::sector( iX, iY );
531  int iSector_ = MEEEGeom::sm( iX, iY, iz );
532  if( iSector_<0 ) continue;
533  iLMRegion_ = MEEEGeom::lmr( iX, iY, iz );
534  if( iLMRegion_!=ilmr ) continue;
535  iLMModule_ = MEEEGeom::lmmod( iX, iY );
536  if( iLMModule_!=ilmm ) continue;
537  iSuperCrystal_ = MEEEGeom::sc( iX, iY );
538 
539  for( int jxx=1; jxx<=5; jxx++ )
540  {
541  int jx = jxx; // symmetrize...
542  if( iside==2 ) jx = 5-jxx+1;
543 
544  for( int jy=1; jy<=5; jy++ )
545  {
546  int ix = 5*(iX-1)+jx;
547  int iy = 5*(iY-1)+jy;
548  iCrystal_ = MEEEGeom::crystal( ix, iy );
549  if( iCrystal_<0 ) continue;
550  leaf_ = tree_;
551  leaf_ = leaf_->getDaughter( ix, iy, iSector_ );
552  leaf_ = leaf_->getDaughter( ix, iy, iLMRegion_ );
553  leaf_ = leaf_->getDaughter( ix, iy, iLMModule_ );
554  leaf_ = leaf_->getDaughter( ix, iy, iSuperCrystal_ );
555  leaf_ = leaf_->getDaughter( ix, iy, iCrystal_ );
556  }
557  }
558  }
559  }
560  }
561  }
562  }
563  }
564  // std::cout << ".... done" << std::endl;
565  return _trees[iEcalRegion_];
566 }
567 
568 bool
569 ME::isBarrel( int ilmr )
570 {
571  int reg_ = ecalRegion( ilmr );
572  if ( reg_==iEEM || reg_==iEEP ) return false;
573  else if( reg_==iEBM || reg_==iEBP ) return true;
574  else abort();
575  return true;
576 }
577 
578 std::pair<int,int>
579 ME::memFromLmr( int ilmr )
580 {
581  if( isBarrel( ilmr ) )
582  return MEEBGeom::memFromLmr( ilmr );
583  else
584  return MEEEGeom::memFromLmr( ilmr );
585  return std::pair<int,int>();
586 }
587 std::vector< int>
588 ME::apdRefChannels( int ilmmod , int ilmr)
589 {
590  if( isBarrel( ilmr ) )
591  return MEEBGeom::apdRefChannels( ilmmod );
592  else
593  return MEEEGeom::apdRefChannels( ilmmod );
594  return std::vector< int>();
595 }
596 
597 std::vector<int>
598 ME::lmmodFromLmr( int ilmr )
599 {
600  if( isBarrel(ilmr) )
601  return MEEBGeom::lmmodFromLmr( ilmr );
602  else
603  return MEEEGeom::lmmodFromLmr( ilmr );
604  return std::vector<int>();
605 }
606 
607 std::vector<int>
608 ME::memFromDcc( int idcc )
609 {
610  std::vector<int> vec;
611  for( int iside=0; iside<=1; iside++ )
612  {
613  int ilmr = lmr( idcc, iside );
614  if( ilmr<0 ) continue;
615  std::pair< int, int > mem_ = memFromLmr( ilmr );
616  vec.push_back( mem_.first );
617  vec.push_back( mem_.second );
618  }
619  return vec;
620 }
621 
622 std::vector<int>
623 ME::lmmodFromDcc( int idcc )
624 {
625  std::vector<int> vec;
626  for( int iside=0; iside<=1; iside++ )
627  {
628  int ilmr = lmr( idcc, iside );
629  if( ilmr<0 ) continue;
630  bool isBarrel_ = isBarrel( ilmr );
631  std::vector< int > vec_ = lmmodFromLmr( ilmr );
632  for( unsigned ii=0; ii<vec_.size(); ii++ )
633  {
634  int ilmmod_ = vec_[ii];
635  if( !isBarrel_ )
636  {
637  // special case for Julie
638  if( ilmmod_==18 && iside==1 ) ilmmod_=20;
639  if( ilmmod_==19 && iside==1 ) ilmmod_=21;
640  }
641  vec.push_back( ilmmod_ );
642  }
643  }
644  return vec;
645 }
646 
647 std::pair<int,int>
648 ME::pn( int ilmr, int ilmmod, ME::PN ipn )
649 {
650  std::pair<int,int> pnpair_(0,0);
651  std::pair<int,int> mempair_ = memFromLmr(ilmr);
652  if( isBarrel( ilmr ) )
653  {
654  pnpair_=MEEBGeom::pn( ilmmod );
655  }
656  else
657  {
658  int dee_ = MEEEGeom::dee( ilmr );
659  pnpair_=MEEEGeom::pn( dee_, ilmmod );
660  }
661  int mem_(0);
662  int pn_(0);
663  if( ipn==iPNA )
664  {
665  mem_=mempair_.first;
666  pn_=pnpair_.first;
667  }
668  else
669  {
670  mem_=mempair_.second;
671  pn_=pnpair_.second;
672  }
673  return std::pair<int,int>(mem_,pn_);
674 }
675 
static std::pair< int, int > memFromLmr(int ilmr)
Definition: MEEEGeom.cc:904
static void regionAndSector(int ilmr, int &ireg, int &isect, int &idcc, int &iside)
Definition: ME.cc:348
type
Definition: HCALResponse.h:21
float dt
Definition: AMPTWrapper.h:126
static int lmmod(SuperCrysCoord iX, SuperCrysCoord iY)
Definition: MEEEGeom.cc:94
static TString PNPrimVar[iSizePN]
Definition: ME.h:116
int dcc
Definition: ME.h:80
static std::vector< ME::DCCid > memFromDcc(ME::DCCid idcc)
Definition: ME.cc:608
static std::vector< int > apdRefChannels(int ilmmod)
Definition: MEEBGeom.cc:551
static int crystal(CrysCoord ix, CrysCoord iy)
Definition: MEEEGeom.cc:398
int wavelength
Definition: ME.h:86
static TString APDPrimVar[iSizeAPD]
Definition: ME.h:110
static bool useElectronicNumbering
Definition: ME.h:40
static std::pair< ME::DCCid, ME::DCCid > memFromLmr(ME::LMRid ilmr)
Definition: ME.cc:579
static TString TPAPDPrimVar[iSizeTPAPD]
Definition: ME.h:128
Definition: ME.h:19
static TString type[iSizeT]
Definition: ME.h:144
static int crystal_channel(EBLocalCoord ix, EBLocalCoord iy)
Definition: MEEBGeom.cc:332
static TString path()
Definition: ME.cc:82
Definition: ME.h:16
TimeStamp ts_beg
Definition: ME.h:81
std::pair< EBGlobalCoord, EBGlobalCoord > EtaPhiCoord
Definition: MEEBGeom.h:26
Definition: ME.h:16
const Time_t kLowMask(0xFFFFFFFF)
unsigned long Time
Definition: ME.h:74
static TString granularity[iSizeG]
Definition: ME.h:60
static TString lmdataPath(int lmr)
Definition: ME.cc:62
static std::pair< ME::DCCid, ME::PNid > pn(ME::LMRid ilmr, ME::LMMid ilmmod, ME::PN ipn)
Definition: ME.cc:648
static int lmr(EBGlobalCoord ieta, EBGlobalCoord iphi)
Definition: MEEBGeom.cc:121
Definition: ME.h:69
int ii
Definition: cuy.py:588
static bool isBarrel(int ilmr)
Definition: ME.cc:569
static TString runListName(int lmr, int type, int color)
Definition: ME.cc:118
MEChannel * getDaughter(int ix, int iy, int ig)
Definition: MEChannel.cc:42
static const TimeStamp kLowMask
Definition: ME.h:76
static Time time_low(TimeStamp t)
Definition: ME.cc:232
static std::pair< int, int > pn(int ilmmod)
Definition: MEEBGeom.cc:479
static TString MTQPrimVar[iSizeMTQ]
Definition: ME.h:123
static TString rootFileName(ME::Header header, ME::Settings settings)
Definition: ME.cc:88
static int lm_channel(EBTTLocalCoord iX, EBTTLocalCoord iY)
Definition: MEEBGeom.cc:218
Definition: ME.h:70
static std::pair< int, int > pn(int dee, int ilmod)
Definition: MEEEGeom.cc:615
MEChannel * getDescendant(int ig, int ii)
Definition: MEChannel.cc:135
Definition: ME.h:70
static int electronic_channel(EBLocalCoord ix, EBLocalCoord iy)
Definition: MEEBGeom.cc:341
static EtaPhiCoord globalCoord(int ism, EBLocalCoord ix, EBLocalCoord iy)
Definition: MEEBGeom.cc:162
static TString TPPNPrimVar[iSizeTPPN]
Definition: ME.h:133
Definition: ME.h:69
static std::pair< int, int > dccAndSide(int ilmr)
Definition: ME.cc:313
static int sm(SuperCrysCoord iX, SuperCrysCoord iY, int iz)
Definition: MEEEGeom.cc:83
static TString smNameFromDcc(int idcc)
Definition: ME.cc:428
Definition: ME.h:70
Definition: ME.h:70
static std::vector< int > lmmodFromLmr(int ilmr)
Definition: MEEEGeom.cc:948
Definition: ME.h:16
static TString region[4]
Definition: ME.h:57
static Time time(float dt, Time t0, int tunit=iHour)
Definition: ME.cc:208
int side
Definition: ME.h:80
tuple out
Definition: dbtoconf.py:99
unsigned long long TimeStamp
Definition: ME.h:75
static std::pair< int, int > memFromLmr(int ilmr)
Definition: MEEBGeom.cc:499
static int ecalRegion(int ilmr)
Definition: ME.cc:249
static int tt_channel(EBTTLocalCoord iX, EBTTLocalCoord iY)
Definition: MEEBGeom.cc:322
std::string smName(unsigned)
std::string rundir
Definition: ME.h:80
static MEChannel * regTree(int ireg)
Definition: ME.cc:441
Definition: ME.h:78
int type
Definition: ME.h:86
static std::vector< ME::LMMid > lmmodFromLmr(ME::LMRid ilmr)
Definition: ME.cc:598
static int lmr(int idcc, int iside)
Definition: ME.cc:261
static std::vector< int > apdRefChannels(int ilmmod)
Definition: MEEEGeom.cc:1097
static TString primPath(int lmr)
Definition: ME.cc:72
static TString color[iSizeC]
Definition: ME.h:145
Definition: ME.h:70
static Time time_high(TimeStamp t)
Definition: ME.cc:238
static std::vector< Time > timeDiff(Time t1, Time t2, short int &sign)
Definition: ME.cc:142
static int dee(SuperCrysCoord iX, SuperCrysCoord iY, int iz)
Definition: MEEEGeom.cc:284
PN
Definition: ME.h:46
static std::vector< MEChannel * > _trees
Definition: ME.h:156
tuple cout
Definition: gather_cfg.py:121
static TString smName(int ilmr)
Definition: ME.cc:415
int ism(int ieta, int iphi)
Definition: EcalPyUtils.cc:56
Definition: ME.h:16
static MEChannel * lmrTree(int ilmr)
Definition: ME.cc:435
static int sc(SuperCrysCoord iX, SuperCrysCoord iY)
Definition: MEEEGeom.cc:211
static std::vector< int > apdRefChannels(ME::LMMid ilmmod, ME::LMRid ilmr)
Definition: ME.cc:588
Definition: ME.h:16
static std::vector< ME::LMMid > lmmodFromDcc(ME::DCCid idcc)
Definition: ME.cc:623
static int lmr(SuperCrysCoord iX, SuperCrysCoord iY, int iz)
Definition: MEEEGeom.cc:250
static std::vector< int > lmmodFromLmr(int ilmr)
Definition: MEEBGeom.cc:507