CMS 3D CMS Logo

EcalABAnalyzer.cc
Go to the documentation of this file.
1 /*
2  * \class EcalABAnalyzer
3  *
4  * primary author: Julie Malcles - CEA/Saclay
5  * author: Gautier Hamel De Monchenault - CEA/Saclay
6  */
7 
8 #include <TAxis.h>
9 #include <TH1.h>
10 #include <TProfile.h>
11 #include <TTree.h>
12 #include <TChain.h>
13 #include <TFile.h>
14 #include <TMath.h>
15 
17 
18 #include <sstream>
19 #include <iostream>
20 #include <fstream>
21 #include <iomanip>
22 #include <vector>
23 
26 
29 
32 
40 
48 
49 using namespace std;
50 
51 //========================================================================
53  //========================================================================
54  : iEvent(0),
55 
56  // framework parameters with default values
57  _nsamples(iConfig.getUntrackedParameter<unsigned int>("nSamples", 10)),
58  _presample(iConfig.getUntrackedParameter<unsigned int>("nPresamples", 2)),
59  _firstsample(iConfig.getUntrackedParameter<unsigned int>("firstSample", 1)),
60  _lastsample(iConfig.getUntrackedParameter<unsigned int>("lastSample", 2)),
61  _timingcutlow(iConfig.getUntrackedParameter<unsigned int>("timingCutLow", 2)),
62  _timingcuthigh(iConfig.getUntrackedParameter<unsigned int>("timingCutHigh", 9)),
63  _timingquallow(iConfig.getUntrackedParameter<unsigned int>("timingQualLow", 3)),
64  _timingqualhigh(iConfig.getUntrackedParameter<unsigned int>("timingQualHigh", 8)),
65  _ratiomincutlow(iConfig.getUntrackedParameter<double>("ratioMinCutLow", 0.4)),
66  _ratiomincuthigh(iConfig.getUntrackedParameter<double>("ratioMinCutHigh", 0.95)),
67  _ratiomaxcutlow(iConfig.getUntrackedParameter<double>("ratioMaxCutLow", 0.8)),
68  _presamplecut(iConfig.getUntrackedParameter<double>("presampleCut", 5.0)),
69  _niter(iConfig.getUntrackedParameter<unsigned int>("nIter", 3)),
70  _alpha(iConfig.getUntrackedParameter<double>("alpha", 1.5076494)),
71  _beta(iConfig.getUntrackedParameter<double>("beta", 1.5136036)),
72  _nevtmax(iConfig.getUntrackedParameter<unsigned int>("nEvtMax", 200)),
73  _noise(iConfig.getUntrackedParameter<double>("noise", 2.0)),
74  _chi2cut(iConfig.getUntrackedParameter<double>("chi2cut", 100.0)),
75  _ecalPart(iConfig.getUntrackedParameter<std::string>("ecalPart", "EB")),
76  _qualpercent(iConfig.getUntrackedParameter<double>("qualPercent", 0.2)),
77  _debug(iConfig.getUntrackedParameter<int>("debug", 0)),
78  nCrys(NCRYSEB),
79  runType(-1),
80  runNum(0),
81  fedID(-1),
82  dccID(-1),
83  side(2),
84  lightside(2),
85  iZ(1),
86  phi(-1),
87  eta(-1),
88  event(0),
89  color(-1),
90  channelIteratorEE(0)
91 
92 //========================================================================
93 
94 {
95  // Initialization from cfg file
96 
97  resdir_ = iConfig.getUntrackedParameter<std::string>("resDir");
98 
99  digiCollection_ = iConfig.getParameter<std::string>("digiCollection");
100  digiProducer_ = iConfig.getParameter<std::string>("digiProducer");
101 
102  eventHeaderCollection_ = iConfig.getParameter<std::string>("eventHeaderCollection");
103  eventHeaderProducer_ = iConfig.getParameter<std::string>("eventHeaderProducer");
104 
105  // Geometrical constants initialization
106 
107  if (_ecalPart == "EB") {
108  nCrys = NCRYSEB;
109  } else {
110  nCrys = NCRYSEE;
111  }
112  iZ = 1;
113  if (_fedid <= 609)
114  iZ = -1;
115 
116  for (unsigned int j = 0; j < nCrys; j++) {
117  iEta[j] = -1;
118  iPhi[j] = -1;
119  iTowerID[j] = -1;
120  iChannelID[j] = -1;
121  idccID[j] = -1;
122  iside[j] = -1;
123  wasTimingOK[j] = true;
124  wasGainOK[j] = true;
125  nevtAB[j] = 0;
126  }
127 
128  // Quality check flags
129 
130  isGainOK = true;
131  isTimingOK = true;
132 
133  // Objects dealing with pulses
134 
136  _presample,
137  _firstsample,
138  _lastsample,
146 
147  // Objects needed for npresample calculation
148 
149  Delta01 = new TMom();
150  Delta12 = new TMom();
151  _fitab = true;
152 }
153 
154 //========================================================================
156  //========================================================================
157 
158  // do anything here that needs to be done at desctruction time
159  // (e.g. close files, deallocate resources etc.)
160 }
161 
162 //========================================================================
164  //========================================================================
165 
166  //Calculate alpha and beta
167 
168  // Define output results filenames and shape analyzer object (alpha,beta)
169  //=====================================================================
170 
171  // 1) AlphaBeta files
172 
173  doesABTreeExist = true;
174 
175  std::stringstream nameabinitfile;
176  nameabinitfile << resdir_ << "/ABInit.root";
177  alphainitfile = nameabinitfile.str();
178 
179  std::stringstream nameabfile;
180  std::stringstream link;
181  nameabfile << resdir_ << "/AB.root";
182 
183  FILE* test;
184  test = fopen(nameabinitfile.str().c_str(), "r");
185  if (test == nullptr) {
186  doesABTreeExist = false;
187  _fitab = true;
188  };
189  delete test;
190 
191  TFile* fAB = nullptr;
192  TTree* ABInit = nullptr;
193  if (doesABTreeExist) {
194  fAB = new TFile(nameabinitfile.str().c_str());
195  }
196  if (doesABTreeExist && fAB) {
197  ABInit = (TTree*)fAB->Get("ABCol0");
198  }
199 
200  // 2) Shape analyzer
201 
202  if (doesABTreeExist && fAB && ABInit && ABInit->GetEntries() != 0) {
203  shapana = new TShapeAnalysis(ABInit, _alpha, _beta, 5.5, 1.0);
204  doesABTreeExist = true;
205  } else {
206  shapana = new TShapeAnalysis(_alpha, _beta, 5.5, 1.0);
207  doesABTreeExist = false;
208  _fitab = true;
209  }
211 
212  if (doesABTreeExist && fAB)
213  fAB->Close();
214 
215  if (_fitab) {
216  alphafile = nameabfile.str();
217  } else {
219  link << "ln -s " << resdir_ << "/ABInit.root " << resdir_ << "/AB.root";
220  system(link.str().c_str());
221  }
222 
223  // Define output results files' names
224 
225  std::stringstream namefile;
226  namefile << resdir_ << "/AB.root";
227  alphafile = namefile.str();
228 }
229 
230 //========================================================================
232  //========================================================================
233 
234  ++iEvent;
235 
236  // retrieving DCC header
238  const EcalRawDataCollection* DCCHeader = nullptr;
239  try {
240  e.getByLabel(eventHeaderProducer_, eventHeaderCollection_, pDCCHeader);
241  DCCHeader = pDCCHeader.product();
242  } catch (std::exception& ex) {
243  std::cerr << "Error! can't get the product retrieving DCC header" << eventHeaderCollection_.c_str() << " "
244  << eventHeaderProducer_.c_str() << std::endl;
245  }
246 
247  //retrieving crystal data from Event
249  const EBDigiCollection* EBDigi = nullptr;
251  const EEDigiCollection* EEDigi = nullptr;
252  if (_ecalPart == "EB") {
253  try {
254  e.getByLabel(digiProducer_, digiCollection_, pEBDigi);
255  EBDigi = pEBDigi.product();
256  } catch (std::exception& ex) {
257  std::cerr << "Error! can't get the product retrieving EB crystal data " << digiCollection_.c_str() << std::endl;
258  }
259  } else if (_ecalPart == "EE") {
260  try {
261  e.getByLabel(digiProducer_, digiCollection_, pEEDigi);
262  EEDigi = pEEDigi.product();
263  } catch (std::exception& ex) {
264  std::cerr << "Error! can't get the product retrieving EE crystal data " << digiCollection_.c_str() << std::endl;
265  }
266  } else {
267  std::cout << " Wrong ecalPart in cfg file " << std::endl;
268  return;
269  }
270 
271  // retrieving electronics mapping
273  const EcalElectronicsMapping* TheMapping = nullptr;
274  try {
275  c.get<EcalMappingRcd>().get(ecalmapping);
276  TheMapping = ecalmapping.product();
277  } catch (std::exception& ex) {
278  std::cerr << "Error! can't get the product EcalMappingRcd" << std::endl;
279  }
280 
281  // =============================
282  // Decode DCCHeader Information
283  // =============================
284 
285  for (EcalRawDataCollection::const_iterator headerItr = DCCHeader->begin(); headerItr != DCCHeader->end();
286  ++headerItr) {
287  // Get run type and run number
288 
289  int fed = headerItr->fedId();
290  if (fed != _fedid && _fedid != -999)
291  continue;
292 
293  runType = headerItr->getRunType();
294  runNum = headerItr->getRunNumber();
295  event = headerItr->getLV1();
296 
297  dccID = headerItr->getDccInTCCCommand();
298  fedID = headerItr->fedId();
299  lightside = headerItr->getRtHalf();
300 
301  // Check fed corresponds to the DCC in TCC
302 
303  if (600 + dccID != fedID)
304  continue;
305 
306  // Cut on runType
307 
310  return;
311 
312  // Retrieve laser color and event number
313 
314  EcalDCCHeaderBlock::EcalDCCEventSettings settings = headerItr->getEventSettings();
315  color = settings.wavelength;
316  if (color < 0)
317  return;
318 
319  std::vector<int>::iterator iter = find(colors.begin(), colors.end(), color);
320  if (iter == colors.end()) {
321  colors.push_back(color);
322  }
323  }
324 
325  // Cut on fedID
326 
327  if (fedID != _fedid && _fedid != -999)
328  return;
329 
330  // ===========================
331  // Decode EBDigis Information
332  // ===========================
333 
334  int adcGain = 0;
335 
336  if (EBDigi) {
337  // Loop on crystals
338  //===================
339 
340  for (EBDigiCollection::const_iterator digiItr = EBDigi->begin(); digiItr != EBDigi->end();
341  ++digiItr) { // Loop on crystals
342 
343  // Retrieve geometry
344  //===================
345 
346  EBDetId id_crystal(digiItr->id());
347  EBDataFrame df(*digiItr);
348 
349  int etaG = id_crystal.ieta(); // global
350  int phiG = id_crystal.iphi(); // global
351 
352  int etaL; // local
353  int phiL; // local
354  std::pair<int, int> LocalCoord = MEEBGeom::localCoord(etaG, phiG);
355 
356  etaL = LocalCoord.first;
357  phiL = LocalCoord.second;
358 
359  eta = etaG;
360  phi = phiG;
361 
362  side = MEEBGeom::side(etaG, phiG);
363 
364  // Recover the TT id and the electronic crystal numbering from EcalElectronicsMapping
365 
366  EcalElectronicsId elecid_crystal = TheMapping->getElectronicsId(id_crystal);
367 
368  int towerID = elecid_crystal.towerId();
369  int strip = elecid_crystal.stripId();
370  int xtal = elecid_crystal.xtalId();
371  int channelID = 5 * (strip - 1) + xtal - 1;
372 
373  unsigned int channel = MEEBGeom::electronic_channel(etaL, phiL);
374 
375  assert(channel < nCrys);
376 
377  iEta[channel] = eta;
378  iPhi[channel] = phi;
379  iTowerID[channel] = towerID;
380  iChannelID[channel] = channelID;
381  idccID[channel] = dccID;
382  iside[channel] = side;
383 
384  // APD Pulse
385  //===========
386 
387  // Loop on adc samples
388 
389  for (unsigned int i = 0; i < (*digiItr).size(); ++i) {
390  EcalMGPASample samp_crystal(df.sample(i));
391  adc[i] = samp_crystal.adc();
392  adcG[i] = samp_crystal.gainId();
393  adc[i] *= adcG[i];
394  if (i == 0)
395  adcGain = adcG[i];
396  if (i > 0)
397  adcGain = TMath::Max(adcG[i], adcGain);
398  }
399 
401 
402  // Quality checks
403  //================
404 
405  if (adcGain != 1)
406  nEvtBadGain[channel]++;
407  if (!APDPulse->isTimingQualOK())
408  nEvtBadTiming[channel]++;
409  nEvtTot[channel]++;
410 
411  // Fill if Pulse is fine
412  //=======================
413 
414  if (APDPulse->isPulseOK() && lightside == side) {
417 
418  if (nevtAB[channel] < _nevtmax && _fitab) {
419  if (doesABTreeExist)
420  shapana->putAllVals(channel, adc, eta, phi);
421  else
422  shapana->putAllVals(channel, adc, eta, phi, dccID, side, towerID, channelID);
423  nevtAB[channel]++;
424  }
425  }
426  }
427 
428  } else if (EEDigi) {
429  // Loop on crystals
430  //===================
431 
432  for (EEDigiCollection::const_iterator digiItr = EEDigi->begin(); digiItr != EEDigi->end();
433  ++digiItr) { // Loop on crystals
434 
435  // Retrieve geometry
436  //===================
437 
438  EEDetId id_crystal(digiItr->id());
439  EEDataFrame df(*digiItr);
440 
441  phi = id_crystal.ix();
442  eta = id_crystal.iy();
443 
444  int iX = (phi - 1) / 5 + 1;
445  int iY = (eta - 1) / 5 + 1;
446 
447  side = MEEEGeom::side(iX, iY, iZ);
448  EcalElectronicsId elecid_crystal = TheMapping->getElectronicsId(id_crystal);
449 
450  int towerID = elecid_crystal.towerId();
451  int channelID = elecid_crystal.channelId() - 1;
452 
453  int hashedIndex = 100000 * eta + phi;
454 
455  if (channelMapEE.count(hashedIndex) == 0) {
458  }
459 
460  unsigned int channel = channelMapEE[hashedIndex];
461 
462  assert(channel < nCrys);
463 
464  iEta[channel] = eta;
465  iPhi[channel] = phi;
466  iTowerID[channel] = towerID;
467  iChannelID[channel] = channelID;
468  idccID[channel] = dccID;
469  iside[channel] = side;
470 
471  // APD Pulse
472  //===========
473 
474  if ((*digiItr).size() > 10)
475  std::cout << "SAMPLES SIZE > 10!" << (*digiItr).size() << std::endl;
476 
477  // Loop on adc samples
478 
479  for (unsigned int i = 0; i < (*digiItr).size(); ++i) {
480  EcalMGPASample samp_crystal(df.sample(i));
481  adc[i] = samp_crystal.adc();
482  adcG[i] = samp_crystal.gainId();
483  adc[i] *= adcG[i];
484 
485  if (i == 0)
486  adcGain = adcG[i];
487  if (i > 0)
488  adcGain = TMath::Max(adcG[i], adcGain);
489  }
490 
492 
493  // Quality checks
494  //================
495 
496  if (adcGain != 1)
497  nEvtBadGain[channel]++;
498  if (!APDPulse->isTimingQualOK())
499  nEvtBadTiming[channel]++;
500  nEvtTot[channel]++;
501 
502  // Fill if Pulse is fine
503  //=======================
504 
505  if (APDPulse->isPulseOK() && lightside == side) {
508 
509  if (nevtAB[channel] < _nevtmax && _fitab) {
510  if (doesABTreeExist)
511  shapana->putAllVals(channel, adc, eta, phi);
512  else
513  shapana->putAllVals(channel, adc, eta, phi, dccID, side, towerID, channelID);
514  nevtAB[channel]++;
515  }
516  }
517  }
518  }
519 } // analyze
520 
521 //========================================================================
523  //========================================================================
524 
525  std::cout << "\n\t+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+" << std::endl;
526  std::cout << "\t+=+ Analyzing data: getting (alpha, beta) +=+" << std::endl;
527 
528  // Adjust channel numbers for EE
529  //===============================
530 
531  if (_ecalPart == "EE") {
532  nCrys = channelMapEE.size();
534  }
535 
536  // Set presamples number
537  //======================
538 
539  double delta01 = Delta01->getMean();
540  double delta12 = Delta12->getMean();
541  if (delta12 > _presamplecut) {
542  _presample = 2;
543  if (delta01 > _presamplecut)
544  _presample = 1;
545  }
546 
549 
550  // Get alpha and beta
551  //======================
552 
553  if (_fitab) {
554  std::cout << "\n\t+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+" << std::endl;
555  std::cout << "\t+=+ Analyzing data: getting (alpha, beta) +=+" << std::endl;
556  TFile* fAB = nullptr;
557  TTree* ABInit = nullptr;
558  if (doesABTreeExist) {
559  fAB = new TFile(alphainitfile.c_str());
560  }
561  if (doesABTreeExist && fAB) {
562  ABInit = (TTree*)fAB->Get("ABCol0");
563  }
564  shapana->computeShape(alphafile, ABInit);
565 
566  // Set quality flags for gains and timing
567 
568  double BadGainEvtPercentage = 0.0;
569  double BadTimingEvtPercentage = 0.0;
570 
571  int nChanBadGain = 0;
572  int nChanBadTiming = 0;
573 
574  for (unsigned int i = 0; i < nCrys; i++) {
575  if (nEvtTot[i] != 0) {
576  BadGainEvtPercentage = double(nEvtBadGain[i]) / double(nEvtTot[i]);
577  BadTimingEvtPercentage = double(nEvtBadTiming[i]) / double(nEvtTot[i]);
578  }
579  if (BadGainEvtPercentage > _qualpercent) {
580  wasGainOK[i] = false;
581  nChanBadGain++;
582  }
583  if (BadTimingEvtPercentage > _qualpercent) {
584  wasTimingOK[i] = false;
585  nChanBadTiming++;
586  }
587  }
588 
589  double BadGainChanPercentage = double(nChanBadGain) / double(nCrys);
590  double BadTimingChanPercentage = double(nChanBadTiming) / double(nCrys);
591 
592  if (BadGainChanPercentage > _qualpercent)
593  isGainOK = false;
594  if (BadTimingChanPercentage > _qualpercent)
595  isTimingOK = false;
596 
597  if (!isGainOK)
598  std::cout << "\t+=+ ............................ WARNING! APD GAIN WAS NOT 1 +=+" << std::endl;
599  if (!isTimingOK)
600  std::cout << "\t+=+ ............................ WARNING! TIMING WAS BAD +=+" << std::endl;
601 
602  std::cout << "\t+=+ .................................... done +=+" << std::endl;
603  std::cout << "\t+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+" << std::endl;
604  }
605 }
606 
DeadROC_duringRun.runNum
runNum
Definition: DeadROC_duringRun.py:21
edm::ESHandle::product
T const * product() const
Definition: ESHandle.h:86
EcalABAnalyzer::iChannelID
int iChannelID[1700]
Definition: EcalABAnalyzer.h:126
EcalElectronicsMapping
Definition: EcalElectronicsMapping.h:28
NCRYSEE
#define NCRYSEE
Definition: EcalABAnalyzer.h:33
TMom::addEntry
void addEntry(double val)
Definition: TMom.cc:88
EcalABAnalyzer::_ecalPart
std::string _ecalPart
Definition: EcalABAnalyzer.h:69
EcalElectronicsId.h
mps_fire.i
i
Definition: mps_fire.py:428
edm::SortedCollection::const_iterator
std::vector< T >::const_iterator const_iterator
Definition: SortedCollection.h:80
EcalABAnalyzer::nCrys
unsigned int nCrys
Definition: EcalABAnalyzer.h:95
EcalABAnalyzer::runType
int runType
Definition: EcalABAnalyzer.h:101
MessageLogger.h
PulseFitWithFunction.h
colors
Definition: colors.py:1
edm::Handle::product
T const * product() const
Definition: Handle.h:70
EcalABAnalyzer::digiProducer_
std::string digiProducer_
Definition: EcalABAnalyzer.h:80
MainPageGenerator.link
link
Definition: MainPageGenerator.py:271
ESHandle.h
edm::DataFrameContainer::const_iterator
boost::transform_iterator< IterHelp, boost::counting_iterator< int > > const_iterator
Definition: DataFrameContainer.h:61
TAPDPulse::setPresamples
void setPresamples(int)
Definition: TAPDPulse.cc:251
EcalABAnalyzer::_ratiomaxcutlow
double _ratiomaxcutlow
Definition: EcalABAnalyzer.h:61
MEEBGeom::electronic_channel
static int electronic_channel(EBLocalCoord ix, EBLocalCoord iy)
Definition: MEEBGeom.cc:326
EcalABAnalyzer::phi
int phi
Definition: EcalABAnalyzer.h:118
EcalABAnalyzer::_noise
double _noise
Definition: EcalABAnalyzer.h:67
EcalABAnalyzer::iPhi
int iPhi[1700]
Definition: EcalABAnalyzer.h:125
EBDetId
Definition: EBDetId.h:17
EcalABAnalyzer::iEvent
int iEvent
Definition: EcalABAnalyzer.h:47
digitizers_cfi.strip
strip
Definition: digitizers_cfi.py:19
EBDataFrame
Definition: EBDataFrame.h:11
TShapeAnalysis::putAllVals
void putAllVals(int, double *, int, int)
Definition: TShapeAnalysis.cc:185
gather_cfg.cout
cout
Definition: gather_cfg.py:144
EcalABAnalyzer::isGainOK
bool isGainOK
Definition: EcalABAnalyzer.h:137
EcalDetIdCollections.h
CollectionTags_cfi.EBDigi
EBDigi
Definition: CollectionTags_cfi.py:27
cms::cuda::assert
assert(be >=bs)
edm::SortedCollection
Definition: SortedCollection.h:49
TAPDPulse.h
EcalABAnalyzer::_presamplecut
double _presamplecut
Definition: EcalABAnalyzer.h:62
EcalABAnalyzer::digiCollection_
std::string digiCollection_
Definition: EcalABAnalyzer.h:79
NCRYSEB
#define NCRYSEB
Definition: EcalABAnalyzer.h:30
EcalABAnalyzer::shapana
TShapeAnalysis * shapana
Definition: EcalABAnalyzer.h:89
edm::ParameterSet::getUntrackedParameter
T getUntrackedParameter(std::string const &, T const &) const
EcalABAnalyzer::_timingqualhigh
unsigned int _timingqualhigh
Definition: EcalABAnalyzer.h:58
EcalABAnalyzer::nevtAB
unsigned int nevtAB[1700]
Definition: EcalABAnalyzer.h:90
EcalABAnalyzer::_fitab
bool _fitab
Definition: EcalABAnalyzer.h:98
EcalABAnalyzer::Delta01
TMom * Delta01
Definition: EcalABAnalyzer.h:75
spr::find
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:19
edm::Handle
Definition: AssociativeIterator.h:50
TAPD.h
EcalABAnalyzer::idccID
int idccID[1700]
Definition: EcalABAnalyzer.h:126
EcalABAnalyzer::_chi2cut
double _chi2cut
Definition: EcalABAnalyzer.h:68
TAPDPulse
Definition: TAPDPulse.h:7
EcalElectronicsId::towerId
int towerId() const
get the tower id
Definition: EcalElectronicsId.h:33
EcalABAnalyzer::~EcalABAnalyzer
~EcalABAnalyzer() override
Definition: EcalABAnalyzer.cc:155
EcalABAnalyzer::analyze
void analyze(const edm::Event &e, const edm::EventSetup &c) override
Definition: EcalABAnalyzer.cc:231
EcalDCCHeaderBlock::LASER_GAP
Definition: EcalDCCHeaderBlock.h:42
MEEBGeom::side
static int side(EBGlobalCoord ieta, EBGlobalCoord iphi)
Definition: MEEBGeom.cc:105
EcalRawDataCollections.h
MakerMacros.h
EcalABAnalyzer::EcalABAnalyzer
EcalABAnalyzer(const edm::ParameterSet &iConfig)
Definition: EcalABAnalyzer.cc:52
EcalABAnalyzer::nEvtBadTiming
int nEvtBadTiming[1700]
Definition: EcalABAnalyzer.h:131
test
Definition: SmallWORMDict.h:13
EcalDCCHeaderBlock::LASER_STD
Definition: EcalDCCHeaderBlock.h:26
ctpps_dqm_sourceclient-live_cfg.test
test
Definition: ctpps_dqm_sourceclient-live_cfg.py:7
EcalABAnalyzer::adc
double adc[10]
Definition: EcalABAnalyzer.h:121
CollectionTags_cfi.EEDigi
EEDigi
Definition: CollectionTags_cfi.py:28
EcalABAnalyzer::_lastsample
unsigned int _lastsample
Definition: EcalABAnalyzer.h:54
DEFINE_FWK_MODULE
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
EcalABAnalyzer.h
TAPDPulse::setPulse
bool setPulse(double *)
Definition: TAPDPulse.cc:86
EcalABAnalyzer::alphainitfile
std::string alphainitfile
Definition: EcalABAnalyzer.h:87
EcalElectronicsId::channelId
int channelId() const
so far for EndCap only :
Definition: EcalElectronicsId.cc:71
edm::SortedCollection::begin
const_iterator begin() const
Definition: SortedCollection.h:262
PVValHelper::eta
Definition: PVValidationHelpers.h:70
EcalABAnalyzer::_alpha
double _alpha
Definition: EcalABAnalyzer.h:64
EcalMappingRcd.h
EcalDigiCollections.h
EcalABAnalyzer::channelMapEE
std::map< int, int > channelMapEE
Definition: EcalABAnalyzer.h:112
edm::ESHandle< EcalElectronicsMapping >
EcalElectronicsMapping::getElectronicsId
EcalElectronicsId getElectronicsId(const DetId &id) const
Get the electronics id for this det id.
Definition: EcalElectronicsMapping.cc:324
EcalABAnalyzer::runNum
int runNum
Definition: EcalABAnalyzer.h:102
TAPDPulse::isTimingQualOK
bool isTimingQualOK()
Definition: TAPDPulse.cc:145
MEGeom.h
EcalElectronicsId
Ecal readout channel identification [32:20] Unused (so far) [19:13] DCC id [12:6] tower [5:3] strip [...
Definition: EcalElectronicsId.h:18
EcalABAnalyzer::nEvtTot
int nEvtTot[1700]
Definition: EcalABAnalyzer.h:132
EEDetId
Definition: EEDetId.h:14
EcalABAnalyzer::iZ
int iZ
Definition: EcalABAnalyzer.h:107
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
EcalDCCHeaderBlock::LASER_POWER_SCAN
Definition: EcalDCCHeaderBlock.h:27
EcalDCCHeaderBlock::EcalDCCEventSettings
Definition: EcalDCCHeaderBlock.h:64
EcalABAnalyzer::side
int side
Definition: EcalABAnalyzer.h:105
cppFunctionSkipper.exception
exception
Definition: cppFunctionSkipper.py:10
TShapeAnalysis.h
TShapeAnalysis::set_presample
void set_presample(int)
Definition: TShapeAnalysis.cc:145
EcalABAnalyzer::resdir_
std::string resdir_
Definition: EcalABAnalyzer.h:78
edm::ParameterSet
Definition: ParameterSet.h:47
TMom
Definition: TMom.h:7
EcalABAnalyzer::color
int color
Definition: EcalABAnalyzer.h:120
EcalABAnalyzer::doesABTreeExist
bool doesABTreeExist
Definition: EcalABAnalyzer.h:96
Event.h
TAPDPulse::isPulseOK
bool isPulseOK()
Definition: TAPDPulse.cc:162
EBDigiCollection
Definition: EcalDigiCollections.h:56
EcalABAnalyzer::lightside
int lightside
Definition: EcalABAnalyzer.h:106
edm::SortedCollection::end
const_iterator end() const
Definition: SortedCollection.h:267
EEDigiCollection
Definition: EcalDigiCollections.h:69
TShapeAnalysis::computeShape
void computeShape(std::string namefile, TTree *)
Definition: TShapeAnalysis.cc:205
EcalABAnalyzer::dccID
int dccID
Definition: EcalABAnalyzer.h:104
EcalElectronicsMapping.h
EcalABAnalyzer::beginJob
void beginJob() override
Definition: EcalABAnalyzer.cc:163
EcalABAnalyzer::_beta
double _beta
Definition: EcalABAnalyzer.h:65
createfilelist.int
int
Definition: createfilelist.py:10
iEvent
int iEvent
Definition: GenABIO.cc:224
EcalABAnalyzer::_fedid
int _fedid
Definition: EcalABAnalyzer.h:70
EcalABAnalyzer::eventHeaderCollection_
std::string eventHeaderCollection_
Definition: EcalABAnalyzer.h:81
ME.h
EcalABAnalyzer::eventHeaderProducer_
std::string eventHeaderProducer_
Definition: EcalABAnalyzer.h:82
Max
T Max(T a, T b)
Definition: MathUtil.h:44
EcalABAnalyzer::adcG
int adcG[10]
Definition: EcalABAnalyzer.h:122
edm::EventSetup
Definition: EventSetup.h:58
EcalABAnalyzer::Delta12
TMom * Delta12
Definition: EcalABAnalyzer.h:76
EcalABAnalyzer::_timingcuthigh
unsigned int _timingcuthigh
Definition: EcalABAnalyzer.h:56
EcalABAnalyzer::_nsamples
unsigned int _nsamples
Definition: EcalABAnalyzer.h:51
TShapeAnalysis
Definition: TShapeAnalysis.h:8
get
#define get
TAPDPulse::getDelta
double getDelta(int, int)
Definition: TAPDPulse.cc:116
EcalABAnalyzer::channelIteratorEE
int channelIteratorEE
Definition: EcalABAnalyzer.h:123
TMom::getMean
double getMean()
Definition: TMom.cc:121
EcalMGPASample
Definition: EcalMGPASample.h:22
EcalABAnalyzer::_firstsample
unsigned int _firstsample
Definition: EcalABAnalyzer.h:53
EcalABAnalyzer::iTowerID
int iTowerID[1700]
Definition: EcalABAnalyzer.h:126
EcalABAnalyzer
Definition: EcalABAnalyzer.h:35
EcalABAnalyzer::_ratiomincutlow
double _ratiomincutlow
Definition: EcalABAnalyzer.h:59
EcalABAnalyzer::_timingcutlow
unsigned int _timingcutlow
Definition: EcalABAnalyzer.h:55
std
Definition: JetResolutionObject.h:76
EcalABAnalyzer::iside
int iside[1700]
Definition: EcalABAnalyzer.h:126
EcalMappingRcd
Definition: EcalMappingRcd.h:15
EcalABAnalyzer::_presample
unsigned int _presample
Definition: EcalABAnalyzer.h:52
hgcalPerformanceValidation.df
df
Definition: hgcalPerformanceValidation.py:733
EcalABAnalyzer::wasTimingOK
bool wasTimingOK[1700]
Definition: EcalABAnalyzer.h:135
EcalDCCHeaderBlock::EcalDCCEventSettings::wavelength
short wavelength
Definition: EcalDCCHeaderBlock.h:67
EcalABAnalyzer::wasGainOK
bool wasGainOK[1700]
Definition: EcalABAnalyzer.h:134
EcalABAnalyzer::_qualpercent
double _qualpercent
Definition: EcalABAnalyzer.h:71
TShapeAnalysis::set_nch
void set_nch(int)
Definition: TShapeAnalysis.cc:146
TMom.h
EcalABAnalyzer::iEta
int iEta[1700]
Definition: EcalABAnalyzer.h:125
EcalDCCHeaderBlock::LASER_DELAY_SCAN
Definition: EcalDCCHeaderBlock.h:28
ecaldqm::towerID
EcalLogicID towerID(EcalElectronicsId const &)
Definition: LogicIDTranslation.cc:37
EcalABAnalyzer::fedID
int fedID
Definition: EcalABAnalyzer.h:103
EventSetup.h
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
MEEBGeom::localCoord
static XYCoord localCoord(int icr)
Definition: MEEBGeom.cc:142
Exception.h
TShapeAnalysis::set_const
void set_const(int, int, int, int, int, double, double)
Definition: TShapeAnalysis.cc:135
EcalABAnalyzer::_ratiomincuthigh
double _ratiomincuthigh
Definition: EcalABAnalyzer.h:60
EcalABAnalyzer::eta
int eta
Definition: EcalABAnalyzer.h:118
EcalABAnalyzer::endJob
void endJob() override
Definition: EcalABAnalyzer.cc:522
MEEEGeom::side
static int side(SuperCrysCoord iX, SuperCrysCoord iY, int iz)
Definition: MEEEGeom.cc:1155
EcalElectronicsId::stripId
int stripId() const
get the tower id
Definition: EcalElectronicsId.h:35
ParameterSet.h
EcalABAnalyzer::isTimingOK
bool isTimingOK
Definition: EcalABAnalyzer.h:138
EcalCondDBWriter_cfi.runType
runType
Definition: EcalCondDBWriter_cfi.py:64
c
auto & c
Definition: CAHitNtupletGeneratorKernelsImpl.h:46
dqmiolumiharvest.j
j
Definition: dqmiolumiharvest.py:66
EcalABAnalyzer::_timingquallow
unsigned int _timingquallow
Definition: EcalABAnalyzer.h:57
event
Definition: event.py:1
EEDataFrame
Definition: EEDataFrame.h:12
EcalABAnalyzer::alphafile
std::string alphafile
Definition: EcalABAnalyzer.h:86
edm::Event
Definition: Event.h:73
EcalABAnalyzer::APDPulse
TAPDPulse * APDPulse
Definition: EcalABAnalyzer.h:74
EcnaPython_AdcPeg12_S1_10_R170298_1_0_150_Dee0.cerr
cerr
Definition: EcnaPython_AdcPeg12_S1_10_R170298_1_0_150_Dee0.py:8
EcalElectronicsId::xtalId
int xtalId() const
get the channel id
Definition: EcalElectronicsId.h:37
ecalpyutils::hashedIndex
int hashedIndex(int ieta, int iphi)
Definition: EcalPyUtils.cc:38
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37
EcalABAnalyzer::_nevtmax
unsigned int _nevtmax
Definition: EcalABAnalyzer.h:66
EcalABAnalyzer::nEvtBadGain
int nEvtBadGain[1700]
Definition: EcalABAnalyzer.h:130