CMS 3D CMS Logo

HcalRaddamMuon.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
33 
37 
41 
53 
54 class HcalRaddamMuon : public edm::one::EDAnalyzer<edm::one::WatchRuns, edm::one::SharedResources> {
55 public:
56  explicit HcalRaddamMuon(const edm::ParameterSet&);
57  ~HcalRaddamMuon() override;
58 
59  static void fillDescriptions(edm::ConfigurationDescriptions& descriptions);
60 
61 private:
62  void beginJob() override;
63  void analyze(const edm::Event&, const edm::EventSetup&) override;
64  void endJob() override;
65  void beginRun(edm::Run const&, edm::EventSetup const&) override;
66  void endRun(edm::Run const&, edm::EventSetup const&) override;
67  void clearVectors();
68  int matchId(const HcalDetId&, const HcalDetId&);
69  double activeLength(const DetId&);
70 
71  // ----------member data ---------------------------
74 
78  std::vector<double> EtaGlob;
86  std::vector<bool> innerTrack, OuterTrack, GlobalTrack;
87  std::vector<double> IsolationR04, IsolationR03;
94 
95  //
101 
102  //
103  std::vector<double> MuonHcalActiveLength;
104  std::vector<HcalDDDRecConstants::HcalActiveLength> actHB, actHE;
110  const int verbosity_, useRaw_;
111  const bool isAOD_;
115 
116  std::vector<bool> isHB, isHE;
117  TTree* TREE;
118  std::vector<bool> all_ifTriggerpassed;
120  std::vector<int> hltresults;
121  std::vector<float> energy_hb, time_hb;
122  std::vector<std::string> hltpaths, TrigName_;
123  std::vector<int> v_RH_h3x3_ieta;
124  std::vector<int> v_RH_h3x3_iphi;
125  std::vector<double> v_RH_h3x3_ene, PxGlob, PyGlob, PzGlob, Pthetha;
128  double h3x3, h3x3Calo;
134 
143 };
144 
146  : hlTriggerResults_(iConfig.getUntrackedParameter<edm::InputTag>("hlTriggerResults_")),
147  muonsrc_(iConfig.getUntrackedParameter<edm::InputTag>("muonSource")),
148  verbosity_(iConfig.getUntrackedParameter<int>("verbosity", 0)),
149  useRaw_(iConfig.getUntrackedParameter<int>("UseRaw", 0)),
150  isAOD_(iConfig.getUntrackedParameter<bool>("IsAOD", false)) {
151  usesResource(TFileService::kSharedResource);
152 
153  //now do what ever initialization is needed
154  maxDepth_ = iConfig.getUntrackedParameter<int>("MaxDepth", 4);
155  if (maxDepth_ > 7)
156  maxDepth_ = 7;
157  else if (maxDepth_ < 1)
158  maxDepth_ = 4;
159 
160  tok_hcal_ = consumes<edm::PCaloHitContainer>(edm::InputTag("g4SimHits", "HcalHits"));
161  tok_trigRes_ = consumes<edm::TriggerResults>(hlTriggerResults_);
162  tok_recVtx_ = consumes<reco::VertexCollection>(edm::InputTag("offlinePrimaryVertices"));
163  tok_bs_ = consumes<reco::BeamSpot>(edm::InputTag("offlineBeamSpot"));
164  if (isAOD_) {
165  tok_EB_ = consumes<EcalRecHitCollection>(edm::InputTag("reducedEcalRecHitsEB"));
166  tok_EE_ = consumes<EcalRecHitCollection>(edm::InputTag("reducedEcalRecHitsEE"));
167  tok_hbhe_ = consumes<HBHERecHitCollection>(edm::InputTag("reducedHcalRecHits", "hbhereco"));
168  } else {
169  tok_EB_ = consumes<EcalRecHitCollection>(edm::InputTag("ecalRecHit", "EcalRecHitsEB"));
170  tok_EE_ = consumes<EcalRecHitCollection>(edm::InputTag("ecalRecHit", "EcalRecHitsEE"));
171  tok_hbhe_ = consumes<HBHERecHitCollection>(edm::InputTag("hbhereco"));
172  }
173  tok_muon_ = consumes<reco::MuonCollection>(muonsrc_);
174 }
175 
177  // do anything here that needs to be done at desctruction time
178  // (e.g. close files, deallocate resources etc.)
179 }
180 
181 //
182 // member functions
183 //
184 
185 // ------------ method called for each event ------------
187  clearVectors();
188  RunNumber = iEvent.id().run();
189  EventNumber = iEvent.id().event();
190  LumiNumber = iEvent.id().luminosityBlock();
191  BXNumber = iEvent.bunchCrossing();
192 
194  iEvent.getByToken(tok_hcal_, calosimhits);
195 
197  iEvent.getByToken(tok_trigRes_, _Triggers);
198 
199  if ((verbosity_ % 10) > 1)
200  std::cout << "size of all triggers " << all_triggers.size() << std::endl;
201  int Ntriggers = all_triggers.size();
202 
203  if ((verbosity_ % 10) > 1)
204  std::cout << "size of HLT MENU: " << _Triggers->size() << std::endl;
205 
206  if (_Triggers.isValid()) {
207  const edm::TriggerNames& triggerNames_ = iEvent.triggerNames(*_Triggers);
208 
209  std::vector<int> index;
210  for (int i = 0; i < Ntriggers; i++) {
211  index.push_back(triggerNames_.triggerIndex(all_triggers[i]));
212  int triggerSize = int(_Triggers->size());
213  if ((verbosity_ % 10) > 2)
214  std::cout << "outside loop " << index[i] << "\ntriggerSize " << triggerSize << std::endl;
215  if (index[i] < triggerSize) {
216  hltresults.push_back(_Triggers->accept(index[i]));
217  if ((verbosity_ % 10) > 2)
218  std::cout << "trigger_info " << triggerSize << " triggerSize " << index[i] << " trigger_index "
219  << hltresults.at(i) << " hltresult " << std::endl;
220  } else {
221  edm::LogInfo("TriggerBlock") << "Requested HLT path \""
222  << "\" does not exist";
223  }
224  }
225  }
226 
227  // get handles to calogeometry and calotopology
229  iSetup.get<CaloGeometryRecord>().get(pG);
230  const CaloGeometry* geo = pG.product();
231 
233  iSetup.get<IdealMagneticFieldRecord>().get(bFieldH);
234  const MagneticField* bField = bFieldH.product();
235 
237  iSetup.get<EcalChannelStatusRcd>().get(ecalChStatus);
238  const EcalChannelStatus* theEcalChStatus = ecalChStatus.product();
239 
241  iSetup.get<EcalSeverityLevelAlgoRcd>().get(sevlv);
242 
243  edm::ESHandle<CaloTopology> theCaloTopology;
244  iSetup.get<CaloTopologyRecord>().get(theCaloTopology);
245  const CaloTopology* caloTopology = theCaloTopology.product();
246 
248  iSetup.get<HcalRecNumberingRecord>().get(htopo);
249  const HcalTopology* theHBHETopology = htopo.product();
250 
252  iEvent.getByToken(tok_bs_, bmspot);
253 
255  iEvent.getByToken(tok_recVtx_, vtx);
256 
257  edm::Handle<EcalRecHitCollection> barrelRecHitsHandle;
258  edm::Handle<EcalRecHitCollection> endcapRecHitsHandle;
259  iEvent.getByToken(tok_EB_, barrelRecHitsHandle);
260  iEvent.getByToken(tok_EE_, endcapRecHitsHandle);
261 
263  iEvent.getByToken(tok_hbhe_, hbhe);
264 
266  iEvent.getByToken(tok_muon_, _Muon);
267  const reco::Vertex& vertex = (*(vtx)->begin());
268 
269  math::XYZPoint bspot;
270  bspot = (bmspot.isValid()) ? bmspot->position() : math::XYZPoint(0, 0, 0);
271 
272  if (_Muon.isValid()) {
273  for (reco::MuonCollection::const_iterator RecMuon = _Muon->begin(); RecMuon != _Muon->end(); ++RecMuon) {
274  muon_is_good.push_back(RecMuon->isPFMuon());
275  muon_global.push_back(RecMuon->isGlobalMuon());
276  muon_tracker.push_back(RecMuon->isTrackerMuon());
277  PtGlob.push_back((RecMuon)->pt());
278  EtaGlob.push_back(RecMuon->eta());
279  PhiGlob.push_back(RecMuon->phi());
280  Energy.push_back(RecMuon->energy());
281  Pmuon.push_back(RecMuon->p());
282  // if (RecMuon->isPFMuon()) goodEvent = true;
283  // acessing tracker hits info
284  if (RecMuon->track().isNonnull()) {
285  TrackerLayer.push_back(RecMuon->track()->hitPattern().trackerLayersWithMeasurement());
286  } else {
287  TrackerLayer.push_back(-1);
288  }
289  if (RecMuon->innerTrack().isNonnull()) {
290  innerTrack.push_back(true);
291  NumPixelLayers.push_back(RecMuon->innerTrack()->hitPattern().pixelLayersWithMeasurement());
292  chiTracker.push_back(RecMuon->innerTrack()->normalizedChi2());
293  DxyTracker.push_back(fabs(RecMuon->innerTrack()->dxy((vertex).position())));
294  DzTracker.push_back(fabs(RecMuon->innerTrack()->dz((vertex).position())));
295  innerTrackpt.push_back(RecMuon->innerTrack()->pt());
296  innerTracketa.push_back(RecMuon->innerTrack()->eta());
297  innerTrackphi.push_back(RecMuon->innerTrack()->phi());
298  Tight_PixelHits.push_back(RecMuon->innerTrack()->hitPattern().numberOfValidPixelHits());
299  } else {
300  innerTrack.push_back(false);
301  NumPixelLayers.push_back(0);
302  chiTracker.push_back(0);
303  DxyTracker.push_back(0);
304  DzTracker.push_back(0);
305  innerTrackpt.push_back(0);
306  innerTracketa.push_back(0);
307  innerTrackphi.push_back(0);
308  Tight_PixelHits.push_back(0);
309  }
310  // outer track info
311 
312  if (RecMuon->outerTrack().isNonnull()) {
313  OuterTrack.push_back(true);
314  OuterTrackPt.push_back(RecMuon->outerTrack()->pt());
315  OuterTrackEta.push_back(RecMuon->outerTrack()->eta());
316  OuterTrackPhi.push_back(RecMuon->outerTrack()->phi());
317  OuterTrackChi.push_back(RecMuon->outerTrack()->normalizedChi2());
318  OuterTrackHits.push_back(RecMuon->outerTrack()->numberOfValidHits());
319  OuterTrackRHits.push_back(RecMuon->outerTrack()->recHitsSize());
320  } else {
321  OuterTrack.push_back(false);
322  OuterTrackPt.push_back(0);
323  OuterTrackEta.push_back(0);
324  OuterTrackPhi.push_back(0);
325  OuterTrackChi.push_back(0);
326  OuterTrackHits.push_back(0);
327  OuterTrackRHits.push_back(0);
328  }
329  // Tight Muon cuts
330  if (RecMuon->globalTrack().isNonnull()) {
331  GlobalTrack.push_back(true);
332  chiGlobal.push_back(RecMuon->globalTrack()->normalizedChi2());
333  GlobalMuonHits.push_back(RecMuon->globalTrack()->hitPattern().numberOfValidMuonHits());
334  MatchedStat.push_back(RecMuon->numberOfMatchedStations());
335  GlobalTrckPt.push_back(RecMuon->globalTrack()->pt());
336  GlobalTrckEta.push_back(RecMuon->globalTrack()->eta());
337  GlobalTrckPhi.push_back(RecMuon->globalTrack()->phi());
338  Tight_TransImpara.push_back(fabs(RecMuon->muonBestTrack()->dxy(vertex.position())));
339  Tight_LongPara.push_back(fabs(RecMuon->muonBestTrack()->dz(vertex.position())));
340  } else {
341  GlobalTrack.push_back(false);
342  chiGlobal.push_back(0);
343  GlobalMuonHits.push_back(0);
344  MatchedStat.push_back(0);
345  GlobalTrckPt.push_back(0);
346  GlobalTrckEta.push_back(0);
347  GlobalTrckPhi.push_back(0);
348  Tight_TransImpara.push_back(0);
349  Tight_LongPara.push_back(0);
350  }
351 
352  IsolationR04.push_back(
353  ((RecMuon->pfIsolationR04().sumChargedHadronPt +
354  std::max(0.,
355  RecMuon->pfIsolationR04().sumNeutralHadronEt + RecMuon->pfIsolationR04().sumPhotonEt -
356  (0.5 * RecMuon->pfIsolationR04().sumPUPt))) /
357  RecMuon->pt()));
358 
359  IsolationR03.push_back(
360  ((RecMuon->pfIsolationR03().sumChargedHadronPt +
361  std::max(0.,
362  RecMuon->pfIsolationR03().sumNeutralHadronEt + RecMuon->pfIsolationR03().sumPhotonEt -
363  (0.5 * RecMuon->pfIsolationR03().sumPUPt))) /
364  RecMuon->pt()));
365 
366  MuonEcalEnergy.push_back(RecMuon->calEnergy().emS9);
367  MuonHcalEnergy.push_back(RecMuon->calEnergy().hadS9);
368  MuonHOEnergy.push_back(RecMuon->calEnergy().hoS9);
369 
370  double eEcal(0), eHcal(0), activeL(0), eHcalDepth[7], eHcalDepthHot[7], eHcalDepthCalo[7], eHcalDepthHotCalo[7];
371  unsigned int isHot = 0;
372  unsigned int isHotCalo = 0;
373 
374  for (int i = 0; i < 7; ++i)
375  eHcalDepth[i] = eHcalDepthHot[i] = eHcalDepthCalo[i] = eHcalDepthHotCalo[i] = -10000;
376 
377  if (RecMuon->innerTrack().isNonnull()) {
378  const reco::Track* pTrack = (RecMuon->innerTrack()).get();
379  spr::propagatedTrackID trackID = spr::propagateCALO(pTrack, geo, bField, (((verbosity_ / 100) % 10 > 0)));
380 
381  MuonEcalDetId.push_back((trackID.detIdECAL)());
382  MuonHcalDetId.push_back((trackID.detIdHCAL)());
383  MuonEHcalDetId.push_back((trackID.detIdEHCAL)());
384 
385  if (trackID.okECAL) {
386  const DetId isoCell(trackID.detIdECAL);
387  std::pair<double, bool> e3x3 = spr::eECALmatrix(isoCell,
388  barrelRecHitsHandle,
389  endcapRecHitsHandle,
390  *theEcalChStatus,
391  geo,
392  caloTopology,
393  sevlv.product(),
394  1,
395  1,
396  -100.0,
397  -100.0,
398  -500.0,
399  500.0,
400  false);
401 
402  eEcal = e3x3.first;
403  //std::cout<<"eEcal"<<eEcal<<std::endl;
404  }
405 
406  if (trackID.okHCAL) {
407  const DetId closestCell(trackID.detIdHCAL);
408  eHcal = spr::eHCALmatrix(theHBHETopology,
409  closestCell,
410  hbhe,
411  0,
412  0,
413  false,
414  true,
415  -100.0,
416  -100.0,
417  -100.0,
418  -100.0,
419  -500.,
420  500.,
421  useRaw_);
422 
423  int iphi = ((HcalDetId)(closestCell)).iphi();
424  int zside = ((HcalDetId)(closestCell)).iphi();
425  int depthHE = theHBHETopology->dddConstants()->getMinDepth(1, 16, iphi, zside);
426  //std::cout<<"eHcal"<<eHcal<<std::endl;
427  std::vector<std::pair<double, int> > ehdepth;
428  spr::energyHCALCell((HcalDetId)closestCell,
429  hbhe,
430  ehdepth,
431  maxDepth_,
432  -100.0,
433  -100.0,
434  -100.0,
435  -100.0,
436  -500.0,
437  500.0,
438  useRaw_,
439  depthHE,
440  (((verbosity_ / 1000) % 10) > 0));
441  for (unsigned int i = 0; i < ehdepth.size(); ++i) {
442  eHcalDepth[ehdepth[i].second - 1] = ehdepth[i].first;
443  //std::cout<<eHcalDepth[ehdepth[i].second-1]<<std::endl;
444  }
445 
446  eHcal = spr::eHCALmatrix(theHBHETopology,
447  closestCell,
448  calosimhits,
449  0,
450  0,
451  false,
452  true,
453  -100.0,
454  -100.0,
455  -100.0,
456  -100.0,
457  -500.,
458  500.,
459  useRaw_);
460 
461  //std::cout<<"eHcal"<<eHcal<<std::endl;
462  const DetId closestCellCalo(trackID.detIdHCAL);
463  iphi = ((HcalDetId)(closestCellCalo)).iphi();
464  zside = ((HcalDetId)(closestCellCalo)).iphi();
465  depthHE = theHBHETopology->dddConstants()->getMinDepth(1, 16, iphi, zside);
466  std::vector<std::pair<double, int> > ehdepthCalo;
467  spr::energyHCALCell((HcalDetId)closestCellCalo,
468  calosimhits,
469  ehdepthCalo,
470  maxDepth_,
471  -100.0,
472  -100.0,
473  -100.0,
474  -100.0,
475  -500.0,
476  500.0,
477  useRaw_,
478  depthHE,
479  (((verbosity_ / 1000) % 10) > 0));
480  for (unsigned int i = 0; i < ehdepthCalo.size(); ++i) {
481  eHcalDepthCalo[ehdepthCalo[i].second - 1] = ehdepthCalo[i].first;
482  //std::cout<<eHcalDepth[ehdepth[i].second-1]<<std::endl;
483  }
484 
485  HcalDetId hcid0(closestCell.rawId());
486  activeL = activeLength(trackID.detIdHCAL);
487 
488  std::cout << activeL << std::endl;
489  HcalDetId hotCell, hotCellCalo;
490  h3x3 = spr::eHCALmatrix(geo, theHBHETopology, closestCell, hbhe, 1, 1, hotCell, false, useRaw_, false);
492  geo, theHBHETopology, closestCellCalo, calosimhits, 1, 1, hotCellCalo, false, useRaw_, false);
493 
494  isHot = matchId(closestCell, hotCell);
495  isHotCalo = matchId(closestCellCalo, hotCellCalo);
496 
497  // std::cout<<"hcal 3X3 < "<<h3x3<<">" << " ClosestCell <" << (HcalDetId)(closestCell) << "> hotCell id < " << hotCell << "> isHot" << isHot << std::endl;
498  if (hotCell != HcalDetId()) {
499  iphi = ((HcalDetId)(hotCell)).iphi();
500  zside = ((HcalDetId)(hotCell)).iphi();
501  depthHE = theHBHETopology->dddConstants()->getMinDepth(1, 16, iphi, zside);
502  std::vector<std::pair<double, int> > ehdepth;
503  spr::energyHCALCell(hotCell,
504  hbhe,
505  ehdepth,
506  maxDepth_,
507  -100.0,
508  -100.0,
509  -100.0,
510  -100.0,
511  -500.0,
512  500.0,
513  depthHE,
514  false); //(((verbosity_/1000)%10)>0));
515  for (unsigned int i = 0; i < ehdepth.size(); ++i) {
516  eHcalDepthHot[ehdepth[i].second - 1] = ehdepth[i].first;
517  // std::cout<<eHcalDepthHot[ehdepth[i].second-1]<<std::endl;
518  }
519  }
520 
521  if (hotCellCalo != HcalDetId()) {
522  iphi = ((HcalDetId)(hotCellCalo)).iphi();
523  zside = ((HcalDetId)(hotCellCalo)).iphi();
524  depthHE = theHBHETopology->dddConstants()->getMinDepth(1, 16, iphi, zside);
525  std::vector<std::pair<double, int> > ehdepthCalo;
526 
527  spr::energyHCALCell(hotCellCalo,
528  calosimhits,
529  ehdepthCalo,
530  maxDepth_,
531  -100.0,
532  -100.0,
533  -100.0,
534  -100.0,
535  -500.0,
536  500.0,
537  useRaw_,
538  depthHE,
539  false);
540  for (unsigned int i = 0; i < ehdepthCalo.size(); ++i) {
541  eHcalDepthHotCalo[ehdepthCalo[i].second - 1] = ehdepthCalo[i].first;
542  // std::cout<<eHcalDepthHot[ehdepth[i].second-1]<<std::endl;
543  }
544  }
545  }
546  } else {
547  MuonEcalDetId.push_back(0);
548  MuonHcalDetId.push_back(0);
549  MuonEHcalDetId.push_back(0);
550  }
551 
552  MuonEcal3x3Energy.push_back(eEcal);
553  MuonHcal1x1Energy.push_back(eHcal);
554  MuonHcalDepth1Energy.push_back(eHcalDepth[0]);
555  MuonHcalDepth2Energy.push_back(eHcalDepth[1]);
556  MuonHcalDepth3Energy.push_back(eHcalDepth[2]);
557  MuonHcalDepth4Energy.push_back(eHcalDepth[3]);
558  MuonHcalDepth5Energy.push_back(eHcalDepth[4]);
559  MuonHcalDepth6Energy.push_back(eHcalDepth[5]);
560  MuonHcalDepth7Energy.push_back(eHcalDepth[6]);
561  MuonHcalDepth1HotEnergy.push_back(eHcalDepthHot[0]);
562  MuonHcalDepth2HotEnergy.push_back(eHcalDepthHot[1]);
563  MuonHcalDepth3HotEnergy.push_back(eHcalDepthHot[2]);
564  MuonHcalDepth4HotEnergy.push_back(eHcalDepthHot[3]);
565  MuonHcalDepth5HotEnergy.push_back(eHcalDepthHot[4]);
566  MuonHcalDepth6HotEnergy.push_back(eHcalDepthHot[5]);
567  MuonHcalDepth7HotEnergy.push_back(eHcalDepthHot[6]);
568  MuonHcalHot.push_back(isHot);
569 
570  //
571  MuonHcalDepth1EnergyCalo.push_back(eHcalDepthCalo[0]);
572  MuonHcalDepth2EnergyCalo.push_back(eHcalDepthCalo[1]);
573  MuonHcalDepth3EnergyCalo.push_back(eHcalDepthCalo[2]);
574  MuonHcalDepth4EnergyCalo.push_back(eHcalDepthCalo[3]);
575  MuonHcalDepth5EnergyCalo.push_back(eHcalDepthCalo[4]);
576  MuonHcalDepth6EnergyCalo.push_back(eHcalDepthCalo[5]);
577  MuonHcalDepth7EnergyCalo.push_back(eHcalDepthCalo[6]);
578  MuonHcalDepth1HotEnergyCalo.push_back(eHcalDepthHotCalo[0]);
579  MuonHcalDepth2HotEnergyCalo.push_back(eHcalDepthHotCalo[1]);
580  MuonHcalDepth3HotEnergyCalo.push_back(eHcalDepthHotCalo[2]);
581  MuonHcalDepth4HotEnergyCalo.push_back(eHcalDepthHotCalo[3]);
582  MuonHcalDepth5HotEnergyCalo.push_back(eHcalDepthHotCalo[4]);
583  MuonHcalDepth6HotEnergyCalo.push_back(eHcalDepthHotCalo[5]);
584  MuonHcalDepth7HotEnergyCalo.push_back(eHcalDepthHotCalo[6]);
585  MuonHcalHotCalo.push_back(isHotCalo);
586 
587  //
588  MuonHcalActiveLength.push_back(activeL);
589  }
590  }
591  TREE->Fill();
592 }
593 
594 // ------------ method called once each job just before starting event loop ------------
596  TREE = fs->make<TTree>("TREE", "TREE");
597  TREE->Branch("Event_No", &EventNumber);
598  TREE->Branch("Run_No", &RunNumber);
599  TREE->Branch("LumiNumber", &LumiNumber);
600  TREE->Branch("BXNumber", &BXNumber);
601  TREE->Branch("pt_of_muon", &PtGlob);
602  TREE->Branch("eta_of_muon", &EtaGlob);
603  TREE->Branch("phi_of_muon", &PhiGlob);
604  TREE->Branch("energy_of_muon", &Energy);
605  TREE->Branch("p_of_muon", &Pmuon);
606  TREE->Branch("PF_Muon", &muon_is_good);
607  TREE->Branch("Global_Muon", &muon_global);
608  TREE->Branch("Tracker_muon", &muon_tracker);
609 
610  TREE->Branch("hcal_3into3", &MuonHcalEnergy);
611  TREE->Branch("hcal_1x1", &MuonHcal1x1Energy);
612  TREE->Branch("hcal_detID", &MuonHcalDetId);
613  TREE->Branch("hcal_edepth1", &MuonHcalDepth1Energy);
614  TREE->Branch("hcal_edepth2", &MuonHcalDepth2Energy);
615  TREE->Branch("hcal_edepth3", &MuonHcalDepth3Energy);
616  TREE->Branch("hcal_edepth4", &MuonHcalDepth4Energy);
617  TREE->Branch("hcal_edepthHot1", &MuonHcalDepth1HotEnergy);
618  TREE->Branch("hcal_edepthHot2", &MuonHcalDepth2HotEnergy);
619  TREE->Branch("hcal_edepthHot3", &MuonHcalDepth3HotEnergy);
620  TREE->Branch("hcal_edepthHot4", &MuonHcalDepth4HotEnergy);
621 
622  TREE->Branch("hcal_edepth1PSim", &MuonHcalDepth1EnergyCalo);
623  TREE->Branch("hcal_edepth2PSim", &MuonHcalDepth2EnergyCalo);
624  TREE->Branch("hcal_edepth3PSim", &MuonHcalDepth3EnergyCalo);
625  TREE->Branch("hcal_edepth4PSim", &MuonHcalDepth4EnergyCalo);
626  TREE->Branch("hcal_edepthHot1PSim", &MuonHcalDepth1HotEnergyCalo);
627  TREE->Branch("hcal_edepthHot2PSim", &MuonHcalDepth2HotEnergyCalo);
628  TREE->Branch("hcal_edepthHot3PSim", &MuonHcalDepth3HotEnergyCalo);
629  TREE->Branch("hcal_edepthHot4PSim", &MuonHcalDepth4HotEnergyCalo);
630 
631  if (maxDepth_ > 4) {
632  TREE->Branch("hcal_edepth5PSim", &MuonHcalDepth5EnergyCalo);
633  TREE->Branch("hcal_edepthHot5PSim", &MuonHcalDepth5HotEnergyCalo);
634  if (maxDepth_ > 5) {
635  TREE->Branch("hcal_edepth6PSim", &MuonHcalDepth6EnergyCalo);
636  TREE->Branch("hcal_edepthHot6PSim", &MuonHcalDepth6HotEnergyCalo);
637  if (maxDepth_ > 6) {
638  TREE->Branch("hcal_edepth7PSim", &MuonHcalDepth7EnergyCalo);
639  TREE->Branch("hcal_edepthHot7PSim", &MuonHcalDepth7HotEnergyCalo);
640  }
641  }
642  }
643 
644  TREE->Branch("TrackerLayer", &TrackerLayer);
645  TREE->Branch("innerTrack", &innerTrack);
646  TREE->Branch("innerTrackpt", &innerTrackpt);
647  TREE->Branch("innerTracketa", &innerTracketa);
648  TREE->Branch("innerTrackphi", &innerTrackphi);
649  TREE->Branch("MatchedStat", &MatchedStat);
650  TREE->Branch("GlobalTrckPt", &GlobalTrckPt);
651  TREE->Branch("GlobalTrckEta", &GlobalTrckEta);
652  TREE->Branch("GlobalTrckPhi", &GlobalTrckPhi);
653  TREE->Branch("NumPixelLayers", &NumPixelLayers);
654  TREE->Branch("chiTracker", &chiTracker);
655  TREE->Branch("DxyTracker", &DxyTracker);
656  TREE->Branch("DzTracker", &DzTracker);
657  TREE->Branch("OuterTrack", &OuterTrack);
658  TREE->Branch("OuterTrackPt", &OuterTrackPt);
659  TREE->Branch("OuterTrackEta", &OuterTrackEta);
660  TREE->Branch("OuterTrackPhi", &OuterTrackPhi);
661  TREE->Branch("OuterTrackHits", &OuterTrackHits);
662  TREE->Branch("OuterTrackRHits", &OuterTrackRHits);
663  TREE->Branch("OuterTrackChi", &OuterTrackChi);
664  TREE->Branch("GlobalTrack", &GlobalTrack);
665  TREE->Branch("GlobTrack_Chi", &chiGlobal);
666  TREE->Branch("Global_Muon_Hits", &GlobalMuonHits);
667  TREE->Branch("MatchedStations", &MatchedStat);
668  TREE->Branch("Global_Track_Pt", &GlobalTrckPt);
669  TREE->Branch("Global_Track_Eta", &GlobalTrckEta);
670  TREE->Branch("Global_Track_Phi", &GlobalTrckPhi);
672  TREE->Branch("Tight_LongitudinalImpactparameter", &Tight_LongPara);
673  TREE->Branch("Tight_TransImpactparameter", &Tight_TransImpara);
674  TREE->Branch("InnerTrackPixelHits", &Tight_PixelHits);
675  TREE->Branch("IsolationR04", &IsolationR04);
676  TREE->Branch("IsolationR03", &IsolationR03);
677 
678  TREE->Branch("hcal_cellHot", &MuonHcalHot);
679  TREE->Branch("hcal_cellHotPSim", &MuonHcalHotCalo);
680 
681  TREE->Branch("ecal_3into3", &MuonEcalEnergy);
682  TREE->Branch("ecal_3x3", &MuonEcal3x3Energy);
683  TREE->Branch("ecal_detID", &MuonEcalDetId);
684  TREE->Branch("ehcal_detID", &MuonEHcalDetId);
685  TREE->Branch("tracker_3into3", &MuonHOEnergy);
686  TREE->Branch("activeLength", &MuonHcalActiveLength);
687 
689  TREE->Branch("hltresults", &hltresults);
690  TREE->Branch("all_triggers", &all_triggers);
691  TREE->Branch("rechit_energy", &energy_hb);
692  TREE->Branch("rechit_time", &time_hb);
693 }
694 
695 // ------------ method called once each job just after ending the event loop ------------
697 
698 // ------------ method called when starting to processes a run ------------
699 void HcalRaddamMuon::beginRun(edm::Run const& iRun, edm::EventSetup const& iSetup) {
701  iSetup.get<HcalRecNumberingRecord>().get(pHRNDC);
702  const HcalDDDRecConstants& hdc = (*pHRNDC);
703  actHB.clear();
704  actHE.clear();
705  actHB = hdc.getThickActive(0);
706  actHE = hdc.getThickActive(1);
707 
708  bool changed = true;
709  all_triggers.clear();
710  if (hltConfig_.init(iRun, iSetup, "HLT", changed)) {
711  // if init returns TRUE, initialisation has succeeded!
712  edm::LogInfo("TriggerBlock") << "HLT config with process name "
713  << "HLT"
714  << " successfully extracted";
715  std::string string_search[5] = {"HLT_IsoMu_", "HLT_L1SingleMu_", "HLT_L2Mu", "HLT_Mu", "HLT_RelIso1p0Mu"};
716  unsigned int ntriggers = hltConfig_.size();
717  for (unsigned int t = 0; t < ntriggers; ++t) {
719  for (unsigned int ik = 0; ik < 5; ++ik) {
720  if (hltname.find(string_search[ik]) != std::string::npos) {
721  all_triggers.push_back(hltname);
722  break;
723  }
724  }
725  } //loop over ntriggers
726  // std::cout<<"all triggers size in begin run"<<all_triggers.size()<<std::endl;
727  } else {
728  edm::LogError("TriggerBlock") << "Error! HLT config extraction with process name "
729  << "HLT"
730  << " failed";
731  }
732 
733 } //firstmethod
734 
735 // ------------ method called when ending the processing of a run ------------
737 
740  desc.addUntracked<edm::InputTag>("hlTriggerResults", edm::InputTag("TriggerResults", "", "HLT"));
741  desc.addUntracked<edm::InputTag>("muonSource", edm::InputTag("muons"));
742  desc.addUntracked<int>("verbosity", 0);
743  desc.addUntracked<int>("useRaw", 0);
744  desc.add<bool>("isAOD", false);
745  desc.addUntracked<int>("maxDepth", 4);
746  descriptions.add("hcalRaddamMuon", desc);
747 }
748 
751  EventNumber = -99999;
752  RunNumber = -99999;
753  LumiNumber = -99999;
754  BXNumber = -99999;
755  energy_hb.clear();
756  time_hb.clear();
757  muon_is_good.clear();
758  muon_global.clear();
759  muon_tracker.clear();
760  PtGlob.clear();
761  EtaGlob.clear();
762  PhiGlob.clear();
763  Energy.clear();
764  Pmuon.clear();
765  TrackerLayer.clear();
766  innerTrack.clear();
767  NumPixelLayers.clear();
768  chiTracker.clear();
769  DxyTracker.clear();
770  DzTracker.clear();
771  innerTrackpt.clear();
772  innerTracketa.clear();
773  innerTrackphi.clear();
774  Tight_PixelHits.clear();
775  OuterTrack.clear();
776  OuterTrackPt.clear();
777  OuterTrackEta.clear();
778  OuterTrackPhi.clear();
779  OuterTrackHits.clear();
780  OuterTrackRHits.clear();
781  OuterTrackChi.clear();
782  GlobalTrack.clear();
783  chiGlobal.clear();
784  GlobalMuonHits.clear();
785  MatchedStat.clear();
786  GlobalTrckPt.clear();
787  GlobalTrckEta.clear();
788  GlobalTrckPhi.clear();
789  Tight_TransImpara.clear();
790  Tight_LongPara.clear();
791 
792  IsolationR04.clear();
793  IsolationR03.clear();
794  MuonEcalEnergy.clear();
795  MuonHcalEnergy.clear();
796  MuonHOEnergy.clear();
797  MuonEcalDetId.clear();
798  MuonHcalDetId.clear();
799  MuonEHcalDetId.clear();
800  MuonEcal3x3Energy.clear();
801  MuonHcal1x1Energy.clear();
802  MuonHcalDepth1Energy.clear();
803  MuonHcalDepth2Energy.clear();
804  MuonHcalDepth3Energy.clear();
805  MuonHcalDepth4Energy.clear();
806  MuonHcalDepth5Energy.clear();
807  MuonHcalDepth6Energy.clear();
808  MuonHcalDepth7Energy.clear();
809 
810  MuonHcalDepth1HotEnergy.clear();
811  MuonHcalDepth2HotEnergy.clear();
812  MuonHcalDepth3HotEnergy.clear();
813  MuonHcalDepth4HotEnergy.clear();
814  MuonHcalDepth5HotEnergy.clear();
815  MuonHcalDepth6HotEnergy.clear();
816  MuonHcalDepth7HotEnergy.clear();
817  MuonHcalHot.clear();
818  MuonHcalActiveLength.clear();
819  hltresults.clear();
820 }
821 
823  HcalDetId kd1(id1.subdet(), id1.ieta(), id1.iphi(), 1);
824  HcalDetId kd2(id2.subdet(), id2.ieta(), id2.iphi(), 1);
825  int match = ((kd1 == kd2) ? 1 : 0);
826  return match;
827 }
828 
830  HcalDetId id(id_);
831  int ieta = id.ietaAbs();
832  int depth = id.depth();
833  double lx(0);
834  if (id.subdet() == HcalBarrel) {
835  // std::cout<<"actHB.size()"<<actHB.size()<<std::endl;
836  for (unsigned int i = 0; i < actHB.size(); ++i) {
837  if (ieta == actHB[i].ieta && depth == actHB[i].depth) {
838  lx = actHB[i].thick;
839  break;
840  }
841  }
842  } else {
843  // std::cout<<"actHE.size()"<<actHE.size()<<std::endl;
844  for (unsigned int i = 0; i < actHE.size(); ++i) {
845  if (ieta == actHE[i].ieta && depth == actHE[i].depth) {
846  lx = actHE[i].thick;
847  // std::cout<<"actHE[i].thick"<<actHE[i].thick<<std::endl;
848  break;
849  }
850  }
851  }
852  return lx;
853 }
854 
855 //define this as a plug-in
HcalRaddamMuon::PD0
std::vector< double > PD0
Definition: HcalRaddamMuon.cc:126
HcalRaddamMuon::ImpactParameter
std::vector< double > ImpactParameter
Definition: HcalRaddamMuon.cc:83
edm::ESHandle::product
T const * product() const
Definition: ESHandle.h:86
HcalRaddamMuon::beginJob
void beginJob() override
Definition: HcalRaddamMuon.cc:595
HcalRaddamMuon::EtaGlob
std::vector< double > EtaGlob
Definition: HcalRaddamMuon.cc:78
HcalRaddamMuon::Pthetha
std::vector< double > Pthetha
Definition: HcalRaddamMuon.cc:125
HcalRaddamMuon::actHE
std::vector< HcalDDDRecConstants::HcalActiveLength > actHE
Definition: HcalRaddamMuon.cc:104
HcalRaddamMuon::analyze
void analyze(const edm::Event &, const edm::EventSetup &) override
Definition: HcalRaddamMuon.cc:186
HcalRaddamMuon::innerTrackphi
std::vector< double > innerTrackphi
Definition: HcalRaddamMuon.cc:80
HcalRaddamMuon::NRefPointY
std::vector< double > NRefPointY
Definition: HcalRaddamMuon.cc:126
electrons_cff.bool
bool
Definition: electrons_cff.py:372
EDAnalyzer.h
HcalRaddamMuon::Tight_TransImpara
std::vector< double > Tight_TransImpara
Definition: HcalRaddamMuon.cc:84
mps_fire.i
i
Definition: mps_fire.py:355
edm::ParameterSetDescription::add
ParameterDescriptionBase * add(U const &iLabel, T const &value)
Definition: ParameterSetDescription.h:95
HcalRaddamMuon::NumPixelLayers
std::vector< double > NumPixelLayers
Definition: HcalRaddamMuon.cc:81
HcalRaddamMuon::OuterTrackPhi
std::vector< double > OuterTrackPhi
Definition: HcalRaddamMuon.cc:82
HcalRaddamMuon::tok_bs_
edm::EDGetTokenT< reco::BeamSpot > tok_bs_
Definition: HcalRaddamMuon.cc:138
Muon.h
HcalRaddamMuon::OuterTrack
std::vector< bool > OuterTrack
Definition: HcalRaddamMuon.cc:86
HcalRaddamMuon::MuonHcalDepth5EnergyCalo
std::vector< double > MuonHcalDepth5EnergyCalo
Definition: HcalRaddamMuon.cc:96
HcalRaddamMuon::chiTracker
std::vector< double > chiTracker
Definition: HcalRaddamMuon.cc:81
HcalRaddamMuon::BXNumber
unsigned int BXNumber
Definition: HcalRaddamMuon.cc:129
HcalRaddamMuon::muonsrc_
const edm::InputTag muonsrc_
Definition: HcalRaddamMuon.cc:109
funct::false
false
Definition: Factorize.h:34
HcalRaddamMuon::matchId
int matchId(const HcalDetId &, const HcalDetId &)
Definition: HcalRaddamMuon.cc:822
HcalRaddamMuon::dzWithBS
std::vector< double > dzWithBS
Definition: HcalRaddamMuon.cc:126
HcalRaddamMuon::dxyWithBS
std::vector< double > dxyWithBS
Definition: HcalRaddamMuon.cc:126
HcalRaddamMuon::isHB
std::vector< bool > isHB
Definition: HcalRaddamMuon.cc:116
HcalRaddamMuon::MuonHcalDepth6EnergyCalo
std::vector< double > MuonHcalDepth6EnergyCalo
Definition: HcalRaddamMuon.cc:96
HcalRaddamMuon::PtGlob
std::vector< double > PtGlob
Definition: HcalRaddamMuon.cc:72
HcalRaddamMuon::MuonHcalDepth6HotEnergy
std::vector< double > MuonHcalDepth6HotEnergy
Definition: HcalRaddamMuon.cc:92
spr::propagatedTrackID::detIdEHCAL
DetId detIdEHCAL
Definition: CaloPropagateTrack.h:47
TriggerResults.h
HcalRaddamMuon::PLostHits
std::vector< double > PLostHits
Definition: HcalRaddamMuon.cc:126
HcalRaddamMuon::hltresults
std::vector< int > hltresults
Definition: HcalRaddamMuon.cc:120
HcalRaddamMuon::track_cosmic_momentumIX
std::vector< double > track_cosmic_momentumIX
Definition: HcalRaddamMuon.cc:75
HcalRaddamMuon::MuonEHcalDetId
std::vector< unsigned int > MuonEHcalDetId
Definition: HcalRaddamMuon.cc:89
HcalRaddamMuon::_RecoMuon1TrackIsoSumPtMaxCutValue_04
double _RecoMuon1TrackIsoSumPtMaxCutValue_04
Definition: HcalRaddamMuon.cc:130
HcalRaddamMuon::MuonHcalDepth7HotEnergyCalo
std::vector< double > MuonHcalDepth7HotEnergyCalo
Definition: HcalRaddamMuon.cc:98
HcalRaddamMuon::actHB
std::vector< HcalDDDRecConstants::HcalActiveLength > actHB
Definition: HcalRaddamMuon.cc:104
HcalRaddamMuon
Definition: HcalRaddamMuon.cc:54
HcalRaddamMuon::MuonHcalDepth3EnergyCalo
std::vector< double > MuonHcalDepth3EnergyCalo
Definition: HcalRaddamMuon.cc:96
DiDispStaMuonMonitor_cfi.pt
pt
Definition: DiDispStaMuonMonitor_cfi.py:39
EcalSeverityLevelAlgoRcd.h
HcalDDDRecConstants::getThickActive
std::vector< HcalActiveLength > getThickActive(const int &type) const
Definition: HcalDDDRecConstants.cc:465
edm::Run
Definition: Run.h:45
HcalRaddamMuon::fs
edm::Service< TFileService > fs
Definition: HcalRaddamMuon.cc:106
ecaldqm::zside
int zside(DetId const &)
Definition: EcalDQMCommonUtils.cc:189
HcalRaddamMuon::_RecoMuon1TrackIsoSumPtMaxCutValue_03
double _RecoMuon1TrackIsoSumPtMaxCutValue_03
Definition: HcalRaddamMuon.cc:130
TriggerEvent.h
HcalRaddamMuon::track_cosmic_yposition
std::vector< double > track_cosmic_yposition
Definition: HcalRaddamMuon.cc:132
edm::EDGetTokenT< edm::PCaloHitContainer >
CaloGeometryRecord
Definition: CaloGeometryRecord.h:30
HcalRaddamMuon::MuonHcalDepth1HotEnergy
std::vector< double > MuonHcalDepth1HotEnergy
Definition: HcalRaddamMuon.cc:92
edm
HLT enums.
Definition: AlignableModifier.h:19
globals_cff.id1
id1
Definition: globals_cff.py:32
gather_cfg.cout
cout
Definition: gather_cfg.py:144
HcalTopology
Definition: HcalTopology.h:26
HcalRaddamMuon::TrackerLayer
std::vector< double > TrackerLayer
Definition: HcalRaddamMuon.cc:80
HcalRaddamMuon::MuonHOEnergy
std::vector< double > MuonHOEnergy
Definition: HcalRaddamMuon.cc:88
EBDetId.h
EEDetId.h
edm::LogInfo
Definition: MessageLogger.h:254
edm::ParameterSetDescription
Definition: ParameterSetDescription.h:52
HcalRaddamMuon::IsolationR03
std::vector< double > IsolationR03
Definition: HcalRaddamMuon.cc:87
HcalRaddamMuon::MuonHcalDepth3HotEnergy
std::vector< double > MuonHcalDepth3HotEnergy
Definition: HcalRaddamMuon.cc:92
HcalRaddamMuon::track_cosmic_zmomentum
std::vector< double > track_cosmic_zmomentum
Definition: HcalRaddamMuon.cc:132
HcalRaddamMuon::MuonHcalDepth1HotEnergyCalo
std::vector< double > MuonHcalDepth1HotEnergyCalo
Definition: HcalRaddamMuon.cc:98
HcalRaddamMuon::track_cosmic_positionOZ
std::vector< double > track_cosmic_positionOZ
Definition: HcalRaddamMuon.cc:72
HcalRaddamMuon::Tight_MuonHits
std::vector< double > Tight_MuonHits
Definition: HcalRaddamMuon.cc:84
edm::ParameterSet::getUntrackedParameter
T getUntrackedParameter(std::string const &, T const &) const
HcalRaddamMuon::PhiGlob
std::vector< double > PhiGlob
Definition: HcalRaddamMuon.cc:79
HcalRaddamMuon::tok_trigRes_
edm::EDGetTokenT< edm::TriggerResults > tok_trigRes_
Definition: HcalRaddamMuon.cc:136
CaloTopologyRecord
Definition: CaloTopologyRecord.h:10
HcalRaddamMuon::v_RH_h3x3_ene
std::vector< double > v_RH_h3x3_ene
Definition: HcalRaddamMuon.cc:125
ESDetId.h
HcalRaddamMuon::PNDoF
std::vector< double > PNDoF
Definition: HcalRaddamMuon.cc:126
HcalRaddamMuon::all_triggers2
std::vector< std::string > all_triggers2
Definition: HcalRaddamMuon.cc:113
edm::one::EDAnalyzer
Definition: EDAnalyzer.h:30
HcalRaddamMuon::hltpaths
std::vector< std::string > hltpaths
Definition: HcalRaddamMuon.cc:122
HcalBarrel
Definition: HcalAssistant.h:33
HcalRaddamMuon::Tight_PixelHits
std::vector< double > Tight_PixelHits
Definition: HcalRaddamMuon.cc:84
HcalRaddamMuon::hltConfig_
HLTConfigProvider hltConfig_
Definition: HcalRaddamMuon.cc:108
HcalRaddamMuon::track_cosmic_zposition
std::vector< double > track_cosmic_zposition
Definition: HcalRaddamMuon.cc:132
HcalRaddamMuon::DzTracker
std::vector< double > DzTracker
Definition: HcalRaddamMuon.cc:81
EcalCondObjectContainer< EcalChannelStatusCode >
edm::Handle
Definition: AssociativeIterator.h:50
HcalRaddamMuon::track_cosmic_positionOY
std::vector< double > track_cosmic_positionOY
Definition: HcalRaddamMuon.cc:72
HcalRaddamMuon::MuonHcalEnergy
std::vector< double > MuonHcalEnergy
Definition: HcalRaddamMuon.cc:88
HcalRaddamMuon::MuonHcalDepth7Energy
std::vector< double > MuonHcalDepth7Energy
Definition: HcalRaddamMuon.cc:90
HcalRaddamMuon::MuonHcalDepth2Energy
std::vector< double > MuonHcalDepth2Energy
Definition: HcalRaddamMuon.cc:90
HcalRaddamMuon::track_cosmic_momentumOZ
std::vector< double > track_cosmic_momentumOZ
Definition: HcalRaddamMuon.cc:75
HcalRaddamMuon::OuterTrackHits
std::vector< double > OuterTrackHits
Definition: HcalRaddamMuon.cc:82
CaloTopology
Definition: CaloTopology.h:19
HcalRaddamMuon::track_cosmic_positionOX
std::vector< double > track_cosmic_positionOX
Definition: HcalRaddamMuon.cc:72
HcalRaddamMuon::MuonHcalDepth5HotEnergy
std::vector< double > MuonHcalDepth5HotEnergy
Definition: HcalRaddamMuon.cc:92
EcalRecHitCollections.h
HcalRaddamMuon::track_cosmic_detIDouter
std::vector< double > track_cosmic_detIDouter
Definition: HcalRaddamMuon.cc:75
HcalRaddamMuon::MuonHcal1x1Energy
std::vector< double > MuonHcal1x1Energy
Definition: HcalRaddamMuon.cc:88
HcalRaddamMuon::muon_global
std::vector< bool > muon_global
Definition: HcalRaddamMuon.cc:119
LEDCalibrationChannels.iphi
iphi
Definition: LEDCalibrationChannels.py:64
HcalRaddamMuon::PyGlob
std::vector< double > PyGlob
Definition: HcalRaddamMuon.cc:125
HcalRaddamMuon::PChi2
std::vector< double > PChi2
Definition: HcalRaddamMuon.cc:126
IdealMagneticFieldRecord
Definition: IdealMagneticFieldRecord.h:11
HcalRaddamMuon::MuonHcalDetId
std::vector< unsigned int > MuonHcalDetId
Definition: HcalRaddamMuon.cc:89
HcalRaddamMuon::PxGlob
std::vector< double > PxGlob
Definition: HcalRaddamMuon.cc:125
DetId
Definition: DetId.h:17
HcalRaddamMuon::MuonHcalDepth6Energy
std::vector< double > MuonHcalDepth6Energy
Definition: HcalRaddamMuon.cc:90
HcalRaddamMuon::MuonHcalDepth2EnergyCalo
std::vector< double > MuonHcalDepth2EnergyCalo
Definition: HcalRaddamMuon.cc:96
HcalRaddamMuon::PdxyTrack
std::vector< double > PdxyTrack
Definition: HcalRaddamMuon.cc:126
MakerMacros.h
HcalRaddamMuon::endRun
void endRun(edm::Run const &, edm::EventSetup const &) override
Definition: HcalRaddamMuon.cc:736
CaloGeometry
Definition: CaloGeometry.h:21
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)
HcalRaddamMuon::MuonHcalHotCalo
std::vector< unsigned int > MuonHcalHotCalo
Definition: HcalRaddamMuon.cc:89
HcalRaddamMuon::IsolationR04
std::vector< double > IsolationR04
Definition: HcalRaddamMuon.cc:87
Track.h
HcalRaddamMuon::track_cosmic_momentumIZ
std::vector< double > track_cosmic_momentumIZ
Definition: HcalRaddamMuon.cc:75
edm::EventSetup::get
T get() const
Definition: EventSetup.h:73
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
HcalRaddamMuon::Tight_GlobalMuonTrkFit
std::vector< double > Tight_GlobalMuonTrkFit
Definition: HcalRaddamMuon.cc:84
HcalRaddamMuon::Tight_TrkerLayers
std::vector< double > Tight_TrkerLayers
Definition: HcalRaddamMuon.cc:84
HcalRaddamMuon::muon_tracker
std::vector< bool > muon_tracker
Definition: HcalRaddamMuon.cc:119
HcalRaddamMuon::NPvy
std::vector< double > NPvy
Definition: HcalRaddamMuon.cc:126
HcalRaddamMuon::clearVectors
void clearVectors()
Definition: HcalRaddamMuon.cc:749
edm::HLTGlobalStatus::size
unsigned int size() const
Get number of paths stored.
Definition: HLTGlobalStatus.h:35
HcalRaddamMuon::GlobalMuonHits
std::vector< double > GlobalMuonHits
Definition: HcalRaddamMuon.cc:79
HcalRaddamMuon::ntriggers
int ntriggers
Definition: HcalRaddamMuon.cc:131
HcalRaddamMuon::MuonHcalDepth2HotEnergyCalo
std::vector< double > MuonHcalDepth2HotEnergyCalo
Definition: HcalRaddamMuon.cc:98
Service.h
HcalRaddamMuon::OuterTrackPt
std::vector< double > OuterTrackPt
Definition: HcalRaddamMuon.cc:82
spr::propagatedTrackID::okECAL
bool okECAL
Definition: CaloPropagateTrack.h:46
MuonFwd.h
HcalRaddamMuon::tok_EE_
edm::EDGetTokenT< EcalRecHitCollection > tok_EE_
Definition: HcalRaddamMuon.cc:140
eHCALMatrix.h
HcalRaddamMuon::innerTrack
std::vector< bool > innerTrack
Definition: HcalRaddamMuon.cc:86
reco::Track
Definition: Track.h:27
IdealMagneticFieldRecord.h
edm::ESHandle< CaloGeometry >
EcalSeverityLevelAlgoRcd
Definition: EcalSeverityLevelAlgoRcd.h:12
HcalRaddamMuon::NPvx
std::vector< double > NPvx
Definition: HcalRaddamMuon.cc:126
HcalRaddamMuon::NQOverP
std::vector< double > NQOverP
Definition: HcalRaddamMuon.cc:126
HcalRaddamMuon::~HcalRaddamMuon
~HcalRaddamMuon() override
Definition: HcalRaddamMuon.cc:176
HcalRaddamMuon::EventNumber
unsigned int EventNumber
Definition: HcalRaddamMuon.cc:129
HcalRaddamMuon::NormChi2
std::vector< double > NormChi2
Definition: HcalRaddamMuon.cc:83
HcalRaddamMuon::MuonHcalDepth7HotEnergy
std::vector< double > MuonHcalDepth7HotEnergy
Definition: HcalRaddamMuon.cc:92
reco::BeamSpot::position
const Point & position() const
position
Definition: BeamSpot.h:59
HcalRaddamMuon::all_ifTriggerpassed
std::vector< bool > all_ifTriggerpassed
Definition: HcalRaddamMuon.cc:118
HcalRaddamMuon::OuterTrackEta
std::vector< double > OuterTrackEta
Definition: HcalRaddamMuon.cc:82
OrderedSet.t
t
Definition: OrderedSet.py:90
eECALMatrix.h
HcalRaddamMuon::type
int type
Definition: HcalRaddamMuon.cc:105
EcalSeverityLevelAlgo.h
HcalRaddamMuon::isAOD_
const bool isAOD_
Definition: HcalRaddamMuon.cc:111
LEDCalibrationChannels.depth
depth
Definition: LEDCalibrationChannels.py:65
HcalRecNumberingRecord
Definition: HcalRecNumberingRecord.h:23
HcalDDDRecConstants::getMinDepth
int getMinDepth(const int &itype, const int &ieta, const int &iphi, const int &zside) const
Definition: HcalDDDRecConstants.cc:353
HcalRaddamMuon::chiGlobal
std::vector< double > chiGlobal
Definition: HcalRaddamMuon.cc:79
HcalRaddamMuon::fillDescriptions
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
Definition: HcalRaddamMuon.cc:738
CaloGeometryRecord.h
edm::ConfigurationDescriptions
Definition: ConfigurationDescriptions.h:28
badGlobalMuonTaggersAOD_cff.vtx
vtx
Definition: badGlobalMuonTaggersAOD_cff.py:5
HcalRaddamMuon::tok_muon_
edm::EDGetTokenT< reco::MuonCollection > tok_muon_
Definition: HcalRaddamMuon.cc:142
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
Vertex.h
EcalSubdetector.h
HLTConfigProvider::size
unsigned int size() const
number of trigger paths in trigger table
Definition: HLTConfigProvider.h:62
HcalRaddamMuon::MuonHcalDepth5Energy
std::vector< double > MuonHcalDepth5Energy
Definition: HcalRaddamMuon.cc:90
TFileService.h
HcalRaddamMuon::track_cosmic_momentumIY
std::vector< double > track_cosmic_momentumIY
Definition: HcalRaddamMuon.cc:75
HcalRaddamMuon::MuonHcalDepth4EnergyCalo
std::vector< double > MuonHcalDepth4EnergyCalo
Definition: HcalRaddamMuon.cc:96
HcalRaddamMuon::MuonHcalDepth1EnergyCalo
std::vector< double > MuonHcalDepth1EnergyCalo
Definition: HcalRaddamMuon.cc:96
edm::ParameterSetDescription::addUntracked
ParameterDescriptionBase * addUntracked(U const &iLabel, T const &value)
Definition: ParameterSetDescription.h:100
HcalRaddamMuon::MuonHcalDepth4HotEnergy
std::vector< double > MuonHcalDepth4HotEnergy
Definition: HcalRaddamMuon.cc:92
LEDCalibrationChannels.ieta
ieta
Definition: LEDCalibrationChannels.py:63
CaloSubdetectorGeometry.h
HcalRaddamMuon::track_cosmic_momentumOY
std::vector< double > track_cosmic_momentumOY
Definition: HcalRaddamMuon.cc:75
bphysicsOniaDQM_cfi.vertex
vertex
Definition: bphysicsOniaDQM_cfi.py:7
spr::propagatedTrackID::detIdHCAL
DetId detIdHCAL
Definition: CaloPropagateTrack.h:47
HLT_2018_cff.InputTag
InputTag
Definition: HLT_2018_cff.py:79016
HcalRaddamMuon::MuonHcalHot
std::vector< unsigned int > MuonHcalHot
Definition: HcalRaddamMuon.cc:89
edm::ParameterSet
Definition: ParameterSet.h:36
math::XYZPoint
XYZPointD XYZPoint
point in space with cartesian internal representation
Definition: Point3D.h:12
HcalRaddamMuon::useRaw_
const int useRaw_
Definition: HcalRaddamMuon.cc:110
HcalRaddamMuon::NRefPointZ
std::vector< double > NRefPointZ
Definition: HcalRaddamMuon.cc:126
edm::LogError
Definition: MessageLogger.h:183
spr::propagatedTrackID::detIdECAL
DetId detIdECAL
Definition: CaloPropagateTrack.h:47
HcalRaddamMuon::hltlabel_
std::string hltlabel_
Definition: HcalRaddamMuon.cc:112
Event.h
SiStripPI::max
Definition: SiStripPayloadInspectorHelper.h:169
HcalRaddamMuon::MuonEcalEnergy
std::vector< double > MuonEcalEnergy
Definition: HcalRaddamMuon.cc:88
EcalChannelStatusRcd
Definition: EcalChannelStatusRcd.h:5
HcalRaddamMuon::track_cosmic_detid
std::vector< double > track_cosmic_detid
Definition: HcalRaddamMuon.cc:132
HcalRaddamMuon::MuonEcal3x3Energy
std::vector< double > MuonEcal3x3Energy
Definition: HcalRaddamMuon.cc:88
HcalDetId.h
HcalRaddamMuon::track_cosmic_ymomentum
std::vector< double > track_cosmic_ymomentum
Definition: HcalRaddamMuon.cc:132
HcalTopology::dddConstants
const HcalDDDRecConstants * dddConstants() const
Definition: HcalTopology.h:164
match
std::pair< typename Association::data_type::first_type, double > match(Reference key, Association association, bool bestMatchByMaxValue)
Generic matching function.
Definition: Utils.h:10
HcalRaddamMuon::Tight_MatchedStations
std::vector< double > Tight_MatchedStations
Definition: HcalRaddamMuon.cc:84
TrackerLayer
Definition: TrackerLayer.h:13
CaloTopologyRecord.h
position
static int position[264][3]
Definition: ReadPGInfo.cc:289
HcalRaddamMuon::tok_recVtx_
edm::EDGetTokenT< reco::VertexCollection > tok_recVtx_
Definition: HcalRaddamMuon.cc:137
HcalRaddamMuon::MuonHcalDepth5HotEnergyCalo
std::vector< double > MuonHcalDepth5HotEnergyCalo
Definition: HcalRaddamMuon.cc:98
HcalDetId
Definition: HcalDetId.h:12
edm::Service< TFileService >
createfilelist.int
int
Definition: createfilelist.py:10
TriggerNames.h
HcalRaddamMuon::DxyTracker
std::vector< double > DxyTracker
Definition: HcalRaddamMuon.cc:81
iEvent
int iEvent
Definition: GenABIO.cc:224
HcalRaddamMuon::NQOverPError
std::vector< double > NQOverPError
Definition: HcalRaddamMuon.cc:126
MagneticField.h
HcalRaddamMuon::PNormalizedChi2
std::vector< double > PNormalizedChi2
Definition: HcalRaddamMuon.cc:126
edm::EventSetup
Definition: EventSetup.h:57
HcalRaddamMuon::OuterTrackRHits
std::vector< double > OuterTrackRHits
Definition: HcalRaddamMuon.cc:82
HcalRaddamMuon::LumiNumber
unsigned int LumiNumber
Definition: HcalRaddamMuon.cc:129
HcalRaddamMuon::GlobalTrckPhi
std::vector< double > GlobalTrckPhi
Definition: HcalRaddamMuon.cc:79
HcalRaddamMuon::MuonHcalDepth4HotEnergyCalo
std::vector< double > MuonHcalDepth4HotEnergyCalo
Definition: HcalRaddamMuon.cc:98
HLTConfigProvider.h
get
#define get
HcalRaddamMuon::PdzTrack
std::vector< double > PdzTrack
Definition: HcalRaddamMuon.cc:126
HcalRaddamMuon::TREE
TTree * TREE
Definition: HcalRaddamMuon.cc:117
spr::propagatedTrackID::okHCAL
bool okHCAL
Definition: CaloPropagateTrack.h:46
TriggerObject.h
HcalRaddamMuon::PValidHits
std::vector< double > PValidHits
Definition: HcalRaddamMuon.cc:126
HcalRaddamMuon::v_RH_h3x3_iphi
std::vector< int > v_RH_h3x3_iphi
Definition: HcalRaddamMuon.cc:124
HcalRaddamMuon::trackerlayer_hits
std::vector< double > trackerlayer_hits
Definition: HcalRaddamMuon.cc:83
HcalRaddamMuon::beginRun
void beginRun(edm::Run const &, edm::EventSetup const &) override
Definition: HcalRaddamMuon.cc:699
CaloTopology.h
HcalRaddamMuon::MuonHcalDepth7EnergyCalo
std::vector< double > MuonHcalDepth7EnergyCalo
Definition: HcalRaddamMuon.cc:96
photonIsolationHIProducer_cfi.hbhe
hbhe
Definition: photonIsolationHIProducer_cfi.py:8
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
HcalRaddamMuon::time_hb
std::vector< float > time_hb
Definition: HcalRaddamMuon.cc:121
HcalRaddamMuon::endJob
void endJob() override
Definition: HcalRaddamMuon.cc:696
VertexFwd.h
CaloSubdetectorTopology.h
HcalRaddamMuon::MuonHcalDepth6HotEnergyCalo
std::vector< double > MuonHcalDepth6HotEnergyCalo
Definition: HcalRaddamMuon.cc:98
HcalRaddamMuon::MuonHcalDepth1Energy
std::vector< double > MuonHcalDepth1Energy
Definition: HcalRaddamMuon.cc:90
HcalTopology.h
HcalRaddamMuon::all_triggers1
std::vector< std::string > all_triggers1
Definition: HcalRaddamMuon.cc:113
HLTConfigProvider
Definition: HLTConfigProvider.h:28
HcalRaddamMuon::PD0Error
std::vector< double > PD0Error
Definition: HcalRaddamMuon.cc:126
DetId::rawId
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
HcalRaddamMuon::MuonHcalDepth2HotEnergy
std::vector< double > MuonHcalDepth2HotEnergy
Definition: HcalRaddamMuon.cc:92
HcalRaddamMuon::innerTrackpt
std::vector< double > innerTrackpt
Definition: HcalRaddamMuon.cc:80
HcalRaddamMuon::tok_hbhe_
edm::EDGetTokenT< HBHERecHitCollection > tok_hbhe_
Definition: HcalRaddamMuon.cc:141
HLTConfigProvider::init
bool init(const edm::Run &iRun, const edm::EventSetup &iSetup, const std::string &processName, bool &changed)
d'tor
Definition: HLTConfigProvider.cc:36
HcalRaddamMuon::High_TrackLayers
std::vector< double > High_TrackLayers
Definition: HcalRaddamMuon.cc:84
Calorimetry_cff.bField
bField
Definition: Calorimetry_cff.py:292
HcalRaddamMuon::RunNumber
unsigned int RunNumber
Definition: HcalRaddamMuon.cc:129
Frameworkfwd.h
HcalRaddamMuon::GlobalTrckPt
std::vector< double > GlobalTrckPt
Definition: HcalRaddamMuon.cc:79
HcalRaddamMuon::Pmuon
std::vector< double > Pmuon
Definition: HcalRaddamMuon.cc:88
HcalRaddamMuon::h3x3Calo
double h3x3Calo
Definition: HcalRaddamMuon.cc:128
CaloPropagateTrack.h
triggerObjects_cff.id
id
Definition: triggerObjects_cff.py:31
HLTConfigData.h
CaloGeometry.h
TFileService::kSharedResource
static const std::string kSharedResource
Definition: TFileService.h:76
HcalRaddamMuon::all_triggers3
std::vector< std::string > all_triggers3
Definition: HcalRaddamMuon.cc:113
HcalRaddamMuon::muon_is_good
std::vector< bool > muon_is_good
Definition: HcalRaddamMuon.cc:119
edm::TriggerNames
Definition: TriggerNames.h:55
HcalRaddamMuon::PzGlob
std::vector< double > PzGlob
Definition: HcalRaddamMuon.cc:125
HcalRaddamMuon::hlTriggerResults_
const edm::InputTag hlTriggerResults_
Definition: HcalRaddamMuon.cc:109
HcalRaddamMuon::TrigName_
std::vector< std::string > TrigName_
Definition: HcalRaddamMuon.cc:122
HcalDDDRecConstants.h
spr::propagatedTrackID
Definition: CaloPropagateTrack.h:40
HcalRaddamMuon::maxDepth_
int maxDepth_
Definition: HcalRaddamMuon.cc:105
HcalRecHitCollections.h
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)
edm::HLTGlobalStatus::accept
bool accept() const
Has at least one path accepted the event?
Definition: HLTGlobalStatus.h:49
AlignmentPI::index
index
Definition: AlignmentPayloadInspectorHelper.h:46
HcalRaddamMuon::OuterTrackChi
std::vector< double > OuterTrackChi
Definition: HcalRaddamMuon.cc:82
HcalRaddamMuon::tok_EB_
edm::EDGetTokenT< EcalRecHitCollection > tok_EB_
Definition: HcalRaddamMuon.cc:139
HcalRaddamMuon::track_cosmic_detIDinner
std::vector< double > track_cosmic_detIDinner
Definition: HcalRaddamMuon.cc:75
HcalDDDRecConstants
Definition: HcalDDDRecConstants.h:23
HcalRaddamMuon::innerTracketa
std::vector< double > innerTracketa
Definition: HcalRaddamMuon.cc:80
HLTConfigProvider::triggerName
const std::string & triggerName(unsigned int triggerIndex) const
Definition: HLTConfigProvider.h:69
HcalRaddamMuon::Tight_LongPara
std::vector< double > Tight_LongPara
Definition: HcalRaddamMuon.cc:84
HcalRaddamMuon::MuonHcalDepth4Energy
std::vector< double > MuonHcalDepth4Energy
Definition: HcalRaddamMuon.cc:90
HcalRaddamMuon::No_pixelLayers
std::vector< double > No_pixelLayers
Definition: HcalRaddamMuon.cc:83
HcalRaddamMuon::NRefPointX
std::vector< double > NRefPointX
Definition: HcalRaddamMuon.cc:126
HcalRaddamMuon::track_cosmic_rad
std::vector< double > track_cosmic_rad
Definition: HcalRaddamMuon.cc:132
HcalRaddamMuon::MuonHcalActiveLength
std::vector< double > MuonHcalActiveLength
Definition: HcalRaddamMuon.cc:103
HcalRaddamMuon::NPvz
std::vector< double > NPvz
Definition: HcalRaddamMuon.cc:126
HcalRaddamMuon::energy_hb
std::vector< float > energy_hb
Definition: HcalRaddamMuon.cc:121
HcalRaddamMuon::track_cosmic_momentumOX
std::vector< double > track_cosmic_momentumOX
Definition: HcalRaddamMuon.cc:75
ParameterSet.h
HcalRaddamMuon::GlobalTrack
std::vector< bool > GlobalTrack
Definition: HcalRaddamMuon.cc:86
HcalRaddamMuon::Trk_match_MuStat
std::vector< bool > Trk_match_MuStat
Definition: HcalRaddamMuon.cc:119
HcalRaddamMuon::isHE
std::vector< bool > isHE
Definition: HcalRaddamMuon.cc:116
globals_cff.id2
id2
Definition: globals_cff.py:33
HcalRaddamMuon::h3x3
double h3x3
Definition: HcalRaddamMuon.cc:128
HcalRaddamMuon::tok_hcal_
edm::EDGetTokenT< edm::PCaloHitContainer > tok_hcal_
Definition: HcalRaddamMuon.cc:135
edm::HandleBase::isValid
bool isValid() const
Definition: HandleBase.h:70
HcalRaddamMuon::v_RH_h3x3_ieta
std::vector< int > v_RH_h3x3_ieta
Definition: HcalRaddamMuon.cc:123
HcalRaddamMuon::MuonHcalDepth3Energy
std::vector< double > MuonHcalDepth3Energy
Definition: HcalRaddamMuon.cc:90
HcalRaddamMuon::MatchedStat
std::vector< double > MatchedStat
Definition: HcalRaddamMuon.cc:79
edm::Event
Definition: Event.h:73
HcalRaddamMuon::track_cosmic_positionIX
std::vector< double > track_cosmic_positionIX
Definition: HcalRaddamMuon.cc:72
edm::TriggerNames::triggerIndex
unsigned int triggerIndex(std::string const &name) const
Definition: TriggerNames.cc:24
MagneticField
Definition: MagneticField.h:19
HcalRaddamMuon::track_cosmic_positionIZ
std::vector< double > track_cosmic_positionIZ
Definition: HcalRaddamMuon.cc:72
HcalRaddamMuon::PCharge
std::vector< double > PCharge
Definition: HcalRaddamMuon.cc:126
HcalRaddamMuon::GlobalTrckEta
std::vector< double > GlobalTrckEta
Definition: HcalRaddamMuon.cc:79
HcalRaddamMuon::NTrkMomentum
std::vector< double > NTrkMomentum
Definition: HcalRaddamMuon.cc:126
HcalRaddamMuon::verbosity_
const int verbosity_
Definition: HcalRaddamMuon.cc:110
HcalRaddamMuon::track_cosmic_xmomentum
std::vector< double > track_cosmic_xmomentum
Definition: HcalRaddamMuon.cc:132
HcalRaddamMuon::all_triggers4
std::vector< std::string > all_triggers4
Definition: HcalRaddamMuon.cc:113
edm::InputTag
Definition: InputTag.h:15
HcalRaddamMuon::MuonEcalDetId
std::vector< unsigned int > MuonEcalDetId
Definition: HcalRaddamMuon.cc:89
begin
#define begin
Definition: vmac.h:32
HcalRaddamMuon::activeLength
double activeLength(const DetId &)
Definition: HcalRaddamMuon.cc:829
HcalRaddamMuon::all_triggers5
std::vector< std::string > all_triggers5
Definition: HcalRaddamMuon.cc:113
HcalRaddamMuon::MuonHcalDepth3HotEnergyCalo
std::vector< double > MuonHcalDepth3HotEnergyCalo
Definition: HcalRaddamMuon.cc:98
HcalRaddamMuon::Energy
std::vector< double > Energy
Definition: HcalRaddamMuon.cc:88
reco::Vertex
Definition: Vertex.h:35
EcalChannelStatusRcd.h
HcalRaddamMuon::HcalRaddamMuon
HcalRaddamMuon(const edm::ParameterSet &)
Definition: HcalRaddamMuon.cc:145
TFileService::make
T * make(const Args &... args) const
make new ROOT object
Definition: TFileService.h:64
HcalRaddamMuon::all_triggers
std::vector< std::string > all_triggers
Definition: HcalRaddamMuon.cc:113
HcalRaddamMuon::track_cosmic_positionIY
std::vector< double > track_cosmic_positionIY
Definition: HcalRaddamMuon.cc:72
HcalRaddamMuon::track_cosmic_xposition
std::vector< double > track_cosmic_xposition
Definition: HcalRaddamMuon.cc:132