CMS 3D CMS Logo

HcalDigisValidation.h
Go to the documentation of this file.
1 #ifndef HCALDIGISVALIDATION_H
2 #define HCALDIGISVALIDATION_H
3 
4 #include <memory>
5 
9 
11 
15 
18 
20 
27 
32 
34 
35 
38 
40 
41 
42 /*TP Code*/
47 /*~TP Code*/
48 
49 
50 #include <map>
51 #include <vector>
52 #include <utility>
53 #include <ostream>
54 #include <string>
55 #include <algorithm>
56 #include <cmath>
57 #include <iostream>
58 
60 public:
61  explicit HcalDigisValidation(const edm::ParameterSet&);
62 
63  ~HcalDigisValidation() override;
64 
65  void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override;
66  void dqmBeginRun(const edm::Run& run, const edm::EventSetup& c) override;
67 
68 private:
69 
70  struct HistLim {
71 
72  HistLim(int nbin, double mini, double maxi)
73  : n(nbin), min(mini), max(maxi) {
74  }
75  int n;
76  double min;
77  double max;
78  };
79 
80  void analyze(const edm::Event&, const edm::EventSetup&) override;
81 
82  std::map<std::string, MonitorElement*> *msm_;
83 
84  void book1D(DQMStore::IBooker &ib, std::string name, int n, double min, double max);
85 
86  void book1D(DQMStore::IBooker &ib, std::string name, const HistLim& limX);
87 
88  void fill1D(std::string name, double X, double weight = 1);
89 
90  void book2D(DQMStore::IBooker &ib, std::string name, const HistLim& limX, const HistLim& limY);
91 
92  void fill2D(std::string name, double X, double Y, double weight = 1);
93 
94  void bookPf(DQMStore::IBooker &ib, std::string name, const HistLim& limX, const HistLim& limY);
95 
96  void bookPf(DQMStore::IBooker &ib, std::string name, const HistLim& limX, const HistLim& limY, const char *option);
97 
98  void fillPf(std::string name, double X, double Y);
99 
101 
102  void booking(DQMStore::IBooker &ib, std::string subdetopt, int bnoise, int bmc);
103 
104  std::string str(int x);
105 
106  template<class Digi> void reco(const edm::Event& iEvent, const edm::EventSetup& iSetup, const edm::EDGetTokenT<edm::SortedCollection<Digi> > &tok);
107  template<class dataFrameType> void reco(const edm::Event& iEvent, const edm::EventSetup& iSetup, const edm::EDGetTokenT<HcalDataFrameContainer<dataFrameType> > &tok);
108 
113 // std::string inputLabel_;
121  int noise_;
123  bool hep17_;
124  bool HEPhase1_;
125  bool HBPhase1_;
127 
134 
137 
139 
141 
142  //TP Code
144  //~TP Code
145 
146  int nevent1;
147  int nevent2;
148  int nevent3;
149  int nevent4;
150  int nevtot;
151 
154 
155  int maxDepth_[5]; // 0:any, 1:HB, 2:HE, 3:HF
156  int nChannels_[5]; // 0:any, 1:HB, 2:HE,
157 
159 };
160 
161 #endif
162 
163 
edm::ESHandle< CaloGeometry > geometry
const HcalTopology * htopology
void dqmBeginRun(const edm::Run &run, const edm::EventSetup &c) override
#define X(str)
Definition: MuonsGrabber.cc:48
Definition: weight.py:1
void reco(const edm::Event &iEvent, const edm::EventSetup &iSetup, const edm::EDGetTokenT< edm::SortedCollection< Digi > > &tok)
edm::EDGetTokenT< QIE11DigiCollection > tok_qie11_hbhe_
void analyze(const edm::Event &, const edm::EventSetup &) override
edm::EDGetTokenT< QIE10DigiCollection > tok_qie10_hf_
std::map< std::string, MonitorElement * > * msm_
int iEvent
Definition: GenABIO.cc:230
edm::EDGetTokenT< HBHEDigiCollection > tok_hbhe_
MonitorElement * monitor(std::string name)
void fillPf(std::string name, double X, double Y)
void fill2D(std::string name, double X, double Y, double weight=1)
edm::ESHandle< HcalTopology > htopo
HcalDigisValidation(const edm::ParameterSet &)
void bookPf(DQMStore::IBooker &ib, std::string name, const HistLim &limX, const HistLim &limY)
const HcalDDDRecConstants * hcons
edm::InputTag QIE10inputTag_
void book2D(DQMStore::IBooker &ib, std::string name, const HistLim &limX, const HistLim &limY)
edm::EDGetTokenT< HFDigiCollection > tok_hf_
void fill1D(std::string name, double X, double weight=1)
edm::EDGetTokenT< edm::PCaloHitContainer > tok_mc_
edm::EDGetTokenT< HODigiCollection > tok_ho_
void booking(DQMStore::IBooker &ib, std::string subdetopt, int bnoise, int bmc)
edm::EDGetTokenT< HcalTrigPrimDigiCollection > tok_emulTPs_
edm::InputTag QIE11inputTag_
std::string str(int x)
edm::EDGetTokenT< HcalTrigPrimDigiCollection > tok_dataTPs_
edm::ESHandle< HcalDbService > conditions
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
void book1D(DQMStore::IBooker &ib, std::string name, int n, double min, double max)
HistLim(int nbin, double mini, double maxi)
Definition: Run.h:43
ib
Definition: cuy.py:660