CMS 3D CMS Logo

HcalHitAnalyzer.cc
Go to the documentation of this file.
4 #include <iostream>
5 
7  : simParameterMap_(conf),
8  hbheFilter_(),
9  hoFilter_(),
10  hfFilter_(),
11  zdcFilter_(),
12  hbheAnalyzer_("HBHE", 1., &simParameterMap_, &hbheFilter_),
13  hoAnalyzer_("HO", 1., &simParameterMap_, &hoFilter_),
14  hfAnalyzer_("HF", 1., &simParameterMap_, &hfFilter_),
15  zdcAnalyzer_("ZDC", 1., &simParameterMap_, &zdcFilter_),
16  hbheRecHitCollectionTag_(conf.getParameter<edm::InputTag>("hbheRecHitCollectionTag")),
17  hoRecHitCollectionTag_(conf.getParameter<edm::InputTag>("hoRecHitCollectionTag")),
18  hfRecHitCollectionTag_(conf.getParameter<edm::InputTag>("hfRecHitCollectionTag")) {}
19 
21  template <class Collection>
24  e.getByLabel(tag, recHits);
25  for (unsigned i = 0; i < recHits->size(); ++i) {
26  analyzer.analyze((*recHits)[i].id().rawId(), (*recHits)[i].energy());
27  }
28  }
29 } // namespace HcalHitAnalyzerImpl
30 
32  // Step A: Get Inputs
34  e.getByLabel("mix", "g4SimHitsHcalHits", cf);
35  // e.getByLabel("mix", "ZDCHits", zdccf);
36 
37  // test access to SimHits for HcalHits and ZDC hits
38  std::unique_ptr<MixCollection<PCaloHit>> hits(new MixCollection<PCaloHit>(cf.product()));
39  // std::unique_ptr<MixCollection<PCaloHit> > zdcHits(new
40  // MixCollection<PCaloHit>(zdccf.product()));
42  // hoAnalyzer_.fillHits(*hits);
43  // hfAnalyzer_.fillHits(*hits);
44  // zdcAnalyzer_.fillHits(*hits);
45  HcalHitAnalyzerImpl::analyze<HBHERecHitCollection>(e, hbheAnalyzer_, hbheRecHitCollectionTag_);
46  HcalHitAnalyzerImpl::analyze<HORecHitCollection>(e, hoAnalyzer_, hoRecHitCollectionTag_);
47  HcalHitAnalyzerImpl::analyze<HFRecHitCollection>(e, hfAnalyzer_, hfRecHitCollectionTag_);
48  // HcalHitAnalyzerImpl::analyze<ZDCRecHitCollection>(e, zdcAnalyzer_);
49 }
mps_fire.i
i
Definition: mps_fire.py:428
MessageLogger.h
edm::Handle::product
T const * product() const
Definition: Handle.h:70
hfClusterShapes_cfi.hits
hits
Definition: hfClusterShapes_cfi.py:5
HcalHitAnalyzer::HcalHitAnalyzer
HcalHitAnalyzer(edm::ParameterSet const &conf)
Definition: HcalHitAnalyzer.cc:6
edm
HLT enums.
Definition: AlignableModifier.h:19
HLT_FULL_cff.InputTag
InputTag
Definition: HLT_FULL_cff.py:89285
HcalHitAnalyzer::hoAnalyzer_
CaloHitAnalyzer hoAnalyzer_
Definition: HcalHitAnalyzer.h:32
edm::Handle
Definition: AssociativeIterator.h:50
HcalHitAnalyzer::hfAnalyzer_
CaloHitAnalyzer hfAnalyzer_
Definition: HcalHitAnalyzer.h:33
GlobalPosition_Frontier_DevDB_cff.tag
tag
Definition: GlobalPosition_Frontier_DevDB_cff.py:11
MixCollection
Definition: MixCollection.h:10
CaloHitAnalyzer::fillHits
void fillHits(MixCollection< PCaloHit > &hits)
should be called each event
Definition: CaloHitAnalyzer.cc:22
HCALHighEnergyHPDFilter_cfi.energy
energy
Definition: HCALHighEnergyHPDFilter_cfi.py:5
HcalHitAnalyzer::analyze
void analyze(edm::Event const &e, edm::EventSetup const &c) override
Definition: HcalHitAnalyzer.cc:31
HcalHitAnalyzer::hbheAnalyzer_
CaloHitAnalyzer hbheAnalyzer_
Definition: HcalHitAnalyzer.h:31
FastTrackerRecHitMaskProducer_cfi.recHits
recHits
Definition: FastTrackerRecHitMaskProducer_cfi.py:8
edm::ParameterSet
Definition: ParameterSet.h:47
CaloHitAnalyzer
Definition: CaloHitAnalyzer.h:21
HcalHitAnalyzerImpl
Definition: HcalHitAnalyzer.cc:20
edm::EventSetup
Definition: EventSetup.h:58
HcalHitAnalyzer::hfRecHitCollectionTag_
edm::InputTag hfRecHitCollectionTag_
Definition: HcalHitAnalyzer.h:38
HcalHitAnalyzer::hbheRecHitCollectionTag_
edm::InputTag hbheRecHitCollectionTag_
Definition: HcalHitAnalyzer.h:36
HcalHitAnalyzer::hoRecHitCollectionTag_
edm::InputTag hoRecHitCollectionTag_
Definition: HcalHitAnalyzer.h:37
analyzer
Definition: SiPixelLorentzAngle.h:82
HcalRecHitCollections.h
HcalHitAnalyzerImpl::analyze
void analyze(edm::Event const &e, CaloHitAnalyzer &analyzer, edm::InputTag &tag)
Definition: HcalHitAnalyzer.cc:22
c
auto & c
Definition: CAHitNtupletGeneratorKernelsImpl.h:46
HcalHitAnalyzer.h
edm::Event
Definition: Event.h:73
edm::InputTag
Definition: InputTag.h:15
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37