CMS 3D CMS Logo

CastorDigiAnalyzer.cc
Go to the documentation of this file.
4 #include <iostream>
5 
7  : hitReadoutName_("CastorHits"),
8  simParameterMap_(),
9  castorHitAnalyzer_("CASTORDigi", 1., &simParameterMap_, &castorFilter_),
10  castorDigiStatistics_("CASTORDigi", 3, 10., 6., 0.1, 0.5, castorHitAnalyzer_),
11  castorDigiCollectionTag_(conf.getParameter<edm::InputTag>("castorDigiCollectionTag")) {}
12 
14  template <class Collection>
17  e.getByLabel(tag, digis);
18  if (!digis.isValid()) {
19  edm::LogError("CastorDigiAnalyzer") << "Could not find Castor Digi Container ";
20  } else {
21  for (unsigned i = 0; i < digis->size(); ++i) {
22  statistics.analyze((*digis)[i]);
23  }
24  }
25  }
26 } // namespace CastorDigiAnalyzerImpl
27 
29  // edm::Handle<edm::PCaloHitContainer> hits;
31 
32  e.getByLabel("mix", "g4SimHitsCastorFI", castorcf);
33 
34  // access to SimHits
35  std::unique_ptr<MixCollection<PCaloHit>> hits(new MixCollection<PCaloHit>(castorcf.product()));
36  // if (hits.isValid()) {
38  CastorDigiAnalyzerImpl::analyze<CastorDigiCollection>(e, castorDigiStatistics_, castorDigiCollectionTag_);
39 }
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
CastorDigiAnalyzer::castorDigiStatistics_
CastorDigiStatistics castorDigiStatistics_
Definition: CastorDigiAnalyzer.h:30
edm
HLT enums.
Definition: AlignableModifier.h:19
HLT_FULL_cff.InputTag
InputTag
Definition: HLT_FULL_cff.py:89281
CastorDigiAnalyzer::castorHitAnalyzer_
CaloHitAnalyzer castorHitAnalyzer_
Definition: CastorDigiAnalyzer.h:29
CastorDigiAnalyzer.h
edm::Handle
Definition: AssociativeIterator.h:50
GlobalPosition_Frontier_DevDB_cff.tag
tag
Definition: GlobalPosition_Frontier_DevDB_cff.py:11
MixCollection
Definition: MixCollection.h:10
HcalDigiCollections.h
CaloHitAnalyzer::fillHits
void fillHits(MixCollection< PCaloHit > &hits)
should be called each event
Definition: CaloHitAnalyzer.cc:22
CastorDigiStatistics
Definition: CastorDigiStatistics.h:9
edm::ParameterSet
Definition: ParameterSet.h:47
CastorDigiAnalyzer::castorDigiCollectionTag_
edm::InputTag castorDigiCollectionTag_
Definition: CastorDigiAnalyzer.h:31
edm::EventSetup
Definition: EventSetup.h:58
CastorDigiAnalyzer::analyze
void analyze(edm::Event const &e, edm::EventSetup const &c) override
Definition: CastorDigiAnalyzer.cc:28
CastorDigiAnalyzer::CastorDigiAnalyzer
CastorDigiAnalyzer(edm::ParameterSet const &conf)
Definition: CastorDigiAnalyzer.cc:6
edm::LogError
Log< level::Error, false > LogError
Definition: MessageLogger.h:123
CastorDigiAnalyzerImpl
Definition: CastorDigiAnalyzer.cc:13
CastorDigiAnalyzerImpl::analyze
void analyze(edm::Event const &e, CastorDigiStatistics &statistics, edm::InputTag &tag)
Definition: CastorDigiAnalyzer.cc:15
myMessageLogger_cff.statistics
statistics
Definition: myMessageLogger_cff.py:9
c
auto & c
Definition: CAHitNtupletGeneratorKernelsImpl.h:46
edm::HandleBase::isValid
bool isValid() const
Definition: HandleBase.h:70
edm::Event
Definition: Event.h:73
edm::InputTag
Definition: InputTag.h:15
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37