CMS 3D CMS Logo

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

#include <EcalTestPulseAnalyzer.h>

Inheritance diagram for EcalTestPulseAnalyzer:
edm::EDAnalyzer 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::EDAnalyzer
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzer ()
 
SerialTaskQueueglobalLuminosityBlocksQueue ()
 
SerialTaskQueueglobalRunsQueue ()
 
ModuleDescription const & moduleDescription () const
 
std::string workerType () const
 
 ~EDAnalyzer () override
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
void convertCurrentProcessAlias (std::string const &processName)
 Convert "@currentProcess" in InputTag process names to the actual current process name. More...
 
 EDConsumerBase ()
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
 EDConsumerBase (EDConsumerBase &&)=default
 
ESProxyIndex const * esGetTokenIndices (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::vector< ModuleDescription const * > &modules, 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
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
void updateLookup (eventsetup::ESRecordsToProxyIndices const &)
 
virtual ~EDConsumerBase () noexcept(false)
 

Private Attributes

double _chi2max
 
std::string _ecalPart
 
int _fedid
 
unsigned int _firstsample
 
unsigned int _firstsamplePN
 
unsigned int _lastsample
 
unsigned int _lastsamplePN
 
unsigned int _niter
 
unsigned int _nsamples
 
unsigned int _nsamplesPN
 
unsigned int _presample
 
unsigned int _presamplePN
 
unsigned int _samplemax
 
unsigned int _samplemin
 
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
 
std::string digiCollection_
 
std::string digiPNCollection_
 
std::string digiProducer_
 
int eta
 
int event
 
std::string eventHeaderCollection_
 
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
 
int moduleID
 
std::vector< int > modules
 
unsigned int nCrys
 
unsigned int nGainAPD
 
unsigned int nGainPN
 
unsigned int nMod
 
unsigned int nTT
 
TFile * outFile
 
int phi
 
double pn [50]
 
double PN [6]
 
double pnAmpl
 
double pnAmpl0
 
double pnAmpl1
 
int pnG
 
int pnGain
 
int pnID
 
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::EDAnalyzer
typedef EDAnalyzer ModuleType
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from edm::EDAnalyzer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &)
 
static bool wantsGlobalLuminosityBlocks ()
 
static bool wantsGlobalRuns ()
 
static bool wantsStreamLuminosityBlocks ()
 
static bool wantsStreamRuns ()
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
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<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)
 

Detailed Description

Definition at line 35 of file EcalTestPulseAnalyzer.h.

Constructor & Destructor Documentation

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

Definition at line 45 of file EcalTestPulseAnalyzer.cc.

References _ecalPart, _fedid, dccMEM, digiCollection_, digiPNCollection_, digiProducer_, eventHeaderCollection_, eventHeaderProducer_, edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), iZ, ME::lmmodFromDcc(), ME::memFromDcc(), nCrys, NCRYSEB, NCRYSEE, nMod, nTT, NTTEB, NTTEE, resdir_, and AlCaHLTBitMon_QueryRunRegistry::string.

47  : iEvent(0),
48 
49  // framework parameters with default values
50 
51  _nsamples(iConfig.getUntrackedParameter<unsigned int>("nSamples", 10)),
52  _presample(iConfig.getUntrackedParameter<unsigned int>("nPresamples", 3)),
53  _firstsample(iConfig.getUntrackedParameter<unsigned int>("firstSample", 1)),
54  _lastsample(iConfig.getUntrackedParameter<unsigned int>("lastSample", 2)),
55  _samplemin(iConfig.getUntrackedParameter<unsigned int>("sampleMin", 3)),
56  _samplemax(iConfig.getUntrackedParameter<unsigned int>("sampleMax", 9)),
57  _nsamplesPN(iConfig.getUntrackedParameter<unsigned int>("nSamplesPN", 50)),
58  _presamplePN(iConfig.getUntrackedParameter<unsigned int>("nPresamplesPN", 6)),
59  _firstsamplePN(iConfig.getUntrackedParameter<unsigned int>("firstSamplePN", 7)),
60  _lastsamplePN(iConfig.getUntrackedParameter<unsigned int>("lastSamplePN", 8)),
61  _niter(iConfig.getUntrackedParameter<unsigned int>("nIter", 3)),
62  _chi2max(iConfig.getUntrackedParameter<double>("chi2Max", 10.0)),
63  _timeofmax(iConfig.getUntrackedParameter<double>("timeOfMax", 4.5)),
64  _ecalPart(iConfig.getUntrackedParameter<std::string>("ecalPart", "EB")),
65  _fedid(iConfig.getUntrackedParameter<int>("fedID", -999)),
66  nCrys(NCRYSEB),
67  nTT(NTTEB),
68  nMod(NMODEB),
71  towerID(-1),
72  channelID(-1),
73  runType(-1),
74  runNum(0),
75  fedID(-1),
76  dccID(-1),
77  side(-1),
78  iZ(1),
79  phi(-1),
80  eta(-1),
81  event(0),
82  apdAmpl(0),
83  apdTime(0),
84  pnAmpl(0),
85  pnID(-1),
86  moduleID(-1),
88 
89 //========================================================================
90 
91 {
92  //now do what ever initialization is needed
93 
94  resdir_ = iConfig.getUntrackedParameter<std::string>("resDir");
95 
96  digiCollection_ = iConfig.getParameter<std::string>("digiCollection");
97  digiPNCollection_ = iConfig.getParameter<std::string>("digiPNCollection");
98  digiProducer_ = iConfig.getParameter<std::string>("digiProducer");
99 
100  eventHeaderCollection_ = iConfig.getParameter<std::string>("eventHeaderCollection");
101  eventHeaderProducer_ = iConfig.getParameter<std::string>("eventHeaderProducer");
102 
103  // Define geometrical constants
104 
105  if (_ecalPart == "EB") {
106  nCrys = NCRYSEB;
107  nTT = NTTEB;
108  } else {
109  nCrys = NCRYSEE;
110  nTT = NTTEE;
111  }
112 
113  iZ = 1;
114  if (_fedid <= 609)
115  iZ = -1;
116 
119  nMod = modules.size();
120 }
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
static std::vector< ME::DCCid > memFromDcc(ME::DCCid idcc)
Definition: ME.cc:561
#define NTTEB
#define NGAINPN
#define NTTEE
#define NCRYSEE
#define NGAINAPD
#define NCRYSEB
#define NMODEB
static std::vector< ME::LMMid > lmmodFromDcc(ME::DCCid idcc)
Definition: ME.cc:574
EcalTestPulseAnalyzer::~EcalTestPulseAnalyzer ( )
override

Definition at line 123 of file EcalTestPulseAnalyzer.cc.

123  {
124  //========================================================================
125 
126  // do anything here that needs to be done at desctruction time
127  // (e.g. close files, deallocate resources etc.)
128 }

Member Function Documentation

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

Definition at line 204 of file EcalTestPulseAnalyzer.cc.

References _chi2max, _ecalPart, _fedid, _firstsample, _firstsamplePN, _lastsample, _lastsamplePN, _niter, _nsamples, _nsamplesPN, _presample, _presamplePN, _samplemax, _samplemin, _timeofmax, adc, apdAmpl, apdGain, apdTime, edm::SortedCollection< T, SORT >::begin(), edm::DataFrameContainer::begin(), beam_dqm_sourceclient-live_cfg::cerr, EcalElectronicsId::channelId(), channelID, channelIteratorEE, channelMapEE, hltPixelTracks_cff::chi2, gather_cfg::cout, dccID, dccMEM, digiCollection_, digiPNCollection_, digiProducer_, TPNFit::doFit(), CollectionTags_cfi::EBDigi, CollectionTags_cfi::EEDigi, MEEBGeom::electronic_channel(), edm::SortedCollection< T, SORT >::end(), edm::DataFrameContainer::end(), eta, eventHeaderCollection_, eventHeaderProducer_, cppFunctionSkipper::exception, fedID, firstChanMod, TSFit::fit_third_degree_polynomial(), edm::EventSetup::get(), TPNFit::getAmpl(), edm::Event::getByLabel(), EcalElectronicsMapping::getElectronicsId(), ecalpyutils::hashedIndex(), mps_fire::i, iChannelID, EcalPnDiodeDetId::iDCCId(), idccID, iEta, iEvent, iModule, TPNFit::init(), TSFit::init_errmat(), iPhi, isFirstChanModFilled, iside, iTowerID, iZ, dqmdumpme::k, MEEEGeom::lmmod(), MEEBGeom::lmmod(), MEEBGeom::localCoord(), Max(), nCrys, phi, MEEBGeom::pn(), MEEEGeom::pn(), pn, pnAmpl, pnAmpl0, pnAmpl1, pnG, PedestalClient_cfi::pngain, pnGain, edm::Handle< T >::product(), edm::ESHandle< T >::product(), ret_data, runNum, runType, TSFit::set_params(), MEEBGeom::side(), MEEEGeom::side(), side, findQualityFiles::size, digitizers_cfi::strip, EcalElectronicsId::stripId(), EcalDCCHeaderBlock::TESTPULSE_GAP, EcalDCCHeaderBlock::TESTPULSE_MGPA, EcalDCCHeaderBlock::TESTPULSE_SCAN_MEM, EcalElectronicsId::towerId(), towerID, TPEvents, trees, and EcalElectronicsId::xtalId().

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

Reimplemented from edm::EDAnalyzer.

Definition at line 131 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.

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

Reimplemented from edm::EDAnalyzer.

Definition at line 642 of file EcalTestPulseAnalyzer.cc.

References TMom::addEntry(), APD, apdAmpl, apdGain, channelID, gather_cfg::cout, dccID, DEFINE_FWK_MODULE, 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().

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

double EcalTestPulseAnalyzer::_chi2max
private

Definition at line 60 of file EcalTestPulseAnalyzer.h.

Referenced by analyze().

std::string EcalTestPulseAnalyzer::_ecalPart
private

Definition at line 62 of file EcalTestPulseAnalyzer.h.

Referenced by analyze(), and EcalTestPulseAnalyzer().

int EcalTestPulseAnalyzer::_fedid
private

Definition at line 63 of file EcalTestPulseAnalyzer.h.

Referenced by analyze(), and EcalTestPulseAnalyzer().

unsigned int EcalTestPulseAnalyzer::_firstsample
private

Definition at line 51 of file EcalTestPulseAnalyzer.h.

Referenced by analyze().

unsigned int EcalTestPulseAnalyzer::_firstsamplePN
private

Definition at line 57 of file EcalTestPulseAnalyzer.h.

Referenced by analyze().

unsigned int EcalTestPulseAnalyzer::_lastsample
private

Definition at line 52 of file EcalTestPulseAnalyzer.h.

Referenced by analyze().

unsigned int EcalTestPulseAnalyzer::_lastsamplePN
private

Definition at line 58 of file EcalTestPulseAnalyzer.h.

Referenced by analyze().

unsigned int EcalTestPulseAnalyzer::_niter
private

Definition at line 59 of file EcalTestPulseAnalyzer.h.

Referenced by analyze().

unsigned int EcalTestPulseAnalyzer::_nsamples
private

Definition at line 49 of file EcalTestPulseAnalyzer.h.

Referenced by analyze().

unsigned int EcalTestPulseAnalyzer::_nsamplesPN
private

Definition at line 55 of file EcalTestPulseAnalyzer.h.

Referenced by analyze().

unsigned int EcalTestPulseAnalyzer::_presample
private

Definition at line 50 of file EcalTestPulseAnalyzer.h.

Referenced by analyze().

unsigned int EcalTestPulseAnalyzer::_presamplePN
private

Definition at line 56 of file EcalTestPulseAnalyzer.h.

Referenced by analyze().

unsigned int EcalTestPulseAnalyzer::_samplemax
private

Definition at line 54 of file EcalTestPulseAnalyzer.h.

Referenced by analyze().

unsigned int EcalTestPulseAnalyzer::_samplemin
private

Definition at line 53 of file EcalTestPulseAnalyzer.h.

Referenced by analyze().

double EcalTestPulseAnalyzer::_timeofmax
private

Definition at line 61 of file EcalTestPulseAnalyzer.h.

Referenced by analyze().

double EcalTestPulseAnalyzer::adc[10]
private

Definition at line 116 of file EcalTestPulseAnalyzer.h.

Referenced by analyze().

double EcalTestPulseAnalyzer::APD[6]
private

Definition at line 142 of file EcalTestPulseAnalyzer.h.

Referenced by endJob().

double EcalTestPulseAnalyzer::apdAmpl
private

Definition at line 122 of file EcalTestPulseAnalyzer.h.

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

int EcalTestPulseAnalyzer::apdGain
private

Definition at line 119 of file EcalTestPulseAnalyzer.h.

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

double EcalTestPulseAnalyzer::apdTime
private

Definition at line 123 of file EcalTestPulseAnalyzer.h.

Referenced by analyze().

int EcalTestPulseAnalyzer::channelID
private

Definition at line 92 of file EcalTestPulseAnalyzer.h.

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

int EcalTestPulseAnalyzer::channelIteratorEE
private

Definition at line 141 of file EcalTestPulseAnalyzer.h.

Referenced by analyze().

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

Definition at line 133 of file EcalTestPulseAnalyzer.h.

Referenced by analyze().

int EcalTestPulseAnalyzer::dccID
private

Definition at line 99 of file EcalTestPulseAnalyzer.h.

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

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

Definition at line 134 of file EcalTestPulseAnalyzer.h.

Referenced by analyze(), and EcalTestPulseAnalyzer().

std::string EcalTestPulseAnalyzer::digiCollection_
private

Definition at line 66 of file EcalTestPulseAnalyzer.h.

Referenced by analyze(), and EcalTestPulseAnalyzer().

std::string EcalTestPulseAnalyzer::digiPNCollection_
private

Definition at line 67 of file EcalTestPulseAnalyzer.h.

Referenced by analyze(), and EcalTestPulseAnalyzer().

std::string EcalTestPulseAnalyzer::digiProducer_
private

Definition at line 68 of file EcalTestPulseAnalyzer.h.

Referenced by analyze(), and EcalTestPulseAnalyzer().

int EcalTestPulseAnalyzer::eta
private
int EcalTestPulseAnalyzer::event
private
std::string EcalTestPulseAnalyzer::eventHeaderCollection_
private

Definition at line 69 of file EcalTestPulseAnalyzer.h.

Referenced by analyze(), and EcalTestPulseAnalyzer().

std::string EcalTestPulseAnalyzer::eventHeaderProducer_
private

Definition at line 70 of file EcalTestPulseAnalyzer.h.

Referenced by analyze(), and EcalTestPulseAnalyzer().

int EcalTestPulseAnalyzer::fedID
private

Definition at line 98 of file EcalTestPulseAnalyzer.h.

Referenced by analyze().

unsigned int EcalTestPulseAnalyzer::firstChanMod[9]
private

Definition at line 148 of file EcalTestPulseAnalyzer.h.

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

int EcalTestPulseAnalyzer::flag
private

Definition at line 139 of file EcalTestPulseAnalyzer.h.

Referenced by endJob().

int EcalTestPulseAnalyzer::gain
private

Definition at line 139 of file EcalTestPulseAnalyzer.h.

Referenced by endJob().

int EcalTestPulseAnalyzer::iChannelID[1700]
private

Definition at line 146 of file EcalTestPulseAnalyzer.h.

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

int EcalTestPulseAnalyzer::idccID[1700]
private

Definition at line 146 of file EcalTestPulseAnalyzer.h.

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

int EcalTestPulseAnalyzer::ieta
private

Definition at line 139 of file EcalTestPulseAnalyzer.h.

Referenced by endJob().

int EcalTestPulseAnalyzer::iEta[1700]
private

Definition at line 144 of file EcalTestPulseAnalyzer.h.

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

int EcalTestPulseAnalyzer::iEvent
private

Definition at line 45 of file EcalTestPulseAnalyzer.h.

Referenced by analyze().

unsigned int EcalTestPulseAnalyzer::iModule[1700]
private

Definition at line 145 of file EcalTestPulseAnalyzer.h.

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

int EcalTestPulseAnalyzer::iphi
private

Definition at line 139 of file EcalTestPulseAnalyzer.h.

Referenced by endJob().

int EcalTestPulseAnalyzer::iPhi[1700]
private

Definition at line 144 of file EcalTestPulseAnalyzer.h.

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

unsigned int EcalTestPulseAnalyzer::isFirstChanModFilled[9]
private

Definition at line 149 of file EcalTestPulseAnalyzer.h.

Referenced by analyze(), and beginJob().

int EcalTestPulseAnalyzer::iside[1700]
private

Definition at line 146 of file EcalTestPulseAnalyzer.h.

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

int EcalTestPulseAnalyzer::iTowerID[1700]
private

Definition at line 146 of file EcalTestPulseAnalyzer.h.

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

int EcalTestPulseAnalyzer::iZ
private

Definition at line 101 of file EcalTestPulseAnalyzer.h.

Referenced by analyze(), and EcalTestPulseAnalyzer().

int EcalTestPulseAnalyzer::moduleID
private

Definition at line 140 of file EcalTestPulseAnalyzer.h.

Referenced by endJob().

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

Definition at line 135 of file EcalTestPulseAnalyzer.h.

unsigned int EcalTestPulseAnalyzer::nCrys
private

Definition at line 80 of file EcalTestPulseAnalyzer.h.

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

unsigned int EcalTestPulseAnalyzer::nGainAPD
private

Definition at line 84 of file EcalTestPulseAnalyzer.h.

Referenced by endJob().

unsigned int EcalTestPulseAnalyzer::nGainPN
private

Definition at line 83 of file EcalTestPulseAnalyzer.h.

Referenced by endJob().

unsigned int EcalTestPulseAnalyzer::nMod
private

Definition at line 82 of file EcalTestPulseAnalyzer.h.

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

unsigned int EcalTestPulseAnalyzer::nTT
private

Definition at line 81 of file EcalTestPulseAnalyzer.h.

Referenced by EcalTestPulseAnalyzer().

TFile* EcalTestPulseAnalyzer::outFile
private

Definition at line 105 of file EcalTestPulseAnalyzer.h.

Referenced by beginJob(), and endJob().

int EcalTestPulseAnalyzer::phi
private
double EcalTestPulseAnalyzer::pn[50]
private

Definition at line 117 of file EcalTestPulseAnalyzer.h.

Referenced by analyze().

double EcalTestPulseAnalyzer::PN[6]
private

Definition at line 142 of file EcalTestPulseAnalyzer.h.

Referenced by endJob().

double EcalTestPulseAnalyzer::pnAmpl
private

Definition at line 126 of file EcalTestPulseAnalyzer.h.

Referenced by analyze().

double EcalTestPulseAnalyzer::pnAmpl0
private

Definition at line 124 of file EcalTestPulseAnalyzer.h.

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

double EcalTestPulseAnalyzer::pnAmpl1
private

Definition at line 125 of file EcalTestPulseAnalyzer.h.

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

int EcalTestPulseAnalyzer::pnG
private

Definition at line 121 of file EcalTestPulseAnalyzer.h.

Referenced by analyze().

int EcalTestPulseAnalyzer::pnGain
private

Definition at line 120 of file EcalTestPulseAnalyzer.h.

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

int EcalTestPulseAnalyzer::pnID
private

Definition at line 140 of file EcalTestPulseAnalyzer.h.

Referenced by endJob().

std::string EcalTestPulseAnalyzer::resdir_
private

Definition at line 65 of file EcalTestPulseAnalyzer.h.

Referenced by beginJob(), and EcalTestPulseAnalyzer().

std::string EcalTestPulseAnalyzer::resfile
private

Definition at line 75 of file EcalTestPulseAnalyzer.h.

Referenced by beginJob(), and endJob().

TFile* EcalTestPulseAnalyzer::resFile
private

Definition at line 106 of file EcalTestPulseAnalyzer.h.

Referenced by endJob().

TTree* EcalTestPulseAnalyzer::respntrees
private

Definition at line 131 of file EcalTestPulseAnalyzer.h.

Referenced by endJob().

TTree* EcalTestPulseAnalyzer::restrees
private

Definition at line 130 of file EcalTestPulseAnalyzer.h.

Referenced by endJob().

double EcalTestPulseAnalyzer::ret_data[20]
private

Definition at line 89 of file EcalTestPulseAnalyzer.h.

Referenced by analyze().

std::string EcalTestPulseAnalyzer::rootfile
private

Definition at line 74 of file EcalTestPulseAnalyzer.h.

Referenced by beginJob(), and endJob().

int EcalTestPulseAnalyzer::runNum
private

Definition at line 97 of file EcalTestPulseAnalyzer.h.

Referenced by analyze().

int EcalTestPulseAnalyzer::runType
private

Definition at line 96 of file EcalTestPulseAnalyzer.h.

Referenced by analyze().

int EcalTestPulseAnalyzer::side
private

Definition at line 100 of file EcalTestPulseAnalyzer.h.

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

int EcalTestPulseAnalyzer::towerID
private

Definition at line 91 of file EcalTestPulseAnalyzer.h.

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

int EcalTestPulseAnalyzer::TPEvents
private

Definition at line 87 of file EcalTestPulseAnalyzer.h.

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

TTree* EcalTestPulseAnalyzer::trees[1700]
private

Definition at line 110 of file EcalTestPulseAnalyzer.h.

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