CMS 3D CMS Logo

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

#include <EcalTestPulseAnalyzer.h>

Inheritance diagram for EcalTestPulseAnalyzer:
edm::one::EDAnalyzer<> edm::one::EDAnalyzerBase edm::EDConsumerBase

Public Member Functions

void analyze (const edm::Event &e, const edm::EventSetup &c) override
 
void beginJob () override
 
 EcalTestPulseAnalyzer (const edm::ParameterSet &iConfig)
 
void endJob () override
 
 ~EcalTestPulseAnalyzer () 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
 
ESResolverIndex const * esGetTokenIndices (edm::Transition iTrans) const
 
std::vector< ESResolverIndex > 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
 
void selectInputProcessBlocks (ProductRegistry const &productRegistry, ProcessBlockHelperBase const &processBlockHelperBase)
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
void updateLookup (eventsetup::ESRecordsToProductResolverIndices const &)
 
virtual ~EDConsumerBase () noexcept(false)
 

Private Attributes

const double _chi2max
 
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 _samplemax
 
const unsigned int _samplemin
 
const double _timeofmax
 
double adc [10]
 
double APD [6]
 
double apdAmpl
 
int apdGain
 
double apdTime
 
int channelID
 
int channelIteratorEE
 
std::map< int, int > channelMapEE
 
int dccID
 
std::vector< int > dccMEM
 
const std::string digiCollection_
 
const std::string digiPNCollection_
 
const std::string digiProducer_
 
edm::EDGetTokenT< EBDigiCollectionebDigiToken_
 
edm::EDGetTokenT< EEDigiCollectioneeDigiToken_
 
int eta
 
int event
 
const std::string eventHeaderCollection_
 
const std::string eventHeaderProducer_
 
int fedID
 
unsigned int firstChanMod [9]
 
int flag
 
int gain
 
int iChannelID [1700]
 
int idccID [1700]
 
int ieta
 
int iEta [1700]
 
int iEvent
 
unsigned int iModule [1700]
 
int iphi
 
int iPhi [1700]
 
unsigned int isFirstChanModFilled [9]
 
int iside [1700]
 
int iTowerID [1700]
 
int iZ
 
const edm::ESGetToken< EcalElectronicsMapping, EcalMappingRcdmappingToken_
 
int moduleID
 
std::vector< int > modules
 
unsigned int nCrys
 
unsigned int nGainAPD
 
unsigned int nGainPN
 
unsigned int nMod
 
TFile * outFile
 
int phi
 
double pn [50]
 
double PN [6]
 
double pnAmpl
 
double pnAmpl0
 
double pnAmpl1
 
const edm::EDGetTokenT< EcalPnDiodeDigiCollectionpnDiodeDigiToken_
 
int pnG
 
int pnGain
 
int pnID
 
const edm::EDGetTokenT< EcalRawDataCollectionrawDataToken_
 
const std::string resdir_
 
std::string resfile
 
TFile * resFile
 
TTree * respntrees
 
TTree * restrees
 
double ret_data [20]
 
std::string rootfile
 
int runNum
 
int runType
 
int side
 
int towerID
 
int TPEvents
 
TTree * trees [1700]
 

Additional Inherited Members

- Public Types inherited from edm::one::EDAnalyzerBase
typedef EDAnalyzerBase ModuleType
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- 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 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 44 of file EcalTestPulseAnalyzer.h.

Constructor & Destructor Documentation

◆ EcalTestPulseAnalyzer()

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

Definition at line 36 of file EcalTestPulseAnalyzer.cc.

References _ecalPart, _fedid, dccMEM, digiCollection_, digiProducer_, ebDigiToken_, eeDigiToken_, ProducerED_cfi::InputTag, iZ, ME::lmmodFromDcc(), ME::memFromDcc(), nCrys, NCRYSEB, NCRYSEE, and nMod.

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  _samplemin(iConfig.getUntrackedParameter<unsigned int>("sampleMin", 3)),
53  _samplemax(iConfig.getUntrackedParameter<unsigned int>("sampleMax", 9)),
54  _nsamplesPN(iConfig.getUntrackedParameter<unsigned int>("nSamplesPN", 50)),
55  _presamplePN(iConfig.getUntrackedParameter<unsigned int>("nPresamplesPN", 6)),
56  _firstsamplePN(iConfig.getUntrackedParameter<unsigned int>("firstSamplePN", 7)),
57  _lastsamplePN(iConfig.getUntrackedParameter<unsigned int>("lastSamplePN", 8)),
58  _niter(iConfig.getUntrackedParameter<unsigned int>("nIter", 3)),
59  _chi2max(iConfig.getUntrackedParameter<double>("chi2Max", 10.0)),
60  _timeofmax(iConfig.getUntrackedParameter<double>("timeOfMax", 4.5)),
61  _ecalPart(iConfig.getUntrackedParameter<std::string>("ecalPart", "EB")),
62  _fedid(iConfig.getUntrackedParameter<int>("fedID", -999)),
63  resdir_(iConfig.getUntrackedParameter<std::string>("resDir")),
64  nCrys(NCRYSEB),
65  nMod(NMODEB),
68  towerID(-1),
69  channelID(-1),
70  runType(-1),
71  runNum(0),
72  fedID(-1),
73  dccID(-1),
74  side(-1),
75  iZ(1),
76  phi(-1),
77  eta(-1),
78  event(0),
79  apdAmpl(0),
80  apdTime(0),
81  pnAmpl(0),
82  pnID(-1),
83  moduleID(-1),
85 
86 //========================================================================
87 
88 {
89  if (_ecalPart == "EB") {
90  ebDigiToken_ = consumes<EBDigiCollection>(edm::InputTag(digiProducer_, digiCollection_));
91  } else if (_ecalPart == "EE") {
92  eeDigiToken_ = consumes<EEDigiCollection>(edm::InputTag(digiProducer_, digiCollection_));
93  }
94 
95  // Define geometrical constants
96 
97  if (_ecalPart == "EB") {
98  nCrys = NCRYSEB;
99  } else {
100  nCrys = NCRYSEE;
101  }
102 
103  iZ = 1;
104  if (_fedid <= 609)
105  iZ = -1;
106 
109  nMod = modules.size();
110 }
const unsigned int _niter
static std::vector< ME::DCCid > memFromDcc(ME::DCCid idcc)
Definition: ME.cc:561
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
const unsigned int _presamplePN
const unsigned int _samplemax
#define NGAINPN
const std::string digiProducer_
#define NCRYSEE
const edm::EDGetTokenT< EcalPnDiodeDigiCollection > pnDiodeDigiToken_
const unsigned int _nsamplesPN
#define NGAINAPD
const edm::ESGetToken< EcalElectronicsMapping, EcalMappingRcd > mappingToken_
edm::EDGetTokenT< EBDigiCollection > ebDigiToken_
T getUntrackedParameter(std::string const &, T const &) const
#define NCRYSEB
#define NMODEB
const std::string eventHeaderCollection_
const std::string _ecalPart
const unsigned int _firstsample
const unsigned int _lastsample
const std::string digiCollection_
const unsigned int _nsamples
edm::EDGetTokenT< EEDigiCollection > eeDigiToken_
const unsigned int _lastsamplePN
const edm::EDGetTokenT< EcalRawDataCollection > rawDataToken_
const std::string eventHeaderProducer_
const std::string digiPNCollection_
const unsigned int _samplemin
const unsigned int _firstsamplePN
static std::vector< ME::LMMid > lmmodFromDcc(ME::DCCid idcc)
Definition: ME.cc:574
const unsigned int _presample

◆ ~EcalTestPulseAnalyzer()

EcalTestPulseAnalyzer::~EcalTestPulseAnalyzer ( )
override

Definition at line 113 of file EcalTestPulseAnalyzer.cc.

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

Member Function Documentation

◆ analyze()

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

Implements edm::one::EDAnalyzerBase.

Definition at line 194 of file EcalTestPulseAnalyzer.cc.

References _chi2max, _ecalPart, _fedid, _firstsample, _firstsamplePN, _lastsample, _lastsamplePN, _niter, _nsamples, _nsamplesPN, _presample, _presamplePN, _samplemax, _samplemin, _timeofmax, adc, apdAmpl, apdGain, apdTime, cms::cuda::assert(), edm::SortedCollection< T, SORT >::begin(), HltBtagPostValidation_cff::c, EcalElectronicsId::channelId(), channelID, channelIteratorEE, channelMapEE, nano_mu_local_reco_cff::chi2, dccID, dccMEM, hgcalPerformanceValidation::df, digiCollection_, TPNFit::doFit(), MillePedeFileConverter_cfg::e, CollectionTags_cfi::EBDigi, ebDigiToken_, CollectionTags_cfi::EEDigi, eeDigiToken_, MEEBGeom::electronic_channel(), edm::SortedCollection< T, SORT >::end(), eta, eventHeaderCollection_, fedID, firstChanMod, TSFit::fit_third_degree_polynomial(), TPNFit::getAmpl(), ecalpyutils::hashedIndex(), mps_fire::i, iChannelID, EcalPnDiodeDetId::iDCCId(), idccID, iEta, iEvent, iModule, TPNFit::init(), TSFit::init_errmat(), iPhi, isFirstChanModFilled, iside, edm::HandleBase::isValid(), iTowerID, iZ, dqmdumpme::k, MEEEGeom::lmmod(), MEEBGeom::lmmod(), MEEBGeom::localCoord(), mappingToken_, METSkim_cff::Max, callgraph::module, nCrys, phi, MEEBGeom::pn(), MEEEGeom::pn(), pn, pnAmpl, pnAmpl0, pnAmpl1, pnDiodeDigiToken_, pnG, PedestalClient_cfi::pngain, pnGain, edm::Handle< T >::product(), rawDataToken_, ret_data, runNum, runType, TSFit::set_params(), MEEBGeom::side(), MEEEGeom::side(), side, findQualityFiles::size, nano_mu_digi_cff::strip, EcalElectronicsId::stripId(), EcalDCCHeaderBlock::TESTPULSE_GAP, EcalDCCHeaderBlock::TESTPULSE_MGPA, EcalDCCHeaderBlock::TESTPULSE_SCAN_MEM, EcalElectronicsId::towerId(), towerID, TPEvents, trees, and EcalElectronicsId::xtalId().

194  {
195  //========================================================================
196 
197  ++iEvent;
198 
199  // Retrieve DCC header
201  const EcalRawDataCollection* DCCHeader = nullptr;
202  e.getByToken(rawDataToken_, pDCCHeader);
203  if (!pDCCHeader.isValid()) {
204  edm::LogError("nodata") << "Error! can't get the product retrieving DCC header" << eventHeaderCollection_.c_str();
205  } else {
206  DCCHeader = pDCCHeader.product();
207  }
208 
209  // retrieving crystal data from Event
211  const EBDigiCollection* EBDigi = nullptr;
213  const EEDigiCollection* EEDigi = nullptr;
214  if (_ecalPart == "EB") {
215  e.getByToken(ebDigiToken_, pEBDigi);
216  if (!pEBDigi.isValid()) {
217  edm::LogError("nodata") << "Error! can't get the product retrieving EB crystal data " << digiCollection_.c_str();
218  } else {
219  EBDigi = pEBDigi.product();
220  }
221  } else {
222  e.getByToken(eeDigiToken_, pEEDigi);
223  if (!pEEDigi.isValid()) {
224  edm::LogError("nodata") << "Error! can't get the product retrieving EE crystal data " << digiCollection_.c_str();
225  } else {
226  EEDigi = pEEDigi.product();
227  }
228  }
229 
230  // Retrieve crystal PN diodes from Event
232  const EcalPnDiodeDigiCollection* PNDigi = nullptr;
233  e.getByToken(pnDiodeDigiToken_, pPNDigi);
234  if (!pPNDigi.isValid()) {
235  edm::LogError("nodata") << "Error! can't get the product " << digiCollection_.c_str();
236  } else {
237  PNDigi = pPNDigi.product();
238  }
239 
240  // retrieving electronics mapping
241  const auto& TheMapping = c.getData(mappingToken_);
242  ;
243 
244  // ====================================
245  // Decode Basic DCCHeader Information
246  // ====================================
247 
248  for (EcalRawDataCollection::const_iterator headerItr = DCCHeader->begin(); headerItr != DCCHeader->end();
249  ++headerItr) {
250  int fed = headerItr->fedId();
251 
252  if (fed != _fedid && _fedid != -999)
253  continue;
254 
255  runType = headerItr->getRunType();
256  runNum = headerItr->getRunNumber();
257  event = headerItr->getLV1();
258 
259  dccID = headerItr->getDccInTCCCommand();
260  fedID = headerItr->fedId();
261 
262  if (600 + dccID != fedID)
263  continue;
264 
265  // Cut on runType
266 
269  return;
270  }
271 
272  // Cut on fedID
273 
274  if (fedID != _fedid && _fedid != -999)
275  return;
276 
277  // Count TP events
278  TPEvents++;
279 
280  // ======================
281  // Decode PN Information
282  // ======================
283 
284  TPNFit* pnfit = new TPNFit();
286 
287  double chi2pn = 0;
288  double ypnrange[50];
289  double dsum = 0.;
290  double dsum1 = 0.;
291  double bl = 0.;
292  double val_max = 0.;
293  int samplemax = 0;
294  unsigned int k;
295  int pnG[50];
296  int pngain = 0;
297 
298  std::map<int, std::vector<double> > allPNAmpl;
299  std::map<int, std::vector<int> > allPNGain;
300 
301  for (EcalPnDiodeDigiCollection::const_iterator pnItr = PNDigi->begin(); pnItr != PNDigi->end();
302  ++pnItr) { // Loop on PNs
303 
304  EcalPnDiodeDetId pnDetId = EcalPnDiodeDetId((*pnItr).id());
305 
306  bool isMemRelevant = false;
307  for (unsigned int imem = 0; imem < dccMEM.size(); imem++) {
308  if (pnDetId.iDCCId() == dccMEM[imem]) {
309  isMemRelevant = true;
310  }
311  }
312 
313  // skip mem dcc without relevant data
314  if (!isMemRelevant)
315  continue;
316 
317  for (int samId = 0; samId < (*pnItr).size(); samId++) { // Loop on PN samples
318  pn[samId] = (*pnItr).sample(samId).adc();
319  pnG[samId] = (*pnItr).sample(samId).gainId();
320 
321  if (pnG[samId] != 1)
322  edm::LogVerbatim("EcalTestPulseAnalyzer") << "PN gain different from 1 for sample " << samId;
323  if (samId == 0)
324  pngain = pnG[samId];
325  if (samId > 0)
326  pngain = TMath::Max(pnG[samId], pngain);
327  }
328 
329  for (dsum = 0., k = 0; k < _presamplePN; k++) {
330  dsum += pn[k];
331  }
332  bl = dsum / ((double)_presamplePN);
333 
334  for (val_max = 0., k = 0; k < _nsamplesPN; k++) {
335  ypnrange[k] = pn[k] - bl;
336 
337  if (ypnrange[k] > val_max) {
338  val_max = ypnrange[k];
339  samplemax = k;
340  }
341  }
342 
343  chi2pn = pnfit->doFit(samplemax, &ypnrange[0]);
344 
345  if (chi2pn == 101 || chi2pn == 102 || chi2pn == 103)
346  pnAmpl = 0.;
347  else
348  pnAmpl = pnfit->getAmpl();
349 
350  allPNAmpl[pnDetId.iDCCId()].push_back(pnAmpl);
351  allPNGain[pnDetId.iDCCId()].push_back(pngain);
352  }
353 
354  // ===========================
355  // Decode EBDigis Information
356  // ===========================
357 
358  TSFit* pstpfit = new TSFit(_nsamples, 650);
359  pstpfit->set_params(
361  pstpfit->init_errmat(10.);
362 
363  double chi2 = 0;
364  double yrange[10];
365  int adcgain = 0;
366  int adcG[10];
367 
368  if (EBDigi) {
369  for (EBDigiCollection::const_iterator digiItr = EBDigi->begin(); digiItr != EBDigi->end();
370  ++digiItr) { // Loop on EB crystals
371 
372  EBDetId id_crystal(digiItr->id());
373  EBDataFrame df(*digiItr);
374 
375  int etaG = id_crystal.ieta(); // global
376  int phiG = id_crystal.iphi(); // global
377 
378  int etaL; // local
379  int phiL; // local
380  std::pair<int, int> LocalCoord = MEEBGeom::localCoord(etaG, phiG);
381 
382  etaL = LocalCoord.first;
383  phiL = LocalCoord.second;
384 
385  eta = etaG;
386  phi = phiG;
387 
388  side = MEEBGeom::side(etaG, phiG);
389 
390  EcalElectronicsId elecid_crystal = TheMapping.getElectronicsId(id_crystal);
391 
392  towerID = elecid_crystal.towerId();
393  int strip = elecid_crystal.stripId();
394  int xtal = elecid_crystal.xtalId();
395  channelID = 5 * (strip - 1) + xtal - 1; // FIXME
396 
397  int module = MEEBGeom::lmmod(etaG, phiG);
398  int iMod = module - 1;
399 
400  assert(module >= *min_element(modules.begin(), modules.end()) &&
401  module <= *max_element(modules.begin(), modules.end()));
402 
403  std::pair<int, int> pnpair = MEEBGeom::pn(module);
404  unsigned int MyPn0 = pnpair.first;
405  unsigned int MyPn1 = pnpair.second;
406 
407  unsigned int channel = MEEBGeom::electronic_channel(etaL, phiL);
408 
409  if (isFirstChanModFilled[iMod] == 0) {
410  firstChanMod[iMod] = channel;
411  isFirstChanModFilled[iMod] = 1;
412  }
413 
414  iEta[channel] = eta;
415  iPhi[channel] = phi;
416  iModule[channel] = module;
417  iTowerID[channel] = towerID;
418  iChannelID[channel] = channelID;
419  idccID[channel] = dccID;
420  iside[channel] = side;
421 
422  // get adc samples
423  //====================
424 
425  for (unsigned int i = 0; i < (*digiItr).size(); ++i) {
426  EcalMGPASample samp_crystal(df.sample(i));
427  adc[i] = samp_crystal.adc();
428  adcG[i] = samp_crystal.gainId();
429 
430  if (i == 0)
431  adcgain = adcG[i];
432  if (i > 0)
433  adcgain = TMath::Max(adcG[i], adcgain);
434  }
435  // Remove pedestal
436  //====================
437  for (dsum = 0., dsum1 = 0., k = 0; k < _presample; k++) {
438  dsum += adc[k];
439  if (k < _presample - 1)
440  dsum1 += adc[k];
441  }
442 
443  bl = dsum / ((double)_presample);
444 
445  for (val_max = 0., k = 0; k < _nsamples; k++) {
446  yrange[k] = adc[k] - bl;
447  if (yrange[k] > val_max) {
448  val_max = yrange[k];
449  }
450  }
451 
452  apdGain = adcgain;
453 
454  if (allPNAmpl[dccMEM[0]].size() > MyPn0)
455  pnAmpl0 = allPNAmpl[dccMEM[0]][MyPn0];
456  else
457  pnAmpl0 = 0;
458  if (allPNAmpl[dccMEM[0]].size() > MyPn1)
459  pnAmpl1 = allPNAmpl[dccMEM[0]][MyPn1];
460  else
461  pnAmpl1 = 0;
462 
463  if (allPNGain[dccMEM[0]].size() > MyPn0)
464  pnGain = allPNGain[dccMEM[0]][MyPn0];
465  else
466  pnGain = 0;
467 
468  // Perform the fit on apd samples
469  //================================
470 
471  chi2 = pstpfit->fit_third_degree_polynomial(&yrange[0], ret_data);
472 
473  //Retrieve APD amplitude from fit
474  //================================
475 
476  if (val_max > 100000. || chi2 < 0. || chi2 == 102) {
477  apdAmpl = 0;
478  apdTime = 0;
479 
480  } else {
481  apdAmpl = ret_data[0];
482  apdTime = ret_data[1];
483  }
484 
485  trees[channel]->Fill();
486  }
487 
488  } else {
489  for (EEDigiCollection::const_iterator digiItr = EEDigi->begin(); digiItr != EEDigi->end();
490  ++digiItr) { // Loop on EE crystals
491 
492  EEDetId id_crystal(digiItr->id());
493  EEDataFrame df(*digiItr);
494 
495  phi = id_crystal.ix();
496  eta = id_crystal.iy();
497 
498  int iX = (phi - 1) / 5 + 1;
499  int iY = (eta - 1) / 5 + 1;
500 
501  side = MEEEGeom::side(iX, iY, iZ);
502 
503  // Recover the TT id and the electronic crystal numbering from EcalElectronicsMapping
504 
505  EcalElectronicsId elecid_crystal = TheMapping.getElectronicsId(id_crystal);
506 
507  towerID = elecid_crystal.towerId();
508  channelID = elecid_crystal.channelId() - 1;
509 
510  int module = MEEEGeom::lmmod(iX, iY);
511  if (module >= 18 && side == 1)
512  module += 2; // Trick to fix endcap specificity
513  int iMod = module - 1;
514 
515  assert(module >= *min_element(modules.begin(), modules.end()) &&
516  module <= *max_element(modules.begin(), modules.end()));
517 
518  std::pair<int, int> pnpair = MEEEGeom::pn(module, _fedid);
519 
520  unsigned int MyPn0 = pnpair.first;
521  unsigned int MyPn1 = pnpair.second;
522 
523  int hashedIndex = 100000 * eta + phi;
524 
525  if (channelMapEE.count(hashedIndex) == 0) {
528  }
529 
530  unsigned int channel = channelMapEE[hashedIndex];
531 
532  if (isFirstChanModFilled[iMod] == 0) {
533  firstChanMod[iMod] = channel;
534  isFirstChanModFilled[iMod] = 1;
535  }
536 
537  iEta[channel] = eta;
538  iPhi[channel] = phi;
539  iModule[channel] = module;
540  iTowerID[channel] = towerID;
541  iChannelID[channel] = channelID;
542  idccID[channel] = dccID;
543  iside[channel] = side;
544 
545  assert(channel < nCrys);
546 
547  // Get adc samples
548  //====================
549 
550  for (unsigned int i = 0; i < (*digiItr).size(); ++i) {
551  EcalMGPASample samp_crystal(df.sample(i));
552  adc[i] = samp_crystal.adc();
553  adcG[i] = samp_crystal.gainId();
554 
555  if (i == 0)
556  adcgain = adcG[i];
557  if (i > 0)
558  adcgain = TMath::Max(adcG[i], adcgain);
559  }
560 
561  // Remove pedestal
562  //====================
563  for (dsum = 0., dsum1 = 0., k = 0; k < _presample; k++) {
564  dsum += adc[k];
565  if (k < _presample - 1)
566  dsum1 += adc[k];
567  }
568 
569  bl = dsum / ((double)_presample);
570 
571  for (val_max = 0., k = 0; k < _nsamples; k++) {
572  yrange[k] = adc[k] - bl;
573  if (yrange[k] > val_max) {
574  val_max = yrange[k];
575  }
576  }
577  apdGain = adcgain;
578 
579  int dccMEMIndex = 0;
580  if (side == 1)
581  dccMEMIndex += 2; // Trick to fix endcap specificity
582 
583  if (allPNAmpl[dccMEM[dccMEMIndex]].size() > MyPn0)
584  pnAmpl0 = allPNAmpl[dccMEM[dccMEMIndex]][MyPn0];
585  else
586  pnAmpl0 = 0;
587  if (allPNAmpl[dccMEM[dccMEMIndex + 1]].size() > MyPn1)
588  pnAmpl1 = allPNAmpl[dccMEM[dccMEMIndex + 1]][MyPn1];
589  else
590  pnAmpl1 = 0;
591 
592  if (allPNGain[dccMEM[dccMEMIndex]].size() > MyPn0)
593  pnGain = allPNGain[dccMEM[dccMEMIndex]][MyPn0];
594  else
595  pnGain = 0;
596 
597  // Perform the fit on apd samples
598  //=================================
599 
600  chi2 = pstpfit->fit_third_degree_polynomial(&yrange[0], ret_data);
601 
602  //Retrieve APD amplitude from fit
603  //=================================
604 
605  if (val_max > 100000. || chi2 < 0. || chi2 == 102) {
606  apdAmpl = 0;
607  apdTime = 0;
608 
609  } else {
610  apdAmpl = ret_data[0];
611  apdTime = ret_data[1];
612  }
613 
614  trees[channel]->Fill();
615  }
616  }
617 
618 } // end of analyze
size
Write out results.
const unsigned int _niter
Log< level::Info, true > LogVerbatim
static XYCoord localCoord(int icr)
Definition: MEEBGeom.cc:142
std::map< int, int > channelMapEE
static int lmmod(SuperCrysCoord iX, SuperCrysCoord iY)
Definition: MEEEGeom.cc:112
unsigned int iModule[1700]
const unsigned int _presamplePN
const unsigned int _samplemax
Ecal readout channel identification [32:20] Unused (so far) [19:13] DCC id [12:6] tower [5:3] strip [...
static int side(SuperCrysCoord iX, SuperCrysCoord iY, int iz)
Definition: MEEEGeom.cc:1155
T const * product() const
Definition: Handle.h:70
std::vector< T >::const_iterator const_iterator
const edm::EDGetTokenT< EcalPnDiodeDigiCollection > pnDiodeDigiToken_
const unsigned int _nsamplesPN
void init(int, int, int)
Definition: TPNFit.cc:24
const edm::ESGetToken< EcalElectronicsMapping, EcalMappingRcd > mappingToken_
Log< level::Error, false > LogError
assert(be >=bs)
edm::EDGetTokenT< EBDigiCollection > ebDigiToken_
double fit_third_degree_polynomial(double *, double *)
Definition: TSFit.cc:255
static std::pair< int, int > pn(int ilmmod)
Definition: MEEBGeom.cc:447
int hashedIndex(int ieta, int iphi)
Definition: EcalPyUtils.cc:36
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
int towerId() const
get the tower id
const std::string eventHeaderCollection_
const std::string _ecalPart
void init_errmat(double)
Definition: TSFit.cc:87
int channelId() const
so far for EndCap only :
const_iterator begin() const
static int lmmod(EBGlobalCoord ieta, EBGlobalCoord iphi)
Definition: MEEBGeom.cc:90
const_iterator end() const
const unsigned int _firstsample
static int side(EBGlobalCoord ieta, EBGlobalCoord iphi)
Definition: MEEBGeom.cc:105
const unsigned int _lastsample
int stripId() const
get the tower id
const std::string digiCollection_
const unsigned int _nsamples
boost::transform_iterator< IterHelp, boost::counting_iterator< int > > const_iterator
bool isValid() const
Definition: HandleBase.h:70
int xtalId() const
get the channel id
edm::EDGetTokenT< EEDigiCollection > eeDigiToken_
Definition: TPNFit.h:6
const unsigned int _lastsamplePN
double doFit(int, double *)
Definition: TPNFit.cc:39
const edm::EDGetTokenT< EcalRawDataCollection > rawDataToken_
void set_params(int, int, int, int, int, double, double, int, int)
Definition: TSFit.cc:39
Definition: TSFit.h:6
int iDCCId() const
get the DCCId
unsigned int isFirstChanModFilled[9]
const unsigned int _samplemin
const unsigned int _firstsamplePN
const unsigned int _presample

◆ beginJob()

void EcalTestPulseAnalyzer::beginJob ( )
overridevirtual

Reimplemented from edm::one::EDAnalyzerBase.

Definition at line 121 of file EcalTestPulseAnalyzer.cc.

References apdAmpl, apdGain, channelID, dccID, eta, firstChanMod, mps_fire::i, iChannelID, idccID, iEta, iModule, iPhi, isFirstChanModFilled, iside, iTowerID, dqmiolumiharvest::j, Skims_PA_cff::name, nCrys, nMod, outFile, phi, pnAmpl0, pnAmpl1, pnGain, resdir_, resfile, rootfile, side, towerID, TPEvents, and trees.

121  {
122  //========================================================================
123 
124  // Define temporary file
125 
126  rootfile = resdir_;
127  rootfile += "/TmpTreeTestPulseAnalyzer.root";
128 
129  outFile = new TFile(rootfile.c_str(), "RECREATE");
130 
131  for (unsigned int i = 0; i < nCrys; i++) {
132  std::stringstream name;
133  name << "Tree" << i;
134 
135  trees[i] = new TTree(name.str().c_str(), name.str().c_str());
136 
137  //List of branches
138 
139  trees[i]->Branch("iphi", &phi, "phi/I");
140  trees[i]->Branch("ieta", &eta, "eta/I");
141  trees[i]->Branch("side", &side, "side/I");
142  trees[i]->Branch("dccID", &dccID, "dccID/I");
143  trees[i]->Branch("towerID", &towerID, "towerID/I");
144  trees[i]->Branch("channelID", &channelID, "channelID/I");
145  trees[i]->Branch("event", &event, "event/I");
146  trees[i]->Branch("apdGain", &apdGain, "apdGain/I");
147  trees[i]->Branch("pnGain", &pnGain, "pnGain/I");
148  trees[i]->Branch("apdAmpl", &apdAmpl, "apdAmpl/D");
149  trees[i]->Branch("pnAmpl0", &pnAmpl0, "pnAmpl0/D");
150  trees[i]->Branch("pnAmpl1", &pnAmpl1, "pnAmpl1/D");
151 
152  trees[i]->SetBranchAddress("ieta", &eta);
153  trees[i]->SetBranchAddress("iphi", &phi);
154  trees[i]->SetBranchAddress("side", &side);
155  trees[i]->SetBranchAddress("dccID", &dccID);
156  trees[i]->SetBranchAddress("towerID", &towerID);
157  trees[i]->SetBranchAddress("channelID", &channelID);
158  trees[i]->SetBranchAddress("event", &event);
159  trees[i]->SetBranchAddress("apdGain", &apdGain);
160  trees[i]->SetBranchAddress("pnGain", &pnGain);
161  trees[i]->SetBranchAddress("apdAmpl", &apdAmpl);
162  trees[i]->SetBranchAddress("pnAmpl0", &pnAmpl0);
163  trees[i]->SetBranchAddress("pnAmpl1", &pnAmpl1);
164  }
165 
166  // Initializations
167 
168  for (unsigned int j = 0; j < nCrys; j++) {
169  iEta[j] = -1;
170  iPhi[j] = -1;
171  iModule[j] = 10;
172  iTowerID[j] = -1;
173  iChannelID[j] = -1;
174  idccID[j] = -1;
175  iside[j] = -1;
176  }
177 
178  for (unsigned int j = 0; j < nMod; j++) {
179  firstChanMod[j] = 0;
180  isFirstChanModFilled[j] = 0;
181  }
182 
183  // Define output results file name
184 
185  std::stringstream namefile;
186  namefile << resdir_ << "/APDPN_TESTPULSE.root";
187  resfile = namefile.str();
188 
189  // TP events counter
190  TPEvents = 0;
191 }
unsigned int iModule[1700]
unsigned int isFirstChanModFilled[9]
Definition: event.py:1

◆ endJob()

void EcalTestPulseAnalyzer::endJob ( void  )
overridevirtual

Reimplemented from edm::one::EDAnalyzerBase.

Definition at line 621 of file EcalTestPulseAnalyzer.cc.

References TMom::addEntry(), APD, apdAmpl, apdGain, channelID, dccID, firstChanMod, flag, gain, TMom::getM3(), TMom::getMax(), TMom::getMean(), TMom::getMin(), TMom::getNevt(), TMom::getRMS(), iChannelID, idccID, ieta, iEta, iModule, iphi, iPhi, iside, iTowerID, dqmiolumiharvest::j, moduleID, nCrys, nGainAPD, nGainPN, nMod, outFile, PN, pnAmpl0, pnAmpl1, pnGain, pnID, resfile, resFile, respntrees, restrees, rootfile, side, towerID, TPEvents, and trees.

Referenced by o2olib.O2ORunMgr::executeJob().

621  {
622  //========================================================================
623 
624  // Don't do anything if there is no events
625  if (TPEvents == 0) {
626  outFile->Close();
627 
628  // Remove temporary file
629 
630  std::stringstream del;
631  del << "rm " << rootfile;
632  system(del.str().c_str());
633 
634  edm::LogVerbatim("EcalTestPulseAnalyzer") << " No TP Events ";
635  return;
636  }
637 
638  edm::LogVerbatim("EcalTestPulseAnalyzer") << "\n\t+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+";
639  edm::LogVerbatim("EcalTestPulseAnalyzer") << "\t+=+ Analyzing test pulse data: getting APD, PN +=+";
640 
641  // Create output ntuples:
642 
643  //edm::LogVerbatim("EcalTestPulseAnalyzer")<< "TP Test Name File "<< resfile.c_str();
644 
645  resFile = new TFile(resfile.c_str(), "RECREATE");
646 
647  restrees = new TTree("TPAPD", "TPAPD");
648  respntrees = new TTree("TPPN", "TPPN");
649 
650  restrees->Branch("iphi", &iphi, "iphi/I");
651  restrees->Branch("ieta", &ieta, "ieta/I");
652  restrees->Branch("dccID", &dccID, "dccID/I");
653  restrees->Branch("side", &side, "side/I");
654  restrees->Branch("towerID", &towerID, "towerID/I");
655  restrees->Branch("channelID", &channelID, "channelID/I");
656  restrees->Branch("moduleID", &moduleID, "moduleID/I");
657  restrees->Branch("flag", &flag, "flag/I");
658  restrees->Branch("gain", &gain, "gain/I");
659  restrees->Branch("APD", &APD, "APD[6]/D");
660 
661  respntrees->Branch("pnID", &pnID, "pnID/I");
662  respntrees->Branch("moduleID", &moduleID, "moduleID/I");
663  respntrees->Branch("gain", &gain, "gain/I");
664  respntrees->Branch("PN", &PN, "PN[6]/D");
665 
666  restrees->SetBranchAddress("iphi", &iphi);
667  restrees->SetBranchAddress("ieta", &ieta);
668  restrees->SetBranchAddress("dccID", &dccID);
669  restrees->SetBranchAddress("side", &side);
670  restrees->SetBranchAddress("towerID", &towerID);
671  restrees->SetBranchAddress("channelID", &channelID);
672  restrees->SetBranchAddress("moduleID", &moduleID);
673  restrees->SetBranchAddress("flag", &flag);
674  restrees->SetBranchAddress("gain", &gain);
675  restrees->SetBranchAddress("APD", APD);
676 
677  respntrees->SetBranchAddress("pnID", &pnID);
678  respntrees->SetBranchAddress("moduleID", &moduleID);
679  respntrees->SetBranchAddress("gain", &gain);
680  respntrees->SetBranchAddress("PN", PN);
681 
682  TMom* APDAnal[1700][10];
683  TMom* PNAnal[9][2][10];
684 
685  for (unsigned int iMod = 0; iMod < nMod; iMod++) {
686  for (unsigned int ich = 0; ich < 2; ich++) {
687  for (unsigned int ig = 0; ig < nGainPN; ig++) {
688  PNAnal[iMod][ich][ig] = new TMom();
689  }
690  }
691  }
692 
693  for (unsigned int iCry = 0; iCry < nCrys; iCry++) { // Loop on data trees (ie on cristals)
694 
695  for (unsigned int iG = 0; iG < nGainAPD; iG++) {
696  APDAnal[iCry][iG] = new TMom();
697  }
698 
699  // Define submodule and channel number inside the submodule (as Patrice)
700 
701  unsigned int iMod = iModule[iCry] - 1;
702 
703  moduleID = iMod + 1;
704  if (moduleID >= 20)
705  moduleID -= 2; // Trick to fix endcap specificity
706 
707  for (Long64_t jentry = 0; jentry < trees[iCry]->GetEntriesFast(); jentry++) {
708  // PN Means and RMS
709 
710  if (firstChanMod[iMod] == iCry) {
711  PNAnal[iMod][0][pnGain]->addEntry(pnAmpl0);
712  PNAnal[iMod][1][pnGain]->addEntry(pnAmpl1);
713  }
714 
715  // APD means and RMS
716 
717  APDAnal[iCry][apdGain]->addEntry(apdAmpl);
718  }
719 
720  if (trees[iCry]->GetEntries() < 10) {
721  flag = -1;
722  for (int j = 0; j < 6; j++) {
723  APD[j] = 0.0;
724  }
725  } else
726  flag = 1;
727 
728  iphi = iPhi[iCry];
729  ieta = iEta[iCry];
730  dccID = idccID[iCry];
731  side = iside[iCry];
732  towerID = iTowerID[iCry];
733  channelID = iChannelID[iCry];
734 
735  for (unsigned int ig = 0; ig < nGainAPD; ig++) {
736  APD[0] = APDAnal[iCry][ig]->getMean();
737  APD[1] = APDAnal[iCry][ig]->getRMS();
738  APD[2] = APDAnal[iCry][ig]->getM3();
739  APD[3] = APDAnal[iCry][ig]->getNevt();
740  APD[4] = APDAnal[iCry][ig]->getMin();
741  APD[5] = APDAnal[iCry][ig]->getMax();
742  gain = ig;
743 
744  // Fill APD tree
745 
746  restrees->Fill();
747  }
748  }
749 
750  // Get final results for PN and PN/PN
751 
752  for (unsigned int ig = 0; ig < nGainPN; ig++) {
753  for (unsigned int iMod = 0; iMod < nMod; iMod++) {
754  for (int ch = 0; ch < 2; ch++) {
755  pnID = ch;
756  moduleID = iMod;
757  if (moduleID >= 20)
758  moduleID -= 2; // Trick to fix endcap specificity
759 
760  PN[0] = PNAnal[iMod][ch][ig]->getMean();
761  PN[1] = PNAnal[iMod][ch][ig]->getRMS();
762  PN[2] = PNAnal[iMod][ch][ig]->getM3();
763  PN[3] = PNAnal[iMod][ch][ig]->getNevt();
764  PN[4] = PNAnal[iMod][ch][ig]->getMin();
765  PN[5] = PNAnal[iMod][ch][ig]->getMax();
766  gain = ig;
767 
768  // Fill PN tree
769  respntrees->Fill();
770  }
771  }
772  }
773 
774  outFile->Close();
775 
776  // Remove temporary file
777 
778  std::stringstream del;
779  del << "rm " << rootfile;
780  system(del.str().c_str());
781 
782  // Save final results
783 
784  restrees->Write();
785  respntrees->Write();
786  resFile->Close();
787 
788  edm::LogVerbatim("EcalTestPulseAnalyzer") << "\t+=+ ...................................... done +=+";
789  edm::LogVerbatim("EcalTestPulseAnalyzer") << "\t+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+";
790 }
void addEntry(double val)
Definition: TMom.cc:88
Log< level::Info, true > LogVerbatim
unsigned int iModule[1700]
Definition: TMom.h:7
double getM3()
Definition: TMom.cc:156
int getNevt()
Definition: TMom.cc:144
double getRMS()
Definition: TMom.cc:146
double getMin()
Definition: TMom.cc:169
double getMax()
Definition: TMom.cc:170
double getMean()
Definition: TMom.cc:121

Member Data Documentation

◆ _chi2max

const double EcalTestPulseAnalyzer::_chi2max
private

Definition at line 81 of file EcalTestPulseAnalyzer.h.

Referenced by analyze().

◆ _ecalPart

const std::string EcalTestPulseAnalyzer::_ecalPart
private

Definition at line 83 of file EcalTestPulseAnalyzer.h.

Referenced by analyze(), and EcalTestPulseAnalyzer().

◆ _fedid

const int EcalTestPulseAnalyzer::_fedid
private

Definition at line 84 of file EcalTestPulseAnalyzer.h.

Referenced by analyze(), and EcalTestPulseAnalyzer().

◆ _firstsample

const unsigned int EcalTestPulseAnalyzer::_firstsample
private

Definition at line 72 of file EcalTestPulseAnalyzer.h.

Referenced by analyze().

◆ _firstsamplePN

const unsigned int EcalTestPulseAnalyzer::_firstsamplePN
private

Definition at line 78 of file EcalTestPulseAnalyzer.h.

Referenced by analyze().

◆ _lastsample

const unsigned int EcalTestPulseAnalyzer::_lastsample
private

Definition at line 73 of file EcalTestPulseAnalyzer.h.

Referenced by analyze().

◆ _lastsamplePN

const unsigned int EcalTestPulseAnalyzer::_lastsamplePN
private

Definition at line 79 of file EcalTestPulseAnalyzer.h.

Referenced by analyze().

◆ _niter

const unsigned int EcalTestPulseAnalyzer::_niter
private

Definition at line 80 of file EcalTestPulseAnalyzer.h.

Referenced by analyze().

◆ _nsamples

const unsigned int EcalTestPulseAnalyzer::_nsamples
private

Definition at line 70 of file EcalTestPulseAnalyzer.h.

Referenced by analyze().

◆ _nsamplesPN

const unsigned int EcalTestPulseAnalyzer::_nsamplesPN
private

Definition at line 76 of file EcalTestPulseAnalyzer.h.

Referenced by analyze().

◆ _presample

const unsigned int EcalTestPulseAnalyzer::_presample
private

Definition at line 71 of file EcalTestPulseAnalyzer.h.

Referenced by analyze().

◆ _presamplePN

const unsigned int EcalTestPulseAnalyzer::_presamplePN
private

Definition at line 77 of file EcalTestPulseAnalyzer.h.

Referenced by analyze().

◆ _samplemax

const unsigned int EcalTestPulseAnalyzer::_samplemax
private

Definition at line 75 of file EcalTestPulseAnalyzer.h.

Referenced by analyze().

◆ _samplemin

const unsigned int EcalTestPulseAnalyzer::_samplemin
private

Definition at line 74 of file EcalTestPulseAnalyzer.h.

Referenced by analyze().

◆ _timeofmax

const double EcalTestPulseAnalyzer::_timeofmax
private

Definition at line 82 of file EcalTestPulseAnalyzer.h.

Referenced by analyze().

◆ adc

double EcalTestPulseAnalyzer::adc[10]
private

Definition at line 131 of file EcalTestPulseAnalyzer.h.

Referenced by analyze().

◆ APD

double EcalTestPulseAnalyzer::APD[6]
private

Definition at line 157 of file EcalTestPulseAnalyzer.h.

Referenced by endJob().

◆ apdAmpl

double EcalTestPulseAnalyzer::apdAmpl
private

Definition at line 137 of file EcalTestPulseAnalyzer.h.

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

◆ apdGain

int EcalTestPulseAnalyzer::apdGain
private

Definition at line 134 of file EcalTestPulseAnalyzer.h.

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

◆ apdTime

double EcalTestPulseAnalyzer::apdTime
private

Definition at line 138 of file EcalTestPulseAnalyzer.h.

Referenced by analyze().

◆ channelID

int EcalTestPulseAnalyzer::channelID
private

Definition at line 107 of file EcalTestPulseAnalyzer.h.

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

◆ channelIteratorEE

int EcalTestPulseAnalyzer::channelIteratorEE
private

Definition at line 156 of file EcalTestPulseAnalyzer.h.

Referenced by analyze().

◆ channelMapEE

std::map<int, int> EcalTestPulseAnalyzer::channelMapEE
private

Definition at line 148 of file EcalTestPulseAnalyzer.h.

Referenced by analyze().

◆ dccID

int EcalTestPulseAnalyzer::dccID
private

Definition at line 114 of file EcalTestPulseAnalyzer.h.

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

◆ dccMEM

std::vector<int> EcalTestPulseAnalyzer::dccMEM
private

Definition at line 149 of file EcalTestPulseAnalyzer.h.

Referenced by analyze(), and EcalTestPulseAnalyzer().

◆ digiCollection_

const std::string EcalTestPulseAnalyzer::digiCollection_
private

Definition at line 58 of file EcalTestPulseAnalyzer.h.

Referenced by analyze(), and EcalTestPulseAnalyzer().

◆ digiPNCollection_

const std::string EcalTestPulseAnalyzer::digiPNCollection_
private

Definition at line 60 of file EcalTestPulseAnalyzer.h.

◆ digiProducer_

const std::string EcalTestPulseAnalyzer::digiProducer_
private

Definition at line 59 of file EcalTestPulseAnalyzer.h.

Referenced by EcalTestPulseAnalyzer().

◆ ebDigiToken_

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

Definition at line 63 of file EcalTestPulseAnalyzer.h.

Referenced by analyze(), and EcalTestPulseAnalyzer().

◆ eeDigiToken_

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

Definition at line 64 of file EcalTestPulseAnalyzer.h.

Referenced by analyze(), and EcalTestPulseAnalyzer().

◆ eta

int EcalTestPulseAnalyzer::eta
private

◆ event

int EcalTestPulseAnalyzer::event
private

◆ eventHeaderCollection_

const std::string EcalTestPulseAnalyzer::eventHeaderCollection_
private

Definition at line 56 of file EcalTestPulseAnalyzer.h.

Referenced by analyze().

◆ eventHeaderProducer_

const std::string EcalTestPulseAnalyzer::eventHeaderProducer_
private

Definition at line 57 of file EcalTestPulseAnalyzer.h.

◆ fedID

int EcalTestPulseAnalyzer::fedID
private

Definition at line 113 of file EcalTestPulseAnalyzer.h.

Referenced by analyze().

◆ firstChanMod

unsigned int EcalTestPulseAnalyzer::firstChanMod[9]
private

Definition at line 163 of file EcalTestPulseAnalyzer.h.

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

◆ flag

int EcalTestPulseAnalyzer::flag
private

Definition at line 154 of file EcalTestPulseAnalyzer.h.

Referenced by endJob().

◆ gain

int EcalTestPulseAnalyzer::gain
private

Definition at line 154 of file EcalTestPulseAnalyzer.h.

Referenced by endJob().

◆ iChannelID

int EcalTestPulseAnalyzer::iChannelID[1700]
private

Definition at line 161 of file EcalTestPulseAnalyzer.h.

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

◆ idccID

int EcalTestPulseAnalyzer::idccID[1700]
private

Definition at line 161 of file EcalTestPulseAnalyzer.h.

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

◆ ieta

int EcalTestPulseAnalyzer::ieta
private

Definition at line 154 of file EcalTestPulseAnalyzer.h.

Referenced by endJob().

◆ iEta

int EcalTestPulseAnalyzer::iEta[1700]
private

Definition at line 159 of file EcalTestPulseAnalyzer.h.

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

◆ iEvent

int EcalTestPulseAnalyzer::iEvent
private

Definition at line 54 of file EcalTestPulseAnalyzer.h.

Referenced by analyze().

◆ iModule

unsigned int EcalTestPulseAnalyzer::iModule[1700]
private

Definition at line 160 of file EcalTestPulseAnalyzer.h.

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

◆ iphi

int EcalTestPulseAnalyzer::iphi
private

Definition at line 154 of file EcalTestPulseAnalyzer.h.

Referenced by endJob().

◆ iPhi

int EcalTestPulseAnalyzer::iPhi[1700]
private

Definition at line 159 of file EcalTestPulseAnalyzer.h.

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

◆ isFirstChanModFilled

unsigned int EcalTestPulseAnalyzer::isFirstChanModFilled[9]
private

Definition at line 164 of file EcalTestPulseAnalyzer.h.

Referenced by analyze(), and beginJob().

◆ iside

int EcalTestPulseAnalyzer::iside[1700]
private

Definition at line 161 of file EcalTestPulseAnalyzer.h.

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

◆ iTowerID

int EcalTestPulseAnalyzer::iTowerID[1700]
private

Definition at line 161 of file EcalTestPulseAnalyzer.h.

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

◆ iZ

int EcalTestPulseAnalyzer::iZ
private

Definition at line 116 of file EcalTestPulseAnalyzer.h.

Referenced by analyze(), and EcalTestPulseAnalyzer().

◆ mappingToken_

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

Definition at line 66 of file EcalTestPulseAnalyzer.h.

Referenced by analyze().

◆ moduleID

int EcalTestPulseAnalyzer::moduleID
private

Definition at line 155 of file EcalTestPulseAnalyzer.h.

Referenced by endJob().

◆ modules

std::vector<int> EcalTestPulseAnalyzer::modules
private

Definition at line 150 of file EcalTestPulseAnalyzer.h.

Referenced by SequenceVisitors.NodeVisitor::enter().

◆ nCrys

unsigned int EcalTestPulseAnalyzer::nCrys
private

Definition at line 96 of file EcalTestPulseAnalyzer.h.

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

◆ nGainAPD

unsigned int EcalTestPulseAnalyzer::nGainAPD
private

Definition at line 99 of file EcalTestPulseAnalyzer.h.

Referenced by endJob().

◆ nGainPN

unsigned int EcalTestPulseAnalyzer::nGainPN
private

Definition at line 98 of file EcalTestPulseAnalyzer.h.

Referenced by endJob().

◆ nMod

unsigned int EcalTestPulseAnalyzer::nMod
private

Definition at line 97 of file EcalTestPulseAnalyzer.h.

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

◆ outFile

TFile* EcalTestPulseAnalyzer::outFile
private

◆ phi

int EcalTestPulseAnalyzer::phi
private

◆ pn

double EcalTestPulseAnalyzer::pn[50]
private

Definition at line 132 of file EcalTestPulseAnalyzer.h.

Referenced by analyze().

◆ PN

double EcalTestPulseAnalyzer::PN[6]
private

Definition at line 157 of file EcalTestPulseAnalyzer.h.

Referenced by endJob().

◆ pnAmpl

double EcalTestPulseAnalyzer::pnAmpl
private

Definition at line 141 of file EcalTestPulseAnalyzer.h.

Referenced by analyze().

◆ pnAmpl0

double EcalTestPulseAnalyzer::pnAmpl0
private

Definition at line 139 of file EcalTestPulseAnalyzer.h.

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

◆ pnAmpl1

double EcalTestPulseAnalyzer::pnAmpl1
private

Definition at line 140 of file EcalTestPulseAnalyzer.h.

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

◆ pnDiodeDigiToken_

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

Definition at line 65 of file EcalTestPulseAnalyzer.h.

Referenced by analyze().

◆ pnG

int EcalTestPulseAnalyzer::pnG
private

Definition at line 136 of file EcalTestPulseAnalyzer.h.

Referenced by analyze().

◆ pnGain

int EcalTestPulseAnalyzer::pnGain
private

Definition at line 135 of file EcalTestPulseAnalyzer.h.

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

◆ pnID

int EcalTestPulseAnalyzer::pnID
private

Definition at line 155 of file EcalTestPulseAnalyzer.h.

Referenced by endJob().

◆ rawDataToken_

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

Definition at line 62 of file EcalTestPulseAnalyzer.h.

Referenced by analyze().

◆ resdir_

const std::string EcalTestPulseAnalyzer::resdir_
private

Definition at line 86 of file EcalTestPulseAnalyzer.h.

Referenced by beginJob().

◆ resfile

std::string EcalTestPulseAnalyzer::resfile
private

Definition at line 91 of file EcalTestPulseAnalyzer.h.

Referenced by beginJob(), and endJob().

◆ resFile

TFile* EcalTestPulseAnalyzer::resFile
private

Definition at line 121 of file EcalTestPulseAnalyzer.h.

Referenced by endJob().

◆ respntrees

TTree* EcalTestPulseAnalyzer::respntrees
private

Definition at line 146 of file EcalTestPulseAnalyzer.h.

Referenced by endJob().

◆ restrees

TTree* EcalTestPulseAnalyzer::restrees
private

Definition at line 145 of file EcalTestPulseAnalyzer.h.

Referenced by endJob().

◆ ret_data

double EcalTestPulseAnalyzer::ret_data[20]
private

Definition at line 104 of file EcalTestPulseAnalyzer.h.

Referenced by analyze().

◆ rootfile

std::string EcalTestPulseAnalyzer::rootfile
private

◆ runNum

int EcalTestPulseAnalyzer::runNum
private

Definition at line 112 of file EcalTestPulseAnalyzer.h.

Referenced by analyze().

◆ runType

int EcalTestPulseAnalyzer::runType
private

Definition at line 111 of file EcalTestPulseAnalyzer.h.

Referenced by analyze().

◆ side

int EcalTestPulseAnalyzer::side
private

Definition at line 115 of file EcalTestPulseAnalyzer.h.

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

◆ towerID

int EcalTestPulseAnalyzer::towerID
private

Definition at line 106 of file EcalTestPulseAnalyzer.h.

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

◆ TPEvents

int EcalTestPulseAnalyzer::TPEvents
private

Definition at line 102 of file EcalTestPulseAnalyzer.h.

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

◆ trees

TTree* EcalTestPulseAnalyzer::trees[1700]
private

Definition at line 125 of file EcalTestPulseAnalyzer.h.

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