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::one::EDAnalyzer<> edm::one::EDAnalyzerBase edm::EDConsumerBase

Public Types

enum  VarCol { iBlue, iRed, nColor }
 
- Public Types inherited from edm::one::EDAnalyzerBase
typedef EDAnalyzerBase 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::one::EDAnalyzer<>
 EDAnalyzer ()=default
 
 EDAnalyzer (const EDAnalyzer &)=delete
 
SerialTaskQueueglobalLuminosityBlocksQueue () final
 
SerialTaskQueueglobalRunsQueue () final
 
const EDAnalyzeroperator= (const EDAnalyzer &)=delete
 
bool wantsGlobalLuminosityBlocks () const final
 
bool wantsGlobalRuns () const final
 
bool wantsInputProcessBlocks () const final
 
bool wantsProcessBlocks () const final
 
- Public Member Functions inherited from edm::one::EDAnalyzerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzerBase ()
 
ModuleDescription const & moduleDescription () const
 
bool wantsStreamLuminosityBlocks () const
 
bool wantsStreamRuns () const
 
 ~EDAnalyzerBase () 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 const &)=delete
 
 EDConsumerBase (EDConsumerBase &&)=default
 
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
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void selectInputProcessBlocks (ProductRegistry const &productRegistry, ProcessBlockHelperBase const &processBlockHelperBase)
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
void updateLookup (eventsetup::ESRecordsToProxyIndices const &)
 
virtual ~EDConsumerBase () noexcept(false)
 

Private Attributes

const unsigned int _channel
 
const std::string _ecalPart
 
const int _fedid
 
const unsigned int _firstsample
 
const unsigned int _firstsamplePN
 
const unsigned int _lastsample
 
const unsigned int _lastsamplePN
 
const unsigned int _niter
 
const unsigned int _nsamples
 
const unsigned int _nsamplesPN
 
const unsigned int _presample
 
const unsigned int _presamplePN
 
const unsigned int _timingcuthigh
 
const unsigned int _timingcutlow
 
const unsigned int _tower
 
double adc [10]
 
std::string ADCfile
 
TFile * ADCFile
 
int adcG [10]
 
TTree * ADCtrees
 
double apdAmpl
 
TFile * APDFile
 
double apdTime
 
TTree * APDtrees
 
int channelNumber
 
int colMat
 
int color
 
std::vector< int > colors
 
int dccID
 
const std::string digiCollection_
 
const std::string digiPNCollection_
 
const std::string digiProducer_
 
int doesRefFileExist
 
edm::EDGetTokenT< EBDigiCollectionebDigiToken_
 
edm::EDGetTokenT< EEDigiCollectioneeDigiToken_
 
int eta
 
int event
 
const std::string eventHeaderCollection_
 
const std::string eventHeaderProducer_
 
int evtMat
 
int fedID
 
TTree * header [2]
 
int iEvent
 
int IsFileCreated
 
int IsHeaderFilled [nColor]
 
int IsThereDataADC [nColor]
 
int lightside
 
const edm::ESGetToken< EcalElectronicsMapping, EcalMappingRcdmappingToken_
 
TFile * matacqFile
 
TTree * matacqTree
 
unsigned int nCrys
 
double peak
 
double peakMat
 
int phi
 
double pn [50]
 
double pn0
 
double pn1
 
double pnAmpl
 
const edm::EDGetTokenT< EcalPnDiodeDigiCollectionpnDiodeDigiToken_
 
const edm::EDGetTokenT< EcalRawDataCollectionrawDataToken_
 
const std::string refalphabeta_
 
const 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::one::EDAnalyzerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
template<BranchType B = InEvent>
EDConsumerBaseAdaptor< Bconsumes (edm::InputTag tag) noexcept
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
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<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
template<Transition Tr = Transition::Event>
constexpr auto esConsumes ()
 
template<Transition Tr = Transition::Event>
auto esConsumes (ESInputTag tag)
 
template<Transition Tr = Transition::Event>
ESGetTokenGeneric esConsumes (eventsetup::EventSetupRecordKey const &iRecord, eventsetup::DataKey const &iKey)
 Used with EventSetupRecord::doGet. More...
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
void resetItemsToGetFrom (BranchType iType)
 

Detailed Description

Definition at line 43 of file EcalPerEvtLaserAnalyzer.h.

Member Enumeration Documentation

◆ VarCol

Constructor & Destructor Documentation

◆ EcalPerEvtLaserAnalyzer()

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

Definition at line 36 of file EcalPerEvtLaserAnalyzer.cc.

References _ecalPart, digiCollection_, digiProducer_, ebDigiToken_, eeDigiToken_, HLT_2022v11_cff::InputTag, nCrys, NCRYSEB, and NCRYSEE.

38  : iEvent(0),
39  eventHeaderCollection_(iConfig.getParameter<std::string>("eventHeaderCollection")),
40  eventHeaderProducer_(iConfig.getParameter<std::string>("eventHeaderProducer")),
41  digiCollection_(iConfig.getParameter<std::string>("digiCollection")),
42  digiProducer_(iConfig.getParameter<std::string>("digiProducer")),
43  digiPNCollection_(iConfig.getParameter<std::string>("digiPNCollection")),
44  rawDataToken_(consumes<EcalRawDataCollection>(edm::InputTag(eventHeaderProducer_, eventHeaderCollection_))),
45  pnDiodeDigiToken_(consumes<EcalPnDiodeDigiCollection>(edm::InputTag(digiProducer_, digiPNCollection_))),
47  // framework parameters with default values
48  _nsamples(iConfig.getUntrackedParameter<unsigned int>("nSamples", 10)),
49  _presample(iConfig.getUntrackedParameter<unsigned int>("nPresamples", 3)),
50  _firstsample(iConfig.getUntrackedParameter<unsigned int>("firstSample", 1)),
51  _lastsample(iConfig.getUntrackedParameter<unsigned int>("lastSample", 2)),
52  _nsamplesPN(iConfig.getUntrackedParameter<unsigned int>("nSamplesPN", 50)),
53  _presamplePN(iConfig.getUntrackedParameter<unsigned int>("nPresamplesPN", 6)),
54  _firstsamplePN(iConfig.getUntrackedParameter<unsigned int>("firstSamplePN", 7)),
55  _lastsamplePN(iConfig.getUntrackedParameter<unsigned int>("lastSamplePN", 8)),
56  _timingcutlow(iConfig.getUntrackedParameter<unsigned int>("timingCutLow", 3)),
57  _timingcuthigh(iConfig.getUntrackedParameter<unsigned int>("timingCutHigh", 7)),
58  _niter(iConfig.getUntrackedParameter<unsigned int>("nIter", 3)),
59  _fedid(iConfig.getUntrackedParameter<unsigned int>("fedID", 0)),
60  _tower(iConfig.getUntrackedParameter<unsigned int>("tower", 1)),
61  _channel(iConfig.getUntrackedParameter<unsigned int>("channel", 1)),
62  _ecalPart(iConfig.getUntrackedParameter<std::string>("ecalPart", "EB")),
63  resdir_(iConfig.getUntrackedParameter<std::string>("resDir")),
64  refalphabeta_(iConfig.getUntrackedParameter<std::string>("refAlphaBeta")),
65  nCrys(NCRYSEB),
66  IsFileCreated(0),
67  runType(-1),
68  runNum(0),
69  dccID(-1),
70  lightside(2),
72  ttMat(-1),
73  peakMat(-1),
74  peak(-1),
75  evtMat(-1),
76  colMat(-1)
77 //========================================================================
78 
79 {
80  if (_ecalPart == "EB") {
81  ebDigiToken_ = consumes<EBDigiCollection>(edm::InputTag(digiProducer_, digiCollection_));
82  } else if (_ecalPart == "EE") {
83  eeDigiToken_ = consumes<EEDigiCollection>(edm::InputTag(digiProducer_, digiCollection_));
84  }
85 
86  // Define geometrical constants
87  //
88  if (_ecalPart == "EB") {
89  nCrys = NCRYSEB;
90  } else {
91  nCrys = NCRYSEE;
92  }
93 }
const std::string eventHeaderCollection_
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
edm::EDGetTokenT< EBDigiCollection > ebDigiToken_
#define NCRYSEE
const unsigned int _timingcuthigh
T getUntrackedParameter(std::string const &, T const &) const
#define NCRYSEB
const unsigned int _timingcutlow
const unsigned int _firstsamplePN
const std::string digiPNCollection_
const std::string eventHeaderProducer_
edm::EDGetTokenT< EEDigiCollection > eeDigiToken_
const edm::EDGetTokenT< EcalRawDataCollection > rawDataToken_
const edm::ESGetToken< EcalElectronicsMapping, EcalMappingRcd > mappingToken_
const unsigned int _lastsamplePN
const edm::EDGetTokenT< EcalPnDiodeDigiCollection > pnDiodeDigiToken_

◆ ~EcalPerEvtLaserAnalyzer()

EcalPerEvtLaserAnalyzer::~EcalPerEvtLaserAnalyzer ( )
override

Definition at line 96 of file EcalPerEvtLaserAnalyzer.cc.

96  {
97  //========================================================================
98 
99  // do anything here that needs to be done at desctruction time
100  // (e.g. close files, deallocate resources etc.)
101 }

Member Function Documentation

◆ analyze()

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

Implements edm::one::EDAnalyzerBase.

Definition at line 149 of file EcalPerEvtLaserAnalyzer.cc.

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, EcalElectronicsId::channelId(), channelNumber, colMat, color, MEEEGeom::crystal(), dccID, hgcalPerformanceValidation::df, digiCollection_, digiPNCollection_, doesRefFileExist, TPNFit::doFit(), MillePedeFileConverter_cfg::e, CollectionTags_cfi::EBDigi, ebDigiToken_, CollectionTags_cfi::EEDigi, eeDigiToken_, MEEBGeom::electronic_channel(), edm::SortedCollection< T, SORT >::end(), eta, eventHeaderCollection_, evtMat, fedID, spr::find(), TPNFit::getAmpl(), mps_fire::i, iEvent, TPNFit::init(), IsFileCreated, edm::HandleBase::isValid(), dqmdumpme::k, EcalDCCHeaderBlock::LASER_GAP, EcalDCCHeaderBlock::LASER_STD, lightside, MEEEGeom::lmmod(), MEEBGeom::lmmod(), MEEBGeom::localCoord(), mappingToken_, matacqFile, matacqTree, METSkim_cff::Max, callgraph::module, nCrys, peak, peakMat, phi, MEEBGeom::pn(), MEEEGeom::pn(), pn, pn0, pn1, pnAmpl, pnDiodeDigiToken_, edm::Handle< T >::product(), rawDataToken_, resdir_, resfile, runNum, runType, MEEBGeom::side(), digitizers_cfi::strip, EcalElectronicsId::stripId(), ctpps_dqm_sourceclient-live_cfg::test, ecaldqm::towerID(), EcalElectronicsId::towerId(), ttMat, ttrig, EcalDCCHeaderBlock::EcalDCCEventSettings::wavelength, and EcalElectronicsId::xtalId().

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

◆ beginJob()

void EcalPerEvtLaserAnalyzer::beginJob ( )
overridevirtual

Reimplemented from edm::one::EDAnalyzerBase.

Definition at line 104 of file EcalPerEvtLaserAnalyzer.cc.

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

104  {
105  //========================================================================
106 
107  // Define temporary files' names
108 
109  stringstream namefile1;
110  namefile1 << resdir_ << "/ADCSamples.root";
111 
112  ADCfile = namefile1.str();
113 
114  // Create temporary file and trees to save adc samples
115 
116  ADCFile = new TFile(ADCfile.c_str(), "RECREATE");
117 
118  stringstream name;
119  name << "ADCTree";
120 
121  ADCtrees = new TTree(name.str().c_str(), name.str().c_str());
122 
123  ADCtrees->Branch("iphi", &phi, "phi/I");
124  ADCtrees->Branch("ieta", &eta, "eta/I");
125  ADCtrees->Branch("dccID", &dccID, "dccID/I");
126  ADCtrees->Branch("event", &event, "event/I");
127  ADCtrees->Branch("color", &color, "color/I");
128  ADCtrees->Branch("adc", &adc, "adc[10]/D");
129  ADCtrees->Branch("ttrigMatacq", &ttrig, "ttrig/D");
130  ADCtrees->Branch("peakMatacq", &peak, "peak/D");
131  ADCtrees->Branch("pn0", &pn0, "pn0/D");
132  ADCtrees->Branch("pn1", &pn1, "pn1/D");
133 
134  ADCtrees->SetBranchAddress("ieta", &eta);
135  ADCtrees->SetBranchAddress("iphi", &phi);
136  ADCtrees->SetBranchAddress("dccID", &dccID);
137  ADCtrees->SetBranchAddress("event", &event);
138  ADCtrees->SetBranchAddress("color", &color);
139  ADCtrees->SetBranchAddress("adc", adc);
140  ADCtrees->SetBranchAddress("ttrigMatacq", &ttrig);
141  ADCtrees->SetBranchAddress("peakMatacq", &peak);
142  ADCtrees->SetBranchAddress("pn0", &pn0);
143  ADCtrees->SetBranchAddress("pn1", &pn1);
144 
145  IsFileCreated = 0;
146 }
Definition: event.py:1

◆ endJob()

void EcalPerEvtLaserAnalyzer::endJob ( void  )
overridevirtual

Reimplemented from edm::one::EDAnalyzerBase.

Definition at line 533 of file EcalPerEvtLaserAnalyzer.cc.

References _channel, _fedid, _firstsample, _lastsample, _niter, _nsamples, _tower, adc, ADCfile, ADCFile, ADCtrees, alpha, apdAmpl, APDFile, apdTime, APDtrees, cms::cuda::assert(), HLT_2022v11_cff::beta, channelNumber, hltPixelTracks_cff::chi2, color, PA_MinBiasSkim_cff::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().

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

Member Data Documentation

◆ _channel

const unsigned int EcalPerEvtLaserAnalyzer::_channel
private

Definition at line 84 of file EcalPerEvtLaserAnalyzer.h.

Referenced by analyze(), and endJob().

◆ _ecalPart

const std::string EcalPerEvtLaserAnalyzer::_ecalPart
private

Definition at line 85 of file EcalPerEvtLaserAnalyzer.h.

Referenced by analyze(), and EcalPerEvtLaserAnalyzer().

◆ _fedid

const int EcalPerEvtLaserAnalyzer::_fedid
private

Definition at line 82 of file EcalPerEvtLaserAnalyzer.h.

Referenced by analyze(), and endJob().

◆ _firstsample

const unsigned int EcalPerEvtLaserAnalyzer::_firstsample
private

Definition at line 73 of file EcalPerEvtLaserAnalyzer.h.

Referenced by endJob().

◆ _firstsamplePN

const unsigned int EcalPerEvtLaserAnalyzer::_firstsamplePN
private

Definition at line 77 of file EcalPerEvtLaserAnalyzer.h.

Referenced by analyze().

◆ _lastsample

const unsigned int EcalPerEvtLaserAnalyzer::_lastsample
private

Definition at line 74 of file EcalPerEvtLaserAnalyzer.h.

Referenced by endJob().

◆ _lastsamplePN

const unsigned int EcalPerEvtLaserAnalyzer::_lastsamplePN
private

Definition at line 78 of file EcalPerEvtLaserAnalyzer.h.

Referenced by analyze().

◆ _niter

const unsigned int EcalPerEvtLaserAnalyzer::_niter
private

Definition at line 81 of file EcalPerEvtLaserAnalyzer.h.

Referenced by endJob().

◆ _nsamples

const unsigned int EcalPerEvtLaserAnalyzer::_nsamples
private

Definition at line 71 of file EcalPerEvtLaserAnalyzer.h.

Referenced by analyze(), and endJob().

◆ _nsamplesPN

const unsigned int EcalPerEvtLaserAnalyzer::_nsamplesPN
private

Definition at line 75 of file EcalPerEvtLaserAnalyzer.h.

Referenced by analyze().

◆ _presample

const unsigned int EcalPerEvtLaserAnalyzer::_presample
private

Definition at line 72 of file EcalPerEvtLaserAnalyzer.h.

Referenced by analyze().

◆ _presamplePN

const unsigned int EcalPerEvtLaserAnalyzer::_presamplePN
private

Definition at line 76 of file EcalPerEvtLaserAnalyzer.h.

Referenced by analyze().

◆ _timingcuthigh

const unsigned int EcalPerEvtLaserAnalyzer::_timingcuthigh
private

Definition at line 80 of file EcalPerEvtLaserAnalyzer.h.

Referenced by analyze().

◆ _timingcutlow

const unsigned int EcalPerEvtLaserAnalyzer::_timingcutlow
private

Definition at line 79 of file EcalPerEvtLaserAnalyzer.h.

Referenced by analyze().

◆ _tower

const unsigned int EcalPerEvtLaserAnalyzer::_tower
private

Definition at line 83 of file EcalPerEvtLaserAnalyzer.h.

Referenced by analyze(), and endJob().

◆ adc

double EcalPerEvtLaserAnalyzer::adc[10]
private

Definition at line 137 of file EcalPerEvtLaserAnalyzer.h.

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

◆ ADCfile

std::string EcalPerEvtLaserAnalyzer::ADCfile
private

Definition at line 92 of file EcalPerEvtLaserAnalyzer.h.

Referenced by beginJob(), and endJob().

◆ ADCFile

TFile* EcalPerEvtLaserAnalyzer::ADCFile
private

Definition at line 118 of file EcalPerEvtLaserAnalyzer.h.

Referenced by beginJob(), and endJob().

◆ adcG

int EcalPerEvtLaserAnalyzer::adcG[10]
private

Definition at line 138 of file EcalPerEvtLaserAnalyzer.h.

Referenced by analyze().

◆ ADCtrees

TTree* EcalPerEvtLaserAnalyzer::ADCtrees
private

Definition at line 119 of file EcalPerEvtLaserAnalyzer.h.

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

◆ apdAmpl

double EcalPerEvtLaserAnalyzer::apdAmpl
private

Definition at line 143 of file EcalPerEvtLaserAnalyzer.h.

Referenced by endJob().

◆ APDFile

TFile* EcalPerEvtLaserAnalyzer::APDFile
private

Definition at line 121 of file EcalPerEvtLaserAnalyzer.h.

Referenced by endJob().

◆ apdTime

double EcalPerEvtLaserAnalyzer::apdTime
private

Definition at line 144 of file EcalPerEvtLaserAnalyzer.h.

Referenced by endJob().

◆ APDtrees

TTree* EcalPerEvtLaserAnalyzer::APDtrees
private

Definition at line 123 of file EcalPerEvtLaserAnalyzer.h.

Referenced by endJob().

◆ channelNumber

int EcalPerEvtLaserAnalyzer::channelNumber
private

Definition at line 110 of file EcalPerEvtLaserAnalyzer.h.

Referenced by analyze(), and endJob().

◆ colMat

int EcalPerEvtLaserAnalyzer::colMat
private

Definition at line 130 of file EcalPerEvtLaserAnalyzer.h.

Referenced by analyze().

◆ color

int EcalPerEvtLaserAnalyzer::color
private

◆ colors

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

Definition at line 112 of file EcalPerEvtLaserAnalyzer.h.

◆ dccID

int EcalPerEvtLaserAnalyzer::dccID
private

Definition at line 106 of file EcalPerEvtLaserAnalyzer.h.

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

◆ digiCollection_

const std::string EcalPerEvtLaserAnalyzer::digiCollection_
private

Definition at line 59 of file EcalPerEvtLaserAnalyzer.h.

Referenced by analyze(), and EcalPerEvtLaserAnalyzer().

◆ digiPNCollection_

const std::string EcalPerEvtLaserAnalyzer::digiPNCollection_
private

Definition at line 61 of file EcalPerEvtLaserAnalyzer.h.

Referenced by analyze().

◆ digiProducer_

const std::string EcalPerEvtLaserAnalyzer::digiProducer_
private

Definition at line 60 of file EcalPerEvtLaserAnalyzer.h.

Referenced by EcalPerEvtLaserAnalyzer().

◆ doesRefFileExist

int EcalPerEvtLaserAnalyzer::doesRefFileExist
private

Definition at line 125 of file EcalPerEvtLaserAnalyzer.h.

Referenced by analyze().

◆ ebDigiToken_

edm::EDGetTokenT<EBDigiCollection> EcalPerEvtLaserAnalyzer::ebDigiToken_
private

Definition at line 64 of file EcalPerEvtLaserAnalyzer.h.

Referenced by analyze(), and EcalPerEvtLaserAnalyzer().

◆ eeDigiToken_

edm::EDGetTokenT<EEDigiCollection> EcalPerEvtLaserAnalyzer::eeDigiToken_
private

Definition at line 65 of file EcalPerEvtLaserAnalyzer.h.

Referenced by analyze(), and EcalPerEvtLaserAnalyzer().

◆ eta

int EcalPerEvtLaserAnalyzer::eta
private

◆ event

int EcalPerEvtLaserAnalyzer::event
private

◆ eventHeaderCollection_

const std::string EcalPerEvtLaserAnalyzer::eventHeaderCollection_
private

Definition at line 57 of file EcalPerEvtLaserAnalyzer.h.

Referenced by analyze().

◆ eventHeaderProducer_

const std::string EcalPerEvtLaserAnalyzer::eventHeaderProducer_
private

Definition at line 58 of file EcalPerEvtLaserAnalyzer.h.

◆ evtMat

int EcalPerEvtLaserAnalyzer::evtMat
private

Definition at line 130 of file EcalPerEvtLaserAnalyzer.h.

Referenced by analyze().

◆ fedID

int EcalPerEvtLaserAnalyzer::fedID
private

Definition at line 107 of file EcalPerEvtLaserAnalyzer.h.

Referenced by analyze().

◆ header

TTree* EcalPerEvtLaserAnalyzer::header[2]
private

Definition at line 122 of file EcalPerEvtLaserAnalyzer.h.

Referenced by endJob().

◆ iEvent

int EcalPerEvtLaserAnalyzer::iEvent
private

Definition at line 55 of file EcalPerEvtLaserAnalyzer.h.

Referenced by analyze().

◆ IsFileCreated

int EcalPerEvtLaserAnalyzer::IsFileCreated
private

Definition at line 100 of file EcalPerEvtLaserAnalyzer.h.

Referenced by analyze(), and beginJob().

◆ IsHeaderFilled

int EcalPerEvtLaserAnalyzer::IsHeaderFilled[nColor]
private

Definition at line 127 of file EcalPerEvtLaserAnalyzer.h.

Referenced by endJob().

◆ IsThereDataADC

int EcalPerEvtLaserAnalyzer::IsThereDataADC[nColor]
private

Definition at line 126 of file EcalPerEvtLaserAnalyzer.h.

Referenced by endJob().

◆ lightside

int EcalPerEvtLaserAnalyzer::lightside
private

Definition at line 108 of file EcalPerEvtLaserAnalyzer.h.

Referenced by analyze().

◆ mappingToken_

const edm::ESGetToken<EcalElectronicsMapping, EcalMappingRcd> EcalPerEvtLaserAnalyzer::mappingToken_
private

Definition at line 67 of file EcalPerEvtLaserAnalyzer.h.

Referenced by analyze().

◆ matacqFile

TFile* EcalPerEvtLaserAnalyzer::matacqFile
private

Definition at line 115 of file EcalPerEvtLaserAnalyzer.h.

Referenced by analyze().

◆ matacqTree

TTree* EcalPerEvtLaserAnalyzer::matacqTree
private

Definition at line 116 of file EcalPerEvtLaserAnalyzer.h.

Referenced by analyze().

◆ nCrys

unsigned int EcalPerEvtLaserAnalyzer::nCrys
private

Definition at line 98 of file EcalPerEvtLaserAnalyzer.h.

Referenced by analyze(), and EcalPerEvtLaserAnalyzer().

◆ peak

double EcalPerEvtLaserAnalyzer::peak
private

Definition at line 129 of file EcalPerEvtLaserAnalyzer.h.

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

◆ peakMat

double EcalPerEvtLaserAnalyzer::peakMat
private

Definition at line 129 of file EcalPerEvtLaserAnalyzer.h.

Referenced by analyze().

◆ phi

int EcalPerEvtLaserAnalyzer::phi
private

◆ pn

double EcalPerEvtLaserAnalyzer::pn[50]
private

Definition at line 142 of file EcalPerEvtLaserAnalyzer.h.

Referenced by analyze().

◆ pn0

double EcalPerEvtLaserAnalyzer::pn0
private

Definition at line 141 of file EcalPerEvtLaserAnalyzer.h.

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

◆ pn1

double EcalPerEvtLaserAnalyzer::pn1
private

Definition at line 141 of file EcalPerEvtLaserAnalyzer.h.

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

◆ pnAmpl

double EcalPerEvtLaserAnalyzer::pnAmpl
private

Definition at line 145 of file EcalPerEvtLaserAnalyzer.h.

Referenced by analyze().

◆ pnDiodeDigiToken_

const edm::EDGetTokenT<EcalPnDiodeDigiCollection> EcalPerEvtLaserAnalyzer::pnDiodeDigiToken_
private

Definition at line 66 of file EcalPerEvtLaserAnalyzer.h.

Referenced by analyze().

◆ rawDataToken_

const edm::EDGetTokenT<EcalRawDataCollection> EcalPerEvtLaserAnalyzer::rawDataToken_
private

Definition at line 63 of file EcalPerEvtLaserAnalyzer.h.

Referenced by analyze().

◆ refalphabeta_

const std::string EcalPerEvtLaserAnalyzer::refalphabeta_
private

Definition at line 88 of file EcalPerEvtLaserAnalyzer.h.

Referenced by endJob().

◆ resdir_

const std::string EcalPerEvtLaserAnalyzer::resdir_
private

Definition at line 87 of file EcalPerEvtLaserAnalyzer.h.

Referenced by analyze(), and beginJob().

◆ resfile

std::string EcalPerEvtLaserAnalyzer::resfile
private

Definition at line 93 of file EcalPerEvtLaserAnalyzer.h.

Referenced by analyze(), and endJob().

◆ runNum

int EcalPerEvtLaserAnalyzer::runNum
private

Definition at line 105 of file EcalPerEvtLaserAnalyzer.h.

Referenced by analyze().

◆ runType

int EcalPerEvtLaserAnalyzer::runType
private

Definition at line 104 of file EcalPerEvtLaserAnalyzer.h.

Referenced by analyze().

◆ tt

double EcalPerEvtLaserAnalyzer::tt
private

Definition at line 139 of file EcalPerEvtLaserAnalyzer.h.

◆ ttMat

double EcalPerEvtLaserAnalyzer::ttMat
private

Definition at line 129 of file EcalPerEvtLaserAnalyzer.h.

Referenced by analyze().

◆ ttrig

double EcalPerEvtLaserAnalyzer::ttrig
private

Definition at line 140 of file EcalPerEvtLaserAnalyzer.h.

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