CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes
HGCalTBAnalyzer Class Reference
Inheritance diagram for HGCalTBAnalyzer:
edm::one::EDAnalyzer< edm::one::WatchRuns, edm::one::SharedResources > edm::one::EDAnalyzerBase edm::EDConsumerBase

Public Member Functions

 HGCalTBAnalyzer (edm::ParameterSet const &)
 
 ~HGCalTBAnalyzer ()
 
- Public Member Functions inherited from edm::one::EDAnalyzer< edm::one::WatchRuns, edm::one::SharedResources >
 EDAnalyzer ()=default
 
- Public Member Functions inherited from edm::one::EDAnalyzerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzerBase ()
 
ModuleDescription const & moduleDescription () const
 
virtual ~EDAnalyzerBase ()
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
 EDConsumerBase ()
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
 EDConsumerBase (EDConsumerBase &&)=default
 
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 & itemsToGetFromEvent () 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
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
virtual ~EDConsumerBase () noexcept(false)
 

Static Public Member Functions

static void fillDescriptions (edm::ConfigurationDescriptions &descriptions)
 
- Static Public Member Functions inherited from edm::one::EDAnalyzerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 

Private Member Functions

virtual void analyze (edm::Event const &, edm::EventSetup const &) override
 
template<class T1 >
void analyzeDigi (int type, const T1 &detId, uint16_t adc)
 
void analyzeRecHits (int type, edm::Handle< HGCRecHitCollection > &hits)
 
void analyzeSimHits (int type, std::vector< PCaloHit > &hits, double zFront)
 
void analyzeSimTracks (edm::Handle< edm::SimTrackContainer > const &SimTk, edm::Handle< edm::SimVertexContainer > const &SimVtx)
 
virtual void beginJob () override
 
virtual void beginRun (edm::Run const &, edm::EventSetup const &) override
 
virtual void endRun (edm::Run const &, edm::EventSetup const &) override
 

Private Attributes

std::string detectorBeam_
 
std::string detectorBH_
 
std::string detectorEE_
 
std::string detectorFH_
 
bool doDigis_
 
bool doRecHits_
 
bool doSimHits_
 
bool doTree_
 
bool doTreeCell_
 
edm::Service< TFileServicefs_
 
TH1D * hBeam_
 
TH1D * hDigiADC_ [3]
 
TH1D * hDigiLng_ [2]
 
TH2D * hDigiOcc_ [3]
 
const HGCalDDDConstantshgcons_ [2]
 
const HGCalGeometryhgeom_ [2]
 
TH1D * hRecHitE_ [3]
 
TProfile2D * hRecHitLat_ [3]
 
TProfile * hRecHitLng1_ [3]
 
TProfile * hRecHitLng_ [3]
 
TH2D * hRecHitOcc_ [3]
 
TH1D * hSimHitE_ [4]
 
TH1D * hSimHitEn_ [4]
 
TProfile2D * hSimHitLat_ [3]
 
std::vector< TH1D * > hSimHitLayEn1BH_
 
std::vector< TH1D * > hSimHitLayEn1EE_
 
std::vector< TH1D * > hSimHitLayEn1FH_
 
std::vector< TH1D * > hSimHitLayEn2BH_
 
std::vector< TH1D * > hSimHitLayEn2EE_
 
std::vector< TH1D * > hSimHitLayEn2FH_
 
std::vector< TH1D * > hSimHitLayEnBeam_
 
TProfile * hSimHitLng1_ [3]
 
TProfile * hSimHitLng2_ [3]
 
TProfile * hSimHitLng_ [3]
 
TH1D * hSimHitT_ [4]
 
std::vector< int > idBeams_
 
bool ifBeam_
 
bool ifBH_
 
bool ifEE_
 
bool ifFH_
 
double pBeam
 
int sampleIndex_
 
std::vector< float > simHitCellEnBeam
 
std::vector< float > simHitCellEnBH
 
std::vector< float > simHitCellEnEE
 
std::vector< float > simHitCellEnFH
 
std::vector< uint32_t > simHitCellIdBeam
 
std::vector< uint32_t > simHitCellIdBH
 
std::vector< uint32_t > simHitCellIdEE
 
std::vector< uint32_t > simHitCellIdFH
 
std::vector< float > simHitLayEn1BH
 
std::vector< float > simHitLayEn1EE
 
std::vector< float > simHitLayEn1FH
 
std::vector< float > simHitLayEn2BH
 
std::vector< float > simHitLayEn2EE
 
std::vector< float > simHitLayEn2FH
 
std::vector< float > simHitLayEnBeam
 
edm::EDGetToken tok_digiBH_
 
edm::EDGetToken tok_digiEE_
 
edm::EDGetToken tok_digiFH_
 
edm::EDGetTokenT< edm::HepMCProducttok_hepMC_
 
edm::EDGetToken tok_hitrBH_
 
edm::EDGetToken tok_hitrEE_
 
edm::EDGetToken tok_hitrFH_
 
edm::EDGetTokenT< edm::PCaloHitContainertok_hitsBeam_
 
edm::EDGetTokenT< edm::PCaloHitContainertok_hitsBH_
 
edm::EDGetTokenT< edm::PCaloHitContainertok_hitsEE_
 
edm::EDGetTokenT< edm::PCaloHitContainertok_hitsFH_
 
edm::EDGetTokenT< edm::SimTrackContainertok_simTk_
 
edm::EDGetTokenT< edm::SimVertexContainertok_simVtx_
 
TTree * tree_
 
double xBeam
 
double yBeam
 
double zBeam
 
double zFrontBH_
 
double zFrontEE_
 
double zFrontFH_
 

Additional Inherited Members

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

Constructor & Destructor Documentation

HGCalTBAnalyzer::HGCalTBAnalyzer ( edm::ParameterSet const &  )
explicit

Definition at line 114 of file HGCalTBAnalyzer.cc.

References gather_cfg::cout, detectorBeam_, detectorBH_, detectorEE_, detectorFH_, doDigis_, doRecHits_, doSimHits_, doTree_, doTreeCell_, edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), hcalTTPDigis_cfi::id, idBeams_, ifBeam_, ifBH_, ifEE_, ifFH_, sampleIndex_, AlCaHLTBitMon_QueryRunRegistry::string, tok_digiBH_, tok_digiEE_, tok_digiFH_, tok_hepMC_, tok_hitrBH_, tok_hitrEE_, tok_hitrFH_, tok_hitsBeam_, tok_hitsBH_, tok_hitsEE_, tok_hitsFH_, tok_simTk_, tok_simVtx_, zFrontBH_, zFrontEE_, and zFrontFH_.

114  {
115 
116  usesResource("TFileService");
117 
118  //now do whatever initialization is needed
119  detectorEE_ = iConfig.getParameter<std::string>("DetectorEE");
120  detectorFH_ = iConfig.getParameter<std::string>("DetectorFH");
121  detectorBH_ = iConfig.getParameter<std::string>("DetectorBH");
122  detectorBeam_= iConfig.getParameter<std::string>("DetectorBeam");
123  ifEE_ = iConfig.getParameter<bool>("UseEE");
124  ifFH_ = iConfig.getParameter<bool>("UseFH");
125  ifBH_ = iConfig.getParameter<bool>("UseBH");
126  ifBeam_ = iConfig.getParameter<bool>("UseBeam");
127  zFrontEE_ = iConfig.getParameter<double>("ZFrontEE");
128  zFrontFH_ = iConfig.getParameter<double>("ZFrontFH");
129  zFrontBH_ = iConfig.getParameter<double>("ZFrontBH");
130  idBeams_ = iConfig.getParameter<std::vector<int>>("IDBeams");
131  doSimHits_ = iConfig.getParameter<bool>("DoSimHits");
132  doDigis_ = iConfig.getParameter<bool>("DoDigis");
133  sampleIndex_ = iConfig.getParameter<int>("SampleIndex");
134  doRecHits_ = iConfig.getParameter<bool>("DoRecHits");
135  doTree_ = iConfig.getUntrackedParameter<bool>("DoTree",false);
136  doTreeCell_ = iConfig.getUntrackedParameter<bool>("DoTreeCell",false);
137 #ifdef EDM_ML_DEBUG
138  std::cout << "HGCalTBAnalyzer:: SimHits = " << doSimHits_ << " Digis = "
139  << doDigis_ << ":" << sampleIndex_ << " RecHits = " << doRecHits_
140  << " useDets " << ifEE_ << ":" << ifFH_ << ":" << ifBH_ << ":"
141  << ifBeam_ << " zFront " << zFrontEE_ << ":" << zFrontFH_ << ":"
142  << zFrontBH_ << " IdBeam " << idBeams_.size() << ":";
143  for (auto id : idBeams_) std::cout << " " << id;
144  std::cout << std::endl;
145 #endif
146  if (idBeams_.size() == 0) idBeams_.push_back(1001);
147 
148  edm::InputTag tmp0 = iConfig.getParameter<edm::InputTag>("GeneratorSrc");
149  tok_hepMC_ = consumes<edm::HepMCProduct>(tmp0);
150 #ifdef EDM_ML_DEBUG
151  std::cout << "HGCalTBAnalyzer:: GeneratorSource = " << tmp0 << std::endl;
152 #endif
153  std::string tmp1 = iConfig.getParameter<std::string>("CaloHitSrcEE");
154  tok_hitsEE_ = consumes<edm::PCaloHitContainer>(edm::InputTag("g4SimHits",tmp1));
155  tok_simTk_ = consumes<edm::SimTrackContainer>(edm::InputTag("g4SimHits"));
156  tok_simVtx_ = consumes<edm::SimVertexContainer>(edm::InputTag("g4SimHits"));
157  edm::InputTag tmp2 = iConfig.getParameter<edm::InputTag>("DigiSrcEE");
158  tok_digiEE_ = consumes<HGCEEDigiCollection>(tmp2);
159  edm::InputTag tmp3 = iConfig.getParameter<edm::InputTag>("RecHitSrcEE");
160  tok_hitrEE_ = consumes<HGCRecHitCollection>(tmp3);
161 #ifdef EDM_ML_DEBUG
162  if (ifEE_) {
163  std::cout << "HGCalTBAnalyzer:: Detector " << detectorEE_ << " with tags "
164  << tmp1 << ", " << tmp2 << ", " << tmp3 << std::endl;
165  }
166 #endif
167  tmp1 = iConfig.getParameter<std::string>("CaloHitSrcFH");
168  tok_hitsFH_ = consumes<edm::PCaloHitContainer>(edm::InputTag("g4SimHits",tmp1));
169  tmp2 = iConfig.getParameter<edm::InputTag>("DigiSrcFH");
170  tok_digiFH_ = consumes<HGCHEDigiCollection>(tmp2);
171  tmp3 = iConfig.getParameter<edm::InputTag>("RecHitSrcFH");
172  tok_hitrFH_ = consumes<HGCRecHitCollection>(tmp3);
173 #ifdef EDM_ML_DEBUG
174  if (ifFH_) {
175  std::cout << "HGCalTBAnalyzer:: Detector " << detectorFH_ << " with tags "
176  << tmp1 << ", " << tmp2 << ", " << tmp3 << std::endl;
177  }
178 #endif
179  tmp1 = iConfig.getParameter<std::string>("CaloHitSrcBH");
180  tok_hitsBH_ = consumes<edm::PCaloHitContainer>(edm::InputTag("g4SimHits",tmp1));
181  tmp2 = iConfig.getParameter<edm::InputTag>("DigiSrcBH");
182  tok_digiBH_ = consumes<HGCBHDigiCollection>(tmp2);
183  tmp3 = iConfig.getParameter<edm::InputTag>("RecHitSrcBH");
184  tok_hitrBH_ = consumes<HGCRecHitCollection>(tmp3);
185 #ifdef EDM_ML_DEBUG
186  if (ifBH_) {
187  std::cout << "HGCalTBAnalyzer:: Detector " << detectorBH_ << " with tags "
188  << tmp1 << ", " << tmp2 << ", " << tmp3 << std::endl;
189  }
190 #endif
191  tmp1 = iConfig.getParameter<std::string>("CaloHitSrcBeam");
192  tok_hitsBeam_= consumes<edm::PCaloHitContainer>(edm::InputTag("g4SimHits",tmp1));
193 #ifdef EDM_ML_DEBUG
194  if (ifBeam_) {
195  std::cout << "HGCalTBAnalyzer:: Detector " << detectorBeam_ << " with tags "
196  << tmp1 << std::endl;
197  }
198 #endif
199 }
std::string detectorEE_
std::string detectorBH_
edm::EDGetToken tok_hitrBH_
std::string detectorFH_
edm::EDGetToken tok_digiFH_
edm::EDGetTokenT< edm::PCaloHitContainer > tok_hitsFH_
edm::EDGetTokenT< edm::PCaloHitContainer > tok_hitsBH_
std::vector< int > idBeams_
edm::EDGetTokenT< edm::SimTrackContainer > tok_simTk_
edm::EDGetToken tok_hitrFH_
edm::EDGetTokenT< edm::PCaloHitContainer > tok_hitsBeam_
edm::EDGetTokenT< edm::HepMCProduct > tok_hepMC_
std::string detectorBeam_
edm::EDGetTokenT< edm::PCaloHitContainer > tok_hitsEE_
edm::EDGetToken tok_digiBH_
edm::EDGetToken tok_hitrEE_
edm::EDGetTokenT< edm::SimVertexContainer > tok_simVtx_
edm::EDGetToken tok_digiEE_
HGCalTBAnalyzer::~HGCalTBAnalyzer ( )

Definition at line 201 of file HGCalTBAnalyzer.cc.

201 {}

Member Function Documentation

void HGCalTBAnalyzer::analyze ( edm::Event const &  ,
edm::EventSetup const &   
)
overrideprivatevirtual

Implements edm::one::EDAnalyzerBase.

Definition at line 434 of file HGCalTBAnalyzer.cc.

References ecalMGPA::adc(), analyzeDigi(), analyzeRecHits(), analyzeSimHits(), analyzeSimTracks(), edm::SortedCollection< T, SORT >::begin(), edm::HandleBase::clear(), gather_cfg::cout, HGCSample::data(), detectorBeam_, detectorBH_, detectorEE_, detectorFH_, doDigis_, doRecHits_, doSimHits_, doTree_, edm::SortedCollection< T, SORT >::end(), edm::Event::getByToken(), edm::HepMCProduct::GetEvent(), hBeam_, hgcons_, idBeams_, ifBeam_, ifBH_, ifEE_, ifFH_, edm::HandleBase::isValid(), gen::k, HGCalDDDConstants::layers(), AHCalDetId::MaxDepth, AlCaHLTBitMon_ParallelJobs::p, sampleIndex_, simHitCellEnBeam, simHitCellEnBH, simHitCellEnEE, simHitCellEnFH, simHitCellIdBeam, simHitCellIdBH, simHitCellIdEE, simHitCellIdFH, simHitLayEn1BH, simHitLayEn1EE, simHitLayEn1FH, simHitLayEn2BH, simHitLayEn2EE, simHitLayEn2FH, simHitLayEnBeam, edm::SortedCollection< T, SORT >::size(), tok_digiEE_, tok_digiFH_, tok_hepMC_, tok_hitrEE_, tok_hitrFH_, tok_hitsBeam_, tok_hitsBH_, tok_hitsEE_, tok_hitsFH_, tok_simTk_, tok_simVtx_, tree_, zFrontBH_, zFrontEE_, and zFrontFH_.

Referenced by endRun().

435  {
436 
437  //Generator input
439  iEvent.getByToken(tok_hepMC_,evtMC);
440  if (!evtMC.isValid()) {
441  edm::LogWarning("HGCal") << "no HepMCProduct found";
442  } else {
443  const HepMC::GenEvent * myGenEvent = evtMC->GetEvent();
444  unsigned int k(0);
445  for (HepMC::GenEvent::particle_const_iterator p = myGenEvent->particles_begin();
446  p != myGenEvent->particles_end(); ++p, ++k) {
447  if (k == 0) hBeam_->Fill((*p)->momentum().rho());
448 #ifdef EDM_ML_DEBUG
449  std::cout << "Particle[" << k << "] with p " << (*p)->momentum().rho()
450  << " theta " << (*p)->momentum().theta() << " phi "
451  << (*p)->momentum().phi() << std::endl;
452 #endif
453  }
454  }
455 
456  //Now the Simhits
457  if (doSimHits_) {
459  iEvent.getByToken(tok_simTk_, SimTk);
461  iEvent.getByToken(tok_simVtx_, SimVtx);
462  analyzeSimTracks(SimTk, SimVtx);
463 
464  simHitLayEn1EE.clear(); simHitLayEn2EE.clear();
465  simHitLayEn1FH.clear(); simHitLayEn2FH.clear();
466  simHitLayEn1BH.clear(); simHitLayEn2BH.clear();
467  simHitLayEnBeam.clear();
468  simHitCellIdEE.clear(); simHitCellEnEE.clear();
469  simHitCellIdFH.clear(); simHitCellEnFH.clear();
470  simHitCellIdBH.clear(); simHitCellEnBH.clear();
471  simHitCellIdBeam.clear(); simHitCellEnBeam.clear();
472  edm::Handle<edm::PCaloHitContainer> theCaloHitContainers;
473  std::vector<PCaloHit> caloHits;
474  if (ifEE_) {
475  simHitLayEn1EE = std::vector<float>(hgcons_[0]->layers(false),0);
476  simHitLayEn2EE = std::vector<float>(hgcons_[0]->layers(true),0);
477  iEvent.getByToken(tok_hitsEE_, theCaloHitContainers);
478  if (theCaloHitContainers.isValid()) {
479 #ifdef EDM_ML_DEBUG
480  std::cout << "PcalohitContainer for " << detectorEE_ << " has "
481  << theCaloHitContainers->size() << " hits" << std::endl;
482 #endif
483  caloHits.clear();
484  caloHits.insert(caloHits.end(), theCaloHitContainers->begin(),
485  theCaloHitContainers->end());
486  analyzeSimHits(0, caloHits, zFrontEE_);
487  } else {
488 #ifdef EDM_ML_DEBUG
489  std::cout << "PCaloHitContainer does not exist for " << detectorEE_
490  << " !!!" << std::endl;
491 #endif
492  }
493  }
494  if (ifFH_) {
495  simHitLayEn1FH = std::vector<float>(hgcons_[1]->layers(false),0);
496  simHitLayEn2FH = std::vector<float>(hgcons_[1]->layers(true),0);
497  iEvent.getByToken(tok_hitsFH_, theCaloHitContainers);
498  if (theCaloHitContainers.isValid()) {
499 #ifdef EDM_ML_DEBUG
500  std::cout << "PcalohitContainer for " << detectorFH_ << " has "
501  << theCaloHitContainers->size() << " hits" << std::endl;
502 #endif
503  caloHits.clear();
504  caloHits.insert(caloHits.end(), theCaloHitContainers->begin(),
505  theCaloHitContainers->end());
506  analyzeSimHits(1, caloHits, zFrontFH_);
507  } else {
508 #ifdef EDM_ML_DEBUG
509  std::cout << "PCaloHitContainer does not exist for " << detectorFH_
510  << " !!!" << std::endl;
511 #endif
512  }
513  }
514  if (ifBH_) {
515  simHitLayEn1BH = std::vector<float>(AHCalDetId::MaxDepth,0);
516  simHitLayEn2BH = std::vector<float>(AHCalDetId::MaxDepth,0);
517  iEvent.getByToken(tok_hitsBH_, theCaloHitContainers);
518  if (theCaloHitContainers.isValid()) {
519 #ifdef EDM_ML_DEBUG
520  std::cout << "PcalohitContainer for " << detectorBH_ << " has "
521  << theCaloHitContainers->size() << " hits" << std::endl;
522 #endif
523  caloHits.clear();
524  caloHits.insert(caloHits.end(), theCaloHitContainers->begin(),
525  theCaloHitContainers->end());
526  analyzeSimHits(2, caloHits, zFrontBH_);
527  } else {
528 #ifdef EDM_ML_DEBUG
529  std::cout << "PCaloHitContainer does not exist for " << detectorBH_
530  << " !!!" << std::endl;
531 #endif
532  }
533  }
534  if (ifBeam_) {
535  simHitLayEnBeam= std::vector<float>(idBeams_.size(),0);
536  iEvent.getByToken(tok_hitsBeam_, theCaloHitContainers);
537  if (theCaloHitContainers.isValid()) {
538 #ifdef EDM_ML_DEBUG
539  std::cout << "PcalohitContainer for " << detectorBeam_ << " has "
540  << theCaloHitContainers->size() << " hits" << std::endl;
541 #endif
542  caloHits.clear();
543  caloHits.insert(caloHits.end(), theCaloHitContainers->begin(),
544  theCaloHitContainers->end());
545  analyzeSimHits(3, caloHits, 0.0);
546  } else {
547 #ifdef EDM_ML_DEBUG
548  std::cout << "PCaloHitContainer does not exist for " << detectorBeam_
549  << " !!!" << std::endl;
550 #endif
551  }
552  }
553  if (doTree_) tree_->Fill();
554  }
555 
556  //Now the Digis
557  if (doDigis_) {
558  if (ifEE_) {
559  edm::Handle<HGCEEDigiCollection> theDigiContainers;
560  iEvent.getByToken(tok_digiEE_, theDigiContainers);
561  if (theDigiContainers.isValid()) {
562 #ifdef EDM_ML_DEBUG
563  std::cout << "HGCDigiCintainer for " << detectorEE_ << " with "
564  << theDigiContainers->size() << " element(s)" << std::endl;
565 #endif
566  for (HGCEEDigiCollection::const_iterator it =theDigiContainers->begin();
567  it !=theDigiContainers->end(); ++it) {
568  HGCEEDetId detId = (it->id());
569  HGCSample hgcSample = it->sample(sampleIndex_);
570  uint16_t adc = hgcSample.data();
571  analyzeDigi(0, detId, adc);
572  }
573  }
574  }
575  if (ifFH_) {
576  edm::Handle<HGCHEDigiCollection> theDigiContainers;
577  iEvent.getByToken(tok_digiFH_, theDigiContainers);
578  if (theDigiContainers.isValid()) {
579 #ifdef EDM_ML_DEBUG
580  std::cout << "HGCDigiContainer for " << detectorFH_ << " with "
581  << theDigiContainers->size() << " element(s)" << std::endl;
582 #endif
583  for (HGCHEDigiCollection::const_iterator it =theDigiContainers->begin();
584  it !=theDigiContainers->end(); ++it) {
585  HGCHEDetId detId = (it->id());
586  HGCSample hgcSample = it->sample(sampleIndex_);
587  uint16_t adc = hgcSample.data();
588  analyzeDigi(1, detId, adc);
589  }
590  }
591  }
592  }
593 
594  //The Rechits
595  if (doRecHits_) {
596  edm::Handle<HGCRecHitCollection> theCaloHitContainers;
597  if (ifEE_) {
598  iEvent.getByToken(tok_hitrEE_, theCaloHitContainers);
599  if (theCaloHitContainers.isValid()) {
600 #ifdef EDM_ML_DEBUG
601  std::cout << "HGCRecHitCollection for " << detectorEE_ << " has "
602  << theCaloHitContainers->size() << " hits" << std::endl;
603 #endif
604  analyzeRecHits(0, theCaloHitContainers);
605  } else {
606 #ifdef EDM_ML_DEBUG
607  std::cout << "HGCRecHitCollection does not exist for " << detectorEE_
608  << " !!!" << std::endl;
609 #endif
610  }
611  }
612  if (ifFH_) {
613  iEvent.getByToken(tok_hitrFH_, theCaloHitContainers);
614  if (theCaloHitContainers.isValid()) {
615 #ifdef EDM_ML_DEBUG
616  std::cout << "HGCRecHitCollection for " << detectorFH_ << " has "
617  << theCaloHitContainers->size() << " hits" << std::endl;
618 #endif
619  analyzeRecHits(1, theCaloHitContainers);
620  } else {
621 #ifdef EDM_ML_DEBUG
622  std::cout << "HGCRecHitCollection does not exist for " << detectorFH_
623  << " !!!" << std::endl;
624 #endif
625  }
626  }
627  }
628 }
int adc(sample_type sample)
get the ADC sample (12 bits)
std::string detectorEE_
std::vector< float > simHitLayEn2BH
uint32_t data() const
Definition: HGCSample.h:57
std::vector< float > simHitCellEnBeam
std::string detectorBH_
void analyzeSimTracks(edm::Handle< edm::SimTrackContainer > const &SimTk, edm::Handle< edm::SimVertexContainer > const &SimVtx)
std::vector< float > simHitLayEn1BH
std::vector< uint32_t > simHitCellIdFH
static const int MaxDepth
get the layer number
Definition: AHCalDetId.h:41
std::string detectorFH_
std::vector< HGCEEDataFrame >::const_iterator const_iterator
edm::EDGetToken tok_digiFH_
edm::EDGetTokenT< edm::PCaloHitContainer > tok_hitsFH_
std::vector< float > simHitCellEnEE
std::vector< float > simHitLayEn1EE
wrapper for a data word
Definition: HGCSample.h:13
std::vector< float > simHitCellEnFH
edm::EDGetTokenT< edm::PCaloHitContainer > tok_hitsBH_
void analyzeSimHits(int type, std::vector< PCaloHit > &hits, double zFront)
int iEvent
Definition: GenABIO.cc:230
unsigned int layers(bool reco) const
std::vector< int > idBeams_
void analyzeRecHits(int type, edm::Handle< HGCRecHitCollection > &hits)
edm::EDGetTokenT< edm::SimTrackContainer > tok_simTk_
const HGCalDDDConstants * hgcons_[2]
edm::EDGetToken tok_hitrFH_
edm::EDGetTokenT< edm::PCaloHitContainer > tok_hitsBeam_
edm::EDGetTokenT< edm::HepMCProduct > tok_hepMC_
bool isValid() const
Definition: HandleBase.h:74
std::vector< uint32_t > simHitCellIdBeam
int k[5][pyjets_maxn]
const_iterator end() const
const HepMC::GenEvent * GetEvent() const
Definition: HepMCProduct.h:38
std::vector< uint32_t > simHitCellIdEE
std::vector< uint32_t > simHitCellIdBH
std::vector< float > simHitLayEnBeam
std::vector< float > simHitLayEn1FH
std::vector< float > simHitCellEnBH
std::string detectorBeam_
void analyzeDigi(int type, const T1 &detId, uint16_t adc)
size_type size() const
std::vector< float > simHitLayEn2EE
edm::EDGetTokenT< edm::PCaloHitContainer > tok_hitsEE_
edm::EDGetToken tok_hitrEE_
edm::EDGetTokenT< edm::SimVertexContainer > tok_simVtx_
const_iterator begin() const
edm::EDGetToken tok_digiEE_
std::vector< float > simHitLayEn2FH
template<class T1 >
void HGCalTBAnalyzer::analyzeDigi ( int  type,
const T1 &  detId,
uint16_t  adc 
)
private

Definition at line 848 of file HGCalTBAnalyzer.cc.

References HGCalGeometry::getPosition(), hDigiADC_, hDigiLng_, hDigiOcc_, and hgeom_.

Referenced by analyze(), and endRun().

848  {
849 
850  DetId id1 = DetId(detId.rawId());
851  GlobalPoint global = hgeom_[type]->getPosition(id1);
852  hDigiOcc_[type]->Fill(global.x(),global.y());
853  hDigiLng_[type]->Fill(global.z());
854  hDigiADC_[type]->Fill(adc);
855 }
int adc(sample_type sample)
get the ADC sample (12 bits)
type
Definition: HCALResponse.h:21
GlobalPoint getPosition(const DetId &id) const
const HGCalGeometry * hgeom_[2]
Definition: DetId.h:18
void HGCalTBAnalyzer::analyzeRecHits ( int  type,
edm::Handle< HGCRecHitCollection > &  hits 
)
private

Definition at line 857 of file HGCalTBAnalyzer.cc.

References edm::SortedCollection< T, SORT >::begin(), HGCalDetId::cell(), gather_cfg::cout, DEFINE_FWK_MODULE, edm::SortedCollection< T, SORT >::end(), plotBeamSpotDB::first, HGCalGeometry::getPosition(), hgcons_, hgeom_, hRecHitE_, hRecHitLat_, hRecHitLng1_, hRecHitLng_, hRecHitOcc_, HGCalDetId::layer(), genParticles_cff::map, edm::second(), HGCalDDDConstants::waferZ(), PV3DBase< T, PVType, FrameType >::x(), PV3DBase< T, PVType, FrameType >::y(), and PV3DBase< T, PVType, FrameType >::z().

Referenced by analyze(), and endRun().

858  {
859 
860  std::map<int,double> map_hitLayer;
861  std::map<int,std::pair<DetId,double> > map_hitCell;
862  for (HGCRecHitCollection::const_iterator it = hits->begin();
863  it != hits->end(); ++it) {
864  DetId detId = it->id();
865  GlobalPoint global = hgeom_[type]->getPosition(detId);
866  double energy = it->energy();
867  int layer = HGCalDetId(detId).layer();
868  int cell = HGCalDetId(detId).cell();
869  hRecHitOcc_[type]->Fill(global.x(),global.y(),energy);
870  hRecHitE_[type]->Fill(energy);
871  if (map_hitLayer.count(layer) != 0) {
872  map_hitLayer[layer] += energy;
873  } else {
874  map_hitLayer[layer] = energy;
875  }
876  if (map_hitCell.count(cell) != 0) {
877  double ee = energy + map_hitCell[cell].second;
878  map_hitCell[cell] = std::pair<uint32_t,double>(detId,ee);
879  } else {
880  map_hitCell[cell] = std::pair<uint32_t,double>(detId,energy);
881  }
882 #ifdef EDM_ML_DEBUG
883  std::cout << "RecHit: " << layer << " " << global.x() << " " << global.y()
884  << " " << global.z() << " " << energy << std::endl;
885 #endif
886  }
887 
888  for (std::map<int,double>::iterator itr = map_hitLayer.begin();
889  itr != map_hitLayer.end(); ++itr) {
890  int layer = itr->first;
891  double energy = itr->second;
892  double zp = hgcons_[type]->waferZ(layer,true);
893 #ifdef EDM_ML_DEBUG
894  std::cout << "SimHit:Layer " << layer << " " << zp << " " << energy
895  << std::endl;
896 #endif
897  hRecHitLng_[type]->Fill(zp,energy);
898  hRecHitLng1_[type]->Fill(layer,energy);
899  }
900 
901  for (std::map<int,std::pair<DetId,double> >::iterator itr = map_hitCell.begin();
902  itr != map_hitCell.end(); ++itr) {
903  DetId detId = ((itr->second).first);
904  double energy = ((itr->second).second);
905  GlobalPoint global = hgeom_[type]->getPosition(detId);
906  hRecHitLat_[type]->Fill(global.x(),global.y(),energy);
907  }
908 }
type
Definition: HCALResponse.h:21
TProfile * hRecHitLng_[3]
std::vector< HGCRecHit >::const_iterator const_iterator
T y() const
Definition: PV3DBase.h:63
GlobalPoint getPosition(const DetId &id) const
TH2D * hRecHitOcc_[3]
U second(std::pair< T, U > const &p)
const HGCalGeometry * hgeom_[2]
T z() const
Definition: PV3DBase.h:64
const HGCalDDDConstants * hgcons_[2]
double waferZ(int layer, bool reco) const
const_iterator end() const
Definition: DetId.h:18
TProfile2D * hRecHitLat_[3]
int cell() const
get the absolute value of the cell #&#39;s in x and y
Definition: HGCalDetId.h:39
T x() const
Definition: PV3DBase.h:62
int layer() const
get the layer #
Definition: HGCalDetId.h:48
const_iterator begin() const
TProfile * hRecHitLng1_[3]
void HGCalTBAnalyzer::analyzeSimHits ( int  type,
std::vector< PCaloHit > &  hits,
double  zFront 
)
private

Definition at line 630 of file HGCalTBAnalyzer.cc.

References gather_cfg::cout, particleFlowClusterECALTimeSelected_cfi::depth, AHCalDetId::depth(), plotBeamSpotDB::first, AHCalDetId::getXY(), AHCalDetId::getZ(), HcalOther, hgcons_, hSimHitE_, hSimHitEn_, hSimHitLat_, hSimHitLayEn1BH_, hSimHitLayEn1EE_, hSimHitLayEn1FH_, hSimHitLayEn2BH_, hSimHitLayEn2EE_, hSimHitLayEn2FH_, hSimHitLayEnBeam_, hSimHitLng1_, hSimHitLng2_, hSimHitLng_, hSimHitT_, mps_fire::i, AHCalDetId::icol(), AHCalDetId::icolAbs(), hcalTTPDigis_cfi::id, idBeams_, training_settings::idx, AHCalDetId::irow(), AHCalDetId::irowAbs(), gen::k, HGCalDDDConstants::locateCell(), genParticles_cff::map, HGCalTestNumbering::packHexagonIndex(), edm::second(), simHitCellEnBeam, simHitCellEnBH, simHitCellEnEE, simHitCellEnFH, simHitCellIdBeam, simHitCellIdBH, simHitCellIdEE, simHitCellIdFH, simHitLayEn1BH, simHitLayEn1EE, simHitLayEn1FH, simHitLayEn2BH, simHitLayEn2EE, simHitLayEn2FH, simHitLayEnBeam, HGCalDDDConstants::simToReco(), HcalDetId::subdet(), ntuplemaker::time, HGCalTestNumbering::unpackHexagonIndex(), HcalTestBeamNumbering::unpackIndex(), HGCalDDDConstants::waferZ(), geometryCSVtoXML::xx, geometryCSVtoXML::xy, HcalDigiParam_cfi::zside, and AHCalDetId::zside().

Referenced by analyze(), and endRun().

631  {
632 
633  std::map<uint32_t,double> map_hits, map_hitn;
634  std::map<int,double> map_hitDepth;
635  std::map<int,std::pair<uint32_t,double> > map_hitLayer, map_hitCell;
636  double entot(0);
637  for (unsigned int i=0; i<hits.size(); i++) {
638  double energy = hits[i].energy();
639  double time = hits[i].time();
640  uint32_t id = hits[i].id();
641  entot += energy;
642  int subdet, zside, layer, sector, subsector(0), cell, depth(0), idx(0);
643  if (type == 2) {
644  subdet = HcalDetId(id).subdet();
645  if (subdet != HcalOther) continue;
646  AHCalDetId hid(id);
647  layer = depth = hid.depth();
648  zside = hid.zside();
649  sector = hid.irow();
650  cell = hid.icol();
651  idx = ((hid.irowAbs()*100) + (hid.icolAbs()));
652  } else if (type == 3) {
653  HcalTestBeamNumbering::unpackIndex(id, subdet, layer, sector, cell);
654  depth = layer; zside = 1;
655  idx = subdet*1000 + layer;
656  layer = idx;
657  } else {
658  HGCalTestNumbering::unpackHexagonIndex(id, subdet, zside, layer, sector,
659  subsector, cell);
660  depth = hgcons_[type]->simToReco(cell,layer,sector,true).second;
661  idx = sector*1000+cell;
662  }
663 #ifdef EDM_ML_DEBUG
664  std::cout << "SimHit:Hit[" << i << "] Id " << subdet << ":" << zside << ":"
665  << layer << ":" << sector << ":" << subsector << ":" << cell
666  << ":" << depth << " Energy " << energy << " Time " << time
667  << std::endl;
668 #endif
669  if (map_hits.count(id) != 0) {
670  map_hits[id] += energy;
671  } else {
672  map_hits[id] = energy;
673  }
674  if (map_hitLayer.count(layer) != 0) {
675  double ee = energy + map_hitLayer[layer].second;
676  map_hitLayer[layer] = std::pair<uint32_t,double>(id,ee);
677  } else {
678  map_hitLayer[layer] = std::pair<uint32_t,double>(id,energy);
679  }
680  if (depth >= 0) {
681  if (map_hitCell.count(idx) != 0) {
682  double ee = energy + map_hitCell[idx].second;
683  map_hitCell[idx] = std::pair<uint32_t,double>(id,ee);
684  } else {
685  map_hitCell[idx] = std::pair<uint32_t,double>(id,energy);
686  }
687  if (map_hitDepth.count(depth) != 0) {
688  map_hitDepth[depth] += energy;
689  } else {
690  map_hitDepth[depth] = energy;
691  }
692  uint32_t idn = (type >= 2) ? id :
693  HGCalTestNumbering::packHexagonIndex(subdet, zside, depth, sector,
694  subsector, cell);
695  if (map_hitn.count(idn) != 0) {
696  map_hitn[idn] += energy;
697  } else {
698  map_hitn[idn] = energy;
699  }
700  }
701  hSimHitT_[type]->Fill(time,energy);
702  }
703 
704  hSimHitEn_[type]->Fill(entot);
705  for (std::map<uint32_t,double>::iterator itr = map_hits.begin() ;
706  itr != map_hits.end(); ++itr) {
707  hSimHitE_[type]->Fill(itr->second);
708  }
709 
710  for (std::map<int,std::pair<uint32_t,double> >::iterator itr = map_hitLayer.begin();
711  itr != map_hitLayer.end(); ++itr) {
712  int layer = itr->first - 1;
713  double energy = (itr->second).second;
714  double zp(0);
715  if (type < 2) zp = hgcons_[type]->waferZ(layer+1,false);
716  else if (type == 2) zp = AHCalDetId((itr->second).first).getZ();
717 #ifdef EDM_ML_DEBUG
718  std::cout << "SimHit:Layer " << layer+1 << " Z " << zp << ":" << zp-zFront
719  << " E " << energy << std::endl;
720 #endif
721  if (type < 3) {
722  hSimHitLng_[type]->Fill(zp-zFront,energy);
723  hSimHitLng2_[type]->Fill(layer+1,energy);
724  }
725  if (type == 0) {
726  if (layer < (int)(hSimHitLayEn1EE_.size())) {
727  simHitLayEn1EE[layer] = energy;
728  hSimHitLayEn1EE_[layer]->Fill(energy);
729  }
730  } else if (type == 1) {
731  if (layer < (int)(hSimHitLayEn1FH_.size())) {
732  simHitLayEn1FH[layer] = energy;
733  hSimHitLayEn1FH_[layer]->Fill(energy);
734  }
735  } else if (type == 2) {
736  if (layer < (int)(hSimHitLayEn1BH_.size())) {
737  simHitLayEn1BH[layer] = energy;
738  hSimHitLayEn1BH_[layer]->Fill(energy);
739  }
740  } else {
741  for (unsigned int k=0; k<idBeams_.size(); ++k) {
742  if (layer+1 == idBeams_[k]) {
743  simHitLayEnBeam[k] = energy;
744  hSimHitLayEnBeam_[k]->Fill(energy);
745  break;
746  }
747  }
748  }
749  }
750  for (std::map<int,double>::iterator itr = map_hitDepth.begin();
751  itr != map_hitDepth.end(); ++itr) {
752  int layer = itr->first - 1;
753  double energy = itr->second;
754 #ifdef EDM_ML_DEBUG
755  std::cout << "SimHit:Layer " << layer+1 << " " << energy << std::endl;
756 #endif
757  hSimHitLng1_[type]->Fill(layer+1,energy);
758  if (type == 0) {
759  if (layer < (int)(hSimHitLayEn2EE_.size())) {
760  simHitLayEn2EE[layer] = energy;
761  hSimHitLayEn2EE_[layer]->Fill(energy);
762  }
763  } else if (type == 1) {
764  if (layer < (int)(hSimHitLayEn2FH_.size())) {
765  simHitLayEn2FH[layer] = energy;
766  hSimHitLayEn2FH_[layer]->Fill(energy);
767  }
768  } else if (type == 2) {
769  if (layer < (int)(hSimHitLayEn2BH_.size())) {
770  simHitLayEn2BH[layer] = energy;
771  hSimHitLayEn2BH_[layer]->Fill(energy);
772  }
773  }
774  }
775 
776  if (type < 3) {
777  for (std::map<int,std::pair<uint32_t,double> >::iterator itr = map_hitCell.begin();
778  itr != map_hitCell.end(); ++itr) {
779  uint32_t id = ((itr->second).first);
780  double energy = ((itr->second).second);
781  std::pair<float,float> xy(0,0);
782  double xx(0);
783  if (type == 2) {
784  xy = AHCalDetId(id).getXY();
785  xx = xy.first;
786  } else {
787  int subdet, zside, layer, sector, subsector, cell;
788  HGCalTestNumbering::unpackHexagonIndex(id, subdet, zside, layer, sector,
789  subsector, cell);
790  xy = hgcons_[type]->locateCell(cell,layer,sector,false);
791  double zp = hgcons_[type]->waferZ(layer,false);
792  xx = (zp < 0) ? -xy.first : xy.first;
793  }
794  hSimHitLat_[type]->Fill(xx,xy.second,energy);
795  }
796  }
797 
798  for (std::map<uint32_t,double>::iterator itr = map_hitn.begin();
799  itr != map_hitn.end(); ++itr) {
800  uint32_t id = itr->first;
801  double energy = itr->second;
802  if (type == 0) {
803  simHitCellIdEE.push_back(id); simHitCellEnEE.push_back(energy);
804  } else if (type == 1) {
805  simHitCellIdFH.push_back(id); simHitCellEnFH.push_back(energy);
806  } else if (type == 2) {
807  simHitCellIdBH.push_back(id); simHitCellEnBH.push_back(energy);
808  } else if (type == 3) {
809  simHitCellIdBeam.push_back(id); simHitCellEnBeam.push_back(energy);
810  }
811  }
812 }
std::vector< TH1D * > hSimHitLayEn2EE_
type
Definition: HCALResponse.h:21
std::vector< float > simHitLayEn2BH
std::vector< float > simHitCellEnBeam
HcalSubdetector subdet() const
get the subdetector
Definition: HcalDetId.h:49
TProfile * hSimHitLng1_[3]
std::vector< float > simHitLayEn1BH
TProfile * hSimHitLng2_[3]
std::vector< uint32_t > simHitCellIdFH
static uint32_t packHexagonIndex(int subdet, int z, int lay, int wafer, int celltyp, int cell)
double getZ() const
Definition: AHCalDetId.cc:57
std::vector< float > simHitCellEnEE
std::pair< float, float > locateCell(int cell, int lay, int type, bool reco) const
std::vector< float > simHitLayEn1EE
TProfile2D * hSimHitLat_[3]
std::vector< float > simHitCellEnFH
U second(std::pair< T, U > const &p)
std::vector< TH1D * > hSimHitLayEn1EE_
std::pair< int, int > simToReco(int cell, int layer, int mod, bool half) const
std::vector< TH1D * > hSimHitLayEn2BH_
std::vector< int > idBeams_
std::pair< double, double > getXY() const
get the local coordinate in the plane and along depth
Definition: AHCalDetId.cc:49
std::vector< TH1D * > hSimHitLayEnBeam_
const HGCalDDDConstants * hgcons_[2]
TH1D * hSimHitEn_[4]
std::vector< TH1D * > hSimHitLayEn1FH_
double waferZ(int layer, bool reco) const
std::vector< uint32_t > simHitCellIdBeam
int k[5][pyjets_maxn]
std::vector< uint32_t > simHitCellIdEE
TProfile * hSimHitLng_[3]
std::vector< uint32_t > simHitCellIdBH
std::vector< float > simHitLayEnBeam
std::vector< float > simHitLayEn1FH
std::vector< float > simHitCellEnBH
std::vector< float > simHitLayEn2EE
static void unpackIndex(const uint32_t &idx, int &det, int &lay, int &x, int &y)
std::vector< TH1D * > hSimHitLayEn1BH_
static void unpackHexagonIndex(const uint32_t &idx, int &subdet, int &z, int &lay, int &wafer, int &celltyp, int &cell)
std::vector< TH1D * > hSimHitLayEn2FH_
std::vector< float > simHitLayEn2FH
void HGCalTBAnalyzer::analyzeSimTracks ( edm::Handle< edm::SimTrackContainer > const &  SimTk,
edm::Handle< edm::SimVertexContainer > const &  SimVtx 
)
private

Definition at line 814 of file HGCalTBAnalyzer.cc.

References gather_cfg::cout, pBeam, xBeam, yBeam, and zBeam.

Referenced by analyze(), and endRun().

815  {
816 
817  xBeam = yBeam = zBeam = pBeam = -1000000;
818  int vertIndex(-1);
819  for (edm::SimTrackContainer::const_iterator simTrkItr = SimTk->begin();
820  simTrkItr!= SimTk->end(); simTrkItr++) {
821 #ifdef EDM_ML_DEBUG
822  std::cout << "Track " << simTrkItr->trackId() << " Vertex "
823  << simTrkItr->vertIndex() << " Type " << simTrkItr->type()
824  << " Charge " << simTrkItr->charge() << " momentum "
825  << simTrkItr->momentum() << " " << simTrkItr->momentum().P()
826  << std::endl;
827 #endif
828  if (vertIndex == -1) {
829  vertIndex = simTrkItr->vertIndex();
830  pBeam = simTrkItr->momentum().P();
831  }
832  }
833  if (vertIndex != -1 && vertIndex < (int)SimVtx->size()) {
834  edm::SimVertexContainer::const_iterator simVtxItr= SimVtx->begin();
835  for (int iv=0; iv<vertIndex; iv++) simVtxItr++;
836 #ifdef EDM_ML_DEBUG
837  std::cout << "Vertex " << vertIndex << " position "
838  << simVtxItr->position() << std::endl;
839 #endif
840  xBeam = simVtxItr->position().X();
841  yBeam = simVtxItr->position().Y();
842  zBeam = simVtxItr->position().Z();
843  }
844 
845 }
void HGCalTBAnalyzer::beginJob ( void  )
overrideprivatevirtual

Reimplemented from edm::one::EDAnalyzerBase.

Definition at line 239 of file HGCalTBAnalyzer.cc.

References detectorBeam_, detectorBH_, detectorEE_, detectorFH_, doDigis_, doRecHits_, doSimHits_, doTree_, doTreeCell_, fs_, hBeam_, hDigiADC_, hDigiLng_, hDigiOcc_, hRecHitE_, hRecHitLat_, hRecHitLng1_, hRecHitLng_, hRecHitOcc_, hSimHitE_, hSimHitEn_, hSimHitLat_, hSimHitLng1_, hSimHitLng2_, hSimHitLng_, hSimHitT_, mps_fire::i, ifBeam_, ifBH_, ifEE_, ifFH_, TFileService::make(), dataset::name, pBeam, simHitCellEnBeam, simHitCellEnBH, simHitCellEnEE, simHitCellEnFH, simHitCellIdBeam, simHitCellIdBH, simHitCellIdEE, simHitCellIdFH, simHitLayEn1BH, simHitLayEn1EE, simHitLayEn1FH, simHitLayEn2BH, simHitLayEn2EE, simHitLayEn2FH, AlCaHLTBitMon_QueryRunRegistry::string, fftjetcommon_cfi::title, tree_, xBeam, yBeam, and zBeam.

239  {
240 
241  char name[40], title[100];
242  hBeam_ = fs_->make<TH1D>("BeamP", "Beam Momentum", 1000, 0, 1000.0);
243  for (int i=0; i<3; ++i) {
244  bool book(ifEE_);
245  std::string det(detectorEE_);
246  if (i == 1) {
247  book = ifFH_;
248  det = detectorFH_;
249  } else if (i == 2) {
250  book = ifBH_;
251  det = detectorBH_;
252  }
253 
254  if (doSimHits_ && book) {
255  sprintf (name, "SimHitEn%s", det.c_str());
256  sprintf (title,"Sim Hit Energy for %s", det.c_str());
257  hSimHitE_[i] = fs_->make<TH1D>(name,title,100000,0.,0.2);
258  sprintf (name, "SimHitEnX%s", det.c_str());
259  sprintf (title,"Sim Hit Energy for %s", det.c_str());
260  hSimHitEn_[i] = fs_->make<TH1D>(name,title,100000,0.,0.2);
261  sprintf (name, "SimHitTm%s", det.c_str());
262  sprintf (title,"Sim Hit Timing for %s", det.c_str());
263  hSimHitT_[i] = fs_->make<TH1D>(name,title,5000,0.,500.0);
264  sprintf (name, "SimHitLat%s", det.c_str());
265  sprintf (title,"Lateral Shower profile (Sim Hit) for %s", det.c_str());
266  hSimHitLat_[i] = fs_->make<TProfile2D>(name,title,100,-100.,100.,100,-100.,100.);
267  sprintf (name, "SimHitLng%s", det.c_str());
268  sprintf (title,"Longitudinal Shower profile (Sim Hit) for %s",det.c_str());
269  hSimHitLng_[i] = fs_->make<TProfile>(name,title,50,0.,100.);
270  sprintf (name, "SimHitLng1%s", det.c_str());
271  sprintf (title,"Longitudinal Shower profile (Layer) for %s",det.c_str());
272  hSimHitLng1_[i] = fs_->make<TProfile>(name,title,200,0.,100.);
273  sprintf (name, "SimHitLng2%s", det.c_str());
274  sprintf (title,"Longitudinal Shower profile (Layer) for %s",det.c_str());
275  hSimHitLng2_[i] = fs_->make<TProfile>(name,title,200,0.,100.);
276  }
277 
278  if (doDigis_ && book) {
279  sprintf (name, "DigiADC%s", det.c_str());
280  sprintf (title,"ADC at Digi level for %s", det.c_str());
281  hDigiADC_[i] = fs_->make<TH1D>(name,title,100,0.,100.0);
282  sprintf (name, "DigiOcc%s", det.c_str());
283  sprintf (title,"Occupancy (Digi)for %s", det.c_str());
284  hDigiOcc_[i] = fs_->make<TH2D>(name,title,100,-10.,10.,100,-10.,10.);
285  sprintf (name, "DigiLng%s", det.c_str());
286  sprintf (title,"Longitudinal Shower profile (Digi) for %s",det.c_str());
287  hDigiLng_[i] = fs_->make<TH1D>(name,title,100,0.,10.);
288  }
289 
290  if (doRecHits_ && book) {
291  sprintf (name, "RecHitEn%s", det.c_str());
292  sprintf (title,"Rec Hit Energy for %s", det.c_str());
293  hRecHitE_[i] = fs_->make<TH1D>(name,title,1000,0.,10.0);
294  sprintf (name, "RecHitOcc%s", det.c_str());
295  sprintf (title,"Occupancy (Rec Hit)for %s", det.c_str());
296  hRecHitOcc_[i] = fs_->make<TH2D>(name,title,100,-10.,10.,100,-10.,10.);
297  sprintf (name, "RecHitLat%s", det.c_str());
298  sprintf (title,"Lateral Shower profile (Rec Hit) for %s", det.c_str());
299  hRecHitLat_[i] = fs_->make<TProfile2D>(name,title,100,-10.,10.,100,-10.,10.);
300  sprintf (name, "RecHitLng%s", det.c_str());
301  sprintf (title,"Longitudinal Shower profile (Rec Hit) for %s",det.c_str());
302  hRecHitLng_[i] = fs_->make<TProfile>(name,title,100,0.,10.);
303  sprintf (name, "RecHitLng1%s", det.c_str());
304  sprintf (title,"Longitudinal Shower profile vs Layer for %s",det.c_str());
305  hRecHitLng1_[i] = fs_->make<TProfile>(name,title,120,0.,60.);
306  }
307  }
308  if (ifBeam_ && doSimHits_) {
309  sprintf (name, "SimHitEn%s", detectorBeam_.c_str());
310  sprintf (title,"Sim Hit Energy for %s", detectorBeam_.c_str());
311  hSimHitE_[3] = fs_->make<TH1D>(name,title,100000,0.,0.2);
312  sprintf (name, "SimHitEnX%s", detectorBeam_.c_str());
313  sprintf (title,"Sim Hit Energy for %s", detectorBeam_.c_str());
314  hSimHitEn_[3] = fs_->make<TH1D>(name,title,100000,0.,0.2);
315  sprintf (name, "SimHitTm%s", detectorBeam_.c_str());
316  sprintf (title,"Sim Hit Timing for %s", detectorBeam_.c_str());
317  hSimHitT_[3] = fs_->make<TH1D>(name,title,5000,0.,500.0);
318  }
319  if (doSimHits_ && doTree_) {
320  tree_ = fs_->make<TTree>("HGCTB","SimHitEnergy");
321  tree_->Branch("simHitLayEn1EE", &simHitLayEn1EE);
322  tree_->Branch("simHitLayEn2EE", &simHitLayEn2EE);
323  tree_->Branch("simHitLayEn1FH", &simHitLayEn1FH);
324  tree_->Branch("simHitLayEn2FH", &simHitLayEn2FH);
325  tree_->Branch("simHitLayEn1BH", &simHitLayEn1BH);
326  tree_->Branch("simHitLayEn2BH", &simHitLayEn2BH);
327  tree_->Branch("xBeam", &xBeam, "xBeam/D");
328  tree_->Branch("yBeam", &yBeam, "yBeam/D");
329  tree_->Branch("zBeam", &zBeam, "zBeam/D");
330  tree_->Branch("pBeam", &pBeam, "pBeam/D");
331  if (doTreeCell_) {
332  tree_->Branch("simHitCellIdEE", &simHitCellIdEE);
333  tree_->Branch("simHitCellEnEE", &simHitCellEnEE);
334  tree_->Branch("simHitCellIdFH", &simHitCellIdFH);
335  tree_->Branch("simHitCellEnFH", &simHitCellEnFH);
336  tree_->Branch("simHitCellIdBH", &simHitCellIdBH);
337  tree_->Branch("simHitCellEnBH", &simHitCellEnBH);
338  tree_->Branch("simHitCellIdBeam", &simHitCellIdBeam);
339  tree_->Branch("simHitCellEnBeam", &simHitCellEnBeam);
340  }
341  }
342 }
std::string detectorEE_
std::vector< float > simHitLayEn2BH
std::vector< float > simHitCellEnBeam
std::string detectorBH_
TProfile * hSimHitLng1_[3]
std::vector< float > simHitLayEn1BH
TProfile * hSimHitLng2_[3]
TProfile * hRecHitLng_[3]
std::vector< uint32_t > simHitCellIdFH
std::string detectorFH_
edm::Service< TFileService > fs_
std::vector< float > simHitCellEnEE
T * make(const Args &...args) const
make new ROOT object
Definition: TFileService.h:64
TH2D * hRecHitOcc_[3]
std::vector< float > simHitLayEn1EE
TProfile2D * hSimHitLat_[3]
std::vector< float > simHitCellEnFH
TH1D * hSimHitEn_[4]
std::vector< uint32_t > simHitCellIdBeam
TProfile2D * hRecHitLat_[3]
std::vector< uint32_t > simHitCellIdEE
TProfile * hSimHitLng_[3]
std::vector< uint32_t > simHitCellIdBH
std::vector< float > simHitLayEn1FH
std::vector< float > simHitCellEnBH
std::string detectorBeam_
std::vector< float > simHitLayEn2EE
TProfile * hRecHitLng1_[3]
std::vector< float > simHitLayEn2FH
void HGCalTBAnalyzer::beginRun ( edm::Run const &  ,
edm::EventSetup const &   
)
overrideprivatevirtual

Definition at line 344 of file HGCalTBAnalyzer.cc.

References gather_cfg::cout, detectorBeam_, detectorBH_, detectorEE_, detectorFH_, doDigis_, doRecHits_, fs_, relativeConstraints::geom, edm::EventSetup::get(), hgcons_, hgeom_, hSimHitLayEn1BH_, hSimHitLayEn1EE_, hSimHitLayEn1FH_, hSimHitLayEn2BH_, hSimHitLayEn2EE_, hSimHitLayEn2FH_, hSimHitLayEnBeam_, idBeams_, ifBeam_, ifBH_, ifEE_, ifFH_, checklumidiff::l, HGCalDDDConstants::layers(), TFileService::make(), AHCalDetId::MaxDepth, dataset::name, edm::ESHandle< T >::product(), and fftjetcommon_cfi::title.

344  {
345 
346  char name[40], title[100];
347  if (ifEE_) {
349  iSetup.get<IdealGeometryRecord>().get(detectorEE_, pHGDC);
350  hgcons_[0] = &(*pHGDC);
351  if (doDigis_ || doRecHits_) {
353  iSetup.get<IdealGeometryRecord>().get(detectorEE_, geom);
354  hgeom_[0] = geom.product();
355  } else {
356  hgeom_[0] = 0;
357  }
358  for (unsigned int l=0; l<hgcons_[0]->layers(false); ++l) {
359  sprintf (name, "SimHitEnA%d%s", l, detectorEE_.c_str());
360  sprintf (title,"Sim Hit Energy in SIM layer %d for %s",l+1,
361  detectorEE_.c_str());
362  hSimHitLayEn1EE_.push_back(fs_->make<TH1D>(name,title,100000,0.,0.2));
363  if (l%3 == 0) {
364  sprintf (name, "SimHitEnB%d%s", (l/3+1), detectorEE_.c_str());
365  sprintf (title,"Sim Hit Energy in layer %d for %s",(l/3+1),
366  detectorEE_.c_str());
367  hSimHitLayEn2EE_.push_back(fs_->make<TH1D>(name,title,100000,0.,0.2));
368  }
369  }
370 #ifdef EDM_ML_DEBUG
371  std::cout << "HGCalTBAnalyzer::" << detectorEE_ << " defined with "
372  << hgcons_[0]->layers(false) << " layers" << std::endl;
373 #endif
374  } else {
375  hgcons_[0] = 0;
376  hgeom_[0] = 0;
377  }
378 
379  if (ifFH_) {
381  iSetup.get<IdealGeometryRecord>().get(detectorFH_, pHGDC);
382  hgcons_[1] = &(*pHGDC);
383  if (doDigis_ || doRecHits_) {
385  iSetup.get<IdealGeometryRecord>().get(detectorFH_, geom);
386  hgeom_[1] = geom.product();
387  } else {
388  hgeom_[1] = 0;
389  }
390  for (unsigned int l=0; l<hgcons_[1]->layers(false); ++l) {
391  sprintf (name, "SimHitEnA%d%s", l, detectorFH_.c_str());
392  sprintf (title,"Sim Hit Energy in layer %d for %s",l+1,
393  detectorFH_.c_str());
394  hSimHitLayEn1FH_.push_back(fs_->make<TH1D>(name,title,100000,0.,0.2));
395  if (l%3 == 0) {
396  sprintf (name, "SimHitEnB%d%s", (l/3+1), detectorFH_.c_str());
397  sprintf (title,"Sim Hit Energy in layer %d for %s",(l/3+1),
398  detectorFH_.c_str());
399  hSimHitLayEn2FH_.push_back(fs_->make<TH1D>(name,title,100000,0.,0.2));
400  }
401  }
402 #ifdef EDM_ML_DEBUG
403  std::cout << "HGCalTBAnalyzer::" << detectorFH_ << " defined with "
404  << hgcons_[1]->layers(false) << " layers" << std::endl;
405 #endif
406  } else {
407  hgcons_[1] = 0;
408  hgeom_[1] = 0;
409  }
410 
411  if (ifBH_) {
412  for (int l=0; l<AHCalDetId::MaxDepth; ++l) {
413  sprintf (name, "SimHitEnA%d%s", l, detectorBH_.c_str());
414  sprintf (title,"Sim Hit Energy in layer %d for %s",l+1,
415  detectorBH_.c_str());
416  hSimHitLayEn1BH_.push_back(fs_->make<TH1D>(name,title,100000,0.,0.2));
417  sprintf (name, "SimHitEnB%d%s", l, detectorBH_.c_str());
418  sprintf (title,"Sim Hit Energy in layer %d for %s",l+1,
419  detectorBH_.c_str());
420  hSimHitLayEn2BH_.push_back(fs_->make<TH1D>(name,title,100000,0.,0.2));
421  }
422  }
423 
424  if (ifBeam_) {
425  for (unsigned int l=0; l<idBeams_.size(); ++l) {
426  sprintf (name, "SimHitEna%d%s", l, detectorBeam_.c_str());
427  sprintf (title, "Sim Hit Energy in type %d for %s",idBeams_[l],
428  detectorBeam_.c_str());
429  hSimHitLayEnBeam_.push_back(fs_->make<TH1D>(name,title,100000,0.,0.2));
430  }
431  }
432 }
std::vector< TH1D * > hSimHitLayEn2EE_
std::string detectorEE_
std::string detectorBH_
static const int MaxDepth
get the layer number
Definition: AHCalDetId.h:41
std::string detectorFH_
edm::Service< TFileService > fs_
T * make(const Args &...args) const
make new ROOT object
Definition: TFileService.h:64
std::vector< TH1D * > hSimHitLayEn1EE_
std::vector< TH1D * > hSimHitLayEn2BH_
unsigned int layers(bool reco) const
std::vector< int > idBeams_
const HGCalGeometry * hgeom_[2]
std::vector< TH1D * > hSimHitLayEnBeam_
const HGCalDDDConstants * hgcons_[2]
std::vector< TH1D * > hSimHitLayEn1FH_
std::string detectorBeam_
std::vector< TH1D * > hSimHitLayEn1BH_
T const * product() const
Definition: ESHandle.h:86
std::vector< TH1D * > hSimHitLayEn2FH_
virtual void HGCalTBAnalyzer::endRun ( edm::Run const &  ,
edm::EventSetup const &   
)
inlineoverrideprivatevirtual
void HGCalTBAnalyzer::fillDescriptions ( edm::ConfigurationDescriptions descriptions)
static

Definition at line 203 of file HGCalTBAnalyzer.cc.

References edm::ConfigurationDescriptions::add(), edm::ParameterSetDescription::add(), edm::ParameterSetDescription::addUntracked(), edm::ParameterSetDescription::setUnknown(), and AlCaHLTBitMon_QueryRunRegistry::string.

203  {
205  desc.setUnknown();
206  desc.add<std::string>("DetectorEE","HGCalEESensitive");
207  desc.add<bool>("UseEE",true);
208  desc.add<double>("ZFrontEE",0.0);
209  desc.add<std::string>("CaloHitSrcEE","HGCHitsEE");
210  desc.add<edm::InputTag>("DigiSrcEE",edm::InputTag("mix","HGCDigisEE"));
211  desc.add<edm::InputTag>("RecHitSrcEE",edm::InputTag("HGCalRecHit","HGCEERecHits"));
212  desc.add<std::string>("DetectorFH","HGCalHESiliconSensitive");
213  desc.add<bool>("UseFH",false);
214  desc.add<double>("ZFrontFH",0.0);
215  desc.add<std::string>("CaloHitSrcFH","HGCHitsHEfront");
216  desc.add<edm::InputTag>("DigiSrcFH",edm::InputTag("mix","HGCDigisHEfront"));
217  desc.add<edm::InputTag>("RecHitSrcFH",edm::InputTag("HGCalRecHit","HGCHEFRecHits"));
218  desc.add<std::string>("DetectorBH","AHCal");
219  desc.add<bool>("UseBH",false);
220  desc.add<double>("ZFrontBH",0.0);
221  desc.add<std::string>("CaloHitSrcBH","HcalHits");
222  desc.add<edm::InputTag>("DigiSrcBH",edm::InputTag("mix","HGCDigisHEback"));
223  desc.add<edm::InputTag>("RecHitSrcBH",edm::InputTag("HGCalRecHit","HGCHEBRecHits"));
224  desc.add<std::string>("DetectorBeam","HcalTB06BeamDetectorl");
225  desc.add<bool>("UseBeam",false);
226  desc.add<std::string>("CaloHitSrcBeam","HcalTB06BeamHits");
227  std::vector<int> ids = {1000,1001,1002,1003,1004,1005,1006,1007,1008,1011,1012,1013,1014,2001,2002,2003,2004,2005};
228  desc.add<std::vector<int>>("IDBeams",ids);
229  desc.add<edm::InputTag>("GeneratorSrc",edm::InputTag("generatorSmeared"));
230  desc.add<bool>("DoSimHits",true);
231  desc.add<bool>("DoDigis",true);
232  desc.add<bool>("DoRecHits",true);
233  desc.add<int>("SampleIndex",0);
234  desc.addUntracked<bool>("DoTree",true);
235  desc.addUntracked<bool>("DoTreeCell",true);
236  descriptions.add("HGCalTBAnalyzer",desc);
237 }
ParameterDescriptionBase * add(U const &iLabel, T const &value)
void add(std::string const &label, ParameterSetDescription const &psetDescription)

Member Data Documentation

std::string HGCalTBAnalyzer::detectorBeam_
private

Definition at line 79 of file HGCalTBAnalyzer.cc.

Referenced by analyze(), beginJob(), beginRun(), and HGCalTBAnalyzer().

std::string HGCalTBAnalyzer::detectorBH_
private

Definition at line 79 of file HGCalTBAnalyzer.cc.

Referenced by analyze(), beginJob(), beginRun(), and HGCalTBAnalyzer().

std::string HGCalTBAnalyzer::detectorEE_
private

Definition at line 78 of file HGCalTBAnalyzer.cc.

Referenced by analyze(), beginJob(), beginRun(), and HGCalTBAnalyzer().

std::string HGCalTBAnalyzer::detectorFH_
private

Definition at line 78 of file HGCalTBAnalyzer.cc.

Referenced by analyze(), beginJob(), beginRun(), and HGCalTBAnalyzer().

bool HGCalTBAnalyzer::doDigis_
private

Definition at line 77 of file HGCalTBAnalyzer.cc.

Referenced by analyze(), beginJob(), beginRun(), and HGCalTBAnalyzer().

bool HGCalTBAnalyzer::doRecHits_
private

Definition at line 77 of file HGCalTBAnalyzer.cc.

Referenced by analyze(), beginJob(), beginRun(), and HGCalTBAnalyzer().

bool HGCalTBAnalyzer::doSimHits_
private

Definition at line 77 of file HGCalTBAnalyzer.cc.

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

bool HGCalTBAnalyzer::doTree_
private

Definition at line 76 of file HGCalTBAnalyzer.cc.

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

bool HGCalTBAnalyzer::doTreeCell_
private

Definition at line 76 of file HGCalTBAnalyzer.cc.

Referenced by beginJob(), and HGCalTBAnalyzer().

edm::Service<TFileService> HGCalTBAnalyzer::fs_
private

Definition at line 72 of file HGCalTBAnalyzer.cc.

Referenced by beginJob(), and beginRun().

TH1D * HGCalTBAnalyzer::hBeam_
private

Definition at line 93 of file HGCalTBAnalyzer.cc.

Referenced by analyze(), and beginJob().

TH1D* HGCalTBAnalyzer::hDigiADC_[3]
private

Definition at line 92 of file HGCalTBAnalyzer.cc.

Referenced by analyzeDigi(), and beginJob().

TH1D * HGCalTBAnalyzer::hDigiLng_[2]
private

Definition at line 92 of file HGCalTBAnalyzer.cc.

Referenced by analyzeDigi(), and beginJob().

TH2D* HGCalTBAnalyzer::hDigiOcc_[3]
private

Definition at line 94 of file HGCalTBAnalyzer.cc.

Referenced by analyzeDigi(), and beginJob().

const HGCalDDDConstants* HGCalTBAnalyzer::hgcons_[2]
private

Definition at line 73 of file HGCalTBAnalyzer.cc.

Referenced by analyze(), analyzeRecHits(), analyzeSimHits(), and beginRun().

const HGCalGeometry* HGCalTBAnalyzer::hgeom_[2]
private

Definition at line 74 of file HGCalTBAnalyzer.cc.

Referenced by analyzeDigi(), analyzeRecHits(), and beginRun().

TH1D* HGCalTBAnalyzer::hRecHitE_[3]
private

Definition at line 93 of file HGCalTBAnalyzer.cc.

Referenced by analyzeRecHits(), and beginJob().

TProfile2D * HGCalTBAnalyzer::hRecHitLat_[3]
private

Definition at line 98 of file HGCalTBAnalyzer.cc.

Referenced by analyzeRecHits(), and beginJob().

TProfile * HGCalTBAnalyzer::hRecHitLng1_[3]
private

Definition at line 97 of file HGCalTBAnalyzer.cc.

Referenced by analyzeRecHits(), and beginJob().

TProfile* HGCalTBAnalyzer::hRecHitLng_[3]
private

Definition at line 97 of file HGCalTBAnalyzer.cc.

Referenced by analyzeRecHits(), and beginJob().

TH2D * HGCalTBAnalyzer::hRecHitOcc_[3]
private

Definition at line 94 of file HGCalTBAnalyzer.cc.

Referenced by analyzeRecHits(), and beginJob().

TH1D* HGCalTBAnalyzer::hSimHitE_[4]
private

Definition at line 91 of file HGCalTBAnalyzer.cc.

Referenced by analyzeSimHits(), and beginJob().

TH1D * HGCalTBAnalyzer::hSimHitEn_[4]
private

Definition at line 93 of file HGCalTBAnalyzer.cc.

Referenced by analyzeSimHits(), and beginJob().

TProfile2D* HGCalTBAnalyzer::hSimHitLat_[3]
private

Definition at line 98 of file HGCalTBAnalyzer.cc.

Referenced by analyzeSimHits(), and beginJob().

std::vector<TH1D*> HGCalTBAnalyzer::hSimHitLayEn1BH_
private

Definition at line 101 of file HGCalTBAnalyzer.cc.

Referenced by analyzeSimHits(), and beginRun().

std::vector<TH1D*> HGCalTBAnalyzer::hSimHitLayEn1EE_
private

Definition at line 99 of file HGCalTBAnalyzer.cc.

Referenced by analyzeSimHits(), and beginRun().

std::vector<TH1D*> HGCalTBAnalyzer::hSimHitLayEn1FH_
private

Definition at line 100 of file HGCalTBAnalyzer.cc.

Referenced by analyzeSimHits(), and beginRun().

std::vector<TH1D*> HGCalTBAnalyzer::hSimHitLayEn2BH_
private

Definition at line 101 of file HGCalTBAnalyzer.cc.

Referenced by analyzeSimHits(), and beginRun().

std::vector<TH1D*> HGCalTBAnalyzer::hSimHitLayEn2EE_
private

Definition at line 99 of file HGCalTBAnalyzer.cc.

Referenced by analyzeSimHits(), and beginRun().

std::vector<TH1D*> HGCalTBAnalyzer::hSimHitLayEn2FH_
private

Definition at line 100 of file HGCalTBAnalyzer.cc.

Referenced by analyzeSimHits(), and beginRun().

std::vector<TH1D*> HGCalTBAnalyzer::hSimHitLayEnBeam_
private

Definition at line 102 of file HGCalTBAnalyzer.cc.

Referenced by analyzeSimHits(), and beginRun().

TProfile * HGCalTBAnalyzer::hSimHitLng1_[3]
private

Definition at line 95 of file HGCalTBAnalyzer.cc.

Referenced by analyzeSimHits(), and beginJob().

TProfile* HGCalTBAnalyzer::hSimHitLng2_[3]
private

Definition at line 96 of file HGCalTBAnalyzer.cc.

Referenced by analyzeSimHits(), and beginJob().

TProfile* HGCalTBAnalyzer::hSimHitLng_[3]
private

Definition at line 95 of file HGCalTBAnalyzer.cc.

Referenced by analyzeSimHits(), and beginJob().

TH1D * HGCalTBAnalyzer::hSimHitT_[4]
private

Definition at line 91 of file HGCalTBAnalyzer.cc.

Referenced by analyzeSimHits(), and beginJob().

std::vector<int> HGCalTBAnalyzer::idBeams_
private

Definition at line 82 of file HGCalTBAnalyzer.cc.

Referenced by analyze(), analyzeSimHits(), beginRun(), and HGCalTBAnalyzer().

bool HGCalTBAnalyzer::ifBeam_
private

Definition at line 75 of file HGCalTBAnalyzer.cc.

Referenced by analyze(), beginJob(), beginRun(), and HGCalTBAnalyzer().

bool HGCalTBAnalyzer::ifBH_
private

Definition at line 75 of file HGCalTBAnalyzer.cc.

Referenced by analyze(), beginJob(), beginRun(), and HGCalTBAnalyzer().

bool HGCalTBAnalyzer::ifEE_
private

Definition at line 75 of file HGCalTBAnalyzer.cc.

Referenced by analyze(), beginJob(), beginRun(), and HGCalTBAnalyzer().

bool HGCalTBAnalyzer::ifFH_
private

Definition at line 75 of file HGCalTBAnalyzer.cc.

Referenced by analyze(), beginJob(), beginRun(), and HGCalTBAnalyzer().

double HGCalTBAnalyzer::pBeam
private

Definition at line 111 of file HGCalTBAnalyzer.cc.

Referenced by analyzeSimTracks(), and beginJob().

int HGCalTBAnalyzer::sampleIndex_
private

Definition at line 81 of file HGCalTBAnalyzer.cc.

Referenced by analyze(), and HGCalTBAnalyzer().

std::vector<float> HGCalTBAnalyzer::simHitCellEnBeam
private

Definition at line 110 of file HGCalTBAnalyzer.cc.

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

std::vector<float> HGCalTBAnalyzer::simHitCellEnBH
private

Definition at line 110 of file HGCalTBAnalyzer.cc.

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

std::vector<float> HGCalTBAnalyzer::simHitCellEnEE
private

Definition at line 109 of file HGCalTBAnalyzer.cc.

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

std::vector<float> HGCalTBAnalyzer::simHitCellEnFH
private

Definition at line 109 of file HGCalTBAnalyzer.cc.

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

std::vector<uint32_t> HGCalTBAnalyzer::simHitCellIdBeam
private

Definition at line 108 of file HGCalTBAnalyzer.cc.

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

std::vector<uint32_t> HGCalTBAnalyzer::simHitCellIdBH
private

Definition at line 108 of file HGCalTBAnalyzer.cc.

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

std::vector<uint32_t> HGCalTBAnalyzer::simHitCellIdEE
private

Definition at line 107 of file HGCalTBAnalyzer.cc.

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

std::vector<uint32_t> HGCalTBAnalyzer::simHitCellIdFH
private

Definition at line 107 of file HGCalTBAnalyzer.cc.

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

std::vector<float> HGCalTBAnalyzer::simHitLayEn1BH
private

Definition at line 105 of file HGCalTBAnalyzer.cc.

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

std::vector<float> HGCalTBAnalyzer::simHitLayEn1EE
private

Definition at line 103 of file HGCalTBAnalyzer.cc.

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

std::vector<float> HGCalTBAnalyzer::simHitLayEn1FH
private

Definition at line 104 of file HGCalTBAnalyzer.cc.

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

std::vector<float> HGCalTBAnalyzer::simHitLayEn2BH
private

Definition at line 105 of file HGCalTBAnalyzer.cc.

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

std::vector<float> HGCalTBAnalyzer::simHitLayEn2EE
private

Definition at line 103 of file HGCalTBAnalyzer.cc.

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

std::vector<float> HGCalTBAnalyzer::simHitLayEn2FH
private

Definition at line 104 of file HGCalTBAnalyzer.cc.

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

std::vector<float> HGCalTBAnalyzer::simHitLayEnBeam
private

Definition at line 106 of file HGCalTBAnalyzer.cc.

Referenced by analyze(), and analyzeSimHits().

edm::EDGetToken HGCalTBAnalyzer::tok_digiBH_
private

Definition at line 87 of file HGCalTBAnalyzer.cc.

Referenced by HGCalTBAnalyzer().

edm::EDGetToken HGCalTBAnalyzer::tok_digiEE_
private

Definition at line 87 of file HGCalTBAnalyzer.cc.

Referenced by analyze(), and HGCalTBAnalyzer().

edm::EDGetToken HGCalTBAnalyzer::tok_digiFH_
private

Definition at line 87 of file HGCalTBAnalyzer.cc.

Referenced by analyze(), and HGCalTBAnalyzer().

edm::EDGetTokenT<edm::HepMCProduct> HGCalTBAnalyzer::tok_hepMC_
private

Definition at line 89 of file HGCalTBAnalyzer.cc.

Referenced by analyze(), and HGCalTBAnalyzer().

edm::EDGetToken HGCalTBAnalyzer::tok_hitrBH_
private

Definition at line 88 of file HGCalTBAnalyzer.cc.

Referenced by HGCalTBAnalyzer().

edm::EDGetToken HGCalTBAnalyzer::tok_hitrEE_
private

Definition at line 88 of file HGCalTBAnalyzer.cc.

Referenced by analyze(), and HGCalTBAnalyzer().

edm::EDGetToken HGCalTBAnalyzer::tok_hitrFH_
private

Definition at line 88 of file HGCalTBAnalyzer.cc.

Referenced by analyze(), and HGCalTBAnalyzer().

edm::EDGetTokenT<edm::PCaloHitContainer> HGCalTBAnalyzer::tok_hitsBeam_
private

Definition at line 84 of file HGCalTBAnalyzer.cc.

Referenced by analyze(), and HGCalTBAnalyzer().

edm::EDGetTokenT<edm::PCaloHitContainer> HGCalTBAnalyzer::tok_hitsBH_
private

Definition at line 84 of file HGCalTBAnalyzer.cc.

Referenced by analyze(), and HGCalTBAnalyzer().

edm::EDGetTokenT<edm::PCaloHitContainer> HGCalTBAnalyzer::tok_hitsEE_
private

Definition at line 83 of file HGCalTBAnalyzer.cc.

Referenced by analyze(), and HGCalTBAnalyzer().

edm::EDGetTokenT<edm::PCaloHitContainer> HGCalTBAnalyzer::tok_hitsFH_
private

Definition at line 83 of file HGCalTBAnalyzer.cc.

Referenced by analyze(), and HGCalTBAnalyzer().

edm::EDGetTokenT<edm::SimTrackContainer> HGCalTBAnalyzer::tok_simTk_
private

Definition at line 85 of file HGCalTBAnalyzer.cc.

Referenced by analyze(), and HGCalTBAnalyzer().

edm::EDGetTokenT<edm::SimVertexContainer> HGCalTBAnalyzer::tok_simVtx_
private

Definition at line 86 of file HGCalTBAnalyzer.cc.

Referenced by analyze(), and HGCalTBAnalyzer().

TTree* HGCalTBAnalyzer::tree_
private

Definition at line 90 of file HGCalTBAnalyzer.cc.

Referenced by analyze(), and beginJob().

double HGCalTBAnalyzer::xBeam
private

Definition at line 111 of file HGCalTBAnalyzer.cc.

Referenced by analyzeSimTracks(), and beginJob().

double HGCalTBAnalyzer::yBeam
private

Definition at line 111 of file HGCalTBAnalyzer.cc.

Referenced by analyzeSimTracks(), and beginJob().

double HGCalTBAnalyzer::zBeam
private

Definition at line 111 of file HGCalTBAnalyzer.cc.

Referenced by analyzeSimTracks(), and beginJob().

double HGCalTBAnalyzer::zFrontBH_
private

Definition at line 80 of file HGCalTBAnalyzer.cc.

Referenced by analyze(), and HGCalTBAnalyzer().

double HGCalTBAnalyzer::zFrontEE_
private

Definition at line 80 of file HGCalTBAnalyzer.cc.

Referenced by analyze(), and HGCalTBAnalyzer().

double HGCalTBAnalyzer::zFrontFH_
private

Definition at line 80 of file HGCalTBAnalyzer.cc.

Referenced by analyze(), and HGCalTBAnalyzer().