CMS 3D CMS Logo

CSCDigiValidation.cc
Go to the documentation of this file.
9 #include <iostream>
10 #include <memory>
11 
13  : doSim_(ps.getParameter<bool>("doSim")),
14  theSimHitMap(ps.getParameter<edm::InputTag>("simHitsTag"), consumesCollector()),
15  theCSCGeometry(nullptr),
16  theStripDigiValidation(nullptr),
17  theWireDigiValidation(nullptr),
18  theComparatorDigiValidation(nullptr),
19  theALCTDigiValidation(nullptr),
20  theCLCTDigiValidation(nullptr),
21  theStubEfficiencyValidation(nullptr) {
22  // instantiatethe validation modules
23  theStripDigiValidation = std::make_unique<CSCStripDigiValidation>(ps, consumesCollector());
24  theWireDigiValidation = std::make_unique<CSCWireDigiValidation>(ps, consumesCollector());
25  theComparatorDigiValidation = std::make_unique<CSCComparatorDigiValidation>(ps, consumesCollector());
26  theALCTDigiValidation = std::make_unique<CSCALCTDigiValidation>(ps, consumesCollector());
27  theCLCTDigiValidation = std::make_unique<CSCCLCTDigiValidation>(ps, consumesCollector());
28  theStubEfficiencyValidation = std::make_unique<CSCStubEfficiencyValidation>(ps, consumesCollector());
29 
30  // set the simhit map for resolution studies
31  if (doSim_) {
32  theStripDigiValidation->setSimHitMap(&theSimHitMap);
33  theWireDigiValidation->setSimHitMap(&theSimHitMap);
35  }
36  geomToken_ = esConsumes<CSCGeometry, MuonGeometryRecord>();
37 }
38 
40 
42  edm::Run const &iRun,
43  edm::EventSetup const & /* iSetup */) {
44  iBooker.setCurrentFolder("MuonCSCDigisV/CSCDigiTask");
45  theStripDigiValidation->bookHistograms(iBooker);
46  theWireDigiValidation->bookHistograms(iBooker);
47  theComparatorDigiValidation->bookHistograms(iBooker);
48  theALCTDigiValidation->bookHistograms(iBooker);
49  theCLCTDigiValidation->bookHistograms(iBooker);
50  theStubEfficiencyValidation->bookHistograms(iBooker);
51 }
52 
53 void CSCDigiValidation::analyze(const edm::Event &e, const edm::EventSetup &eventSetup) {
55 
56  // find the geometry & conditions for this event
57  const CSCGeometry *pGeom = &eventSetup.getData(geomToken_);
58 
59  theStripDigiValidation->setGeometry(pGeom);
60  theWireDigiValidation->setGeometry(pGeom);
61  theComparatorDigiValidation->setGeometry(pGeom);
62  theALCTDigiValidation->setGeometry(pGeom);
63  theCLCTDigiValidation->setGeometry(pGeom);
64  theStubEfficiencyValidation->setGeometry(pGeom);
65 
66  theStripDigiValidation->analyze(e, eventSetup);
67  theWireDigiValidation->analyze(e, eventSetup);
68  theComparatorDigiValidation->analyze(e, eventSetup);
69  theALCTDigiValidation->analyze(e, eventSetup);
70  theCLCTDigiValidation->analyze(e, eventSetup);
71  theStubEfficiencyValidation->analyze(e, eventSetup);
72 }
electrons_cff.bool
bool
Definition: electrons_cff.py:366
edm::Run
Definition: Run.h:45
edm
HLT enums.
Definition: AlignableModifier.h:19
CSCDigiValidation::theCLCTDigiValidation
std::unique_ptr< CSCCLCTDigiValidation > theCLCTDigiValidation
Definition: CSCDigiValidation.h:40
HLT_FULL_cff.InputTag
InputTag
Definition: HLT_FULL_cff.py:89285
dqm::implementation::NavigatorBase::setCurrentFolder
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:32
CSCStubEfficiencyValidation.h
CSCGeometry
Definition: CSCGeometry.h:24
CSCComparatorDigiValidation.h
CSCDigiValidation::theComparatorDigiValidation
std::unique_ptr< CSCComparatorDigiValidation > theComparatorDigiValidation
Definition: CSCDigiValidation.h:38
CSCDigiValidation::theStubEfficiencyValidation
std::unique_ptr< CSCStubEfficiencyValidation > theStubEfficiencyValidation
Definition: CSCDigiValidation.h:41
CSCALCTDigiValidation.h
CSCCLCTDigiValidation.h
CSCDigiValidation::theALCTDigiValidation
std::unique_ptr< CSCALCTDigiValidation > theALCTDigiValidation
Definition: CSCDigiValidation.h:39
Service.h
PSimHitMap::fill
void fill(const edm::Event &e)
Definition: PSimHitMap.cc:5
CSCDigiValidation.h
edm::ParameterSet
Definition: ParameterSet.h:47
CSCDigiValidation::~CSCDigiValidation
~CSCDigiValidation() override
Definition: CSCDigiValidation.cc:39
CSCWireDigiValidation.h
CSCDigiValidation::theStripDigiValidation
std::unique_ptr< CSCStripDigiValidation > theStripDigiValidation
Definition: CSCDigiValidation.h:36
CSCDigiValidation::CSCDigiValidation
CSCDigiValidation(const edm::ParameterSet &)
Definition: CSCDigiValidation.cc:12
CSCDigiValidation::bookHistograms
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
Definition: CSCDigiValidation.cc:41
edm::EventSetup
Definition: EventSetup.h:58
edm::EventSetup::getData
bool getData(T &iHolder) const
Definition: EventSetup.h:127
CSCDigiValidation::geomToken_
edm::ESGetToken< CSCGeometry, MuonGeometryRecord > geomToken_
Definition: CSCDigiValidation.h:44
CSCDigiValidation::theSimHitMap
PSimHitMap theSimHitMap
Definition: CSCDigiValidation.h:32
CSCDigiValidation::doSim_
bool doSim_
Definition: CSCDigiValidation.h:31
CSCDigiValidation::theWireDigiValidation
std::unique_ptr< CSCWireDigiValidation > theWireDigiValidation
Definition: CSCDigiValidation.h:37
CSCDigiValidation::analyze
void analyze(const edm::Event &, const edm::EventSetup &) override
Definition: CSCDigiValidation.cc:53
CSCStripDigiValidation.h
dqm::implementation::IBooker
Definition: DQMStore.h:43
edm::Event
Definition: Event.h:73
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37