test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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)
 
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 detectorEE_
 
std::string detectorHE_
 
bool doDigis_
 
bool doRecHits_
 
bool doSimHits_
 
bool doTree_
 
bool doTreeCell_
 
edm::Service< TFileServicefs_
 
TH1D * hBeam_
 
TH1D * hDigiADC_ [2]
 
TH1D * hDigiLng_ [2]
 
TH2D * hDigiOcc_ [2]
 
const HGCalDDDConstantshgcons_ [2]
 
const HGCalGeometryhgeom_ [2]
 
TH1D * hRecHitE_ [2]
 
TProfile2D * hRecHitLat_ [2]
 
TProfile * hRecHitLng1_ [2]
 
TProfile * hRecHitLng_ [2]
 
TH2D * hRecHitOcc_ [2]
 
TH1D * hSimHitE_ [2]
 
TH1D * hSimHitEn_ [2]
 
TProfile2D * hSimHitLat_ [2]
 
std::vector< TH1D * > hSimHitLayEn1E_
 
std::vector< TH1D * > hSimHitLayEn1H_
 
std::vector< TH1D * > hSimHitLayEn2E_
 
std::vector< TH1D * > hSimHitLayEn2H_
 
TProfile * hSimHitLng1_ [2]
 
TProfile * hSimHitLng2_ [2]
 
TProfile * hSimHitLng_ [2]
 
TH1D * hSimHitT_ [2]
 
bool ifEE_
 
bool ifHE_
 
double pBeam
 
int sampleIndex_
 
std::vector< float > simHitCellEnE
 
std::vector< float > simHitCellEnH
 
std::vector< uint32_t > simHitCellIdE
 
std::vector< uint32_t > simHitCellIdH
 
std::vector< float > simHitLayEn1E
 
std::vector< float > simHitLayEn1H
 
std::vector< float > simHitLayEn2E
 
std::vector< float > simHitLayEn2H
 
edm::EDGetToken tok_digiEE_
 
edm::EDGetToken tok_digiHE_
 
edm::EDGetTokenT
< edm::HepMCProduct
tok_hepMC_
 
edm::EDGetToken tok_hitrEE_
 
edm::EDGetToken tok_hitrHE_
 
edm::EDGetTokenT
< edm::PCaloHitContainer
tok_hitsEE_
 
edm::EDGetTokenT
< edm::PCaloHitContainer
tok_hitsHE_
 
edm::EDGetTokenT
< edm::SimTrackContainer
tok_simTk_
 
edm::EDGetTokenT
< edm::SimVertexContainer
tok_simVtx_
 
TTree * tree_
 
double xBeam
 
double yBeam
 
double zBeam
 

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 49 of file HGCalTBAnalyzer.cc.

Constructor & Destructor Documentation

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

Definition at line 100 of file HGCalTBAnalyzer.cc.

References gather_cfg::cout, detectorEE_, detectorHE_, doDigis_, doRecHits_, doSimHits_, doTree_, doTreeCell_, edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), ifEE_, ifHE_, HLT_25ns10e33_v2_cff::InputTag, sampleIndex_, AlCaHLTBitMon_QueryRunRegistry::string, tok_digiEE_, tok_digiHE_, tok_hepMC_, tok_hitrEE_, tok_hitrHE_, tok_hitsEE_, tok_hitsHE_, tok_simTk_, tok_simVtx_, and usesResource().

100  {
101 
102  usesResource("TFileService");
103 
104  //now do whatever initialization is needed
105  detectorEE_ = iConfig.getParameter<std::string>("DetectorEE");
106  detectorHE_ = iConfig.getParameter<std::string>("DetectorHE");
107  ifEE_ = iConfig.getParameter<bool>("UseEE");
108  ifHE_ = iConfig.getParameter<bool>("UseHE");
109  doSimHits_ = iConfig.getParameter<bool>("DoSimHits");
110  doDigis_ = iConfig.getParameter<bool>("DoDigis");
111  sampleIndex_ = iConfig.getParameter<int>("SampleIndex");
112  doRecHits_ = iConfig.getParameter<bool>("DoRecHits");
113  doTree_ = iConfig.getUntrackedParameter<bool>("DoTree",false);
114  doTreeCell_ = iConfig.getUntrackedParameter<bool>("DoTreeCell",false);
115 #ifdef DebugLog
116  std::cout << "HGCalTBAnalyzer:: SimHits = " << doSimHits_ << " Digis = "
117  << doDigis_ << ":" << sampleIndex_ << " RecHits = " << doRecHits_
118  << " useDets " << ifEE_ << ":" << ifHE_ << std::endl;
119 #endif
120 
121  edm::InputTag tmp0 = iConfig.getParameter<edm::InputTag>("GeneratorSrc");
122  tok_hepMC_ = consumes<edm::HepMCProduct>(tmp0);
123 #ifdef DebugLog
124  std::cout << "HGCalTBAnalyzer:: GeneratorSource = " << tmp0 << std::endl;
125 #endif
126  std::string tmp1 = iConfig.getParameter<std::string>("CaloHitSrcEE");
127  tok_hitsEE_ = consumes<edm::PCaloHitContainer>(edm::InputTag("g4SimHits",tmp1));
128  tok_simTk_ = consumes<edm::SimTrackContainer>(edm::InputTag("g4SimHits"));
129  tok_simVtx_ = consumes<edm::SimVertexContainer>(edm::InputTag("g4SimHits"));
130  edm::InputTag tmp2 = iConfig.getParameter<edm::InputTag>("DigiSrcEE");
131  tok_digiEE_ = consumes<HGCEEDigiCollection>(tmp2);
132  edm::InputTag tmp3 = iConfig.getParameter<edm::InputTag>("RecHitSrcEE");
133  tok_hitrEE_ = consumes<HGCRecHitCollection>(tmp3);
134 #ifdef DebugLog
135  if (ifEE_) {
136  std::cout << "HGCalTBAnalyzer:: Detector " << detectorEE_ << " with tags "
137  << tmp1 << ", " << tmp2 << ", " << tmp3 << std::endl;
138  }
139 #endif
140  tmp1 = iConfig.getParameter<std::string>("CaloHitSrcHE");
141  tok_hitsHE_ = consumes<edm::PCaloHitContainer>(edm::InputTag("g4SimHits",tmp1));
142  tmp2 = iConfig.getParameter<edm::InputTag>("DigiSrcHE");
143  tok_digiHE_ = consumes<HGCHEDigiCollection>(tmp2);
144  tmp3 = iConfig.getParameter<edm::InputTag>("RecHitSrcHE");
145  tok_hitrHE_ = consumes<HGCRecHitCollection>(tmp3);
146 #ifdef DebugLog
147  if (ifHE_) {
148  std::cout << "HGCalTBAnalyzer:: Detector " << detectorHE_ << " with tags "
149  << tmp1 << ", " << tmp2 << ", " << tmp3 << std::endl;
150  }
151 #endif
152 }
std::string detectorEE_
std::string detectorHE_
edm::EDGetToken tok_digiHE_
edm::EDGetToken tok_hitrHE_
usesResource(TFileService::kSharedResource)
edm::EDGetTokenT< edm::SimTrackContainer > tok_simTk_
edm::EDGetTokenT< edm::HepMCProduct > tok_hepMC_
edm::EDGetTokenT< edm::PCaloHitContainer > tok_hitsHE_
edm::EDGetTokenT< edm::PCaloHitContainer > tok_hitsEE_
tuple cout
Definition: gather_cfg.py:145
edm::EDGetToken tok_hitrEE_
edm::EDGetTokenT< edm::SimVertexContainer > tok_simVtx_
edm::EDGetToken tok_digiEE_
HGCalTBAnalyzer::~HGCalTBAnalyzer ( )

Definition at line 154 of file HGCalTBAnalyzer.cc.

154 {}

Member Function Documentation

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

Implements edm::one::EDAnalyzerBase.

Definition at line 313 of file HGCalTBAnalyzer.cc.

References ecalMGPA::adc(), analyzeDigi(), analyzeRecHits(), analyzeSimHits(), analyzeSimTracks(), edm::HandleBase::clear(), gather_cfg::cout, HGCSample::data(), detectorEE_, detectorHE_, doDigis_, doRecHits_, doSimHits_, doTree_, edm::Event::getByToken(), hBeam_, hgcons_, ifEE_, ifHE_, edm::HandleBase::isValid(), relval_2017::k, HGCalDDDConstants::layers(), AlCaHLTBitMon_ParallelJobs::p, sampleIndex_, simHitCellEnE, simHitCellEnH, simHitCellIdE, simHitCellIdH, simHitLayEn1E, simHitLayEn1H, simHitLayEn2E, simHitLayEn2H, tok_digiEE_, tok_digiHE_, tok_hepMC_, tok_hitrEE_, tok_hitrHE_, tok_hitsEE_, tok_hitsHE_, tok_simTk_, tok_simVtx_, and tree_.

314  {
315 
316  //Generator input
318  iEvent.getByToken(tok_hepMC_,evtMC);
319  if (!evtMC.isValid()) {
320  edm::LogWarning("HGCal") << "no HepMCProduct found";
321  } else {
322  const HepMC::GenEvent * myGenEvent = evtMC->GetEvent();
323  unsigned int k(0);
324  for (HepMC::GenEvent::particle_const_iterator p = myGenEvent->particles_begin();
325  p != myGenEvent->particles_end(); ++p, ++k) {
326  if (k == 0) hBeam_->Fill((*p)->momentum().rho());
327 #ifdef DebugLog
328  std::cout << "Particle[" << k << "] with p " << (*p)->momentum().rho()
329  << " theta " << (*p)->momentum().theta() << " phi "
330  << (*p)->momentum().phi() << std::endl;
331 #endif
332  }
333  }
334 
335  //Now the Simhits
336  if (doSimHits_) {
338  iEvent.getByToken(tok_simTk_, SimTk);
340  iEvent.getByToken(tok_simVtx_, SimVtx);
341  analyzeSimTracks(SimTk, SimVtx);
342 
343  simHitLayEn1E.clear(); simHitLayEn2E.clear();
344  simHitLayEn1H.clear(); simHitLayEn2H.clear();
345  simHitCellIdE.clear(); simHitCellEnE.clear();
346  simHitCellIdH.clear(); simHitCellEnH.clear();
347  edm::Handle<edm::PCaloHitContainer> theCaloHitContainers;
348  std::vector<PCaloHit> caloHits;
349  if (ifEE_) {
350  for (unsigned int k=0; k<hgcons_[0]->layers(false); ++k)
351  simHitLayEn1E.push_back(0);
352  for (unsigned int k=0; k<hgcons_[0]->layers(true); ++k)
353  simHitLayEn2E.push_back(0);
354  iEvent.getByToken(tok_hitsEE_, theCaloHitContainers);
355  if (theCaloHitContainers.isValid()) {
356 #ifdef DebugLog
357  std::cout << "PcalohitContainer for " << detectorEE_ << " has "
358  << theCaloHitContainers->size() << " hits" << std::endl;
359 #endif
360  caloHits.clear();
361  caloHits.insert(caloHits.end(), theCaloHitContainers->begin(),
362  theCaloHitContainers->end());
363  analyzeSimHits(0, caloHits);
364  } else {
365 #ifdef DebugLog
366  std::cout << "PCaloHitContainer does not exist for " << detectorEE_
367  << " !!!" << std::endl;
368 #endif
369  }
370  }
371  if (ifHE_) {
372  for (unsigned int k=0; k<hgcons_[1]->layers(false); ++k)
373  simHitLayEn1H.push_back(0);
374  for (unsigned int k=0; k<hgcons_[1]->layers(true); ++k)
375  simHitLayEn2H.push_back(0);
376  iEvent.getByToken(tok_hitsHE_, theCaloHitContainers);
377  if (theCaloHitContainers.isValid()) {
378 #ifdef DebugLog
379  std::cout << "PcalohitContainer for " << detectorHE_ << " has "
380  << theCaloHitContainers->size() << " hits" << std::endl;
381 #endif
382  caloHits.clear();
383  caloHits.insert(caloHits.end(), theCaloHitContainers->begin(),
384  theCaloHitContainers->end());
385  analyzeSimHits(1, caloHits);
386  } else {
387 #ifdef DebugLog
388  std::cout << "PCaloHitContainer does not exist for " << detectorHE_
389  << " !!!" << std::endl;
390 #endif
391  }
392  }
393  if (doTree_) tree_->Fill();
394  }
395 
396  //Now the Digis
397  if (doDigis_) {
398  if (ifEE_) {
399  edm::Handle<HGCEEDigiCollection> theDigiContainers;
400  iEvent.getByToken(tok_digiEE_, theDigiContainers);
401  if (theDigiContainers.isValid()) {
402 #ifdef DebugLog
403  std::cout << "HGCDigiCintainer for " << detectorEE_ << " with "
404  << theDigiContainers->size() << " element(s)" << std::endl;
405 #endif
406  for (HGCEEDigiCollection::const_iterator it =theDigiContainers->begin();
407  it !=theDigiContainers->end(); ++it) {
408  HGCEEDetId detId = (it->id());
409  HGCSample hgcSample = it->sample(sampleIndex_);
410  uint16_t adc = hgcSample.data();
411  analyzeDigi(0, detId, adc);
412  }
413  }
414  }
415  if (ifHE_) {
416  edm::Handle<HGCHEDigiCollection> theDigiContainers;
417  iEvent.getByToken(tok_digiHE_, theDigiContainers);
418  if (theDigiContainers.isValid()) {
419 #ifdef DebugLog
420  std::cout << "HGCDigiContainer for " << detectorHE_ << " with "
421  << theDigiContainers->size() << " element(s)" << std::endl;
422 #endif
423  for (HGCHEDigiCollection::const_iterator it =theDigiContainers->begin();
424  it !=theDigiContainers->end(); ++it) {
425  HGCHEDetId detId = (it->id());
426  HGCSample hgcSample = it->sample(sampleIndex_);
427  uint16_t adc = hgcSample.data();
428  analyzeDigi(1, detId, adc);
429  }
430  }
431  }
432  }
433 
434  //The Rechits
435  if (doRecHits_) {
436  edm::Handle<HGCRecHitCollection> theCaloHitContainers;
437  if (ifEE_) {
438  iEvent.getByToken(tok_hitrEE_, theCaloHitContainers);
439  if (theCaloHitContainers.isValid()) {
440 #ifdef DebugLog
441  std::cout << "HGCRecHitCollection for " << detectorEE_ << " has "
442  << theCaloHitContainers->size() << " hits" << std::endl;
443 #endif
444  analyzeRecHits(0, theCaloHitContainers);
445  } else {
446 #ifdef DebugLog
447  std::cout << "HGCRecHitCollection does not exist for " << detectorEE_
448  << " !!!" << std::endl;
449 #endif
450  }
451  }
452  if (ifHE_) {
453  iEvent.getByToken(tok_hitrHE_, theCaloHitContainers);
454  if (theCaloHitContainers.isValid()) {
455 #ifdef DebugLog
456  std::cout << "HGCRecHitCollection for " << detectorHE_ << " has "
457  << theCaloHitContainers->size() << " hits" << std::endl;
458 #endif
459  analyzeRecHits(1, theCaloHitContainers);
460  } else {
461 #ifdef DebugLog
462  std::cout << "HGCRecHitCollection does not exist for " << detectorHE_
463  << " !!!" << std::endl;
464 #endif
465  }
466  }
467  }
468 }
int adc(sample_type sample)
get the ADC sample (12 bits)
std::string detectorEE_
std::vector< float > simHitLayEn2E
uint32_t data() const
Definition: HGCSample.h:57
void analyzeSimTracks(edm::Handle< edm::SimTrackContainer > const &SimTk, edm::Handle< edm::SimVertexContainer > const &SimVtx)
std::string detectorHE_
std::vector< HGCEEDataFrame >::const_iterator const_iterator
std::vector< float > simHitCellEnH
std::vector< uint32_t > simHitCellIdH
std::vector< float > simHitLayEn1E
std::vector< float > simHitLayEn1H
wrapper for a data word
Definition: HGCSample.h:13
edm::EDGetToken tok_digiHE_
edm::EDGetToken tok_hitrHE_
int iEvent
Definition: GenABIO.cc:230
unsigned int layers(bool reco) const
void analyzeRecHits(int type, edm::Handle< HGCRecHitCollection > &hits)
std::vector< float > simHitCellEnE
edm::EDGetTokenT< edm::SimTrackContainer > tok_simTk_
const HGCalDDDConstants * hgcons_[2]
edm::EDGetTokenT< edm::HepMCProduct > tok_hepMC_
std::vector< uint32_t > simHitCellIdE
bool isValid() const
Definition: HandleBase.h:75
edm::EDGetTokenT< edm::PCaloHitContainer > tok_hitsHE_
std::vector< float > simHitLayEn2H
void analyzeSimHits(int type, std::vector< PCaloHit > &hits)
void analyzeDigi(int type, const T1 &detId, uint16_t adc)
edm::EDGetTokenT< edm::PCaloHitContainer > tok_hitsEE_
tuple cout
Definition: gather_cfg.py:145
edm::EDGetToken tok_hitrEE_
edm::EDGetTokenT< edm::SimVertexContainer > tok_simVtx_
edm::EDGetToken tok_digiEE_
template<class T1 >
void HGCalTBAnalyzer::analyzeDigi ( int  type,
const T1 &  detId,
uint16_t  adc 
)
private

Definition at line 634 of file HGCalTBAnalyzer.cc.

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

Referenced by analyze().

634  {
635 
636  DetId id1 = DetId(detId.rawId());
637  GlobalPoint global = hgeom_[type]->getPosition(id1);
638  hDigiOcc_[type]->Fill(global.x(),global.y());
639  hDigiLng_[type]->Fill(global.z());
640  hDigiADC_[type]->Fill(adc);
641 }
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 643 of file HGCalTBAnalyzer.cc.

References HGCalDetId::cell(), gather_cfg::cout, relval_parameters_module::energy, 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().

644  {
645 
646  std::map<int,double> map_hitLayer;
647  std::map<int,std::pair<DetId,double> > map_hitCell;
648  for (HGCRecHitCollection::const_iterator it = hits->begin();
649  it != hits->end(); ++it) {
650  DetId detId = it->id();
651  GlobalPoint global = hgeom_[type]->getPosition(detId);
652  double energy = it->energy();
653  int layer = HGCalDetId(detId).layer();
654  int cell = HGCalDetId(detId).cell();
655  hRecHitOcc_[type]->Fill(global.x(),global.y(),energy);
656  hRecHitE_[type]->Fill(energy);
657  if (map_hitLayer.count(layer) != 0) {
658  map_hitLayer[layer] += energy;
659  } else {
660  map_hitLayer[layer] = energy;
661  }
662  if (map_hitCell.count(cell) != 0) {
663  double ee = energy + map_hitCell[cell].second;
664  map_hitCell[cell] = std::pair<uint32_t,double>(detId,ee);
665  } else {
666  map_hitCell[cell] = std::pair<uint32_t,double>(detId,energy);
667  }
668 #ifdef DebugLog
669  std::cout << "RecHit: " << layer << " " << global.x() << " " << global.y()
670  << " " << global.z() << " " << energy << std::endl;
671 #endif
672  }
673 
674  for (std::map<int,double>::iterator itr = map_hitLayer.begin();
675  itr != map_hitLayer.end(); ++itr) {
676  int layer = itr->first;
677  double energy = itr->second;
678  double zp = hgcons_[type]->waferZ(layer,true);
679 #ifdef DebugLog
680  std::cout << "SimHit:Layer " << layer << " " << zp << " " << energy
681  << std::endl;
682 #endif
683  hRecHitLng_[type]->Fill(zp,energy);
684  hRecHitLng1_[type]->Fill(layer,energy);
685  }
686 
687  for (std::map<int,std::pair<DetId,double> >::iterator itr = map_hitCell.begin();
688  itr != map_hitCell.end(); ++itr) {
689  DetId detId = ((itr->second).first);
690  double energy = ((itr->second).second);
691  GlobalPoint global = hgeom_[type]->getPosition(detId);
692  hRecHitLat_[type]->Fill(global.x(),global.y(),energy);
693  }
694 }
type
Definition: HCALResponse.h:21
TProfile * hRecHitLng_[2]
TProfile * hRecHitLng1_[2]
std::vector< HGCRecHit >::const_iterator const_iterator
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
TH2D * hRecHitOcc_[2]
int cell() const
get the absolute value of the cell #&#39;s in x and y
Definition: HGCalDetId.h:39
TProfile2D * hRecHitLat_[2]
tuple cout
Definition: gather_cfg.py:145
T x() const
Definition: PV3DBase.h:62
int layer() const
get the layer #
Definition: HGCalDetId.h:48
void HGCalTBAnalyzer::analyzeSimHits ( int  type,
std::vector< PCaloHit > &  hits 
)
private

Definition at line 470 of file HGCalTBAnalyzer.cc.

References gather_cfg::cout, HLT_25ns10e33_v2_cff::depth, relval_parameters_module::energy, plotBeamSpotDB::first, hgcons_, hSimHitE_, hSimHitEn_, hSimHitLat_, hSimHitLayEn1E_, hSimHitLayEn1H_, hSimHitLayEn2E_, hSimHitLayEn2H_, hSimHitLng1_, hSimHitLng2_, hSimHitLng_, hSimHitT_, i, HGCalDDDConstants::locateCell(), HGCalTestNumbering::packHexagonIndex(), edm::second(), simHitCellEnE, simHitCellEnH, simHitCellIdE, simHitCellIdH, simHitLayEn1E, simHitLayEn1H, simHitLayEn2E, simHitLayEn2H, HGCalDDDConstants::simToReco(), HGCalTestNumbering::unpackHexagonIndex(), HGCalDDDConstants::waferZ(), create_public_lumi_plots::xy, and ecaldqm::zside().

Referenced by analyze().

470  {
471 
472  std::map<uint32_t,double> map_hits, map_hitn;
473  std::map<int,double> map_hitLayer, map_hitDepth;
474  std::map<int,std::pair<uint32_t,double> > map_hitCell;
475  double entot(0);
476  for (unsigned int i=0; i<hits.size(); i++) {
477  double energy = hits[i].energy();
478  double time = hits[i].time();
479  uint32_t id = hits[i].id();
480  entot += energy;
481  int subdet, zside, layer, sector, subsector, cell;
482  HGCalTestNumbering::unpackHexagonIndex(id, subdet, zside, layer, sector,
483  subsector, cell);
484  int depth = hgcons_[type]->simToReco(cell,layer,sector,true).second;
485 #ifdef DebugLog
486  std::cout << "SimHit:Hit[" << i << "] Id " << subdet << ":" << zside << ":"
487  << layer << ":" << sector << ":" << subsector << ":" << cell
488  << ":" << depth << " Energy " << energy << " Time " << time
489  << std::endl;
490 #endif
491  if (map_hits.count(id) != 0) {
492  map_hits[id] += energy;
493  } else {
494  map_hits[id] = energy;
495  }
496  if (map_hitLayer.count(layer) != 0) {
497  map_hitLayer[layer] += energy;
498  } else {
499  map_hitLayer[layer] = energy;
500  }
501  if (depth >= 0) {
502  if (map_hitCell.count(cell) != 0) {
503  double ee = energy + map_hitCell[cell].second;
504  map_hitCell[cell] = std::pair<uint32_t,double>(id,ee);
505  } else {
506  map_hitCell[cell] = std::pair<uint32_t,double>(id,energy);
507  }
508  if (map_hitDepth.count(depth) != 0) {
509  map_hitDepth[depth] += energy;
510  } else {
511  map_hitDepth[depth] = energy;
512  }
513  uint32_t idn = HGCalTestNumbering::packHexagonIndex(subdet, zside,
514  depth, sector,
515  subsector, cell);
516  if (map_hitn.count(idn) != 0) {
517  map_hitn[idn] += energy;
518  } else {
519  map_hitn[idn] = energy;
520  }
521  }
522  hSimHitT_[type]->Fill(time,energy);
523  }
524 
525  hSimHitEn_[type]->Fill(entot);
526  for (std::map<uint32_t,double>::iterator itr = map_hits.begin() ;
527  itr != map_hits.end(); ++itr) {
528  hSimHitE_[type]->Fill(itr->second);
529  }
530 
531  for (std::map<int,double>::iterator itr = map_hitLayer.begin();
532  itr != map_hitLayer.end(); ++itr) {
533  int layer = itr->first - 1;
534  double energy = itr->second;
535  double zp = hgcons_[type]->waferZ(layer+1,false);
536 #ifdef DebugLog
537  std::cout << "SimHit:Layer " << layer+1 << " " << zp << " " << energy
538  << std::endl;
539 #endif
540  hSimHitLng_[type]->Fill(zp,energy);
541  hSimHitLng2_[type]->Fill(layer+1,energy);
542  if (type == 0) {
543  if (layer < (int)(hSimHitLayEn1E_.size())) {
544  simHitLayEn1E[layer] = energy;
545  hSimHitLayEn1E_[layer]->Fill(energy);
546  }
547  } else {
548  if (layer < (int)(hSimHitLayEn1H_.size())) {
549  simHitLayEn1H[layer] = energy;
550  hSimHitLayEn1H_[layer]->Fill(energy);
551  }
552  }
553  }
554  for (std::map<int,double>::iterator itr = map_hitDepth.begin();
555  itr != map_hitDepth.end(); ++itr) {
556  int layer = itr->first - 1;
557  double energy = itr->second;
558 #ifdef DebugLog
559  std::cout << "SimHit:Layer " << layer+1 << " " << energy << std::endl;
560 #endif
561  hSimHitLng1_[type]->Fill(layer+1,energy);
562  if (type == 0) {
563  if (layer < (int)(hSimHitLayEn2E_.size())) {
564  simHitLayEn2E[layer] = energy;
565  hSimHitLayEn2E_[layer]->Fill(energy);
566  }
567  } else {
568  if (layer < (int)(hSimHitLayEn2H_.size())) {
569  simHitLayEn2H[layer] = energy;
570  hSimHitLayEn2H_[layer]->Fill(energy);
571  }
572  }
573  }
574 
575  for (std::map<int,std::pair<uint32_t,double> >::iterator itr = map_hitCell.begin();
576  itr != map_hitCell.end(); ++itr) {
577  uint32_t id = ((itr->second).first);
578  double energy = ((itr->second).second);
579  int subdet, zside, layer, sector, subsector, cell;
580  HGCalTestNumbering::unpackHexagonIndex(id, subdet, zside, layer, sector,
581  subsector, cell);
582  std::pair<float,float> xy = hgcons_[type]->locateCell(cell,layer,sector,false);
583  double zp = hgcons_[type]->waferZ(layer,false);
584  double xx = (zp < 0) ? -xy.first : xy.first;
585  hSimHitLat_[type]->Fill(xx,xy.second,energy);
586  }
587 
588  for (std::map<uint32_t,double>::iterator itr = map_hitn.begin();
589  itr != map_hitn.end(); ++itr) {
590  uint32_t id = itr->first;
591  double energy = itr->second;
592  if (type == 0) {
593  simHitCellIdE.push_back(id); simHitCellEnE.push_back(energy);
594  } else {
595  simHitCellIdH.push_back(id); simHitCellEnH.push_back(energy);
596  }
597  }
598 }
type
Definition: HCALResponse.h:21
std::vector< float > simHitLayEn2E
int i
Definition: DBlmapReader.cc:9
TProfile * hSimHitLng_[2]
TProfile * hSimHitLng1_[2]
TProfile * hSimHitLng2_[2]
static uint32_t packHexagonIndex(int subdet, int z, int lay, int wafer, int celltyp, int cell)
std::vector< float > simHitCellEnH
std::vector< uint32_t > simHitCellIdH
int zside(DetId const &)
std::vector< float > simHitLayEn1E
std::vector< float > simHitLayEn1H
std::pair< float, float > locateCell(int cell, int lay, int type, bool reco) const
U second(std::pair< T, U > const &p)
std::vector< TH1D * > hSimHitLayEn1H_
std::vector< TH1D * > hSimHitLayEn2E_
std::pair< int, int > simToReco(int cell, int layer, int mod, bool half) const
std::vector< float > simHitCellEnE
const HGCalDDDConstants * hgcons_[2]
std::vector< uint32_t > simHitCellIdE
double waferZ(int layer, bool reco) const
std::vector< TH1D * > hSimHitLayEn2H_
std::vector< float > simHitLayEn2H
TProfile2D * hSimHitLat_[2]
TH1D * hSimHitEn_[2]
tuple cout
Definition: gather_cfg.py:145
std::vector< TH1D * > hSimHitLayEn1E_
static void unpackHexagonIndex(const uint32_t &idx, int &subdet, int &z, int &lay, int &wafer, int &celltyp, int &cell)
void HGCalTBAnalyzer::analyzeSimTracks ( edm::Handle< edm::SimTrackContainer > const &  SimTk,
edm::Handle< edm::SimVertexContainer > const &  SimVtx 
)
private

Definition at line 600 of file HGCalTBAnalyzer.cc.

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

Referenced by analyze().

601  {
602 
603  xBeam = yBeam = zBeam = pBeam = -1000000;
604  int vertIndex(-1);
605  for (edm::SimTrackContainer::const_iterator simTrkItr = SimTk->begin();
606  simTrkItr!= SimTk->end(); simTrkItr++) {
607 #ifdef DebugLog
608  std::cout << "Track " << simTrkItr->trackId() << " Vertex "
609  << simTrkItr->vertIndex() << " Type " << simTrkItr->type()
610  << " Charge " << simTrkItr->charge() << " momentum "
611  << simTrkItr->momentum() << " " << simTrkItr->momentum().P()
612  << std::endl;
613 #endif
614  if (vertIndex == -1) {
615  vertIndex = simTrkItr->vertIndex();
616  pBeam = simTrkItr->momentum().P();
617  }
618  }
619  if (vertIndex != -1 && vertIndex < (int)SimVtx->size()) {
620  edm::SimVertexContainer::const_iterator simVtxItr= SimVtx->begin();
621  for (int iv=0; iv<vertIndex; iv++) simVtxItr++;
622 #ifdef DebugLog
623  std::cout << "Vertex " << vertIndex << " position "
624  << simVtxItr->position() << std::endl;
625 #endif
626  xBeam = simVtxItr->position().X();
627  yBeam = simVtxItr->position().Y();
628  zBeam = simVtxItr->position().Z();
629  }
630 
631 }
tuple cout
Definition: gather_cfg.py:145
void HGCalTBAnalyzer::beginJob ( void  )
overrideprivatevirtual

Reimplemented from edm::one::EDAnalyzerBase.

Definition at line 164 of file HGCalTBAnalyzer.cc.

References detectorEE_, detectorHE_, doDigis_, doRecHits_, doSimHits_, doTree_, doTreeCell_, fs_, hBeam_, hDigiADC_, hDigiLng_, hDigiOcc_, hRecHitE_, hRecHitLat_, hRecHitLng1_, hRecHitLng_, hRecHitOcc_, hSimHitE_, hSimHitEn_, hSimHitLat_, hSimHitLng1_, hSimHitLng2_, hSimHitLng_, hSimHitT_, i, ifEE_, ifHE_, TFileService::make(), mergeVDriftHistosByStation::name, pBeam, simHitCellEnE, simHitCellEnH, simHitCellIdE, simHitCellIdH, simHitLayEn1E, simHitLayEn1H, simHitLayEn2E, simHitLayEn2H, AlCaHLTBitMon_QueryRunRegistry::string, SiPixelPhase1TrackClusters_cfi::title, tree_, xBeam, yBeam, and zBeam.

164  {
165 
166  char name[40], title[100];
167  hBeam_ = fs_->make<TH1D>("BeamP", "Beam Momentum", 1000, 0, 1000.0);
168  for (int i=0; i<2; ++i) {
169  bool book = (i == 0) ? ifEE_ : ifHE_;
170  std::string det = (i == 0) ? detectorEE_ : detectorHE_;
171 
172  if (doSimHits_ && book) {
173  sprintf (name, "SimHitEn%s", det.c_str());
174  sprintf (title,"Sim Hit Energy for %s", det.c_str());
175  hSimHitE_[i] = fs_->make<TH1D>(name,title,100000,0.,0.2);
176  sprintf (name, "SimHitEnX%s", det.c_str());
177  sprintf (title,"Sim Hit Energy for %s", det.c_str());
178  hSimHitEn_[i] = fs_->make<TH1D>(name,title,100000,0.,0.2);
179  sprintf (name, "SimHitTm%s", det.c_str());
180  sprintf (title,"Sim Hit Timing for %s", det.c_str());
181  hSimHitT_[i] = fs_->make<TH1D>(name,title,5000,0.,500.0);
182  sprintf (name, "SimHitLat%s", det.c_str());
183  sprintf (title,"Lateral Shower profile (Sim Hit) for %s", det.c_str());
184  hSimHitLat_[i] = fs_->make<TProfile2D>(name,title,100,-100.,100.,100,-100.,100.);
185  sprintf (name, "SimHitLng%s", det.c_str());
186  sprintf (title,"Longitudinal Shower profile (Sim Hit) for %s",det.c_str());
187  hSimHitLng_[i] = fs_->make<TProfile>(name,title,50,0.,100.);
188  sprintf (name, "SimHitLng1%s", det.c_str());
189  sprintf (title,"Longitudinal Shower profile (Layer) for %s",det.c_str());
190  hSimHitLng1_[i] = fs_->make<TProfile>(name,title,200,0.,100.);
191  sprintf (name, "SimHitLng2%s", det.c_str());
192  sprintf (title,"Longitudinal Shower profile (Layer) for %s",det.c_str());
193  hSimHitLng2_[i] = fs_->make<TProfile>(name,title,200,0.,100.);
194  }
195 
196  if (doDigis_ && book) {
197  sprintf (name, "DigiADC%s", det.c_str());
198  sprintf (title,"ADC at Digi level for %s", det.c_str());
199  hDigiADC_[i] = fs_->make<TH1D>(name,title,100,0.,100.0);
200  sprintf (name, "DigiOcc%s", det.c_str());
201  sprintf (title,"Occupancy (Digi)for %s", det.c_str());
202  hDigiOcc_[i] = fs_->make<TH2D>(name,title,100,-10.,10.,100,-10.,10.);
203  sprintf (name, "DigiLng%s", det.c_str());
204  sprintf (title,"Longitudinal Shower profile (Digi) for %s",det.c_str());
205  hDigiLng_[i] = fs_->make<TH1D>(name,title,100,0.,10.);
206  }
207 
208  if (doRecHits_ && book) {
209  sprintf (name, "RecHitEn%s", det.c_str());
210  sprintf (title,"Rec Hit Energy for %s", det.c_str());
211  hRecHitE_[i] = fs_->make<TH1D>(name,title,1000,0.,10.0);
212  sprintf (name, "RecHitOcc%s", det.c_str());
213  sprintf (title,"Occupancy (Rec Hit)for %s", det.c_str());
214  hRecHitOcc_[i] = fs_->make<TH2D>(name,title,100,-10.,10.,100,-10.,10.);
215  sprintf (name, "RecHitLat%s", det.c_str());
216  sprintf (title,"Lateral Shower profile (Rec Hit) for %s", det.c_str());
217  hRecHitLat_[i] = fs_->make<TProfile2D>(name,title,100,-10.,10.,100,-10.,10.);
218  sprintf (name, "RecHitLng%s", det.c_str());
219  sprintf (title,"Longitudinal Shower profile (Rec Hit) for %s",det.c_str());
220  hRecHitLng_[i] = fs_->make<TProfile>(name,title,100,0.,10.);
221  sprintf (name, "RecHitLng1%s", det.c_str());
222  sprintf (title,"Longitudinal Shower profile vs Layer for %s",det.c_str());
223  hRecHitLng1_[i] = fs_->make<TProfile>(name,title,120,0.,60.);
224  }
225  }
226  if (doSimHits_ && doTree_) {
227  tree_ = fs_->make<TTree>("HGCTB","SimHitEnergy");
228  tree_->Branch("simHitLayEn1E", &simHitLayEn1E);
229  tree_->Branch("simHitLayEn2E", &simHitLayEn2E);
230  tree_->Branch("simHitLayEn1H", &simHitLayEn1H);
231  tree_->Branch("simHitLayEn2H", &simHitLayEn2H);
232  tree_->Branch("xBeam", &xBeam, "xBeam/D");
233  tree_->Branch("yBeam", &yBeam, "yBeam/D");
234  tree_->Branch("zBeam", &zBeam, "zBeam/D");
235  tree_->Branch("pBeam", &pBeam, "pBeam/D");
236  if (doTreeCell_) {
237  tree_->Branch("simHitCellIdE", &simHitCellIdE);
238  tree_->Branch("simHitCellEnE", &simHitCellEnE);
239  tree_->Branch("simHitCellIdH", &simHitCellIdH);
240  tree_->Branch("simHitCellEnH", &simHitCellEnH);
241  }
242  }
243 }
std::string detectorEE_
std::vector< float > simHitLayEn2E
int i
Definition: DBlmapReader.cc:9
TProfile * hSimHitLng_[2]
TProfile * hSimHitLng1_[2]
std::string detectorHE_
TProfile * hRecHitLng_[2]
TProfile * hRecHitLng1_[2]
TProfile * hSimHitLng2_[2]
edm::Service< TFileService > fs_
std::vector< float > simHitCellEnH
T * make(const Args &...args) const
make new ROOT object
Definition: TFileService.h:64
std::vector< uint32_t > simHitCellIdH
std::vector< float > simHitLayEn1E
std::vector< float > simHitLayEn1H
std::vector< float > simHitCellEnE
std::vector< uint32_t > simHitCellIdE
TH2D * hRecHitOcc_[2]
std::vector< float > simHitLayEn2H
TProfile2D * hRecHitLat_[2]
TProfile2D * hSimHitLat_[2]
TH1D * hSimHitEn_[2]
void HGCalTBAnalyzer::beginRun ( edm::Run const &  ,
edm::EventSetup const &  iSetup 
)
overrideprivatevirtual

Definition at line 245 of file HGCalTBAnalyzer.cc.

References gather_cfg::cout, detectorEE_, detectorHE_, doDigis_, doRecHits_, fs_, relativeConstraints::geom, edm::EventSetup::get(), hgcons_, hgeom_, hSimHitLayEn1E_, hSimHitLayEn1H_, hSimHitLayEn2E_, ifEE_, ifHE_, cmsLHEtoEOSManager::l, HGCalDDDConstants::layers(), TFileService::make(), mergeVDriftHistosByStation::name, edm::ESHandle< class >::product(), and SiPixelPhase1TrackClusters_cfi::title.

245  {
246 
247  char name[40], title[100];
248  if (ifEE_) {
250  iSetup.get<IdealGeometryRecord>().get(detectorEE_, pHGDC);
251  hgcons_[0] = &(*pHGDC);
252  if (doDigis_ || doRecHits_) {
254  iSetup.get<IdealGeometryRecord>().get(detectorEE_, geom);
255  hgeom_[0] = geom.product();
256  } else {
257  hgeom_[0] = 0;
258  }
259  for (unsigned int l=0; l<hgcons_[0]->layers(false); ++l) {
260  sprintf (name, "SimHitEnA%d%s", l, detectorEE_.c_str());
261  sprintf (title,"Sim Hit Energy in SIM layer %d for %s",l+1,
262  detectorEE_.c_str());
263  hSimHitLayEn1E_.push_back(fs_->make<TH1D>(name,title,100000,0.,0.2));
264  if (l%3 == 0) {
265  sprintf (name, "SimHitEnB%d%s", (l/3+1), detectorEE_.c_str());
266  sprintf (title,"Sim Hit Energy in layer %d for %s",(l/3+1),
267  detectorEE_.c_str());
268  hSimHitLayEn2E_.push_back(fs_->make<TH1D>(name,title,100000,0.,0.2));
269  }
270  }
271 #ifdef DebugLog
272  std::cout << "HGCalTBAnalyzer::" << detectorEE_ << " defined with "
273  << hgcons_[0]->layers(false) << " layers" << std::endl;
274 #endif
275  } else {
276  hgcons_[0] = 0;
277  hgeom_[0] = 0;
278  }
279 
280  if (ifHE_) {
282  iSetup.get<IdealGeometryRecord>().get(detectorHE_, pHGDC);
283  hgcons_[1] = &(*pHGDC);
284  if (doDigis_ || doRecHits_) {
286  iSetup.get<IdealGeometryRecord>().get(detectorHE_, geom);
287  hgeom_[1] = geom.product();
288  } else {
289  hgeom_[1] = 0;
290  }
291  for (unsigned int l=0; l<hgcons_[1]->layers(false); ++l) {
292  sprintf (name, "SimHitEnA%d%s", l, detectorHE_.c_str());
293  sprintf (title,"Sim Hit Energy in layer %d for %s",l+1,
294  detectorHE_.c_str());
295  hSimHitLayEn1H_.push_back(fs_->make<TH1D>(name,title,100000,0.,0.2));
296  if (l%3 == 0) {
297  sprintf (name, "SimHitEnB%d%s", (l/3+1), detectorHE_.c_str());
298  sprintf (title,"Sim Hit Energy in layer %d for %s",(l/3+1),
299  detectorHE_.c_str());
300  hSimHitLayEn2E_.push_back(fs_->make<TH1D>(name,title,100000,0.,0.2));
301  }
302  }
303 #ifdef DebugLog
304  std::cout << "HGCalTBAnalyzer::" << detectorHE_ << " defined with "
305  << hgcons_[1]->layers(false) << " layers" << std::endl;
306 #endif
307  } else {
308  hgcons_[1] = 0;
309  hgeom_[1] = 0;
310  }
311 }
std::string detectorEE_
std::string detectorHE_
edm::Service< TFileService > fs_
T * make(const Args &...args) const
make new ROOT object
Definition: TFileService.h:64
std::vector< TH1D * > hSimHitLayEn1H_
std::vector< TH1D * > hSimHitLayEn2E_
unsigned int layers(bool reco) const
const HGCalGeometry * hgeom_[2]
const HGCalDDDConstants * hgcons_[2]
T const * product() const
Definition: ESHandle.h:86
tuple cout
Definition: gather_cfg.py:145
std::vector< TH1D * > hSimHitLayEn1E_
virtual void HGCalTBAnalyzer::endRun ( edm::Run const &  ,
edm::EventSetup const &   
)
inlineoverrideprivatevirtual

Definition at line 60 of file HGCalTBAnalyzer.cc.

60 {}
void HGCalTBAnalyzer::fillDescriptions ( edm::ConfigurationDescriptions descriptions)
static

Definition at line 156 of file HGCalTBAnalyzer.cc.

References edm::ConfigurationDescriptions::addDefault(), and edm::ParameterSetDescription::setUnknown().

156  {
157  //The following says we do not know what parameters are allowed so do no validation
158  // Please change this to state exactly what you do use, even if it is no parameters
160  desc.setUnknown();
161  descriptions.addDefault(desc);
162 }
void addDefault(ParameterSetDescription const &psetDescription)

Member Data Documentation

std::string HGCalTBAnalyzer::detectorEE_
private

Definition at line 74 of file HGCalTBAnalyzer.cc.

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

std::string HGCalTBAnalyzer::detectorHE_
private

Definition at line 74 of file HGCalTBAnalyzer.cc.

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

bool HGCalTBAnalyzer::doDigis_
private

Definition at line 73 of file HGCalTBAnalyzer.cc.

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

bool HGCalTBAnalyzer::doRecHits_
private

Definition at line 73 of file HGCalTBAnalyzer.cc.

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

bool HGCalTBAnalyzer::doSimHits_
private

Definition at line 73 of file HGCalTBAnalyzer.cc.

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

bool HGCalTBAnalyzer::doTree_
private

Definition at line 72 of file HGCalTBAnalyzer.cc.

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

bool HGCalTBAnalyzer::doTreeCell_
private

Definition at line 72 of file HGCalTBAnalyzer.cc.

Referenced by beginJob(), and HGCalTBAnalyzer().

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

Definition at line 68 of file HGCalTBAnalyzer.cc.

Referenced by beginJob(), and beginRun().

TH1D * HGCalTBAnalyzer::hBeam_
private

Definition at line 85 of file HGCalTBAnalyzer.cc.

Referenced by analyze(), and beginJob().

TH1D* HGCalTBAnalyzer::hDigiADC_[2]
private

Definition at line 84 of file HGCalTBAnalyzer.cc.

Referenced by analyzeDigi(), and beginJob().

TH1D * HGCalTBAnalyzer::hDigiLng_[2]
private

Definition at line 84 of file HGCalTBAnalyzer.cc.

Referenced by analyzeDigi(), and beginJob().

TH2D* HGCalTBAnalyzer::hDigiOcc_[2]
private

Definition at line 86 of file HGCalTBAnalyzer.cc.

Referenced by analyzeDigi(), and beginJob().

const HGCalDDDConstants* HGCalTBAnalyzer::hgcons_[2]
private

Definition at line 69 of file HGCalTBAnalyzer.cc.

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

const HGCalGeometry* HGCalTBAnalyzer::hgeom_[2]
private

Definition at line 70 of file HGCalTBAnalyzer.cc.

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

TH1D* HGCalTBAnalyzer::hRecHitE_[2]
private

Definition at line 85 of file HGCalTBAnalyzer.cc.

Referenced by analyzeRecHits(), and beginJob().

TProfile2D * HGCalTBAnalyzer::hRecHitLat_[2]
private

Definition at line 90 of file HGCalTBAnalyzer.cc.

Referenced by analyzeRecHits(), and beginJob().

TProfile * HGCalTBAnalyzer::hRecHitLng1_[2]
private

Definition at line 89 of file HGCalTBAnalyzer.cc.

Referenced by analyzeRecHits(), and beginJob().

TProfile* HGCalTBAnalyzer::hRecHitLng_[2]
private

Definition at line 89 of file HGCalTBAnalyzer.cc.

Referenced by analyzeRecHits(), and beginJob().

TH2D * HGCalTBAnalyzer::hRecHitOcc_[2]
private

Definition at line 86 of file HGCalTBAnalyzer.cc.

Referenced by analyzeRecHits(), and beginJob().

TH1D* HGCalTBAnalyzer::hSimHitE_[2]
private

Definition at line 83 of file HGCalTBAnalyzer.cc.

Referenced by analyzeSimHits(), and beginJob().

TH1D * HGCalTBAnalyzer::hSimHitEn_[2]
private

Definition at line 85 of file HGCalTBAnalyzer.cc.

Referenced by analyzeSimHits(), and beginJob().

TProfile2D* HGCalTBAnalyzer::hSimHitLat_[2]
private

Definition at line 90 of file HGCalTBAnalyzer.cc.

Referenced by analyzeSimHits(), and beginJob().

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

Definition at line 91 of file HGCalTBAnalyzer.cc.

Referenced by analyzeSimHits(), and beginRun().

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

Definition at line 91 of file HGCalTBAnalyzer.cc.

Referenced by analyzeSimHits(), and beginRun().

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

Definition at line 92 of file HGCalTBAnalyzer.cc.

Referenced by analyzeSimHits(), and beginRun().

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

Definition at line 92 of file HGCalTBAnalyzer.cc.

Referenced by analyzeSimHits().

TProfile * HGCalTBAnalyzer::hSimHitLng1_[2]
private

Definition at line 87 of file HGCalTBAnalyzer.cc.

Referenced by analyzeSimHits(), and beginJob().

TProfile* HGCalTBAnalyzer::hSimHitLng2_[2]
private

Definition at line 88 of file HGCalTBAnalyzer.cc.

Referenced by analyzeSimHits(), and beginJob().

TProfile* HGCalTBAnalyzer::hSimHitLng_[2]
private

Definition at line 87 of file HGCalTBAnalyzer.cc.

Referenced by analyzeSimHits(), and beginJob().

TH1D * HGCalTBAnalyzer::hSimHitT_[2]
private

Definition at line 83 of file HGCalTBAnalyzer.cc.

Referenced by analyzeSimHits(), and beginJob().

bool HGCalTBAnalyzer::ifEE_
private

Definition at line 71 of file HGCalTBAnalyzer.cc.

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

bool HGCalTBAnalyzer::ifHE_
private

Definition at line 71 of file HGCalTBAnalyzer.cc.

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

double HGCalTBAnalyzer::pBeam
private

Definition at line 97 of file HGCalTBAnalyzer.cc.

Referenced by analyzeSimTracks(), and beginJob().

int HGCalTBAnalyzer::sampleIndex_
private

Definition at line 75 of file HGCalTBAnalyzer.cc.

Referenced by analyze(), and HGCalTBAnalyzer().

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

Definition at line 96 of file HGCalTBAnalyzer.cc.

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

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

Definition at line 96 of file HGCalTBAnalyzer.cc.

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

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

Definition at line 95 of file HGCalTBAnalyzer.cc.

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

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

Definition at line 95 of file HGCalTBAnalyzer.cc.

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

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

Definition at line 93 of file HGCalTBAnalyzer.cc.

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

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

Definition at line 94 of file HGCalTBAnalyzer.cc.

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

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

Definition at line 93 of file HGCalTBAnalyzer.cc.

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

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

Definition at line 94 of file HGCalTBAnalyzer.cc.

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

edm::EDGetToken HGCalTBAnalyzer::tok_digiEE_
private

Definition at line 79 of file HGCalTBAnalyzer.cc.

Referenced by analyze(), and HGCalTBAnalyzer().

edm::EDGetToken HGCalTBAnalyzer::tok_digiHE_
private

Definition at line 79 of file HGCalTBAnalyzer.cc.

Referenced by analyze(), and HGCalTBAnalyzer().

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

Definition at line 81 of file HGCalTBAnalyzer.cc.

Referenced by analyze(), and HGCalTBAnalyzer().

edm::EDGetToken HGCalTBAnalyzer::tok_hitrEE_
private

Definition at line 80 of file HGCalTBAnalyzer.cc.

Referenced by analyze(), and HGCalTBAnalyzer().

edm::EDGetToken HGCalTBAnalyzer::tok_hitrHE_
private

Definition at line 80 of file HGCalTBAnalyzer.cc.

Referenced by analyze(), and HGCalTBAnalyzer().

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

Definition at line 76 of file HGCalTBAnalyzer.cc.

Referenced by analyze(), and HGCalTBAnalyzer().

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

Definition at line 76 of file HGCalTBAnalyzer.cc.

Referenced by analyze(), and HGCalTBAnalyzer().

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

Definition at line 77 of file HGCalTBAnalyzer.cc.

Referenced by analyze(), and HGCalTBAnalyzer().

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

Definition at line 78 of file HGCalTBAnalyzer.cc.

Referenced by analyze(), and HGCalTBAnalyzer().

TTree* HGCalTBAnalyzer::tree_
private

Definition at line 82 of file HGCalTBAnalyzer.cc.

Referenced by analyze(), and beginJob().

double HGCalTBAnalyzer::xBeam
private

Definition at line 97 of file HGCalTBAnalyzer.cc.

Referenced by analyzeSimTracks(), and beginJob().

double HGCalTBAnalyzer::yBeam
private

Definition at line 97 of file HGCalTBAnalyzer.cc.

Referenced by analyzeSimTracks(), and beginJob().

double HGCalTBAnalyzer::zBeam
private

Definition at line 97 of file HGCalTBAnalyzer.cc.

Referenced by analyzeSimTracks(), and beginJob().