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;
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") << "detId " << std::hex << id << std::dec << " Layer:Wafer:Cell " << layer << ":"
858  << sector << ":" << cell << " Position " << xy.first << ":" << xy.second << ":"
859  << 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 (depth >= 0) {
879  if (map_hitCell.count(idx) != 0) {
880  double ee = energy + map_hitCell[idx].second;
881  map_hitCell[idx] = std::make_pair(id, ee);
882  } else {
883  map_hitCell[idx] = std::make_pair(id, energy);
884  }
885  if (debug) {
886  if (type == 1)
887  edm::LogVerbatim("HGCSim") << "EE, depth is and map_hitDepth[depth] " << depth << " " << map_hitDepth[depth];
888  if (type == 2)
889  edm::LogVerbatim("HGCSim") << "BH, depth is and map_hitDepth[depth] " << depth << " " << map_hitDepth[depth];
890  }
891  if (map_hitDepth.count(depth) != 0) {
892  map_hitDepth[depth] += energy;
893  } else {
894  map_hitDepth[depth] = energy;
895  }
896  uint32_t idn =
897  (type >= 2) ? id : HGCalTestNumbering::packHexagonIndex(subdet, zside, depth, sector, subsector, cell);
898  map_hitTimeEn[idn].push_back(std::make_pair(time, energy));
899  GeV2Mip[idn] = gev2mip300_;
900  StochTermTime[idn] = stoc_smear_time_300_;
901  ID[idn] = id;
902  Depth[idn] = depth;
903  if (map_hitn.count(idn) != 0) {
904  map_hitn[idn] += energy;
905  ++nhits[idn];
906  } else {
907  map_hitn[idn] = energy;
908  nhits[idn] = 1;
909  }
910  }
911  hSimHitT_[type]->Fill(time, energy);
912  }
913 
914  if (type < 2) { //store only for EE and FH
916  for (const auto& itr : map_hitTimeEn) {
917  uint32_t id = itr.first;
918  int wafer = -99;
920  wafer = HGCalDetId(ID[id]).wafer();
921  double layer = HGCalDetId(id).layer();
922  double thickness = hgcons_[type]->cellThickness(layer, wafer, 0);
923  if (debug)
924  edm::LogVerbatim("HGCSim") << "wafer is : depth (reco) " << wafer << " " << Depth[id]
925  << "\ntype : layer : wafer thickness " << type << " " << layer << " " << thickness
926  << "\nID(sim) and id(reco) " << std::hex << ID[id] << " " << id << std::dec;
927  if (thickness == 300) {
928  GeV2Mip[id] = gev2mip300_;
929  StochTermTime[id] = stoc_smear_time_300_;
930  } else if (thickness == 200) {
931  GeV2Mip[id] = gev2mip200_;
932  StochTermTime[id] = stoc_smear_time_200_;
933  }
934  //first sort
935  std::sort(map_hitTimeEn[id].begin(), map_hitTimeEn[id].end(), sortTime);
937  double threshold = 15.;
938  double totE = 0.;
939  double totEbeforeThreshold = 0.;
940  double timebeforeThreshold = 0.;
941  double timeAtThresohld = 0.;
942  for (unsigned int ihit = 0; ihit < map_hitTimeEn[id].size(); ihit++) {
943  double energy = (map_hitTimeEn[id].at(ihit)).second / GeV2Mip[id];
944  totE += energy;
945  double time = (map_hitTimeEn[id].at(ihit)).first;
946  if (debug)
947  edm::LogVerbatim("HGCSim") << "Tot E till now : time of that E : GeV2Mip[id] is " << totE << " " << time
948  << " " << GeV2Mip[id];
949  if (totE < threshold) {
950  totEbeforeThreshold = totE;
951  timebeforeThreshold = time;
952  } else {
953  timeAtThresohld =
954  (threshold - totEbeforeThreshold) * (time - timebeforeThreshold) / (totE - totEbeforeThreshold) +
955  timebeforeThreshold;
956  map_hittime_15Mip[id] = timeAtThresohld;
957  if (debug)
958  edm::LogVerbatim("HGCSim") << "ihit : energyBefore : timeBefore : energyTot : timeTot : timeAt15MIP "
959  << ihit << " " << totEbeforeThreshold << " " << timebeforeThreshold << " "
960  << totE << " " << time << " " << map_hittime_15Mip[id];
961  break;
962  }
963  }
964  if (!map_hitTimeEn[id].empty()) {
965  map_hittime_firsthit[id] = (map_hitTimeEn[id].at(0)).first;
966  map_hittime_lasthit[id] = (map_hitTimeEn[id].at(map_hitTimeEn[id].size() - 1)).first;
967  if (map_hittime_15Mip[id] < map_hittime_firsthit[id])
968  map_hittime_15Mip[id] = map_hittime_firsthit[id];
969  /*
971  double firsthit_sm = ran3.Gaus(map_hittime_firsthit_vtxCorr[id], StochTermTime[id]);
972  double lasthit_sm = ran3.Gaus(map_hittime_lasthit_vtxCorr[id], StochTermTime[id]);
973  double threshmiphit_sm = ran3.Gaus(map_hittime_15Mip_vtxCorr[id], StochTermTime[id]);
974  */
975  }
976 
977  if (totE < threshold)
978  map_hittime_15Mip[id] = -99;
979  if (debug)
980  edm::LogVerbatim("HGCSim") << "id : first hit time : last hit time " << id << " " << map_hittime_firsthit[id]
981  << " " << map_hittime_lasthit[id] << "\nFinally for this cell, time is "
982  << map_hittime_15Mip[id];
983  }
984  }
985 
986  hSimHitEn_[type]->Fill(entot);
987  for (const auto& itr : map_hits) {
988  hSimHitE_[type]->Fill(itr.second);
989  }
990 
991  if (debug)
992  edm::LogVerbatim("HGCSim") << "Now looping over map_hitLayer";
993  for (const auto& itr : map_hitLayer) {
994  int layer = (type == 2) ? itr.first : (itr.first - 1);
995  double energy = (itr.second).second;
996  double zp(0);
997  if (type < 2)
998  zp = hgcons_[type]->waferZ(layer + 1, false);
999  else if (type == 2)
1000  zp = ahcalGeom_->getZ(AHCalDetId((itr.second).first));
1001 #ifdef EDM_ML_DEBUG
1002  edm::LogVerbatim("HGCSim") << "SimHit:Layer " << layer + 1 << " Z " << zp << ":" << zp - zFront << " E " << energy;
1003 #endif
1004  if (type < 3) {
1005  hSimHitLng_[type]->Fill(zp - zFront, energy);
1006  hSimHitLng2_[type]->Fill(layer + 1, energy);
1007  }
1008  if (type == 0) {
1009  if (layer < static_cast<int>(hSimHitLayEn1EE_.size())) {
1010  simHitLayEn1EE_[layer] = energy;
1011  hSimHitLayEn1EE_[layer]->Fill(energy);
1012  }
1013  } else if (type == 1) {
1014  if (layer < static_cast<int>(hSimHitLayEn1FH_.size())) {
1015  simHitLayEn1FH_[layer] = energy;
1016  hSimHitLayEn1FH_[layer]->Fill(energy);
1017  }
1018  } else if (type == 2) {
1019  if (debug)
1020  edm::LogVerbatim("HGCSim") << "layer < hSimHitLayEn1BH_.size()";
1021  if (layer < static_cast<int>(hSimHitLayEn1BH_.size())) {
1022  simHitLayEn1BH_[layer] = energy;
1023  hSimHitLayEn1BH_[layer]->Fill(energy);
1024  }
1025  } else {
1026  for (unsigned int k = 0; k < idBeams_.size(); ++k) {
1027  if (layer + 1 == idBeams_[k]) {
1029  hSimHitLayEnBeam_[k]->Fill(energy);
1030  break;
1031  }
1032  }
1033  }
1034  }
1035  for (const auto& itr : map_hitDepth) {
1036  int layer = (type == 2) ? itr.first : (itr.first - 1);
1037  double energy = itr.second;
1038 #ifdef EDM_ML_DEBUG
1039  edm::LogVerbatim("HGCSim") << "SimHit:Layer " << layer + 1 << " " << energy;
1040 #endif
1041  hSimHitLng1_[type]->Fill(layer + 1, energy);
1042  if (type == 0) {
1043  if (layer < static_cast<int>(hSimHitLayEn2EE_.size())) {
1044  simHitLayEn2EE_[layer] = energy;
1045  hSimHitLayEn2EE_[layer]->Fill(energy);
1046  }
1047  } else if (type == 1) {
1048  if (layer < static_cast<int>(hSimHitLayEn2FH_.size())) {
1049  simHitLayEn2FH_[layer] = energy;
1050  hSimHitLayEn2FH_[layer]->Fill(energy);
1051  }
1052  } else if (type == 2) {
1053  if (debug)
1054  edm::LogVerbatim("HGCSim") << "Inside map_hitDepth, layer no. " << layer;
1055  if (layer < static_cast<int>(hSimHitLayEn2BH_.size())) {
1056  simHitLayEn2BH_[layer] = energy;
1057  hSimHitLayEn2BH_[layer]->Fill(energy);
1058  }
1059  }
1060  }
1061 
1062  if (debug)
1063  edm::LogVerbatim("HGCSim") << "Now looping over map_hitCell";
1064  if (type < 3) {
1065  for (const auto& itr : map_hitCell) {
1066  uint32_t id = ((itr.second).first);
1067  double energy = ((itr.second).second);
1068  std::pair<float, float> xy(0, 0);
1069  double xx(0);
1070  if (type == 2) {
1071  xy = ahcalGeom_->getXY(AHCalDetId(id));
1072  xx = xy.first;
1073  } else {
1074  int subdet, zside, layer, sector, subsector, cell;
1075  HGCalTestNumbering::unpackHexagonIndex(id, subdet, zside, layer, sector, subsector, cell);
1076  xy = hgcons_[type]->locateCell(cell, layer, sector, false);
1077  double zp = hgcons_[type]->waferZ(layer, false);
1078  xx = (zp < 0) ? -xy.first : xy.first;
1079  }
1080  hSimHitLat_[type]->Fill(xx, xy.second, energy);
1081  }
1082  }
1083 
1084  for (const auto& itr : map_hitn) {
1085  uint32_t id = itr.first;
1086  double energy = itr.second;
1087  if (type == 0) {
1088  double time_firsthit = map_hittime_firsthit[id];
1089  double time15Mip = map_hittime_15Mip[id];
1090  double time_lasthit = map_hittime_lasthit[id];
1091  simHitCellIdEE_.push_back(id);
1092  simHitCellEnEE_.push_back(energy);
1093  simHitCellTimeFirstHitEE_.push_back(time_firsthit);
1094  simHitCellTime15MipEE_.push_back(time15Mip);
1095  simHitCellTimeLastHitEE_.push_back(time_lasthit);
1096  if (debug && (energy / GeV2Mip[id] < 15) && (map_hittime_15Mip[id] > 0))
1097  edm::LogVerbatim("HGCSim") << "FOUND!!!!rechit energy : Finally for this cell, time is " << energy / GeV2Mip[id]
1098  << " " << map_hittime_15Mip[id];
1099  } else if (type == 1) {
1100  double time_firsthit = map_hittime_firsthit[id];
1101  double time15Mip = map_hittime_15Mip[id];
1102  double time_lasthit = map_hittime_lasthit[id];
1103  simHitCellIdFH_.push_back(id);
1104  simHitCellEnFH_.push_back(energy);
1105  simHitCellTimeFirstHitFH_.push_back(time_firsthit);
1106  simHitCellTime15MipFH_.push_back(time15Mip);
1107  simHitCellTimeLastHitFH_.push_back(time_lasthit);
1108  } else if (type == 2) {
1109  simHitCellIdBH_.push_back(id);
1110  simHitCellEnBH_.push_back(energy);
1111  AHCalDetId hid(id);
1112  int row = hid.irow();
1113  int col = hid.icol();
1114  int layer = hid.depth();
1115  simHitCellColBH_.push_back(col);
1116  simHitCellRowBH_.push_back(row);
1117  simHitCellLayerBH_.push_back(layer);
1118 #ifdef EDM_ML_DEBUG
1119  edm::LogVerbatim("HGCSim") << "ID: " << std::hex << id << std::dec << " Layer: " << layer << " col: " << col
1120  << " row: " << row;
1121 #endif
1122  } else if (type == 3) {
1123  simHitCellIdBeam_.push_back(id);
1124  simHitCellEnBeam_.push_back(energy);
1125  }
1126  }
1127 }
1128 
1130  edm::Handle<edm::SimVertexContainer> const& SimVtx) {
1131  xBeam_ = yBeam_ = zBeam_ = pBeam_ = -9999;
1132  nBeamMC_ = thetaBeam_ = phiBeam_ = -9999;
1133  int nParBeam = 0;
1134  int vertIndex(-1);
1135  if (doBeam_) {
1136  pdgIdBeamMC_.clear();
1137  xBeamMC_.clear();
1138  yBeamMC_.clear();
1139  zBeamMC_.clear();
1140  pxBeamMC_.clear();
1141  pyBeamMC_.clear();
1142  pzBeamMC_.clear();
1143  pBeamMC_.clear();
1144  }
1145  std::vector<float> verX, verY, verZ;
1146  verX.clear();
1147  verY.clear();
1148  verZ.clear();
1149  for (const auto& simVtxItr : *SimVtx) {
1150  verX.push_back(simVtxItr.position().X());
1151  verY.push_back(simVtxItr.position().Y());
1152  verZ.push_back(simVtxItr.position().Z());
1153  }
1154 #ifdef EDM_ML_DEBUG
1155  edm::LogVerbatim("HGCSim") << "Size of track " << SimTk->size();
1156 #endif
1157  HepMC::FourVector pxyz(0, 0, 0, 0);
1158  for (const auto& simTrkItr : *SimTk) {
1159  if (addP_ && !(simTrkItr.noGenpart())) {
1160  pxyz.setPx(pxyz.px() + simTrkItr.momentum().px());
1161  pxyz.setPy(pxyz.py() + simTrkItr.momentum().py());
1162  pxyz.setPz(pxyz.pz() + simTrkItr.momentum().pz());
1163  pxyz.setE(pxyz.e() + simTrkItr.momentum().e());
1164 #ifdef EDM_ML_DEBUG
1165  edm::LogVerbatim("HGCSim") << "Track " << simTrkItr.trackId() << " Vertex " << simTrkItr.vertIndex() << " Type "
1166  << simTrkItr.type() << " Charge " << simTrkItr.charge() << " px "
1167  << simTrkItr.momentum().px() << " py " << simTrkItr.momentum().py() << " pz "
1168  << simTrkItr.momentum().pz() << " P " << simTrkItr.momentum().P() << " GenIndex "
1169  << simTrkItr.genpartIndex();
1170  edm::LogVerbatim("HGCSim") << "Vertex " << simTrkItr.vertIndex()
1171  << " position-> X: " << verX[simTrkItr.vertIndex()]
1172  << " Y: " << verY[simTrkItr.vertIndex()] << " Z: " << verZ[simTrkItr.vertIndex()];
1173 #endif
1174  }
1175  if (doBeam_ && !(simTrkItr.noGenpart())) {
1176  nParBeam++;
1177  pdgIdBeamMC_.push_back(simTrkItr.type());
1178  xBeamMC_.push_back(verX[simTrkItr.vertIndex()]);
1179  yBeamMC_.push_back(verY[simTrkItr.vertIndex()]);
1180  zBeamMC_.push_back(verZ[simTrkItr.vertIndex()]);
1181  pxBeamMC_.push_back(simTrkItr.momentum().px());
1182  pyBeamMC_.push_back(simTrkItr.momentum().py());
1183  pzBeamMC_.push_back(simTrkItr.momentum().pz());
1184  pBeamMC_.push_back(simTrkItr.momentum().P());
1185  } else if (!addP_ && (vertIndex == -1)) {
1186  pxyz = simTrkItr.momentum();
1187  }
1188  if (vertIndex == -1)
1189  vertIndex = simTrkItr.vertIndex();
1190  }
1191  nBeamMC_ = nParBeam;
1192  pBeam_ = pxyz.rho();
1193  thetaBeam_ = pxyz.theta();
1194  phiBeam_ = pxyz.phi();
1195  if (phiBeam_ < 0)
1196  phiBeam_ += (2 * M_PI);
1197  if (vertIndex != -1 && vertIndex < static_cast<int>(SimVtx->size())) {
1198  edm::SimVertexContainer::const_iterator simVtxItr = SimVtx->begin();
1199  for (int iv = 0; iv < vertIndex; iv++)
1200  simVtxItr++;
1201  edm::LogVerbatim("HGCSim") << "Vertex " << vertIndex << " position " << simVtxItr->position();
1202  xBeam_ = verX[0];
1203  yBeam_ = verY[0];
1204  zBeam_ = verZ[0];
1205  }
1206 }
1207 
1208 template <class T1>
1209 void HGCalTBAnalyzer::analyzeDigi(int type, const T1& detId, uint16_t adc) {
1210  DetId id1 = DetId(detId.rawId());
1211  GlobalPoint global = hgeom_[type]->getPosition(id1);
1212  hDigiOcc_[type]->Fill(global.x(), global.y());
1213  hDigiLng_[type]->Fill(global.z());
1214  hDigiADC_[type]->Fill(adc);
1215 }
1216 
1218  std::map<int, double> map_hitLayer;
1219  std::map<int, std::pair<DetId, double>> map_hitCell;
1220  for (const auto& it : *hits) {
1221  DetId detId = it.id();
1222  GlobalPoint global = hgeom_[type]->getPosition(detId);
1223  double energy = it.energy();
1224  int layer = HGCalDetId(detId).layer();
1225  int cell = HGCalDetId(detId).cell();
1226 #ifdef EDM_ML_DEBUG
1227  edm::LogVerbatim("HGCSim") << "Layer thickness " << hgcons_[type]->waferTypeL(HGCalDetId(detId).wafer());
1228 #endif
1229  hRecHitOcc_[type]->Fill(global.x(), global.y(), energy);
1230  hRecHitE_[type]->Fill(energy);
1231  if (map_hitLayer.count(layer) != 0) {
1232  map_hitLayer[layer] += energy;
1233  } else {
1234  map_hitLayer[layer] = energy;
1235  }
1236  if (map_hitCell.count(cell) != 0) {
1237  double ee = energy + map_hitCell[cell].second;
1238  map_hitCell[cell] = std::pair<uint32_t, double>(detId, ee);
1239  } else {
1240  map_hitCell[cell] = std::pair<uint32_t, double>(detId, energy);
1241  }
1242 #ifdef EDM_ML_DEBUG
1243  edm::LogVerbatim("HGCSim") << "RecHit: " << layer << " " << global.x() << " " << global.y() << " " << global.z()
1244  << " " << energy;
1245 #endif
1246  }
1247 
1248  for (const auto& itr : map_hitLayer) {
1249  int layer = itr.first;
1250  double energy = itr.second;
1251  double zp = hgcons_[type]->waferZ(layer, true);
1252 #ifdef EDM_ML_DEBUG
1253  edm::LogVerbatim("HGCSim") << "SimHit:Layer " << layer << " " << zp << " " << energy;
1254 #endif
1255  hRecHitLng_[type]->Fill(zp, energy);
1256  hRecHitLng1_[type]->Fill(layer, energy);
1257  }
1258 
1259  for (const auto& itr : map_hitCell) {
1260  DetId detId = ((itr.second).first);
1261  double energy = ((itr.second).second);
1262  GlobalPoint global = hgeom_[type]->getPosition(detId);
1263  hRecHitLat_[type]->Fill(global.x(), global.y(), energy);
1264  }
1265 }
1266 
1268  for (const auto& v : *hgcPH) {
1269  double energy = v.energy();
1270  std::string name = v.vname();
1271  unsigned int id = v.id();
1272 #ifdef EDM_ML_DEBUG
1273  double time = v.time();
1274  edm::LogVerbatim("HGCSim") << "HGCalTBAnalyzer::analyzePassiveHits:Energy:"
1275  << "Time:Name:Id : " << energy << ":" << time << ":" << name << ":" << id;
1276 #endif
1277 
1278  if (subdet == 1) {
1279  hgcPassiveEEEnergy_.push_back(energy);
1280  hgcPassiveEEName_.push_back(name);
1281  hgcPassiveEEID_.push_back(id);
1282  } else if (subdet == 2) {
1283  hgcPassiveFHEnergy_.push_back(energy);
1284  hgcPassiveFHName_.push_back(name);
1285  hgcPassiveFHID_.push_back(id);
1286  } else if (subdet == 3) {
1287  hgcPassiveBHEnergy_.push_back(energy);
1288  hgcPassiveBHName_.push_back(name);
1289  hgcPassiveBHID_.push_back(id);
1290  } else if (subdet == 4) {
1291  hgcPassiveCMSEEnergy_.push_back(energy);
1292  hgcPassiveCMSEName_.push_back(name);
1293  hgcPassiveCMSEID_.push_back(id);
1294  } else if (subdet == 5) {
1295  hgcPassiveBeamEnergy_.push_back(energy);
1296  hgcPassiveBeamName_.push_back(name);
1297  hgcPassiveBeamID_.push_back(id);
1298  }
1299  }
1300 }
1301 
1302 bool HGCalTBAnalyzer::sortTime(const std::pair<double, double>& i, const std::pair<double, double>& j) {
1303  return i.first < j.first;
1304 }
1305 
1306 // 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:393
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
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
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:47
HGCalTBAnalyzer::tok_hitrBH_
edm::EDGetToken tok_hitrBH_
Definition: HGCalTBAnalyzer.cc:95
HGCalDDDConstants::waferZ
double waferZ(int layer, bool reco) const
Definition: HGCalDDDConstants.cc:1388
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:89287
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
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
dqmdumpme.first
first
Definition: dqmdumpme.py:55
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:26
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:1217
HGCalTBAnalyzer::simHitCellTime15MipFH_
std::vector< float > simHitCellTime15MipFH_
Definition: HGCalTBAnalyzer.cc:123
PV3DBase::z
T z() const
Definition: PV3DBase.h:61
ecalLiteDTU::adc
constexpr int adc(sample_type sample)
get the ADC sample (12 bits)
Definition: EcalLiteDTUSample.h:12
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:1016
edm::EventSetup::get
T get() const
Definition: EventSetup.h:80
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:114
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
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
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
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:39
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:191
HGCalDDDConstants::cellThickness
double cellThickness(int layer, int waferU, int waferV) const
Definition: HGCalDDDConstants.cc:219
edm::EventSetup
Definition: EventSetup.h:57
HGCalTBAnalyzer::hgcPassiveFHName_
std::vector< std::string > hgcPassiveFHName_
Definition: HGCalTBAnalyzer.cc:128
edm::HepMCProduct::GetEvent
const HepMC::GenEvent * GetEvent() const
Definition: HepMCProduct.h:34
HGCalTBAnalyzer::hSimHitLayEnBeam_
std::vector< TH1D * > hSimHitLayEnBeam_
Definition: HGCalTBAnalyzer.cc:112
HGCalTBAnalyzer::gev2mip300_
const double gev2mip300_
Definition: HGCalTBAnalyzer.cc:88
itr
std::vector< std::pair< float, float > >::iterator itr
Definition: HGCDigitizer.cc:29
HGCalTestNumbering::packHexagonIndex
static uint32_t packHexagonIndex(int subdet, int z, int lay, int wafer, int celltyp, int cell)
Definition: HGCalTestNumbering.cc:23
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:1302
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:31
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:1267
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:1129
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:183
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
ntuplemaker.time
time
Definition: ntuplemaker.py:310
remoteMonitoring_LED_IterMethod_cfg.threshold
threshold
Definition: remoteMonitoring_LED_IterMethod_cfg.py:426
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:1209