CMS 3D CMS Logo

List of all members | Classes | Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes
SimHitsValidationHcal Class Reference

#include <SimHitsValidationHcal.h>

Inheritance diagram for SimHitsValidationHcal:
DQMEDAnalyzer edm::stream::EDProducer< edm::GlobalCache< DQMEDAnalyzerGlobalCache >, edm::EndRunProducer, edm::EndLuminosityBlockProducer, edm::Accumulator >

Classes

struct  energysum
 
struct  etaRange
 
struct  idType
 

Public Member Functions

 SimHitsValidationHcal (const edm::ParameterSet &ps)
 
 ~SimHitsValidationHcal () override
 
- Public Member Functions inherited from DQMEDAnalyzer
void accumulate (edm::Event const &event, edm::EventSetup const &setup) final
 
void beginLuminosityBlock (edm::LuminosityBlock const &lumi, edm::EventSetup const &setup) final
 
void beginRun (edm::Run const &run, edm::EventSetup const &setup) final
 
void beginStream (edm::StreamID id) final
 
virtual void dqmBeginRun (edm::Run const &, edm::EventSetup const &)
 
 DQMEDAnalyzer ()
 
void endLuminosityBlock (edm::LuminosityBlock const &lumi, edm::EventSetup const &setup) final
 
void endRun (edm::Run const &run, edm::EventSetup const &setup) final
 
virtual bool getCanSaveByLumi ()
 
- Public Member Functions inherited from edm::stream::EDProducer< edm::GlobalCache< DQMEDAnalyzerGlobalCache >, edm::EndRunProducer, edm::EndLuminosityBlockProducer, edm::Accumulator >
 EDProducer ()=default
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndRuns () const final
 

Static Public Member Functions

static void fillDescriptions (edm::ConfigurationDescriptions &descriptions)
 
- Static Public Member Functions inherited from DQMEDAnalyzer
static void globalEndJob (DQMEDAnalyzerGlobalCache const *)
 
static void globalEndLuminosityBlockProduce (edm::LuminosityBlock &lumi, edm::EventSetup const &setup, LuminosityBlockContext const *context)
 
static void globalEndRunProduce (edm::Run &run, edm::EventSetup const &setup, RunContext const *context)
 
static std::unique_ptr< DQMEDAnalyzerGlobalCacheinitializeGlobalCache (edm::ParameterSet const &)
 

Protected Member Functions

void analyze (const edm::Event &e, const edm::EventSetup &c) override
 
void analyzeHits (std::vector< PCaloHit > &)
 
void bookHistograms (DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
 
- Protected Member Functions inherited from DQMEDAnalyzer
uint64_t meId () const
 

Private Member Functions

std::vector< std::pair< std::string, std::string > > getHistogramTypes ()
 
etaRange getLimits (idType)
 
std::pair< int, int > histId (int subdet, int eta, int depth, unsigned int dep)
 

Private Attributes

std::string g4Label_
 
std::string hcalHits_
 
const HcalDDDRecConstantshcons
 
bool initialized
 
int maxDepthHB_
 
int maxDepthHE_
 
int maxDepthHF_
 
int maxDepthHO_
 
MonitorElementmeEnergy_HB
 
MonitorElementmeEnergy_HE
 
MonitorElementmeEnergy_HF
 
MonitorElementmeEnergy_HO
 
std::vector< MonitorElement * > meHcalEnergyl100_
 
std::vector< MonitorElement * > meHcalEnergyl250_
 
std::vector< MonitorElement * > meHcalEnergyl25_
 
std::vector< MonitorElement * > meHcalEnergyl50_
 
std::vector< MonitorElement * > meHcalHitEta_
 
std::vector< MonitorElement * > meHcalHitTimeEta_
 
MonitorElementmetime_enweighted_HB
 
MonitorElementmetime_enweighted_HE
 
MonitorElementmetime_enweighted_HF
 
MonitorElementmetime_enweighted_HO
 
MonitorElementmetime_HB
 
MonitorElementmetime_HE
 
MonitorElementmetime_HF
 
MonitorElementmetime_HO
 
bool testNumber_
 
edm::EDGetTokenT< edm::PCaloHitContainertok_hits_
 
std::vector< idTypetypes
 
bool verbose_
 

Additional Inherited Members

- Public Types inherited from DQMEDAnalyzer
typedef dqm::reco::DQMStore DQMStore
 
typedef dqm::reco::MonitorElement MonitorElement
 
- Public Types inherited from edm::stream::EDProducer< edm::GlobalCache< DQMEDAnalyzerGlobalCache >, edm::EndRunProducer, edm::EndLuminosityBlockProducer, edm::Accumulator >
typedef CacheContexts< T... > CacheTypes
 
typedef CacheTypes::GlobalCache GlobalCache
 
typedef AbilityChecker< T... > HasAbility
 
typedef CacheTypes::LuminosityBlockCache LuminosityBlockCache
 
typedef LuminosityBlockContextT< LuminosityBlockCache, RunCache, GlobalCacheLuminosityBlockContext
 
typedef CacheTypes::LuminosityBlockSummaryCache LuminosityBlockSummaryCache
 
typedef CacheTypes::RunCache RunCache
 
typedef RunContextT< RunCache, GlobalCacheRunContext
 
typedef CacheTypes::RunSummaryCache RunSummaryCache
 
- Protected Attributes inherited from DQMEDAnalyzer
edm::EDPutTokenT< DQMTokenlumiToken_
 
edm::EDPutTokenT< DQMTokenrunToken_
 
unsigned int streamId_
 

Detailed Description

Definition at line 29 of file SimHitsValidationHcal.h.

Constructor & Destructor Documentation

◆ SimHitsValidationHcal()

SimHitsValidationHcal::SimHitsValidationHcal ( const edm::ParameterSet ps)

Definition at line 8 of file SimHitsValidationHcal.cc.

8  {
9  g4Label_ = ps.getParameter<std::string>("ModuleLabel");
10  hcalHits_ = ps.getParameter<std::string>("HitCollection");
11  verbose_ = ps.getParameter<bool>("Verbose");
12  testNumber_ = ps.getParameter<bool>("TestNumber");
13 
14  tok_hits_ = consumes<edm::PCaloHitContainer>(edm::InputTag(g4Label_, hcalHits_));
15 
16  edm::LogVerbatim("HitsValidationHcal") << "Module Label: " << g4Label_ << " Hits: " << hcalHits_
17  << " TestNumbering " << testNumber_;
18 }

References g4Label_, edm::ParameterSet::getParameter(), hcalHits_, AlCaHLTBitMon_QueryRunRegistry::string, testNumber_, tok_hits_, and verbose_.

◆ ~SimHitsValidationHcal()

SimHitsValidationHcal::~SimHitsValidationHcal ( )
override

Definition at line 20 of file SimHitsValidationHcal.cc.

20 {}

Member Function Documentation

◆ analyze()

void SimHitsValidationHcal::analyze ( const edm::Event e,
const edm::EventSetup c 
)
overrideprotectedvirtual

Reimplemented from DQMEDAnalyzer.

Definition at line 150 of file SimHitsValidationHcal.cc.

150  {
151 #ifdef DebugLog
152  edm::LogVerbatim("HitsValidationHcal") << "Run = " << e.id().run() << " Event = " << e.id().event();
153 #endif
154  std::vector<PCaloHit> caloHits;
156 
157  bool getHits = false;
158  e.getByToken(tok_hits_, hitsHcal);
159  if (hitsHcal.isValid())
160  getHits = true;
161 #ifdef DebugLog
162  edm::LogVerbatim("HitsValidationHcal") << "HitsValidationHcal.: Input flags Hits " << getHits;
163 #endif
164  if (getHits) {
165  caloHits.insert(caloHits.end(), hitsHcal->begin(), hitsHcal->end());
166 #ifdef DebugLog
167  edm::LogVerbatim("HitsValidationHcal") << "testNumber_:" << testNumber_;
168 #endif
169  if (testNumber_) {
170  for (unsigned int i = 0; i < caloHits.size(); ++i) {
171  unsigned int id_ = caloHits[i].id();
173  caloHits[i].setID(hid.rawId());
174 #ifdef DebugLog
175  edm::LogVerbatim("HitsValidationHcal") << "Hit[" << i << "] " << hid;
176 #endif
177  }
178  }
179 #ifdef DebugLog
180  edm::LogVerbatim("HitsValidationHcal") << "HitsValidationHcal: Hit buffer " << caloHits.size();
181 #endif
182  analyzeHits(caloHits);
183  }
184 }

References analyzeHits(), MillePedeFileConverter_cfg::e, hcons, mps_fire::i, edm::HandleBase::isValid(), DetId::rawId(), HcalHitRelabeller::relabel(), testNumber_, and tok_hits_.

◆ analyzeHits()

void SimHitsValidationHcal::analyzeHits ( std::vector< PCaloHit > &  hits)
protected

Definition at line 186 of file SimHitsValidationHcal.cc.

186  {
187  int nHit = hits.size();
188  double entotHB = 0, entotHE = 0, entotHF = 0, entotHO = 0;
189  double timetotHB = 0, timetotHE = 0, timetotHF = 0, timetotHO = 0;
190  int nHB = 0, nHE = 0, nHO = 0, nHF = 0;
191 
192  std::map<std::pair<HcalDetId, unsigned int>, energysum> map_try;
193  map_try.clear();
194  std::map<std::pair<HcalDetId, unsigned int>, energysum>::iterator itr;
195 
196  for (int i = 0; i < nHit; i++) {
197  double energy = hits[i].energy();
198  double time = hits[i].time();
199  HcalDetId id = HcalDetId(hits[i].id());
200  int itime = (int)(time);
201  int subdet = id.subdet();
202  int depth = id.depth();
203  int eta = id.ieta();
204  unsigned int dep = hits[i].depth();
205 
206  std::pair<int, int> types = histId(subdet, eta, depth, dep);
207  if (subdet == static_cast<int>(HcalBarrel)) {
208  entotHB += energy;
209  timetotHB += time;
210  nHB++;
211  } else if (subdet == static_cast<int>(HcalEndcap)) {
212  entotHE += energy;
213  timetotHE += time;
214  nHE++;
215  } else if (subdet == static_cast<int>(HcalOuter)) {
216  entotHO += energy;
217  timetotHO += time;
218  nHO++;
219  } else if (subdet == static_cast<int>(HcalForward)) {
220  entotHF += energy;
221  timetotHF += time;
222  nHF++;
223  }
224 
225  std::pair<HcalDetId, unsigned int> id0(id, dep);
226  energysum ensum;
227  if (map_try.count(id0) != 0)
228  ensum = map_try[id0];
229  if (itime < 250) {
230  ensum.e250 += energy;
231  if (itime < 100) {
232  ensum.e100 += energy;
233  if (itime < 50) {
234  ensum.e50 += energy;
235  if (itime < 25)
236  ensum.e25 += energy;
237  }
238  }
239  }
240  map_try[id0] = ensum;
241 
242 #ifdef DebugLog
243  edm::LogVerbatim("HitsValidationHcal")
244  << "Hit[" << i << "] ID " << std::dec << " " << id << std::dec << " Det " << id.det() << " Sub " << subdet
245  << " depth " << depth << " depthX " << dep << " Eta " << eta << " Phi " << id.iphi() << " E " << energy
246  << " time " << time << " type " << types.first << " " << types.second;
247 #endif
248 
249  double etax = eta - 0.5;
250  if (eta < 0)
251  etax += 1;
252  if (types.first >= 0) {
253  meHcalHitEta_[types.first]->Fill(etax, energy);
254  meHcalHitTimeEta_[types.first]->Fill(etax, time);
255  }
256  if (types.second >= 0) {
257  meHcalHitEta_[types.second]->Fill(etax, energy);
258  meHcalHitTimeEta_[types.second]->Fill(etax, time);
259  }
260  }
261 
262  meEnergy_HB->Fill(entotHB);
263  meEnergy_HE->Fill(entotHE);
264  meEnergy_HF->Fill(entotHF);
265  meEnergy_HO->Fill(entotHO);
266 
267  metime_HB->Fill(timetotHB);
268  metime_HE->Fill(timetotHE);
269  metime_HF->Fill(timetotHF);
270  metime_HO->Fill(timetotHO);
271 
272  metime_enweighted_HB->Fill(timetotHB, entotHB);
273  metime_enweighted_HE->Fill(timetotHE, entotHE);
274  metime_enweighted_HF->Fill(timetotHF, entotHF);
275  metime_enweighted_HO->Fill(timetotHO, entotHO);
276 
277  for (itr = map_try.begin(); itr != map_try.end(); ++itr) {
278  HcalDetId id = (*itr).first.first;
279  energysum ensum = (*itr).second;
280  std::pair<int, int> types = histId((int)(id.subdet()), id.ieta(), id.depth(), (*itr).first.second);
281  int eta = id.ieta();
282  int phi = id.iphi();
283  double etax = eta - 0.5;
284  double phix = phi - 0.5;
285  if (types.first >= 0) {
286  meHcalEnergyl25_[types.first]->Fill(etax, phix, ensum.e25);
287  meHcalEnergyl50_[types.first]->Fill(etax, phix, ensum.e50);
288  meHcalEnergyl100_[types.first]->Fill(etax, phix, ensum.e100);
289  meHcalEnergyl250_[types.first]->Fill(etax, phix, ensum.e250);
290  }
291  if (types.second >= 0) {
292  meHcalEnergyl25_[types.second]->Fill(etax, phix, ensum.e25);
293  meHcalEnergyl50_[types.second]->Fill(etax, phix, ensum.e50);
294  meHcalEnergyl100_[types.second]->Fill(etax, phix, ensum.e100);
295  meHcalEnergyl250_[types.second]->Fill(etax, phix, ensum.e250);
296  }
297 
298 #ifdef DebugLog
299  edm::LogVerbatim("HitsValidationHcal")
300  << " energy of tower =" << (*itr).first.first << " in time 25ns is == " << (*itr).second.e25
301  << " in time 25-50ns == " << (*itr).second.e50 << " in time 50-100ns == " << (*itr).second.e100
302  << " in time 100-250 ns == " << (*itr).second.e250;
303 #endif
304  }
305 }

References TauDecayModes::dec, LEDCalibrationChannels::depth, SimHitsValidationHcal::energysum::e100, SimHitsValidationHcal::energysum::e25, SimHitsValidationHcal::energysum::e250, SimHitsValidationHcal::energysum::e50, HCALHighEnergyHPDFilter_cfi::energy, PVValHelper::eta, dqm::impl::MonitorElement::Fill(), HcalBarrel, HcalEndcap, HcalForward, HcalOuter, histId(), hfClusterShapes_cfi::hits, mps_fire::i, LEDCalibrationChannels::ieta, createfilelist::int, meEnergy_HB, meEnergy_HE, meEnergy_HF, meEnergy_HO, meHcalEnergyl100_, meHcalEnergyl250_, meHcalEnergyl25_, meHcalEnergyl50_, meHcalHitEta_, meHcalHitTimeEta_, metime_enweighted_HB, metime_enweighted_HE, metime_enweighted_HF, metime_enweighted_HO, metime_HB, metime_HE, metime_HF, metime_HO, phi, and ntuplemaker::time.

Referenced by analyze().

◆ bookHistograms()

void SimHitsValidationHcal::bookHistograms ( DQMStore::IBooker ib,
edm::Run const &  run,
edm::EventSetup const &  es 
)
overrideprotectedvirtual

Implements DQMEDAnalyzer.

Definition at line 22 of file SimHitsValidationHcal.cc.

22  {
24  es.get<HcalRecNumberingRecord>().get(pHRNDC);
25  hcons = &(*pHRNDC);
30 
31  // Get Phi segmentation from geometry, use the max phi number so that all iphi
32  // values are included.
33 
34  int NphiMax = hcons->getNPhi(0);
35 
36  NphiMax = (hcons->getNPhi(1) > NphiMax ? hcons->getNPhi(1) : NphiMax);
37  NphiMax = (hcons->getNPhi(2) > NphiMax ? hcons->getNPhi(2) : NphiMax);
38  NphiMax = (hcons->getNPhi(3) > NphiMax ? hcons->getNPhi(3) : NphiMax);
39 
40  // Center the iphi bins on the integers
41  float iphi_min = 0.5;
42  float iphi_max = NphiMax + 0.5;
43  int iphi_bins = (int)(iphi_max - iphi_min);
44 
45  int iEtaHBMax = hcons->getEtaRange(0).second;
46  int iEtaHEMax = std::max(hcons->getEtaRange(1).second, 1);
47  int iEtaHFMax = hcons->getEtaRange(2).second;
48  int iEtaHOMax = hcons->getEtaRange(3).second;
49 
50  // Retain classic behavior, all plots have same ieta range.
51  // Comment out code to allow each subdetector to have its on range
52 
53  int iEtaMax = (iEtaHBMax > iEtaHEMax ? iEtaHBMax : iEtaHEMax);
54  iEtaMax = (iEtaMax > iEtaHFMax ? iEtaMax : iEtaHFMax);
55  iEtaMax = (iEtaMax > iEtaHOMax ? iEtaMax : iEtaHOMax);
56 
57  iEtaHBMax = iEtaMax;
58  iEtaHEMax = iEtaMax;
59  iEtaHFMax = iEtaMax;
60  iEtaHOMax = iEtaMax;
61 
62  // Give an empty bin around the subdet ieta range to make it clear that all
63  // ieta rings have been included float ieta_min_HB = -iEtaHBMax - 1.5; float
64  // ieta_max_HB = iEtaHBMax + 1.5; int ieta_bins_HB = (int) (ieta_max_HB -
65  // ieta_min_HB);
66 
67  // float ieta_min_HE = -iEtaHEMax - 1.5;
68  // float ieta_max_HE = iEtaHEMax + 1.5;
69  // int ieta_bins_HE = (int) (ieta_max_HE - ieta_min_HE);
70 
71  // float ieta_min_HF = -iEtaHFMax - 1.5;
72  // float ieta_max_HF = iEtaHFMax + 1.5;
73  // int ieta_bins_HF = (int) (ieta_max_HF - ieta_min_HF);
74 
75  // float ieta_min_HO = -iEtaHOMax - 1.5;
76  // float ieta_max_HO = iEtaHOMax + 1.5;
77  // int ieta_bins_HO = (int) (ieta_max_HO - ieta_min_HO);
78 
79 #ifdef DebugLog
80  edm::LogVerbatim("HitsValidationHcal") << " Maximum Depths HB:" << maxDepthHB_ << " HE:" << maxDepthHE_
81  << " HO:" << maxDepthHO_ << " HF:" << maxDepthHF_;
82 #endif
83  std::vector<std::pair<std::string, std::string>> divisions = getHistogramTypes();
84 
85  edm::LogVerbatim("HitsValidationHcal") << "Booking the Histograms";
86  ib.setCurrentFolder("HcalHitsV/SimHitsValidationHcal");
87 
88  // Histograms for Hits
89 
91  for (unsigned int i = 0; i < types.size(); ++i) {
93  name = "HcalHitEta" + divisions[i].first;
94  title = "Hit energy as a function of eta tower index in " + divisions[i].second;
95  meHcalHitEta_.push_back(ib.book1D(name, title, limit.bins, limit.low, limit.high));
96 
97  name = "HcalHitTimeAEta" + divisions[i].first;
98  title = "Hit time as a function of eta tower index in" + divisions[i].second;
99  meHcalHitTimeEta_.push_back(ib.book1D(name, title, limit.bins, limit.low, limit.high));
100 
101  name = "HcalHitE25" + divisions[i].first;
102  title = "Energy in time window 0 to 25 for a tower in " + divisions[i].second;
103  meHcalEnergyl25_.push_back(
104  ib.book2D(name, title, limit.bins, limit.low, limit.high, iphi_bins, iphi_min, iphi_max));
105 
106  name = "HcalHitE50" + divisions[i].first;
107  title = "Energy in time window 0 to 50 for a tower in " + divisions[i].second;
108  meHcalEnergyl50_.push_back(
109  ib.book2D(name, title, limit.bins, limit.low, limit.high, iphi_bins, iphi_min, iphi_max));
110 
111  name = "HcalHitE100" + divisions[i].first;
112  title = "Energy in time window 0 to 100 for a tower in " + divisions[i].second;
113  meHcalEnergyl100_.push_back(
114  ib.book2D(name, title, limit.bins, limit.low, limit.high, iphi_bins, iphi_min, iphi_max));
115 
116  name = "HcalHitE250" + divisions[i].first;
117  title = "Energy in time window 0 to 250 for a tower in " + divisions[i].second;
118  meHcalEnergyl250_.push_back(
119  ib.book2D(name, title, limit.bins, limit.low, limit.high, iphi_bins, iphi_min, iphi_max));
120  }
121 
122  name = "Energy_HB";
123  meEnergy_HB = ib.book1D(name, name, 100, 0, 1);
124  name = "Energy_HE";
125  meEnergy_HE = ib.book1D(name, name, 100, 0, 1);
126  name = "Energy_HO";
127  meEnergy_HO = ib.book1D(name, name, 100, 0, 1);
128  name = "Energy_HF";
129  meEnergy_HF = ib.book1D(name, name, 100, 0, 50);
130 
131  name = "Time_HB";
132  metime_HB = ib.book1D(name, name, 300, -150, 150);
133  name = "Time_HE";
134  metime_HE = ib.book1D(name, name, 300, -150, 150);
135  name = "Time_HO";
136  metime_HO = ib.book1D(name, name, 300, -150, 150);
137  name = "Time_HF";
138  metime_HF = ib.book1D(name, name, 300, -150, 150);
139 
140  name = "Time_Enweighted_HB";
141  metime_enweighted_HB = ib.book1D(name, name, 300, -150, 150);
142  name = "Time_Enweighted_HE";
143  metime_enweighted_HE = ib.book1D(name, name, 300, -150, 150);
144  name = "Time_Enweighted_HO";
145  metime_enweighted_HO = ib.book1D(name, name, 300, -150, 150);
146  name = "Time_Enweighted_HF";
147  metime_enweighted_HF = ib.book1D(name, name, 300, -150, 150);
148 }

References edm::EventSetup::get(), get, HcalDDDRecConstants::getEtaRange(), getHistogramTypes(), getLimits(), HcalDDDRecConstants::getMaxDepth(), HcalDDDRecConstants::getNPhi(), hcons, mps_fire::i, cuy::ib, hcalTTPDigis_cfi::iEtaMax, createfilelist::int, remoteMonitoring_LED_IterMethod_cfg::limit, SiStripPI::max, maxDepthHB_, maxDepthHE_, maxDepthHF_, maxDepthHO_, meEnergy_HB, meEnergy_HE, meEnergy_HF, meEnergy_HO, meHcalEnergyl100_, meHcalEnergyl250_, meHcalEnergyl25_, meHcalEnergyl50_, meHcalHitEta_, meHcalHitTimeEta_, metime_enweighted_HB, metime_enweighted_HE, metime_enweighted_HF, metime_enweighted_HO, metime_HB, metime_HE, metime_HF, metime_HO, Skims_PA_cff::name, AlCaHLTBitMon_QueryRunRegistry::string, and overlapproblemtsosanalyzer_cfi::title.

◆ fillDescriptions()

void SimHitsValidationHcal::fillDescriptions ( edm::ConfigurationDescriptions descriptions)
static

Definition at line 465 of file SimHitsValidationHcal.cc.

465  {
467  desc.add<std::string>("ModuleLabel", "g4SimHits");
468  desc.add<std::string>("HitCollection", "HcalHits");
469  desc.add<bool>("Verbose", false);
470  desc.add<bool>("TestNumber", false);
471 
472  descriptions.addDefault(desc);
473 }

References edm::ParameterSetDescription::add(), edm::ConfigurationDescriptions::addDefault(), and AlCaHLTBitMon_QueryRunRegistry::string.

◆ getHistogramTypes()

std::vector< std::pair< std::string, std::string > > SimHitsValidationHcal::getHistogramTypes ( )
private

Definition at line 387 of file SimHitsValidationHcal.cc.

387  {
391 
392  std::vector<std::pair<std::string, std::string>> divisions;
393  // divisions and types need to be in sync
394  types.clear();
395  std::pair<std::string, std::string> names;
396  char name1[40], name2[40];
398  // first overall Hcal
399  for (int depth = 0; depth < maxDepth; ++depth) {
400  snprintf(name1, 40, "HC%d", depth);
401  snprintf(name2, 40, "HCAL depth%d", depth + 1);
402  names = std::pair<std::string, std::string>(std::string(name1), std::string(name2));
404  divisions.push_back(names);
405  types.push_back(type);
406  }
407  // HB
408  for (int depth = 0; depth < maxDepthHB_; ++depth) {
409  snprintf(name1, 40, "HB%d", depth);
410  snprintf(name2, 40, "HB depth%d", depth + 1);
411  names = std::pair<std::string, std::string>(std::string(name1), std::string(name2));
413  divisions.push_back(names);
414  types.push_back(type);
415  }
416  // HE
417  for (int depth = 0; depth < maxDepthHE_; ++depth) {
418  snprintf(name1, 40, "HE%d+z", depth);
419  snprintf(name2, 40, "HE +z depth%d", depth + 1);
420  names = std::pair<std::string, std::string>(std::string(name1), std::string(name2));
422  divisions.push_back(names);
423  types.push_back(type);
424  snprintf(name1, 40, "HE%d-z", depth);
425  snprintf(name2, 40, "HE -z depth%d", depth + 1);
426  names = std::pair<std::string, std::string>(std::string(name1), std::string(name2));
428  divisions.push_back(names);
429  types.push_back(type);
430  }
431  // HO
432  {
433  int depth = maxDepthHO_;
434  snprintf(name1, 40, "HO%d", depth);
435  snprintf(name2, 40, "HO depth%d", depth);
436  names = std::pair<std::string, std::string>(std::string(name1), std::string(name2));
438  divisions.push_back(names);
439  types.push_back(type);
440  }
441  // HF (first absorber, then different types of abnormal hits)
442  std::string hfty1[4] = {"A", "W", "B", "J"};
443  std::string hfty2[4] = {"Absorber", "Window", "Bundle", "Jungle"};
444  int dept0[4] = {0, 1, 2, 3};
445  for (int k = 0; k < 4; ++k) {
446  for (int depth = 0; depth < maxDepthHF_; ++depth) {
447  snprintf(name1, 40, "HF%s%d+z", hfty1[k].c_str(), depth);
448  snprintf(name2, 40, "HF (%s) +z depth%d", hfty2[k].c_str(), depth + 1);
449  names = std::pair<std::string, std::string>(std::string(name1), std::string(name2));
451  divisions.push_back(names);
452  types.push_back(type);
453  snprintf(name1, 40, "HF%s%d-z", hfty1[k].c_str(), depth);
454  snprintf(name2, 40, "HF (%s) -z depth%d", hfty2[k].c_str(), depth + 1);
455  names = std::pair<std::string, std::string>(std::string(name1), std::string(name2));
457  divisions.push_back(names);
458  types.push_back(type);
459  }
460  }
461 
462  return divisions;
463 }

References LEDCalibrationChannels::depth, HcalBarrel, HcalEmpty, HcalEndcap, HcalForward, HcalOuter, dqmdumpme::k, SiStripPI::max, HLT_2018_cff::maxDepth, maxDepthHB_, maxDepthHE_, maxDepthHF_, maxDepthHO_, hfnoseParametersInitialization_cfi::name2, names, and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by bookHistograms().

◆ getLimits()

SimHitsValidationHcal::etaRange SimHitsValidationHcal::getLimits ( idType  type)
private

Definition at line 307 of file SimHitsValidationHcal.cc.

307  {
308  int bins;
309  std::pair<int, int> range;
310  double low, high;
311 
312  if (type.subdet == HcalBarrel) {
313  range = hcons->getEtaRange(0);
314  low = -range.second;
315  high = range.second;
316  bins = (high - low);
317  } else if (type.subdet == HcalEndcap) {
318  range = hcons->getEtaRange(1);
319  bins = range.second - range.first;
320  if (type.z == 1) {
321  low = range.first;
322  high = range.second;
323  } else {
324  low = -range.second;
325  high = -range.first;
326  }
327  } else if (type.subdet == HcalOuter) {
328  range = hcons->getEtaRange(3);
329  low = -range.second;
330  high = range.second;
331  bins = high - low;
332  } else if (type.subdet == HcalForward) {
333  range = hcons->getEtaRange(2);
334  bins = range.second - range.first;
335  if (type.z == 1) {
336  low = range.first;
337  high = range.second;
338  } else {
339  low = -range.second;
340  high = -range.first;
341  }
342  } else {
343  bins = 82;
344  low = -41;
345  high = 41;
346  }
347 #ifdef DebugLog
348  edm::LogVerbatim("HitsValidationHcal") << "Subdetector:" << type.subdet << " z:" << type.z
349  << " range.first:" << range.first << " and second:" << range.second;
350  edm::LogVerbatim("HitsValidationHcal") << "bins: " << bins << " low:" << low << " high:" << high;
351 #endif
353 }

References trigObjTnPSource_cfi::bins, generateTowerEtThresholdLUT::etaRange, HcalDDDRecConstants::getEtaRange(), HcalBarrel, HcalEndcap, HcalForward, HcalOuter, hcons, LaserClient_cfi::high, LaserClient_cfi::low, and FastTimerService_cff::range.

Referenced by bookHistograms().

◆ histId()

std::pair< int, int > SimHitsValidationHcal::histId ( int  subdet,
int  eta,
int  depth,
unsigned int  dep 
)
private

Definition at line 355 of file SimHitsValidationHcal.cc.

355  {
356  int id1(-1), id2(-1);
357  for (unsigned int k = 0; k < types.size(); ++k) {
358  if (subdet == HcalForward) {
359  if (subdet == (int)(types[k].subdet) && depth == types[k].depth1 && eta * types[k].z > 0 &&
360  dep == (unsigned int)(types[k].depth2)) {
361  id1 = k;
362  break;
363  }
364  } else if (subdet == HcalEndcap) {
365  if (subdet == (int)(types[k].subdet) && depth == types[k].depth1 && eta * types[k].z > 0) {
366  id1 = k;
367  break;
368  }
369  } else {
370  if (subdet == (int)(types[k].subdet) && depth == types[k].depth1) {
371  id1 = k;
372  break;
373  }
374  }
375  }
376  if (subdet == HcalForward)
377  depth += 2 * dep;
378  for (unsigned int k = 0; k < types.size(); ++k) {
379  if (types[k].subdet == HcalEmpty && types[k].depth1 == depth) {
380  id2 = k;
381  break;
382  }
383  }
384  return std::pair<int, int>(id1, id2);
385 }

References LEDCalibrationChannels::depth, PVValHelper::eta, HcalEmpty, HcalEndcap, HcalForward, globals_cff::id1, globals_cff::id2, dqmdumpme::k, and z.

Referenced by analyzeHits().

Member Data Documentation

◆ g4Label_

std::string SimHitsValidationHcal::g4Label_
private

Definition at line 81 of file SimHitsValidationHcal.h.

Referenced by SimHitsValidationHcal().

◆ hcalHits_

std::string SimHitsValidationHcal::hcalHits_
private

Definition at line 81 of file SimHitsValidationHcal.h.

Referenced by SimHitsValidationHcal().

◆ hcons

const HcalDDDRecConstants* SimHitsValidationHcal::hcons
private

Definition at line 83 of file SimHitsValidationHcal.h.

Referenced by analyze(), bookHistograms(), and getLimits().

◆ initialized

bool SimHitsValidationHcal::initialized
private

Definition at line 80 of file SimHitsValidationHcal.h.

◆ maxDepthHB_

int SimHitsValidationHcal::maxDepthHB_
private

Definition at line 86 of file SimHitsValidationHcal.h.

Referenced by bookHistograms(), and getHistogramTypes().

◆ maxDepthHE_

int SimHitsValidationHcal::maxDepthHE_
private

Definition at line 86 of file SimHitsValidationHcal.h.

Referenced by bookHistograms(), and getHistogramTypes().

◆ maxDepthHF_

int SimHitsValidationHcal::maxDepthHF_
private

Definition at line 87 of file SimHitsValidationHcal.h.

Referenced by bookHistograms(), and getHistogramTypes().

◆ maxDepthHO_

int SimHitsValidationHcal::maxDepthHO_
private

Definition at line 87 of file SimHitsValidationHcal.h.

Referenced by bookHistograms(), and getHistogramTypes().

◆ meEnergy_HB

MonitorElement* SimHitsValidationHcal::meEnergy_HB
private

Definition at line 92 of file SimHitsValidationHcal.h.

Referenced by analyzeHits(), and bookHistograms().

◆ meEnergy_HE

MonitorElement* SimHitsValidationHcal::meEnergy_HE
private

Definition at line 93 of file SimHitsValidationHcal.h.

Referenced by analyzeHits(), and bookHistograms().

◆ meEnergy_HF

MonitorElement* SimHitsValidationHcal::meEnergy_HF
private

Definition at line 95 of file SimHitsValidationHcal.h.

Referenced by analyzeHits(), and bookHistograms().

◆ meEnergy_HO

MonitorElement* SimHitsValidationHcal::meEnergy_HO
private

Definition at line 94 of file SimHitsValidationHcal.h.

Referenced by analyzeHits(), and bookHistograms().

◆ meHcalEnergyl100_

std::vector<MonitorElement *> SimHitsValidationHcal::meHcalEnergyl100_
private

Definition at line 91 of file SimHitsValidationHcal.h.

Referenced by analyzeHits(), and bookHistograms().

◆ meHcalEnergyl250_

std::vector<MonitorElement *> SimHitsValidationHcal::meHcalEnergyl250_
private

Definition at line 91 of file SimHitsValidationHcal.h.

Referenced by analyzeHits(), and bookHistograms().

◆ meHcalEnergyl25_

std::vector<MonitorElement *> SimHitsValidationHcal::meHcalEnergyl25_
private

Definition at line 90 of file SimHitsValidationHcal.h.

Referenced by analyzeHits(), and bookHistograms().

◆ meHcalEnergyl50_

std::vector<MonitorElement *> SimHitsValidationHcal::meHcalEnergyl50_
private

Definition at line 90 of file SimHitsValidationHcal.h.

Referenced by analyzeHits(), and bookHistograms().

◆ meHcalHitEta_

std::vector<MonitorElement *> SimHitsValidationHcal::meHcalHitEta_
private

Definition at line 89 of file SimHitsValidationHcal.h.

Referenced by analyzeHits(), and bookHistograms().

◆ meHcalHitTimeEta_

std::vector<MonitorElement *> SimHitsValidationHcal::meHcalHitTimeEta_
private

Definition at line 89 of file SimHitsValidationHcal.h.

Referenced by analyzeHits(), and bookHistograms().

◆ metime_enweighted_HB

MonitorElement * SimHitsValidationHcal::metime_enweighted_HB
private

Definition at line 92 of file SimHitsValidationHcal.h.

Referenced by analyzeHits(), and bookHistograms().

◆ metime_enweighted_HE

MonitorElement * SimHitsValidationHcal::metime_enweighted_HE
private

Definition at line 93 of file SimHitsValidationHcal.h.

Referenced by analyzeHits(), and bookHistograms().

◆ metime_enweighted_HF

MonitorElement * SimHitsValidationHcal::metime_enweighted_HF
private

Definition at line 95 of file SimHitsValidationHcal.h.

Referenced by analyzeHits(), and bookHistograms().

◆ metime_enweighted_HO

MonitorElement * SimHitsValidationHcal::metime_enweighted_HO
private

Definition at line 94 of file SimHitsValidationHcal.h.

Referenced by analyzeHits(), and bookHistograms().

◆ metime_HB

MonitorElement * SimHitsValidationHcal::metime_HB
private

Definition at line 92 of file SimHitsValidationHcal.h.

Referenced by analyzeHits(), and bookHistograms().

◆ metime_HE

MonitorElement * SimHitsValidationHcal::metime_HE
private

Definition at line 93 of file SimHitsValidationHcal.h.

Referenced by analyzeHits(), and bookHistograms().

◆ metime_HF

MonitorElement * SimHitsValidationHcal::metime_HF
private

Definition at line 95 of file SimHitsValidationHcal.h.

Referenced by analyzeHits(), and bookHistograms().

◆ metime_HO

MonitorElement * SimHitsValidationHcal::metime_HO
private

Definition at line 94 of file SimHitsValidationHcal.h.

Referenced by analyzeHits(), and bookHistograms().

◆ testNumber_

bool SimHitsValidationHcal::testNumber_
private

Definition at line 85 of file SimHitsValidationHcal.h.

Referenced by analyze(), and SimHitsValidationHcal().

◆ tok_hits_

edm::EDGetTokenT<edm::PCaloHitContainer> SimHitsValidationHcal::tok_hits_
private

Definition at line 82 of file SimHitsValidationHcal.h.

Referenced by analyze(), and SimHitsValidationHcal().

◆ types

std::vector<idType> SimHitsValidationHcal::types
private

Definition at line 84 of file SimHitsValidationHcal.h.

◆ verbose_

bool SimHitsValidationHcal::verbose_
private

Definition at line 85 of file SimHitsValidationHcal.h.

Referenced by SimHitsValidationHcal().

SimHitsValidationHcal::metime_enweighted_HF
MonitorElement * metime_enweighted_HF
Definition: SimHitsValidationHcal.h:95
FastTimerService_cff.range
range
Definition: FastTimerService_cff.py:34
mps_fire.i
i
Definition: mps_fire.py:355
edm::ParameterSetDescription::add
ParameterDescriptionBase * add(U const &iLabel, T const &value)
Definition: ParameterSetDescription.h:95
generateTowerEtThresholdLUT.etaRange
etaRange
Definition: generateTowerEtThresholdLUT.py:55
hfClusterShapes_cfi.hits
hits
Definition: hfClusterShapes_cfi.py:5
SimHitsValidationHcal::metime_HO
MonitorElement * metime_HO
Definition: SimHitsValidationHcal.h:94
globals_cff.id1
id1
Definition: globals_cff.py:32
SimHitsValidationHcal::hcons
const HcalDDDRecConstants * hcons
Definition: SimHitsValidationHcal.h:83
edm::ParameterSetDescription
Definition: ParameterSetDescription.h:52
SimHitsValidationHcal::hcalHits_
std::string hcalHits_
Definition: SimHitsValidationHcal.h:81
SimHitsValidationHcal::meEnergy_HO
MonitorElement * meEnergy_HO
Definition: SimHitsValidationHcal.h:94
SimHitsValidationHcal::tok_hits_
edm::EDGetTokenT< edm::PCaloHitContainer > tok_hits_
Definition: SimHitsValidationHcal.h:82
HcalDDDRecConstants::getNPhi
int getNPhi(const int &type) const
Definition: HcalDDDRecConstants.h:93
SimHitsValidationHcal::maxDepthHF_
int maxDepthHF_
Definition: SimHitsValidationHcal.h:87
HcalBarrel
Definition: HcalAssistant.h:33
HcalEmpty
Definition: HcalAssistant.h:32
SimHitsValidationHcal::meHcalEnergyl100_
std::vector< MonitorElement * > meHcalEnergyl100_
Definition: SimHitsValidationHcal.h:91
edm::Handle
Definition: AssociativeIterator.h:50
SimHitsValidationHcal::meHcalEnergyl50_
std::vector< MonitorElement * > meHcalEnergyl50_
Definition: SimHitsValidationHcal.h:90
HLT_2018_cff.maxDepth
maxDepth
Definition: HLT_2018_cff.py:7356
names
const std::string names[nVars_]
Definition: PhotonIDValueMapProducer.cc:122
PVValHelper::eta
Definition: PVValidationHelpers.h:69
dqm::impl::MonitorElement::Fill
void Fill(long long x)
Definition: MonitorElement.h:290
DDAxes::z
SimHitsValidationHcal::metime_enweighted_HO
MonitorElement * metime_enweighted_HO
Definition: SimHitsValidationHcal.h:94
edm::ESHandle
Definition: DTSurvey.h:22
HcalOuter
Definition: HcalAssistant.h:35
HCALHighEnergyHPDFilter_cfi.energy
energy
Definition: HCALHighEnergyHPDFilter_cfi.py:5
SimHitsValidationHcal::maxDepthHO_
int maxDepthHO_
Definition: SimHitsValidationHcal.h:87
dqmdumpme.k
k
Definition: dqmdumpme.py:60
SimHitsValidationHcal::metime_HE
MonitorElement * metime_HE
Definition: SimHitsValidationHcal.h:93
SimHitsValidationHcal::metime_enweighted_HB
MonitorElement * metime_enweighted_HB
Definition: SimHitsValidationHcal.h:92
LEDCalibrationChannels.depth
depth
Definition: LEDCalibrationChannels.py:65
HcalRecNumberingRecord
Definition: HcalRecNumberingRecord.h:23
SimHitsValidationHcal::meHcalEnergyl25_
std::vector< MonitorElement * > meHcalEnergyl25_
Definition: SimHitsValidationHcal.h:90
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
LEDCalibrationChannels.ieta
ieta
Definition: LEDCalibrationChannels.py:63
SimHitsValidationHcal::meHcalHitTimeEta_
std::vector< MonitorElement * > meHcalHitTimeEta_
Definition: SimHitsValidationHcal.h:89
SimHitsValidationHcal::histId
std::pair< int, int > histId(int subdet, int eta, int depth, unsigned int dep)
Definition: SimHitsValidationHcal.cc:355
SiStripPI::max
Definition: SiStripPayloadInspectorHelper.h:169
SimHitsValidationHcal::meEnergy_HE
MonitorElement * meEnergy_HE
Definition: SimHitsValidationHcal.h:93
SimHitsValidationHcal::g4Label_
std::string g4Label_
Definition: SimHitsValidationHcal.h:81
HcalDetId
Definition: HcalDetId.h:12
createfilelist.int
int
Definition: createfilelist.py:10
edm::LogVerbatim
Definition: MessageLogger.h:297
SimHitsValidationHcal::getLimits
etaRange getLimits(idType)
Definition: SimHitsValidationHcal.cc:307
cuy.ib
ib
Definition: cuy.py:662
itr
std::vector< std::pair< float, float > >::iterator itr
Definition: HGCDigitizer.cc:28
get
#define get
SimHitsValidationHcal::metime_HF
MonitorElement * metime_HF
Definition: SimHitsValidationHcal.h:95
SimHitsValidationHcal::meEnergy_HB
MonitorElement * meEnergy_HB
Definition: SimHitsValidationHcal.h:92
overlapproblemtsosanalyzer_cfi.title
title
Definition: overlapproblemtsosanalyzer_cfi.py:7
types
types
Definition: AlignPCLThresholds_PayloadInspector.cc:30
HcalForward
Definition: HcalAssistant.h:36
DDAxes::phi
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
SimHitsValidationHcal::idType
Definition: SimHitsValidationHcal.h:47
HcalHitRelabeller::relabel
DetId relabel(const uint32_t testId) const
Definition: HcalHitRelabeller.cc:49
LaserClient_cfi.high
high
Definition: LaserClient_cfi.py:50
type
type
Definition: HCALResponse.h:21
DetId::rawId
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
SimHitsValidationHcal::meHcalEnergyl250_
std::vector< MonitorElement * > meHcalEnergyl250_
Definition: SimHitsValidationHcal.h:91
HcalDDDRecConstants::getEtaRange
std::pair< int, int > getEtaRange(const int &i) const
Definition: HcalDDDRecConstants.h:74
remoteMonitoring_LED_IterMethod_cfg.limit
limit
Definition: remoteMonitoring_LED_IterMethod_cfg.py:427
HcalEndcap
Definition: HcalAssistant.h:34
hcalTTPDigis_cfi.iEtaMax
iEtaMax
Definition: hcalTTPDigis_cfi.py:16
SimHitsValidationHcal::meHcalHitEta_
std::vector< MonitorElement * > meHcalHitEta_
Definition: SimHitsValidationHcal.h:89
SimHitsValidationHcal::metime_HB
MonitorElement * metime_HB
Definition: SimHitsValidationHcal.h:92
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17
SimHitsValidationHcal::verbose_
bool verbose_
Definition: SimHitsValidationHcal.h:85
HcalDDDRecConstants::getMaxDepth
int getMaxDepth(const int &type) const
Definition: HcalDDDRecConstants.h:88
SimHitsValidationHcal::maxDepthHB_
int maxDepthHB_
Definition: SimHitsValidationHcal.h:86
SimHitsValidationHcal::getHistogramTypes
std::vector< std::pair< std::string, std::string > > getHistogramTypes()
Definition: SimHitsValidationHcal.cc:387
SimHitsValidationHcal::analyzeHits
void analyzeHits(std::vector< PCaloHit > &)
Definition: SimHitsValidationHcal.cc:186
trigObjTnPSource_cfi.bins
bins
Definition: trigObjTnPSource_cfi.py:20
SimHitsValidationHcal::meEnergy_HF
MonitorElement * meEnergy_HF
Definition: SimHitsValidationHcal.h:95
globals_cff.id2
id2
Definition: globals_cff.py:33
edm::HandleBase::isValid
bool isValid() const
Definition: HandleBase.h:70
ntuplemaker.time
time
Definition: ntuplemaker.py:310
hfnoseParametersInitialization_cfi.name2
name2
Definition: hfnoseParametersInitialization_cfi.py:8
SimHitsValidationHcal::metime_enweighted_HE
MonitorElement * metime_enweighted_HE
Definition: SimHitsValidationHcal.h:93
edm::ConfigurationDescriptions::addDefault
void addDefault(ParameterSetDescription const &psetDescription)
Definition: ConfigurationDescriptions.cc:99
TauDecayModes.dec
dec
Definition: TauDecayModes.py:143
SimHitsValidationHcal::maxDepthHE_
int maxDepthHE_
Definition: SimHitsValidationHcal.h:86
SimHitsValidationHcal::testNumber_
bool testNumber_
Definition: SimHitsValidationHcal.h:85
LaserClient_cfi.low
low
Definition: LaserClient_cfi.py:52
edm::InputTag
Definition: InputTag.h:15
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37