CMS 3D CMS Logo

HcalDigiAnalyzer.cc
Go to the documentation of this file.
4 #include <iostream>
5 
7  : hitReadoutName_("HcalHits"),
8  simParameterMap_(),
9  hbheFilter_(),
10  hoFilter_(),
11  hfFilter_(),
12  hbheHitAnalyzer_("HBHEDigi", 1., &simParameterMap_, &hbheFilter_),
13  hoHitAnalyzer_("HODigi", 1., &simParameterMap_, &hoFilter_),
14  hfHitAnalyzer_("HFDigi", 1., &simParameterMap_, &hfFilter_),
15  zdcHitAnalyzer_("ZDCDigi", 1., &simParameterMap_, &zdcFilter_),
16  hbheDigiStatistics_("HBHEDigi", 4, 10., 6., 0.1, 0.5, hbheHitAnalyzer_),
17  hoDigiStatistics_("HODigi", 4, 10., 6., 0.1, 0.5, hoHitAnalyzer_),
18  hfDigiStatistics_("HFDigi", 3, 10., 6., 0.1, 0.5, hfHitAnalyzer_),
19  zdcDigiStatistics_("ZDCDigi", 3, 10., 6., 0.1, 0.5, zdcHitAnalyzer_),
20  hbheDigiCollectionTag_(conf.getParameter<edm::InputTag>("hbheDigiCollectionTag")),
21  hoDigiCollectionTag_(conf.getParameter<edm::InputTag>("hoDigiCollectionTag")),
22  hfDigiCollectionTag_(conf.getParameter<edm::InputTag>("hfDigiCollectionTag")) {}
23 
25  template <class Collection>
28  e.getByLabel(tag, digis);
29  for (unsigned i = 0; i < digis->size(); ++i) {
30  std::cout << (*digis)[i] << std::endl;
31  statistics.analyze((*digis)[i]);
32  }
33  }
34 } // namespace HcalDigiAnalyzerImpl
35 
37  // Step A: Get Inputs
39  e.getByLabel("mix", "HcalHits", cf);
40  // e.getByLabel("mix", "ZDCHits", zdccf);
41 
42  // test access to SimHits for HcalHits and ZDC hits
43  std::unique_ptr<MixCollection<PCaloHit>> hits(new MixCollection<PCaloHit>(cf.product()));
44  // std::unique_ptr<MixCollection<PCaloHit> > zdcHits(new
45  // MixCollection<PCaloHit>(zdccf.product()));
49  // zdcHitAnalyzer_.fillHits(*zdcHits);
50  HcalDigiAnalyzerImpl::analyze<HBHEDigiCollection>(e, hbheDigiStatistics_, hbheDigiCollectionTag_);
51  HcalDigiAnalyzerImpl::analyze<HODigiCollection>(e, hoDigiStatistics_, hoDigiCollectionTag_);
52  HcalDigiAnalyzerImpl::analyze<HFDigiCollection>(e, hfDigiStatistics_, hfDigiCollectionTag_);
53  // HcalDigiAnalyzerImpl::analyze<ZDCDigiCollection>(e, zdcDigiStatistics_);
54 }
HcalDigiAnalyzer::hbheDigiCollectionTag_
edm::InputTag hbheDigiCollectionTag_
Definition: HcalDigiAnalyzer.h:43
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
edm
HLT enums.
Definition: AlignableModifier.h:19
gather_cfg.cout
cout
Definition: gather_cfg.py:144
HLT_FULL_cff.InputTag
InputTag
Definition: HLT_FULL_cff.py:89353
HcalDigiAnalyzer::hfDigiStatistics_
HcalDigiStatistics hfDigiStatistics_
Definition: HcalDigiAnalyzer.h:40
HcalDigiStatistics
Definition: HcalDigiStatistics.h:9
HcalDigiAnalyzer::hbheDigiStatistics_
HcalDigiStatistics hbheDigiStatistics_
Definition: HcalDigiAnalyzer.h:38
edm::Handle
Definition: AssociativeIterator.h:50
HcalDigiAnalyzer::hfHitAnalyzer_
CaloHitAnalyzer hfHitAnalyzer_
Definition: HcalDigiAnalyzer.h:36
HcalDigiAnalyzer::hoDigiCollectionTag_
edm::InputTag hoDigiCollectionTag_
Definition: HcalDigiAnalyzer.h:44
GlobalPosition_Frontier_DevDB_cff.tag
tag
Definition: GlobalPosition_Frontier_DevDB_cff.py:11
MixCollection
Definition: MixCollection.h:11
HcalDigiCollections.h
CaloHitAnalyzer::fillHits
void fillHits(MixCollection< PCaloHit > &hits)
should be called each event
Definition: CaloHitAnalyzer.cc:22
HcalDigiAnalyzer::HcalDigiAnalyzer
HcalDigiAnalyzer(edm::ParameterSet const &conf)
Definition: HcalDigiAnalyzer.cc:6
HcalDigiAnalyzerImpl::analyze
void analyze(edm::Event const &e, HcalDigiStatistics &statistics, edm::InputTag &tag)
Definition: HcalDigiAnalyzer.cc:26
HcalDigiAnalyzerImpl
Definition: HcalDigiAnalyzer.cc:24
edm::ParameterSet
Definition: ParameterSet.h:47
HcalDigiAnalyzer::hbheHitAnalyzer_
CaloHitAnalyzer hbheHitAnalyzer_
Definition: HcalDigiAnalyzer.h:34
edm::EventSetup
Definition: EventSetup.h:57
HltBtagPostValidation_cff.c
c
Definition: HltBtagPostValidation_cff.py:31
HcalDigiAnalyzer.h
HcalDigiAnalyzer::analyze
void analyze(edm::Event const &e, edm::EventSetup const &c) override
Definition: HcalDigiAnalyzer.cc:36
HcalDigiAnalyzer::hoHitAnalyzer_
CaloHitAnalyzer hoHitAnalyzer_
Definition: HcalDigiAnalyzer.h:35
HcalDigiAnalyzer::hfDigiCollectionTag_
edm::InputTag hfDigiCollectionTag_
Definition: HcalDigiAnalyzer.h:45
myMessageLogger_cff.statistics
statistics
Definition: myMessageLogger_cff.py:9
edm::Event
Definition: Event.h:73
edm::InputTag
Definition: InputTag.h:15
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37
HcalDigiAnalyzer::hoDigiStatistics_
HcalDigiStatistics hoDigiStatistics_
Definition: HcalDigiAnalyzer.h:39