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 & itemsToGetFrom (BranchType iType) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
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 analyzePassiveHits (edm::Handle< edm::PassiveHitContainer > &hgcPh, std::string subdet)
 
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 doPassiveBH_
 
bool doPassiveEE_
 
bool doPassiveFH_
 
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]
 
std::vector< float > hgcPassiveBHEnergy
 
std::vector< int > hgcPassiveBHID
 
std::vector< std::string > hgcPassiveBHName
 
std::vector< float > hgcPassiveEEEnergy
 
std::vector< int > hgcPassiveEEID
 
std::vector< std::string > hgcPassiveEEName
 
std::vector< float > hgcPassiveFHEnergy
 
std::vector< int > hgcPassiveFHID
 
std::vector< std::string > hgcPassiveFHName
 
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::EDGetTokenT< edm::PassiveHitContainertok_hgcPHBH_
 
edm::EDGetTokenT< edm::PassiveHitContainertok_hgcPHEE_
 
edm::EDGetTokenT< edm::PassiveHitContainertok_hgcPHFH_
 
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 55 of file HGCalTBAnalyzer.cc.

Constructor & Destructor Documentation

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

Passive hits

Definition at line 126 of file HGCalTBAnalyzer.cc.

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

126  {
127 
128  usesResource("TFileService");
129 
130  //now do whatever initialization is needed
131  detectorEE_ = iConfig.getParameter<std::string>("DetectorEE");
132  detectorFH_ = iConfig.getParameter<std::string>("DetectorFH");
133  detectorBH_ = iConfig.getParameter<std::string>("DetectorBH");
134  detectorBeam_= iConfig.getParameter<std::string>("DetectorBeam");
135  ifEE_ = iConfig.getParameter<bool>("UseEE");
136  ifFH_ = iConfig.getParameter<bool>("UseFH");
137  ifBH_ = iConfig.getParameter<bool>("UseBH");
138  ifBeam_ = iConfig.getParameter<bool>("UseBeam");
139  zFrontEE_ = iConfig.getParameter<double>("ZFrontEE");
140  zFrontFH_ = iConfig.getParameter<double>("ZFrontFH");
141  zFrontBH_ = iConfig.getParameter<double>("ZFrontBH");
142  idBeams_ = iConfig.getParameter<std::vector<int>>("IDBeams");
143  doSimHits_ = iConfig.getParameter<bool>("DoSimHits");
144  doDigis_ = iConfig.getParameter<bool>("DoDigis");
145  sampleIndex_ = iConfig.getParameter<int>("SampleIndex");
146  doRecHits_ = iConfig.getParameter<bool>("DoRecHits");
147  doTree_ = iConfig.getUntrackedParameter<bool>("DoTree",false);
148  doTreeCell_ = iConfig.getUntrackedParameter<bool>("DoTreeCell",false);
149  doPassiveEE_ = iConfig.getUntrackedParameter<bool>("DoPassiveEE",false);
150  doPassiveFH_ = iConfig.getUntrackedParameter<bool>("DoPassiveFH",false);
151  doPassiveBH_ = iConfig.getUntrackedParameter<bool>("DoPassiveBH",false);
152 
153 
154 #ifdef EDM_ML_DEBUG
155  std::cout << "HGCalTBAnalyzer:: SimHits = " << doSimHits_ << " Digis = "
156  << doDigis_ << ":" << sampleIndex_ << " RecHits = " << doRecHits_
157  << " useDets " << ifEE_ << ":" << ifFH_ << ":" << ifBH_ << ":"
158  << ifBeam_ << " zFront " << zFrontEE_ << ":" << zFrontFH_ << ":"
159  << zFrontBH_ << " IdBeam " << idBeams_.size() << ":";
160  for (auto id : idBeams_) std::cout << " " << id;
161  std::cout << std::endl;
162 #endif
163  if (idBeams_.size() == 0) idBeams_.push_back(1001);
164 
165  edm::InputTag tmp0 = iConfig.getParameter<edm::InputTag>("GeneratorSrc");
166  tok_hepMC_ = consumes<edm::HepMCProduct>(tmp0);
167 
168 #ifdef EDM_ML_DEBUG
169  std::cout << "HGCalTBAnalyzer:: GeneratorSource = " << tmp0 << std::endl;
170 #endif
171  std::string tmp1 = iConfig.getParameter<std::string>("CaloHitSrcEE");
172  tok_hitsEE_ = consumes<edm::PCaloHitContainer>(edm::InputTag("g4SimHits",tmp1));
173  tok_simTk_ = consumes<edm::SimTrackContainer>(edm::InputTag("g4SimHits"));
174  tok_simVtx_ = consumes<edm::SimVertexContainer>(edm::InputTag("g4SimHits"));
175  edm::InputTag tmp2 = iConfig.getParameter<edm::InputTag>("DigiSrcEE");
176  tok_digiEE_ = consumes<HGCEEDigiCollection>(tmp2);
177  edm::InputTag tmp3 = iConfig.getParameter<edm::InputTag>("RecHitSrcEE");
178  tok_hitrEE_ = consumes<HGCRecHitCollection>(tmp3);
179 #ifdef EDM_ML_DEBUG
180  if (ifEE_) {
181  std::cout << "HGCalTBAnalyzer:: Detector " << detectorEE_ << " with tags "
182  << tmp1 << ", " << tmp2 << ", " << tmp3 << std::endl;
183  }
184 #endif
185  tmp1 = iConfig.getParameter<std::string>("CaloHitSrcFH");
186  tok_hitsFH_ = consumes<edm::PCaloHitContainer>(edm::InputTag("g4SimHits",tmp1));
187  tmp2 = iConfig.getParameter<edm::InputTag>("DigiSrcFH");
188  tok_digiFH_ = consumes<HGCHEDigiCollection>(tmp2);
189  tmp3 = iConfig.getParameter<edm::InputTag>("RecHitSrcFH");
190  tok_hitrFH_ = consumes<HGCRecHitCollection>(tmp3);
191 #ifdef EDM_ML_DEBUG
192  if (ifFH_) {
193  std::cout << "HGCalTBAnalyzer:: Detector " << detectorFH_ << " with tags "
194  << tmp1 << ", " << tmp2 << ", " << tmp3 << std::endl;
195  }
196 #endif
197  tmp1 = iConfig.getParameter<std::string>("CaloHitSrcBH");
198  tok_hitsBH_ = consumes<edm::PCaloHitContainer>(edm::InputTag("g4SimHits",tmp1));
199  tmp2 = iConfig.getParameter<edm::InputTag>("DigiSrcBH");
200  tok_digiBH_ = consumes<HGCBHDigiCollection>(tmp2);
201  tmp3 = iConfig.getParameter<edm::InputTag>("RecHitSrcBH");
202  tok_hitrBH_ = consumes<HGCRecHitCollection>(tmp3);
203 
205  edm::InputTag tmp = iConfig.getParameter<edm::InputTag>("HGCPassiveEE");
206  tok_hgcPHEE_ = consumes<edm::PassiveHitContainer>(tmp);
207 
208  tmp = iConfig.getParameter<edm::InputTag>("HGCPassiveFH");
209  tok_hgcPHFH_ = consumes<edm::PassiveHitContainer>(tmp);
210 
211  tmp = iConfig.getParameter<edm::InputTag>("HGCPassiveBH");
212  tok_hgcPHBH_ = consumes<edm::PassiveHitContainer>(tmp);
213 
214 
215 #ifdef EDM_ML_DEBUG
216  if (ifBH_) {
217  std::cout << "HGCalTBAnalyzer:: Detector " << detectorBH_ << " with tags "
218  << tmp1 << ", " << tmp2 << ", " << tmp3 << std::endl;
219  }
220 #endif
221  tmp1 = iConfig.getParameter<std::string>("CaloHitSrcBeam");
222  tok_hitsBeam_= consumes<edm::PCaloHitContainer>(edm::InputTag("g4SimHits",tmp1));
223 #ifdef EDM_ML_DEBUG
224  if (ifBeam_) {
225  std::cout << "HGCalTBAnalyzer:: Detector " << detectorBeam_ << " with tags "
226  << tmp1 << std::endl;
227  }
228 #endif
229 }
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_
edm::EDGetTokenT< edm::PassiveHitContainer > tok_hgcPHEE_
edm::EDGetTokenT< edm::PassiveHitContainer > tok_hgcPHBH_
std::string detectorBeam_
std::vector< std::vector< double > > tmp
Definition: MVATrainer.cc:100
edm::EDGetTokenT< edm::PCaloHitContainer > tok_hitsEE_
edm::EDGetToken tok_digiBH_
edm::EDGetTokenT< edm::PassiveHitContainer > tok_hgcPHFH_
edm::EDGetToken tok_hitrEE_
edm::EDGetTokenT< edm::SimVertexContainer > tok_simVtx_
edm::EDGetToken tok_digiEE_
HGCalTBAnalyzer::~HGCalTBAnalyzer ( )

Definition at line 231 of file HGCalTBAnalyzer.cc.

231 {}

Member Function Documentation

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

EE

FH

BH

Implements edm::one::EDAnalyzerBase.

Definition at line 487 of file HGCalTBAnalyzer.cc.

References ecalMGPA::adc(), analyzeDigi(), analyzePassiveHits(), analyzeRecHits(), analyzeSimHits(), analyzeSimTracks(), edm::HandleBase::clear(), gather_cfg::cout, HGCSample::data(), detectorBeam_, detectorBH_, detectorEE_, detectorFH_, doDigis_, doPassiveBH_, doPassiveEE_, doPassiveFH_, doRecHits_, doSimHits_, doTree_, 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_hgcPHBH_, tok_hgcPHEE_, tok_hgcPHFH_, tok_hitrEE_, tok_hitrFH_, tok_hitsBeam_, tok_hitsBH_, tok_hitsEE_, tok_hitsFH_, tok_simTk_, tok_simVtx_, tree_, zFrontBH_, zFrontEE_, and zFrontFH_.

Referenced by endRun().

488  {
489 
490  //Generator input
492  iEvent.getByToken(tok_hepMC_,evtMC);
493  if (!evtMC.isValid()) {
494  edm::LogWarning("HGCal") << "no HepMCProduct found";
495  } else {
496  const HepMC::GenEvent * myGenEvent = evtMC->GetEvent();
497  unsigned int k(0);
498  for (HepMC::GenEvent::particle_const_iterator p = myGenEvent->particles_begin();
499  p != myGenEvent->particles_end(); ++p, ++k) {
500  if (k == 0) hBeam_->Fill((*p)->momentum().rho());
501 #ifdef EDM_ML_DEBUG
502  std::cout << "Particle[" << k << "] with p " << (*p)->momentum().rho()
503  << " theta " << (*p)->momentum().theta() << " phi "
504  << (*p)->momentum().phi() << std::endl;
505 #endif
506  }
507  }
508 
509  //Now the Simhits
510  if (doSimHits_) {
512  iEvent.getByToken(tok_simTk_, SimTk);
514  iEvent.getByToken(tok_simVtx_, SimVtx);
515  analyzeSimTracks(SimTk, SimVtx);
516 
517  simHitLayEn1EE.clear(); simHitLayEn2EE.clear();
518  simHitLayEn1FH.clear(); simHitLayEn2FH.clear();
519  simHitLayEn1BH.clear(); simHitLayEn2BH.clear();
520  simHitLayEnBeam.clear();
521  simHitCellIdEE.clear(); simHitCellEnEE.clear();
522  simHitCellIdFH.clear(); simHitCellEnFH.clear();
523  simHitCellIdBH.clear(); simHitCellEnBH.clear();
524  simHitCellIdBeam.clear(); simHitCellEnBeam.clear();
525  edm::Handle<edm::PCaloHitContainer> theCaloHitContainers;
526  std::vector<PCaloHit> caloHits;
527  if (ifEE_) {
528  simHitLayEn1EE = std::vector<float>(hgcons_[0]->layers(false),0);
529  simHitLayEn2EE = std::vector<float>(hgcons_[0]->layers(true),0);
530  iEvent.getByToken(tok_hitsEE_, theCaloHitContainers);
531  if (theCaloHitContainers.isValid()) {
532 #ifdef EDM_ML_DEBUG
533  std::cout << "PcalohitContainer for " << detectorEE_ << " has "
534  << theCaloHitContainers->size() << " hits" << std::endl;
535 #endif
536  caloHits.clear();
537  caloHits.insert(caloHits.end(), theCaloHitContainers->begin(),
538  theCaloHitContainers->end());
539  analyzeSimHits(0, caloHits, zFrontEE_);
540  } else {
541 #ifdef EDM_ML_DEBUG
542  std::cout << "PCaloHitContainer does not exist for " << detectorEE_
543  << " !!!" << std::endl;
544 #endif
545  }
546  }
547  if (ifFH_) {
548  simHitLayEn1FH = std::vector<float>(hgcons_[1]->layers(false),0);
549  simHitLayEn2FH = std::vector<float>(hgcons_[1]->layers(true),0);
550  iEvent.getByToken(tok_hitsFH_, theCaloHitContainers);
551  if (theCaloHitContainers.isValid()) {
552 #ifdef EDM_ML_DEBUG
553  std::cout << "PcalohitContainer for " << detectorFH_ << " has "
554  << theCaloHitContainers->size() << " hits" << std::endl;
555 #endif
556  caloHits.clear();
557  caloHits.insert(caloHits.end(), theCaloHitContainers->begin(),
558  theCaloHitContainers->end());
559  analyzeSimHits(1, caloHits, zFrontFH_);
560  } else {
561 #ifdef EDM_ML_DEBUG
562  std::cout << "PCaloHitContainer does not exist for " << detectorFH_
563  << " !!!" << std::endl;
564 #endif
565  }
566  }
567  if (ifBH_) {
568  simHitLayEn1BH = std::vector<float>(AHCalDetId::MaxDepth,0);
569  simHitLayEn2BH = std::vector<float>(AHCalDetId::MaxDepth,0);
570  iEvent.getByToken(tok_hitsBH_, theCaloHitContainers);
571  if (theCaloHitContainers.isValid()) {
572 #ifdef EDM_ML_DEBUG
573  std::cout << "PcalohitContainer for " << detectorBH_ << " has "
574  << theCaloHitContainers->size() << " hits" << std::endl;
575 #endif
576  caloHits.clear();
577  caloHits.insert(caloHits.end(), theCaloHitContainers->begin(),
578  theCaloHitContainers->end());
579  analyzeSimHits(2, caloHits, zFrontBH_);
580  } else {
581 #ifdef EDM_ML_DEBUG
582  std::cout << "PCaloHitContainer does not exist for " << detectorBH_
583  << " !!!" << std::endl;
584 #endif
585  }
586  }
587  if (ifBeam_) {
588  simHitLayEnBeam= std::vector<float>(idBeams_.size(),0);
589  iEvent.getByToken(tok_hitsBeam_, theCaloHitContainers);
590  if (theCaloHitContainers.isValid()) {
591 #ifdef EDM_ML_DEBUG
592  std::cout << "PcalohitContainer for " << detectorBeam_ << " has "
593  << theCaloHitContainers->size() << " hits" << std::endl;
594 #endif
595  caloHits.clear();
596  caloHits.insert(caloHits.end(), theCaloHitContainers->begin(),
597  theCaloHitContainers->end());
598  analyzeSimHits(3, caloHits, 0.0);
599  } else {
600 #ifdef EDM_ML_DEBUG
601  std::cout << "PCaloHitContainer does not exist for " << detectorBeam_
602  << " !!!" << std::endl;
603 #endif
604  }
605  }
606  //if (doTree_) tree_->Fill();
607  }//if (doSimHits_)
608 
610  if (doPassiveEE_) {
613  iEvent.getByToken(tok_hgcPHEE_,hgcPH);
614  analyzePassiveHits(hgcPH, "EE");
615  }
616 
617  if (doPassiveFH_) {
620  iEvent.getByToken(tok_hgcPHFH_,hgcPH);
621  analyzePassiveHits(hgcPH, "FH");
622  }
623 
624  if (doPassiveBH_) {
627  iEvent.getByToken(tok_hgcPHBH_,hgcPH);
628  analyzePassiveHits(hgcPH, "BH");
629  }
630  if ((doSimHits_ || doPassiveEE_) && (doTree_)) tree_->Fill();
631 
632  //Now the Digis
633  if (doDigis_) {
634  if (ifEE_) {
635  edm::Handle<HGCEEDigiCollection> theDigiContainers;
636  iEvent.getByToken(tok_digiEE_, theDigiContainers);
637  if (theDigiContainers.isValid()) {
638 #ifdef EDM_ML_DEBUG
639  std::cout << "HGCDigiCintainer for " << detectorEE_ << " with "
640  << theDigiContainers->size() << " element(s)" << std::endl;
641 #endif
642  for (auto it : *theDigiContainers) {
643  HGCEEDetId detId = (it.id());
644  HGCSample hgcSample = it.sample(sampleIndex_);
645  uint16_t adc = hgcSample.data();
646  analyzeDigi(0, detId, adc);
647  }
648  }
649  }
650  if (ifFH_) {
651  edm::Handle<HGCHEDigiCollection> theDigiContainers;
652  iEvent.getByToken(tok_digiFH_, theDigiContainers);
653  if (theDigiContainers.isValid()) {
654 #ifdef EDM_ML_DEBUG
655  std::cout << "HGCDigiContainer for " << detectorFH_ << " with "
656  << theDigiContainers->size() << " element(s)" << std::endl;
657 #endif
658  for (auto it : *theDigiContainers) {
659  HGCHEDetId detId = (it.id());
660  HGCSample hgcSample = it.sample(sampleIndex_);
661  uint16_t adc = hgcSample.data();
662  analyzeDigi(1, detId, adc);
663  }
664  }
665  }
666  }
667 
668  //The Rechits
669  if (doRecHits_) {
670  edm::Handle<HGCRecHitCollection> theCaloHitContainers;
671  if (ifEE_) {
672  iEvent.getByToken(tok_hitrEE_, theCaloHitContainers);
673  if (theCaloHitContainers.isValid()) {
674 #ifdef EDM_ML_DEBUG
675  std::cout << "HGCRecHitCollection for " << detectorEE_ << " has "
676  << theCaloHitContainers->size() << " hits" << std::endl;
677 #endif
678  analyzeRecHits(0, theCaloHitContainers);
679  } else {
680 #ifdef EDM_ML_DEBUG
681  std::cout << "HGCRecHitCollection does not exist for " << detectorEE_
682  << " !!!" << std::endl;
683 #endif
684  }
685  }
686  if (ifFH_) {
687  iEvent.getByToken(tok_hitrFH_, theCaloHitContainers);
688  if (theCaloHitContainers.isValid()) {
689 #ifdef EDM_ML_DEBUG
690  std::cout << "HGCRecHitCollection for " << detectorFH_ << " has "
691  << theCaloHitContainers->size() << " hits" << std::endl;
692 #endif
693  analyzeRecHits(1, theCaloHitContainers);
694  } else {
695 #ifdef EDM_ML_DEBUG
696  std::cout << "HGCRecHitCollection does not exist for " << detectorFH_
697  << " !!!" << std::endl;
698 #endif
699  }//else
700  }//if (ifFH_)
701  }//if (doRecHits_)
702 
703 }//void HGCalTBAnalyzer::analyze
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_
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]
edm::EDGetTokenT< edm::PassiveHitContainer > tok_hgcPHEE_
const HepMC::GenEvent * GetEvent() const
Definition: HepMCProduct.h:38
edm::EDGetTokenT< edm::PassiveHitContainer > tok_hgcPHBH_
std::vector< uint32_t > simHitCellIdEE
std::vector< uint32_t > simHitCellIdBH
std::vector< float > simHitLayEnBeam
void analyzePassiveHits(edm::Handle< edm::PassiveHitContainer > &hgcPh, std::string subdet)
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::EDGetTokenT< edm::PassiveHitContainer > tok_hgcPHFH_
edm::EDGetToken tok_hitrEE_
edm::EDGetTokenT< edm::SimVertexContainer > tok_simVtx_
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 917 of file HGCalTBAnalyzer.cc.

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

Referenced by analyze(), and endRun().

917  {
918 
919  DetId id1 = DetId(detId.rawId());
920  GlobalPoint global = hgeom_[type]->getPosition(id1);
921  hDigiOcc_[type]->Fill(global.x(),global.y());
922  hDigiLng_[type]->Fill(global.z());
923  hDigiADC_[type]->Fill(adc);
924 }
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::analyzePassiveHits ( edm::Handle< edm::PassiveHitContainer > &  hgcPh,
std::string  subdet 
)
private

Definition at line 976 of file HGCalTBAnalyzer.cc.

References gather_cfg::cout, DEFINE_FWK_MODULE, hgcPassiveBHEnergy, hgcPassiveBHID, hgcPassiveBHName, hgcPassiveEEEnergy, hgcPassiveEEID, hgcPassiveEEName, hgcPassiveFHEnergy, hgcPassiveFHID, hgcPassiveFHName, dataset::name, AlCaHLTBitMon_QueryRunRegistry::string, ntuplemaker::time, and findQualityFiles::v.

Referenced by analyze(), and endRun().

976  {
977 
978  for (auto v : *hgcPH) {
979  double energy = v.energy();
980 #ifdef EDM_ML_DEBUG
981  double time = v.time();
982 #endif
983  std::string name = v.vname();
984  unsigned int id = v.id();
985 
986 #ifdef EDM_ML_DEBUG
987  std::cout << "HGCalTBAnalyzer::analyzePassiveHits:Energy:Time:Name:Id : "
988  << energy << ":" << time << ":" << name << ":" << id << std::endl;
989 #endif
990  if (subdet=="EE") {
991  hgcPassiveEEEnergy.push_back(energy);
992  hgcPassiveEEName.push_back(name);
993  hgcPassiveEEID.push_back(id);
994  } else if (subdet=="FH") {
995  hgcPassiveFHEnergy.push_back(energy);
996  hgcPassiveFHName.push_back(name);
997  hgcPassiveFHID.push_back(id);
998  } else if (subdet=="BH") {
999  hgcPassiveBHEnergy.push_back(energy);
1000  hgcPassiveBHName.push_back(name);
1001  hgcPassiveBHID.push_back(id);
1002  }
1003  }
1004 }
std::vector< int > hgcPassiveEEID
std::vector< std::string > hgcPassiveEEName
std::vector< float > hgcPassiveBHEnergy
std::vector< int > hgcPassiveFHID
std::vector< float > hgcPassiveFHEnergy
std::vector< std::string > hgcPassiveFHName
std::vector< int > hgcPassiveBHID
std::vector< float > hgcPassiveEEEnergy
std::vector< std::string > hgcPassiveBHName
void HGCalTBAnalyzer::analyzeRecHits ( int  type,
edm::Handle< HGCRecHitCollection > &  hits 
)
private

Definition at line 926 of file HGCalTBAnalyzer.cc.

References HGCalDetId::cell(), gather_cfg::cout, plotBeamSpotDB::first, HGCalGeometry::getPosition(), hgcons_, hgeom_, hRecHitE_, hRecHitLat_, hRecHitLng1_, hRecHitLng_, hRecHitOcc_, HGCalDetId::layer(), 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().

927  {
928 
929  std::map<int,double> map_hitLayer;
930  std::map<int,std::pair<DetId,double> > map_hitCell;
931  for (auto it : *hits) {
932  DetId detId = it.id();
933  GlobalPoint global = hgeom_[type]->getPosition(detId);
934  double energy = it.energy();
935  int layer = HGCalDetId(detId).layer();
936  int cell = HGCalDetId(detId).cell();
937  hRecHitOcc_[type]->Fill(global.x(),global.y(),energy);
938  hRecHitE_[type]->Fill(energy);
939  if (map_hitLayer.count(layer) != 0) {
940  map_hitLayer[layer] += energy;
941  } else {
942  map_hitLayer[layer] = energy;
943  }
944  if (map_hitCell.count(cell) != 0) {
945  double ee = energy + map_hitCell[cell].second;
946  map_hitCell[cell] = std::pair<uint32_t,double>(detId,ee);
947  } else {
948  map_hitCell[cell] = std::pair<uint32_t,double>(detId,energy);
949  }
950 #ifdef EDM_ML_DEBUG
951  std::cout << "RecHit: " << layer << " " << global.x() << " " << global.y()
952  << " " << global.z() << " " << energy << std::endl;
953 #endif
954  }
955 
956  for (auto itr : map_hitLayer) {
957  int layer = itr.first;
958  double energy = itr.second;
959  double zp = hgcons_[type]->waferZ(layer,true);
960 #ifdef EDM_ML_DEBUG
961  std::cout << "SimHit:Layer " << layer << " " << zp << " " << energy
962  << std::endl;
963 #endif
964  hRecHitLng_[type]->Fill(zp,energy);
965  hRecHitLng1_[type]->Fill(layer,energy);
966  }
967 
968  for (auto itr : map_hitCell) {
969  DetId detId = ((itr.second).first);
970  double energy = ((itr.second).second);
971  GlobalPoint global = hgeom_[type]->getPosition(detId);
972  hRecHitLat_[type]->Fill(global.x(),global.y(),energy);
973  }
974 }
type
Definition: HCALResponse.h:21
TProfile * hRecHitLng_[3]
T y() const
Definition: PV3DBase.h:63
GlobalPoint getPosition(const DetId &id) const
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
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
TProfile * hRecHitLng1_[3]
void HGCalTBAnalyzer::analyzeSimHits ( int  type,
std::vector< PCaloHit > &  hits,
double  zFront 
)
private

Definition at line 705 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(), 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().

706  {
707 
708  std::map<uint32_t,double> map_hits, map_hitn;
709  std::map<int,double> map_hitDepth;
710  std::map<int,std::pair<uint32_t,double> > map_hitLayer, map_hitCell;
711  double entot(0);
712  for (unsigned int i=0; i<hits.size(); i++) {
713  double energy = hits[i].energy();
714  double time = hits[i].time();
715  uint32_t id = hits[i].id();
716  entot += energy;
717  int subdet, zside, layer, sector, subsector(0), cell, depth(0), idx(0);
718  if (type == 2) {
719  subdet = HcalDetId(id).subdet();
720  if (subdet != HcalOther) continue;
721  AHCalDetId hid(id);
722  layer = depth = hid.depth();
723  zside = hid.zside();
724  sector = hid.irow();
725  cell = hid.icol();
726  idx = ((hid.irowAbs()*100) + (hid.icolAbs()));
727  } else if (type == 3) {
728  HcalTestBeamNumbering::unpackIndex(id, subdet, layer, sector, cell);
729  depth = layer; zside = 1;
730  idx = subdet*1000 + layer;
731  layer = idx;
732  } else {
733  HGCalTestNumbering::unpackHexagonIndex(id, subdet, zside, layer, sector,
734  subsector, cell);
735  depth = hgcons_[type]->simToReco(cell,layer,sector,true).second;
736  idx = sector*1000+cell;
737  }
738 #ifdef EDM_ML_DEBUG
739  std::cout << "SimHit:Hit[" << i << "] Id " << subdet << ":" << zside << ":"
740  << layer << ":" << sector << ":" << subsector << ":" << cell
741  << ":" << depth << " Energy " << energy << " Time " << time
742  << std::endl;
743 #endif
744  if (map_hits.count(id) != 0) {
745  map_hits[id] += energy;
746  } else {
747  map_hits[id] = energy;
748  }
749  if (map_hitLayer.count(layer) != 0) {
750  double ee = energy + map_hitLayer[layer].second;
751  map_hitLayer[layer] = std::pair<uint32_t,double>(id,ee);
752  } else {
753  map_hitLayer[layer] = std::pair<uint32_t,double>(id,energy);
754  }
755  if (depth >= 0) {
756  if (map_hitCell.count(idx) != 0) {
757  double ee = energy + map_hitCell[idx].second;
758  map_hitCell[idx] = std::pair<uint32_t,double>(id,ee);
759  } else {
760  map_hitCell[idx] = std::pair<uint32_t,double>(id,energy);
761  }
762  if (map_hitDepth.count(depth) != 0) {
763  map_hitDepth[depth] += energy;
764  } else {
765  map_hitDepth[depth] = energy;
766  }
767  uint32_t idn = (type >= 2) ? id :
768  HGCalTestNumbering::packHexagonIndex(subdet, zside, depth, sector,
769  subsector, cell);
770  if (map_hitn.count(idn) != 0) {
771  map_hitn[idn] += energy;
772  } else {
773  map_hitn[idn] = energy;
774  }
775  }
776  hSimHitT_[type]->Fill(time,energy);
777  }
778 
779  hSimHitEn_[type]->Fill(entot);
780  for (auto itr : map_hits) {
781  hSimHitE_[type]->Fill(itr.second);
782  }
783 
784  for (auto itr : map_hitLayer) {
785  int layer = itr.first - 1;
786  double energy = (itr.second).second;
787  double zp(0);
788  if (type < 2) zp = hgcons_[type]->waferZ(layer+1,false);
789  else if (type == 2) zp = AHCalDetId((itr.second).first).getZ();
790 #ifdef EDM_ML_DEBUG
791  std::cout << "SimHit:Layer " << layer+1 << " Z " << zp << ":" << zp-zFront
792  << " E " << energy << std::endl;
793 #endif
794  if (type < 3) {
795  hSimHitLng_[type]->Fill(zp-zFront,energy);
796  hSimHitLng2_[type]->Fill(layer+1,energy);
797  }
798  if (type == 0) {
799  if (layer < (int)(hSimHitLayEn1EE_.size())) {
800  simHitLayEn1EE[layer] = energy;
801  hSimHitLayEn1EE_[layer]->Fill(energy);
802  }
803  } else if (type == 1) {
804  if (layer < (int)(hSimHitLayEn1FH_.size())) {
805  simHitLayEn1FH[layer] = energy;
806  hSimHitLayEn1FH_[layer]->Fill(energy);
807  }
808  } else if (type == 2) {
809  if (layer < (int)(hSimHitLayEn1BH_.size())) {
810  simHitLayEn1BH[layer] = energy;
811  hSimHitLayEn1BH_[layer]->Fill(energy);
812  }
813  } else {
814  for (unsigned int k=0; k<idBeams_.size(); ++k) {
815  if (layer+1 == idBeams_[k]) {
816  simHitLayEnBeam[k] = energy;
817  hSimHitLayEnBeam_[k]->Fill(energy);
818  break;
819  }
820  }
821  }
822  }
823  for (auto itr : map_hitDepth) {
824  int layer = itr.first - 1;
825  double energy = itr.second;
826 #ifdef EDM_ML_DEBUG
827  std::cout << "SimHit:Layer " << layer+1 << " " << energy << std::endl;
828 #endif
829  hSimHitLng1_[type]->Fill(layer+1,energy);
830  if (type == 0) {
831  if (layer < (int)(hSimHitLayEn2EE_.size())) {
832  simHitLayEn2EE[layer] = energy;
833  hSimHitLayEn2EE_[layer]->Fill(energy);
834  }
835  } else if (type == 1) {
836  if (layer < (int)(hSimHitLayEn2FH_.size())) {
837  simHitLayEn2FH[layer] = energy;
838  hSimHitLayEn2FH_[layer]->Fill(energy);
839  }
840  } else if (type == 2) {
841  if (layer < (int)(hSimHitLayEn2BH_.size())) {
842  simHitLayEn2BH[layer] = energy;
843  hSimHitLayEn2BH_[layer]->Fill(energy);
844  }
845  }
846  }
847 
848  if (type < 3) {
849  for (auto itr : map_hitCell) {
850  uint32_t id = ((itr.second).first);
851  double energy = ((itr.second).second);
852  std::pair<float,float> xy(0,0);
853  double xx(0);
854  if (type == 2) {
855  xy = AHCalDetId(id).getXY();
856  xx = xy.first;
857  } else {
858  int subdet, zside, layer, sector, subsector, cell;
859  HGCalTestNumbering::unpackHexagonIndex(id, subdet, zside, layer, sector,
860  subsector, cell);
861  xy = hgcons_[type]->locateCell(cell,layer,sector,false);
862  double zp = hgcons_[type]->waferZ(layer,false);
863  xx = (zp < 0) ? -xy.first : xy.first;
864  }
865  hSimHitLat_[type]->Fill(xx,xy.second,energy);
866  }
867  }
868 
869  for (auto itr : map_hitn) {
870  uint32_t id = itr.first;
871  double energy = itr.second;
872  if (type == 0) {
873  simHitCellIdEE.push_back(id); simHitCellEnEE.push_back(energy);
874  } else if (type == 1) {
875  simHitCellIdFH.push_back(id); simHitCellEnFH.push_back(energy);
876  } else if (type == 2) {
877  simHitCellIdBH.push_back(id); simHitCellEnBH.push_back(energy);
878  } else if (type == 3) {
879  simHitCellIdBeam.push_back(id); simHitCellEnBeam.push_back(energy);
880  }
881  }
882 }
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]
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 884 of file HGCalTBAnalyzer.cc.

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

Referenced by analyze(), and endRun().

885  {
886 
887  xBeam = yBeam = zBeam = pBeam = -1000000;
888  int vertIndex(-1);
889  for (auto simTrkItr : *SimTk) {
890 #ifdef EDM_ML_DEBUG
891  std::cout << "Track " << simTrkItr.trackId() << " Vertex "
892  << simTrkItr.vertIndex() << " Type " << simTrkItr.type()
893  << " Charge " << simTrkItr.charge() << " momentum "
894  << simTrkItr.momentum() << " " << simTrkItr.momentum().P()
895  << std::endl;
896 #endif
897  if (vertIndex == -1) {
898  vertIndex = simTrkItr.vertIndex();
899  pBeam = simTrkItr.momentum().P();
900  }
901  }
902  if (vertIndex != -1 && vertIndex < (int)SimVtx->size()) {
903  edm::SimVertexContainer::const_iterator simVtxItr= SimVtx->begin();
904  for (int iv=0; iv<vertIndex; iv++) simVtxItr++;
905 #ifdef EDM_ML_DEBUG
906  std::cout << "Vertex " << vertIndex << " position "
907  << simVtxItr->position() << std::endl;
908 #endif
909  xBeam = simVtxItr->position().X();
910  yBeam = simVtxItr->position().Y();
911  zBeam = simVtxItr->position().Z();
912  }
913 
914 }
void HGCalTBAnalyzer::beginJob ( void  )
overrideprivatevirtual

Reimplemented from edm::one::EDAnalyzerBase.

Definition at line 276 of file HGCalTBAnalyzer.cc.

References detectorBeam_, detectorBH_, detectorEE_, detectorFH_, doDigis_, doPassiveBH_, doPassiveEE_, doPassiveFH_, doRecHits_, doSimHits_, doTree_, doTreeCell_, fs_, hBeam_, hDigiADC_, hDigiLng_, hDigiOcc_, hgcPassiveBHEnergy, hgcPassiveBHID, hgcPassiveBHName, hgcPassiveEEEnergy, hgcPassiveEEID, hgcPassiveEEName, hgcPassiveFHEnergy, hgcPassiveFHID, hgcPassiveFHName, 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.

276  {
277 
278  char name[40], title[100];
279  hBeam_ = fs_->make<TH1D>("BeamP", "Beam Momentum", 1000, 0, 1000.0);
280  for (int i=0; i<3; ++i) {
281  bool book(ifEE_);
282  std::string det(detectorEE_);
283  if (i == 1) {
284  book = ifFH_;
285  det = detectorFH_;
286  } else if (i == 2) {
287  book = ifBH_;
288  det = detectorBH_;
289  }
290 
291  if (doSimHits_ && book) {
292  sprintf (name, "SimHitEn%s", det.c_str());
293  sprintf (title,"Sim Hit Energy for %s", det.c_str());
294  hSimHitE_[i] = fs_->make<TH1D>(name,title,100000,0.,0.2);
295  sprintf (name, "SimHitEnX%s", det.c_str());
296  sprintf (title,"Sim Hit Energy for %s", det.c_str());
297  hSimHitEn_[i] = fs_->make<TH1D>(name,title,100000,0.,0.2);
298  sprintf (name, "SimHitTm%s", det.c_str());
299  sprintf (title,"Sim Hit Timing for %s", det.c_str());
300  hSimHitT_[i] = fs_->make<TH1D>(name,title,5000,0.,500.0);
301  sprintf (name, "SimHitLat%s", det.c_str());
302  sprintf (title,"Lateral Shower profile (Sim Hit) for %s", det.c_str());
303  hSimHitLat_[i] = fs_->make<TProfile2D>(name,title,100,-100.,100.,100,-100.,100.);
304  sprintf (name, "SimHitLng%s", det.c_str());
305  sprintf (title,"Longitudinal Shower profile (Sim Hit) for %s",det.c_str());
306  hSimHitLng_[i] = fs_->make<TProfile>(name,title,50,0.,100.);
307  sprintf (name, "SimHitLng1%s", det.c_str());
308  sprintf (title,"Longitudinal Shower profile (Layer) for %s",det.c_str());
309  hSimHitLng1_[i] = fs_->make<TProfile>(name,title,200,0.,100.);
310  sprintf (name, "SimHitLng2%s", det.c_str());
311  sprintf (title,"Longitudinal Shower profile (Layer) for %s",det.c_str());
312  hSimHitLng2_[i] = fs_->make<TProfile>(name,title,200,0.,100.);
313  }
314 
315  if (doDigis_ && book) {
316  sprintf (name, "DigiADC%s", det.c_str());
317  sprintf (title,"ADC at Digi level for %s", det.c_str());
318  hDigiADC_[i] = fs_->make<TH1D>(name,title,100,0.,100.0);
319  sprintf (name, "DigiOcc%s", det.c_str());
320  sprintf (title,"Occupancy (Digi)for %s", det.c_str());
321  hDigiOcc_[i] = fs_->make<TH2D>(name,title,100,-10.,10.,100,-10.,10.);
322  sprintf (name, "DigiLng%s", det.c_str());
323  sprintf (title,"Longitudinal Shower profile (Digi) for %s",det.c_str());
324  hDigiLng_[i] = fs_->make<TH1D>(name,title,100,0.,10.);
325  }
326 
327  if (doRecHits_ && book) {
328  sprintf (name, "RecHitEn%s", det.c_str());
329  sprintf (title,"Rec Hit Energy for %s", det.c_str());
330  hRecHitE_[i] = fs_->make<TH1D>(name,title,1000,0.,10.0);
331  sprintf (name, "RecHitOcc%s", det.c_str());
332  sprintf (title,"Occupancy (Rec Hit)for %s", det.c_str());
333  hRecHitOcc_[i] = fs_->make<TH2D>(name,title,100,-10.,10.,100,-10.,10.);
334  sprintf (name, "RecHitLat%s", det.c_str());
335  sprintf (title,"Lateral Shower profile (Rec Hit) for %s", det.c_str());
336  hRecHitLat_[i] = fs_->make<TProfile2D>(name,title,100,-10.,10.,100,-10.,10.);
337  sprintf (name, "RecHitLng%s", det.c_str());
338  sprintf (title,"Longitudinal Shower profile (Rec Hit) for %s",det.c_str());
339  hRecHitLng_[i] = fs_->make<TProfile>(name,title,100,0.,10.);
340  sprintf (name, "RecHitLng1%s", det.c_str());
341  sprintf (title,"Longitudinal Shower profile vs Layer for %s",det.c_str());
342  hRecHitLng1_[i] = fs_->make<TProfile>(name,title,120,0.,60.);
343  }
344  }
345  if (ifBeam_ && doSimHits_) {
346  sprintf (name, "SimHitEn%s", detectorBeam_.c_str());
347  sprintf (title,"Sim Hit Energy for %s", detectorBeam_.c_str());
348  hSimHitE_[3] = fs_->make<TH1D>(name,title,100000,0.,0.2);
349  sprintf (name, "SimHitEnX%s", detectorBeam_.c_str());
350  sprintf (title,"Sim Hit Energy for %s", detectorBeam_.c_str());
351  hSimHitEn_[3] = fs_->make<TH1D>(name,title,100000,0.,0.2);
352  sprintf (name, "SimHitTm%s", detectorBeam_.c_str());
353  sprintf (title,"Sim Hit Timing for %s", detectorBeam_.c_str());
354  hSimHitT_[3] = fs_->make<TH1D>(name,title,5000,0.,500.0);
355  }
356  if (doSimHits_ && doTree_) {
357  tree_ = fs_->make<TTree>("HGCTB","SimHitEnergy");
358  tree_->Branch("simHitLayEn1EE", &simHitLayEn1EE);
359  tree_->Branch("simHitLayEn2EE", &simHitLayEn2EE);
360  tree_->Branch("simHitLayEn1FH", &simHitLayEn1FH);
361  tree_->Branch("simHitLayEn2FH", &simHitLayEn2FH);
362  tree_->Branch("simHitLayEn1BH", &simHitLayEn1BH);
363  tree_->Branch("simHitLayEn2BH", &simHitLayEn2BH);
364  tree_->Branch("xBeam", &xBeam, "xBeam/D");
365  tree_->Branch("yBeam", &yBeam, "yBeam/D");
366  tree_->Branch("zBeam", &zBeam, "zBeam/D");
367  tree_->Branch("pBeam", &pBeam, "pBeam/D");
368  if (doTreeCell_) {
369  tree_->Branch("simHitCellIdEE", &simHitCellIdEE);
370  tree_->Branch("simHitCellEnEE", &simHitCellEnEE);
371  tree_->Branch("simHitCellIdFH", &simHitCellIdFH);
372  tree_->Branch("simHitCellEnFH", &simHitCellEnFH);
373  tree_->Branch("simHitCellIdBH", &simHitCellIdBH);
374  tree_->Branch("simHitCellEnBH", &simHitCellEnBH);
375  tree_->Branch("simHitCellIdBeam", &simHitCellIdBeam);
376  tree_->Branch("simHitCellEnBeam", &simHitCellEnBeam);
377  }
378  }
379 
380  if (doPassiveEE_ && doTree_) {
381  tree_->Branch("hgcPassiveEEEnergy", &hgcPassiveEEEnergy);
382  tree_->Branch("hgcPassiveEEName", &hgcPassiveEEName);
383  tree_->Branch("hgcPassiveEEID", &hgcPassiveEEID);
384  }
385  if (doPassiveFH_ && doTree_) {
386  tree_->Branch("hgcPassiveFHEnergy", &hgcPassiveFHEnergy);
387  tree_->Branch("hgcPassiveFHName", &hgcPassiveFHName);
388  tree_->Branch("hgcPassiveFHID", &hgcPassiveFHID);
389  }
390  if (doPassiveBH_ && doTree_) {
391  tree_->Branch("hgcPassiveBHEnergy", &hgcPassiveBHEnergy);
392  tree_->Branch("hgcPassiveBHName", &hgcPassiveBHName);
393  tree_->Branch("hgcPassiveBHID", &hgcPassiveBHID);
394  }
395 }
std::string detectorEE_
std::vector< float > simHitLayEn2BH
std::vector< float > simHitCellEnBeam
std::string detectorBH_
std::vector< int > hgcPassiveEEID
TProfile * hSimHitLng1_[3]
std::vector< float > simHitLayEn1BH
TProfile * hSimHitLng2_[3]
TProfile * hRecHitLng_[3]
std::vector< uint32_t > simHitCellIdFH
std::vector< std::string > hgcPassiveEEName
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
std::vector< float > simHitLayEn1EE
TProfile2D * hSimHitLat_[3]
std::vector< float > simHitCellEnFH
std::vector< float > hgcPassiveBHEnergy
std::vector< int > hgcPassiveFHID
std::vector< float > hgcPassiveFHEnergy
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
std::vector< std::string > hgcPassiveFHName
std::vector< int > hgcPassiveBHID
TProfile * hRecHitLng1_[3]
std::vector< float > hgcPassiveEEEnergy
std::vector< std::string > hgcPassiveBHName
std::vector< float > simHitLayEn2FH
void HGCalTBAnalyzer::beginRun ( edm::Run const &  ,
edm::EventSetup const &   
)
overrideprivatevirtual

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

397  {
398 
399  char name[40], title[100];
400  if (ifEE_) {
402  iSetup.get<IdealGeometryRecord>().get(detectorEE_, pHGDC);
403  hgcons_[0] = &(*pHGDC);
404  if (doDigis_ || doRecHits_) {
406  iSetup.get<IdealGeometryRecord>().get(detectorEE_, geom);
407  hgeom_[0] = geom.product();
408  } else {
409  hgeom_[0] = 0;
410  }
411  for (unsigned int l=0; l<hgcons_[0]->layers(false); ++l) {
412  sprintf (name, "SimHitEnA%d%s", l, detectorEE_.c_str());
413  sprintf (title,"Sim Hit Energy in SIM layer %d for %s",l+1,
414  detectorEE_.c_str());
415  hSimHitLayEn1EE_.push_back(fs_->make<TH1D>(name,title,100000,0.,0.2));
416  if (l%3 == 0) {
417  sprintf (name, "SimHitEnB%d%s", (l/3+1), detectorEE_.c_str());
418  sprintf (title,"Sim Hit Energy in layer %d for %s",(l/3+1),
419  detectorEE_.c_str());
420  hSimHitLayEn2EE_.push_back(fs_->make<TH1D>(name,title,100000,0.,0.2));
421  }
422  }
423 #ifdef EDM_ML_DEBUG
424  std::cout << "HGCalTBAnalyzer::" << detectorEE_ << " defined with "
425  << hgcons_[0]->layers(false) << " layers" << std::endl;
426 #endif
427  } else {
428  hgcons_[0] = 0;
429  hgeom_[0] = 0;
430  }
431 
432  if (ifFH_) {
434  iSetup.get<IdealGeometryRecord>().get(detectorFH_, pHGDC);
435  hgcons_[1] = &(*pHGDC);
436  if (doDigis_ || doRecHits_) {
438  iSetup.get<IdealGeometryRecord>().get(detectorFH_, geom);
439  hgeom_[1] = geom.product();
440  } else {
441  hgeom_[1] = 0;
442  }
443  for (unsigned int l=0; l<hgcons_[1]->layers(false); ++l) {
444  sprintf (name, "SimHitEnA%d%s", l, detectorFH_.c_str());
445  sprintf (title,"Sim Hit Energy in layer %d for %s",l+1,
446  detectorFH_.c_str());
447  hSimHitLayEn1FH_.push_back(fs_->make<TH1D>(name,title,100000,0.,0.2));
448  if (l%3 == 0) {
449  sprintf (name, "SimHitEnB%d%s", (l/3+1), detectorFH_.c_str());
450  sprintf (title,"Sim Hit Energy in layer %d for %s",(l/3+1),
451  detectorFH_.c_str());
452  hSimHitLayEn2FH_.push_back(fs_->make<TH1D>(name,title,100000,0.,0.2));
453  }
454  }
455 #ifdef EDM_ML_DEBUG
456  std::cout << "HGCalTBAnalyzer::" << detectorFH_ << " defined with "
457  << hgcons_[1]->layers(false) << " layers" << std::endl;
458 #endif
459  } else {
460  hgcons_[1] = 0;
461  hgeom_[1] = 0;
462  }
463 
464  if (ifBH_) {
465  for (int l=0; l<AHCalDetId::MaxDepth; ++l) {
466  sprintf (name, "SimHitEnA%d%s", l, detectorBH_.c_str());
467  sprintf (title,"Sim Hit Energy in layer %d for %s",l+1,
468  detectorBH_.c_str());
469  hSimHitLayEn1BH_.push_back(fs_->make<TH1D>(name,title,100000,0.,0.2));
470  sprintf (name, "SimHitEnB%d%s", l, detectorBH_.c_str());
471  sprintf (title,"Sim Hit Energy in layer %d for %s",l+1,
472  detectorBH_.c_str());
473  hSimHitLayEn2BH_.push_back(fs_->make<TH1D>(name,title,100000,0.,0.2));
474  }
475  }
476 
477  if (ifBeam_) {
478  for (unsigned int l=0; l<idBeams_.size(); ++l) {
479  sprintf (name, "SimHitEna%d%s", l, detectorBeam_.c_str());
480  sprintf (title, "Sim Hit Energy in type %d for %s",idBeams_[l],
481  detectorBeam_.c_str());
482  hSimHitLayEnBeam_.push_back(fs_->make<TH1D>(name,title,100000,0.,0.2));
483  }
484  }
485 }
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 233 of file HGCalTBAnalyzer.cc.

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

233  {
235  desc.setUnknown();
236  desc.add<std::string>("DetectorEE","HGCalEESensitive");
237  desc.add<bool>("UseEE",true);
238  desc.add<double>("ZFrontEE",0.0);
239  desc.add<std::string>("CaloHitSrcEE","HGCHitsEE");
240  desc.add<edm::InputTag>("DigiSrcEE",edm::InputTag("mix","HGCDigisEE"));
241  desc.add<edm::InputTag>("RecHitSrcEE",edm::InputTag("HGCalRecHit","HGCEERecHits"));
242  desc.add<std::string>("DetectorFH","HGCalHESiliconSensitive");
243  desc.add<bool>("UseFH",false);
244  desc.add<double>("ZFrontFH",0.0);
245  desc.add<std::string>("CaloHitSrcFH","HGCHitsHEfront");
246  desc.add<edm::InputTag>("DigiSrcFH",edm::InputTag("mix","HGCDigisHEfront"));
247  desc.add<edm::InputTag>("RecHitSrcFH",edm::InputTag("HGCalRecHit","HGCHEFRecHits"));
248  desc.add<std::string>("DetectorBH","AHCal");
249  desc.add<bool>("UseBH",false);
250  desc.add<double>("ZFrontBH",0.0);
251  desc.add<std::string>("CaloHitSrcBH","HcalHits");
252  desc.add<edm::InputTag>("DigiSrcBH",edm::InputTag("mix","HGCDigisHEback"));
253  desc.add<edm::InputTag>("RecHitSrcBH",edm::InputTag("HGCalRecHit","HGCHEBRecHits"));
254  desc.add<std::string>("DetectorBeam","HcalTB06BeamDetectorl");
255  desc.add<bool>("UseBeam",false);
256  desc.add<std::string>("CaloHitSrcBeam","HcalTB06BeamHits");
257  std::vector<int> ids = {1000,1001,1002,1003,1004,1005,1006,1007,1008,1011,1012,1013,1014,2001,2002,2003,2004,2005};
258  desc.add<std::vector<int>>("IDBeams",ids);
259  desc.add<edm::InputTag>("GeneratorSrc",edm::InputTag("generatorSmeared"));
260  desc.add<edm::InputTag>("HGCPassiveEE",edm::InputTag("g4SimHits","HGCalEEPassiveHits"));
261  desc.add<edm::InputTag>("HGCPassiveFH",edm::InputTag("g4SimHits","HGCalHEPassiveHits"));
262  desc.add<edm::InputTag>("HGCPassiveBH",edm::InputTag("g4SimHits","HGCalAHPassiveHits"));
263  desc.add<bool>("DoSimHits",true);
264  desc.add<bool>("DoDigis",true);
265  desc.add<bool>("DoRecHits",true);
266  desc.add<int>("SampleIndex",0);
267  desc.addUntracked<bool>("DoTree",true);
268  desc.addUntracked<bool>("DoTreeCell",true);
269  desc.addUntracked<bool>("DoPassiveEE",false);
270  desc.addUntracked<bool>("DoPassiveFH",false);
271  desc.addUntracked<bool>("DoPassiveBH",false);
272 
273  descriptions.add("HGCalTBAnalyzer",desc);
274 }
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 84 of file HGCalTBAnalyzer.cc.

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

std::string HGCalTBAnalyzer::detectorBH_
private

Definition at line 84 of file HGCalTBAnalyzer.cc.

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

std::string HGCalTBAnalyzer::detectorEE_
private

Definition at line 83 of file HGCalTBAnalyzer.cc.

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

std::string HGCalTBAnalyzer::detectorFH_
private

Definition at line 83 of file HGCalTBAnalyzer.cc.

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

bool HGCalTBAnalyzer::doDigis_
private

Definition at line 81 of file HGCalTBAnalyzer.cc.

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

bool HGCalTBAnalyzer::doPassiveBH_
private

Definition at line 82 of file HGCalTBAnalyzer.cc.

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

bool HGCalTBAnalyzer::doPassiveEE_
private

Definition at line 82 of file HGCalTBAnalyzer.cc.

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

bool HGCalTBAnalyzer::doPassiveFH_
private

Definition at line 82 of file HGCalTBAnalyzer.cc.

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

bool HGCalTBAnalyzer::doRecHits_
private

Definition at line 81 of file HGCalTBAnalyzer.cc.

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

bool HGCalTBAnalyzer::doSimHits_
private

Definition at line 81 of file HGCalTBAnalyzer.cc.

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

bool HGCalTBAnalyzer::doTree_
private

Definition at line 80 of file HGCalTBAnalyzer.cc.

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

bool HGCalTBAnalyzer::doTreeCell_
private

Definition at line 80 of file HGCalTBAnalyzer.cc.

Referenced by beginJob(), and HGCalTBAnalyzer().

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

Definition at line 76 of file HGCalTBAnalyzer.cc.

Referenced by beginJob(), and beginRun().

TH1D * HGCalTBAnalyzer::hBeam_
private

Definition at line 100 of file HGCalTBAnalyzer.cc.

Referenced by analyze(), and beginJob().

TH1D* HGCalTBAnalyzer::hDigiADC_[3]
private

Definition at line 99 of file HGCalTBAnalyzer.cc.

Referenced by analyzeDigi(), and beginJob().

TH1D * HGCalTBAnalyzer::hDigiLng_[2]
private

Definition at line 99 of file HGCalTBAnalyzer.cc.

Referenced by analyzeDigi(), and beginJob().

TH2D* HGCalTBAnalyzer::hDigiOcc_[3]
private

Definition at line 101 of file HGCalTBAnalyzer.cc.

Referenced by analyzeDigi(), and beginJob().

const HGCalDDDConstants* HGCalTBAnalyzer::hgcons_[2]
private

Definition at line 77 of file HGCalTBAnalyzer.cc.

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

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

Definition at line 119 of file HGCalTBAnalyzer.cc.

Referenced by analyzePassiveHits(), and beginJob().

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

Definition at line 121 of file HGCalTBAnalyzer.cc.

Referenced by analyzePassiveHits(), and beginJob().

std::vector<std::string> HGCalTBAnalyzer::hgcPassiveBHName
private

Definition at line 120 of file HGCalTBAnalyzer.cc.

Referenced by analyzePassiveHits(), and beginJob().

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

Definition at line 119 of file HGCalTBAnalyzer.cc.

Referenced by analyzePassiveHits(), and beginJob().

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

Definition at line 121 of file HGCalTBAnalyzer.cc.

Referenced by analyzePassiveHits(), and beginJob().

std::vector<std::string> HGCalTBAnalyzer::hgcPassiveEEName
private

Definition at line 120 of file HGCalTBAnalyzer.cc.

Referenced by analyzePassiveHits(), and beginJob().

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

Definition at line 119 of file HGCalTBAnalyzer.cc.

Referenced by analyzePassiveHits(), and beginJob().

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

Definition at line 121 of file HGCalTBAnalyzer.cc.

Referenced by analyzePassiveHits(), and beginJob().

std::vector<std::string> HGCalTBAnalyzer::hgcPassiveFHName
private

Definition at line 120 of file HGCalTBAnalyzer.cc.

Referenced by analyzePassiveHits(), and beginJob().

const HGCalGeometry* HGCalTBAnalyzer::hgeom_[2]
private

Definition at line 78 of file HGCalTBAnalyzer.cc.

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

TH1D* HGCalTBAnalyzer::hRecHitE_[3]
private

Definition at line 100 of file HGCalTBAnalyzer.cc.

Referenced by analyzeRecHits(), and beginJob().

TProfile2D * HGCalTBAnalyzer::hRecHitLat_[3]
private

Definition at line 105 of file HGCalTBAnalyzer.cc.

Referenced by analyzeRecHits(), and beginJob().

TProfile * HGCalTBAnalyzer::hRecHitLng1_[3]
private

Definition at line 104 of file HGCalTBAnalyzer.cc.

Referenced by analyzeRecHits(), and beginJob().

TProfile* HGCalTBAnalyzer::hRecHitLng_[3]
private

Definition at line 104 of file HGCalTBAnalyzer.cc.

Referenced by analyzeRecHits(), and beginJob().

TH2D * HGCalTBAnalyzer::hRecHitOcc_[3]
private

Definition at line 101 of file HGCalTBAnalyzer.cc.

Referenced by analyzeRecHits(), and beginJob().

TH1D* HGCalTBAnalyzer::hSimHitE_[4]
private

Definition at line 98 of file HGCalTBAnalyzer.cc.

Referenced by analyzeSimHits(), and beginJob().

TH1D * HGCalTBAnalyzer::hSimHitEn_[4]
private

Definition at line 100 of file HGCalTBAnalyzer.cc.

Referenced by analyzeSimHits(), and beginJob().

TProfile2D* HGCalTBAnalyzer::hSimHitLat_[3]
private

Definition at line 105 of file HGCalTBAnalyzer.cc.

Referenced by analyzeSimHits(), and beginJob().

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

Definition at line 108 of file HGCalTBAnalyzer.cc.

Referenced by analyzeSimHits(), and beginRun().

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

Definition at line 106 of file HGCalTBAnalyzer.cc.

Referenced by analyzeSimHits(), and beginRun().

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

Definition at line 107 of file HGCalTBAnalyzer.cc.

Referenced by analyzeSimHits(), and beginRun().

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

Definition at line 108 of file HGCalTBAnalyzer.cc.

Referenced by analyzeSimHits(), and beginRun().

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

Definition at line 106 of file HGCalTBAnalyzer.cc.

Referenced by analyzeSimHits(), and beginRun().

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

Definition at line 107 of file HGCalTBAnalyzer.cc.

Referenced by analyzeSimHits(), and beginRun().

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

Definition at line 109 of file HGCalTBAnalyzer.cc.

Referenced by analyzeSimHits(), and beginRun().

TProfile * HGCalTBAnalyzer::hSimHitLng1_[3]
private

Definition at line 102 of file HGCalTBAnalyzer.cc.

Referenced by analyzeSimHits(), and beginJob().

TProfile* HGCalTBAnalyzer::hSimHitLng2_[3]
private

Definition at line 103 of file HGCalTBAnalyzer.cc.

Referenced by analyzeSimHits(), and beginJob().

TProfile* HGCalTBAnalyzer::hSimHitLng_[3]
private

Definition at line 102 of file HGCalTBAnalyzer.cc.

Referenced by analyzeSimHits(), and beginJob().

TH1D * HGCalTBAnalyzer::hSimHitT_[4]
private

Definition at line 98 of file HGCalTBAnalyzer.cc.

Referenced by analyzeSimHits(), and beginJob().

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

Definition at line 87 of file HGCalTBAnalyzer.cc.

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

bool HGCalTBAnalyzer::ifBeam_
private

Definition at line 79 of file HGCalTBAnalyzer.cc.

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

bool HGCalTBAnalyzer::ifBH_
private

Definition at line 79 of file HGCalTBAnalyzer.cc.

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

bool HGCalTBAnalyzer::ifEE_
private

Definition at line 79 of file HGCalTBAnalyzer.cc.

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

bool HGCalTBAnalyzer::ifFH_
private

Definition at line 79 of file HGCalTBAnalyzer.cc.

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

double HGCalTBAnalyzer::pBeam
private

Definition at line 123 of file HGCalTBAnalyzer.cc.

Referenced by analyzeSimTracks(), and beginJob().

int HGCalTBAnalyzer::sampleIndex_
private

Definition at line 86 of file HGCalTBAnalyzer.cc.

Referenced by analyze(), and HGCalTBAnalyzer().

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

Definition at line 117 of file HGCalTBAnalyzer.cc.

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

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

Definition at line 117 of file HGCalTBAnalyzer.cc.

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

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

Definition at line 116 of file HGCalTBAnalyzer.cc.

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

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

Definition at line 116 of file HGCalTBAnalyzer.cc.

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

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

Definition at line 115 of file HGCalTBAnalyzer.cc.

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

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

Definition at line 115 of file HGCalTBAnalyzer.cc.

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

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

Definition at line 114 of file HGCalTBAnalyzer.cc.

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

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

Definition at line 114 of file HGCalTBAnalyzer.cc.

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

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

Definition at line 112 of file HGCalTBAnalyzer.cc.

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

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

Definition at line 110 of file HGCalTBAnalyzer.cc.

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

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

Definition at line 111 of file HGCalTBAnalyzer.cc.

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

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

Definition at line 112 of file HGCalTBAnalyzer.cc.

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

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

Definition at line 110 of file HGCalTBAnalyzer.cc.

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

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

Definition at line 111 of file HGCalTBAnalyzer.cc.

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

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

Definition at line 113 of file HGCalTBAnalyzer.cc.

Referenced by analyze(), and analyzeSimHits().

edm::EDGetToken HGCalTBAnalyzer::tok_digiBH_
private

Definition at line 92 of file HGCalTBAnalyzer.cc.

Referenced by HGCalTBAnalyzer().

edm::EDGetToken HGCalTBAnalyzer::tok_digiEE_
private

Definition at line 92 of file HGCalTBAnalyzer.cc.

Referenced by analyze(), and HGCalTBAnalyzer().

edm::EDGetToken HGCalTBAnalyzer::tok_digiFH_
private

Definition at line 92 of file HGCalTBAnalyzer.cc.

Referenced by analyze(), and HGCalTBAnalyzer().

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

Definition at line 94 of file HGCalTBAnalyzer.cc.

Referenced by analyze(), and HGCalTBAnalyzer().

edm::EDGetTokenT<edm::PassiveHitContainer> HGCalTBAnalyzer::tok_hgcPHBH_
private

Definition at line 95 of file HGCalTBAnalyzer.cc.

Referenced by analyze(), and HGCalTBAnalyzer().

edm::EDGetTokenT<edm::PassiveHitContainer> HGCalTBAnalyzer::tok_hgcPHEE_
private

Definition at line 95 of file HGCalTBAnalyzer.cc.

Referenced by analyze(), and HGCalTBAnalyzer().

edm::EDGetTokenT<edm::PassiveHitContainer> HGCalTBAnalyzer::tok_hgcPHFH_
private

Definition at line 95 of file HGCalTBAnalyzer.cc.

Referenced by analyze(), and HGCalTBAnalyzer().

edm::EDGetToken HGCalTBAnalyzer::tok_hitrBH_
private

Definition at line 93 of file HGCalTBAnalyzer.cc.

Referenced by HGCalTBAnalyzer().

edm::EDGetToken HGCalTBAnalyzer::tok_hitrEE_
private

Definition at line 93 of file HGCalTBAnalyzer.cc.

Referenced by analyze(), and HGCalTBAnalyzer().

edm::EDGetToken HGCalTBAnalyzer::tok_hitrFH_
private

Definition at line 93 of file HGCalTBAnalyzer.cc.

Referenced by analyze(), and HGCalTBAnalyzer().

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

Definition at line 89 of file HGCalTBAnalyzer.cc.

Referenced by analyze(), and HGCalTBAnalyzer().

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

Definition at line 89 of file HGCalTBAnalyzer.cc.

Referenced by analyze(), and HGCalTBAnalyzer().

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

Definition at line 88 of file HGCalTBAnalyzer.cc.

Referenced by analyze(), and HGCalTBAnalyzer().

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

Definition at line 88 of file HGCalTBAnalyzer.cc.

Referenced by analyze(), and HGCalTBAnalyzer().

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

Definition at line 90 of file HGCalTBAnalyzer.cc.

Referenced by analyze(), and HGCalTBAnalyzer().

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

Definition at line 91 of file HGCalTBAnalyzer.cc.

Referenced by analyze(), and HGCalTBAnalyzer().

TTree* HGCalTBAnalyzer::tree_
private

Definition at line 97 of file HGCalTBAnalyzer.cc.

Referenced by analyze(), and beginJob().

double HGCalTBAnalyzer::xBeam
private

Definition at line 123 of file HGCalTBAnalyzer.cc.

Referenced by analyzeSimTracks(), and beginJob().

double HGCalTBAnalyzer::yBeam
private

Definition at line 123 of file HGCalTBAnalyzer.cc.

Referenced by analyzeSimTracks(), and beginJob().

double HGCalTBAnalyzer::zBeam
private

Definition at line 123 of file HGCalTBAnalyzer.cc.

Referenced by analyzeSimTracks(), and beginJob().

double HGCalTBAnalyzer::zFrontBH_
private

Definition at line 85 of file HGCalTBAnalyzer.cc.

Referenced by analyze(), and HGCalTBAnalyzer().

double HGCalTBAnalyzer::zFrontEE_
private

Definition at line 85 of file HGCalTBAnalyzer.cc.

Referenced by analyze(), and HGCalTBAnalyzer().

double HGCalTBAnalyzer::zFrontFH_
private

Definition at line 85 of file HGCalTBAnalyzer.cc.

Referenced by analyze(), and HGCalTBAnalyzer().