CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
CSCRecHitValidation.cc
Go to the documentation of this file.
14 
16 public:
17  explicit CSCRecHitValidation(const edm::ParameterSet &);
18  ~CSCRecHitValidation() override{};
19  void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override;
20  void analyze(const edm::Event &, const edm::EventSetup &) override;
21 
22 private:
25 
26  std::unique_ptr<CSCRecHit2DValidation> the2DValidation;
27  std::unique_ptr<CSCSegmentValidation> theSegmentValidation;
28 };
29 
31 
33  : theSimHitMap(ps.getParameter<edm::InputTag>("simHitsTag"), consumesCollector()),
34  the2DValidation(nullptr),
35  theSegmentValidation(nullptr) {
36  the2DValidation = std::make_unique<CSCRecHit2DValidation>(ps, consumesCollector());
37  theSegmentValidation = std::make_unique<CSCSegmentValidation>(ps, consumesCollector());
38  geomToken_ = esConsumes<CSCGeometry, MuonGeometryRecord>();
39 }
40 
42  iBooker.setCurrentFolder("CSCRecHitsV/CSCRecHitTask");
43 
44  the2DValidation->bookHistograms(iBooker);
45  theSegmentValidation->bookHistograms(iBooker);
46 }
47 
48 void CSCRecHitValidation::analyze(const edm::Event &e, const edm::EventSetup &eventSetup) {
49  theSimHitMap.fill(e);
50 
51  // find the geometry & conditions for this event
52  const CSCGeometry *theCSCGeometry = &eventSetup.getData(geomToken_);
53 
54  the2DValidation->setGeometry(theCSCGeometry);
55  the2DValidation->setSimHitMap(&theSimHitMap);
56 
57  theSegmentValidation->setGeometry(theCSCGeometry);
58  theSegmentValidation->setSimHitMap(&theSimHitMap);
59 
60  the2DValidation->analyze(e, eventSetup);
61  theSegmentValidation->analyze(e, eventSetup);
62 }
std::unique_ptr< CSCSegmentValidation > theSegmentValidation
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:32
void fill(const edm::Event &e)
Definition: PSimHitMap.cc:5
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
bool getData(T &iHolder) const
Definition: EventSetup.h:128
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
void analyze(const edm::Event &, const edm::EventSetup &) override
edm::ESGetToken< CSCGeometry, MuonGeometryRecord > geomToken_
CSCRecHitValidation(const edm::ParameterSet &)
std::unique_ptr< CSCRecHit2DValidation > the2DValidation
Definition: Run.h:45