CMS 3D CMS Logo

CSCDigiValidation.cc
Go to the documentation of this file.
12 #include <iostream>
13 #include <memory>
14 
16  : doSim_(ps.getParameter<bool>("doSim")), theSimHitMap(nullptr), theCSCGeometry(nullptr) {
17  // instantiatethe validation modules
18  theStripDigiValidation = std::make_unique<CSCStripDigiValidation>(ps, consumesCollector());
19  theWireDigiValidation = std::make_unique<CSCWireDigiValidation>(ps, consumesCollector());
20  theComparatorDigiValidation = std::make_unique<CSCComparatorDigiValidation>(ps, consumesCollector());
21  theALCTDigiValidation = std::make_unique<CSCALCTDigiValidation>(ps, consumesCollector());
22  theCLCTDigiValidation = std::make_unique<CSCCLCTDigiValidation>(ps, consumesCollector());
23  theCLCTPreTriggerDigiValidation = std::make_unique<CSCCLCTPreTriggerDigiValidation>(ps, consumesCollector());
24  theCorrelatedLCTDigiValidation = std::make_unique<CSCCorrelatedLCTDigiValidation>(ps, consumesCollector());
25  // set the simhit map for resolution studies
26  if (doSim_) {
27  theSimHitMap = new PSimHitMap(ps.getParameter<edm::InputTag>("simHitsTag"), consumesCollector());
28  theStripDigiValidation->setSimHitMap(theSimHitMap);
29  theWireDigiValidation->setSimHitMap(theSimHitMap);
31  theStubEfficiencyValidation = std::make_unique<CSCStubEfficiencyValidation>(ps, consumesCollector());
32  theStubResolutionValidation = std::make_unique<CSCStubResolutionValidation>(ps, consumesCollector());
33  }
34  geomToken_ = esConsumes<CSCGeometry, MuonGeometryRecord>();
35 }
36 
38 
40  edm::Run const &iRun,
41  edm::EventSetup const & /* iSetup */) {
42  // plot directory is set for each submodule
43  theStripDigiValidation->bookHistograms(iBooker);
44  theWireDigiValidation->bookHistograms(iBooker);
45  theComparatorDigiValidation->bookHistograms(iBooker);
46  theALCTDigiValidation->bookHistograms(iBooker);
47  theCLCTDigiValidation->bookHistograms(iBooker);
48  theCLCTPreTriggerDigiValidation->bookHistograms(iBooker);
49  theCorrelatedLCTDigiValidation->bookHistograms(iBooker);
50  if (doSim_) {
51  // these plots are split over ALCT, CLCT and LCT
52  theStubEfficiencyValidation->bookHistograms(iBooker);
53  theStubResolutionValidation->bookHistograms(iBooker);
54  }
55 }
56 
58  // find the geometry & conditions for this event
59  const CSCGeometry *pGeom = &eventSetup.getData(geomToken_);
60 
61  theStripDigiValidation->setGeometry(pGeom);
62  theWireDigiValidation->setGeometry(pGeom);
63  theComparatorDigiValidation->setGeometry(pGeom);
64  theALCTDigiValidation->setGeometry(pGeom);
65  theCLCTDigiValidation->setGeometry(pGeom);
66  theCLCTPreTriggerDigiValidation->setGeometry(pGeom);
67  theCorrelatedLCTDigiValidation->setGeometry(pGeom);
68  if (doSim_) {
70  theStubEfficiencyValidation->setGeometry(pGeom);
71  theStubResolutionValidation->setGeometry(pGeom);
72  }
73 
81  if (doSim_) {
84  }
85 }
std::unique_ptr< CSCCLCTDigiValidation > theCLCTDigiValidation
void fill(const edm::Event &e)
Definition: PSimHitMap.cc:5
std::unique_ptr< CSCComparatorDigiValidation > theComparatorDigiValidation
std::unique_ptr< CSCALCTDigiValidation > theALCTDigiValidation
std::unique_ptr< CSCStripDigiValidation > theStripDigiValidation
std::unique_ptr< CSCStubEfficiencyValidation > theStubEfficiencyValidation
std::unique_ptr< CSCCLCTPreTriggerDigiValidation > theCLCTPreTriggerDigiValidation
std::unique_ptr< CSCCorrelatedLCTDigiValidation > theCorrelatedLCTDigiValidation
std::unique_ptr< CSCStubResolutionValidation > theStubResolutionValidation
void analyze(const edm::Event &, const edm::EventSetup &) override
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
~CSCDigiValidation() override
PSimHitMap * theSimHitMap
CSCDigiValidation(const edm::ParameterSet &)
std::unique_ptr< CSCWireDigiValidation > theWireDigiValidation
edm::ESGetToken< CSCGeometry, MuonGeometryRecord > geomToken_
Definition: Run.h:45