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