CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Private Attributes
EcalPerEvtLaserAnalyzer Class Reference

#include <EcalPerEvtLaserAnalyzer.h>

Inheritance diagram for EcalPerEvtLaserAnalyzer:
edm::EDAnalyzer edm::EDConsumerBase

Public Types

enum  VarCol { iBlue, iRed, nColor }
 
- Public Types inherited from edm::EDAnalyzer
typedef EDAnalyzer ModuleType
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 

Public Member Functions

void analyze (const edm::Event &e, const edm::EventSetup &c) override
 
void beginJob () override
 
 EcalPerEvtLaserAnalyzer (const edm::ParameterSet &iConfig)
 
void endJob () override
 
 ~EcalPerEvtLaserAnalyzer () override
 
- Public Member Functions inherited from edm::EDAnalyzer
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzer ()
 
SerialTaskQueueglobalLuminosityBlocksQueue ()
 
SerialTaskQueueglobalRunsQueue ()
 
ModuleDescription const & moduleDescription () const
 
std::string workerType () const
 
 ~EDAnalyzer () override
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
void convertCurrentProcessAlias (std::string const &processName)
 Convert "@currentProcess" in InputTag process names to the actual current process name. More...
 
 EDConsumerBase ()
 
 EDConsumerBase (EDConsumerBase &&)=default
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
ESProxyIndex const * esGetTokenIndices (edm::Transition iTrans) const
 
std::vector< ESProxyIndex > const & esGetTokenIndicesVector (edm::Transition iTrans) const
 
std::vector< ESRecordIndex > const & esGetTokenRecordIndicesVector (edm::Transition iTrans) const
 
ProductResolverIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
std::vector< ProductResolverIndexAndSkipBit > const & itemsToGetFrom (BranchType iType) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesWhoseProductsAreConsumed (std::array< std::vector< ModuleDescription const * > *, NumBranchTypes > &modulesAll, std::vector< ModuleProcessName > &modulesInPreviousProcesses, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
void updateLookup (eventsetup::ESRecordsToProxyIndices const &)
 
virtual ~EDConsumerBase () noexcept(false)
 

Private Attributes

unsigned int _channel
 
std::string _ecalPart
 
int _fedid
 
unsigned int _firstsample
 
unsigned int _firstsamplePN
 
unsigned int _lastsample
 
unsigned int _lastsamplePN
 
unsigned int _niter
 
unsigned int _nsamples
 
unsigned int _nsamplesPN
 
unsigned int _presample
 
unsigned int _presamplePN
 
unsigned int _samplemax
 
unsigned int _samplemin
 
unsigned int _timingcuthigh
 
unsigned int _timingcutlow
 
unsigned int _tower
 
double adc [10]
 
std::string ADCfile
 
TFile * ADCFile
 
int adcG [10]
 
TTree * ADCtrees
 
std::string alphafile
 
double apdAmpl
 
std::string APDfile
 
TFile * APDFile
 
double apdTime
 
TTree * APDtrees
 
int channelNumber
 
int colMat
 
int color
 
std::vector< int > colors
 
int dccID
 
std::string digiCollection_
 
std::string digiPNCollection_
 
std::string digiProducer_
 
int doesRefFileExist
 
int eta
 
int event
 
std::string eventHeaderCollection_
 
std::string eventHeaderProducer_
 
int evtMat
 
int fedID
 
TTree * header [2]
 
int iEvent
 
int IsFileCreated
 
int IsHeaderFilled [nColor]
 
int IsThereDataADC [nColor]
 
int lightside
 
TFile * matacqFile
 
TTree * matacqTree
 
unsigned int nCh
 
unsigned int nCrys
 
unsigned int nSides
 
unsigned int nTT
 
double peak
 
double peakMat
 
int phi
 
double pn [50]
 
double pn0
 
double pn1
 
double pnAmpl
 
std::string refalphabeta_
 
std::string resdir_
 
std::string resfile
 
int runNum
 
int runType
 
double tt
 
double ttMat
 
double ttrig
 

Additional Inherited Members

- Static Public Member Functions inherited from edm::EDAnalyzer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &)
 
static bool wantsGlobalLuminosityBlocks ()
 
static bool wantsGlobalRuns ()
 
static bool wantsInputProcessBlocks ()
 
static bool wantsProcessBlocks ()
 
static bool wantsStreamLuminosityBlocks ()
 
static bool wantsStreamRuns ()
 
- Protected Member Functions inherited from edm::EDConsumerBase
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
template<BranchType B = InEvent>
EDConsumerBaseAdaptor< B > consumes (edm::InputTag tag) noexcept
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes ()
 
template<Transition Tr = Transition::Event>
constexpr auto esConsumes () noexcept
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
template<Transition Tr = Transition::Event>
auto esConsumes (ESInputTag tag) noexcept
 
template<Transition Tr = Transition::Event>
ESGetTokenGeneric esConsumes (eventsetup::EventSetupRecordKey const &iRecord, eventsetup::DataKey const &iKey)
 Used with EventSetupRecord::doGet. More...
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 

Detailed Description

Definition at line 33 of file EcalPerEvtLaserAnalyzer.h.

Member Enumeration Documentation

◆ VarCol

Enumerator
iBlue 
iRed 
nColor 

Definition at line 42 of file EcalPerEvtLaserAnalyzer.h.

42 { iBlue, iRed, nColor };

Constructor & Destructor Documentation

◆ EcalPerEvtLaserAnalyzer()

EcalPerEvtLaserAnalyzer::EcalPerEvtLaserAnalyzer ( const edm::ParameterSet iConfig)
explicit

Definition at line 46 of file EcalPerEvtLaserAnalyzer.cc.

48  : iEvent(0),
49 
50  // framework parameters with default values
51  _nsamples(iConfig.getUntrackedParameter<unsigned int>("nSamples", 10)),
52  _presample(iConfig.getUntrackedParameter<unsigned int>("nPresamples", 3)),
53  _firstsample(iConfig.getUntrackedParameter<unsigned int>("firstSample", 1)),
54  _lastsample(iConfig.getUntrackedParameter<unsigned int>("lastSample", 2)),
55  _samplemin(iConfig.getUntrackedParameter<unsigned int>("sampleMin", 3)),
56  _samplemax(iConfig.getUntrackedParameter<unsigned int>("sampleMax", 9)),
57  _nsamplesPN(iConfig.getUntrackedParameter<unsigned int>("nSamplesPN", 50)),
58  _presamplePN(iConfig.getUntrackedParameter<unsigned int>("nPresamplesPN", 6)),
59  _firstsamplePN(iConfig.getUntrackedParameter<unsigned int>("firstSamplePN", 7)),
60  _lastsamplePN(iConfig.getUntrackedParameter<unsigned int>("lastSamplePN", 8)),
61  _timingcutlow(iConfig.getUntrackedParameter<unsigned int>("timingCutLow", 3)),
62  _timingcuthigh(iConfig.getUntrackedParameter<unsigned int>("timingCutHigh", 7)),
63  _niter(iConfig.getUntrackedParameter<unsigned int>("nIter", 3)),
64  _fedid(iConfig.getUntrackedParameter<unsigned int>("fedID", 0)),
65  _tower(iConfig.getUntrackedParameter<unsigned int>("tower", 1)),
66  _channel(iConfig.getUntrackedParameter<unsigned int>("channel", 1)),
67  _ecalPart(iConfig.getUntrackedParameter<std::string>("ecalPart", "EB")),
68  nCrys(NCRYSEB),
69  nTT(NTTEB),
70  nSides(NSIDES),
71  IsFileCreated(0),
72  nCh(0),
73  runType(-1),
74  runNum(0),
75  dccID(-1),
76  lightside(2),
78  ttMat(-1),
79  peakMat(-1),
80  peak(-1),
81  evtMat(-1),
82  colMat(-1)
83 //========================================================================
84 
85 {
86  //now do what ever initialization is needed
87 
88  resdir_ = iConfig.getUntrackedParameter<std::string>("resDir");
89  refalphabeta_ = iConfig.getUntrackedParameter<std::string>("refAlphaBeta");
90 
91  digiCollection_ = iConfig.getParameter<std::string>("digiCollection");
92  digiPNCollection_ = iConfig.getParameter<std::string>("digiPNCollection");
93  digiProducer_ = iConfig.getParameter<std::string>("digiProducer");
94 
95  eventHeaderCollection_ = iConfig.getParameter<std::string>("eventHeaderCollection");
96  eventHeaderProducer_ = iConfig.getParameter<std::string>("eventHeaderProducer");
97 
98  // Define geometrical constants
99 
100  if (_ecalPart == "EB") {
101  nCrys = NCRYSEB;
102  nTT = NTTEB;
103  } else {
104  nCrys = NCRYSEE;
105  nTT = NTTEE;
106  }
107 }

References _ecalPart, digiCollection_, digiPNCollection_, digiProducer_, eventHeaderCollection_, eventHeaderProducer_, edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), nCrys, NCRYSEB, NCRYSEE, nTT, NTTEB, NTTEE, refalphabeta_, resdir_, and AlCaHLTBitMon_QueryRunRegistry::string.

◆ ~EcalPerEvtLaserAnalyzer()

EcalPerEvtLaserAnalyzer::~EcalPerEvtLaserAnalyzer ( )
override

Definition at line 110 of file EcalPerEvtLaserAnalyzer.cc.

110  {
111  //========================================================================
112 
113  // do anything here that needs to be done at desctruction time
114  // (e.g. close files, deallocate resources etc.)
115 }

Member Function Documentation

◆ analyze()

void EcalPerEvtLaserAnalyzer::analyze ( const edm::Event e,
const edm::EventSetup c 
)
overridevirtual

Implements edm::EDAnalyzer.

Definition at line 164 of file EcalPerEvtLaserAnalyzer.cc.

164  {
165  //========================================================================
166 
167  ++iEvent;
168 
169  // retrieving DCC header
171  const EcalRawDataCollection* DCCHeader = nullptr;
172  try {
173  e.getByLabel(eventHeaderProducer_, eventHeaderCollection_, pDCCHeader);
174  DCCHeader = pDCCHeader.product();
175  } catch (std::exception& ex) {
176  std::cerr << "Error! can't get the product retrieving DCC header" << eventHeaderCollection_.c_str() << std::endl;
177  }
178 
179  // retrieving crystal data from Event
181  const EBDigiCollection* EBDigi = nullptr;
183  const EEDigiCollection* EEDigi = nullptr;
184 
185  if (_ecalPart == "EB") {
186  try {
187  e.getByLabel(digiProducer_, digiCollection_, pEBDigi);
188  EBDigi = pEBDigi.product();
189  } catch (std::exception& ex) {
190  std::cerr << "Error! can't get the product retrieving EB crystal data " << digiCollection_.c_str() << std::endl;
191  }
192  } else {
193  try {
194  e.getByLabel(digiProducer_, digiCollection_, pEEDigi);
195  EEDigi = pEEDigi.product();
196  } catch (std::exception& ex) {
197  std::cerr << "Error! can't get the product retrieving EE crystal data " << digiCollection_.c_str() << std::endl;
198  }
199  }
200 
201  // retrieving crystal PN diodes from Event
203  const EcalPnDiodeDigiCollection* PNDigi = nullptr;
204  try {
205  e.getByLabel(digiProducer_, digiPNCollection_, pPNDigi);
206  PNDigi = pPNDigi.product();
207  } catch (std::exception& ex) {
208  std::cerr << "Error! can't get the product " << digiPNCollection_.c_str() << std::endl;
209  }
210 
211  // retrieving electronics mapping
213  const EcalElectronicsMapping* TheMapping = nullptr;
214  try {
215  c.get<EcalMappingRcd>().get(ecalmapping);
216  TheMapping = ecalmapping.product();
217  } catch (std::exception& ex) {
218  std::cerr << "Error! can't get the product EcalMappingRcd" << std::endl;
219  }
220 
221  // ====================================
222  // Decode Basic DCCHeader Information
223  // ====================================
224 
225  for (EcalRawDataCollection::const_iterator headerItr = DCCHeader->begin(); headerItr != DCCHeader->end();
226  ++headerItr) {
227  // Get run type and run number
228 
229  int fed = headerItr->fedId();
230 
231  if (fed != _fedid && _fedid != -999)
232  continue;
233 
234  runType = headerItr->getRunType();
235  runNum = headerItr->getRunNumber();
236  event = headerItr->getLV1();
237  dccID = headerItr->getDccInTCCCommand();
238  fedID = headerItr->fedId();
239 
240  // take event only if the fed corresponds to the DCC in TCC
241  if (600 + dccID != fedID)
242  continue;
243 
244  // Cut on runType
246  return;
247 
248  // Define output results files' names
249 
250  if (IsFileCreated == 0) {
251  stringstream namefile2;
252  namefile2 << resdir_ << "/APDAmpl_Run" << runNum << "_" << _fedid << "_" << _tower << "_" << _channel << ".root";
253  resfile = namefile2.str();
254 
255  // Get Matacq ttrig
256 
257  stringstream namefile;
258  namefile << resdir_ << "/Matacq-Run" << runNum << ".root";
259 
260  doesRefFileExist = 0;
261 
262  FILE* test;
263  test = fopen(namefile.str().c_str(), "r");
264  if (test)
265  doesRefFileExist = 1;
266 
267  if (doesRefFileExist == 1) {
268  matacqFile = new TFile((namefile.str().c_str()));
269  matacqTree = (TTree*)matacqFile->Get("MatacqShape");
270 
271  matacqTree->SetBranchAddress("event", &evtMat);
272  matacqTree->SetBranchAddress("color", &colMat);
273  matacqTree->SetBranchAddress("peak", &peakMat);
274  matacqTree->SetBranchAddress("ttrig", &ttMat);
275  }
276 
277  IsFileCreated = 1;
278  }
279 
280  // Retrieve laser color and event number
281 
282  EcalDCCHeaderBlock::EcalDCCEventSettings settings = headerItr->getEventSettings();
283  int color = settings.wavelength;
284 
285  vector<int>::iterator iter = find(colors.begin(), colors.end(), color);
286  if (iter == colors.end()) {
287  colors.push_back(color);
288  cout << " new color found " << color << " " << colors.size() << endl;
289  }
290  }
291 
292  // cut on fedID
293 
294  if (fedID != _fedid && _fedid != -999)
295  return;
296 
297  // ======================
298  // Decode PN Information
299  // ======================
300 
301  TPNFit* pnfit = new TPNFit();
303 
304  double chi2pn = 0;
305  double ypnrange[50];
306  double dsum = 0.;
307  double dsum1 = 0.;
308  double bl = 0.;
309  double bl1 = 0.;
310  double val_max = 0.;
311  unsigned int samplemax = 0;
312  unsigned int k;
313 
314  std::vector<double> allPNAmpl;
315 
316  for (EcalPnDiodeDigiCollection::const_iterator pnItr = PNDigi->begin(); pnItr != PNDigi->end();
317  ++pnItr) { // Loop on PNs
318 
319  for (int samId = 0; samId < (*pnItr).size(); samId++) { // Loop on PN samples
320  pn[samId] = (*pnItr).sample(samId).adc();
321  }
322 
323  for (dsum = 0., k = 0; k < _presamplePN; k++) {
324  dsum += pn[k];
325  }
326  bl = dsum / ((double)_presamplePN);
327 
328  for (val_max = 0., k = 0; k < _nsamplesPN; k++) {
329  ypnrange[k] = pn[k] - bl;
330 
331  if (ypnrange[k] > val_max) {
332  val_max = ypnrange[k];
333  samplemax = k;
334  }
335  }
336 
337  chi2pn = pnfit->doFit(samplemax, &ypnrange[0]);
338 
339  if (chi2pn == 101 || chi2pn == 102 || chi2pn == 103)
340  pnAmpl = 0.;
341  else
342  pnAmpl = pnfit->getAmpl();
343 
344  allPNAmpl.push_back(pnAmpl);
345  }
346 
347  // ===========
348  // Get Matacq
349  // ===========
350 
351  ttrig = -1.;
352  peak = -1.;
353 
354  if (doesRefFileExist == 1) {
355  // FIXME
356  if (color == 0)
357  matacqTree->GetEntry(event - 1);
358  else if (color == 3)
359  matacqTree->GetEntry(matacqTree->GetEntries("color==0") + event - 1);
360  ttrig = ttMat;
361  peak = peakMat;
362  }
363 
364  // ===========================
365  // Decode EBDigis Information
366  // ===========================
367 
368  double yrange[10];
369  int adcGain = 0;
370  int side = 0;
371 
372  if (EBDigi) {
373  for (EBDigiCollection::const_iterator digiItr = EBDigi->begin(); digiItr != EBDigi->end();
374  ++digiItr) { // Loop on crystals
375 
376  EBDetId id_crystal(digiItr->id());
377  EBDataFrame df(*digiItr);
378 
379  int etaG = id_crystal.ieta(); // global
380  int phiG = id_crystal.iphi(); // global
381 
382  int etaL; // local
383  int phiL; // local
384  std::pair<int, int> LocalCoord = MEEBGeom::localCoord(etaG, phiG);
385 
386  etaL = LocalCoord.first;
387  phiL = LocalCoord.second;
388 
389  eta = etaG;
390  phi = phiG;
391 
392  side = MEEBGeom::side(etaG, phiG);
393 
394  EcalElectronicsId elecid_crystal = TheMapping->getElectronicsId(id_crystal);
395 
396  int towerID = elecid_crystal.towerId();
397  // int channelID=elecid_crystal.channelId()-1; // FIXME so far for endcap only
398  int strip = elecid_crystal.stripId();
399  int xtal = elecid_crystal.xtalId();
400  int channelID = 5 * (strip - 1) + xtal - 1; // FIXME
401 
402  int module = MEEBGeom::lmmod(etaG, phiG);
403 
404  std::pair<int, int> pnpair = MEEBGeom::pn(module);
405  unsigned int MyPn0 = pnpair.first;
406  unsigned int MyPn1 = pnpair.second;
407 
408  unsigned int channel = MEEBGeom::electronic_channel(etaL, phiL);
409  assert(channel < nCrys);
410 
411  double adcmax = 0.0;
412 
413  if (towerID != int(_tower) || channelID != int(_channel) || dccID != int(_fedid - 600))
414  continue;
415  else
416  channelNumber = channel;
417 
418  for (unsigned int i = 0; i < (*digiItr).size(); ++i) { // Loop on adc samples
419 
420  EcalMGPASample samp_crystal(df.sample(i));
421  adc[i] = samp_crystal.adc();
422  adcG[i] = samp_crystal.gainId();
423 
424  if (i == 0)
425  adcGain = adcG[i];
426  if (i > 0)
427  adcGain = TMath::Max(adcG[i], adcGain);
428 
429  if (adc[i] > adcmax) {
430  adcmax = adc[i];
431  }
432  }
433 
434  for (dsum = 0., dsum1 = 0., k = 0; k < _presample; k++) {
435  dsum += adc[k];
436  if (k < _presample - 1)
437  dsum1 += adc[k];
438  }
439 
440  bl = dsum / ((double)_presample);
441  bl1 = dsum1 / ((double)_presample - 1);
442 
443  for (val_max = 0., k = 0; k < _nsamples; k++) {
444  yrange[k] = adc[k] - bl;
445  if (yrange[k] > val_max) {
446  val_max = yrange[k];
447  samplemax = k;
448  }
449  }
450 
451  if (samplemax == 4 || samplemax == 5) {
452  val_max = val_max + bl - bl1;
453  for (k = 0; k < _nsamples; k++) {
454  yrange[k] = yrange[k] + bl - bl1;
455  }
456  }
457 
458  for (unsigned int k = 0; k < _nsamples; k++) {
459  adc[k] = yrange[k];
460  }
461 
462  pn0 = allPNAmpl[MyPn0];
463  pn1 = allPNAmpl[MyPn1];
464 
465  if (samplemax >= _timingcutlow && samplemax <= _timingcuthigh && lightside == side)
466  ADCtrees->Fill();
467  }
468 
469  } else {
470  for (EEDigiCollection::const_iterator digiItr = EEDigi->begin(); digiItr != EEDigi->end();
471  ++digiItr) { // Loop on crystals
472 
473  EEDetId id_crystal(digiItr->id());
474  EEDataFrame df(*digiItr);
475 
476  phi = id_crystal.ix() - 1;
477  eta = id_crystal.iy() - 1;
478  side = 0; // FIXME
479 
480  // Recover the TT id and the electronic crystal numbering from EcalElectronicsMapping
481 
482  EcalElectronicsId elecid_crystal = TheMapping->getElectronicsId(id_crystal);
483 
484  int towerID = elecid_crystal.towerId();
485  int channelID = elecid_crystal.channelId() - 1;
486 
487  int module = MEEEGeom::lmmod(phi, eta);
488 
489  std::pair<int, int> pnpair = MEEEGeom::pn(module, _fedid);
490  unsigned int MyPn0 = pnpair.first;
491  unsigned int MyPn1 = pnpair.second;
492 
493  unsigned int channel = MEEEGeom::crystal(phi, eta);
494  assert(channel < nCrys);
495 
496  double adcmax = 0.0;
497 
498  if (towerID != int(_tower) || channelID != int(_channel) || dccID != int(_fedid - 600))
499  continue;
500  else
501  channelNumber = channel;
502 
503  for (unsigned int i = 0; i < (*digiItr).size(); ++i) { // Loop on adc samples
504 
505  EcalMGPASample samp_crystal(df.sample(i));
506  adc[i] = samp_crystal.adc();
507  adcG[i] = samp_crystal.gainId();
508 
509  if (i == 0)
510  adcGain = adcG[i];
511  if (i > 0)
512  adcGain = TMath::Max(adcG[i], adcGain);
513 
514  if (adc[i] > adcmax) {
515  adcmax = adc[i];
516  }
517  }
518 
519  for (dsum = 0., dsum1 = 0., k = 0; k < _presample; k++) {
520  dsum += adc[k];
521  if (k < _presample - 1)
522  dsum1 += adc[k];
523  }
524 
525  bl = dsum / ((double)_presample);
526  bl1 = dsum1 / ((double)_presample - 1);
527 
528  for (val_max = 0., k = 0; k < _nsamples; k++) {
529  yrange[k] = adc[k] - bl;
530  if (yrange[k] > val_max) {
531  val_max = yrange[k];
532  samplemax = k;
533  }
534  }
535 
536  if (samplemax == 4 || samplemax == 5) {
537  val_max = val_max + bl - bl1;
538  for (k = 0; k < _nsamples; k++) {
539  yrange[k] = yrange[k] + bl - bl1;
540  }
541  }
542 
543  for (unsigned int k = 0; k < _nsamples; k++) {
544  adc[k] = yrange[k];
545  }
546 
547  pn0 = allPNAmpl[MyPn0];
548  pn1 = allPNAmpl[MyPn1];
549 
550  if (samplemax >= _timingcutlow && samplemax <= _timingcuthigh && lightside == side)
551  ADCtrees->Fill();
552  }
553  }
554 
555 } // analyze

References _channel, _ecalPart, _fedid, _firstsamplePN, _lastsamplePN, _nsamples, _nsamplesPN, _presample, _presamplePN, _timingcuthigh, _timingcutlow, _tower, adc, adcG, ADCtrees, cms::cuda::assert(), edm::SortedCollection< T, SORT >::begin(), c, EcnaPython_AdcPeg12_S1_10_R170298_1_0_150_Dee0::cerr, EcalElectronicsId::channelId(), channelNumber, colMat, color, gather_cfg::cout, MEEEGeom::crystal(), dccID, hgcalPerformanceValidation::df, digiCollection_, digiPNCollection_, digiProducer_, doesRefFileExist, TPNFit::doFit(), MillePedeFileConverter_cfg::e, CollectionTags_cfi::EBDigi, CollectionTags_cfi::EEDigi, MEEBGeom::electronic_channel(), edm::SortedCollection< T, SORT >::end(), eta, eventHeaderCollection_, eventHeaderProducer_, evtMat, cppFunctionSkipper::exception, fedID, spr::find(), get, TPNFit::getAmpl(), EcalElectronicsMapping::getElectronicsId(), mps_fire::i, iEvent, TPNFit::init(), IsFileCreated, dqmdumpme::k, EcalDCCHeaderBlock::LASER_GAP, EcalDCCHeaderBlock::LASER_STD, lightside, MEEEGeom::lmmod(), MEEBGeom::lmmod(), MEEBGeom::localCoord(), matacqFile, matacqTree, Max(), nCrys, peak, peakMat, phi, MEEBGeom::pn(), MEEEGeom::pn(), pn, pn0, pn1, pnAmpl, edm::Handle< T >::product(), edm::ESHandle< T >::product(), resdir_, resfile, runNum, runType, MEEBGeom::side(), digitizers_cfi::strip, EcalElectronicsId::stripId(), ctpps_dqm_sourceclient-live_cfg::test, EcalElectronicsId::towerId(), ecaldqm::towerID(), ttMat, ttrig, EcalDCCHeaderBlock::EcalDCCEventSettings::wavelength, and EcalElectronicsId::xtalId().

◆ beginJob()

void EcalPerEvtLaserAnalyzer::beginJob ( void  )
overridevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 118 of file EcalPerEvtLaserAnalyzer.cc.

118  {
119  //========================================================================
120 
121  // Define temporary files' names
122 
123  stringstream namefile1;
124  namefile1 << resdir_ << "/ADCSamples.root";
125 
126  ADCfile = namefile1.str();
127 
128  // Create temporary file and trees to save adc samples
129 
130  ADCFile = new TFile(ADCfile.c_str(), "RECREATE");
131 
132  stringstream name;
133  name << "ADCTree";
134 
135  ADCtrees = new TTree(name.str().c_str(), name.str().c_str());
136 
137  ADCtrees->Branch("iphi", &phi, "phi/I");
138  ADCtrees->Branch("ieta", &eta, "eta/I");
139  ADCtrees->Branch("dccID", &dccID, "dccID/I");
140  ADCtrees->Branch("event", &event, "event/I");
141  ADCtrees->Branch("color", &color, "color/I");
142  ADCtrees->Branch("adc", &adc, "adc[10]/D");
143  ADCtrees->Branch("ttrigMatacq", &ttrig, "ttrig/D");
144  ADCtrees->Branch("peakMatacq", &peak, "peak/D");
145  ADCtrees->Branch("pn0", &pn0, "pn0/D");
146  ADCtrees->Branch("pn1", &pn1, "pn1/D");
147 
148  ADCtrees->SetBranchAddress("ieta", &eta);
149  ADCtrees->SetBranchAddress("iphi", &phi);
150  ADCtrees->SetBranchAddress("dccID", &dccID);
151  ADCtrees->SetBranchAddress("event", &event);
152  ADCtrees->SetBranchAddress("color", &color);
153  ADCtrees->SetBranchAddress("adc", adc);
154  ADCtrees->SetBranchAddress("ttrigMatacq", &ttrig);
155  ADCtrees->SetBranchAddress("peakMatacq", &peak);
156  ADCtrees->SetBranchAddress("pn0", &pn0);
157  ADCtrees->SetBranchAddress("pn1", &pn1);
158 
159  IsFileCreated = 0;
160  nCh = nCrys;
161 }

References adc, ADCfile, ADCFile, ADCtrees, color, dccID, eta, IsFileCreated, Skims_PA_cff::name, nCh, nCrys, peak, phi, pn0, pn1, resdir_, and ttrig.

◆ endJob()

void EcalPerEvtLaserAnalyzer::endJob ( void  )
overridevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 558 of file EcalPerEvtLaserAnalyzer.cc.

558  {
559  //========================================================================
560 
561  assert(colors.size() <= nColor);
562  unsigned int nCol = colors.size();
563 
564  ADCtrees->Write();
565 
566  cout << "\n\t+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+" << endl;
567  cout << "\t+=+ Analyzing laser data: getting per event +=+" << endl;
568  cout << "\t+=+ APD Amplitudes and ADC samples +=+" << endl;
569  cout << "\t+=+ for fed:" << _fedid << ", tower:" << _tower << ", and channel:" << _channel << endl;
570 
571  // Define temporary tree to save APD amplitudes
572 
573  APDFile = new TFile(resfile.c_str(), "RECREATE");
574 
575  int ieta, iphi, channelID, towerID, flag;
576  double alpha, beta;
577 
578  colors.push_back(color);
579 
580  for (unsigned int i = 0; i < nCol; i++) {
581  stringstream name1;
582  name1 << "headerCol" << colors[i];
583 
584  header[i] = new TTree(name1.str().c_str(), name1.str().c_str());
585 
586  header[i]->Branch("alpha", &alpha, "alpha/D");
587  header[i]->Branch("beta", &beta, "beta/D");
588  header[i]->Branch("iphi", &iphi, "iphi/I");
589  header[i]->Branch("ieta", &ieta, "ieta/I");
590  header[i]->Branch("dccID", &dccID, "dccID/I");
591  header[i]->Branch("towerID", &towerID, "towerID/I");
592  header[i]->Branch("channelID", &channelID, "channelID/I");
593 
594  header[i]->SetBranchAddress("alpha", &alpha);
595  header[i]->SetBranchAddress("beta", &beta);
596  header[i]->SetBranchAddress("iphi", &iphi);
597  header[i]->SetBranchAddress("ieta", &ieta);
598  header[i]->SetBranchAddress("dccID", &dccID);
599  header[i]->SetBranchAddress("towerID", &towerID);
600  header[i]->SetBranchAddress("channelID", &channelID);
601  }
602 
603  stringstream name2;
604  name2 << "APDTree";
605  APDtrees = new TTree(name2.str().c_str(), name2.str().c_str());
606 
607  //List of branches
608 
609  APDtrees->Branch("event", &event, "event/I");
610  APDtrees->Branch("color", &color, "color/I");
611  APDtrees->Branch("adc", &adc, "adc[10]/D");
612  APDtrees->Branch("peakMatacq", &peak, "peak/D");
613  APDtrees->Branch("ttrigMatacq", &ttrig, "ttrig/D");
614  APDtrees->Branch("apdAmpl", &apdAmpl, "apdAmpl/D");
615  APDtrees->Branch("apdTime", &apdTime, "apdTime/D");
616  APDtrees->Branch("flag", &flag, "flag/I");
617  APDtrees->Branch("pn0", &pn0, "pn0/D");
618  APDtrees->Branch("pn1", &pn1, "pn1/D");
619 
620  APDtrees->SetBranchAddress("event", &event);
621  APDtrees->SetBranchAddress("color", &color);
622  APDtrees->SetBranchAddress("adc", adc);
623  APDtrees->SetBranchAddress("peakMatacq", &peak);
624  APDtrees->SetBranchAddress("ttrigMatacq", &ttrig);
625  APDtrees->SetBranchAddress("apdAmpl", &apdAmpl);
626  APDtrees->SetBranchAddress("apdTime", &apdTime);
627  APDtrees->SetBranchAddress("flag", &flag);
628  APDtrees->SetBranchAddress("pn0", &pn0);
629  APDtrees->SetBranchAddress("pn1", &pn1);
630 
631  // Retrieve alpha and beta for APD amplitudes calculation
632 
633  TFile* alphaFile = new TFile(refalphabeta_.c_str());
634  TTree* alphaTree[2];
635 
636  Double_t alphaRun, betaRun;
637  int ietaRun, iphiRun, channelIDRun, towerIDRun, dccIDRun, flagRun;
638 
639  for (unsigned int i = 0; i < nCol; i++) {
640  stringstream name3;
641  name3 << "ABCol" << i;
642  alphaTree[i] = (TTree*)alphaFile->Get(name3.str().c_str());
643  alphaTree[i]->SetBranchStatus("*", false);
644  alphaTree[i]->SetBranchStatus("alpha", true);
645  alphaTree[i]->SetBranchStatus("beta", true);
646  alphaTree[i]->SetBranchStatus("iphi", true);
647  alphaTree[i]->SetBranchStatus("ieta", true);
648  alphaTree[i]->SetBranchStatus("dccID", true);
649  alphaTree[i]->SetBranchStatus("towerID", true);
650  alphaTree[i]->SetBranchStatus("channelID", true);
651  alphaTree[i]->SetBranchStatus("flag", true);
652 
653  alphaTree[i]->SetBranchAddress("alpha", &alphaRun);
654  alphaTree[i]->SetBranchAddress("beta", &betaRun);
655  alphaTree[i]->SetBranchAddress("iphi", &iphiRun);
656  alphaTree[i]->SetBranchAddress("ieta", &ietaRun);
657  alphaTree[i]->SetBranchAddress("dccID", &dccIDRun);
658  alphaTree[i]->SetBranchAddress("towerID", &towerIDRun);
659  alphaTree[i]->SetBranchAddress("channelID", &channelIDRun);
660  alphaTree[i]->SetBranchAddress("flag", &flagRun);
661  }
662 
664 
665  double chi2;
666 
667  for (unsigned int icol = 0; icol < nCol; icol++) {
668  IsThereDataADC[icol] = 1;
669  stringstream cut;
670  cut << "color==" << colors.at(icol);
671  if (ADCtrees->GetEntries(cut.str().c_str()) < 10)
672  IsThereDataADC[icol] = 0;
673  IsHeaderFilled[icol] = 0;
674  }
675 
676  // Define submodule and channel number inside the submodule (as Patrice)
677 
678  Long64_t nbytes = 0, nb = 0;
679  for (Long64_t jentry = 0; jentry < ADCtrees->GetEntriesFast(); jentry++) { // Loop on events
680  nb = ADCtrees->GetEntry(jentry);
681  nbytes += nb;
682 
683  int iCry = channelNumber;
684 
685  // get back color
686 
687  unsigned int iCol = 0;
688  for (unsigned int i = 0; i < nCol; i++) {
689  if (color == colors[i]) {
690  iCol = i;
691  i = colors.size();
692  }
693  }
694 
695  alphaTree[iCol]->GetEntry(iCry);
696 
697  flag = flagRun;
698  iphi = iphiRun;
699  ieta = ietaRun;
700  towerID = towerIDRun;
701  channelID = channelIDRun;
702  alpha = alphaRun;
703  beta = betaRun;
704 
705  if (IsHeaderFilled[iCol] == 0) {
706  header[iCol]->Fill();
707  IsHeaderFilled[iCol] = 1;
708  }
709  // Amplitude calculation
710 
711  apdAmpl = 0;
712  apdTime = 0;
713 
714  pslsfit->init(_nsamples, _firstsample, _lastsample, _niter, alphaRun, betaRun);
715  chi2 = pslsfit->doFit(&adc[0]);
716 
717  if (chi2 < 0. || chi2 == 102 || chi2 == 101) {
718  apdAmpl = 0;
719  apdTime = 0;
720 
721  } else {
722  apdAmpl = pslsfit->getAmpl();
723  apdTime = pslsfit->getTime();
724  }
725 
726  APDtrees->Fill();
727  }
728 
729  alphaFile->Close();
730 
731  ADCFile->Close();
732 
733  APDFile->Write();
734  APDFile->Close();
735 
736  // Remove unwanted files
737 
738  stringstream del;
739  del << "rm " << ADCfile;
740  system(del.str().c_str());
741 
742  cout << "\t+=+ .................................................. done +=+" << endl;
743  cout << "\t+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+" << endl;
744 }

References _channel, _fedid, _firstsample, _lastsample, _niter, _nsamples, _tower, adc, ADCfile, ADCFile, ADCtrees, alpha, apdAmpl, APDFile, apdTime, APDtrees, cms::cuda::assert(), HLT_FULL_cff::beta, channelNumber, hltPixelTracks_cff::chi2, color, gather_cfg::cout, TkAlMuonSelectors_cfi::cut, dccID, PulseFitWithFunction::doFit(), RemoveAddSevLevel::flag, PulseFitWithFunction::getAmpl(), PulseFitWithFunction::getTime(), header, mps_fire::i, LEDCalibrationChannels::ieta, PulseFitWithFunction::init(), LEDCalibrationChannels::iphi, IsHeaderFilled, IsThereDataADC, hfnoseParametersInitialization_cfi::name2, nColor, peak, pn0, pn1, refalphabeta_, resfile, ecaldqm::towerID(), and ttrig.

Referenced by o2olib.O2ORunMgr::executeJob().

Member Data Documentation

◆ _channel

unsigned int EcalPerEvtLaserAnalyzer::_channel
private

Definition at line 64 of file EcalPerEvtLaserAnalyzer.h.

Referenced by analyze(), and endJob().

◆ _ecalPart

std::string EcalPerEvtLaserAnalyzer::_ecalPart
private

Definition at line 65 of file EcalPerEvtLaserAnalyzer.h.

Referenced by analyze(), and EcalPerEvtLaserAnalyzer().

◆ _fedid

int EcalPerEvtLaserAnalyzer::_fedid
private

Definition at line 62 of file EcalPerEvtLaserAnalyzer.h.

Referenced by analyze(), and endJob().

◆ _firstsample

unsigned int EcalPerEvtLaserAnalyzer::_firstsample
private

Definition at line 51 of file EcalPerEvtLaserAnalyzer.h.

Referenced by endJob().

◆ _firstsamplePN

unsigned int EcalPerEvtLaserAnalyzer::_firstsamplePN
private

Definition at line 57 of file EcalPerEvtLaserAnalyzer.h.

Referenced by analyze().

◆ _lastsample

unsigned int EcalPerEvtLaserAnalyzer::_lastsample
private

Definition at line 52 of file EcalPerEvtLaserAnalyzer.h.

Referenced by endJob().

◆ _lastsamplePN

unsigned int EcalPerEvtLaserAnalyzer::_lastsamplePN
private

Definition at line 58 of file EcalPerEvtLaserAnalyzer.h.

Referenced by analyze().

◆ _niter

unsigned int EcalPerEvtLaserAnalyzer::_niter
private

Definition at line 61 of file EcalPerEvtLaserAnalyzer.h.

Referenced by endJob().

◆ _nsamples

unsigned int EcalPerEvtLaserAnalyzer::_nsamples
private

Definition at line 49 of file EcalPerEvtLaserAnalyzer.h.

Referenced by analyze(), and endJob().

◆ _nsamplesPN

unsigned int EcalPerEvtLaserAnalyzer::_nsamplesPN
private

Definition at line 55 of file EcalPerEvtLaserAnalyzer.h.

Referenced by analyze().

◆ _presample

unsigned int EcalPerEvtLaserAnalyzer::_presample
private

Definition at line 50 of file EcalPerEvtLaserAnalyzer.h.

Referenced by analyze().

◆ _presamplePN

unsigned int EcalPerEvtLaserAnalyzer::_presamplePN
private

Definition at line 56 of file EcalPerEvtLaserAnalyzer.h.

Referenced by analyze().

◆ _samplemax

unsigned int EcalPerEvtLaserAnalyzer::_samplemax
private

Definition at line 54 of file EcalPerEvtLaserAnalyzer.h.

◆ _samplemin

unsigned int EcalPerEvtLaserAnalyzer::_samplemin
private

Definition at line 53 of file EcalPerEvtLaserAnalyzer.h.

◆ _timingcuthigh

unsigned int EcalPerEvtLaserAnalyzer::_timingcuthigh
private

Definition at line 60 of file EcalPerEvtLaserAnalyzer.h.

Referenced by analyze().

◆ _timingcutlow

unsigned int EcalPerEvtLaserAnalyzer::_timingcutlow
private

Definition at line 59 of file EcalPerEvtLaserAnalyzer.h.

Referenced by analyze().

◆ _tower

unsigned int EcalPerEvtLaserAnalyzer::_tower
private

Definition at line 63 of file EcalPerEvtLaserAnalyzer.h.

Referenced by analyze(), and endJob().

◆ adc

double EcalPerEvtLaserAnalyzer::adc[10]
private

Definition at line 130 of file EcalPerEvtLaserAnalyzer.h.

Referenced by analyze(), beginJob(), and endJob().

◆ ADCfile

std::string EcalPerEvtLaserAnalyzer::ADCfile
private

Definition at line 78 of file EcalPerEvtLaserAnalyzer.h.

Referenced by beginJob(), and endJob().

◆ ADCFile

TFile* EcalPerEvtLaserAnalyzer::ADCFile
private

Definition at line 111 of file EcalPerEvtLaserAnalyzer.h.

Referenced by beginJob(), and endJob().

◆ adcG

int EcalPerEvtLaserAnalyzer::adcG[10]
private

Definition at line 131 of file EcalPerEvtLaserAnalyzer.h.

Referenced by analyze().

◆ ADCtrees

TTree* EcalPerEvtLaserAnalyzer::ADCtrees
private

Definition at line 112 of file EcalPerEvtLaserAnalyzer.h.

Referenced by analyze(), beginJob(), and endJob().

◆ alphafile

std::string EcalPerEvtLaserAnalyzer::alphafile
private

Definition at line 77 of file EcalPerEvtLaserAnalyzer.h.

◆ apdAmpl

double EcalPerEvtLaserAnalyzer::apdAmpl
private

Definition at line 136 of file EcalPerEvtLaserAnalyzer.h.

Referenced by endJob().

◆ APDfile

std::string EcalPerEvtLaserAnalyzer::APDfile
private

Definition at line 79 of file EcalPerEvtLaserAnalyzer.h.

◆ APDFile

TFile* EcalPerEvtLaserAnalyzer::APDFile
private

Definition at line 114 of file EcalPerEvtLaserAnalyzer.h.

Referenced by endJob().

◆ apdTime

double EcalPerEvtLaserAnalyzer::apdTime
private

Definition at line 137 of file EcalPerEvtLaserAnalyzer.h.

Referenced by endJob().

◆ APDtrees

TTree* EcalPerEvtLaserAnalyzer::APDtrees
private

Definition at line 116 of file EcalPerEvtLaserAnalyzer.h.

Referenced by endJob().

◆ channelNumber

int EcalPerEvtLaserAnalyzer::channelNumber
private

Definition at line 103 of file EcalPerEvtLaserAnalyzer.h.

Referenced by analyze(), and endJob().

◆ colMat

int EcalPerEvtLaserAnalyzer::colMat
private

Definition at line 123 of file EcalPerEvtLaserAnalyzer.h.

Referenced by analyze().

◆ color

int EcalPerEvtLaserAnalyzer::color
private

◆ colors

std::vector<int> EcalPerEvtLaserAnalyzer::colors
private

Definition at line 105 of file EcalPerEvtLaserAnalyzer.h.

◆ dccID

int EcalPerEvtLaserAnalyzer::dccID
private

Definition at line 99 of file EcalPerEvtLaserAnalyzer.h.

Referenced by analyze(), beginJob(), and endJob().

◆ digiCollection_

std::string EcalPerEvtLaserAnalyzer::digiCollection_
private

Definition at line 69 of file EcalPerEvtLaserAnalyzer.h.

Referenced by analyze(), and EcalPerEvtLaserAnalyzer().

◆ digiPNCollection_

std::string EcalPerEvtLaserAnalyzer::digiPNCollection_
private

Definition at line 70 of file EcalPerEvtLaserAnalyzer.h.

Referenced by analyze(), and EcalPerEvtLaserAnalyzer().

◆ digiProducer_

std::string EcalPerEvtLaserAnalyzer::digiProducer_
private

Definition at line 71 of file EcalPerEvtLaserAnalyzer.h.

Referenced by analyze(), and EcalPerEvtLaserAnalyzer().

◆ doesRefFileExist

int EcalPerEvtLaserAnalyzer::doesRefFileExist
private

Definition at line 118 of file EcalPerEvtLaserAnalyzer.h.

Referenced by analyze().

◆ eta

int EcalPerEvtLaserAnalyzer::eta
private

◆ event

int EcalPerEvtLaserAnalyzer::event
private

◆ eventHeaderCollection_

std::string EcalPerEvtLaserAnalyzer::eventHeaderCollection_
private

Definition at line 72 of file EcalPerEvtLaserAnalyzer.h.

Referenced by analyze(), and EcalPerEvtLaserAnalyzer().

◆ eventHeaderProducer_

std::string EcalPerEvtLaserAnalyzer::eventHeaderProducer_
private

Definition at line 73 of file EcalPerEvtLaserAnalyzer.h.

Referenced by analyze(), and EcalPerEvtLaserAnalyzer().

◆ evtMat

int EcalPerEvtLaserAnalyzer::evtMat
private

Definition at line 123 of file EcalPerEvtLaserAnalyzer.h.

Referenced by analyze().

◆ fedID

int EcalPerEvtLaserAnalyzer::fedID
private

Definition at line 100 of file EcalPerEvtLaserAnalyzer.h.

Referenced by analyze().

◆ header

TTree* EcalPerEvtLaserAnalyzer::header[2]
private

Definition at line 115 of file EcalPerEvtLaserAnalyzer.h.

Referenced by endJob().

◆ iEvent

int EcalPerEvtLaserAnalyzer::iEvent
private

Definition at line 45 of file EcalPerEvtLaserAnalyzer.h.

Referenced by analyze().

◆ IsFileCreated

int EcalPerEvtLaserAnalyzer::IsFileCreated
private

Definition at line 89 of file EcalPerEvtLaserAnalyzer.h.

Referenced by analyze(), and beginJob().

◆ IsHeaderFilled

int EcalPerEvtLaserAnalyzer::IsHeaderFilled[nColor]
private

Definition at line 120 of file EcalPerEvtLaserAnalyzer.h.

Referenced by endJob().

◆ IsThereDataADC

int EcalPerEvtLaserAnalyzer::IsThereDataADC[nColor]
private

Definition at line 119 of file EcalPerEvtLaserAnalyzer.h.

Referenced by endJob().

◆ lightside

int EcalPerEvtLaserAnalyzer::lightside
private

Definition at line 101 of file EcalPerEvtLaserAnalyzer.h.

Referenced by analyze().

◆ matacqFile

TFile* EcalPerEvtLaserAnalyzer::matacqFile
private

Definition at line 108 of file EcalPerEvtLaserAnalyzer.h.

Referenced by analyze().

◆ matacqTree

TTree* EcalPerEvtLaserAnalyzer::matacqTree
private

Definition at line 109 of file EcalPerEvtLaserAnalyzer.h.

Referenced by analyze().

◆ nCh

unsigned int EcalPerEvtLaserAnalyzer::nCh
private

Definition at line 93 of file EcalPerEvtLaserAnalyzer.h.

Referenced by beginJob().

◆ nCrys

unsigned int EcalPerEvtLaserAnalyzer::nCrys
private

Definition at line 85 of file EcalPerEvtLaserAnalyzer.h.

Referenced by analyze(), beginJob(), and EcalPerEvtLaserAnalyzer().

◆ nSides

unsigned int EcalPerEvtLaserAnalyzer::nSides
private

Definition at line 87 of file EcalPerEvtLaserAnalyzer.h.

◆ nTT

unsigned int EcalPerEvtLaserAnalyzer::nTT
private

Definition at line 86 of file EcalPerEvtLaserAnalyzer.h.

Referenced by EcalPerEvtLaserAnalyzer().

◆ peak

double EcalPerEvtLaserAnalyzer::peak
private

Definition at line 122 of file EcalPerEvtLaserAnalyzer.h.

Referenced by analyze(), beginJob(), and endJob().

◆ peakMat

double EcalPerEvtLaserAnalyzer::peakMat
private

Definition at line 122 of file EcalPerEvtLaserAnalyzer.h.

Referenced by analyze().

◆ phi

int EcalPerEvtLaserAnalyzer::phi
private

◆ pn

double EcalPerEvtLaserAnalyzer::pn[50]
private

Definition at line 135 of file EcalPerEvtLaserAnalyzer.h.

Referenced by analyze().

◆ pn0

double EcalPerEvtLaserAnalyzer::pn0
private

Definition at line 134 of file EcalPerEvtLaserAnalyzer.h.

Referenced by analyze(), beginJob(), and endJob().

◆ pn1

double EcalPerEvtLaserAnalyzer::pn1
private

Definition at line 134 of file EcalPerEvtLaserAnalyzer.h.

Referenced by analyze(), beginJob(), and endJob().

◆ pnAmpl

double EcalPerEvtLaserAnalyzer::pnAmpl
private

Definition at line 138 of file EcalPerEvtLaserAnalyzer.h.

Referenced by analyze().

◆ refalphabeta_

std::string EcalPerEvtLaserAnalyzer::refalphabeta_
private

Definition at line 68 of file EcalPerEvtLaserAnalyzer.h.

Referenced by EcalPerEvtLaserAnalyzer(), and endJob().

◆ resdir_

std::string EcalPerEvtLaserAnalyzer::resdir_
private

Definition at line 67 of file EcalPerEvtLaserAnalyzer.h.

Referenced by analyze(), beginJob(), and EcalPerEvtLaserAnalyzer().

◆ resfile

std::string EcalPerEvtLaserAnalyzer::resfile
private

Definition at line 80 of file EcalPerEvtLaserAnalyzer.h.

Referenced by analyze(), and endJob().

◆ runNum

int EcalPerEvtLaserAnalyzer::runNum
private

Definition at line 98 of file EcalPerEvtLaserAnalyzer.h.

Referenced by analyze().

◆ runType

int EcalPerEvtLaserAnalyzer::runType
private

Definition at line 97 of file EcalPerEvtLaserAnalyzer.h.

Referenced by analyze().

◆ tt

double EcalPerEvtLaserAnalyzer::tt
private

Definition at line 132 of file EcalPerEvtLaserAnalyzer.h.

◆ ttMat

double EcalPerEvtLaserAnalyzer::ttMat
private

Definition at line 122 of file EcalPerEvtLaserAnalyzer.h.

Referenced by analyze().

◆ ttrig

double EcalPerEvtLaserAnalyzer::ttrig
private

Definition at line 133 of file EcalPerEvtLaserAnalyzer.h.

Referenced by analyze(), beginJob(), and endJob().

EcalPerEvtLaserAnalyzer::_fedid
int _fedid
Definition: EcalPerEvtLaserAnalyzer.h:62
edm::ESHandle::product
T const * product() const
Definition: ESHandle.h:86
EcalElectronicsMapping
Definition: EcalElectronicsMapping.h:28
NCRYSEE
#define NCRYSEE
Definition: EcalABAnalyzer.h:33
EcalPerEvtLaserAnalyzer::iEvent
int iEvent
Definition: EcalPerEvtLaserAnalyzer.h:45
EcalPerEvtLaserAnalyzer::resfile
std::string resfile
Definition: EcalPerEvtLaserAnalyzer.h:80
mps_fire.i
i
Definition: mps_fire.py:428
edm::SortedCollection::const_iterator
std::vector< T >::const_iterator const_iterator
Definition: SortedCollection.h:80
colors
Definition: colors.py:1
EcalPerEvtLaserAnalyzer::resdir_
std::string resdir_
Definition: EcalPerEvtLaserAnalyzer.h:67
NTTEE
#define NTTEE
Definition: EcalPerEvtLaserAnalyzer.h:30
edm::Handle::product
T const * product() const
Definition: Handle.h:70
TPNFit
Definition: TPNFit.h:6
TkAlMuonSelectors_cfi.cut
cut
Definition: TkAlMuonSelectors_cfi.py:5
edm::DataFrameContainer::const_iterator
boost::transform_iterator< IterHelp, boost::counting_iterator< int > > const_iterator
Definition: DataFrameContainer.h:61
MEEBGeom::electronic_channel
static int electronic_channel(EBLocalCoord ix, EBLocalCoord iy)
Definition: MEEBGeom.cc:326
EcalPerEvtLaserAnalyzer::_samplemax
unsigned int _samplemax
Definition: EcalPerEvtLaserAnalyzer.h:54
HLT_FULL_cff.beta
beta
Definition: HLT_FULL_cff.py:8686
EcalPerEvtLaserAnalyzer::_nsamplesPN
unsigned int _nsamplesPN
Definition: EcalPerEvtLaserAnalyzer.h:55
EBDetId
Definition: EBDetId.h:17
MEEEGeom::crystal
static int crystal(CrysCoord ix, CrysCoord iy)
Definition: MEEEGeom.cc:372
digitizers_cfi.strip
strip
Definition: digitizers_cfi.py:19
EBDataFrame
Definition: EBDataFrame.h:11
EcalPerEvtLaserAnalyzer::pnAmpl
double pnAmpl
Definition: EcalPerEvtLaserAnalyzer.h:138
EcalPerEvtLaserAnalyzer::pn1
double pn1
Definition: EcalPerEvtLaserAnalyzer.h:134
gather_cfg.cout
cout
Definition: gather_cfg.py:144
EcalPerEvtLaserAnalyzer::_nsamples
unsigned int _nsamples
Definition: EcalPerEvtLaserAnalyzer.h:49
EcalPerEvtLaserAnalyzer::ttMat
double ttMat
Definition: EcalPerEvtLaserAnalyzer.h:122
CollectionTags_cfi.EBDigi
EBDigi
Definition: CollectionTags_cfi.py:27
EcalPerEvtLaserAnalyzer::eventHeaderProducer_
std::string eventHeaderProducer_
Definition: EcalPerEvtLaserAnalyzer.h:73
EcalPerEvtLaserAnalyzer::refalphabeta_
std::string refalphabeta_
Definition: EcalPerEvtLaserAnalyzer.h:68
cms::cuda::assert
assert(be >=bs)
EcalPerEvtLaserAnalyzer::ttrig
double ttrig
Definition: EcalPerEvtLaserAnalyzer.h:133
edm::SortedCollection
Definition: SortedCollection.h:49
EcalPerEvtLaserAnalyzer::runNum
int runNum
Definition: EcalPerEvtLaserAnalyzer.h:98
alpha
float alpha
Definition: AMPTWrapper.h:105
NTTEB
#define NTTEB
Definition: EcalPerEvtLaserAnalyzer.h:25
EcalPerEvtLaserAnalyzer::_presample
unsigned int _presample
Definition: EcalPerEvtLaserAnalyzer.h:50
EcalPerEvtLaserAnalyzer::color
int color
Definition: EcalPerEvtLaserAnalyzer.h:129
EcalPerEvtLaserAnalyzer::adc
double adc[10]
Definition: EcalPerEvtLaserAnalyzer.h:130
NCRYSEB
#define NCRYSEB
Definition: EcalABAnalyzer.h:30
edm::ParameterSet::getUntrackedParameter
T getUntrackedParameter(std::string const &, T const &) const
PulseFitWithFunction::init
virtual void init(int, int, int, int, double, double)
Definition: PulseFitWithFunction.cc:37
EcalPerEvtLaserAnalyzer::_firstsamplePN
unsigned int _firstsamplePN
Definition: EcalPerEvtLaserAnalyzer.h:57
hltPixelTracks_cff.chi2
chi2
Definition: hltPixelTracks_cff.py:25
EcalPerEvtLaserAnalyzer::adcG
int adcG[10]
Definition: EcalPerEvtLaserAnalyzer.h:131
MEEBGeom::pn
static std::pair< int, int > pn(int ilmmod)
Definition: MEEBGeom.cc:447
spr::find
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:19
EcalPerEvtLaserAnalyzer::channelNumber
int channelNumber
Definition: EcalPerEvtLaserAnalyzer.h:103
EcalPerEvtLaserAnalyzer::header
TTree * header[2]
Definition: EcalPerEvtLaserAnalyzer.h:115
edm::Handle
Definition: AssociativeIterator.h:50
EcalPerEvtLaserAnalyzer::digiCollection_
std::string digiCollection_
Definition: EcalPerEvtLaserAnalyzer.h:69
EcalPerEvtLaserAnalyzer::pn
double pn[50]
Definition: EcalPerEvtLaserAnalyzer.h:135
EcalElectronicsId::towerId
int towerId() const
get the tower id
Definition: EcalElectronicsId.h:33
LEDCalibrationChannels.iphi
iphi
Definition: LEDCalibrationChannels.py:64
EcalDCCHeaderBlock::LASER_GAP
Definition: EcalDCCHeaderBlock.h:42
EcalPerEvtLaserAnalyzer::_firstsample
unsigned int _firstsample
Definition: EcalPerEvtLaserAnalyzer.h:51
MEEBGeom::side
static int side(EBGlobalCoord ieta, EBGlobalCoord iphi)
Definition: MEEBGeom.cc:105
EcalPerEvtLaserAnalyzer::matacqFile
TFile * matacqFile
Definition: EcalPerEvtLaserAnalyzer.h:108
EcalPerEvtLaserAnalyzer::nSides
unsigned int nSides
Definition: EcalPerEvtLaserAnalyzer.h:87
EcalPerEvtLaserAnalyzer::_timingcutlow
unsigned int _timingcutlow
Definition: EcalPerEvtLaserAnalyzer.h:59
test
Definition: SmallWORMDict.h:13
EcalPerEvtLaserAnalyzer::iRed
Definition: EcalPerEvtLaserAnalyzer.h:42
EcalDCCHeaderBlock::LASER_STD
Definition: EcalDCCHeaderBlock.h:26
ctpps_dqm_sourceclient-live_cfg.test
test
Definition: ctpps_dqm_sourceclient-live_cfg.py:7
CollectionTags_cfi.EEDigi
EEDigi
Definition: CollectionTags_cfi.py:28
EcalElectronicsId::channelId
int channelId() const
so far for EndCap only :
Definition: EcalElectronicsId.cc:71
PulseFitWithFunction::getAmpl
double getAmpl()
Definition: PulseFitWithFunction.h:52
EcalPerEvtLaserAnalyzer::ADCfile
std::string ADCfile
Definition: EcalPerEvtLaserAnalyzer.h:78
edm::SortedCollection::begin
const_iterator begin() const
Definition: SortedCollection.h:262
EcalPerEvtLaserAnalyzer::_channel
unsigned int _channel
Definition: EcalPerEvtLaserAnalyzer.h:64
edm::ESHandle< EcalElectronicsMapping >
EcalElectronicsMapping::getElectronicsId
EcalElectronicsId getElectronicsId(const DetId &id) const
Get the electronics id for this det id.
Definition: EcalElectronicsMapping.cc:324
EcalPerEvtLaserAnalyzer::ADCFile
TFile * ADCFile
Definition: EcalPerEvtLaserAnalyzer.h:111
NSIDES
#define NSIDES
Definition: EcalLaserAnalyzer.h:44
dqmdumpme.k
k
Definition: dqmdumpme.py:60
EcalElectronicsId
Ecal readout channel identification [32:20] Unused (so far) [19:13] DCC id [12:6] tower [5:3] strip [...
Definition: EcalElectronicsId.h:18
MEEEGeom::pn
static std::pair< int, int > pn(int dee, int ilmod)
Definition: MEEEGeom.cc:574
EEDetId
Definition: EEDetId.h:14
EcalPerEvtLaserAnalyzer::IsHeaderFilled
int IsHeaderFilled[nColor]
Definition: EcalPerEvtLaserAnalyzer.h:120
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
EcalDCCHeaderBlock::EcalDCCEventSettings
Definition: EcalDCCHeaderBlock.h:64
cppFunctionSkipper.exception
exception
Definition: cppFunctionSkipper.py:10
LEDCalibrationChannels.ieta
ieta
Definition: LEDCalibrationChannels.py:63
TPNFit::getAmpl
double getAmpl()
Definition: TPNFit.h:32
EcalPerEvtLaserAnalyzer::iBlue
Definition: EcalPerEvtLaserAnalyzer.h:42
EcalPerEvtLaserAnalyzer::phi
int phi
Definition: EcalPerEvtLaserAnalyzer.h:127
EcalPerEvtLaserAnalyzer::APDFile
TFile * APDFile
Definition: EcalPerEvtLaserAnalyzer.h:114
EcalPerEvtLaserAnalyzer::matacqTree
TTree * matacqTree
Definition: EcalPerEvtLaserAnalyzer.h:109
EBDigiCollection
Definition: EcalDigiCollections.h:56
edm::SortedCollection::end
const_iterator end() const
Definition: SortedCollection.h:267
EcalPerEvtLaserAnalyzer::dccID
int dccID
Definition: EcalPerEvtLaserAnalyzer.h:99
EcalPerEvtLaserAnalyzer::pn0
double pn0
Definition: EcalPerEvtLaserAnalyzer.h:134
EEDigiCollection
Definition: EcalDigiCollections.h:69
EcalPerEvtLaserAnalyzer::apdAmpl
double apdAmpl
Definition: EcalPerEvtLaserAnalyzer.h:136
EcalPerEvtLaserAnalyzer::doesRefFileExist
int doesRefFileExist
Definition: EcalPerEvtLaserAnalyzer.h:118
EcalPerEvtLaserAnalyzer::nCrys
unsigned int nCrys
Definition: EcalPerEvtLaserAnalyzer.h:85
EcalPerEvtLaserAnalyzer::IsFileCreated
int IsFileCreated
Definition: EcalPerEvtLaserAnalyzer.h:89
PulseFitWithFunction::getTime
double getTime()
Definition: PulseFitWithFunction.h:53
Max
T Max(T a, T b)
Definition: MathUtil.h:44
EcalPerEvtLaserAnalyzer::digiProducer_
std::string digiProducer_
Definition: EcalPerEvtLaserAnalyzer.h:71
EcalPerEvtLaserAnalyzer::nColor
Definition: EcalPerEvtLaserAnalyzer.h:42
TPNFit::init
void init(int, int, int)
Definition: TPNFit.cc:24
EcalPerEvtLaserAnalyzer::APDtrees
TTree * APDtrees
Definition: EcalPerEvtLaserAnalyzer.h:116
EcalPerEvtLaserAnalyzer::eta
int eta
Definition: EcalPerEvtLaserAnalyzer.h:127
EcalPerEvtLaserAnalyzer::digiPNCollection_
std::string digiPNCollection_
Definition: EcalPerEvtLaserAnalyzer.h:70
get
#define get
EcalPerEvtLaserAnalyzer::_niter
unsigned int _niter
Definition: EcalPerEvtLaserAnalyzer.h:61
EcalMGPASample
Definition: EcalMGPASample.h:22
EcalPerEvtLaserAnalyzer::_ecalPart
std::string _ecalPart
Definition: EcalPerEvtLaserAnalyzer.h:65
EcalPerEvtLaserAnalyzer::evtMat
int evtMat
Definition: EcalPerEvtLaserAnalyzer.h:123
MEEEGeom::lmmod
static int lmmod(SuperCrysCoord iX, SuperCrysCoord iY)
Definition: MEEEGeom.cc:112
EcalPerEvtLaserAnalyzer::peakMat
double peakMat
Definition: EcalPerEvtLaserAnalyzer.h:122
EcalPerEvtLaserAnalyzer::_timingcuthigh
unsigned int _timingcuthigh
Definition: EcalPerEvtLaserAnalyzer.h:60
TPNFit::doFit
double doFit(int, double *)
Definition: TPNFit.cc:39
EcalPerEvtLaserAnalyzer::nCh
unsigned int nCh
Definition: EcalPerEvtLaserAnalyzer.h:93
EcalMappingRcd
Definition: EcalMappingRcd.h:15
hgcalPerformanceValidation.df
df
Definition: hgcalPerformanceValidation.py:733
PulseFitWithFunction
Definition: PulseFitWithFunction.h:26
EcalPerEvtLaserAnalyzer::IsThereDataADC
int IsThereDataADC[nColor]
Definition: EcalPerEvtLaserAnalyzer.h:119
EcalPerEvtLaserAnalyzer::colMat
int colMat
Definition: EcalPerEvtLaserAnalyzer.h:123
EcalDCCHeaderBlock::EcalDCCEventSettings::wavelength
short wavelength
Definition: EcalDCCHeaderBlock.h:67
EcalPerEvtLaserAnalyzer::ADCtrees
TTree * ADCtrees
Definition: EcalPerEvtLaserAnalyzer.h:112
PulseFitWithFunction::doFit
virtual double doFit(double *)
Definition: PulseFitWithFunction.cc:60
MEEBGeom::lmmod
static int lmmod(EBGlobalCoord ieta, EBGlobalCoord iphi)
Definition: MEEBGeom.cc:90
EcalPerEvtLaserAnalyzer::fedID
int fedID
Definition: EcalPerEvtLaserAnalyzer.h:100
ecaldqm::towerID
EcalLogicID towerID(EcalElectronicsId const &)
Definition: LogicIDTranslation.cc:37
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
EcalPerEvtLaserAnalyzer::_presamplePN
unsigned int _presamplePN
Definition: EcalPerEvtLaserAnalyzer.h:56
MEEBGeom::localCoord
static XYCoord localCoord(int icr)
Definition: MEEBGeom.cc:142
EcalPerEvtLaserAnalyzer::_lastsample
unsigned int _lastsample
Definition: EcalPerEvtLaserAnalyzer.h:52
EcalPerEvtLaserAnalyzer::lightside
int lightside
Definition: EcalPerEvtLaserAnalyzer.h:101
EcalPerEvtLaserAnalyzer::_samplemin
unsigned int _samplemin
Definition: EcalPerEvtLaserAnalyzer.h:53
EcalElectronicsId::stripId
int stripId() const
get the tower id
Definition: EcalElectronicsId.h:35
EcalPerEvtLaserAnalyzer::runType
int runType
Definition: EcalPerEvtLaserAnalyzer.h:97
c
auto & c
Definition: CAHitNtupletGeneratorKernelsImpl.h:46
event
Definition: event.py:1
EEDataFrame
Definition: EEDataFrame.h:12
EcalPerEvtLaserAnalyzer::_tower
unsigned int _tower
Definition: EcalPerEvtLaserAnalyzer.h:63
hfnoseParametersInitialization_cfi.name2
name2
Definition: hfnoseParametersInitialization_cfi.py:8
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
EcalPerEvtLaserAnalyzer::peak
double peak
Definition: EcalPerEvtLaserAnalyzer.h:122
EcalPerEvtLaserAnalyzer::eventHeaderCollection_
std::string eventHeaderCollection_
Definition: EcalPerEvtLaserAnalyzer.h:72
EcalPerEvtLaserAnalyzer::apdTime
double apdTime
Definition: EcalPerEvtLaserAnalyzer.h:137
RemoveAddSevLevel.flag
flag
Definition: RemoveAddSevLevel.py:116
EcalPerEvtLaserAnalyzer::_lastsamplePN
unsigned int _lastsamplePN
Definition: EcalPerEvtLaserAnalyzer.h:58
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37
EcalPerEvtLaserAnalyzer::nTT
unsigned int nTT
Definition: EcalPerEvtLaserAnalyzer.h:86