CMS 3D CMS Logo

SimHitsValidationHcal.h
Go to the documentation of this file.
1 #ifndef ValidationSimHitsValidationHcal_H
2 #define ValidationSimHitsValidationHcal_H
3 
6 
10 
13 
16 
22 
23 #include <fstream>
24 #include <iostream>
25 #include <map>
26 #include <string>
27 #include <vector>
28 
30 public:
32  ~SimHitsValidationHcal() override = default;
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 
82  const bool verbose_, testNumber_;
86  std::vector<idType> types;
89 
90  std::vector<MonitorElement *> meHcalHitEta_, meHcalHitTimeEta_;
91  std::vector<MonitorElement *> meHcalEnergyl25_, meHcalEnergyl50_;
92  std::vector<MonitorElement *> meHcalEnergyl100_, meHcalEnergyl250_;
97 };
98 
99 #endif
SimHitsValidationHcal(const edm::ParameterSet &ps)
MonitorElement * meEnergy_HF
const HcalDDDRecConstants * hcons
MonitorElement * metime_enweighted_HO
~SimHitsValidationHcal() override=default
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
const std::string hcalHits_
HcalSubdetector
Definition: HcalAssistant.h:31
std::vector< MonitorElement * > meHcalEnergyl100_
std::vector< idType > types
MonitorElement * metime_enweighted_HF
MonitorElement * metime_enweighted_HE
std::vector< MonitorElement * > meHcalEnergyl250_
std::vector< MonitorElement * > meHcalHitEta_
MonitorElement * meEnergy_HE
etaRange(int bin, double min, double max)
std::vector< MonitorElement * > meHcalEnergyl50_
const edm::ESGetToken< HcalDDDRecConstants, HcalRecNumberingRecord > tok_HRNDC_
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)
const edm::EDGetTokenT< edm::PCaloHitContainer > tok_hits_
static constexpr float d1
const std::string g4Label_
MonitorElement * meEnergy_HO
Definition: Run.h:45
std::vector< std::pair< std::string, std::string > > getHistogramTypes()
void analyzeHits(std::vector< PCaloHit > &)