CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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

virtual void analyze (const edm::Event &e, const edm::EventSetup &c)
 
virtual void beginJob ()
 
 EcalTestPulseAnalyzer (const edm::ParameterSet &iConfig)
 
virtual void endJob ()
 
 ~EcalTestPulseAnalyzer ()
 
- Public Member Functions inherited from edm::EDAnalyzer
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzer ()
 
ModuleDescription const & moduleDescription () const
 
std::string workerType () const
 
virtual ~EDAnalyzer ()
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
 EDConsumerBase ()
 
ProductHolderIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
std::vector
< ProductHolderIndexAndSkipBit >
const & 
itemsToGetFromEvent () const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesDependentUpon (const std::string &iProcessName, std::vector< const char * > &oModuleLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
bool registeredToConsume (ProductHolderIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

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 &)
 
- 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 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 36 of file EcalTestPulseAnalyzer.h.

Constructor & Destructor Documentation

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

Definition at line 49 of file EcalTestPulseAnalyzer.cc.

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

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

Definition at line 118 of file EcalTestPulseAnalyzer.cc.

118  {
119  //========================================================================
120 
121  // do anything here that needs to be done at desctruction time
122  // (e.g. close files, deallocate resources etc.)
123 
124 }

Member Function Documentation

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

Implements edm::EDAnalyzer.

Definition at line 206 of file EcalTestPulseAnalyzer.cc.

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

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

Reimplemented from edm::EDAnalyzer.

Definition at line 129 of file EcalTestPulseAnalyzer.cc.

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

129  {
130  //========================================================================
131 
132  // Define temporary file
133 
135  rootfile+="/TmpTreeTestPulseAnalyzer.root";
136 
137  outFile = new TFile(rootfile.c_str(),"RECREATE");
138 
139  for (unsigned int i=0;i<nCrys;i++){
140 
141  std::stringstream name;
142  name << "Tree" <<i;
143 
144  trees[i]= new TTree(name.str().c_str(),name.str().c_str());
145 
146  //List of branches
147 
148  trees[i]->Branch( "iphi", &phi, "phi/I" );
149  trees[i]->Branch( "ieta", &eta, "eta/I" );
150  trees[i]->Branch( "side", &side, "side/I" );
151  trees[i]->Branch( "dccID", &dccID, "dccID/I" );
152  trees[i]->Branch( "towerID", &towerID, "towerID/I" );
153  trees[i]->Branch( "channelID", &channelID, "channelID/I" );
154  trees[i]->Branch( "event", &event, "event/I" );
155  trees[i]->Branch( "apdGain", &apdGain, "apdGain/I" );
156  trees[i]->Branch( "pnGain", &pnGain, "pnGain/I" );
157  trees[i]->Branch( "apdAmpl", &apdAmpl, "apdAmpl/D" );
158  trees[i]->Branch( "pnAmpl0", &pnAmpl0, "pnAmpl0/D" );
159  trees[i]->Branch( "pnAmpl1", &pnAmpl1, "pnAmpl1/D" );
160 
161  trees[i]->SetBranchAddress( "ieta", &eta );
162  trees[i]->SetBranchAddress( "iphi", &phi );
163  trees[i]->SetBranchAddress( "side", &side );
164  trees[i]->SetBranchAddress( "dccID", &dccID );
165  trees[i]->SetBranchAddress( "towerID", &towerID );
166  trees[i]->SetBranchAddress( "channelID", &channelID );
167  trees[i]->SetBranchAddress( "event", &event );
168  trees[i]->SetBranchAddress( "apdGain", &apdGain );
169  trees[i]->SetBranchAddress( "pnGain", &pnGain );
170  trees[i]->SetBranchAddress( "apdAmpl", &apdAmpl );
171  trees[i]->SetBranchAddress( "pnAmpl0", &pnAmpl0 );
172  trees[i]->SetBranchAddress( "pnAmpl1", &pnAmpl1 );
173 
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;
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 
202 }
int i
Definition: DBlmapReader.cc:9
unsigned int iModule[1700]
int j
Definition: DBlmapReader.cc:9
unsigned int isFirstChanModFilled[9]
void EcalTestPulseAnalyzer::endJob ( void  )
virtual

Reimplemented from edm::EDAnalyzer.

Definition at line 636 of file EcalTestPulseAnalyzer.cc.

References TMom::addEntry(), APD, apdAmpl, apdGain, channelID, gather_cfg::cout, 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, j, moduleID, nCrys, nGainAPD, nGainPN, nMod, outFile, PN, pnAmpl0, pnAmpl1, pnGain, pnID, resfile, resFile, respntrees, restrees, rootfile, side, towerID, TPEvents, and trees.

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

Member Data Documentation

double EcalTestPulseAnalyzer::_chi2max
private

Definition at line 66 of file EcalTestPulseAnalyzer.h.

Referenced by analyze().

std::string EcalTestPulseAnalyzer::_ecalPart
private

Definition at line 68 of file EcalTestPulseAnalyzer.h.

Referenced by analyze(), and EcalTestPulseAnalyzer().

int EcalTestPulseAnalyzer::_fedid
private

Definition at line 69 of file EcalTestPulseAnalyzer.h.

Referenced by analyze(), and EcalTestPulseAnalyzer().

unsigned int EcalTestPulseAnalyzer::_firstsample
private

Definition at line 57 of file EcalTestPulseAnalyzer.h.

Referenced by analyze().

unsigned int EcalTestPulseAnalyzer::_firstsamplePN
private

Definition at line 63 of file EcalTestPulseAnalyzer.h.

Referenced by analyze().

unsigned int EcalTestPulseAnalyzer::_lastsample
private

Definition at line 58 of file EcalTestPulseAnalyzer.h.

Referenced by analyze().

unsigned int EcalTestPulseAnalyzer::_lastsamplePN
private

Definition at line 64 of file EcalTestPulseAnalyzer.h.

Referenced by analyze().

unsigned int EcalTestPulseAnalyzer::_niter
private

Definition at line 65 of file EcalTestPulseAnalyzer.h.

Referenced by analyze().

unsigned int EcalTestPulseAnalyzer::_nsamples
private

Definition at line 55 of file EcalTestPulseAnalyzer.h.

Referenced by analyze().

unsigned int EcalTestPulseAnalyzer::_nsamplesPN
private

Definition at line 61 of file EcalTestPulseAnalyzer.h.

Referenced by analyze().

unsigned int EcalTestPulseAnalyzer::_presample
private

Definition at line 56 of file EcalTestPulseAnalyzer.h.

Referenced by analyze().

unsigned int EcalTestPulseAnalyzer::_presamplePN
private

Definition at line 62 of file EcalTestPulseAnalyzer.h.

Referenced by analyze().

unsigned int EcalTestPulseAnalyzer::_samplemax
private

Definition at line 60 of file EcalTestPulseAnalyzer.h.

Referenced by analyze().

unsigned int EcalTestPulseAnalyzer::_samplemin
private

Definition at line 59 of file EcalTestPulseAnalyzer.h.

Referenced by analyze().

double EcalTestPulseAnalyzer::_timeofmax
private

Definition at line 67 of file EcalTestPulseAnalyzer.h.

Referenced by analyze().

double EcalTestPulseAnalyzer::adc[10]
private

Definition at line 126 of file EcalTestPulseAnalyzer.h.

Referenced by analyze().

double EcalTestPulseAnalyzer::APD[6]
private

Definition at line 155 of file EcalTestPulseAnalyzer.h.

Referenced by endJob().

double EcalTestPulseAnalyzer::apdAmpl
private

Definition at line 132 of file EcalTestPulseAnalyzer.h.

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

int EcalTestPulseAnalyzer::apdGain
private

Definition at line 129 of file EcalTestPulseAnalyzer.h.

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

double EcalTestPulseAnalyzer::apdTime
private

Definition at line 133 of file EcalTestPulseAnalyzer.h.

Referenced by analyze().

int EcalTestPulseAnalyzer::channelID
private

Definition at line 100 of file EcalTestPulseAnalyzer.h.

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

int EcalTestPulseAnalyzer::channelIteratorEE
private

Definition at line 154 of file EcalTestPulseAnalyzer.h.

Referenced by analyze().

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

Definition at line 145 of file EcalTestPulseAnalyzer.h.

Referenced by analyze().

int EcalTestPulseAnalyzer::dccID
private

Definition at line 107 of file EcalTestPulseAnalyzer.h.

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

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

Definition at line 146 of file EcalTestPulseAnalyzer.h.

Referenced by analyze(), and EcalTestPulseAnalyzer().

std::string EcalTestPulseAnalyzer::digiCollection_
private

Definition at line 72 of file EcalTestPulseAnalyzer.h.

Referenced by analyze(), and EcalTestPulseAnalyzer().

std::string EcalTestPulseAnalyzer::digiPNCollection_
private

Definition at line 73 of file EcalTestPulseAnalyzer.h.

Referenced by analyze(), and EcalTestPulseAnalyzer().

std::string EcalTestPulseAnalyzer::digiProducer_
private

Definition at line 74 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 75 of file EcalTestPulseAnalyzer.h.

Referenced by analyze(), and EcalTestPulseAnalyzer().

std::string EcalTestPulseAnalyzer::eventHeaderProducer_
private

Definition at line 76 of file EcalTestPulseAnalyzer.h.

Referenced by analyze(), and EcalTestPulseAnalyzer().

int EcalTestPulseAnalyzer::fedID
private

Definition at line 106 of file EcalTestPulseAnalyzer.h.

Referenced by analyze().

unsigned int EcalTestPulseAnalyzer::firstChanMod[9]
private

Definition at line 161 of file EcalTestPulseAnalyzer.h.

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

int EcalTestPulseAnalyzer::flag
private

Definition at line 152 of file EcalTestPulseAnalyzer.h.

Referenced by endJob().

int EcalTestPulseAnalyzer::gain
private

Definition at line 152 of file EcalTestPulseAnalyzer.h.

Referenced by endJob().

int EcalTestPulseAnalyzer::iChannelID[1700]
private

Definition at line 159 of file EcalTestPulseAnalyzer.h.

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

int EcalTestPulseAnalyzer::idccID[1700]
private

Definition at line 159 of file EcalTestPulseAnalyzer.h.

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

int EcalTestPulseAnalyzer::ieta
private

Definition at line 152 of file EcalTestPulseAnalyzer.h.

Referenced by endJob().

int EcalTestPulseAnalyzer::iEta[1700]
private

Definition at line 157 of file EcalTestPulseAnalyzer.h.

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

int EcalTestPulseAnalyzer::iEvent
private

Definition at line 51 of file EcalTestPulseAnalyzer.h.

Referenced by analyze().

unsigned int EcalTestPulseAnalyzer::iModule[1700]
private

Definition at line 158 of file EcalTestPulseAnalyzer.h.

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

int EcalTestPulseAnalyzer::iphi
private

Definition at line 152 of file EcalTestPulseAnalyzer.h.

Referenced by endJob().

int EcalTestPulseAnalyzer::iPhi[1700]
private

Definition at line 157 of file EcalTestPulseAnalyzer.h.

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

unsigned int EcalTestPulseAnalyzer::isFirstChanModFilled[9]
private

Definition at line 162 of file EcalTestPulseAnalyzer.h.

Referenced by analyze(), and beginJob().

int EcalTestPulseAnalyzer::iside[1700]
private

Definition at line 159 of file EcalTestPulseAnalyzer.h.

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

int EcalTestPulseAnalyzer::iTowerID[1700]
private

Definition at line 159 of file EcalTestPulseAnalyzer.h.

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

int EcalTestPulseAnalyzer::iZ
private

Definition at line 109 of file EcalTestPulseAnalyzer.h.

Referenced by analyze(), and EcalTestPulseAnalyzer().

int EcalTestPulseAnalyzer::moduleID
private

Definition at line 153 of file EcalTestPulseAnalyzer.h.

Referenced by endJob().

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

Definition at line 147 of file EcalTestPulseAnalyzer.h.

Referenced by analyze(), and EcalTestPulseAnalyzer().

unsigned int EcalTestPulseAnalyzer::nCrys
private

Definition at line 87 of file EcalTestPulseAnalyzer.h.

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

unsigned int EcalTestPulseAnalyzer::nGainAPD
private

Definition at line 91 of file EcalTestPulseAnalyzer.h.

Referenced by endJob().

unsigned int EcalTestPulseAnalyzer::nGainPN
private

Definition at line 90 of file EcalTestPulseAnalyzer.h.

Referenced by endJob().

unsigned int EcalTestPulseAnalyzer::nMod
private

Definition at line 89 of file EcalTestPulseAnalyzer.h.

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

unsigned int EcalTestPulseAnalyzer::nTT
private

Definition at line 88 of file EcalTestPulseAnalyzer.h.

Referenced by EcalTestPulseAnalyzer().

TFile* EcalTestPulseAnalyzer::outFile
private

Definition at line 114 of file EcalTestPulseAnalyzer.h.

Referenced by beginJob(), and endJob().

int EcalTestPulseAnalyzer::phi
private

Definition at line 124 of file EcalTestPulseAnalyzer.h.

Referenced by Particle.Particle::__str__(), analyze(), and beginJob().

double EcalTestPulseAnalyzer::pn[50]
private

Definition at line 127 of file EcalTestPulseAnalyzer.h.

Referenced by analyze().

double EcalTestPulseAnalyzer::PN[6]
private

Definition at line 155 of file EcalTestPulseAnalyzer.h.

Referenced by endJob().

double EcalTestPulseAnalyzer::pnAmpl
private

Definition at line 136 of file EcalTestPulseAnalyzer.h.

Referenced by analyze().

double EcalTestPulseAnalyzer::pnAmpl0
private

Definition at line 134 of file EcalTestPulseAnalyzer.h.

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

double EcalTestPulseAnalyzer::pnAmpl1
private

Definition at line 135 of file EcalTestPulseAnalyzer.h.

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

int EcalTestPulseAnalyzer::pnG
private

Definition at line 131 of file EcalTestPulseAnalyzer.h.

Referenced by analyze().

int EcalTestPulseAnalyzer::pnGain
private

Definition at line 130 of file EcalTestPulseAnalyzer.h.

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

int EcalTestPulseAnalyzer::pnID
private

Definition at line 153 of file EcalTestPulseAnalyzer.h.

Referenced by endJob().

std::string EcalTestPulseAnalyzer::resdir_
private

Definition at line 71 of file EcalTestPulseAnalyzer.h.

Referenced by beginJob(), and EcalTestPulseAnalyzer().

std::string EcalTestPulseAnalyzer::resfile
private

Definition at line 82 of file EcalTestPulseAnalyzer.h.

Referenced by beginJob(), and endJob().

TFile* EcalTestPulseAnalyzer::resFile
private

Definition at line 115 of file EcalTestPulseAnalyzer.h.

Referenced by endJob().

TTree* EcalTestPulseAnalyzer::respntrees
private

Definition at line 142 of file EcalTestPulseAnalyzer.h.

Referenced by endJob().

TTree* EcalTestPulseAnalyzer::restrees
private

Definition at line 141 of file EcalTestPulseAnalyzer.h.

Referenced by endJob().

double EcalTestPulseAnalyzer::ret_data[20]
private

Definition at line 97 of file EcalTestPulseAnalyzer.h.

Referenced by analyze().

std::string EcalTestPulseAnalyzer::rootfile
private

Definition at line 81 of file EcalTestPulseAnalyzer.h.

Referenced by beginJob(), and endJob().

int EcalTestPulseAnalyzer::runNum
private

Definition at line 105 of file EcalTestPulseAnalyzer.h.

Referenced by analyze().

int EcalTestPulseAnalyzer::runType
private

Definition at line 104 of file EcalTestPulseAnalyzer.h.

Referenced by analyze().

int EcalTestPulseAnalyzer::side
private

Definition at line 108 of file EcalTestPulseAnalyzer.h.

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

int EcalTestPulseAnalyzer::towerID
private

Definition at line 99 of file EcalTestPulseAnalyzer.h.

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

int EcalTestPulseAnalyzer::TPEvents
private

Definition at line 95 of file EcalTestPulseAnalyzer.h.

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

TTree* EcalTestPulseAnalyzer::trees[1700]
private

Definition at line 120 of file EcalTestPulseAnalyzer.h.

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