CMS 3D CMS Logo

CSCDigiValidation.cc
Go to the documentation of this file.
8 #include <iostream>
9 #include <memory>
10 
12  : doSim_(ps.getParameter<bool>("doSim")),
13  theSimHitMap(ps.getParameter<edm::InputTag>("simHitsTag"), consumesCollector()),
14  theCSCGeometry(nullptr),
15  theStripDigiValidation(nullptr),
16  theWireDigiValidation(nullptr),
17  theComparatorDigiValidation(nullptr),
18  theALCTDigiValidation(nullptr),
19  theCLCTDigiValidation(nullptr) {
21  std::make_unique<CSCStripDigiValidation>(ps.getParameter<edm::InputTag>("stripDigiTag"), consumesCollector());
22  theWireDigiValidation = std::make_unique<CSCWireDigiValidation>(
23  ps.getParameter<edm::InputTag>("wireDigiTag"), consumesCollector(), doSim_);
25  std::make_unique<CSCComparatorDigiValidation>(ps.getParameter<edm::InputTag>("comparatorDigiTag"),
26  ps.getParameter<edm::InputTag>("stripDigiTag"),
27  consumesCollector());
29  std::make_unique<CSCALCTDigiValidation>(ps.getParameter<edm::InputTag>("alctDigiTag"), consumesCollector());
31  std::make_unique<CSCCLCTDigiValidation>(ps.getParameter<edm::InputTag>("clctDigiTag"), consumesCollector());
32 
33  if (doSim_) {
34  theStripDigiValidation->setSimHitMap(&theSimHitMap);
35  theWireDigiValidation->setSimHitMap(&theSimHitMap);
37  }
38  geomToken_ = esConsumes<CSCGeometry, MuonGeometryRecord>();
39 }
40 
42 
44  edm::Run const &iRun,
45  edm::EventSetup const & /* iSetup */) {
46  iBooker.setCurrentFolder("MuonCSCDigisV/CSCDigiTask");
47  theStripDigiValidation->bookHistograms(iBooker, doSim_);
48  theWireDigiValidation->bookHistograms(iBooker);
49  theComparatorDigiValidation->bookHistograms(iBooker);
50  theALCTDigiValidation->bookHistograms(iBooker);
51  theCLCTDigiValidation->bookHistograms(iBooker);
52 }
53 
54 void CSCDigiValidation::analyze(const edm::Event &e, const edm::EventSetup &eventSetup) {
56 
57  // find the geometry & conditions for this event
58  const CSCGeometry *pGeom = &eventSetup.getData(geomToken_);
59 
60  theStripDigiValidation->setGeometry(pGeom);
61  theWireDigiValidation->setGeometry(pGeom);
62  theComparatorDigiValidation->setGeometry(pGeom);
63  theALCTDigiValidation->setGeometry(pGeom);
64  theCLCTDigiValidation->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 }
electrons_cff.bool
bool
Definition: electrons_cff.py:393
edm::Run
Definition: Run.h:45
edm
HLT enums.
Definition: AlignableModifier.h:19
CSCDigiValidation::theCLCTDigiValidation
std::unique_ptr< CSCCLCTDigiValidation > theCLCTDigiValidation
Definition: CSCDigiValidation.h:38
HLT_FULL_cff.InputTag
InputTag
Definition: HLT_FULL_cff.py:89353
dqm::implementation::NavigatorBase::setCurrentFolder
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:32
CSCGeometry
Definition: CSCGeometry.h:24
CSCComparatorDigiValidation.h
CSCDigiValidation::theComparatorDigiValidation
std::unique_ptr< CSCComparatorDigiValidation > theComparatorDigiValidation
Definition: CSCDigiValidation.h:36
CSCALCTDigiValidation.h
CSCCLCTDigiValidation.h
CSCDigiValidation::theALCTDigiValidation
std::unique_ptr< CSCALCTDigiValidation > theALCTDigiValidation
Definition: CSCDigiValidation.h:37
Service.h
PSimHitMap::fill
void fill(const edm::Event &e)
Definition: PSimHitMap.cc:4
CSCDigiValidation.h
edm::ParameterSet
Definition: ParameterSet.h:47
CSCDigiValidation::~CSCDigiValidation
~CSCDigiValidation() override
Definition: CSCDigiValidation.cc:41
CSCWireDigiValidation.h
CSCDigiValidation::theStripDigiValidation
std::unique_ptr< CSCStripDigiValidation > theStripDigiValidation
Definition: CSCDigiValidation.h:34
CSCDigiValidation::CSCDigiValidation
CSCDigiValidation(const edm::ParameterSet &)
Definition: CSCDigiValidation.cc:11
CSCDigiValidation::bookHistograms
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
Definition: CSCDigiValidation.cc:43
edm::EventSetup
Definition: EventSetup.h:57
edm::EventSetup::getData
bool getData(T &iHolder) const
Definition: EventSetup.h:120
CSCDigiValidation::geomToken_
edm::ESGetToken< CSCGeometry, MuonGeometryRecord > geomToken_
Definition: CSCDigiValidation.h:40
CSCDigiValidation::theSimHitMap
PSimHitMap theSimHitMap
Definition: CSCDigiValidation.h:31
CSCDigiValidation::doSim_
bool doSim_
Definition: CSCDigiValidation.h:30
CSCDigiValidation::theWireDigiValidation
std::unique_ptr< CSCWireDigiValidation > theWireDigiValidation
Definition: CSCDigiValidation.h:35
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
CSCDigiValidation::analyze
void analyze(const edm::Event &, const edm::EventSetup &) override
Definition: CSCDigiValidation.cc:54
CSCStripDigiValidation.h
dqm::implementation::IBooker
Definition: DQMStore.h:43
edm::Event
Definition: Event.h:73
edm::InputTag
Definition: InputTag.h:15
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37