CMS 3D CMS Logo

HcalHBHEMuonSimAnalyzer.cc
Go to the documentation of this file.
1 #include <memory>
2 #include <iostream>
3 #include <vector>
4 
5 #include <TTree.h>
6 
7 // user include files
16 
25 
29 
40 
41 class HcalHBHEMuonSimAnalyzer : public edm::one::EDAnalyzer<edm::one::WatchRuns, edm::one::SharedResources> {
42 public:
44  ~HcalHBHEMuonSimAnalyzer() override;
45 
46  static void fillDescriptions(edm::ConfigurationDescriptions& descriptions);
47 
48 private:
49  void beginJob() override;
50  void analyze(edm::Event const&, edm::EventSetup const&) override;
51  void beginRun(edm::Run const&, edm::EventSetup const&) override;
52  void endRun(edm::Run const&, edm::EventSetup const&) override {}
55  void clearVectors();
56  unsigned int matchId(const HcalDetId&, const HcalDetId&);
57  double activeLength(const DetId&);
58 
62  double etaMax_;
63  std::vector<HcalDDDRecConstants::HcalActiveLength> actHB_, actHE_;
64 
71 
77 
79 
80  static const int depthMax_ = 7;
81  const int idMuon_ = 13;
82  TTree* tree_;
84  std::vector<double> ptGlob_, etaGlob_, phiGlob_, pMuon_;
85  std::vector<double> ecal3x3Energy_, hcal1x1Energy_;
86  std::vector<unsigned int> ecalDetId_, hcalDetId_, hcalHot_;
87  std::vector<double> matchedId_;
88  std::vector<double> hcalDepthEnergy_[depthMax_];
89  std::vector<double> hcalDepthActiveLength_[depthMax_];
90  std::vector<double> hcalDepthEnergyHot_[depthMax_];
91  std::vector<double> hcalDepthActiveLengthHot_[depthMax_];
93 };
94 
96  usesResource(TFileService::kSharedResource);
97 
98  //now do what ever initialization is needed
99  g4Label_ = iConfig.getParameter<std::string>("ModuleLabel");
100  ebLabel_ = iConfig.getParameter<std::string>("EBCollection");
101  eeLabel_ = iConfig.getParameter<std::string>("EECollection");
102  hcLabel_ = iConfig.getParameter<std::string>("HCCollection");
103  verbosity_ = iConfig.getUntrackedParameter<int>("Verbosity", 0);
104  maxDepth_ = iConfig.getUntrackedParameter<int>("MaxDepth", 4);
105  etaMax_ = iConfig.getUntrackedParameter<double>("EtaMax", 3.0);
106  tMinE_ = iConfig.getUntrackedParameter<double>("TimeMinCutECAL", -500.);
107  tMaxE_ = iConfig.getUntrackedParameter<double>("TimeMaxCutECAL", 500.);
108  tMinH_ = iConfig.getUntrackedParameter<double>("TimeMinCutHCAL", -500.);
109  tMaxH_ = iConfig.getUntrackedParameter<double>("TimeMaxCutHCAL", 500.);
110 
111  tok_SimTk_ = consumes<edm::SimTrackContainer>(edm::InputTag(g4Label_));
112  tok_SimVtx_ = consumes<edm::SimVertexContainer>(edm::InputTag(g4Label_));
113  tok_caloEB_ = consumes<edm::PCaloHitContainer>(edm::InputTag(g4Label_, ebLabel_));
114  tok_caloEE_ = consumes<edm::PCaloHitContainer>(edm::InputTag(g4Label_, eeLabel_));
115  tok_caloHH_ = consumes<edm::PCaloHitContainer>(edm::InputTag(g4Label_, hcLabel_));
116  if (maxDepth_ > depthMax_)
118  else if (maxDepth_ < 1)
119  maxDepth_ = 4;
120 
121  edm::LogVerbatim("HBHEMuon") << "Labels: " << g4Label_ << ":" << ebLabel_ << ":" << eeLabel_ << ":" << hcLabel_
122  << "\nVerbosity " << verbosity_ << " MaxDepth " << maxDepth_ << " Maximum Eta "
123  << etaMax_ << " tMin|tMax " << tMinE_ << ":" << tMaxE_ << ":" << tMinH_ << ":" << tMaxH_;
124 
125  tok_ddrec_ = esConsumes<HcalDDDRecConstants, HcalRecNumberingRecord, edm::Transition::BeginRun>();
126  tok_geom_ = esConsumes<CaloGeometry, CaloGeometryRecord>();
127  tok_caloTopology_ = esConsumes<CaloTopology, CaloTopologyRecord>();
128  tok_topo_ = esConsumes<HcalTopology, HcalRecNumberingRecord>();
129  tok_magField_ = esConsumes<MagneticField, IdealMagneticFieldRecord>();
130 }
131 
133 
135  clearVectors();
136  bool debug = ((verbosity_ / 10) > 0);
137 
138  runNumber_ = iEvent.id().run();
139  eventNumber_ = iEvent.id().event();
140  lumiNumber_ = iEvent.id().luminosityBlock();
141  bxNumber_ = iEvent.bunchCrossing();
142 
143  //get Handles to SimTracks and SimHits
145  iEvent.getByToken(tok_SimTk_, SimTk);
147  iEvent.getByToken(tok_SimVtx_, SimVtx);
148 
149  //get Handles to PCaloHitContainers of eb/ee/hbhe
151  iEvent.getByToken(tok_caloEB_, pcaloeb);
153  iEvent.getByToken(tok_caloEE_, pcaloee);
155  iEvent.getByToken(tok_caloHH_, pcalohh);
156  std::vector<PCaloHit> calohh;
157  bool testN(false);
158  for (unsigned int k = 1; k < pcalohh->size(); ++k) {
159  // if it is a standard DetId bits 28..31 will carry the det #
160  // for HCAL det # is 4 and if there is at least one hit in the collection
161  // have det # which is not 4 this collection is created using TestNumbering
162  int det = ((((*pcalohh)[k].id()) >> 28) & 0xF);
163  if (det != 4) {
164  testN = true;
165  break;
166  }
167  }
168  if (testN) {
169  for (edm::PCaloHitContainer::const_iterator itr = pcalohh->begin(); itr != pcalohh->end(); ++itr) {
170  PCaloHit hit(*itr);
172  edm::LogVerbatim("HBHEMuon") << "Old ID " << std::hex << hit.id() << std::dec << " New " << HcalDetId(newid);
173  hit.setID(newid.rawId());
174  calohh.push_back(hit);
175  }
176  } else {
177  calohh.insert(calohh.end(), pcalohh->begin(), pcalohh->end());
178  }
179 
180  // get handles to calogeometry and calotopology
181  const CaloGeometry* geo = &iSetup.getData(tok_geom_);
182  const MagneticField* bField = &iSetup.getData(tok_magField_);
183  const CaloTopology* caloTopology = &iSetup.getData(tok_caloTopology_);
184  const HcalTopology* theHBHETopology = &iSetup.getData(tok_topo_);
185 
186  // Loop over all SimTracks
187  for (edm::SimTrackContainer::const_iterator simTrkItr = SimTk->begin(); simTrkItr != SimTk->end(); simTrkItr++) {
188  if ((std::abs(simTrkItr->type()) == idMuon_) && (simTrkItr->vertIndex() == 0) &&
189  (std::abs(simTrkItr->momentum().eta()) < etaMax_)) {
190  unsigned int thisTrk = simTrkItr->trackId();
191  spr::propagatedTrackDirection trkD = spr::propagateCALO(thisTrk, SimTk, SimVtx, geo, bField, debug);
192 
193  double eEcal(0), eHcal(0), activeLengthTot(0), activeLengthHotTot(0);
194  double eHcalDepth[depthMax_], eHcalDepthHot[depthMax_];
195  double activeL[depthMax_], activeHotL[depthMax_];
196  unsigned int isHot(0);
197  bool tmpmatch(false);
198  for (int i = 0; i < depthMax_; ++i)
199  eHcalDepth[i] = eHcalDepthHot[i] = activeL[i] = activeHotL[i] = -10000;
200 
201  if ((verbosity_ % 10) > 0)
202  edm::LogVerbatim("HBHEMuon") << "Track Type " << simTrkItr->type() << " Vertex " << simTrkItr->vertIndex()
203  << " Charge " << simTrkItr->charge() << " Momentum " << simTrkItr->momentum().P()
204  << ":" << simTrkItr->momentum().eta() << ":" << simTrkItr->momentum().phi()
205  << " ECAL|HCAL " << trkD.okECAL << ":" << trkD.okHCAL << " Point "
206  << trkD.pointECAL << ":" << trkD.pointHCAL << " Direction "
207  << trkD.directionECAL.eta() << ":" << trkD.directionECAL.phi() << " | "
208  << trkD.directionHCAL.eta() << ":" << trkD.directionHCAL.phi();
209 
210  bool propageback(false);
211  spr::propagatedTrackDirection trkD_back = spr::propagateHCALBack(thisTrk, SimTk, SimVtx, geo, bField, debug);
212  HcalDetId closestCell_back;
213  if (trkD_back.okHCAL) {
214  closestCell_back = (HcalDetId)(trkD_back.detIdHCAL);
215  propageback = true;
216  }
217  if (trkD.okHCAL) {
218  // Muon properties
219  spr::trackAtOrigin tkvx = spr::simTrackAtOrigin(thisTrk, SimTk, SimVtx, debug);
220  ptGlob_.push_back(tkvx.momentum.perp());
221  etaGlob_.push_back(tkvx.momentum.eta());
222  phiGlob_.push_back(tkvx.momentum.phi());
223  pMuon_.push_back(tkvx.momentum.mag());
224  if ((verbosity_ % 10) > 0)
225  edm::LogVerbatim("HBHEMuon") << "Track at vertex " << tkvx.ok << " position " << tkvx.position << " Momentum "
226  << tkvx.momentum.mag() << ":" << tkvx.momentum.eta() << ":"
227  << tkvx.momentum.phi() << " Charge " << tkvx.charge;
228 
229  // Energy in ECAL
230  DetId isoCell;
231  if (trkD.okECAL) {
232  isoCell = trkD.detIdECAL;
233  eEcal = spr::eECALmatrix(
234  isoCell, pcaloeb, pcaloee, geo, caloTopology, 1, 1, -100.0, -100.0, tMinE_, tMaxE_, debug);
235  }
236 
237  // Energy in Hcal
238  const DetId closestCell(trkD.detIdHCAL);
239  if ((propageback) && (HcalDetId(closestCell).ieta() == HcalDetId(closestCell_back).ieta()) &&
240  (HcalDetId(closestCell).iphi() == HcalDetId(closestCell_back).iphi()))
241  tmpmatch = true;
242 
243  eHcal = spr::eHCALmatrix(
244  theHBHETopology, closestCell, calohh, 0, 0, false, -100.0, -100.0, -100.0, -100.0, tMinH_, tMaxH_, debug);
245  if ((verbosity_ % 10) > 0)
246  edm::LogVerbatim("HBHEMuon") << "eEcal " << trkD.okECAL << ":" << eEcal << " eHcal " << eHcal;
247 
248  HcalSubdetector subdet = HcalDetId(closestCell).subdet();
249  int ieta = HcalDetId(closestCell).ieta();
250  int iphi = HcalDetId(closestCell).iphi();
251  int zside = HcalDetId(closestCell).zside();
252  bool hbhe = (std::abs(ieta) == 16);
253  int depthHE = hcons_->getMinDepth(1, 16, iphi, zside);
254  std::vector<std::pair<double, int> > ehdepth;
255  spr::energyHCALCell((HcalDetId)closestCell,
256  calohh,
257  ehdepth,
258  maxDepth_,
259  -100.0,
260  -100.0,
261  -100.0,
262  -100.0,
263  -500.0,
264  500.0,
265  depthHE,
266  debug);
267  for (unsigned int i = 0; i < ehdepth.size(); ++i) {
268  eHcalDepth[ehdepth[i].second - 1] = ehdepth[i].first;
269  HcalSubdetector subdet0 = (hbhe) ? ((ehdepth[i].second >= depthHE) ? HcalEndcap : HcalBarrel) : subdet;
270  HcalDetId hcid0(subdet0, ieta, iphi, ehdepth[i].second);
271  double actL = activeLength(DetId(hcid0));
272  activeL[ehdepth[i].second - 1] = actL;
273  activeLengthTot += actL;
274  if ((verbosity_ % 10) > 0)
275  edm::LogVerbatim("HBHEMuon") << hcid0 << " E " << ehdepth[i].first << " L " << actL;
276  }
277 
278  HcalDetId hotCell;
279  double h3x3 = spr::eHCALmatrix(geo, theHBHETopology, closestCell, calohh, 1, 1, hotCell, debug);
280  isHot = matchId(closestCell, hotCell);
281  if ((verbosity_ % 10) > 0)
282  edm::LogVerbatim("HBHEMuon") << "hcal 3X3 < " << h3x3 << "> ClosestCell <" << (HcalDetId)(closestCell)
283  << "> hotCell id < " << hotCell << "> isHot" << isHot;
284 
285  if (hotCell != HcalDetId()) {
286  subdet = HcalDetId(hotCell).subdet();
287  ieta = HcalDetId(hotCell).ieta();
288  iphi = HcalDetId(hotCell).iphi();
289  zside = HcalDetId(hotCell).zside();
290  hbhe = (std::abs(ieta) == 16);
291  depthHE = hcons_->getMinDepth(1, 16, iphi, zside);
292  std::vector<std::pair<double, int> > ehdepth;
294  hotCell, calohh, ehdepth, maxDepth_, -100.0, -100.0, -100.0, -100.0, tMinH_, tMaxH_, depthHE, debug);
295  for (unsigned int i = 0; i < ehdepth.size(); ++i) {
296  eHcalDepthHot[ehdepth[i].second - 1] = ehdepth[i].first;
297  HcalSubdetector subdet0 = (hbhe) ? ((ehdepth[i].second >= depthHE) ? HcalEndcap : HcalBarrel) : subdet;
298  HcalDetId hcid0(subdet0, ieta, iphi, ehdepth[i].second);
299  double actL = activeLength(DetId(hcid0));
300  activeHotL[ehdepth[i].second - 1] = actL;
301  activeLengthHotTot += actL;
302  if ((verbosity_ % 10) > 0)
303  edm::LogVerbatim("HBHEMuon") << hcid0 << " E " << ehdepth[i].first << " L " << actL;
304  }
305  }
306  if ((verbosity_ % 10) > 0) {
307  for (int k = 0; k < depthMax_; ++k)
308  edm::LogVerbatim("HBHEMuon") << "Depth " << k << " E " << eHcalDepth[k] << ":" << eHcalDepthHot[k];
309  }
310  matchedId_.push_back(tmpmatch);
311  ecal3x3Energy_.push_back(eEcal);
312  ecalDetId_.push_back(isoCell.rawId());
313  hcal1x1Energy_.push_back(eHcal);
314  hcalDetId_.push_back(closestCell.rawId());
315  for (int k = 0; k < depthMax_; ++k) {
316  hcalDepthEnergy_[k].push_back(eHcalDepth[k]);
317  hcalDepthActiveLength_[k].push_back(activeL[k]);
318  hcalDepthEnergyHot_[k].push_back(eHcalDepthHot[k]);
319  hcalDepthActiveLengthHot_[k].push_back(activeHotL[k]);
320  }
321  hcalHot_.push_back(isHot);
322  hcalActiveLengthHot_.push_back(activeLengthHotTot);
323  }
324  }
325  }
326  if (!hcalHot_.empty())
327  tree_->Fill();
328 }
329 
331  tree_ = fs_->make<TTree>("TREE", "TREE");
332  tree_->Branch("Run_No", &runNumber_);
333  tree_->Branch("Event_No", &eventNumber_);
334  tree_->Branch("LumiNumber", &lumiNumber_);
335  tree_->Branch("BXNumber", &bxNumber_);
336  tree_->Branch("pt_of_muon", &ptGlob_);
337  tree_->Branch("eta_of_muon", &etaGlob_);
338  tree_->Branch("phi_of_muon", &phiGlob_);
339  tree_->Branch("p_of_muon", &pMuon_);
340  tree_->Branch("matchedId", &matchedId_);
341 
342  tree_->Branch("ecal_3x3", &ecal3x3Energy_);
343  tree_->Branch("ecal_detID", &ecalDetId_);
344  tree_->Branch("hcal_1x1", &hcal1x1Energy_);
345  tree_->Branch("hcal_detID", &hcalDetId_);
346  tree_->Branch("hcal_cellHot", &hcalHot_);
347  tree_->Branch("activeLength", &hcalActiveLength_);
348  tree_->Branch("activeLengthHot", &hcalActiveLengthHot_);
349  char name[100];
350  for (int k = 0; k < maxDepth_; ++k) {
351  sprintf(name, "hcal_edepth%d", (k + 1));
352  tree_->Branch(name, &hcalDepthEnergy_[k]);
353  sprintf(name, "hcal_activeL%d", (k + 1));
354  tree_->Branch(name, &hcalDepthActiveLength_[k]);
355  sprintf(name, "hcal_edepthHot%d", (k + 1));
356  tree_->Branch(name, &hcalDepthEnergyHot_[k]);
357  sprintf(name, "hcal_activeHotL%d", (k + 1));
358  tree_->Branch(name, &hcalDepthActiveLength_[k]);
359  }
360 }
361 
363  hcons_ = &iSetup.getData(tok_ddrec_);
364  actHB_.clear();
365  actHE_.clear();
368 }
369 
372  desc.add<std::string>("ModuleLabel", "g4SimHits");
373  desc.add<std::string>("EBCollection", "EcalHitsEB");
374  desc.add<std::string>("EECollection", "EcalHitsEE");
375  desc.add<std::string>("HCCollection", "HcalHits");
376  desc.addUntracked<int>("Verbosity", 0);
377  desc.addUntracked<int>("MaxDepth", 4);
378  desc.addUntracked<double>("EtaMax", 3.0);
379  desc.addUntracked<double>("TimeMinCutECAL", -500.);
380  desc.addUntracked<double>("TimeMaxCutECAL", 500.);
381  desc.addUntracked<double>("TimeMinCutHCAL", -500.);
382  desc.addUntracked<double>("TimeMaxCutHCAL", 500.);
383  descriptions.add("hcalHBHEMuonSim", desc);
384 }
385 
388  runNumber_ = -99999;
389  eventNumber_ = -99999;
390  lumiNumber_ = -99999;
391  bxNumber_ = -99999;
392 
393  ptGlob_.clear();
394  etaGlob_.clear();
395  phiGlob_.clear();
396  pMuon_.clear();
397  matchedId_.clear();
398  ecal3x3Energy_.clear();
399  ecalDetId_.clear();
400  hcal1x1Energy_.clear();
401  hcalDetId_.clear();
402  hcalHot_.clear();
403  hcalActiveLength_.clear();
404  hcalActiveLengthHot_.clear();
405  for (int k = 0; k < depthMax_; ++k) {
406  hcalDepthEnergy_[k].clear();
407  hcalDepthActiveLength_[k].clear();
408  hcalDepthEnergyHot_[k].clear();
409  hcalDepthActiveLengthHot_[k].clear();
410  }
411 }
412 
414  HcalDetId kd1(id1.subdet(), id1.ieta(), id1.iphi(), 1);
415  HcalDetId kd2(id2.subdet(), id2.ieta(), id2.iphi(), 1);
416  unsigned int match = ((kd1 == kd2) ? 1 : 0);
417  return match;
418 }
419 
421  HcalDetId id(id_);
422  int ieta = id.ietaAbs();
423  int depth = id.depth();
424  double lx(0);
425  if (id.subdet() == HcalBarrel) {
426  for (unsigned int i = 0; i < actHB_.size(); ++i) {
427  if (ieta == actHB_[i].ieta && depth == actHB_[i].depth) {
428  lx = actHB_[i].thick;
429  break;
430  }
431  }
432  } else {
433  for (unsigned int i = 0; i < actHE_.size(); ++i) {
434  if (ieta == actHE_[i].ieta && depth == actHE_[i].depth) {
435  lx = actHE_[i].thick;
436  break;
437  }
438  }
439  }
440  return lx;
441 }
442 
443 //define this as a plug-in
HcalHBHEMuonSimAnalyzer::ecal3x3Energy_
std::vector< double > ecal3x3Energy_
Definition: HcalHBHEMuonSimAnalyzer.cc:85
HcalHBHEMuonSimAnalyzer::analyze
void analyze(edm::Event const &, edm::EventSetup const &) override
Definition: HcalHBHEMuonSimAnalyzer.cc:134
HcalHBHEMuonSimAnalyzer::hcalDepthActiveLength_
std::vector< double > hcalDepthActiveLength_[depthMax_]
Definition: HcalHBHEMuonSimAnalyzer.cc:89
EDAnalyzer.h
mps_fire.i
i
Definition: mps_fire.py:428
HcalHBHEMuonSimAnalyzer::lumiNumber_
unsigned int lumiNumber_
Definition: HcalHBHEMuonSimAnalyzer.cc:83
hit::id
unsigned int id
Definition: SiStripHitEffFromCalibTree.cc:92
HcalHBHEMuonSimAnalyzer::hcalDepthActiveLengthHot_
std::vector< double > hcalDepthActiveLengthHot_[depthMax_]
Definition: HcalHBHEMuonSimAnalyzer.cc:91
HcalHBHEMuonSimAnalyzer::verbosity_
int verbosity_
Definition: HcalHBHEMuonSimAnalyzer.cc:61
HcalHBHEMuonSimAnalyzer::hcalDepthEnergyHot_
std::vector< double > hcalDepthEnergyHot_[depthMax_]
Definition: HcalHBHEMuonSimAnalyzer.cc:90
HcalHBHEMuonSimAnalyzer::depthMax_
static const int depthMax_
Definition: HcalHBHEMuonSimAnalyzer.cc:80
HcalHBHEMuonSimAnalyzer::hcal1x1Energy_
std::vector< double > hcal1x1Energy_
Definition: HcalHBHEMuonSimAnalyzer.cc:85
HcalHBHEMuonSimAnalyzer::hcalDetId_
std::vector< unsigned int > hcalDetId_
Definition: HcalHBHEMuonSimAnalyzer.cc:86
HcalDetId::iphi
constexpr int iphi() const
get the cell iphi
Definition: HcalDetId.h:157
edm::LuminosityBlock
Definition: LuminosityBlock.h:50
HcalDDDRecConstants::getThickActive
std::vector< HcalActiveLength > getThickActive(const int &type) const
Definition: HcalDDDRecConstants.cc:465
edm::Run
Definition: Run.h:45
ecaldqm::zside
int zside(DetId const &)
Definition: EcalDQMCommonUtils.cc:189
HcalHBHEMuonSimAnalyzer
Definition: HcalHBHEMuonSimAnalyzer.cc:41
edm::EDGetTokenT< edm::SimTrackContainer >
HcalHBHEMuonSimAnalyzer::tMaxH_
double tMaxH_
Definition: HcalHBHEMuonSimAnalyzer.cc:65
globals_cff.id1
id1
Definition: globals_cff.py:33
HcalTopology
Definition: HcalTopology.h:26
EBDetId.h
EEDetId.h
edm::ParameterSetDescription
Definition: ParameterSetDescription.h:52
HcalHBHEMuonSimAnalyzer::g4Label_
std::string g4Label_
Definition: HcalHBHEMuonSimAnalyzer.cc:59
HcalHBHEMuonSimAnalyzer::tok_topo_
edm::ESGetToken< HcalTopology, HcalRecNumberingRecord > tok_topo_
Definition: HcalHBHEMuonSimAnalyzer.cc:75
edm::second
U second(std::pair< T, U > const &p)
Definition: ParameterSet.cc:222
HcalHBHEMuonSimAnalyzer::fs_
edm::Service< TFileService > fs_
Definition: HcalHBHEMuonSimAnalyzer.cc:66
HcalHBHEMuonSimAnalyzer::ptGlob_
std::vector< double > ptGlob_
Definition: HcalHBHEMuonSimAnalyzer.cc:84
edm::ParameterSet::getUntrackedParameter
T getUntrackedParameter(std::string const &, T const &) const
HcalHBHEMuonSimAnalyzer::tMinH_
double tMinH_
Definition: HcalHBHEMuonSimAnalyzer.cc:65
edm::one::EDAnalyzer
Definition: EDAnalyzer.h:30
HcalBarrel
Definition: HcalAssistant.h:33
HcalHBHEMuonSimAnalyzer::tok_caloTopology_
edm::ESGetToken< CaloTopology, CaloTopologyRecord > tok_caloTopology_
Definition: HcalHBHEMuonSimAnalyzer.cc:74
edm::Handle< edm::SimTrackContainer >
HcalHBHEMuonSimAnalyzer::matchedId_
std::vector< double > matchedId_
Definition: HcalHBHEMuonSimAnalyzer.cc:87
CaloTopology
Definition: CaloTopology.h:19
HcalHBHEMuonSimAnalyzer::hcalActiveLengthHot_
std::vector< double > hcalActiveLengthHot_
Definition: HcalHBHEMuonSimAnalyzer.cc:92
HcalHBHEMuonSimAnalyzer::fillDescriptions
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
Definition: HcalHBHEMuonSimAnalyzer.cc:370
HcalHBHEMuonSimAnalyzer::beginLuminosityBlock
virtual void beginLuminosityBlock(edm::LuminosityBlock const &, edm::EventSetup const &)
Definition: HcalHBHEMuonSimAnalyzer.cc:53
HcalHBHEMuonSimAnalyzer::activeLength
double activeLength(const DetId &)
Definition: HcalHBHEMuonSimAnalyzer.cc:420
LEDCalibrationChannels.iphi
iphi
Definition: LEDCalibrationChannels.py:64
DetId
Definition: DetId.h:17
HcalHBHEMuonSimAnalyzer::tok_SimVtx_
edm::EDGetTokenT< edm::SimVertexContainer > tok_SimVtx_
Definition: HcalHBHEMuonSimAnalyzer.cc:68
MakerMacros.h
CaloGeometry
Definition: CaloGeometry.h:21
HcalHBHEMuonSimAnalyzer::tMinE_
double tMinE_
Definition: HcalHBHEMuonSimAnalyzer.cc:65
debug
#define debug
Definition: HDRShower.cc:19
spr::energyHCALCell
void energyHCALCell(HcalDetId detId, edm::Handle< T > &hits, std::vector< std::pair< double, int > > &energyCell, int maxDepth=1, double hbThr=-100, double heThr=-100, double hfThr=-100, double hoThr=-100, double tMin=-500, double tMax=500, int useRaw=0, int depthHE=3, bool debug=false)
DEFINE_FWK_MODULE
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
spr::eECALmatrix
double eECALmatrix(const DetId &detId, edm::Handle< T > &hitsEB, edm::Handle< T > &hitsEE, const CaloGeometry *geo, const CaloTopology *caloTopology, int ieta, int iphi, double ebThr=-100, double eeThr=-100, double tMin=-500, double tMax=500, bool debug=false)
edm::ConfigurationDescriptions::add
void add(std::string const &label, ParameterSetDescription const &psetDescription)
Definition: ConfigurationDescriptions.cc:57
HcalHBHEMuonSimAnalyzer::tok_magField_
edm::ESGetToken< MagneticField, IdealMagneticFieldRecord > tok_magField_
Definition: HcalHBHEMuonSimAnalyzer.cc:76
HcalHBHEMuonSimAnalyzer::hcalActiveLength_
std::vector< double > hcalActiveLength_
Definition: HcalHBHEMuonSimAnalyzer.cc:92
spr::propagatedTrackDirection::okECAL
bool okECAL
Definition: CaloPropagateTrack.h:57
Service.h
HcalHBHEMuonSimAnalyzer::maxDepth_
int maxDepth_
Definition: HcalHBHEMuonSimAnalyzer.cc:61
HcalHBHEMuonSimAnalyzer::tok_ddrec_
edm::ESGetToken< HcalDDDRecConstants, HcalRecNumberingRecord > tok_ddrec_
Definition: HcalHBHEMuonSimAnalyzer.cc:72
SimVertex.h
eHCALMatrix.h
IdealMagneticFieldRecord.h
HcalHBHEMuonSimAnalyzer::runNumber_
unsigned int runNumber_
Definition: HcalHBHEMuonSimAnalyzer.cc:83
spr::trackAtOrigin
Definition: CaloPropagateTrack.h:90
dqmdumpme.k
k
Definition: dqmdumpme.py:60
HcalHBHEMuonSimAnalyzer::bxNumber_
unsigned int bxNumber_
Definition: HcalHBHEMuonSimAnalyzer.cc:83
HcalHBHEMuonSimAnalyzer::tok_SimTk_
edm::EDGetTokenT< edm::SimTrackContainer > tok_SimTk_
Definition: HcalHBHEMuonSimAnalyzer.cc:67
eECALMatrix.h
LEDCalibrationChannels.depth
depth
Definition: LEDCalibrationChannels.py:65
HcalDDDRecConstants::getMinDepth
int getMinDepth(const int &itype, const int &ieta, const int &iphi, const int &zside) const
Definition: HcalDDDRecConstants.cc:353
CaloGeometryRecord.h
edm::ConfigurationDescriptions
Definition: ConfigurationDescriptions.h:28
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
TFileService.h
HcalHBHEMuonSimAnalyzer::ebLabel_
std::string ebLabel_
Definition: HcalHBHEMuonSimAnalyzer.cc:59
LEDCalibrationChannels.ieta
ieta
Definition: LEDCalibrationChannels.py:63
CaloSubdetectorGeometry.h
HcalDetId::ieta
constexpr int ieta() const
get the cell ieta
Definition: HcalDetId.h:155
spr::propagatedTrackDirection::pointHCAL
GlobalPoint pointHCAL
Definition: CaloPropagateTrack.h:59
edm::ParameterSet
Definition: ParameterSet.h:47
HcalHBHEMuonSimAnalyzer::tMaxE_
double tMaxE_
Definition: HcalHBHEMuonSimAnalyzer.cc:65
Event.h
HcalHBHEMuonSimAnalyzer::idMuon_
const int idMuon_
Definition: HcalHBHEMuonSimAnalyzer.cc:81
HcalHBHEMuonSimAnalyzer::hcalDepthEnergy_
std::vector< double > hcalDepthEnergy_[depthMax_]
Definition: HcalHBHEMuonSimAnalyzer.cc:88
spr::propagatedTrackDirection::detIdHCAL
DetId detIdHCAL
Definition: CaloPropagateTrack.h:58
spr::trackAtOrigin::ok
bool ok
Definition: CaloPropagateTrack.h:92
HcalDetId.h
HcalHitRelabeller.h
match
std::pair< typename Association::data_type::first_type, double > match(Reference key, Association association, bool bestMatchByMaxValue)
Generic matching function.
Definition: Utils.h:10
CaloTopologyRecord.h
HcalHBHEMuonSimAnalyzer::clearVectors
void clearVectors()
Definition: HcalHBHEMuonSimAnalyzer.cc:386
PV3DBase::eta
T eta() const
Definition: PV3DBase.h:73
HcalDetId::subdet
constexpr HcalSubdetector subdet() const
get the subdetector
Definition: HcalDetId.h:138
HcalDetId
Definition: HcalDetId.h:12
edm::Service< TFileService >
TriggerNames.h
iEvent
int iEvent
Definition: GenABIO.cc:224
HcalHBHEMuonSimAnalyzer::tok_caloHH_
edm::EDGetTokenT< edm::PCaloHitContainer > tok_caloHH_
Definition: HcalHBHEMuonSimAnalyzer.cc:70
HcalHBHEMuonSimAnalyzer::eventNumber_
unsigned int eventNumber_
Definition: HcalHBHEMuonSimAnalyzer.cc:83
MagneticField.h
HcalHBHEMuonSimAnalyzer::~HcalHBHEMuonSimAnalyzer
~HcalHBHEMuonSimAnalyzer() override
Definition: HcalHBHEMuonSimAnalyzer.cc:132
edm::EventSetup
Definition: EventSetup.h:58
HcalHBHEMuonSimAnalyzer::beginRun
void beginRun(edm::Run const &, edm::EventSetup const &) override
Definition: HcalHBHEMuonSimAnalyzer.cc:362
PCaloHit
Definition: PCaloHit.h:8
HcalHBHEMuonSimAnalyzer::tok_caloEB_
edm::EDGetTokenT< edm::PCaloHitContainer > tok_caloEB_
Definition: HcalHBHEMuonSimAnalyzer.cc:69
spr::simTrackAtOrigin
spr::trackAtOrigin simTrackAtOrigin(unsigned int thisTrk, edm::Handle< edm::SimTrackContainer > &SimTk, edm::Handle< edm::SimVertexContainer > &SimVtx, bool debug=false)
Definition: CaloPropagateTrack.cc:922
spr::propagatedTrackDirection::directionECAL
GlobalVector directionECAL
Definition: CaloPropagateTrack.h:60
edm::ESGetToken< HcalDDDRecConstants, HcalRecNumberingRecord >
HcalHBHEMuonSimAnalyzer::endRun
void endRun(edm::Run const &, edm::EventSetup const &) override
Definition: HcalHBHEMuonSimAnalyzer.cc:52
spr::propagatedTrackDirection::directionHCAL
GlobalVector directionHCAL
Definition: CaloPropagateTrack.h:60
edm::EventSetup::getData
bool getData(T &iHolder) const
Definition: EventSetup.h:127
HcalHBHEMuonSimAnalyzer::phiGlob_
std::vector< double > phiGlob_
Definition: HcalHBHEMuonSimAnalyzer.cc:84
CaloTopology.h
HcalHBHEMuonSimAnalyzer::actHB_
std::vector< HcalDDDRecConstants::HcalActiveLength > actHB_
Definition: HcalHBHEMuonSimAnalyzer.cc:63
photonIsolationHIProducer_cfi.hbhe
hbhe
Definition: photonIsolationHIProducer_cfi.py:8
HcalSubdetector
HcalSubdetector
Definition: HcalAssistant.h:31
spr::propagateCALO
std::vector< spr::propagatedTrackID > propagateCALO(edm::Handle< reco::TrackCollection > &trkCollection, const CaloGeometry *geo, const MagneticField *bField, const std::string &theTrackQuality, bool debug=false)
Definition: CaloPropagateTrack.cc:141
HcalHBHEMuonSimAnalyzer::etaGlob_
std::vector< double > etaGlob_
Definition: HcalHBHEMuonSimAnalyzer.cc:84
HcalHBHEMuonSimAnalyzer::actHE_
std::vector< HcalDDDRecConstants::HcalActiveLength > actHE_
Definition: HcalHBHEMuonSimAnalyzer.cc:63
PV3DBase::mag
T mag() const
Definition: PV3DBase.h:64
HcalHBHEMuonSimAnalyzer::pMuon_
std::vector< double > pMuon_
Definition: HcalHBHEMuonSimAnalyzer.cc:84
CaloSubdetectorTopology.h
HcalHitRelabeller::relabel
DetId relabel(const uint32_t testId) const
Definition: HcalHitRelabeller.cc:49
spr::trackAtOrigin::position
GlobalPoint position
Definition: CaloPropagateTrack.h:94
HcalTopology.h
submitPVResolutionJobs.desc
string desc
Definition: submitPVResolutionJobs.py:251
spr::propagatedTrackDirection::pointECAL
GlobalPoint pointECAL
Definition: CaloPropagateTrack.h:59
DetId::rawId
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
HcalHBHEMuonSimAnalyzer::eeLabel_
std::string eeLabel_
Definition: HcalHBHEMuonSimAnalyzer.cc:59
spr::propagateHCALBack
spr::propagatedTrackDirection propagateHCALBack(unsigned int thisTrk, edm::Handle< edm::SimTrackContainer > &SimTk, edm::Handle< edm::SimVertexContainer > &SimVtx, const CaloGeometry *geo, const MagneticField *bField, bool debug=false)
Definition: CaloPropagateTrack.cc:619
Calorimetry_cff.bField
bField
Definition: Calorimetry_cff.py:284
HcalEndcap
Definition: HcalAssistant.h:34
Frameworkfwd.h
HcalHBHEMuonSimAnalyzer::endLuminosityBlock
virtual void endLuminosityBlock(edm::LuminosityBlock const &, edm::EventSetup const &)
Definition: HcalHBHEMuonSimAnalyzer.cc:54
spr::trackAtOrigin::charge
int charge
Definition: CaloPropagateTrack.h:93
edm::LogVerbatim
Log< level::Info, true > LogVerbatim
Definition: MessageLogger.h:128
CaloPropagateTrack.h
triggerObjects_cff.id
id
Definition: triggerObjects_cff.py:29
CaloGeometry.h
TFileService::kSharedResource
static const std::string kSharedResource
Definition: TFileService.h:76
spr::trackAtOrigin::momentum
GlobalVector momentum
Definition: CaloPropagateTrack.h:95
spr::propagatedTrackDirection::detIdECAL
DetId detIdECAL
Definition: CaloPropagateTrack.h:58
HcalHBHEMuonSimAnalyzer::HcalHBHEMuonSimAnalyzer
HcalHBHEMuonSimAnalyzer(const edm::ParameterSet &)
Definition: HcalHBHEMuonSimAnalyzer.cc:95
HcalHBHEMuonSimAnalyzer::tree_
TTree * tree_
Definition: HcalHBHEMuonSimAnalyzer.cc:82
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
PCaloHitContainer.h
spr::eHCALmatrix
double eHCALmatrix(const HcalTopology *topology, const DetId &det, edm::Handle< T > &hits, int ieta, int iphi, bool includeHO=false, bool algoNew=true, double hbThr=-100, double heThr=-100, double hfThr=-100, double hoThr=-100, double tMin=-500, double tMax=500, int useRaw=0, bool debug=false)
HcalHBHEMuonSimAnalyzer::matchId
unsigned int matchId(const HcalDetId &, const HcalDetId &)
Definition: HcalHBHEMuonSimAnalyzer.cc:413
HcalDDDRecConstants
Definition: HcalDDDRecConstants.h:23
HcalHBHEMuonSimAnalyzer::hcons_
const HcalDDDRecConstants * hcons_
Definition: HcalHBHEMuonSimAnalyzer.cc:78
funct::abs
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
HcalHBHEMuonSimAnalyzer::etaMax_
double etaMax_
Definition: HcalHBHEMuonSimAnalyzer.cc:62
SimTrack.h
ParameterSet.h
HcalHBHEMuonSimAnalyzer::hcalHot_
std::vector< unsigned int > hcalHot_
Definition: HcalHBHEMuonSimAnalyzer.cc:86
globals_cff.id2
id2
Definition: globals_cff.py:34
HcalDetId::zside
constexpr int zside() const
get the z-side of the cell (1/-1)
Definition: HcalDetId.h:141
HcalHBHEMuonSimAnalyzer::tok_geom_
edm::ESGetToken< CaloGeometry, CaloGeometryRecord > tok_geom_
Definition: HcalHBHEMuonSimAnalyzer.cc:73
edm::Event
Definition: Event.h:73
MagneticField
Definition: MagneticField.h:19
edm::Log
Definition: MessageLogger.h:70
HcalHBHEMuonSimAnalyzer::beginJob
void beginJob() override
Definition: HcalHBHEMuonSimAnalyzer.cc:330
spr::propagatedTrackDirection::okHCAL
bool okHCAL
Definition: CaloPropagateTrack.h:57
TauDecayModes.dec
dec
Definition: TauDecayModes.py:143
SimTrackContainer.h
PV3DBase::perp
T perp() const
Definition: PV3DBase.h:69
edm::InputTag
Definition: InputTag.h:15
spr::propagatedTrackDirection
Definition: CaloPropagateTrack.h:51
PV3DBase::phi
Geom::Phi< T > phi() const
Definition: PV3DBase.h:66
SimVertexContainer.h
HcalHBHEMuonSimAnalyzer::hcLabel_
std::string hcLabel_
Definition: HcalHBHEMuonSimAnalyzer.cc:60
HcalHBHEMuonSimAnalyzer::tok_caloEE_
edm::EDGetTokenT< edm::PCaloHitContainer > tok_caloEE_
Definition: HcalHBHEMuonSimAnalyzer.cc:69
hit
Definition: SiStripHitEffFromCalibTree.cc:88
TFileService::make
T * make(const Args &... args) const
make new ROOT object
Definition: TFileService.h:64
HcalHBHEMuonSimAnalyzer::ecalDetId_
std::vector< unsigned int > ecalDetId_
Definition: HcalHBHEMuonSimAnalyzer.cc:86