CMS 3D CMS Logo

SimHitsValidationHcal.h
Go to the documentation of this file.
1 #ifndef ValidationSimHitsValidationHcal_H
2 #define ValidationSimHitsValidationHcal_H
3 
6 
11 
14 
17 
22 
23 #include <fstream>
24 #include <iostream>
25 #include <map>
26 #include <string>
27 #include <vector>
28 
30 public:
32  ~SimHitsValidationHcal() override;
33  static void fillDescriptions(edm::ConfigurationDescriptions &descriptions);
34 
35 protected:
36  void analyze(const edm::Event &e, const edm::EventSetup &c) override;
37  void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override;
38 
39  void analyzeHits(std::vector<PCaloHit> &);
40 
41 private:
42  struct energysum {
43  double e25, e50, e100, e250;
44  energysum() { e25 = e50 = e100 = e250 = 0.0; }
45  };
46 
47  struct idType {
48  idType() {
49  subdet = HcalEmpty;
50  z = depth1 = depth2 = 0;
51  }
52  idType(HcalSubdetector det, int iz, int d1, int d2) {
53  subdet = det;
54  z = iz;
55  depth1 = d1;
56  depth2 = d2;
57  }
59  int z, depth1, depth2;
60  };
61 
62  struct etaRange {
64  bins = 0;
65  low = high = 0;
66  }
67  etaRange(int bin, double min, double max) {
68  bins = bin;
69  low = min;
70  high = max;
71  }
72  int bins;
73  double low, high;
74  };
75 
76  std::vector<std::pair<std::string, std::string>> getHistogramTypes();
78  std::pair<int, int> histId(int subdet, int eta, int depth, unsigned int dep);
79 
84  std::vector<idType> types;
88 
89  std::vector<MonitorElement *> meHcalHitEta_, meHcalHitTimeEta_;
90  std::vector<MonitorElement *> meHcalEnergyl25_, meHcalEnergyl50_;
91  std::vector<MonitorElement *> meHcalEnergyl100_, meHcalEnergyl250_;
96 };
97 
98 #endif
SimHitsValidationHcal(const edm::ParameterSet &ps)
MonitorElement * meEnergy_HF
const HcalDDDRecConstants * hcons
MonitorElement * metime_enweighted_HO
idType(HcalSubdetector det, int iz, int d1, int d2)
void analyze(const edm::Event &e, const edm::EventSetup &c) override
MonitorElement * metime_enweighted_HB
std::vector< MonitorElement * > meHcalEnergyl25_
MonitorElement * meEnergy_HB
HcalSubdetector
Definition: HcalAssistant.h:31
std::vector< MonitorElement * > meHcalEnergyl100_
std::vector< idType > types
T min(T a, T b)
Definition: MathUtil.h:58
MonitorElement * metime_enweighted_HF
MonitorElement * metime_enweighted_HE
bin
set the eta bin as selection string.
std::vector< MonitorElement * > meHcalEnergyl250_
std::vector< MonitorElement * > meHcalHitEta_
MonitorElement * meEnergy_HE
etaRange(int bin, double min, double max)
std::vector< MonitorElement * > meHcalEnergyl50_
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
std::vector< MonitorElement * > meHcalHitTimeEta_
std::pair< int, int > histId(int subdet, int eta, int depth, unsigned int dep)
MonitorElement * meEnergy_HO
edm::EDGetTokenT< edm::PCaloHitContainer > tok_hits_
Definition: Run.h:45
std::vector< std::pair< std::string, std::string > > getHistogramTypes()
void analyzeHits(std::vector< PCaloHit > &)