CMS 3D CMS Logo

HGCalTBAnalyzer.cc
Go to the documentation of this file.
1 // system include files
2 #include <cmath>
3 #include <fstream>
4 #include <iostream>
5 #include <map>
6 #include <memory>
7 #include <string>
8 #include <vector>
9 
10 // user include files
15 
26 
40 
42 
43 // Root objects
44 #include "TH1.h"
45 #include "TH2.h"
46 #include "TProfile.h"
47 #include "TProfile2D.h"
48 #include "TROOT.h"
49 #include "TSystem.h"
50 #include "TTree.h"
51 
52 //#define EDM_ML_DEBUG
53 
54 class HGCalTBAnalyzer : public edm::one::EDAnalyzer<edm::one::WatchRuns, edm::one::SharedResources> {
55 public:
56  explicit HGCalTBAnalyzer(edm::ParameterSet const&);
57  ~HGCalTBAnalyzer() override;
58 
59  static void fillDescriptions(edm::ConfigurationDescriptions& descriptions);
60 
61 private:
62  void beginJob() override;
63  void beginRun(edm::Run const&, edm::EventSetup const&) override;
64  void endRun(edm::Run const&, edm::EventSetup const&) override {}
65  void analyze(edm::Event const&, edm::EventSetup const&) override;
66  void analyzeSimHits(int type, std::vector<PCaloHit>& hits, double zFront);
69  template <class T1>
70  void analyzeDigi(int type, const T1& detId, uint16_t adc);
72  void analyzePassiveHits(edm::Handle<edm::PassiveHitContainer> const& hgcPh, int subdet);
73  static bool sortTime(const std::pair<double, double>& i, const std::pair<double, double>& j);
74 
76  std::unique_ptr<AHCalGeometry> ahcalGeom_;
78  const HGCalGeometry* hgeom_[2];
79  const bool ifEE_, ifFH_, ifBH_, ifBeam_;
81  const bool doTree_, doTreeCell_;
85  const double zFrontEE_, zFrontFH_, zFrontBH_;
86  const int sampleIndex_;
88  std::vector<int> idBeams_;
102 
103  TTree* tree_;
104  TH1D *hSimHitE_[4], *hSimHitT_[4];
105  TH1D *hDigiADC_[3], *hDigiLng_[2];
106  TH1D *hRecHitE_[3], *hSimHitEn_[4], *hBeam_;
107  TH2D *hDigiOcc_[3], *hRecHitOcc_[3];
108  TProfile *hSimHitLng_[3], *hSimHitLng1_[3];
109  TProfile* hSimHitLng2_[3];
110  TProfile *hRecHitLng_[3], *hRecHitLng1_[3];
111  TProfile2D *hSimHitLat_[3], *hRecHitLat_[3];
112  std::vector<TH1D*> hSimHitLayEn1EE_, hSimHitLayEn2EE_;
113  std::vector<TH1D*> hSimHitLayEn1FH_, hSimHitLayEn2FH_;
114  std::vector<TH1D*> hSimHitLayEn1BH_, hSimHitLayEn2BH_;
115  std::vector<TH1D*> hSimHitLayEnBeam_;
116  std::vector<float> simHitLayEn1EE_, simHitLayEn2EE_;
117  std::vector<float> simHitLayEn1FH_, simHitLayEn2FH_;
118  std::vector<float> simHitLayEn1BH_, simHitLayEn2BH_;
119  std::vector<float> simHitLayEnBeam_;
120  std::vector<uint32_t> simHitCellIdEE_, simHitCellIdFH_;
121  std::vector<uint32_t> simHitCellIdBH_, simHitCellIdBeam_;
122  std::vector<float> simHitCellEnEE_, simHitCellEnFH_;
123  std::vector<float> simHitCellEnBH_, simHitCellEnBeam_;
128 
130  std::vector<float> hgcPassiveBeamEnergy_;
132  std::vector<std::string> hgcPassiveBeamName_;
134 
137  int nBeamMC_;
138  std::vector<int> pdgIdBeamMC_;
139  std::vector<float> xBeamMC_, yBeamMC_, zBeamMC_;
140  std::vector<float> pxBeamMC_, pyBeamMC_, pzBeamMC_, pBeamMC_;
141 };
142 
144  : ifEE_(iConfig.getParameter<bool>("useEE")),
145  ifFH_(iConfig.getParameter<bool>("useFH")),
146  ifBH_(iConfig.getParameter<bool>("useBH")),
147  ifBeam_(iConfig.getParameter<bool>("useBeam")),
148  doSimHits_(iConfig.getParameter<bool>("doSimHits")),
149  doDigis_(iConfig.getParameter<bool>("doDigis")),
150  doRecHits_(iConfig.getParameter<bool>("doRecHits")),
151  doTree_(iConfig.getParameter<bool>("doTree")),
152  doTreeCell_(iConfig.getParameter<bool>("doTreeCell")),
153  doPassive_(iConfig.getParameter<bool>("doPassive")),
154  doPassiveEE_(iConfig.getParameter<bool>("doPassiveEE")),
155  doPassiveHE_(iConfig.getParameter<bool>("doPassiveHE")),
156  doPassiveBH_(iConfig.getParameter<bool>("doPassiveBH")),
157  addP_(iConfig.getParameter<bool>("addP")),
158  doBeam_(iConfig.getParameter<bool>("doBeam")),
159  detectorEE_(iConfig.getParameter<std::string>("detectorEE")),
160  detectorFH_(iConfig.getParameter<std::string>("detectorFH")),
161  detectorBH_(iConfig.getParameter<std::string>("detectorBH")),
162  detectorBeam_(iConfig.getParameter<std::string>("detectorBeam")),
163  zFrontEE_(iConfig.getParameter<double>("zFrontEE")),
164  zFrontFH_(iConfig.getParameter<double>("zFrontFH")),
165  zFrontBH_(iConfig.getParameter<double>("zFrontBH")),
166  sampleIndex_(iConfig.getParameter<int>("sampleIndex")),
167  gev2mip200_(iConfig.getUntrackedParameter<double>("gev2mip200", 57.0e-6)),
168  gev2mip300_(iConfig.getUntrackedParameter<double>("gev2mip300", 85.5e-6)),
169  stoc_smear_time_200_(iConfig.getUntrackedParameter<double>("stoc_smear_time_200", 10.24)),
170  stoc_smear_time_300_(iConfig.getUntrackedParameter<double>("stoc_smear_time_300", 15.5)) {
171  usesResource("TFileService");
172  ahcalGeom_ = std::make_unique<AHCalGeometry>(iConfig);
173 
174  // now do whatever initialization is needed
180  idBeams_ = (iConfig.getParameter<std::vector<int>>("idBeams"));
181 #ifdef EDM_ML_DEBUG
182  edm::LogVerbatim("HGCSim") << "HGCalTBAnalyzer:: SimHits = " << doSimHits_ << " Digis = " << doDigis_ << ":"
183  << sampleIndex_ << " RecHits = " << doRecHits_ << " useDets " << ifEE_ << ":" << ifFH_
184  << ":" << ifBH_ << ":" << ifBeam_ << " zFront " << zFrontEE_ << ":" << zFrontFH_ << ":"
185  << zFrontBH_ << " IdBeam " << idBeams_.size() << ":";
186  for (unsigned int k = 0; k < idBeams_.size(); ++k)
187  edm::LogVerbatim("HGCSim") << " [" << k << "] " << idBeams_[k];
188  edm::LogVerbatim("HGCSim") << "HGCalTBAnalyzer:: DoPassive " << doPassive_ << ":" << doPassiveEE_ << ":"
189  << doPassiveHE_ << ":" << doPassiveBH_;
190  edm::LogVerbatim("HGCSim") << "HGCalTBAnalyzer:: MIP conversion factors " << gev2mip200_ << ":" << gev2mip300_
191  << " Time smearing " << stoc_smear_time_200_ << ":" << stoc_smear_time_300_ << " AddP "
192  << addP_;
193 #endif
194  if (idBeams_.empty())
195  idBeams_.push_back(1001);
196 
197  edm::InputTag tmp0 = iConfig.getParameter<edm::InputTag>("generatorSrc");
198  tok_hepMC_ = consumes<edm::HepMCProduct>(tmp0);
199 
200 #ifdef EDM_ML_DEBUG
201  edm::LogVerbatim("HGCSim") << "HGCalTBAnalyzer:: GeneratorSource = " << tmp0;
202 #endif
203  std::string tmp1 = iConfig.getParameter<std::string>("caloHitSrcEE");
204  tok_hitsEE_ = consumes<edm::PCaloHitContainer>(edm::InputTag("g4SimHits", tmp1));
205  tok_simTk_ = consumes<edm::SimTrackContainer>(edm::InputTag("g4SimHits"));
206  tok_simVtx_ = consumes<edm::SimVertexContainer>(edm::InputTag("g4SimHits"));
207  edm::InputTag tmp2 = iConfig.getParameter<edm::InputTag>("digiSrcEE");
208  tok_digiEE_ = consumes<HGCalDigiCollection>(tmp2);
209  edm::InputTag tmp3 = iConfig.getParameter<edm::InputTag>("recHitSrcEE");
210  tok_hitrEE_ = consumes<HGCRecHitCollection>(tmp3);
211 #ifdef EDM_ML_DEBUG
212  if (ifEE_) {
213  edm::LogVerbatim("HGCSim") << "HGCalTBAnalyzer:: Detector " << detectorEE_ << " with tags " << tmp1 << ", " << tmp2
214  << ", " << tmp3;
215  }
216 #endif
217  tmp1 = iConfig.getParameter<std::string>("caloHitSrcFH");
218  tok_hitsFH_ = consumes<edm::PCaloHitContainer>(edm::InputTag("g4SimHits", tmp1));
219  tmp2 = iConfig.getParameter<edm::InputTag>("digiSrcFH");
220  tok_digiFH_ = consumes<HGCalDigiCollection>(tmp2);
221  tmp3 = iConfig.getParameter<edm::InputTag>("recHitSrcFH");
222  tok_hitrFH_ = consumes<HGCRecHitCollection>(tmp3);
223 #ifdef EDM_ML_DEBUG
224  if (ifFH_)
225  edm::LogVerbatim("HGCSim") << "HGCalTBAnalyzer:: Detector " << detectorFH_ << " with tags " << tmp1 << ", " << tmp2
226  << ", " << tmp3;
227 #endif
228  tmp1 = iConfig.getParameter<std::string>("caloHitSrcBH");
229  tok_hitsBH_ = consumes<edm::PCaloHitContainer>(edm::InputTag("g4SimHits", tmp1));
230  tmp2 = iConfig.getParameter<edm::InputTag>("digiSrcBH");
231  tok_digiBH_ = consumes<HGCalDigiCollection>(tmp2);
232  tmp3 = iConfig.getParameter<edm::InputTag>("recHitSrcBH");
233  tok_hitrBH_ = consumes<HGCRecHitCollection>(tmp3);
234 
236  edm::InputTag tmp = iConfig.getParameter<edm::InputTag>("passiveEE");
237  tok_hgcPHEE_ = consumes<edm::PassiveHitContainer>(tmp);
238 
239  tmp = iConfig.getParameter<edm::InputTag>("passiveFH");
240  tok_hgcPHFH_ = consumes<edm::PassiveHitContainer>(tmp);
241 
242  tmp = iConfig.getParameter<edm::InputTag>("passiveBH");
243  tok_hgcPHBH_ = consumes<edm::PassiveHitContainer>(tmp);
244 
245  tmp = iConfig.getParameter<edm::InputTag>("passiveCMSE");
246  tok_hgcPHCMSE_ = consumes<edm::PassiveHitContainer>(tmp);
247 
248  tmp = iConfig.getParameter<edm::InputTag>("passiveBeam");
249  tok_hgcPHBeam_ = consumes<edm::PassiveHitContainer>(tmp);
250 
251 #ifdef EDM_ML_DEBUG
252  if (ifBH_)
253  edm::LogVerbatim("HGCSim") << "HGCalTBAnalyzer:: Detector " << detectorBH_ << " with tags " << tmp1 << ", " << tmp2
254  << ", " << tmp3;
255 #endif
256  tmp1 = iConfig.getParameter<std::string>("caloHitSrcBeam");
257  tok_hitsBeam_ = consumes<edm::PCaloHitContainer>(edm::InputTag("g4SimHits", tmp1));
258 #ifdef EDM_ML_DEBUG
259  if (ifBeam_)
260  edm::LogVerbatim("HGCSim") << "HGCalTBAnalyzer:: Detector " << detectorBeam_ << " with tags " << tmp1;
261 #endif
262  if (ifEE_) {
263  tokDDDEE_ =
264  esConsumes<HGCalDDDConstants, IdealGeometryRecord, edm::Transition::BeginRun>(edm::ESInputTag("", detectorEE_));
265  tokGeomEE_ =
266  esConsumes<HGCalGeometry, IdealGeometryRecord, edm::Transition::BeginRun>(edm::ESInputTag("", detectorEE_));
267  }
268  if (ifFH_) {
269  tokDDDFH_ =
270  esConsumes<HGCalDDDConstants, IdealGeometryRecord, edm::Transition::BeginRun>(edm::ESInputTag("", detectorFH_));
271  tokGeomFH_ =
272  esConsumes<HGCalGeometry, IdealGeometryRecord, edm::Transition::BeginRun>(edm::ESInputTag("", detectorFH_));
273  }
274 }
275 
277 
280  desc.add<std::string>("detectorEE", "HGCalEESensitive");
281  desc.add<bool>("useEE", true);
282  desc.add<double>("zFrontEE", 0.0);
283  desc.add<std::string>("caloHitSrcEE", "HGCHitsEE");
284  desc.add<edm::InputTag>("digiSrcEE", edm::InputTag("hgcalDigis", "EE"));
285  desc.add<edm::InputTag>("recHitSrcEE", edm::InputTag("HGCalRecHit", "HGCEERecHits"));
286  desc.add<std::string>("detectorFH", "HGCalHESiliconSensitive");
287  desc.add<bool>("useFH", false);
288  desc.add<double>("zFrontFH", 0.0);
289  desc.add<std::string>("caloHitSrcFH", "HGCHitsHEfront");
290  desc.add<edm::InputTag>("digiSrcFH", edm::InputTag("hgcalDigis", "HEfront"));
291  desc.add<edm::InputTag>("recHitSrcFH", edm::InputTag("HGCalRecHit", "HGCHEFRecHits"));
292  desc.add<std::string>("detectorBH", "AHCal");
293  desc.add<bool>("useBH", false);
294  desc.add<double>("zFrontBH", 0.0);
295  desc.add<std::string>("caloHitSrcBH", "HcalHits");
296  desc.add<edm::InputTag>("digiSrcBH", edm::InputTag("hgcalDigis", "HEback"));
297  desc.add<edm::InputTag>("recHitSrcBH", edm::InputTag("HGCalRecHit", "HGCHEBRecHits"));
298  desc.add<std::string>("detectorBeam", "HcalTB06BeamDetector");
299  desc.add<bool>("useBeam", false);
300  desc.add<std::string>("caloHitSrcBeam", "HcalTB06BeamHits");
301  std::vector<int> ids = {
302  1000, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1011, 1012, 1013, 1014, 2001, 2002, 2003, 2004, 2005};
303  desc.add<std::vector<int>>("idBeams", ids);
304  desc.add<edm::InputTag>("generatorSrc", edm::InputTag("generatorSmeared"));
305  desc.add<edm::InputTag>("passiveEE", edm::InputTag("g4SimHits", "HGCalEEPassiveHits"));
306  desc.add<edm::InputTag>("passiveFH", edm::InputTag("g4SimHits", "HGCalHEPassiveHits"));
307  desc.add<edm::InputTag>("passiveBH", edm::InputTag("g4SimHits", "HGCalAHPassiveHits"));
308  desc.add<edm::InputTag>("passiveCMSE", edm::InputTag("g4SimHits", "CMSEPassiveHits"));
309  desc.add<edm::InputTag>("passiveBeam", edm::InputTag("g4SimHits", "HGCalBeamPassiveHits"));
310 
311  desc.add<bool>("doSimHits", true);
312  desc.add<bool>("doDigis", true);
313  desc.add<bool>("doRecHits", true);
314  desc.add<int>("sampleIndex", 0);
315  desc.add<bool>("doTree", true);
316  desc.add<bool>("doTreeCell", true);
317  desc.add<bool>("doPassive", false);
318  desc.add<bool>("doPassiveEE", false);
319  desc.add<bool>("doPassiveHE", false);
320  desc.add<bool>("doPassiveBH", false);
321  desc.add<bool>("addP", false);
322  desc.add<bool>("doBeam", false);
323  desc.addUntracked<double>("gev2mip200", 57.0e-6);
324  desc.addUntracked<double>("gev2mip300", 85.5e-6);
325  desc.addUntracked<double>("stoc_smear_time_200", 10.24);
326  desc.addUntracked<double>("stoc_smear_time_300", 15.5);
327  desc.addUntracked<int>("maxDepth", 12);
328  desc.addUntracked<double>("deltaX", 30.0); // Size of tile along X
329  desc.addUntracked<double>("deltaY", 30.0); // Size of tile along Y
330  desc.addUntracked<double>("deltaZ", 81.0); // Thickness of a single layer
331  desc.addUntracked<double>("zFirst", 17.6); // Position of the center
332  descriptions.add("HGCalTBAnalyzer", desc);
333 }
334 
336  char name[40], title[100];
337  hBeam_ = fs_->make<TH1D>("BeamP", "Beam Momentum", 1000, 0, 1000.0);
338  for (int i = 0; i < 3; ++i) {
339  bool book(ifEE_);
341  if (i == 1) {
342  book = ifFH_;
343  det = detectorFH_;
344  } else if (i == 2) {
345  book = ifBH_;
346  det = detectorBH_;
347  }
348 
349  if (doSimHits_ && book) {
350  sprintf(name, "SimHitEn%s", det.c_str());
351  sprintf(title, "Sim Hit Energy for %s", det.c_str());
352  hSimHitE_[i] = fs_->make<TH1D>(name, title, 100000, 0., 0.2);
353  sprintf(name, "SimHitEnX%s", det.c_str());
354  sprintf(title, "Sim Hit Energy for %s", det.c_str());
355  hSimHitEn_[i] = fs_->make<TH1D>(name, title, 100000, 0., 0.2);
356  sprintf(name, "SimHitTm%s", det.c_str());
357  sprintf(title, "Sim Hit Timing for %s", det.c_str());
358  hSimHitT_[i] = fs_->make<TH1D>(name, title, 5000, 0., 500.0);
359  sprintf(name, "SimHitLat%s", det.c_str());
360  sprintf(title, "Lateral Shower profile (Sim Hit) for %s", det.c_str());
361  hSimHitLat_[i] = fs_->make<TProfile2D>(name, title, 100, -100., 100., 100, -100., 100.);
362  sprintf(name, "SimHitLng%s", det.c_str());
363  sprintf(title, "Longitudinal Shower profile (Sim Hit) for %s", det.c_str());
364  hSimHitLng_[i] = fs_->make<TProfile>(name, title, 50, 0., 100.);
365  sprintf(name, "SimHitLng1%s", det.c_str());
366  sprintf(title, "Longitudinal Shower profile (Layer) for %s", det.c_str());
367  hSimHitLng1_[i] = fs_->make<TProfile>(name, title, 200, 0., 100.);
368  sprintf(name, "SimHitLng2%s", det.c_str());
369  sprintf(title, "Longitudinal Shower profile (Layer) for %s", det.c_str());
370  hSimHitLng2_[i] = fs_->make<TProfile>(name, title, 200, 0., 100.);
371  }
372 
373  if (doDigis_ && book) {
374  sprintf(name, "DigiADC%s", det.c_str());
375  sprintf(title, "ADC at Digi level for %s", det.c_str());
376  hDigiADC_[i] = fs_->make<TH1D>(name, title, 100, 0., 100.0);
377  sprintf(name, "DigiOcc%s", det.c_str());
378  sprintf(title, "Occupancy (Digi)for %s", det.c_str());
379  hDigiOcc_[i] = fs_->make<TH2D>(name, title, 100, -10., 10., 100, -10., 10.);
380  sprintf(name, "DigiLng%s", det.c_str());
381  sprintf(title, "Longitudinal Shower profile (Digi) for %s", det.c_str());
382  hDigiLng_[i] = fs_->make<TH1D>(name, title, 100, 0., 10.);
383  }
384 
385  if (doRecHits_ && book) {
386  sprintf(name, "RecHitEn%s", det.c_str());
387  sprintf(title, "Rec Hit Energy for %s", det.c_str());
388  hRecHitE_[i] = fs_->make<TH1D>(name, title, 1000, 0., 10.0);
389  sprintf(name, "RecHitOcc%s", det.c_str());
390  sprintf(title, "Occupancy (Rec Hit)for %s", det.c_str());
391  hRecHitOcc_[i] = fs_->make<TH2D>(name, title, 100, -10., 10., 100, -10., 10.);
392  sprintf(name, "RecHitLat%s", det.c_str());
393  sprintf(title, "Lateral Shower profile (Rec Hit) for %s", det.c_str());
394  hRecHitLat_[i] = fs_->make<TProfile2D>(name, title, 100, -10., 10., 100, -10., 10.);
395  sprintf(name, "RecHitLng%s", det.c_str());
396  sprintf(title, "Longitudinal Shower profile (Rec Hit) for %s", det.c_str());
397  hRecHitLng_[i] = fs_->make<TProfile>(name, title, 100, 0., 10.);
398  sprintf(name, "RecHitLng1%s", det.c_str());
399  sprintf(title, "Longitudinal Shower profile vs Layer for %s", det.c_str());
400  hRecHitLng1_[i] = fs_->make<TProfile>(name, title, 120, 0., 60.);
401  }
402  }
403  if (ifBeam_ && doSimHits_) {
404  sprintf(name, "SimHitEn%s", detectorBeam_.c_str());
405  sprintf(title, "Sim Hit Energy for %s", detectorBeam_.c_str());
406  hSimHitE_[3] = fs_->make<TH1D>(name, title, 100000, 0., 0.2);
407  sprintf(name, "SimHitEnX%s", detectorBeam_.c_str());
408  sprintf(title, "Sim Hit Energy for %s", detectorBeam_.c_str());
409  hSimHitEn_[3] = fs_->make<TH1D>(name, title, 100000, 0., 0.2);
410  sprintf(name, "SimHitTm%s", detectorBeam_.c_str());
411  sprintf(title, "Sim Hit Timing for %s", detectorBeam_.c_str());
412  hSimHitT_[3] = fs_->make<TH1D>(name, title, 5000, 0., 500.0);
413  }
414  if (doSimHits_ && doTree_) {
415  tree_ = fs_->make<TTree>("HGCTB", "SimHitEnergy");
416  tree_->Branch("simHitLayEn1EE", &simHitLayEn1EE_);
417  tree_->Branch("simHitLayEn2EE", &simHitLayEn2EE_);
418  tree_->Branch("simHitLayEn1FH", &simHitLayEn1FH_);
419  tree_->Branch("simHitLayEn2FH", &simHitLayEn2FH_);
420  tree_->Branch("simHitLayEn1BH", &simHitLayEn1BH_);
421  tree_->Branch("simHitLayEn2BH", &simHitLayEn2BH_);
422  tree_->Branch("xBeam", &xBeam_, "xBeam/D");
423  tree_->Branch("yBeam", &yBeam_, "yBeam/D");
424  tree_->Branch("zBeam", &zBeam_, "zBeam/D");
425  tree_->Branch("pBeam", &pBeam_, "pBeam/D");
426  tree_->Branch("thetaBeam", &thetaBeam_, "thetaBeam/D");
427  tree_->Branch("phiBeam", &phiBeam_, "phiBeam/D");
428  if (doBeam_) {
429  tree_->Branch("nBeamMC", &nBeamMC_, "nBeamMC/I");
430  tree_->Branch("pdgIdBeamMC", &pdgIdBeamMC_);
431  tree_->Branch("xBeamMC", &xBeamMC_);
432  tree_->Branch("yBeamMC", &yBeamMC_);
433  tree_->Branch("zBeamMC", &zBeamMC_);
434  tree_->Branch("pxBeamMC", &pxBeamMC_);
435  tree_->Branch("pyBeamMC", &pyBeamMC_);
436  tree_->Branch("pzBeamMC", &pzBeamMC_);
437  tree_->Branch("pBeamMC", &pBeamMC_);
438  }
439  if (doTreeCell_) {
440  tree_->Branch("simHitCellIdEE", &simHitCellIdEE_);
441  tree_->Branch("simHitCellEnEE", &simHitCellEnEE_);
442  tree_->Branch("simHitCellIdFH", &simHitCellIdFH_);
443  tree_->Branch("simHitCellEnFH", &simHitCellEnFH_);
444  tree_->Branch("simHitCellIdBH", &simHitCellIdBH_);
445  tree_->Branch("simHitCellEnBH", &simHitCellEnBH_);
446  tree_->Branch("simHitCellIdBeam", &simHitCellIdBeam_);
447  tree_->Branch("simHitCellEnBeam", &simHitCellEnBeam_);
448 
449  tree_->Branch("simHitCellColBH", &simHitCellColBH_);
450  tree_->Branch("simHitCellRowBH", &simHitCellRowBH_);
451  tree_->Branch("simHitCellLayerBH", &simHitCellLayerBH_);
452  tree_->Branch("simHitCellTimeFirstHitEE", &simHitCellTimeFirstHitEE_);
453  tree_->Branch("simHitCellTimeFirstHitFH", &simHitCellTimeFirstHitFH_);
454  //tree_->Branch("simHitCellTimeFirstHitBH", &simHitCellTimeFirstHitBH_);
455  tree_->Branch("simHitCellTime15MipEE", &simHitCellTime15MipEE_);
456  tree_->Branch("simHitCellTime15MipFH", &simHitCellTime15MipFH_);
457  //tree_->Branch("simHitCellTime15MipBH", &simHitCellTime15MipBH_);
458  tree_->Branch("simHitCellTimeLastHitEE", &simHitCellTimeLastHitEE_);
459  tree_->Branch("simHitCellTimeLastHitFH", &simHitCellTimeLastHitFH_);
460  //tree_->Branch("simHitCellTimeLastHitBH", &simHitCellTimeLastHitBH_);
461  }
462  }
463 
464  if (doPassive_ && doTree_) {
465  if (doPassiveEE_) {
466  tree_->Branch("hgcPassiveEEEnergy", &hgcPassiveEEEnergy_);
467  tree_->Branch("hgcPassiveEEName", &hgcPassiveEEName_);
468  tree_->Branch("hgcPassiveEEID", &hgcPassiveEEID_);
469  }
470  if (doPassiveHE_) {
471  tree_->Branch("hgcPassiveFHEnergy", &hgcPassiveFHEnergy_);
472  tree_->Branch("hgcPassiveFHName", &hgcPassiveFHName_);
473  tree_->Branch("hgcPassiveFHID", &hgcPassiveFHID_);
474  }
475  if (doPassiveBH_) {
476  tree_->Branch("hgcPassiveBHEnergy", &hgcPassiveBHEnergy_);
477  tree_->Branch("hgcPassiveBHName", &hgcPassiveBHName_);
478  tree_->Branch("hgcPassiveBHID", &hgcPassiveBHID_);
479  }
480  tree_->Branch("hgcPassiveCMSEEnergy", &hgcPassiveCMSEEnergy_);
481  tree_->Branch("hgcPassiveCMSEName", &hgcPassiveCMSEName_);
482  tree_->Branch("hgcPassiveCMSEID", &hgcPassiveCMSEID_);
483  tree_->Branch("hgcPassiveBeamEnergy", &hgcPassiveBeamEnergy_);
484  tree_->Branch("hgcPassiveBeamName", &hgcPassiveBeamName_);
485  tree_->Branch("hgcPassiveBeamID", &hgcPassiveBeamID_);
486  }
487 }
488 
490  char name[40], title[100];
491  if (ifEE_) {
492  hgcons_[0] = &iSetup.getData(tokDDDEE_);
493  if (doDigis_ || doRecHits_) {
494  hgeom_[0] = &iSetup.getData(tokGeomEE_);
495  } else {
496  hgeom_[0] = nullptr;
497  }
498  for (unsigned int l = 0; l < hgcons_[0]->layers(false); ++l) {
499  sprintf(name, "SimHitEnA%d%s", l, detectorEE_.c_str());
500  sprintf(title, "Sim Hit Energy in SIM layer %d for %s", l + 1, detectorEE_.c_str());
501  hSimHitLayEn1EE_.push_back(fs_->make<TH1D>(name, title, 100000, 0., 0.2));
502  if (l % 3 == 0) {
503  sprintf(name, "SimHitEnB%d%s", (l / 3 + 1), detectorEE_.c_str());
504  sprintf(title, "Sim Hit Energy in layer %d for %s", (l / 3 + 1), detectorEE_.c_str());
505  hSimHitLayEn2EE_.push_back(fs_->make<TH1D>(name, title, 100000, 0., 0.2));
506  }
507  }
508 #ifdef EDM_ML_DEBUG
509  edm::LogVerbatim("HGCSim") << "HGCalTBAnalyzer::" << detectorEE_ << " defined with " << hgcons_[0]->layers(false)
510  << " layers";
511 #endif
512  } else {
513  hgcons_[0] = nullptr;
514  hgeom_[0] = nullptr;
515  }
516 
517  if (ifFH_) {
518  hgcons_[1] = &iSetup.getData(tokDDDFH_);
519  if (doDigis_ || doRecHits_) {
520  hgeom_[1] = &iSetup.getData(tokGeomFH_);
521  } else {
522  hgeom_[1] = nullptr;
523  }
524  for (unsigned int l = 0; l < hgcons_[1]->layers(false); ++l) {
525  sprintf(name, "SimHitEnA%d%s", l, detectorFH_.c_str());
526  sprintf(title, "Sim Hit Energy in layer %d for %s", l + 1, detectorFH_.c_str());
527  hSimHitLayEn1FH_.push_back(fs_->make<TH1D>(name, title, 100000, 0., 0.2));
528  if (l % 3 == 0) {
529  sprintf(name, "SimHitEnB%d%s", (l / 3 + 1), detectorFH_.c_str());
530  sprintf(title, "Sim Hit Energy in layer %d for %s", (l / 3 + 1), detectorFH_.c_str());
531  hSimHitLayEn2FH_.push_back(fs_->make<TH1D>(name, title, 100000, 0., 0.2));
532  }
533  }
534 #ifdef EDM_ML_DEBUG
535  edm::LogVerbatim("HGCSim") << "HGCalTBAnalyzer::" << detectorFH_ << " defined with " << hgcons_[1]->layers(false)
536  << " layers";
537 #endif
538  } else {
539  hgcons_[1] = nullptr;
540  hgeom_[1] = nullptr;
541  }
542 
543  if (ifBH_) {
544  for (int l = 0; l < ahcalGeom_->maxDepth(); ++l) {
545  sprintf(name, "SimHitEnA%d%s", l, detectorBH_.c_str());
546  sprintf(title, "Sim Hit Energy in layer %d for %s", l + 1, detectorBH_.c_str());
547  hSimHitLayEn1BH_.push_back(fs_->make<TH1D>(name, title, 100000, 0., 0.2));
548  sprintf(name, "SimHitEnB%d%s", l, detectorBH_.c_str());
549  sprintf(title, "Sim Hit Energy in layer %d for %s", l + 1, detectorBH_.c_str());
550  hSimHitLayEn2BH_.push_back(fs_->make<TH1D>(name, title, 100000, 0., 0.2));
551  }
552  }
553 
554  if (ifBeam_) {
555  for (unsigned int l = 0; l < idBeams_.size(); ++l) {
556  sprintf(name, "SimHitEna%d%s", l, detectorBeam_.c_str());
557  sprintf(title, "Sim Hit Energy in type %d for %s", idBeams_[l], detectorBeam_.c_str());
558  hSimHitLayEnBeam_.push_back(fs_->make<TH1D>(name, title, 100000, 0., 0.2));
559  }
560  }
561 }
562 
564  // Generator input
566  iEvent.getByToken(tok_hepMC_, evtMC);
567  if (!evtMC.isValid()) {
568  edm::LogWarning("HGCal") << "no HepMCProduct found";
569  } else {
570  const HepMC::GenEvent* myGenEvent = evtMC->GetEvent();
571  unsigned int k(0);
572  HepMC::FourVector pxyz(0, 0, 0, 0);
573  for (HepMC::GenEvent::particle_const_iterator p = myGenEvent->particles_begin(); p != myGenEvent->particles_end();
574  ++p, ++k) {
575  edm::LogVerbatim("HGCSim") << "Particle [" << k << "] with p " << (*p)->momentum().rho() << " theta "
576  << (*p)->momentum().theta() << " phi " << (*p)->momentum().phi() << " pxyz ("
577  << (*p)->momentum().px() << ", " << (*p)->momentum().py() << ", "
578  << (*p)->momentum().pz() << ")";
579  if (addP_) {
580  pxyz.setPx(pxyz.px() + (*p)->momentum().px());
581  pxyz.setPy(pxyz.py() + (*p)->momentum().py());
582  pxyz.setPz(pxyz.pz() + (*p)->momentum().pz());
583  pxyz.setE(pxyz.e() + (*p)->momentum().e());
584  } else if (!addP_ && (k == 0)) {
585  pxyz = (*p)->momentum();
586  }
587  }
588  hBeam_->Fill(pxyz.rho());
589  edm::LogVerbatim("HGCSim") << "Particle with p " << pxyz.rho() << " theta " << pxyz.theta() << " phi "
590  << pxyz.phi();
591  }
592 
593  // Now the Simhits
594  if (doSimHits_) {
596  iEvent.getByToken(tok_simTk_, SimTk);
598  iEvent.getByToken(tok_simVtx_, SimVtx);
599  analyzeSimTracks(SimTk, SimVtx);
600 
601  simHitLayEn1EE_.clear();
602  simHitLayEn2EE_.clear();
603  simHitLayEn1FH_.clear();
604  simHitLayEn2FH_.clear();
605  simHitLayEn1BH_.clear();
606  simHitLayEn2BH_.clear();
607  simHitLayEnBeam_.clear();
608  simHitCellIdEE_.clear();
609  simHitCellEnEE_.clear();
610  simHitCellIdFH_.clear();
611  simHitCellEnFH_.clear();
612  simHitCellIdBH_.clear();
613  simHitCellEnBH_.clear();
614  simHitCellIdBeam_.clear();
615  simHitCellEnBeam_.clear();
616  simHitCellColBH_.clear();
617  simHitCellRowBH_.clear();
618  simHitCellLayerBH_.clear();
620  simHitCellTime15MipEE_.clear();
621  simHitCellTimeLastHitEE_.clear();
623  simHitCellTime15MipFH_.clear();
624  simHitCellTimeLastHitFH_.clear();
625  edm::Handle<edm::PCaloHitContainer> theCaloHitContainers;
626  std::vector<PCaloHit> caloHits;
627  if (ifEE_) {
628  simHitLayEn1EE_ = std::vector<float>(hgcons_[0]->layers(false), 0);
629  simHitLayEn2EE_ = std::vector<float>(hgcons_[0]->layers(true), 0);
630  iEvent.getByToken(tok_hitsEE_, theCaloHitContainers);
631  if (theCaloHitContainers.isValid()) {
632 #ifdef EDM_ML_DEBUG
633  edm::LogVerbatim("HGCSim") << "PcalohitContainer for " << detectorEE_ << " has " << theCaloHitContainers->size()
634  << " hits";
635 #endif
636  caloHits.clear();
637  caloHits.insert(caloHits.end(), theCaloHitContainers->begin(), theCaloHitContainers->end());
638  analyzeSimHits(0, caloHits, zFrontEE_);
639  } else {
640 #ifdef EDM_ML_DEBUG
641  edm::LogVerbatim("HGCSim") << "PCaloHitContainer does not exist for " << detectorEE_ << " !!!";
642 #endif
643  }
644  }
645  if (ifFH_) {
646  simHitLayEn1FH_ = std::vector<float>(hgcons_[1]->layers(false), 0);
647  simHitLayEn2FH_ = std::vector<float>(hgcons_[1]->layers(true), 0);
648  iEvent.getByToken(tok_hitsFH_, theCaloHitContainers);
649  if (theCaloHitContainers.isValid()) {
650 #ifdef EDM_ML_DEBUG
651  edm::LogVerbatim("HGCSim") << "PcalohitContainer for " << detectorFH_ << " has " << theCaloHitContainers->size()
652  << " hits";
653 #endif
654  caloHits.clear();
655  caloHits.insert(caloHits.end(), theCaloHitContainers->begin(), theCaloHitContainers->end());
656  analyzeSimHits(1, caloHits, zFrontFH_);
657  } else {
658 #ifdef EDM_ML_DEBUG
659  edm::LogVerbatim("HGCSim") << "PCaloHitContainer does not exist for " << detectorFH_ << " !!!";
660 #endif
661  }
662  }
663  if (ifBH_) {
664  simHitLayEn1BH_ = std::vector<float>(ahcalGeom_->maxDepth(), 0);
665  simHitLayEn2BH_ = std::vector<float>(ahcalGeom_->maxDepth(), 0);
666  iEvent.getByToken(tok_hitsBH_, theCaloHitContainers);
667  if (theCaloHitContainers.isValid()) {
668 #ifdef EDM_ML_DEBUG
669  edm::LogVerbatim("HGCSim") << "PcalohitContainer for " << detectorBH_ << " has " << theCaloHitContainers->size()
670  << " hits";
671 #endif
672  caloHits.clear();
673  caloHits.insert(caloHits.end(), theCaloHitContainers->begin(), theCaloHitContainers->end());
674  analyzeSimHits(2, caloHits, zFrontBH_);
675  } else {
676 #ifdef EDM_ML_DEBUG
677  edm::LogVerbatim("HGCSim") << "PCaloHitContainer does not exist for " << detectorBH_ << " !!!";
678 #endif
679  }
680  }
681  if (ifBeam_) {
682  simHitLayEnBeam_ = std::vector<float>(idBeams_.size(), 0);
683  iEvent.getByToken(tok_hitsBeam_, theCaloHitContainers);
684  if (theCaloHitContainers.isValid()) {
685 #ifdef EDM_ML_DEBUG
686  edm::LogVerbatim("HGCSim") << "PcalohitContainer for " << detectorBeam_ << " has "
687  << theCaloHitContainers->size() << " hits";
688 #endif
689  caloHits.clear();
690  caloHits.insert(caloHits.end(), theCaloHitContainers->begin(), theCaloHitContainers->end());
691  analyzeSimHits(3, caloHits, 0.0);
692  } else {
693 #ifdef EDM_ML_DEBUG
694  edm::LogVerbatim("HGCSim") << "PCaloHitContainer does not exist for " << detectorBeam_ << " !!!";
695 #endif
696  }
697  }
698  } // if (doSimHits_)
699 
701  if (doPassive_) {
703  hgcPassiveEEEnergy_.clear();
704  hgcPassiveEEName_.clear();
705  hgcPassiveEEID_.clear();
706  if (doPassiveEE_) {
708  iEvent.getByToken(tok_hgcPHEE_, hgcPHEE);
709  analyzePassiveHits(hgcPHEE, 1);
710  }
712  hgcPassiveFHEnergy_.clear();
713  hgcPassiveFHName_.clear();
714  hgcPassiveFHID_.clear();
715  if (doPassiveHE_) {
717  iEvent.getByToken(tok_hgcPHFH_, hgcPHFH);
718  analyzePassiveHits(hgcPHFH, 2);
719  }
721  hgcPassiveBHEnergy_.clear();
722  hgcPassiveBHName_.clear();
723  hgcPassiveBHID_.clear();
724  if (doPassiveBH_) {
726  iEvent.getByToken(tok_hgcPHBH_, hgcPHBH);
727  analyzePassiveHits(hgcPHBH, 3);
728  }
730  hgcPassiveCMSEEnergy_.clear();
731  hgcPassiveCMSEName_.clear();
732  hgcPassiveCMSEID_.clear();
734  iEvent.getByToken(tok_hgcPHCMSE_, hgcPHCMSE);
735  analyzePassiveHits(hgcPHCMSE, 4);
737  hgcPassiveBeamName_.clear();
738  hgcPassiveBeamEnergy_.clear();
739  hgcPassiveBeamID_.clear();
741  iEvent.getByToken(tok_hgcPHBeam_, hgcPHBeam);
742  analyzePassiveHits(hgcPHBeam, 5);
743  }
744 
745  if ((doSimHits_ || doPassive_) && (doTree_))
746  tree_->Fill();
747 
748  // Now the Digis
749  if (doDigis_) {
750  if (ifEE_) {
751  edm::Handle<HGCalDigiCollection> theDigiContainers;
752  iEvent.getByToken(tok_digiEE_, theDigiContainers);
753  if (theDigiContainers.isValid()) {
754 #ifdef EDM_ML_DEBUG
755  edm::LogVerbatim("HGCSim") << "HGCDigiCintainer for " << detectorEE_ << " with " << theDigiContainers->size()
756  << " element(s)";
757 #endif
758  for (const auto& it : *theDigiContainers) {
759  HGCalDetId detId = (it.id());
760  const HGCSample& hgcSample = it.sample(sampleIndex_);
761  uint16_t adc = hgcSample.data();
762  analyzeDigi(0, detId, adc);
763  }
764  }
765  }
766  if (ifFH_) {
767  edm::Handle<HGCalDigiCollection> theDigiContainers;
768  iEvent.getByToken(tok_digiFH_, theDigiContainers);
769  if (theDigiContainers.isValid()) {
770 #ifdef EDM_ML_DEBUG
771  edm::LogVerbatim("HGCSim") << "HGCDigiContainer for " << detectorFH_ << " with " << theDigiContainers->size()
772  << " element(s)";
773 #endif
774  for (const auto& it : *theDigiContainers) {
775  HGCalDetId detId = (it.id());
776  const HGCSample& hgcSample = it.sample(sampleIndex_);
777  uint16_t adc = hgcSample.data();
778  analyzeDigi(1, detId, adc);
779  }
780  }
781  }
782  }
783 
784  // The Rechits
785  if (doRecHits_) {
786  edm::Handle<HGCRecHitCollection> theCaloHitContainers;
787  if (ifEE_) {
788  iEvent.getByToken(tok_hitrEE_, theCaloHitContainers);
789  if (theCaloHitContainers.isValid()) {
790 #ifdef EDM_ML_DEBUG
791  edm::LogVerbatim("HGCSim") << "HGCRecHitCollection for " << detectorEE_ << " has "
792  << theCaloHitContainers->size() << " hits";
793 #endif
794  analyzeRecHits(0, theCaloHitContainers);
795  } else {
796 #ifdef EDM_ML_DEBUG
797  edm::LogVerbatim("HGCSim") << "HGCRecHitCollection does not exist for " << detectorEE_ << " !!!";
798 #endif
799  }
800  }
801  if (ifFH_) {
802  iEvent.getByToken(tok_hitrFH_, theCaloHitContainers);
803  if (theCaloHitContainers.isValid()) {
804 #ifdef EDM_ML_DEBUG
805  edm::LogVerbatim("HGCSim") << "HGCRecHitCollection for " << detectorFH_ << " has "
806  << theCaloHitContainers->size() << " hits";
807 #endif
808  analyzeRecHits(1, theCaloHitContainers);
809  } else {
810 #ifdef EDM_ML_DEBUG
811  edm::LogVerbatim("HGCSim") << "HGCRecHitCollection does not exist for " << detectorFH_ << " !!!";
812 #endif
813  } // else
814  } // if (ifFH_)
815  } // if (doRecHits_)
816 
817 } // void HGCalTBAnalyzer::analyze
818 
819 void HGCalTBAnalyzer::analyzeSimHits(int type, std::vector<PCaloHit>& hits, double zFront) {
820  std::map<uint32_t, double> map_hits, map_hitn;
821  std::map<uint32_t, double> map_hittime_firsthit, map_hittime_lasthit, map_hittime_15Mip;
822  std::map<int, double> map_hitDepth, map_hitWafer;
823  std::map<int, std::pair<uint32_t, double>> map_hitLayer, map_hitCell;
824  double entot(0);
825  std::map<uint32_t, double> nhits;
826  std::map<uint32_t, int> ID, Depth;
827  std::map<uint32_t, double> GeV2Mip;
828  std::map<uint32_t, double> StochTermTime;
829  std::vector<int> nSimLayers;
831  std::map<uint32_t, std::vector<std::pair<double, double>>> map_hitTimeEn;
832  //bool debug = true;
833  bool debug = false;
834  for (unsigned int i = 0; i < hits.size(); i++) {
835  double energy = hits[i].energy();
836  double time = hits[i].time();
837  uint32_t id = hits[i].id();
838  entot += energy;
839  int subdet, zside, layer, sector, subsector(0), cell, depth(0), idx(0);
840  if (type == 2) {
841  subdet = HcalDetId(id).subdet();
842  if (subdet != HcalOther)
843  continue;
844  AHCalDetId hid(id);
845  layer = depth = hid.depth();
846  zside = hid.zside();
847  sector = hid.irow();
848  cell = hid.icol();
849  idx = ((hid.irowAbs() * 100) + (hid.icolAbs()));
850  if (debug)
851  edm::LogVerbatim("HGCSim") << "depth, sector, cell " << depth << ":" << sector << ":" << cell;
852  } else if (type == 3) {
853  HcalTestBeamNumbering::unpackIndex(id, subdet, layer, sector, cell);
854  depth = layer;
855  zside = 1;
856  idx = subdet * 1000 + layer;
857  layer = idx;
858  } else {
859  HGCalTestNumbering::unpackHexagonIndex(id, subdet, zside, layer, sector, subsector, cell);
860  depth = hgcons_[type]->simToReco(cell, layer, sector, true).second;
861  idx = sector * 1000 + cell;
862 #ifdef EDM_ML_DEBUG
863  std::pair<float, float> xy = hgcons_[type]->locateCell(cell, layer, sector, false);
864  edm::LogVerbatim("HGCSim") << "HGCalTBAnalyzer::detId " << std::hex << id << std::dec << " Layer:Wafer:Cell "
865  << layer << ":" << sector << ":" << cell << " Position " << xy.first << ":"
866  << xy.second << ":" << hgcons_[type]->waferZ(layer, false);
867 #endif
868  }
869 #ifdef EDM_ML_DEBUG
870  edm::LogVerbatim("HGCSim") << "SimHit:Hit[" << i << "] Id " << subdet << ":" << zside << ":" << layer << ":"
871  << sector << ":" << subsector << ":" << cell << ":" << depth << " Energy " << energy
872  << " Time " << time;
873 #endif
874  if (map_hits.count(id) != 0) {
875  map_hits[id] += energy;
876  } else {
877  map_hits[id] = energy;
878  }
879  if (map_hitLayer.count(layer) != 0) {
880  double ee = energy + map_hitLayer[layer].second;
881  map_hitLayer[layer] = std::make_pair(id, ee);
882  } else {
883  map_hitLayer[layer] = std::make_pair(id, energy);
884  }
885  if (map_hitWafer.count(sector) != 0)
886  map_hitWafer[sector] += energy;
887  else
888  map_hitWafer[sector] = energy;
889  if (depth >= 0) {
890  if (map_hitCell.count(idx) != 0) {
891  double ee = energy + map_hitCell[idx].second;
892  map_hitCell[idx] = std::make_pair(id, ee);
893  } else {
894  map_hitCell[idx] = std::make_pair(id, energy);
895  }
896  if (debug) {
897  if (type == 1)
898  edm::LogVerbatim("HGCSim") << "EE, depth is and map_hitDepth[depth] " << depth << " " << map_hitDepth[depth];
899  if (type == 2)
900  edm::LogVerbatim("HGCSim") << "BH, depth is and map_hitDepth[depth] " << depth << " " << map_hitDepth[depth];
901  }
902  if (map_hitDepth.count(depth) != 0) {
903  map_hitDepth[depth] += energy;
904  } else {
905  map_hitDepth[depth] = energy;
906  }
907  uint32_t idn =
908  (type >= 2) ? id : HGCalTestNumbering::packHexagonIndex(subdet, zside, depth, sector, subsector, cell);
909  map_hitTimeEn[idn].push_back(std::make_pair(time, energy));
910  GeV2Mip[idn] = gev2mip300_;
911  StochTermTime[idn] = stoc_smear_time_300_;
912  ID[idn] = id;
913  Depth[idn] = depth;
914  if (map_hitn.count(idn) != 0) {
915  map_hitn[idn] += energy;
916  ++nhits[idn];
917  } else {
918  map_hitn[idn] = energy;
919  nhits[idn] = 1;
920  }
921  }
922  hSimHitT_[type]->Fill(time, energy);
923  }
924 
925  if (type < 2) { //store only for EE and FH
926  edm::LogVerbatim("HGCSim") << "HGCalTAnalyzer:: " << map_hitWafer.size() << " wafers are hit in type " << type;
927  for (auto itr = map_hitWafer.begin(); itr != map_hitWafer.end(); ++itr)
928  edm::LogVerbatim("HGCSim") << "Wafer: " << itr->first << " Deposited Energy " << itr->second;
930  for (const auto& itr : map_hitTimeEn) {
931  uint32_t id = itr.first;
932  int wafer = -99;
934  wafer = HGCalDetId(ID[id]).wafer();
935  double layer = HGCalDetId(id).layer();
936  double thickness = hgcons_[type]->cellThickness(layer, wafer, 0);
937  if (debug)
938  edm::LogVerbatim("HGCSim") << "wafer is : depth (reco) " << wafer << " " << Depth[id]
939  << "\ntype : layer : wafer thickness " << type << " " << layer << " " << thickness
940  << "\nID(sim) and id(reco) " << std::hex << ID[id] << " " << id << std::dec;
941  if (thickness == 300) {
942  GeV2Mip[id] = gev2mip300_;
943  StochTermTime[id] = stoc_smear_time_300_;
944  } else if (thickness == 200) {
945  GeV2Mip[id] = gev2mip200_;
946  StochTermTime[id] = stoc_smear_time_200_;
947  }
948  //first sort
949  std::sort(map_hitTimeEn[id].begin(), map_hitTimeEn[id].end(), sortTime);
951  double threshold = 15.;
952  double totE = 0.;
953  double totEbeforeThreshold = 0.;
954  double timebeforeThreshold = 0.;
955  double timeAtThresohld = 0.;
956  for (unsigned int ihit = 0; ihit < map_hitTimeEn[id].size(); ihit++) {
957  double energy = (map_hitTimeEn[id].at(ihit)).second / GeV2Mip[id];
958  totE += energy;
959  double time = (map_hitTimeEn[id].at(ihit)).first;
960  if (debug)
961  edm::LogVerbatim("HGCSim") << "Tot E till now : time of that E : GeV2Mip[id] is " << totE << " " << time
962  << " " << GeV2Mip[id];
963  if (totE < threshold) {
964  totEbeforeThreshold = totE;
965  timebeforeThreshold = time;
966  } else {
967  timeAtThresohld =
968  (threshold - totEbeforeThreshold) * (time - timebeforeThreshold) / (totE - totEbeforeThreshold) +
969  timebeforeThreshold;
970  map_hittime_15Mip[id] = timeAtThresohld;
971  if (debug)
972  edm::LogVerbatim("HGCSim") << "ihit : energyBefore : timeBefore : energyTot : timeTot : timeAt15MIP "
973  << ihit << " " << totEbeforeThreshold << " " << timebeforeThreshold << " "
974  << totE << " " << time << " " << map_hittime_15Mip[id];
975  break;
976  }
977  }
978  if (!map_hitTimeEn[id].empty()) {
979  map_hittime_firsthit[id] = (map_hitTimeEn[id].at(0)).first;
980  map_hittime_lasthit[id] = (map_hitTimeEn[id].at(map_hitTimeEn[id].size() - 1)).first;
981  if (map_hittime_15Mip[id] < map_hittime_firsthit[id])
982  map_hittime_15Mip[id] = map_hittime_firsthit[id];
983  /*
985  double firsthit_sm = ran3.Gaus(map_hittime_firsthit_vtxCorr[id], StochTermTime[id]);
986  double lasthit_sm = ran3.Gaus(map_hittime_lasthit_vtxCorr[id], StochTermTime[id]);
987  double threshmiphit_sm = ran3.Gaus(map_hittime_15Mip_vtxCorr[id], StochTermTime[id]);
988  */
989  }
990 
991  if (totE < threshold)
992  map_hittime_15Mip[id] = -99;
993  if (debug)
994  edm::LogVerbatim("HGCSim") << "id : first hit time : last hit time " << id << " " << map_hittime_firsthit[id]
995  << " " << map_hittime_lasthit[id] << "\nFinally for this cell, time is "
996  << map_hittime_15Mip[id];
997  }
998  }
999 
1000  hSimHitEn_[type]->Fill(entot);
1001  for (const auto& itr : map_hits) {
1002  hSimHitE_[type]->Fill(itr.second);
1003  }
1004 
1005  if (debug)
1006  edm::LogVerbatim("HGCSim") << "Now looping over map_hitLayer";
1007  for (const auto& itr : map_hitLayer) {
1008  int layer = (type == 2) ? itr.first : (itr.first - 1);
1009  double energy = (itr.second).second;
1010  double zp(0);
1011  if (type < 2)
1012  zp = hgcons_[type]->waferZ(layer + 1, false);
1013  else if (type == 2)
1014  zp = ahcalGeom_->getZ(AHCalDetId((itr.second).first));
1015 #ifdef EDM_ML_DEBUG
1016  edm::LogVerbatim("HGCSim") << "SimHit:Layer " << layer + 1 << " Z " << zp << ":" << zp - zFront << " E " << energy;
1017 #endif
1018  if (type < 3) {
1019  hSimHitLng_[type]->Fill(zp - zFront, energy);
1020  hSimHitLng2_[type]->Fill(layer + 1, energy);
1021  }
1022  if (type == 0) {
1023  if (layer < static_cast<int>(hSimHitLayEn1EE_.size())) {
1025  hSimHitLayEn1EE_[layer]->Fill(energy);
1026  }
1027  } else if (type == 1) {
1028  if (layer < static_cast<int>(hSimHitLayEn1FH_.size())) {
1030  hSimHitLayEn1FH_[layer]->Fill(energy);
1031  }
1032  } else if (type == 2) {
1033  if (debug)
1034  edm::LogVerbatim("HGCSim") << "layer < hSimHitLayEn1BH_.size()";
1035  if (layer < static_cast<int>(hSimHitLayEn1BH_.size())) {
1037  hSimHitLayEn1BH_[layer]->Fill(energy);
1038  }
1039  } else {
1040  for (unsigned int k = 0; k < idBeams_.size(); ++k) {
1041  if (layer + 1 == idBeams_[k]) {
1043  hSimHitLayEnBeam_[k]->Fill(energy);
1044  break;
1045  }
1046  }
1047  }
1048  }
1049  for (const auto& itr : map_hitDepth) {
1050  int layer = (type == 2) ? itr.first : (itr.first - 1);
1051  double energy = itr.second;
1052 #ifdef EDM_ML_DEBUG
1053  edm::LogVerbatim("HGCSim") << "SimHit:Layer " << layer + 1 << " " << energy;
1054 #endif
1055  hSimHitLng1_[type]->Fill(layer + 1, energy);
1056  if (type == 0) {
1057  if (layer < static_cast<int>(hSimHitLayEn2EE_.size())) {
1059  hSimHitLayEn2EE_[layer]->Fill(energy);
1060  }
1061  } else if (type == 1) {
1062  if (layer < static_cast<int>(hSimHitLayEn2FH_.size())) {
1064  hSimHitLayEn2FH_[layer]->Fill(energy);
1065  }
1066  } else if (type == 2) {
1067  if (debug)
1068  edm::LogVerbatim("HGCSim") << "Inside map_hitDepth, layer no. " << layer;
1069  if (layer < static_cast<int>(hSimHitLayEn2BH_.size())) {
1071  hSimHitLayEn2BH_[layer]->Fill(energy);
1072  }
1073  }
1074  }
1075 
1076  if (debug)
1077  edm::LogVerbatim("HGCSim") << "Now looping over map_hitCell";
1078  if (type < 3) {
1079  for (const auto& itr : map_hitCell) {
1080  uint32_t id = ((itr.second).first);
1081  double energy = ((itr.second).second);
1082  std::pair<float, float> xy(0, 0);
1083  double xx(0);
1084  if (type == 2) {
1085  xy = ahcalGeom_->getXY(AHCalDetId(id));
1086  xx = xy.first;
1087  } else {
1088  int subdet, zside, layer, sector, subsector, cell;
1089  HGCalTestNumbering::unpackHexagonIndex(id, subdet, zside, layer, sector, subsector, cell);
1090  xy = hgcons_[type]->locateCell(cell, layer, sector, false);
1091  double zp = hgcons_[type]->waferZ(layer, false);
1092  xx = (zp < 0) ? -xy.first : xy.first;
1093  }
1094  hSimHitLat_[type]->Fill(xx, xy.second, energy);
1095  }
1096  }
1097 
1098  for (const auto& itr : map_hitn) {
1099  uint32_t id = itr.first;
1100  double energy = itr.second;
1101  if (type == 0) {
1102  double time_firsthit = map_hittime_firsthit[id];
1103  double time15Mip = map_hittime_15Mip[id];
1104  double time_lasthit = map_hittime_lasthit[id];
1105  simHitCellIdEE_.push_back(id);
1106  simHitCellEnEE_.push_back(energy);
1107  simHitCellTimeFirstHitEE_.push_back(time_firsthit);
1108  simHitCellTime15MipEE_.push_back(time15Mip);
1109  simHitCellTimeLastHitEE_.push_back(time_lasthit);
1110  if (debug && (energy / GeV2Mip[id] < 15) && (map_hittime_15Mip[id] > 0))
1111  edm::LogVerbatim("HGCSim") << "FOUND!!!!rechit energy : Finally for this cell, time is " << energy / GeV2Mip[id]
1112  << " " << map_hittime_15Mip[id];
1113  } else if (type == 1) {
1114  double time_firsthit = map_hittime_firsthit[id];
1115  double time15Mip = map_hittime_15Mip[id];
1116  double time_lasthit = map_hittime_lasthit[id];
1117  simHitCellIdFH_.push_back(id);
1118  simHitCellEnFH_.push_back(energy);
1119  simHitCellTimeFirstHitFH_.push_back(time_firsthit);
1120  simHitCellTime15MipFH_.push_back(time15Mip);
1121  simHitCellTimeLastHitFH_.push_back(time_lasthit);
1122  } else if (type == 2) {
1123  simHitCellIdBH_.push_back(id);
1124  simHitCellEnBH_.push_back(energy);
1125  AHCalDetId hid(id);
1126  int row = hid.irow();
1127  int col = hid.icol();
1128  int layer = hid.depth();
1129  simHitCellColBH_.push_back(col);
1130  simHitCellRowBH_.push_back(row);
1131  simHitCellLayerBH_.push_back(layer);
1132 #ifdef EDM_ML_DEBUG
1133  edm::LogVerbatim("HGCSim") << "ID: " << std::hex << id << std::dec << " Layer: " << layer << " col: " << col
1134  << " row: " << row;
1135 #endif
1136  } else if (type == 3) {
1137  simHitCellIdBeam_.push_back(id);
1138  simHitCellEnBeam_.push_back(energy);
1139  }
1140  }
1141 }
1142 
1144  edm::Handle<edm::SimVertexContainer> const& SimVtx) {
1145  xBeam_ = yBeam_ = zBeam_ = pBeam_ = -9999;
1146  nBeamMC_ = thetaBeam_ = phiBeam_ = -9999;
1147  int nParBeam = 0;
1148  int vertIndex(-1);
1149  if (doBeam_) {
1150  pdgIdBeamMC_.clear();
1151  xBeamMC_.clear();
1152  yBeamMC_.clear();
1153  zBeamMC_.clear();
1154  pxBeamMC_.clear();
1155  pyBeamMC_.clear();
1156  pzBeamMC_.clear();
1157  pBeamMC_.clear();
1158  }
1159  std::vector<float> verX, verY, verZ;
1160  verX.clear();
1161  verY.clear();
1162  verZ.clear();
1163  for (const auto& simVtxItr : *SimVtx) {
1164  verX.push_back(simVtxItr.position().X());
1165  verY.push_back(simVtxItr.position().Y());
1166  verZ.push_back(simVtxItr.position().Z());
1167  }
1168 #ifdef EDM_ML_DEBUG
1169  edm::LogVerbatim("HGCSim") << "Size of track " << SimTk->size();
1170 #endif
1171  HepMC::FourVector pxyz(0, 0, 0, 0);
1172  for (const auto& simTrkItr : *SimTk) {
1173  if (addP_ && !(simTrkItr.noGenpart())) {
1174  pxyz.setPx(pxyz.px() + simTrkItr.momentum().px());
1175  pxyz.setPy(pxyz.py() + simTrkItr.momentum().py());
1176  pxyz.setPz(pxyz.pz() + simTrkItr.momentum().pz());
1177  pxyz.setE(pxyz.e() + simTrkItr.momentum().e());
1178 #ifdef EDM_ML_DEBUG
1179  edm::LogVerbatim("HGCSim") << "Track " << simTrkItr.trackId() << " Vertex " << simTrkItr.vertIndex() << " Type "
1180  << simTrkItr.type() << " Charge " << simTrkItr.charge() << " px "
1181  << simTrkItr.momentum().px() << " py " << simTrkItr.momentum().py() << " pz "
1182  << simTrkItr.momentum().pz() << " P " << simTrkItr.momentum().P() << " GenIndex "
1183  << simTrkItr.genpartIndex();
1184  edm::LogVerbatim("HGCSim") << "Vertex " << simTrkItr.vertIndex()
1185  << " position-> X: " << verX[simTrkItr.vertIndex()]
1186  << " Y: " << verY[simTrkItr.vertIndex()] << " Z: " << verZ[simTrkItr.vertIndex()];
1187 #endif
1188  }
1189  if (doBeam_ && !(simTrkItr.noGenpart())) {
1190  nParBeam++;
1191  pdgIdBeamMC_.push_back(simTrkItr.type());
1192  xBeamMC_.push_back(verX[simTrkItr.vertIndex()]);
1193  yBeamMC_.push_back(verY[simTrkItr.vertIndex()]);
1194  zBeamMC_.push_back(verZ[simTrkItr.vertIndex()]);
1195  pxBeamMC_.push_back(simTrkItr.momentum().px());
1196  pyBeamMC_.push_back(simTrkItr.momentum().py());
1197  pzBeamMC_.push_back(simTrkItr.momentum().pz());
1198  pBeamMC_.push_back(simTrkItr.momentum().P());
1199  } else if (!addP_ && (vertIndex == -1)) {
1200  pxyz = simTrkItr.momentum();
1201  }
1202  if (vertIndex == -1)
1203  vertIndex = simTrkItr.vertIndex();
1204  }
1205  nBeamMC_ = nParBeam;
1206  pBeam_ = pxyz.rho();
1207  thetaBeam_ = pxyz.theta();
1208  phiBeam_ = pxyz.phi();
1209  if (phiBeam_ < 0)
1210  phiBeam_ += (2 * M_PI);
1211  if (vertIndex != -1 && vertIndex < static_cast<int>(SimVtx->size())) {
1212  edm::SimVertexContainer::const_iterator simVtxItr = SimVtx->begin();
1213  for (int iv = 0; iv < vertIndex; iv++)
1214  simVtxItr++;
1215  edm::LogVerbatim("HGCSim") << "Vertex " << vertIndex << " position " << simVtxItr->position();
1216  xBeam_ = verX[0];
1217  yBeam_ = verY[0];
1218  zBeam_ = verZ[0];
1219  }
1220 }
1221 
1222 template <class T1>
1223 void HGCalTBAnalyzer::analyzeDigi(int type, const T1& detId, uint16_t adc) {
1224  DetId id1 = DetId(detId.rawId());
1225  GlobalPoint global = hgeom_[type]->getPosition(id1);
1226  hDigiOcc_[type]->Fill(global.x(), global.y());
1227  hDigiLng_[type]->Fill(global.z());
1228  hDigiADC_[type]->Fill(adc);
1229 }
1230 
1232  std::map<int, double> map_hitLayer;
1233  std::map<int, std::pair<DetId, double>> map_hitCell;
1234  for (const auto& it : *hits) {
1235  DetId detId = it.id();
1236  GlobalPoint global = hgeom_[type]->getPosition(detId);
1237  double energy = it.energy();
1238  int layer = HGCalDetId(detId).layer();
1239  int cell = HGCalDetId(detId).cell();
1240 #ifdef EDM_ML_DEBUG
1241  edm::LogVerbatim("HGCSim") << "Layer thickness " << hgcons_[type]->waferTypeL(HGCalDetId(detId).wafer());
1242 #endif
1243  hRecHitOcc_[type]->Fill(global.x(), global.y(), energy);
1244  hRecHitE_[type]->Fill(energy);
1245  if (map_hitLayer.count(layer) != 0) {
1246  map_hitLayer[layer] += energy;
1247  } else {
1248  map_hitLayer[layer] = energy;
1249  }
1250  if (map_hitCell.count(cell) != 0) {
1251  double ee = energy + map_hitCell[cell].second;
1252  map_hitCell[cell] = std::pair<uint32_t, double>(detId, ee);
1253  } else {
1254  map_hitCell[cell] = std::pair<uint32_t, double>(detId, energy);
1255  }
1256 #ifdef EDM_ML_DEBUG
1257  edm::LogVerbatim("HGCSim") << "RecHit: " << layer << " " << global.x() << " " << global.y() << " " << global.z()
1258  << " " << energy;
1259 #endif
1260  }
1261 
1262  for (const auto& itr : map_hitLayer) {
1263  int layer = itr.first;
1264  double energy = itr.second;
1265  double zp = hgcons_[type]->waferZ(layer, true);
1266 #ifdef EDM_ML_DEBUG
1267  edm::LogVerbatim("HGCSim") << "SimHit:Layer " << layer << " " << zp << " " << energy;
1268 #endif
1269  hRecHitLng_[type]->Fill(zp, energy);
1270  hRecHitLng1_[type]->Fill(layer, energy);
1271  }
1272 
1273  for (const auto& itr : map_hitCell) {
1274  DetId detId = ((itr.second).first);
1275  double energy = ((itr.second).second);
1276  GlobalPoint global = hgeom_[type]->getPosition(detId);
1277  hRecHitLat_[type]->Fill(global.x(), global.y(), energy);
1278  }
1279 }
1280 
1282  for (const auto& v : *hgcPH) {
1283  double energy = v.energy();
1284  std::string name = v.vname();
1285  unsigned int id = v.id();
1286 #ifdef EDM_ML_DEBUG
1287  double time = v.time();
1288  edm::LogVerbatim("HGCSim") << "HGCalTBAnalyzer::analyzePassiveHits:Energy:"
1289  << "Time:Name:Id : " << energy << ":" << time << ":" << name << ":" << id;
1290 #endif
1291 
1292  if (subdet == 1) {
1293  hgcPassiveEEEnergy_.push_back(energy);
1294  hgcPassiveEEName_.push_back(name);
1295  hgcPassiveEEID_.push_back(id);
1296  } else if (subdet == 2) {
1297  hgcPassiveFHEnergy_.push_back(energy);
1298  hgcPassiveFHName_.push_back(name);
1299  hgcPassiveFHID_.push_back(id);
1300  } else if (subdet == 3) {
1301  hgcPassiveBHEnergy_.push_back(energy);
1302  hgcPassiveBHName_.push_back(name);
1303  hgcPassiveBHID_.push_back(id);
1304  } else if (subdet == 4) {
1305  hgcPassiveCMSEEnergy_.push_back(energy);
1306  hgcPassiveCMSEName_.push_back(name);
1307  hgcPassiveCMSEID_.push_back(id);
1308  } else if (subdet == 5) {
1309  hgcPassiveBeamEnergy_.push_back(energy);
1310  hgcPassiveBeamName_.push_back(name);
1311  hgcPassiveBeamID_.push_back(id);
1312  }
1313  }
1314 }
1315 
1316 bool HGCalTBAnalyzer::sortTime(const std::pair<double, double>& i, const std::pair<double, double>& j) {
1317  return i.first < j.first;
1318 }
1319 
1320 // define this as a plug-in
ConfigurationDescriptions.h
HcalOther
Definition: HcalAssistant.h:38
HGCalTBAnalyzer::ifBH_
const bool ifBH_
Definition: HGCalTBAnalyzer.cc:79
HGCalTBAnalyzer::ifBeam_
const bool ifBeam_
Definition: HGCalTBAnalyzer.cc:79
HGCalTBAnalyzer::tok_hgcPHBeam_
edm::EDGetTokenT< edm::PassiveHitContainer > tok_hgcPHBeam_
Definition: HGCalTBAnalyzer.cc:97
HGCalTBAnalyzer::simHitCellTimeLastHitBH_
std::vector< float > simHitCellTimeLastHitBH_
Definition: HGCalTBAnalyzer.cc:127
HGCalTBAnalyzer::simHitLayEn1EE_
std::vector< float > simHitLayEn1EE_
Definition: HGCalTBAnalyzer.cc:116
HGCalTBAnalyzer::hgcPassiveEEName_
std::vector< std::string > hgcPassiveEEName_
Definition: HGCalTBAnalyzer.cc:131
HGCalTBAnalyzer::ifEE_
const bool ifEE_
Definition: HGCalTBAnalyzer.cc:79
HGCalTBAnalyzer::pxBeamMC_
std::vector< float > pxBeamMC_
Definition: HGCalTBAnalyzer.cc:140
runGCPTkAlMap.title
string title
Definition: runGCPTkAlMap.py:94
electrons_cff.bool
bool
Definition: electrons_cff.py:366
EDAnalyzer.h
mps_fire.i
i
Definition: mps_fire.py:428
HGCalTBAnalyzer::doPassiveEE_
const bool doPassiveEE_
Definition: HGCalTBAnalyzer.cc:82
HGCalTBAnalyzer::tok_hitsEE_
edm::EDGetTokenT< edm::PCaloHitContainer > tok_hitsEE_
Definition: HGCalTBAnalyzer.cc:89
edm::ESInputTag
Definition: ESInputTag.h:87
HGCalTBAnalyzer::hSimHitLng_
TProfile * hSimHitLng_[3]
Definition: HGCalTBAnalyzer.cc:108
HGCalTBAnalyzer::doDigis_
const bool doDigis_
Definition: HGCalTBAnalyzer.cc:80
HGCalTBAnalyzer::hgcPassiveCMSEID_
std::vector< int > hgcPassiveCMSEID_
Definition: HGCalTBAnalyzer.cc:133
HGCalTBAnalyzer::hRecHitLat_
TProfile2D * hRecHitLat_[3]
Definition: HGCalTBAnalyzer.cc:111
MessageLogger.h
HGCalTBAnalyzer::tok_hitsBH_
edm::EDGetTokenT< edm::PCaloHitContainer > tok_hitsBH_
Definition: HGCalTBAnalyzer.cc:90
HGCalTBAnalyzer::tok_digiEE_
edm::EDGetToken tok_digiEE_
Definition: HGCalTBAnalyzer.cc:93
electronHcalTowerIsolationLcone_cfi.Depth
Depth
Definition: electronHcalTowerIsolationLcone_cfi.py:9
PassiveHit.h
HGCalTBAnalyzer::simHitCellLayerBH_
std::vector< int > simHitCellLayerBH_
Definition: HGCalTBAnalyzer.cc:124
hfClusterShapes_cfi.hits
hits
Definition: hfClusterShapes_cfi.py:5
AHCalDetId::irow
int irow() const
get the row number
Definition: AHCalDetId.cc:29
HGCalTBAnalyzer::analyzeSimHits
void analyzeSimHits(int type, std::vector< PCaloHit > &hits, double zFront)
Definition: HGCalTBAnalyzer.cc:819
HGCalTBAnalyzer::simHitCellTime15MipEE_
std::vector< float > simHitCellTime15MipEE_
Definition: HGCalTBAnalyzer.cc:126
HGCalTBAnalyzer::simHitCellEnFH_
std::vector< float > simHitCellEnFH_
Definition: HGCalTBAnalyzer.cc:122
PV3DBase::x
T x() const
Definition: PV3DBase.h:59
HGCalTBAnalyzer::gev2mip200_
const double gev2mip200_
Definition: HGCalTBAnalyzer.cc:87
edm::Run
Definition: Run.h:45
ecaldqm::zside
int zside(DetId const &)
Definition: EcalDQMCommonUtils.cc:189
edm::EDGetTokenT< edm::PCaloHitContainer >
HGCalTBAnalyzer::simHitCellRowBH_
std::vector< int > simHitCellRowBH_
Definition: HGCalTBAnalyzer.cc:124
gpuClustering::adc
uint16_t *__restrict__ uint16_t const *__restrict__ adc
Definition: gpuClusterChargeCut.h:20
HGCalTBAnalyzer::zFrontBH_
const double zFrontBH_
Definition: HGCalTBAnalyzer.cc:85
AHCalDetId::icolAbs
int icolAbs() const
Definition: AHCalDetId.h:38
HGCalTBAnalyzer::hgcPassiveBHEnergy_
std::vector< float > hgcPassiveBHEnergy_
Definition: HGCalTBAnalyzer.cc:129
gpuVertexFinder::iv
int32_t *__restrict__ iv
Definition: gpuClusterTracksDBSCAN.h:42
globals_cff.id1
id1
Definition: globals_cff.py:33
cuy.col
col
Definition: cuy.py:1009
HGCalTBAnalyzer::thetaBeam_
double thetaBeam_
Definition: HGCalTBAnalyzer.cc:136
HGCalTestNumbering::unpackHexagonIndex
static void unpackHexagonIndex(const uint32_t &idx, int &subdet, int &z, int &lay, int &wafer, int &celltyp, int &cell)
Definition: HGCalTestNumbering.cc:46
HGCalTBAnalyzer::tok_hitrBH_
edm::EDGetToken tok_hitrBH_
Definition: HGCalTBAnalyzer.cc:94
HGCalDDDConstants::waferZ
double waferZ(int layer, bool reco) const
Definition: HGCalDDDConstants.cc:1412
HGCalTBAnalyzer::detectorBeam_
const std::string detectorBeam_
Definition: HGCalTBAnalyzer.cc:84
HGCalTBAnalyzer::hSimHitLng1_
TProfile * hSimHitLng1_[3]
Definition: HGCalTBAnalyzer.cc:108
HGCalTBAnalyzer::simHitCellTimeLastHitEE_
std::vector< float > simHitCellTimeLastHitEE_
Definition: HGCalTBAnalyzer.cc:127
HLT_FULL_cff.InputTag
InputTag
Definition: HLT_FULL_cff.py:89301
edm::ParameterSetDescription
Definition: ParameterSetDescription.h:52
HGCalTBAnalyzer::hSimHitLat_
TProfile2D * hSimHitLat_[3]
Definition: HGCalTBAnalyzer.cc:111
HGCalTBAnalyzer::tok_hepMC_
edm::EDGetTokenT< edm::HepMCProduct > tok_hepMC_
Definition: HGCalTBAnalyzer.cc:95
HGCalTBAnalyzer::hSimHitLayEn2BH_
std::vector< TH1D * > hSimHitLayEn2BH_
Definition: HGCalTBAnalyzer.cc:114
HGCalTBAnalyzer::doTree_
const bool doTree_
Definition: HGCalTBAnalyzer.cc:81
protons_cff.time
time
Definition: protons_cff.py:35
edm::second
U second(std::pair< T, U > const &p)
Definition: ParameterSet.cc:222
edm::SortedCollection::size
size_type size() const
Definition: SortedCollection.h:215
HcalRecNumberingRecord.h
HGCalTBAnalyzer::endRun
void endRun(edm::Run const &, edm::EventSetup const &) override
Definition: HGCalTBAnalyzer.cc:64
HGCalTBAnalyzer::hgcons_
const HGCalDDDConstants * hgcons_[2]
Definition: HGCalTBAnalyzer.cc:77
HGCalTBAnalyzer
Definition: HGCalTBAnalyzer.cc:54
HGCalTBAnalyzer::~HGCalTBAnalyzer
~HGCalTBAnalyzer() override
Definition: HGCalTBAnalyzer.cc:276
HGCalTBAnalyzer::tree_
TTree * tree_
Definition: HGCalTBAnalyzer.cc:103
HGCalTBAnalyzer::tok_simTk_
edm::EDGetTokenT< edm::SimTrackContainer > tok_simTk_
Definition: HGCalTBAnalyzer.cc:91
HGCalTBAnalyzer::tok_hitrEE_
edm::EDGetToken tok_hitrEE_
Definition: HGCalTBAnalyzer.cc:94
HGCalTBAnalyzer::hgcPassiveBeamEnergy_
std::vector< float > hgcPassiveBeamEnergy_
Definition: HGCalTBAnalyzer.cc:130
HGCalTBAnalyzer::hSimHitLayEn1EE_
std::vector< TH1D * > hSimHitLayEn1EE_
Definition: HGCalTBAnalyzer.cc:112
HGCalTBAnalyzer::ahcalGeom_
std::unique_ptr< AHCalGeometry > ahcalGeom_
Definition: HGCalTBAnalyzer.cc:76
HGCalTBAnalyzer::pBeam_
double pBeam_
Definition: HGCalTBAnalyzer.cc:135
edm::one::EDAnalyzer
Definition: EDAnalyzer.h:30
HGCalTBAnalyzer::hDigiADC_
TH1D * hDigiADC_[3]
Definition: HGCalTBAnalyzer.cc:105
findQualityFiles.v
v
Definition: findQualityFiles.py:179
createJobs.tmp
tmp
align.sh
Definition: createJobs.py:716
HGCalTBAnalyzer::detectorFH_
const std::string detectorFH_
Definition: HGCalTBAnalyzer.cc:83
edm::Handle< edm::SimTrackContainer >
HGCalTBAnalyzer::analyze
void analyze(edm::Event const &, edm::EventSetup const &) override
Definition: HGCalTBAnalyzer.cc:563
HGCalDetId::layer
int layer() const
get the layer #
Definition: HGCalDetId.h:46
HGCalTBAnalyzer::tok_simVtx_
edm::EDGetTokenT< edm::SimVertexContainer > tok_simVtx_
Definition: HGCalTBAnalyzer.cc:92
HGCalTBAnalyzer::hgeom_
const HGCalGeometry * hgeom_[2]
Definition: HGCalTBAnalyzer.cc:78
edm::LogWarning
Log< level::Warning, false > LogWarning
Definition: MessageLogger.h:122
HGCalTBAnalyzer::hSimHitT_
TH1D * hSimHitT_[4]
Definition: HGCalTBAnalyzer.cc:104
HepMC::GenEvent
Definition: hepmc_rootio.cc:9
HGCalDDDConstants
Definition: HGCalDDDConstants.h:27
HGCalTBAnalyzer::hBeam_
TH1D * hBeam_
Definition: HGCalTBAnalyzer.cc:106
HGCalTBAnalyzer::stoc_smear_time_300_
const double stoc_smear_time_300_
Definition: HGCalTBAnalyzer.cc:87
heavyIonCSV_trainingSettings.idx
idx
Definition: heavyIonCSV_trainingSettings.py:5
HGCalTBAnalyzer::analyzeRecHits
void analyzeRecHits(int type, edm::Handle< HGCRecHitCollection > &hits)
Definition: HGCalTBAnalyzer.cc:1231
HGCalTBAnalyzer::simHitCellTime15MipFH_
std::vector< float > simHitCellTime15MipFH_
Definition: HGCalTBAnalyzer.cc:126
PV3DBase::z
T z() const
Definition: PV3DBase.h:61
HGCalTBAnalyzer::simHitCellIdBeam_
std::vector< uint32_t > simHitCellIdBeam_
Definition: HGCalTBAnalyzer.cc:121
HGCalTBAnalyzer::HGCalTBAnalyzer
HGCalTBAnalyzer(edm::ParameterSet const &)
Definition: HGCalTBAnalyzer.cc:143
DetId
Definition: DetId.h:17
HGCalTBAnalyzer::hgcPassiveBHName_
std::vector< std::string > hgcPassiveBHName_
Definition: HGCalTBAnalyzer.cc:131
MakerMacros.h
HGCalTBAnalyzer::tok_hgcPHBH_
edm::EDGetTokenT< edm::PassiveHitContainer > tok_hgcPHBH_
Definition: HGCalTBAnalyzer.cc:97
debug
#define debug
Definition: HDRShower.cc:19
HGCalTBAnalyzer::hgcPassiveEEEnergy_
std::vector< float > hgcPassiveEEEnergy_
Definition: HGCalTBAnalyzer.cc:129
HGCalDDDConstants::simToReco
std::pair< int, int > simToReco(int cell, int layer, int mod, bool half) const
Definition: HGCalDDDConstants.cc:1035
HGCalTBAnalyzer::simHitCellTimeFirstHitFH_
std::vector< float > simHitCellTimeFirstHitFH_
Definition: HGCalTBAnalyzer.cc:125
DEFINE_FWK_MODULE
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
HGCalTBAnalyzer::simHitCellTimeFirstHitEE_
std::vector< float > simHitCellTimeFirstHitEE_
Definition: HGCalTBAnalyzer.cc:125
edm::ConfigurationDescriptions::add
void add(std::string const &label, ParameterSetDescription const &psetDescription)
Definition: ConfigurationDescriptions.cc:57
HGCalTBAnalyzer::hRecHitLng_
TProfile * hRecHitLng_[3]
Definition: HGCalTBAnalyzer.cc:110
HcalTestBeamNumbering.h
Calorimetry_cff.thickness
thickness
Definition: Calorimetry_cff.py:115
HGCalTBAnalyzer::tokDDDEE_
edm::ESGetToken< HGCalDDDConstants, IdealGeometryRecord > tokDDDEE_
Definition: HGCalTBAnalyzer.cc:98
Service.h
HGCalTBAnalyzer::tok_hgcPHCMSE_
edm::EDGetTokenT< edm::PassiveHitContainer > tok_hgcPHCMSE_
Definition: HGCalTBAnalyzer.cc:97
HGCalTBAnalyzer::doRecHits_
const bool doRecHits_
Definition: HGCalTBAnalyzer.cc:80
HGCalTBAnalyzer::simHitLayEn2EE_
std::vector< float > simHitLayEn2EE_
Definition: HGCalTBAnalyzer.cc:116
AHCalDetId::depth
int depth() const
get the layer number
Definition: AHCalDetId.cc:43
HGCalTBAnalyzer::hgcPassiveEEID_
std::vector< int > hgcPassiveEEID_
Definition: HGCalTBAnalyzer.cc:133
AHCalGeometry.h
HGCalTBAnalyzer::simHitCellIdEE_
std::vector< uint32_t > simHitCellIdEE_
Definition: HGCalTBAnalyzer.cc:120
HGCalTBAnalyzer::ifFH_
const bool ifFH_
Definition: HGCalTBAnalyzer.cc:79
HGCalTBAnalyzer::addP_
const bool addP_
Definition: HGCalTBAnalyzer.cc:82
mps_fire.end
end
Definition: mps_fire.py:242
HGCalTBAnalyzer::nBeamMC_
int nBeamMC_
Definition: HGCalTBAnalyzer.cc:137
HGCalTBAnalyzer::hSimHitLayEn2EE_
std::vector< TH1D * > hSimHitLayEn2EE_
Definition: HGCalTBAnalyzer.cc:112
HGCalTBAnalyzer::doPassiveBH_
const bool doPassiveBH_
Definition: HGCalTBAnalyzer.cc:82
HGCalTBAnalyzer::simHitLayEn2BH_
std::vector< float > simHitLayEn2BH_
Definition: HGCalTBAnalyzer.cc:118
AHCalDetId::icol
int icol() const
get the column number
Definition: AHCalDetId.cc:36
HGCalTBAnalyzer::simHitCellEnBH_
std::vector< float > simHitCellEnBH_
Definition: HGCalTBAnalyzer.cc:123
HCALHighEnergyHPDFilter_cfi.energy
energy
Definition: HCALHighEnergyHPDFilter_cfi.py:5
HGCalTBAnalyzer::zBeamMC_
std::vector< float > zBeamMC_
Definition: HGCalTBAnalyzer.cc:139
HGCalTBAnalyzer::simHitCellEnBeam_
std::vector< float > simHitCellEnBeam_
Definition: HGCalTBAnalyzer.cc:123
HGCalTBAnalyzer::hSimHitLayEn1BH_
std::vector< TH1D * > hSimHitLayEn1BH_
Definition: HGCalTBAnalyzer.cc:114
dqmdumpme.k
k
Definition: dqmdumpme.py:60
HGCSample
wrapper for a data word
Definition: HGCSample.h:13
Point3DBase< float, GlobalTag >
nhits
Definition: HIMultiTrackSelector.h:42
HGCalGeometry
Definition: HGCalGeometry.h:29
HGCalTBAnalyzer::tokGeomFH_
edm::ESGetToken< HGCalGeometry, IdealGeometryRecord > tokGeomFH_
Definition: HGCalTBAnalyzer.cc:101
HGCalTBAnalyzer::hSimHitLng2_
TProfile * hSimHitLng2_[3]
Definition: HGCalTBAnalyzer.cc:109
AHCalDetId::irowAbs
int irowAbs() const
Definition: AHCalDetId.h:35
LEDCalibrationChannels.depth
depth
Definition: LEDCalibrationChannels.py:65
first
auto first
Definition: CAHitNtupletGeneratorKernelsImpl.h:125
geometryCSVtoXML.xy
xy
Definition: geometryCSVtoXML.py:19
HGCalTBAnalyzer::hgcPassiveFHEnergy_
std::vector< float > hgcPassiveFHEnergy_
Definition: HGCalTBAnalyzer.cc:129
CaloGeometryRecord.h
edm::ConfigurationDescriptions
Definition: ConfigurationDescriptions.h:28
phase1PixelTopology::layer
constexpr std::array< uint8_t, layerIndexSize > layer
Definition: phase1PixelTopology.h:99
HGCalTBAnalyzer::simHitCellEnEE_
std::vector< float > simHitCellEnEE_
Definition: HGCalTBAnalyzer.cc:122
HGCalTBAnalyzer::simHitCellTime15MipBH_
std::vector< float > simHitCellTime15MipBH_
Definition: HGCalTBAnalyzer.cc:126
AHCalDetId
Definition: AHCalDetId.h:13
TFileService.h
HGCalTBAnalyzer::simHitLayEnBeam_
std::vector< float > simHitLayEnBeam_
Definition: HGCalTBAnalyzer.cc:119
HGCalTBAnalyzer::pdgIdBeamMC_
std::vector< int > pdgIdBeamMC_
Definition: HGCalTBAnalyzer.cc:138
HGCalTBAnalyzer::simHitLayEn1FH_
std::vector< float > simHitLayEn1FH_
Definition: HGCalTBAnalyzer.cc:117
HGCalTBAnalyzer::hgcPassiveFHID_
std::vector< int > hgcPassiveFHID_
Definition: HGCalTBAnalyzer.cc:133
HGCalTBAnalyzer::doPassiveHE_
const bool doPassiveHE_
Definition: HGCalTBAnalyzer.cc:82
HGCalTBAnalyzer::simHitCellTimeLastHitFH_
std::vector< float > simHitCellTimeLastHitFH_
Definition: HGCalTBAnalyzer.cc:127
edm::HandleBase::clear
void clear()
Definition: HandleBase.h:51
HGCRecHitCollections.h
HGCalGeometry.h
edm::ParameterSet
Definition: ParameterSet.h:47
align::ID
uint32_t ID
Definition: Definitions.h:24
AlCaHLTBitMon_ParallelJobs.p
def p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
HGCalTBAnalyzer::tokGeomEE_
edm::ESGetToken< HGCalGeometry, IdealGeometryRecord > tokGeomEE_
Definition: HGCalTBAnalyzer.cc:99
Event.h
HGCalTBAnalyzer::hgcPassiveBeamID_
std::vector< int > hgcPassiveBeamID_
Definition: HGCalTBAnalyzer.cc:133
HGCalTBAnalyzer::zFrontFH_
const double zFrontFH_
Definition: HGCalTBAnalyzer.cc:85
HGCalTBAnalyzer::sampleIndex_
const int sampleIndex_
Definition: HGCalTBAnalyzer.cc:86
HGCalTBAnalyzer::tokDDDFH_
edm::ESGetToken< HGCalDDDConstants, IdealGeometryRecord > tokDDDFH_
Definition: HGCalTBAnalyzer.cc:100
HGCalTBAnalyzer::hgcPassiveCMSEEnergy_
std::vector< float > hgcPassiveCMSEEnergy_
Definition: HGCalTBAnalyzer.cc:129
type
type
Definition: SiPixelVCal_PayloadInspector.cc:39
HGCalTBAnalyzer::simHitCellTimeFirstHitBH_
std::vector< float > simHitCellTimeFirstHitBH_
Definition: HGCalTBAnalyzer.cc:125
jetUpdater_cfi.sort
sort
Definition: jetUpdater_cfi.py:29
HGCalTBAnalyzer::yBeamMC_
std::vector< float > yBeamMC_
Definition: HGCalTBAnalyzer.cc:139
HGCalTBAnalyzer::stoc_smear_time_200_
const double stoc_smear_time_200_
Definition: HGCalTBAnalyzer.cc:87
gainCalibHelper::gainCalibPI::type
type
Definition: SiPixelGainCalibHelper.h:40
HGCalTBAnalyzer::simHitLayEn1BH_
std::vector< float > simHitLayEn1BH_
Definition: HGCalTBAnalyzer.cc:118
HcalTestBeamNumbering::unpackIndex
static void unpackIndex(const uint32_t &idx, int &det, int &lay, int &x, int &y)
Definition: HcalTestBeamNumbering.cc:31
HGCalDDDConstants::layers
unsigned int layers(bool reco) const
Definition: HGCalDDDConstants.cc:577
HcalDetId::subdet
constexpr HcalSubdetector subdet() const
get the subdetector
Definition: HcalDetId.h:138
PV3DBase::y
T y() const
Definition: PV3DBase.h:60
HcalDetId
Definition: HcalDetId.h:12
edm::Service< TFileService >
createfilelist.int
int
Definition: createfilelist.py:10
iEvent
int iEvent
Definition: GenABIO.cc:224
HGCDigiCollections.h
HGCalTBAnalyzer::simHitCellIdBH_
std::vector< uint32_t > simHitCellIdBH_
Definition: HGCalTBAnalyzer.cc:121
AHCalDetId::zside
int zside() const
get the z-side of the cell (1/-1)
Definition: AHCalDetId.h:32
HGCalTBAnalyzer::hDigiLng_
TH1D * hDigiLng_[2]
Definition: HGCalTBAnalyzer.cc:105
M_PI
#define M_PI
Definition: BXVectorInputProducer.cc:49
IdealGeometryRecord.h
HGCalGeometry::getPosition
GlobalPoint getPosition(const DetId &id) const
Definition: HGCalGeometry.cc:198
HGCalDDDConstants::cellThickness
double cellThickness(int layer, int waferU, int waferV) const
Definition: HGCalDDDConstants.cc:220
edm::EventSetup
Definition: EventSetup.h:58
HGCalTBAnalyzer::hgcPassiveFHName_
std::vector< std::string > hgcPassiveFHName_
Definition: HGCalTBAnalyzer.cc:131
edm::HepMCProduct::GetEvent
const HepMC::GenEvent * GetEvent() const
Definition: HepMCProduct.h:37
HGCalTBAnalyzer::hSimHitLayEnBeam_
std::vector< TH1D * > hSimHitLayEnBeam_
Definition: HGCalTBAnalyzer.cc:115
HGCalTBAnalyzer::gev2mip300_
const double gev2mip300_
Definition: HGCalTBAnalyzer.cc:87
HGCalTestNumbering::packHexagonIndex
static uint32_t packHexagonIndex(int subdet, int z, int lay, int wafer, int celltyp, int cell)
Definition: HGCalTestNumbering.cc:22
edm::EDGetToken
Definition: EDGetToken.h:35
HGCalTBAnalyzer::hSimHitLayEn1FH_
std::vector< TH1D * > hSimHitLayEn1FH_
Definition: HGCalTBAnalyzer.cc:113
HGCalTBAnalyzer::tok_hitsBeam_
edm::EDGetTokenT< edm::PCaloHitContainer > tok_hitsBeam_
Definition: HGCalTBAnalyzer.cc:90
TFileService::make
T * make(const Args &...args) const
make new ROOT object
Definition: TFileService.h:64
edm::ESGetToken< HGCalDDDConstants, IdealGeometryRecord >
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
HGCalTBAnalyzer::fs_
edm::Service< TFileService > fs_
Definition: HGCalTBAnalyzer.cc:75
InputTag.h
cmsLHEtoEOSManager.l
l
Definition: cmsLHEtoEOSManager.py:204
edm::EventSetup::getData
bool getData(T &iHolder) const
Definition: EventSetup.h:127
HGCalTBAnalyzer::tok_hgcPHFH_
edm::EDGetTokenT< edm::PassiveHitContainer > tok_hgcPHFH_
Definition: HGCalTBAnalyzer.cc:96
HGCalDetId::wafer
int wafer() const
get the wafer #
Definition: HGCalDetId.h:40
HGCalTBAnalyzer::tok_digiFH_
edm::EDGetToken tok_digiFH_
Definition: HGCalTBAnalyzer.cc:93
HGCalTBAnalyzer::sortTime
static bool sortTime(const std::pair< double, double > &i, const std::pair< double, double > &j)
Definition: HGCalTBAnalyzer.cc:1316
HGCalDetId
Definition: HGCalDetId.h:8
HGCalTBAnalyzer::hgcPassiveCMSEName_
std::vector< std::string > hgcPassiveCMSEName_
Definition: HGCalTBAnalyzer.cc:131
HGCalTBAnalyzer::tok_hitrFH_
edm::EDGetToken tok_hitrFH_
Definition: HGCalTBAnalyzer.cc:94
HGCalTBAnalyzer::doBeam_
const bool doBeam_
Definition: HGCalTBAnalyzer.cc:82
HGCalTBAnalyzer::detectorEE_
const std::string detectorEE_
Definition: HGCalTBAnalyzer.cc:83
submitPVResolutionJobs.desc
string desc
Definition: submitPVResolutionJobs.py:251
HGCalDetId.h
std
Definition: JetResolutionObject.h:76
HGCalTBAnalyzer::tok_hitsFH_
edm::EDGetTokenT< edm::PCaloHitContainer > tok_hitsFH_
Definition: HGCalTBAnalyzer.cc:89
HGCalTBAnalyzer::doSimHits_
const bool doSimHits_
Definition: HGCalTBAnalyzer.cc:80
HGCalTBAnalyzer::hRecHitOcc_
TH2D * hRecHitOcc_[3]
Definition: HGCalTBAnalyzer.cc:107
Frameworkfwd.h
edm::LogVerbatim
Log< level::Info, true > LogVerbatim
Definition: MessageLogger.h:128
triggerObjects_cff.id
id
Definition: triggerObjects_cff.py:29
HGCalTBAnalyzer::simHitLayEn2FH_
std::vector< float > simHitLayEn2FH_
Definition: HGCalTBAnalyzer.cc:117
relativeConstraints.empty
bool empty
Definition: relativeConstraints.py:46
HGCalTBAnalyzer::yBeam_
double yBeam_
Definition: HGCalTBAnalyzer.cc:135
HGCalTBAnalyzer::beginRun
void beginRun(edm::Run const &, edm::EventSetup const &) override
Definition: HGCalTBAnalyzer.cc:489
HGCalTBAnalyzer::hRecHitE_
TH1D * hRecHitE_[3]
Definition: HGCalTBAnalyzer.cc:106
HGCalTBAnalyzer::analyzePassiveHits
void analyzePassiveHits(edm::Handle< edm::PassiveHitContainer > const &hgcPh, int subdet)
Definition: HGCalTBAnalyzer.cc:1281
HGCalTBAnalyzer::phiBeam_
double phiBeam_
Definition: HGCalTBAnalyzer.cc:136
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17
EventSetup.h
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
HGCalTBAnalyzer::hDigiOcc_
TH2D * hDigiOcc_[3]
Definition: HGCalTBAnalyzer.cc:107
PCaloHitContainer.h
HGCalTBAnalyzer::zFrontEE_
const double zFrontEE_
Definition: HGCalTBAnalyzer.cc:85
HGCalTBAnalyzer::zBeam_
double zBeam_
Definition: HGCalTBAnalyzer.cc:135
HGCalTBAnalyzer::analyzeSimTracks
void analyzeSimTracks(edm::Handle< edm::SimTrackContainer > const &SimTk, edm::Handle< edm::SimVertexContainer > const &SimVtx)
Definition: HGCalTBAnalyzer.cc:1143
HGCalTBAnalyzer::fillDescriptions
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
Definition: HGCalTBAnalyzer.cc:278
HGCSample::data
uint16_t data() const
Definition: HGCSample.h:70
HGCalDDDConstants::waferTypeL
int waferTypeL(int wafer) const
Definition: HGCalDDDConstants.h:197
HGCalTBAnalyzer::idBeams_
std::vector< int > idBeams_
Definition: HGCalTBAnalyzer.cc:88
HGCalTBAnalyzer::pBeamMC_
std::vector< float > pBeamMC_
Definition: HGCalTBAnalyzer.cc:140
HGCalTBAnalyzer::pyBeamMC_
std::vector< float > pyBeamMC_
Definition: HGCalTBAnalyzer.cc:140
HGCalTBAnalyzer::pzBeamMC_
std::vector< float > pzBeamMC_
Definition: HGCalTBAnalyzer.cc:140
HGCalTBAnalyzer::xBeamMC_
std::vector< float > xBeamMC_
Definition: HGCalTBAnalyzer.cc:139
HGCalTBAnalyzer::simHitCellColBH_
std::vector< int > simHitCellColBH_
Definition: HGCalTBAnalyzer.cc:124
HGCalDDDConstants.h
ParameterSet.h
HGCalDDDConstants::locateCell
std::pair< float, float > locateCell(int cell, int lay, int type, bool reco) const
Definition: HGCalDDDConstants.cc:596
HepMCProduct.h
HGCalTBAnalyzer::xBeam_
double xBeam_
Definition: HGCalTBAnalyzer.cc:135
dqmiolumiharvest.j
j
Definition: dqmiolumiharvest.py:66
edm::HandleBase::isValid
bool isValid() const
Definition: HandleBase.h:70
remoteMonitoring_LED_IterMethod_cfg.threshold
threshold
Definition: remoteMonitoring_LED_IterMethod_cfg.py:430
HGCalTBAnalyzer::detectorBH_
const std::string detectorBH_
Definition: HGCalTBAnalyzer.cc:84
HGCalTBAnalyzer::hRecHitLng1_
TProfile * hRecHitLng1_[3]
Definition: HGCalTBAnalyzer.cc:110
HGCalTBAnalyzer::hSimHitLayEn2FH_
std::vector< TH1D * > hSimHitLayEn2FH_
Definition: HGCalTBAnalyzer.cc:113
edm::Event
Definition: Event.h:73
edm::Log
Definition: MessageLogger.h:70
HGCalTBAnalyzer::doTreeCell_
const bool doTreeCell_
Definition: HGCalTBAnalyzer.cc:81
HGCalTBAnalyzer::doPassive_
const bool doPassive_
Definition: HGCalTBAnalyzer.cc:82
HGCalTBAnalyzer::hSimHitE_
TH1D * hSimHitE_[4]
Definition: HGCalTBAnalyzer.cc:104
TauDecayModes.dec
dec
Definition: TauDecayModes.py:142
AHCalDetId.h
HGCalTBAnalyzer::tok_digiBH_
edm::EDGetToken tok_digiBH_
Definition: HGCalTBAnalyzer.cc:93
SimTrackContainer.h
edm::InputTag
Definition: InputTag.h:15
hgcalTopologyTester_cfi.layers
layers
Definition: hgcalTopologyTester_cfi.py:8
HGCalDetId::cell
int cell() const
get the absolute value of the cell #'s in x and y
Definition: HGCalDetId.h:37
HGCalTBAnalyzer::beginJob
void beginJob() override
Definition: HGCalTBAnalyzer.cc:335
SimVertexContainer.h
geometryCSVtoXML.xx
xx
Definition: geometryCSVtoXML.py:19
HGCalTBAnalyzer::tok_hgcPHEE_
edm::EDGetTokenT< edm::PassiveHitContainer > tok_hgcPHEE_
Definition: HGCalTBAnalyzer.cc:96
HGCalTBAnalyzer::hgcPassiveBHID_
std::vector< int > hgcPassiveBHID_
Definition: HGCalTBAnalyzer.cc:133
HGCalTBAnalyzer::simHitCellIdFH_
std::vector< uint32_t > simHitCellIdFH_
Definition: HGCalTBAnalyzer.cc:120
HGCalTBAnalyzer::hgcPassiveBeamName_
std::vector< std::string > hgcPassiveBeamName_
Definition: HGCalTBAnalyzer.cc:132
findQualityFiles.size
size
Write out results.
Definition: findQualityFiles.py:443
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37
HGCalTestNumbering.h
HGCalTBAnalyzer::hSimHitEn_
TH1D * hSimHitEn_[4]
Definition: HGCalTBAnalyzer.cc:106
HGCalTBAnalyzer::analyzeDigi
void analyzeDigi(int type, const T1 &detId, uint16_t adc)
Definition: HGCalTBAnalyzer.cc:1223