CMS 3D CMS Logo

HcalIsoTrkAnalyzer.cc
Go to the documentation of this file.
1 // system include files
2 #include <atomic>
3 #include <cmath>
4 #include <memory>
5 #include <string>
6 #include <vector>
7 
8 // Root objects
9 #include "TROOT.h"
10 #include "TSystem.h"
11 #include "TFile.h"
12 #include "TProfile.h"
13 #include "TDirectory.h"
14 #include "TTree.h"
15 #include "TLorentzVector.h"
16 #include "TInterpreter.h"
17 
21 
22 //Tracks
27 // Vertices
31 //Muons
35 
36 //Triggers
43 
48 
52 
53 //Generator information
57 
60 
68 
75 
88 
89 //#define EDM_ML_DEBUG
90 
91 class HcalIsoTrkAnalyzer : public edm::one::EDAnalyzer<edm::one::WatchRuns, edm::one::SharedResources> {
92 public:
93  explicit HcalIsoTrkAnalyzer(edm::ParameterSet const&);
94  ~HcalIsoTrkAnalyzer() override {}
95 
96  static void fillDescriptions(edm::ConfigurationDescriptions& descriptions);
97 
98 private:
99  void analyze(edm::Event const&, edm::EventSetup const&) override;
100  void beginJob() override;
101  void beginRun(edm::Run const&, edm::EventSetup const&) override;
102  void endRun(edm::Run const&, edm::EventSetup const&) override;
103 
104  std::array<int, 3> fillTree(std::vector<math::XYZTLorentzVector>& vecL1,
105  std::vector<math::XYZTLorentzVector>& vecL3,
106  math::XYZPoint& leadPV,
107  std::vector<spr::propagatedTrackDirection>& trkCaloDirections,
108  std::vector<spr::propagatedTrackID>& trkCaloDets,
109  const CaloGeometry* geo,
110  const CaloTopology* topo,
111  const HcalTopology* theHBHETopology,
112  const EcalChannelStatus* theEcalChStatus,
113  const EcalSeverityLevelAlgo* theEcalSevlv,
114  edm::Handle<EcalRecHitCollection>& barrelRecHitsHandle,
115  edm::Handle<EcalRecHitCollection>& endcapRecHitsHandle,
119  const HcalRespCorrs* respCorrs,
120  const edm::Handle<reco::MuonCollection>& muonh);
123  double rhoh(const edm::Handle<CaloTowerCollection>&);
124  double eThreshold(const DetId& id, const CaloGeometry* geo) const;
125  DetId newId(const DetId&);
126  void storeEnergy(int indx,
127  const HcalRespCorrs* respCorrs,
128  const std::vector<DetId>& ids,
129  std::vector<double>& edet,
130  double& eHcal,
131  std::vector<unsigned int>* detIds,
132  std::vector<double>* hitEnergies);
133  bool notaMuon(const reco::Track* pTrack0, const edm::Handle<reco::MuonCollection>& muonh);
134 
138  const std::vector<std::string> trigNames_;
147  const double pTrackLow_, pTrackHigh_;
149  const int useRaw_, dataType_, mode_;
153  const double hitEthrEE2_, hitEthrEE3_;
154  const double hitEthrEELo_, hitEthrEEHi_;
158  const std::vector<int> oldID_, newDepth_;
159  const bool hep17_;
160  unsigned int nRun_, nLow_, nHigh_;
163  std::vector<double> etabins_, phibins_;
164  std::vector<int> oldDet_, oldEta_, oldDepth_;
179 
188 
189  TTree *tree, *tree2;
190  unsigned int t_RunNo, t_EventNo;
203  std::vector<unsigned int>*t_DetIds, *t_DetIds1, *t_DetIds3;
204  std::vector<double>*t_HitEnergies, *t_HitEnergies1, *t_HitEnergies3;
205  std::vector<bool>*t_trgbits, *t_hltbits;
206  bool t_L1Bit;
209  std::vector<int>*t_ietaAll, *t_ietaGood, *t_trackType;
210 };
211 
213  : trigNames_(iConfig.getParameter<std::vector<std::string> >("triggers")),
214  theTrackQuality_(iConfig.getParameter<std::string>("trackQuality")),
215  processName_(iConfig.getParameter<std::string>("processName")),
216  l1Filter_(iConfig.getParameter<std::string>("l1Filter")),
217  l2Filter_(iConfig.getParameter<std::string>("l2Filter")),
218  l3Filter_(iConfig.getParameter<std::string>("l3Filter")),
219  a_coneR_(iConfig.getParameter<double>("coneRadius")),
220  a_mipR_(iConfig.getParameter<double>("coneRadiusMIP")),
221  a_mipR2_(iConfig.getParameter<double>("coneRadiusMIP2")),
222  a_mipR3_(iConfig.getParameter<double>("coneRadiusMIP3")),
223  a_mipR4_(iConfig.getParameter<double>("coneRadiusMIP4")),
224  a_mipR5_(iConfig.getParameter<double>("coneRadiusMIP5")),
225  pTrackMin_(iConfig.getParameter<double>("minimumTrackP")),
226  eEcalMax_(iConfig.getParameter<double>("maximumEcalEnergy")),
227  maxRestrictionP_(iConfig.getParameter<double>("maxTrackP")),
228  slopeRestrictionP_(iConfig.getParameter<double>("slopeTrackP")),
229  hcalScale_(iConfig.getUntrackedParameter<double>("hHcalScale", 1.0)),
230  eIsolate1_(iConfig.getParameter<double>("isolationEnergyTight")),
231  eIsolate2_(iConfig.getParameter<double>("isolationEnergyLoose")),
232  pTrackLow_(iConfig.getParameter<double>("momentumLow")),
233  pTrackHigh_(iConfig.getParameter<double>("momentumHigh")),
234  prescaleLow_(iConfig.getParameter<int>("prescaleLow")),
235  prescaleHigh_(iConfig.getParameter<int>("prescaleHigh")),
236  useRaw_(iConfig.getUntrackedParameter<int>("useRaw", 0)),
237  dataType_(iConfig.getUntrackedParameter<int>("dataType", 0)),
238  mode_(iConfig.getUntrackedParameter<int>("outMode", 11)),
239  ignoreTrigger_(iConfig.getUntrackedParameter<bool>("ignoreTriggers", false)),
240  useL1Trigger_(iConfig.getUntrackedParameter<bool>("useL1Trigger", false)),
241  unCorrect_(iConfig.getUntrackedParameter<bool>("unCorrect", false)),
242  collapseDepth_(iConfig.getUntrackedParameter<bool>("collapseDepth", false)),
243  hitEthrEB_(iConfig.getParameter<double>("EBHitEnergyThreshold")),
244  hitEthrEE0_(iConfig.getParameter<double>("EEHitEnergyThreshold0")),
245  hitEthrEE1_(iConfig.getParameter<double>("EEHitEnergyThreshold1")),
246  hitEthrEE2_(iConfig.getParameter<double>("EEHitEnergyThreshold2")),
247  hitEthrEE3_(iConfig.getParameter<double>("EEHitEnergyThreshold3")),
248  hitEthrEELo_(iConfig.getParameter<double>("EEHitEnergyThresholdLow")),
249  hitEthrEEHi_(iConfig.getParameter<double>("EEHitEnergyThresholdHigh")),
250  triggerEvent_(iConfig.getParameter<edm::InputTag>("labelTriggerEvent")),
251  theTriggerResultsLabel_(iConfig.getParameter<edm::InputTag>("labelTriggerResult")),
252  labelGenTrack_(iConfig.getParameter<std::string>("labelTrack")),
253  labelRecVtx_(iConfig.getParameter<std::string>("labelVertex")),
254  labelEB_(iConfig.getParameter<std::string>("labelEBRecHit")),
255  labelEE_(iConfig.getParameter<std::string>("labelEERecHit")),
256  labelHBHE_(iConfig.getParameter<std::string>("labelHBHERecHit")),
257  labelTower_(iConfig.getParameter<std::string>("labelCaloTower")),
258  l1TrigName_(iConfig.getUntrackedParameter<std::string>("l1TrigName", "L1_SingleJet60")),
259  oldID_(iConfig.getUntrackedParameter<std::vector<int> >("oldID")),
260  newDepth_(iConfig.getUntrackedParameter<std::vector<int> >("newDepth")),
261  hep17_(iConfig.getUntrackedParameter<bool>("hep17")),
262  nRun_(0),
263  nLow_(0),
264  nHigh_(0),
265  hdc_(nullptr) {
266  usesResource(TFileService::kSharedResource);
267 
268  //now do whatever initialization is needed
269  const double isolationRadius(28.9), innerR(10.0), outerR(30.0);
271  selectionParameter_.minPt = iConfig.getParameter<double>("minTrackPt");
272  ;
273  selectionParameter_.minQuality = trackQuality_;
274  selectionParameter_.maxDxyPV = iConfig.getParameter<double>("maxDxyPV");
275  selectionParameter_.maxDzPV = iConfig.getParameter<double>("maxDzPV");
276  selectionParameter_.maxChi2 = iConfig.getParameter<double>("maxChi2");
277  selectionParameter_.maxDpOverP = iConfig.getParameter<double>("maxDpOverP");
278  selectionParameter_.minOuterHit = iConfig.getParameter<int>("minOuterHit");
279  selectionParameter_.minLayerCrossed = iConfig.getParameter<int>("minLayerCrossed");
280  selectionParameter_.maxInMiss = iConfig.getParameter<int>("maxInMiss");
281  selectionParameter_.maxOutMiss = iConfig.getParameter<int>("maxOutMiss");
282  a_charIsoR_ = a_coneR_ + isolationRadius;
283  a_coneR1_ = a_coneR_ + innerR;
284  a_coneR2_ = a_coneR_ + outerR;
285  // Different isolation cuts are described in DN-2016/029
286  // Tight cut uses 2 GeV; Loose cut uses 10 GeV
287  // Eta dependent cut uses (maxRestrictionP_ * exp(|ieta|*log(2.5)/18))
288  // with the factor for exponential slopeRestrictionP_ = log(2.5)/18
289  // maxRestrictionP_ = 8 GeV as came from a study
290  std::string labelBS = iConfig.getParameter<std::string>("labelBeamSpot");
291  std::string modnam = iConfig.getUntrackedParameter<std::string>("moduleName", "");
292  std::string prdnam = iConfig.getUntrackedParameter<std::string>("producerName", "");
293  edm::InputTag algTag = iConfig.getParameter<edm::InputTag>("algInputTag");
294  edm::InputTag extTag = iConfig.getParameter<edm::InputTag>("extInputTag");
295  std::string labelMuon = iConfig.getParameter<std::string>("labelMuon");
296 
297  for (unsigned int k = 0; k < oldID_.size(); ++k) {
298  oldDet_.emplace_back((oldID_[k] / 10000) % 10);
299  oldEta_.emplace_back((oldID_[k] / 100) % 100);
300  oldDepth_.emplace_back(oldID_[k] % 100);
301  }
302 
303  l1GtUtils_ = new l1t::L1TGlobalUtil(iConfig, consumesCollector(), *this, algTag, extTag, l1t::UseEventSetupIn::Event);
304  // define tokens for access
305  tok_trigEvt_ = consumes<trigger::TriggerEvent>(triggerEvent_);
306  tok_trigRes_ = consumes<edm::TriggerResults>(theTriggerResultsLabel_);
307  tok_bs_ = consumes<reco::BeamSpot>(labelBS);
308  tok_genTrack_ = consumes<reco::TrackCollection>(labelGenTrack_);
309  tok_ew_ = consumes<GenEventInfoProduct>(edm::InputTag("generator"));
310  tok_parts_ = consumes<reco::GenParticleCollection>(edm::InputTag("genParticles"));
311  tok_cala_ = consumes<CaloTowerCollection>(labelTower_);
312  tok_alg_ = consumes<BXVector<GlobalAlgBlk> >(algTag);
313  tok_Muon_ = consumes<reco::MuonCollection>(labelMuon);
314 
315  if (modnam.empty()) {
316  tok_recVtx_ = consumes<reco::VertexCollection>(labelRecVtx_);
317  tok_EB_ = consumes<EcalRecHitCollection>(edm::InputTag("ecalRecHit", labelEB_));
318  tok_EE_ = consumes<EcalRecHitCollection>(edm::InputTag("ecalRecHit", labelEE_));
319  tok_hbhe_ = consumes<HBHERecHitCollection>(labelHBHE_);
320  edm::LogVerbatim("HcalIsoTrack") << "Labels used " << triggerEvent_ << " " << theTriggerResultsLabel_ << " "
321  << labelBS << " " << labelRecVtx_ << " " << labelGenTrack_ << " "
322  << edm::InputTag("ecalRecHit", labelEB_) << " "
323  << edm::InputTag("ecalRecHit", labelEE_) << " " << labelHBHE_ << " " << labelTower_
324  << " " << labelMuon;
325  } else {
326  tok_recVtx_ = consumes<reco::VertexCollection>(edm::InputTag(modnam, labelRecVtx_, prdnam));
327  tok_EB_ = consumes<EcalRecHitCollection>(edm::InputTag(modnam, labelEB_, prdnam));
328  tok_EE_ = consumes<EcalRecHitCollection>(edm::InputTag(modnam, labelEE_, prdnam));
329  tok_hbhe_ = consumes<HBHERecHitCollection>(edm::InputTag(modnam, labelHBHE_, prdnam));
330  edm::LogVerbatim("HcalIsoTrack") << "Labels used " << triggerEvent_ << " " << theTriggerResultsLabel_ << " "
331  << labelBS << " " << edm::InputTag(modnam, labelRecVtx_, prdnam) << " "
332  << labelGenTrack_ << " " << edm::InputTag(modnam, labelEB_, prdnam) << " "
333  << edm::InputTag(modnam, labelEE_, prdnam) << " "
334  << edm::InputTag(modnam, labelHBHE_, prdnam) << " " << labelTower_ << " "
335  << labelMuon;
336  }
337 
338  tok_ddrec_ = esConsumes<HcalDDDRecConstants, HcalRecNumberingRecord, edm::Transition::BeginRun>();
339  tok_bFieldH_ = esConsumes<MagneticField, IdealMagneticFieldRecord>();
340  tok_ecalChStatus_ = esConsumes<EcalChannelStatus, EcalChannelStatusRcd>();
341  tok_sevlv_ = esConsumes<EcalSeverityLevelAlgo, EcalSeverityLevelAlgoRcd>();
342  tok_geom_ = esConsumes<CaloGeometry, CaloGeometryRecord>();
343  tok_caloTopology_ = esConsumes<CaloTopology, CaloTopologyRecord>();
344  tok_htopo_ = esConsumes<HcalTopology, HcalRecNumberingRecord>();
345  tok_resp_ = esConsumes<HcalRespCorrs, HcalRespCorrsRcd>();
346 
347  edm::LogVerbatim("HcalIsoTrack")
348  << "Parameters read from config file \n"
349  << "\t minPt " << selectionParameter_.minPt << "\t theTrackQuality " << theTrackQuality_ << "\t minQuality "
350  << selectionParameter_.minQuality << "\t maxDxyPV " << selectionParameter_.maxDxyPV << "\t maxDzPV "
351  << selectionParameter_.maxDzPV << "\t maxChi2 " << selectionParameter_.maxChi2 << "\t maxDpOverP "
352  << selectionParameter_.maxDpOverP << "\t minOuterHit " << selectionParameter_.minOuterHit << "\t minLayerCrossed "
353  << selectionParameter_.minLayerCrossed << "\t maxInMiss " << selectionParameter_.maxInMiss << "\t maxOutMiss "
354  << selectionParameter_.maxOutMiss << "\t a_coneR " << a_coneR_ << ":" << a_coneR1_ << ":" << a_coneR2_
355  << "\t a_charIsoR " << a_charIsoR_ << "\t a_mipR " << a_mipR_ << "\t a_mipR2 " << a_mipR2_ << "\t a_mipR3 "
356  << a_mipR3_ << "\t a_mipR4 " << a_mipR4_ << "\t a_mipR5 " << a_mipR5_ << "\n pTrackMin_ " << pTrackMin_
357  << "\t eEcalMax_ " << eEcalMax_ << "\t maxRestrictionP_ " << maxRestrictionP_ << "\t slopeRestrictionP_ "
358  << slopeRestrictionP_ << "\t eIsolateStrong_ " << eIsolate1_ << "\t eIsolateSoft_ " << eIsolate2_
359  << "\t hcalScale_ " << hcalScale_ << "\n\t momentumLow_ " << pTrackLow_ << "\t prescaleLow_ " << prescaleLow_
360  << "\t momentumHigh_ " << pTrackHigh_ << "\t prescaleHigh_ " << prescaleHigh_ << "\n\t useRaw_ " << useRaw_
361  << "\t ignoreTrigger_ " << ignoreTrigger_ << "\n\t useL1Trigegr_ " << useL1Trigger_ << "\t dataType_ "
362  << dataType_ << "\t mode_ " << mode_ << "\t unCorrect_ " << unCorrect_ << "\t collapseDepth_ "
363  << collapseDepth_ << "\t L1TrigName_ " << l1TrigName_ << "\nThreshold for EB " << hitEthrEB_ << " EE "
364  << hitEthrEE0_ << ":" << hitEthrEE1_ << ":" << hitEthrEE2_ << ":" << hitEthrEE3_ << ":" << hitEthrEELo_ << ":"
365  << hitEthrEEHi_;
366  edm::LogVerbatim("HcalIsoTrack") << "Process " << processName_ << " L1Filter:" << l1Filter_
367  << " L2Filter:" << l2Filter_ << " L3Filter:" << l3Filter_;
368  for (unsigned int k = 0; k < trigNames_.size(); ++k) {
369  edm::LogVerbatim("HcalIsoTrack") << "Trigger[" << k << "] " << trigNames_[k];
370  }
371  edm::LogVerbatim("HcalIsoTrack") << oldID_.size() << " DetIDs to be corrected with HEP17 flag:" << hep17_;
372  for (unsigned int k = 0; k < oldID_.size(); ++k)
373  edm::LogVerbatim("HcalIsoTrack") << "[" << k << "] Det " << oldDet_[k] << " EtaAbs " << oldEta_[k] << " Depth "
374  << oldDepth_[k] << ":" << newDepth_[k];
375 
376  for (int i = 0; i < 10; i++)
377  phibins_.push_back(-M_PI + 0.1 * (2 * i + 1) * M_PI);
378  for (int i = 0; i < 8; ++i)
379  etabins_.push_back(-2.1 + 0.6 * i);
380  etadist_ = etabins_[1] - etabins_[0];
381  phidist_ = phibins_[1] - phibins_[0];
382  etahalfdist_ = 0.5 * etadist_;
383  phihalfdist_ = 0.5 * phidist_;
384  edm::LogVerbatim("HcalIsoTrack") << "EtaDist " << etadist_ << " " << etahalfdist_ << " PhiDist " << phidist_ << " "
385  << phihalfdist_;
386  unsigned int k1(0), k2(0);
387  for (auto phi : phibins_) {
388  edm::LogVerbatim("HcalIsoTrack") << "phibin_[" << k1 << "] " << phi;
389  ++k1;
390  }
391  for (auto eta : etabins_) {
392  edm::LogVerbatim("HcalIsoTrack") << "etabin_[" << k2 << "] " << eta;
393  ++k2;
394  }
395 }
396 
398  t_Run = iEvent.id().run();
399  t_Event = iEvent.id().event();
401 #ifdef EDM_ML_DEBUG
402  edm::LogVerbatim("HcalIsoTrack") << "Run " << t_Run << " Event " << t_Event << " type " << t_DataType
403  << " Luminosity " << iEvent.luminosityBlock() << " Bunch " << iEvent.bunchCrossing();
404 #endif
405  //Get magnetic field and ECAL channel status
406  const MagneticField* bField = &iSetup.getData(tok_bFieldH_);
407  const EcalChannelStatus* theEcalChStatus = &iSetup.getData(tok_ecalChStatus_);
408  const EcalSeverityLevelAlgo* theEcalSevlv = &iSetup.getData(tok_sevlv_);
409 
410  // get handles to calogeometry and calotopology
411  const CaloGeometry* geo = &iSetup.getData(tok_geom_);
412  const CaloTopology* caloTopology = &iSetup.getData(tok_caloTopology_);
413  const HcalTopology* theHBHETopology = &iSetup.getData(tok_htopo_);
414  const HcalRespCorrs* resp = &iSetup.getData(tok_resp_);
415  HcalRespCorrs* respCorrs = new HcalRespCorrs(*resp);
416  respCorrs->setTopo(theHBHETopology);
417 
418  //=== genParticle information
420  iEvent.getByToken(tok_parts_, genParticles);
421 
422  bool okC(true);
423  //Get track collection
425  iEvent.getByToken(tok_genTrack_, trkCollection);
426  if (!trkCollection.isValid()) {
427  edm::LogWarning("HcalIsoTrack") << "Cannot access the collection " << labelGenTrack_;
428  okC = false;
429  }
430 
431  //Get muon collection
433  iEvent.getByToken(tok_Muon_, muonh);
434 
435  //event weight for FLAT sample
436  t_EventWeight = 1.0;
438  iEvent.getByToken(tok_ew_, genEventInfo);
439  if (genEventInfo.isValid())
440  t_EventWeight = genEventInfo->weight();
441 
442  //Define the best vertex and the beamspot
444  iEvent.getByToken(tok_recVtx_, recVtxs);
445  edm::Handle<reco::BeamSpot> beamSpotH;
446  iEvent.getByToken(tok_bs_, beamSpotH);
447  math::XYZPoint leadPV(0, 0, 0);
448  t_goodPV = t_nVtx = 0;
449  if (recVtxs.isValid() && !(recVtxs->empty())) {
450  t_nVtx = recVtxs->size();
451  for (unsigned int k = 0; k < recVtxs->size(); ++k) {
452  if (!((*recVtxs)[k].isFake()) && ((*recVtxs)[k].ndof() > 4)) {
453  if (t_goodPV == 0)
454  leadPV = math::XYZPoint((*recVtxs)[k].x(), (*recVtxs)[k].y(), (*recVtxs)[k].z());
455  t_goodPV++;
456  }
457  }
458  }
459  if (t_goodPV == 0 && beamSpotH.isValid()) {
460  leadPV = beamSpotH->position();
461  }
463 #ifdef EDM_ML_DEBUG
464  edm::LogVerbatim("HcalIsoTrack") << "Primary Vertex " << leadPV << " out of " << t_goodPV << " vertex";
465  if (beamSpotH.isValid()) {
466  edm::LogVerbatim("HcalIsoTrack") << " Beam Spot " << beamSpotH->position();
467  }
468 #endif
469  // RecHits
470  edm::Handle<EcalRecHitCollection> barrelRecHitsHandle;
471  iEvent.getByToken(tok_EB_, barrelRecHitsHandle);
472  if (!barrelRecHitsHandle.isValid()) {
473  edm::LogWarning("HcalIsoTrack") << "Cannot access the collection " << labelEB_;
474  okC = false;
475  }
476  edm::Handle<EcalRecHitCollection> endcapRecHitsHandle;
477  iEvent.getByToken(tok_EE_, endcapRecHitsHandle);
478  if (!endcapRecHitsHandle.isValid()) {
479  edm::LogWarning("HcalIsoTrack") << "Cannot access the collection " << labelEE_;
480  okC = false;
481  }
483  iEvent.getByToken(tok_hbhe_, hbhe);
484  if (!hbhe.isValid()) {
485  edm::LogWarning("HcalIsoTrack") << "Cannot access the collection " << labelHBHE_;
486  okC = false;
487  }
489  iEvent.getByToken(tok_cala_, caloTower);
490 
491  //Propagate tracks to calorimeter surface)
492  std::vector<spr::propagatedTrackDirection> trkCaloDirections;
493  spr::propagateCALO(trkCollection, geo, bField, theTrackQuality_, trkCaloDirections, false);
494  std::vector<spr::propagatedTrackID> trkCaloDets;
495  spr::propagateCALO(trkCollection, geo, bField, theTrackQuality_, trkCaloDets, false);
496  std::vector<math::XYZTLorentzVector> vecL1, vecL3;
497  t_RunNo = iEvent.id().run();
498  t_EventNo = iEvent.id().event();
499  t_Tracks = trkCollection->size();
500  t_TracksProp = trkCaloDirections.size();
501  t_ietaAll->clear();
502  t_ietaGood->clear();
503  t_trackType->clear();
504  t_trgbits->clear();
505  t_hltbits->clear();
506 #ifdef EDM_ML_DEBUG
507  edm::LogVerbatim("HcalIsoTrack") << "# of propagated tracks " << t_TracksProp << " out of " << t_Tracks
508  << " with Trigger " << ignoreTrigger_;
509 #endif
510 
511  //Trigger
512  t_trgbits->assign(trigNames_.size(), false);
513  t_hltbits->assign(trigNames_.size(), false);
515  t_L1Bit = true;
516  t_TrigPass = false;
517 
519  if (!ignoreTrigger_) {
520  //L1
522  const std::vector<std::pair<std::string, bool> >& finalDecisions = l1GtUtils_->decisionsFinal();
523  for (const auto& decision : finalDecisions) {
524  if (decision.first.find(l1TrigName_) != std::string::npos) {
525  t_L1Bit = decision.second;
526  break;
527  }
528  }
529 #ifdef EDM_ML_DEBUG
530  edm::LogVerbatim("HcalIsoTrack") << "Trigger Information for " << l1TrigName_ << " is " << t_L1Bit
531  << " from a list of " << finalDecisions.size() << " decisions";
532 #endif
533 
534  //HLT
535  iEvent.getByToken(tok_trigRes_, triggerResults);
536  if (triggerResults.isValid()) {
537  const edm::TriggerNames& triggerNames = iEvent.triggerNames(*triggerResults);
538  const std::vector<std::string>& names = triggerNames.triggerNames();
539  if (!trigNames_.empty()) {
540  for (unsigned int iHLT = 0; iHLT < triggerResults->size(); iHLT++) {
541  int hlt = triggerResults->accept(iHLT);
542  for (unsigned int i = 0; i < trigNames_.size(); ++i) {
543  if (names[iHLT].find(trigNames_[i]) != std::string::npos) {
544  t_trgbits->at(i) = (hlt > 0);
545  t_hltbits->at(i) = (hlt > 0);
546  if (hlt > 0)
547  t_TrigPass = true;
548 #ifdef EDM_ML_DEBUG
549  edm::LogVerbatim("HcalIsoTrack")
550  << "This trigger " << names[iHLT] << " Flag " << hlt << ":" << t_trgbits->at(i);
551 #endif
552  }
553  }
554  }
555  }
556  }
557 #ifdef EDM_ML_DEBUG
558  edm::LogVerbatim("HcalIsoTrack") << "HLT Information shows " << t_TrigPass << ":" << trigNames_.empty() << ":"
559  << okC;
560 #endif
561  }
562 
563  std::array<int, 3> ntksave{{0, 0, 0}};
564  if (ignoreTrigger_ || useL1Trigger_) {
565  t_l1pt = t_l1eta = t_l1phi = 0;
566  t_l3pt = t_l3eta = t_l3phi = 0;
567  if (ignoreTrigger_ || t_L1Bit)
568  ntksave = fillTree(vecL1,
569  vecL3,
570  leadPV,
571  trkCaloDirections,
572  trkCaloDets,
573  geo,
574  caloTopology,
575  theHBHETopology,
576  theEcalChStatus,
577  theEcalSevlv,
578  barrelRecHitsHandle,
579  endcapRecHitsHandle,
580  hbhe,
581  caloTower,
582  genParticles,
583  respCorrs,
584  muonh);
585  t_TracksSaved = ntksave[0];
586  t_TracksLoose = ntksave[1];
587  t_TracksTight = ntksave[2];
588  } else {
590  edm::Handle<trigger::TriggerEvent> triggerEventHandle;
591  iEvent.getByToken(tok_trigEvt_, triggerEventHandle);
592  if (!triggerEventHandle.isValid()) {
593  edm::LogWarning("HcalIsoTrack") << "Error! Can't get the product " << triggerEvent_.label();
594  } else if (okC) {
595  triggerEvent = *(triggerEventHandle.product());
596  const trigger::TriggerObjectCollection& TOC(triggerEvent.getObjects());
597  bool done(false);
598  if (triggerResults.isValid()) {
599  std::vector<std::string> modules;
600  const edm::TriggerNames& triggerNames = iEvent.triggerNames(*triggerResults);
601  const std::vector<std::string>& names = triggerNames.triggerNames();
602  for (unsigned int iHLT = 0; iHLT < triggerResults->size(); iHLT++) {
603  bool ok = (t_TrigPass) || (trigNames_.empty());
604  if (ok) {
605  unsigned int triggerindx = hltConfig_.triggerIndex(names[iHLT]);
606  const std::vector<std::string>& moduleLabels(hltConfig_.moduleLabels(triggerindx));
607  std::vector<math::XYZTLorentzVector> vecL2;
608  vecL1.clear();
609  vecL3.clear();
610  //loop over all trigger filters in event (i.e. filters passed)
611  for (unsigned int ifilter = 0; ifilter < triggerEvent.sizeFilters(); ++ifilter) {
612  std::vector<int> Keys;
613  std::string label = triggerEvent.filterTag(ifilter).label();
614  //loop over keys to objects passing this filter
615  for (unsigned int imodule = 0; imodule < moduleLabels.size(); imodule++) {
616  if (label.find(moduleLabels[imodule]) != std::string::npos) {
617 #ifdef EDM_ML_DEBUG
618  edm::LogVerbatim("HcalIsoTrack") << "FilterName " << label;
619 #endif
620  for (unsigned int ifiltrKey = 0; ifiltrKey < triggerEvent.filterKeys(ifilter).size(); ++ifiltrKey) {
621  Keys.push_back(triggerEvent.filterKeys(ifilter)[ifiltrKey]);
622  const trigger::TriggerObject& TO(TOC[Keys[ifiltrKey]]);
623  math::XYZTLorentzVector v4(TO.px(), TO.py(), TO.pz(), TO.energy());
624  if (label.find(l2Filter_) != std::string::npos) {
625  vecL2.push_back(v4);
626  } else if (label.find(l3Filter_) != std::string::npos) {
627  vecL3.push_back(v4);
628  } else if ((label.find(l1Filter_) != std::string::npos) || (l1Filter_.empty())) {
629  vecL1.push_back(v4);
630  }
631 #ifdef EDM_ML_DEBUG
632  edm::LogVerbatim("HcalIsoTrack")
633  << "key " << ifiltrKey << " : pt " << TO.pt() << " eta " << TO.eta() << " phi " << TO.phi()
634  << " mass " << TO.mass() << " Id " << TO.id();
635 #endif
636  }
637 #ifdef EDM_ML_DEBUG
638  edm::LogVerbatim("HcalIsoTrack")
639  << "sizes " << vecL1.size() << ":" << vecL2.size() << ":" << vecL3.size();
640 #endif
641  }
642  }
643  }
645  math::XYZTLorentzVector mindRvec1;
646  double mindR1(999);
647  for (unsigned int i = 0; i < vecL2.size(); i++) {
648  double dr = dR(vecL1[0], vecL2[i]);
649 #ifdef EDM_ML_DEBUG
650  edm::LogVerbatim("HcalIsoTrack") << "lvl2[" << i << "] dR " << dr;
651 #endif
652  if (dr < mindR1) {
653  mindR1 = dr;
654  mindRvec1 = vecL2[i];
655  }
656  }
657 #ifdef EDM_ML_DEBUG
658  edm::LogVerbatim("HcalIsoTrack") << "L2 object closest to L1 " << mindRvec1 << " at Dr " << mindR1;
659 #endif
660 
661  if (!vecL1.empty()) {
662  t_l1pt = vecL1[0].pt();
663  t_l1eta = vecL1[0].eta();
664  t_l1phi = vecL1[0].phi();
665  } else {
666  t_l1pt = t_l1eta = t_l1phi = 0;
667  }
668  if (!vecL3.empty()) {
669  t_l3pt = vecL3[0].pt();
670  t_l3eta = vecL3[0].eta();
671  t_l3phi = vecL3[0].phi();
672  } else {
673  t_l3pt = t_l3eta = t_l3phi = 0;
674  }
675  // Now fill in the tree for each selected track
676  if (!done) {
677  ntksave = fillTree(vecL1,
678  vecL3,
679  leadPV,
680  trkCaloDirections,
681  trkCaloDets,
682  geo,
683  caloTopology,
684  theHBHETopology,
685  theEcalChStatus,
686  theEcalSevlv,
687  barrelRecHitsHandle,
688  endcapRecHitsHandle,
689  hbhe,
690  caloTower,
691  genParticles,
692  respCorrs,
693  muonh);
694  t_TracksSaved += ntksave[0];
695  t_TracksLoose += ntksave[1];
696  t_TracksTight += ntksave[2];
697  done = true;
698  }
699  }
700  }
701  }
702  }
703  }
704 #ifdef EDM_ML_DEBUG
705  edm::LogVerbatim("HcalIsoTrack") << "Final results on selected tracks " << t_TracksSaved << ":" << t_TracksLoose
706  << ":" << t_TracksTight;
707 #endif
709  tree2->Fill();
710 }
711 
713  tree = fs->make<TTree>("CalibTree", "CalibTree");
714 
715  tree->Branch("t_Run", &t_Run, "t_Run/I");
716  tree->Branch("t_Event", &t_Event, "t_Event/I");
717  tree->Branch("t_DataType", &t_DataType, "t_DataType/I");
718  tree->Branch("t_ieta", &t_ieta, "t_ieta/I");
719  tree->Branch("t_iphi", &t_iphi, "t_iphi/I");
720  tree->Branch("t_EventWeight", &t_EventWeight, "t_EventWeight/D");
721  tree->Branch("t_nVtx", &t_nVtx, "t_nVtx/I");
722  tree->Branch("t_nTrk", &t_nTrk, "t_nTrk/I");
723  tree->Branch("t_goodPV", &t_goodPV, "t_goodPV/I");
724  tree->Branch("t_l1pt", &t_l1pt, "t_l1pt/D");
725  tree->Branch("t_l1eta", &t_l1eta, "t_l1eta/D");
726  tree->Branch("t_l1phi", &t_l1phi, "t_l1phi/D");
727  tree->Branch("t_l3pt", &t_l3pt, "t_l3pt/D");
728  tree->Branch("t_l3eta", &t_l3eta, "t_l3eta/D");
729  tree->Branch("t_l3phi", &t_l3phi, "t_l3phi/D");
730  tree->Branch("t_p", &t_p, "t_p/D");
731  tree->Branch("t_pt", &t_pt, "t_pt/D");
732  tree->Branch("t_phi", &t_phi, "t_phi/D");
733  tree->Branch("t_mindR1", &t_mindR1, "t_mindR1/D");
734  tree->Branch("t_mindR2", &t_mindR2, "t_mindR2/D");
735  tree->Branch("t_eMipDR", &t_eMipDR, "t_eMipDR/D");
736  tree->Branch("t_eMipDR2", &t_eMipDR2, "t_eMipDR2/D");
737  tree->Branch("t_eMipDR3", &t_eMipDR3, "t_eMipDR3/D");
738  tree->Branch("t_eMipDR4", &t_eMipDR4, "t_eMipDR4/D");
739  tree->Branch("t_eMipDR5", &t_eMipDR5, "t_eMipDR5/D");
740  tree->Branch("t_eHcal", &t_eHcal, "t_eHcal/D");
741  tree->Branch("t_eHcal10", &t_eHcal10, "t_eHcal10/D");
742  tree->Branch("t_eHcal30", &t_eHcal30, "t_eHcal30/D");
743  tree->Branch("t_hmaxNearP", &t_hmaxNearP, "t_hmaxNearP/D");
744  tree->Branch("t_emaxNearP", &t_emaxNearP, "t_emaxNearP/D");
745  tree->Branch("t_eAnnular", &t_eAnnular, "t_eAnnular/D");
746  tree->Branch("t_hAnnular", &t_hAnnular, "t_hAnnular/D");
747  tree->Branch("t_rhoh", &t_rhoh, "t_rhoh/D");
748  tree->Branch("t_selectTk", &t_selectTk, "t_selectTk/O");
749  tree->Branch("t_qltyFlag", &t_qltyFlag, "t_qltyFlag/O");
750  tree->Branch("t_qltyMissFlag", &t_qltyMissFlag, "t_qltyMissFlag/O");
751  tree->Branch("t_qltyPVFlag", &t_qltyPVFlag, "t_qltyPVFlag/O");
752  tree->Branch("t_gentrackP", &t_gentrackP, "t_gentrackP/D");
753 
754  t_DetIds = new std::vector<unsigned int>();
755  t_DetIds1 = new std::vector<unsigned int>();
756  t_DetIds3 = new std::vector<unsigned int>();
757  t_HitEnergies = new std::vector<double>();
758  t_HitEnergies1 = new std::vector<double>();
759  t_HitEnergies3 = new std::vector<double>();
760  t_trgbits = new std::vector<bool>();
761  tree->Branch("t_DetIds", "std::vector<unsigned int>", &t_DetIds);
762  tree->Branch("t_HitEnergies", "std::vector<double>", &t_HitEnergies);
763  tree->Branch("t_trgbits", "std::vector<bool>", &t_trgbits);
764  tree->Branch("t_DetIds1", "std::vector<unsigned int>", &t_DetIds1);
765  tree->Branch("t_DetIds3", "std::vector<unsigned int>", &t_DetIds3);
766  tree->Branch("t_HitEnergies1", "std::vector<double>", &t_HitEnergies1);
767  tree->Branch("t_HitEnergies3", "std::vector<double>", &t_HitEnergies3);
768 
769  tree2 = fs->make<TTree>("EventInfo", "Event Information");
770 
771  tree2->Branch("t_RunNo", &t_RunNo, "t_RunNo/i");
772  tree2->Branch("t_EventNo", &t_EventNo, "t_EventNo/i");
773  tree2->Branch("t_Tracks", &t_Tracks, "t_Tracks/I");
774  tree2->Branch("t_TracksProp", &t_TracksProp, "t_TracksProp/I");
775  tree2->Branch("t_TracksSaved", &t_TracksSaved, "t_TracksSaved/I");
776  tree2->Branch("t_TracksLoose", &t_TracksLoose, "t_TracksLoose/I");
777  tree2->Branch("t_TracksTight", &t_TracksTight, "t_TracksTight/I");
778  tree2->Branch("t_TrigPass", &t_TrigPass, "t_TrigPass/O");
779  tree2->Branch("t_TrigPassSel", &t_TrigPassSel, "t_TrigPassSel/O");
780  tree2->Branch("t_L1Bit", &t_L1Bit, "t_L1Bit/O");
781  tree2->Branch("t_allvertex", &t_allvertex, "t_allvertex/I");
782  t_hltbits = new std::vector<bool>();
783  t_ietaAll = new std::vector<int>();
784  t_ietaGood = new std::vector<int>();
785  t_trackType = new std::vector<int>();
786  tree2->Branch("t_ietaAll", "std::vector<int>", &t_ietaAll);
787  tree2->Branch("t_ietaGood", "std::vector<int>", &t_ietaGood);
788  tree2->Branch("t_trackType", "std::vector<int>", &t_trackType);
789  tree2->Branch("t_hltbits", "std::vector<bool>", &t_hltbits);
790 }
791 
792 // ------------ method called when starting to processes a run ------------
793 void HcalIsoTrkAnalyzer::beginRun(edm::Run const& iRun, edm::EventSetup const& iSetup) {
794  hdc_ = &iSetup.getData(tok_ddrec_);
795 
796  bool changed_(true);
797  bool flag = hltConfig_.init(iRun, iSetup, processName_, changed_);
798  edm::LogVerbatim("HcalIsoTrack") << "Run[" << nRun_ << "] " << iRun.run() << " process " << processName_
799  << " init flag " << flag << " change flag " << changed_;
800  // check if trigger names in (new) config
801  if (changed_) {
802 #ifdef EDM_ML_DEBUG
803  edm::LogVerbatim("HcalIsoTrack") << "New trigger menu found !!!";
804 #endif
805  const unsigned int n(hltConfig_.size());
806  for (unsigned itrig = 0; itrig < trigNames_.size(); itrig++) {
807  unsigned int triggerindx = hltConfig_.triggerIndex(trigNames_[itrig]);
808  if (triggerindx >= n) {
809  edm::LogWarning("HcalIsoTrack") << trigNames_[itrig] << " " << triggerindx << " does not exist in "
810  << "the current menu";
811 #ifdef EDM_ML_DEBUG
812  } else {
813  edm::LogVerbatim("HcalIsoTrack") << trigNames_[itrig] << " " << triggerindx << " exists";
814 #endif
815  }
816  }
817  }
818 }
819 
820 // ------------ method called when ending the processing of a run ------------
822  nRun_++;
823  edm::LogVerbatim("HcalIsoTrack") << "endRun[" << nRun_ << "] " << iRun.run();
824 }
825 
828  std::vector<std::string> trig = {"HLT_PFJet40",
829  "HLT_PFJet60",
830  "HLT_PFJet80",
831  "HLT_PFJet140",
832  "HLT_PFJet200",
833  "HLT_PFJet260",
834  "HLT_PFJet320",
835  "HLT_PFJet400",
836  "HLT_PFJet450",
837  "HLT_PFJet500"};
838  desc.add<std::vector<std::string> >("triggers", trig);
839  desc.add<std::string>("processName", "HLT");
840  desc.add<std::string>("l1Filter", "");
841  desc.add<std::string>("l2Filter", "L2Filter");
842  desc.add<std::string>("l3Filter", "Filter");
843  // following 10 parameters are parameters to select good tracks
844  desc.add<std::string>("trackQuality", "highPurity");
845  desc.add<double>("minTrackPt", 1.0);
846  desc.add<double>("maxDxyPV", 0.02);
847  desc.add<double>("maxDzPV", 0.02);
848  desc.add<double>("maxChi2", 5.0);
849  desc.add<double>("maxDpOverP", 0.1);
850  desc.add<int>("minOuterHit", 4);
851  desc.add<int>("minLayerCrossed", 8);
852  desc.add<int>("maxInMiss", 0);
853  desc.add<int>("maxOutMiss", 0);
854  // Minimum momentum of selected isolated track and signal zone
855  desc.add<double>("minimumTrackP", 10.0);
856  desc.add<double>("coneRadius", 34.98);
857  // signal zone in ECAL and MIP energy cutoff
858  desc.add<double>("coneRadiusMIP", 14.0);
859  desc.add<double>("coneRadiusMIP2", 18.0);
860  desc.add<double>("coneRadiusMIP3", 20.0);
861  desc.add<double>("coneRadiusMIP4", 22.0);
862  desc.add<double>("coneRadiusMIP5", 24.0);
863  desc.add<double>("maximumEcalEnergy", 2.0);
864  // following 4 parameters are for isolation cuts and described in the code
865  desc.add<double>("maxTrackP", 8.0);
866  desc.add<double>("slopeTrackP", 0.05090504066);
867  desc.add<double>("isolationEnergyTight", 2.0);
868  desc.add<double>("isolationEnergyLoose", 10.0);
869  // energy thershold for ECAL (from Egamma group)
870  desc.add<double>("EBHitEnergyThreshold", 0.08);
871  desc.add<double>("EEHitEnergyThreshold0", 0.30);
872  desc.add<double>("EEHitEnergyThreshold1", 0.00);
873  desc.add<double>("EEHitEnergyThreshold2", 0.00);
874  desc.add<double>("EEHitEnergyThreshold3", 0.00);
875  desc.add<double>("EEHitEnergyThresholdLow", 0.30);
876  desc.add<double>("EEHitEnergyThresholdHigh", 0.30);
877  // prescale factors
878  desc.add<double>("momentumLow", 40.0);
879  desc.add<double>("momentumHigh", 60.0);
880  desc.add<int>("prescaleLow", 1);
881  desc.add<int>("prescaleHigh", 1);
882  // various labels for collections used in the code
883  desc.add<edm::InputTag>("labelTriggerEvent", edm::InputTag("hltTriggerSummaryAOD", "", "HLT"));
884  desc.add<edm::InputTag>("labelTriggerResult", edm::InputTag("TriggerResults", "", "HLT"));
885  desc.add<std::string>("labelTrack", "generalTracks");
886  desc.add<std::string>("labelVertex", "offlinePrimaryVertices");
887  desc.add<std::string>("labelEBRecHit", "EcalRecHitsEB");
888  desc.add<std::string>("labelEERecHit", "EcalRecHitsEE");
889  desc.add<std::string>("labelHBHERecHit", "hbhereco");
890  desc.add<std::string>("labelBeamSpot", "offlineBeamSpot");
891  desc.add<std::string>("labelCaloTower", "towerMaker");
892  desc.add<std::string>("labelMuon", "muons");
893  desc.add<edm::InputTag>("algInputTag", edm::InputTag("gtStage2Digis"));
894  desc.add<edm::InputTag>("extInputTag", edm::InputTag("gtStage2Digis"));
895  desc.addUntracked<std::string>("moduleName", "");
896  desc.addUntracked<std::string>("producerName", "");
897  // Various flags used for selecting tracks, choice of energy Method2/0
898  // Data type 0/1 for single jet trigger or others
899  desc.addUntracked<int>("useRaw", 0);
900  desc.addUntracked<bool>("ignoreTriggers", false);
901  desc.addUntracked<bool>("useL1Trigger", false);
902  desc.addUntracked<double>("hcalScale", 1.0);
903  desc.addUntracked<int>("dataType", 0);
904  desc.addUntracked<bool>("unCorrect", false);
905  desc.addUntracked<bool>("collapseDepth", false);
906  desc.addUntracked<std::string>("l1TrigName", "L1_SingleJet60");
907  desc.addUntracked<int>("outMode", 11);
908  std::vector<int> dummy;
909  desc.addUntracked<std::vector<int> >("oldID", dummy);
910  desc.addUntracked<std::vector<int> >("newDepth", dummy);
911  desc.addUntracked<bool>("hep17", false);
912  descriptions.add("HcalIsoTrkAnalyzer", desc);
913 }
914 
915 std::array<int, 3> HcalIsoTrkAnalyzer::fillTree(std::vector<math::XYZTLorentzVector>& vecL1,
916  std::vector<math::XYZTLorentzVector>& vecL3,
917  math::XYZPoint& leadPV,
918  std::vector<spr::propagatedTrackDirection>& trkCaloDirections,
919  std::vector<spr::propagatedTrackID>& trkCaloDets,
920  const CaloGeometry* geo,
921  const CaloTopology* caloTopology,
922  const HcalTopology* theHBHETopology,
923  const EcalChannelStatus* theEcalChStatus,
924  const EcalSeverityLevelAlgo* theEcalSevlv,
925  edm::Handle<EcalRecHitCollection>& barrelRecHitsHandle,
926  edm::Handle<EcalRecHitCollection>& endcapRecHitsHandle,
930  const HcalRespCorrs* respCorrs,
931  const edm::Handle<reco::MuonCollection>& muonh) {
932  int nSave(0), nLoose(0), nTight(0);
933  //Loop over tracks
934  std::vector<spr::propagatedTrackDirection>::const_iterator trkDetItr;
935  unsigned int nTracks(0), nselTracks(0);
936  t_nTrk = trkCaloDirections.size();
937  t_rhoh = (tower.isValid()) ? rhoh(tower) : 0;
938  for (trkDetItr = trkCaloDirections.begin(), nTracks = 0; trkDetItr != trkCaloDirections.end();
939  trkDetItr++, nTracks++) {
940  const reco::Track* pTrack = &(*(trkDetItr->trkItr));
941  math::XYZTLorentzVector v4(pTrack->px(), pTrack->py(), pTrack->pz(), pTrack->p());
942 #ifdef EDM_ML_DEBUG
943  edm::LogVerbatim("HcalIsoTrack") << "This track : " << nTracks << " (pt|eta|phi|p) :" << pTrack->pt() << "|"
944  << pTrack->eta() << "|" << pTrack->phi() << "|" << pTrack->p();
945 #endif
946  t_mindR2 = 999;
947  for (unsigned int k = 0; k < vecL3.size(); ++k) {
948  double dr = dR(vecL3[k], v4);
949  if (dr < t_mindR2) {
950  t_mindR2 = dr;
951  }
952  }
953  t_mindR1 = (!vecL1.empty()) ? dR(vecL1[0], v4) : 999;
954 #ifdef EDM_ML_DEBUG
955  edm::LogVerbatim("HcalIsoTrack") << "Closest L3 object at dr :" << t_mindR2 << " and from L1 " << t_mindR1;
956 #endif
957  t_ieta = t_iphi = 0;
958  if (trkDetItr->okHCAL) {
959  HcalDetId detId = (HcalDetId)(trkDetItr->detIdHCAL);
960  t_ieta = detId.ieta();
961  t_iphi = detId.iphi();
962  if (t_p > 40.0 && t_p <= 60.0)
963  t_ietaAll->emplace_back(t_ieta);
964  }
965  //Selection of good track
966  t_selectTk = spr::goodTrack(pTrack, leadPV, selectionParameter_, false);
968  oneCutParameters.maxDxyPV = 10;
969  oneCutParameters.maxDzPV = 100;
970  oneCutParameters.maxInMiss = 2;
971  oneCutParameters.maxOutMiss = 2;
972  bool qltyFlag = spr::goodTrack(pTrack, leadPV, oneCutParameters, false);
973  oneCutParameters = selectionParameter_;
974  oneCutParameters.maxDxyPV = 10;
975  oneCutParameters.maxDzPV = 100;
976  t_qltyMissFlag = spr::goodTrack(pTrack, leadPV, oneCutParameters, false);
977  oneCutParameters = selectionParameter_;
978  oneCutParameters.maxInMiss = 2;
979  oneCutParameters.maxOutMiss = 2;
980  t_qltyPVFlag = spr::goodTrack(pTrack, leadPV, oneCutParameters, false);
981  double eIsolation = maxRestrictionP_ * exp(slopeRestrictionP_ * std::abs((double)t_ieta));
982  if (eIsolation < eIsolate1_)
983  eIsolation = eIsolate1_;
984  if (eIsolation < eIsolate2_)
985  eIsolation = eIsolate2_;
986 #ifdef EDM_ML_DEBUG
987  edm::LogVerbatim("HcalIsoTrack") << "qltyFlag|okECAL|okHCAL : " << qltyFlag << "|" << trkDetItr->okECAL << "|"
988  << trkDetItr->okHCAL << " eIsolation " << eIsolation;
989 #endif
990  t_qltyFlag = (qltyFlag && trkDetItr->okECAL && trkDetItr->okHCAL);
991  bool notMuon = (muonh.isValid()) ? notaMuon(pTrack, muonh) : true;
992  if (t_qltyFlag && notMuon) {
993  nselTracks++;
994  int nNearTRKs(0);
996  std::vector<DetId> eIds;
997  std::vector<double> eHit;
999  barrelRecHitsHandle,
1000  endcapRecHitsHandle,
1001  trkDetItr->pointHCAL,
1002  trkDetItr->pointECAL,
1003  a_mipR_,
1004  trkDetItr->directionECAL,
1005  eIds,
1006  eHit);
1007  double eEcal(0);
1008  for (unsigned int k = 0; k < eIds.size(); ++k) {
1009  if (eHit[k] > eThreshold(eIds[k], geo))
1010  eEcal += eHit[k];
1011  }
1012 #ifdef EDM_ML_DEBUG
1013  edm::LogVerbatim("HcalIsoTrack") << "eMIP before and after: " << t_eMipDR << ":" << eEcal;
1014 #endif
1015  t_eMipDR = eEcal;
1018  std::vector<DetId> eIds2;
1019  std::vector<double> eHit2;
1020  t_eMipDR2 = spr::eCone_ecal(geo,
1021  barrelRecHitsHandle,
1022  endcapRecHitsHandle,
1023  trkDetItr->pointHCAL,
1024  trkDetItr->pointECAL,
1025  a_mipR2_,
1026  trkDetItr->directionECAL,
1027  eIds2,
1028  eHit2);
1029  double eEcal2(0);
1030  for (unsigned int k = 0; k < eIds2.size(); ++k) {
1031  if (eHit2[k] > eThreshold(eIds2[k], geo))
1032  eEcal2 += eHit2[k];
1033  }
1034 #ifdef EDM_ML_DEBUG
1035  edm::LogVerbatim("HcalIsoTrack") << "eMIP before and after: " << t_eMipDR2 << ":" << eEcal2;
1036 #endif
1037  t_eMipDR2 = eEcal2;
1040  std::vector<DetId> eIds3;
1041  std::vector<double> eHit3;
1042  t_eMipDR3 = spr::eCone_ecal(geo,
1043  barrelRecHitsHandle,
1044  endcapRecHitsHandle,
1045  trkDetItr->pointHCAL,
1046  trkDetItr->pointECAL,
1047  a_mipR3_,
1048  trkDetItr->directionECAL,
1049  eIds3,
1050  eHit3);
1051  double eEcal3(0);
1052  for (unsigned int k = 0; k < eIds3.size(); ++k) {
1053  if (eHit3[k] > eThreshold(eIds3[k], geo))
1054  eEcal3 += eHit3[k];
1055  }
1056 #ifdef EDM_ML_DEBUG
1057  edm::LogVerbatim("HcalIsoTrack") << "eMIP before and after: " << t_eMipDR3 << ":" << eEcal3;
1058 #endif
1059  t_eMipDR3 = eEcal3;
1062  std::vector<DetId> eIds4;
1063  std::vector<double> eHit4;
1064  t_eMipDR4 = spr::eCone_ecal(geo,
1065  barrelRecHitsHandle,
1066  endcapRecHitsHandle,
1067  trkDetItr->pointHCAL,
1068  trkDetItr->pointECAL,
1069  a_mipR4_,
1070  trkDetItr->directionECAL,
1071  eIds4,
1072  eHit4);
1073  double eEcal4(0);
1074  for (unsigned int k = 0; k < eIds4.size(); ++k) {
1075  if (eHit4[k] > eThreshold(eIds4[k], geo))
1076  eEcal4 += eHit4[k];
1077  }
1078 #ifdef EDM_ML_DEBUG
1079  edm::LogVerbatim("HcalIsoTrack") << "eMIP before and after: " << t_eMipDR4 << ":" << eEcal4;
1080 #endif
1081  t_eMipDR4 = eEcal4;
1084  std::vector<DetId> eIds5;
1085  std::vector<double> eHit5;
1086  t_eMipDR5 = spr::eCone_ecal(geo,
1087  barrelRecHitsHandle,
1088  endcapRecHitsHandle,
1089  trkDetItr->pointHCAL,
1090  trkDetItr->pointECAL,
1091  a_mipR5_,
1092  trkDetItr->directionECAL,
1093  eIds5,
1094  eHit5);
1095  double eEcal5(0);
1096  for (unsigned int k = 0; k < eIds5.size(); ++k) {
1097  if (eHit5[k] > eThreshold(eIds5[k], geo))
1098  eEcal5 += eHit5[k];
1099  }
1100 #ifdef EDM_ML_DEBUG
1101  edm::LogVerbatim("HcalIsoTrack") << "eMIP before and after: " << t_eMipDR5 << ":" << eEcal5;
1102 #endif
1103  t_eMipDR5 = eEcal5;
1105 
1106  t_emaxNearP = spr::chargeIsolationEcal(nTracks, trkCaloDets, geo, caloTopology, 15, 15);
1107  const DetId cellE(trkDetItr->detIdECAL);
1108  std::pair<double, bool> e11x11P = spr::eECALmatrix(cellE,
1109  barrelRecHitsHandle,
1110  endcapRecHitsHandle,
1111  *theEcalChStatus,
1112  geo,
1113  caloTopology,
1114  theEcalSevlv,
1115  5,
1116  5,
1117  -100.0,
1118  -100.0,
1119  -100.0,
1120  100.0);
1121  std::pair<double, bool> e15x15P = spr::eECALmatrix(cellE,
1122  barrelRecHitsHandle,
1123  endcapRecHitsHandle,
1124  *theEcalChStatus,
1125  geo,
1126  caloTopology,
1127  theEcalSevlv,
1128  7,
1129  7,
1130  -100.0,
1131  -100.0,
1132  -100.0,
1133  100.0);
1134  if (e11x11P.second && e15x15P.second) {
1135  t_eAnnular = (e15x15P.first - e11x11P.first);
1136  } else {
1137  t_eAnnular = -(e15x15P.first - e11x11P.first);
1138  }
1139  t_hmaxNearP = spr::chargeIsolationCone(nTracks, trkCaloDirections, a_charIsoR_, nNearTRKs, false);
1140  const DetId cellH(trkDetItr->detIdHCAL);
1141  double h5x5 = spr::eHCALmatrix(
1142  theHBHETopology, cellH, hbhe, 2, 2, false, true, -100.0, -100.0, -100.0, -100.0, -100.0, 100.0);
1143  double h7x7 = spr::eHCALmatrix(
1144  theHBHETopology, cellH, hbhe, 3, 3, false, true, -100.0, -100.0, -100.0, -100.0, -100.0, 100.0);
1145  t_hAnnular = h7x7 - h5x5;
1146 #ifdef EDM_ML_DEBUG
1147  edm::LogVerbatim("HcalIsoTrack") << "max p Near (Ecal) " << t_emaxNearP << " (Hcal) " << t_hmaxNearP
1148  << " Annular E (Ecal) " << e11x11P.first << ":" << e15x15P.first << ":"
1149  << t_eAnnular << " (Hcal) " << h5x5 << ":" << h7x7 << ":" << t_hAnnular;
1150 #endif
1151  t_gentrackP = trackP(pTrack, genParticles);
1152  if (t_eMipDR < eEcalMax_ && t_hmaxNearP < eIsolation) {
1153  t_DetIds->clear();
1154  t_HitEnergies->clear();
1155  t_DetIds1->clear();
1156  t_HitEnergies1->clear();
1157  t_DetIds3->clear();
1158  t_HitEnergies3->clear();
1159  int nRecHits(-999), nRecHits1(-999), nRecHits3(-999);
1160  std::vector<DetId> ids, ids1, ids3;
1161  std::vector<double> edet0, edet1, edet3;
1162  t_eHcal = spr::eCone_hcal(geo,
1163  hbhe,
1164  trkDetItr->pointHCAL,
1165  trkDetItr->pointECAL,
1166  a_coneR_,
1167  trkDetItr->directionHCAL,
1168  nRecHits,
1169  ids,
1170  edet0,
1171  useRaw_);
1172  if (!oldID_.empty()) {
1173  for (unsigned k = 0; k < ids.size(); ++k)
1174  ids[k] = newId(ids[k]);
1175  }
1176  storeEnergy(0, respCorrs, ids, edet0, t_eHcal, t_DetIds, t_HitEnergies);
1177 
1178  //----- hcal energy in the extended cone 1 (a_coneR+10) --------------
1179  t_eHcal10 = spr::eCone_hcal(geo,
1180  hbhe,
1181  trkDetItr->pointHCAL,
1182  trkDetItr->pointECAL,
1183  a_coneR1_,
1184  trkDetItr->directionHCAL,
1185  nRecHits1,
1186  ids1,
1187  edet1,
1188  useRaw_);
1189  if (!oldID_.empty()) {
1190  for (unsigned k = 0; k < ids1.size(); ++k)
1191  ids1[k] = newId(ids1[k]);
1192  }
1193  storeEnergy(1, respCorrs, ids1, edet1, t_eHcal10, t_DetIds1, t_HitEnergies1);
1194 
1195  //----- hcal energy in the extended cone 3 (a_coneR+30) --------------
1196  t_eHcal30 = spr::eCone_hcal(geo,
1197  hbhe,
1198  trkDetItr->pointHCAL,
1199  trkDetItr->pointECAL,
1200  a_coneR2_,
1201  trkDetItr->directionHCAL,
1202  nRecHits3,
1203  ids3,
1204  edet3,
1205  useRaw_);
1206  if (!oldID_.empty()) {
1207  for (unsigned k = 0; k < ids3.size(); ++k)
1208  ids3[k] = newId(ids3[k]);
1209  }
1210  storeEnergy(3, respCorrs, ids3, edet3, t_eHcal30, t_DetIds3, t_HitEnergies3);
1211 
1212  t_p = pTrack->p();
1213  t_pt = pTrack->pt();
1214  t_phi = pTrack->phi();
1215 
1216 #ifdef EDM_ML_DEBUG
1217  edm::LogVerbatim("HcalIsoTrack") << "This track : " << nTracks << " (pt|eta|phi|p) :" << t_pt << "|"
1218  << pTrack->eta() << "|" << t_phi << "|" << t_p << " Generator Level p "
1219  << t_gentrackP;
1220  edm::LogVerbatim("HcalIsoTrack") << "e_MIP " << t_eMipDR << " Chg Isolation " << t_hmaxNearP << " eHcal"
1221  << t_eHcal << " ieta " << t_ieta << " Quality " << t_qltyMissFlag << ":"
1222  << t_qltyPVFlag << ":" << t_selectTk;
1223  for (unsigned int ll = 0; ll < t_DetIds->size(); ll++) {
1224  edm::LogVerbatim("HcalIsoTrack")
1225  << "det id is = " << t_DetIds->at(ll) << " hit enery is = " << t_HitEnergies->at(ll);
1226  }
1227  for (unsigned int ll = 0; ll < t_DetIds1->size(); ll++) {
1228  edm::LogVerbatim("HcalIsoTrack")
1229  << "det id is = " << t_DetIds1->at(ll) << " hit enery is = " << t_HitEnergies1->at(ll);
1230  }
1231  for (unsigned int ll = 0; ll < t_DetIds3->size(); ll++) {
1232  edm::LogVerbatim("HcalIsoTrack")
1233  << "det id is = " << t_DetIds3->at(ll) << " hit enery is = " << t_HitEnergies3->at(ll);
1234  }
1235 #endif
1236  bool accept(false);
1237  if (t_p > pTrackMin_) {
1238  if (t_p < pTrackLow_) {
1239  ++nLow_;
1240  if (prescaleLow_ <= 1)
1241  accept = true;
1242  else if (nLow_ % prescaleLow_ == 1)
1243  accept = true;
1244  } else if (t_p > pTrackHigh_) {
1245  ++nHigh_;
1246  if (prescaleHigh_ <= 1)
1247  accept = true;
1248  else if (nHigh_ % prescaleHigh_ == 1)
1249  accept = true;
1250  } else {
1251  accept = true;
1252  }
1253  }
1254  if (accept) {
1255  tree->Fill();
1256  nSave++;
1257  int type(0);
1258  if (t_eMipDR < 1.0) {
1259  if (t_hmaxNearP < eIsolate2_) {
1260  ++nLoose;
1261  type = 1;
1262  }
1263  if (t_hmaxNearP < eIsolate1_) {
1264  ++nTight;
1265  type = 2;
1266  }
1267  }
1268  if (t_p > 40.0 && t_p <= 60.0 && t_selectTk) {
1269  t_ietaGood->emplace_back(t_ieta);
1270  t_trackType->emplace_back(type);
1271  }
1272 #ifdef EDM_ML_DEBUG
1273  for (unsigned int k = 0; k < t_trgbits->size(); k++) {
1274  edm::LogVerbatim("HcalIsoTrack") << "trigger bit is = " << t_trgbits->at(k);
1275  }
1276 #endif
1277  }
1278  }
1279  }
1280  }
1281  std::array<int, 3> i3{{nSave, nLoose, nTight}};
1282  return i3;
1283 }
1284 
1286  return reco::deltaR(vec1.eta(), vec1.phi(), vec2.eta(), vec2.phi());
1287 }
1288 
1291  double pmom = -1.0;
1292  if (genParticles.isValid()) {
1293  double mindR(999.9);
1294  for (const auto& p : (*genParticles)) {
1295  double dR = reco::deltaR(pTrack->eta(), pTrack->phi(), p.momentum().Eta(), p.momentum().Phi());
1296  if (dR < mindR) {
1297  mindR = dR;
1298  pmom = p.momentum().R();
1299  }
1300  }
1301  }
1302  return pmom;
1303 }
1304 
1306  std::vector<double> sumPFNallSMDQH2;
1307  sumPFNallSMDQH2.reserve(phibins_.size() * etabins_.size());
1308 
1309  for (auto eta : etabins_) {
1310  for (auto phi : phibins_) {
1311  double hadder = 0;
1312  for (const auto& pf_it : (*tower)) {
1313  if (fabs(eta - pf_it.eta()) > etahalfdist_)
1314  continue;
1315  if (fabs(reco::deltaPhi(phi, pf_it.phi())) > phihalfdist_)
1316  continue;
1317  hadder += pf_it.hadEt();
1318  }
1319  sumPFNallSMDQH2.emplace_back(hadder);
1320  }
1321  }
1322 
1323  double evt_smdq(0);
1324  std::sort(sumPFNallSMDQH2.begin(), sumPFNallSMDQH2.end());
1325  if (sumPFNallSMDQH2.size() % 2)
1326  evt_smdq = sumPFNallSMDQH2[(sumPFNallSMDQH2.size() - 1) / 2];
1327  else
1328  evt_smdq = (sumPFNallSMDQH2[sumPFNallSMDQH2.size() / 2] + sumPFNallSMDQH2[(sumPFNallSMDQH2.size() - 2) / 2]) / 2.;
1329  double rhoh = evt_smdq / (etadist_ * phidist_);
1330 #ifdef EDM_ML_DEBUG
1331  edm::LogVerbatim("HcalIsoTrack") << "Rho " << evt_smdq << ":" << rhoh;
1332 #endif
1333  return rhoh;
1334 }
1335 
1336 double HcalIsoTrkAnalyzer::eThreshold(const DetId& id, const CaloGeometry* geo) const {
1337  const GlobalPoint& pos = geo->getPosition(id);
1338  double eta = std::abs(pos.eta());
1339  double eThr(hitEthrEB_);
1340  if (id.subdetId() != EcalBarrel) {
1341  eThr = (((eta * hitEthrEE3_ + hitEthrEE2_) * eta + hitEthrEE1_) * eta + hitEthrEE0_);
1342  if (eThr < hitEthrEELo_)
1343  eThr = hitEthrEELo_;
1344  else if (eThr > hitEthrEEHi_)
1345  eThr = hitEthrEEHi_;
1346  }
1347  return eThr;
1348 }
1349 
1351  HcalDetId hid(id);
1352  if (hep17_ && ((hid.iphi() < 63) || (hid.iphi() > 66) || (hid.zside() < 0)))
1353  return id;
1354  for (unsigned int k = 0; k < oldID_.size(); ++k) {
1355  if ((hid.subdetId() == oldDet_[k]) && (hid.ietaAbs() == oldEta_[k]) && (hid.depth() == oldDepth_[k])) {
1356  return static_cast<DetId>(HcalDetId(hid.subdet(), hid.ieta(), hid.iphi(), newDepth_[k]));
1357  }
1358  }
1359  return id;
1360 }
1361 
1363  const HcalRespCorrs* respCorrs,
1364  const std::vector<DetId>& ids,
1365  std::vector<double>& edet,
1366  double& eHcal,
1367  std::vector<unsigned int>* detIds,
1368  std::vector<double>* hitEnergies) {
1369  double ehcal(0);
1370  if (unCorrect_) {
1371  for (unsigned int k = 0; k < ids.size(); ++k) {
1372  double corr = (respCorrs->getValues(ids[k]))->getValue();
1373  if (corr != 0)
1374  edet[k] /= corr;
1375  ehcal += edet[k];
1376  }
1377  } else {
1378  for (const auto& en : edet)
1379  ehcal += en;
1380  }
1381  if ((std::abs(ehcal - eHcal) > 0.001) && (!unCorrect_))
1382  edm::LogWarning("HcalIsoTrack") << "Check inconsistent energies: " << indx << " " << eHcal << ":" << ehcal
1383  << " from " << ids.size() << " cells";
1384  eHcal = hcalScale_ * ehcal;
1385 
1386  if (collapseDepth_) {
1387  std::map<HcalDetId, double> hitMap;
1388  for (unsigned int k = 0; k < ids.size(); ++k) {
1389  HcalDetId id = hdc_->mergedDepthDetId(HcalDetId(ids[k]));
1390  auto itr = hitMap.find(id);
1391  if (itr == hitMap.end()) {
1392  hitMap[id] = edet[k];
1393  } else {
1394  (itr->second) += edet[k];
1395  }
1396  }
1397  detIds->reserve(hitMap.size());
1398  hitEnergies->reserve(hitMap.size());
1399  for (const auto& hit : hitMap) {
1400  detIds->emplace_back(hit.first.rawId());
1401  hitEnergies->emplace_back(hit.second);
1402  }
1403  } else {
1404  detIds->reserve(ids.size());
1405  hitEnergies->reserve(ids.size());
1406  for (unsigned int k = 0; k < ids.size(); ++k) {
1407  detIds->emplace_back(ids[k].rawId());
1408  hitEnergies->emplace_back(edet[k]);
1409  }
1410  }
1411 #ifdef EDM_ML_DEBUG
1412  edm::LogVerbatim("HcalIsoTrack") << "Input to storeEnergy with " << ids.size() << " cells";
1413  for (unsigned int k = 0; k < ids.size(); ++k)
1414  edm::LogVerbatim("HcalIsoTrack") << "Hit [" << k << "] " << HcalDetId(ids[k]) << " E " << edet[k];
1415  edm::LogVerbatim("HcalIsoTrack") << "Output of storeEnergy with " << detIds->size() << " cells and Etot " << eHcal;
1416  for (unsigned int k = 0; k < detIds->size(); ++k)
1417  edm::LogVerbatim("HcalIsoTrack") << "Hit [" << k << "] " << HcalDetId((*detIds)[k]) << " E " << (*hitEnergies)[k];
1418 #endif
1419 }
1420 
1422  bool flag(true);
1423  for (reco::MuonCollection::const_iterator recMuon = muonh->begin(); recMuon != muonh->end(); ++recMuon) {
1424  if (recMuon->innerTrack().isNonnull()) {
1425  const reco::Track* pTrack = (recMuon->innerTrack()).get();
1426  bool mediumMuon = (((recMuon->isPFMuon()) && (recMuon->isGlobalMuon() || recMuon->isTrackerMuon())) &&
1427  (recMuon->innerTrack()->validFraction() > 0.49));
1428  if (mediumMuon) {
1429  double chiGlobal = ((recMuon->globalTrack().isNonnull()) ? recMuon->globalTrack()->normalizedChi2() : 999);
1430  bool goodGlob = (recMuon->isGlobalMuon() && chiGlobal < 3 &&
1431  recMuon->combinedQuality().chi2LocalPosition < 12 && recMuon->combinedQuality().trkKink < 20);
1432  mediumMuon = muon::segmentCompatibility(*recMuon) > (goodGlob ? 0.303 : 0.451);
1433  }
1434  if (mediumMuon) {
1435  double dR = reco::deltaR(pTrack->eta(), pTrack->phi(), pTrack0->eta(), pTrack0->phi());
1436  if (dR < 0.1) {
1437  flag = false;
1438  break;
1439  }
1440  }
1441  }
1442  }
1443  return flag;
1444 }
1445 
1446 //define this as a plug-in
trigger::TriggerObject::phi
float phi() const
Definition: TriggerObject.h:54
HcalIsoTrkAnalyzer::phidist_
double phidist_
Definition: HcalIsoTrkAnalyzer.cc:165
spr::trackSelectionParameters::maxDxyPV
double maxDxyPV
Definition: TrackSelection.h:22
HcalIsoTrkAnalyzer::beginRun
void beginRun(edm::Run const &, edm::EventSetup const &) override
Definition: HcalIsoTrkAnalyzer.cc:793
HcalDDDRecConstants::mergedDepthDetId
HcalDetId mergedDepthDetId(const HcalDetId &id) const
Definition: HcalDDDRecConstants.cc:647
HcalIsoTrkAnalyzer::tok_cala_
edm::EDGetTokenT< CaloTowerCollection > tok_cala_
Definition: HcalIsoTrkAnalyzer.cc:175
EcalSeverityLevelAlgo
Definition: EcalSeverityLevelAlgo.h:33
jetSelector_cfi.nLoose
nLoose
Definition: jetSelector_cfi.py:11
DDAxes::y
HcalIsoTrkAnalyzer::tok_bFieldH_
edm::ESGetToken< MagneticField, IdealMagneticFieldRecord > tok_bFieldH_
Definition: HcalIsoTrkAnalyzer.cc:181
HcalIsoTrkAnalyzer::t_p
double t_p
Definition: HcalIsoTrkAnalyzer.cc:193
HcalRespCorrsRcd.h
testProducerWithPsetDescEmpty_cfi.i3
i3
Definition: testProducerWithPsetDescEmpty_cfi.py:47
electrons_cff.bool
bool
Definition: electrons_cff.py:366
EDAnalyzer.h
HcalRespCorrs
Definition: HcalRespCorrs.h:17
HcalIsoTrkAnalyzer::tok_EB_
edm::EDGetTokenT< EcalRecHitCollection > tok_EB_
Definition: HcalIsoTrkAnalyzer.cc:172
mps_fire.i
i
Definition: mps_fire.py:428
HcalIsoTrkAnalyzer::t_TracksTight
int t_TracksTight
Definition: HcalIsoTrkAnalyzer.cc:208
HcalIsoTrkAnalyzer::prescaleLow_
const int prescaleLow_
Definition: HcalIsoTrkAnalyzer.cc:148
HcalIsoTrkAnalyzer::l1TrigName_
const std::string l1TrigName_
Definition: HcalIsoTrkAnalyzer.cc:157
HcalIsoTrkAnalyzer::hitEthrEE3_
const double hitEthrEE3_
Definition: HcalIsoTrkAnalyzer.cc:153
HcalIsoTrkAnalyzer::labelRecVtx_
const std::string labelRecVtx_
Definition: HcalIsoTrkAnalyzer.cc:156
Muon.h
LogMessageMonitor_cff.modules
modules
Definition: LogMessageMonitor_cff.py:7
HcalIsoTrkAnalyzer::t_trgbits
std::vector< bool > * t_trgbits
Definition: HcalIsoTrkAnalyzer.cc:205
HcalIsoTrkAnalyzer::t_nVtx
int t_nVtx
Definition: HcalIsoTrkAnalyzer.cc:192
genParticles2HepMC_cfi.genParticles
genParticles
Definition: genParticles2HepMC_cfi.py:4
HcalIsoTrkAnalyzer::t_DetIds3
std::vector< unsigned int > * t_DetIds3
Definition: HcalIsoTrkAnalyzer.cc:203
HcalIsoTrkAnalyzer::fs
edm::Service< TFileService > fs
Definition: HcalIsoTrkAnalyzer.cc:136
HcalIsoTrkAnalyzer::t_eHcal10
double t_eHcal10
Definition: HcalIsoTrkAnalyzer.cc:200
funct::false
false
Definition: Factorize.h:29
HcalIsoTrkAnalyzer::a_mipR4_
const double a_mipR4_
Definition: HcalIsoTrkAnalyzer.cc:144
BXVector.h
dqmiodumpmetadata.n
n
Definition: dqmiodumpmetadata.py:28
HcalCondObjectContainerBase::setTopo
void setTopo(const HcalTopology *topo)
Definition: HcalCondObjectContainerBase.cc:17
edm::Handle::product
T const * product() const
Definition: Handle.h:70
HcalIsoTrkAnalyzer::tok_ecalChStatus_
edm::ESGetToken< EcalChannelStatus, EcalChannelStatusRcd > tok_ecalChStatus_
Definition: HcalIsoTrkAnalyzer.cc:182
TriggerResults.h
vec1
std::vector< double > vec1
Definition: HCALResponse.h:15
spr::trackSelectionParameters::maxDzPV
double maxDzPV
Definition: TrackSelection.h:22
HcalIsoTrkAnalyzer::t_nTrk
int t_nTrk
Definition: HcalIsoTrkAnalyzer.cc:192
HcalDetId::iphi
constexpr int iphi() const
get the cell iphi
Definition: HcalDetId.h:157
spr::trackSelectionParameters::maxChi2
double maxChi2
Definition: TrackSelection.h:22
muon::segmentCompatibility
float segmentCompatibility(const reco::Muon &muon, reco::Muon::ArbitrationType arbitrationType=reco::Muon::SegmentAndTrackArbitration)
Definition: MuonSelectors.cc:61
reco::TrackBase::p
double p() const
momentum vector magnitude
Definition: TrackBase.h:631
HcalIsoTrkAnalyzer::selectionParameter_
spr::trackSelectionParameters selectionParameter_
Definition: HcalIsoTrkAnalyzer.cc:139
HcalIsoTrkAnalyzer::oldID_
const std::vector< int > oldID_
Definition: HcalIsoTrkAnalyzer.cc:158
HcalIsoTrkAnalyzer::tok_bs_
edm::EDGetTokenT< reco::BeamSpot > tok_bs_
Definition: HcalIsoTrkAnalyzer.cc:171
EcalSeverityLevelAlgoRcd.h
edm::Run
Definition: Run.h:45
CaloGeometry::getPosition
GlobalPoint getPosition(const DetId &id) const
Get the position of a given detector id.
Definition: CaloGeometry.cc:50
reco::deltaPhi
constexpr double deltaPhi(double phi1, double phi2)
Definition: deltaPhi.h:26
TriggerEvent.h
edm::EDGetTokenT< trigger::TriggerEvent >
TrackBase.h
edm
HLT enums.
Definition: AlignableModifier.h:19
HcalIsoTrkAnalyzer::a_coneR1_
double a_coneR1_
Definition: HcalIsoTrkAnalyzer.cc:161
GlobalExtBlk.h
HcalIsoTrkAnalyzer::nLow_
unsigned int nLow_
Definition: HcalIsoTrkAnalyzer.cc:160
tree
Definition: tree.py:1
HcalIsoTrkAnalyzer::t_mindR1
double t_mindR1
Definition: HcalIsoTrkAnalyzer.cc:196
pos
Definition: PixelAliasList.h:18
HcalIsoTrkAnalyzer::nHigh_
unsigned int nHigh_
Definition: HcalIsoTrkAnalyzer.cc:160
HcalTopology
Definition: HcalTopology.h:26
HcalIsoTrkAnalyzer::tok_htopo_
edm::ESGetToken< HcalTopology, HcalRecNumberingRecord > tok_htopo_
Definition: HcalIsoTrkAnalyzer.cc:186
HcalIsoTrkAnalyzer::t_DetIds1
std::vector< unsigned int > * t_DetIds1
Definition: HcalIsoTrkAnalyzer.cc:203
HLT_FULL_cff.InputTag
InputTag
Definition: HLT_FULL_cff.py:89301
edm::ParameterSetDescription
Definition: ParameterSetDescription.h:52
hgcalTowerProducer_cfi.tower
tower
Definition: hgcalTowerProducer_cfi.py:4
HcalIsoTrkAnalyzer::theTriggerResultsLabel_
const edm::InputTag theTriggerResultsLabel_
Definition: HcalIsoTrkAnalyzer.cc:155
triggerResults
static const std::string triggerResults
Definition: EdmProvDump.cc:45
HcalIsoTrkAnalyzer::eIsolate2_
const double eIsolate2_
Definition: HcalIsoTrkAnalyzer.cc:146
HcalIsoTrkAnalyzer::a_coneR_
const double a_coneR_
Definition: HcalIsoTrkAnalyzer.cc:143
HcalIsoTrkAnalyzer::tok_trigEvt_
edm::EDGetTokenT< trigger::TriggerEvent > tok_trigEvt_
Definition: HcalIsoTrkAnalyzer.cc:166
reco::TrackBase::TrackQuality
TrackQuality
track quality
Definition: TrackBase.h:150
edm::EDConsumerBase::consumesCollector
ConsumesCollector consumesCollector()
Use a ConsumesCollector to gather consumes information from helper functions.
Definition: EDConsumerBase.cc:47
HcalIsoTrkAnalyzer::t_qltyFlag
bool t_qltyFlag
Definition: HcalIsoTrkAnalyzer.cc:201
HcalIsoTrkAnalyzer::tok_genTrack_
edm::EDGetTokenT< reco::TrackCollection > tok_genTrack_
Definition: HcalIsoTrkAnalyzer.cc:169
HcalIsoTrkAnalyzer::a_mipR_
const double a_mipR_
Definition: HcalIsoTrkAnalyzer.cc:143
HcalDetId::depth
constexpr int depth() const
get the tower depth
Definition: HcalDetId.h:164
reco::TrackBase::px
double px() const
x coordinate of momentum vector
Definition: TrackBase.h:640
HcalIsoTrkAnalyzer::t_TracksLoose
int t_TracksLoose
Definition: HcalIsoTrkAnalyzer.cc:208
HcalIsoTrkAnalyzer::tok_ew_
edm::EDGetTokenT< GenEventInfoProduct > tok_ew_
Definition: HcalIsoTrkAnalyzer.cc:176
HcalIsoTrkAnalyzer::t_hltbits
std::vector< bool > * t_hltbits
Definition: HcalIsoTrkAnalyzer.cc:205
spr::goodTrack
bool goodTrack(const reco::Track *pTrack, math::XYZPoint leadPV, trackSelectionParameters parameters, bool debug=false)
Definition: TrackSelection.cc:10
l1t::UseEventSetupIn::Event
HcalIsoTrkAnalyzer::t_DataType
int t_DataType
Definition: HcalIsoTrkAnalyzer.cc:191
edm::ParameterSet::getUntrackedParameter
T getUntrackedParameter(std::string const &, T const &) const
HcalIsoTrkAnalyzer::t_qltyPVFlag
bool t_qltyPVFlag
Definition: HcalIsoTrkAnalyzer.cc:202
DDAxes::x
HcalIsoTrkAnalyzer::t_l3phi
double t_l3phi
Definition: HcalIsoTrkAnalyzer.cc:195
HcalIsoTrkAnalyzer::etabins_
std::vector< double > etabins_
Definition: HcalIsoTrkAnalyzer.cc:163
edm::one::EDAnalyzer
Definition: EDAnalyzer.h:30
spr::find
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:19
HcalIsoTrkAnalyzer::tok_ddrec_
edm::ESGetToken< HcalDDDRecConstants, HcalRecNumberingRecord > tok_ddrec_
Definition: HcalIsoTrkAnalyzer.cc:180
EcalCondObjectContainer
Definition: EcalCondObjectContainer.h:13
vec2
std::vector< vec1 > vec2
Definition: HCALResponse.h:16
BeamSpotPI::nTracks
Definition: BeamSpotPayloadInspectorHelper.h:42
HcalIsoTrkAnalyzer::useRaw_
const int useRaw_
Definition: HcalIsoTrkAnalyzer.cc:149
convertSQLiteXML.ok
bool ok
Definition: convertSQLiteXML.py:98
HcalIsoTrkAnalyzer::t_HitEnergies
std::vector< double > * t_HitEnergies
Definition: HcalIsoTrkAnalyzer.cc:204
edm::Handle
Definition: AssociativeIterator.h:50
HcalIsoTrkAnalyzer::trigNames_
const std::vector< std::string > trigNames_
Definition: HcalIsoTrkAnalyzer.cc:138
edm::RunBase::run
RunNumber_t run() const
Definition: RunBase.h:40
HcalIsoTrkAnalyzer::l3Filter_
const std::string l3Filter_
Definition: HcalIsoTrkAnalyzer.cc:142
edm::LogWarning
Log< level::Warning, false > LogWarning
Definition: MessageLogger.h:122
CaloTopology
Definition: CaloTopology.h:19
HcalIsoTrkAnalyzer::t_hmaxNearP
double t_hmaxNearP
Definition: HcalIsoTrkAnalyzer.cc:198
HcalCondObjectContainer::getValues
const Item * getValues(DetId fId, bool throwOnFail=true) const
Definition: HcalCondObjectContainer.h:159
EcalBarrel
Definition: EcalSubdetector.h:10
EcalRecHitCollections.h
HcalIsoTrkAnalyzer::tok_caloTopology_
edm::ESGetToken< CaloTopology, CaloTopologyRecord > tok_caloTopology_
Definition: HcalIsoTrkAnalyzer.cc:185
HcalIsoTrkAnalyzer::mode_
const int mode_
Definition: HcalIsoTrkAnalyzer.cc:149
HcalIsoTrkAnalyzer::pTrackHigh_
const double pTrackHigh_
Definition: HcalIsoTrkAnalyzer.cc:147
GenParticle.h
HcalIsoTrkAnalyzer::rhoh
double rhoh(const edm::Handle< CaloTowerCollection > &)
Definition: HcalIsoTrkAnalyzer.cc:1305
HcalIsoTrkAnalyzer::oldDet_
std::vector< int > oldDet_
Definition: HcalIsoTrkAnalyzer.cc:164
HcalIsoTrkAnalyzer::t_Event
int t_Event
Definition: HcalIsoTrkAnalyzer.cc:191
HcalIsoTrkAnalyzer::t_l1eta
double t_l1eta
Definition: HcalIsoTrkAnalyzer.cc:194
HcalIsoTrkAnalyzer::t_ietaGood
std::vector< int > * t_ietaGood
Definition: HcalIsoTrkAnalyzer.cc:209
reco::TrackBase::pt
double pt() const
track transverse momentum
Definition: TrackBase.h:637
edm::InputTag::label
std::string const & label() const
Definition: InputTag.h:36
HLTConfigProvider::moduleLabels
const std::vector< std::string > & moduleLabels(unsigned int trigger) const
label(s) of module(s) on a trigger path
Definition: HLTConfigProvider.h:76
HcalIsoTrkAnalyzer::hitEthrEEHi_
const double hitEthrEEHi_
Definition: HcalIsoTrkAnalyzer.cc:154
DetId
Definition: DetId.h:17
HcalIsoTrkAnalyzer::t_hAnnular
double t_hAnnular
Definition: HcalIsoTrkAnalyzer.cc:199
HcalIsoTrkAnalyzer::tok_EE_
edm::EDGetTokenT< EcalRecHitCollection > tok_EE_
Definition: HcalIsoTrkAnalyzer.cc:173
accept
bool accept(const edm::Event &event, const edm::TriggerResults &triggerTable, const std::string &triggerPath)
Definition: TopDQMHelpers.h:31
MakerMacros.h
trigger::TriggerObject::py
float py() const
Definition: TriggerObject.h:58
trigger::TriggerObject::pt
float pt() const
Definition: TriggerObject.h:52
CaloGeometry
Definition: CaloGeometry.h:21
Track.h
HcalIsoTrkAnalyzer::t_eMipDR5
double t_eMipDR5
Definition: HcalIsoTrkAnalyzer.cc:198
HcalIsoTrkAnalyzer::t_phi
double t_phi
Definition: HcalIsoTrkAnalyzer.cc:193
TrackFwd.h
DEFINE_FWK_MODULE
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
HcalIsoTrkAnalyzer::dR
double dR(math::XYZTLorentzVector &, math::XYZTLorentzVector &)
Definition: HcalIsoTrkAnalyzer.cc:1285
BeamSpot.h
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
reco::TrackBase::py
double py() const
y coordinate of momentum vector
Definition: TrackBase.h:643
l1t::L1TGlobalUtil::decisionsFinal
const std::vector< std::pair< std::string, bool > > & decisionsFinal()
Definition: L1TGlobalUtil.h:156
names
const std::string names[nVars_]
Definition: PhotonIDValueMapProducer.cc:124
fileCollector.done
done
Definition: fileCollector.py:123
L1TEGammaOffline_cfi.triggerNames
triggerNames
Definition: L1TEGammaOffline_cfi.py:40
alignCSCRings.corr
dictionary corr
Definition: alignCSCRings.py:124
MuonSelectors.h
Service.h
PVValHelper::eta
Definition: PVValidationHelpers.h:70
l1t::L1TGlobalUtil
Definition: L1TGlobalUtil.h:44
ChargeIsolation.h
MuonFwd.h
HcalIsoTrkAnalyzer::t_l1phi
double t_l1phi
Definition: HcalIsoTrkAnalyzer.cc:194
HcalIsoTrkAnalyzer::phibins_
std::vector< double > phibins_
Definition: HcalIsoTrkAnalyzer.cc:163
HcalIsoTrkAnalyzer::~HcalIsoTrkAnalyzer
~HcalIsoTrkAnalyzer() override
Definition: HcalIsoTrkAnalyzer.cc:94
HcalIsoTrkAnalyzer::newId
DetId newId(const DetId &)
Definition: HcalIsoTrkAnalyzer.cc:1350
eHCALMatrix.h
HcalIsoTrkAnalyzer::labelEE_
const std::string labelEE_
Definition: HcalIsoTrkAnalyzer.cc:157
GenParticleFwd.h
HcalIsoTrkAnalyzer::t_TrigPass
bool t_TrigPass
Definition: HcalIsoTrkAnalyzer.cc:202
DDAxes::z
reco::Track
Definition: Track.h:27
IdealMagneticFieldRecord.h
HcalIsoTrkAnalyzer::t_L1Bit
bool t_L1Bit
Definition: HcalIsoTrkAnalyzer.cc:206
spr::trackSelectionParameters::minPt
double minPt
Definition: TrackSelection.h:20
HcalIsoTrkAnalyzer::phihalfdist_
double phihalfdist_
Definition: HcalIsoTrkAnalyzer.cc:165
spr::trackSelectionParameters
Definition: TrackSelection.h:12
spr::trackSelectionParameters::minOuterHit
int minOuterHit
Definition: TrackSelection.h:23
HcalIsoTrkAnalyzer::t_selectTk
bool t_selectTk
Definition: HcalIsoTrkAnalyzer.cc:201
HcalIsoTrkAnalyzer::tok_trigRes_
edm::EDGetTokenT< edm::TriggerResults > tok_trigRes_
Definition: HcalIsoTrkAnalyzer.cc:167
trigger::TriggerObject::px
float px() const
Definition: TriggerObject.h:57
dqmdumpme.k
k
Definition: dqmdumpme.py:60
reco::BeamSpot::position
const Point & position() const
position
Definition: BeamSpot.h:59
Point3DBase< float, GlobalTag >
HcalIsoTrkAnalyzer::t_eMipDR2
double t_eMipDR2
Definition: HcalIsoTrkAnalyzer.cc:197
HcalIsoTrkAnalyzer::t_goodPV
int t_goodPV
Definition: HcalIsoTrkAnalyzer.cc:192
HcalIsoTrkAnalyzer::hitEthrEELo_
const double hitEthrEELo_
Definition: HcalIsoTrkAnalyzer.cc:154
eECALMatrix.h
spr::chargeIsolationCone
double chargeIsolationCone(unsigned int trkIndex, std::vector< spr::propagatedTrackDirection > &trkDirs, double dR, int &nNearTRKs, bool debug=false)
Definition: ChargeIsolation.cc:288
eCone.h
EcalSeverityLevelAlgo.h
HcalIsoTrkAnalyzer::useL1Trigger_
const bool useL1Trigger_
Definition: HcalIsoTrkAnalyzer.cc:150
reco::TrackBase::phi
double phi() const
azimuthal angle of momentum vector
Definition: TrackBase.h:649
trigger::TriggerObject
Single trigger physics object (e.g., an isolated muon)
Definition: TriggerObject.h:21
HcalIsoTrkAnalyzer::t_Run
int t_Run
Definition: HcalIsoTrkAnalyzer.cc:191
DetId::subdetId
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum)
Definition: DetId.h:48
spr::trackSelectionParameters::maxDpOverP
double maxDpOverP
Definition: TrackSelection.h:22
edm::ConfigurationDescriptions
Definition: ConfigurationDescriptions.h:28
spr::trackSelectionParameters::minLayerCrossed
int minLayerCrossed
Definition: TrackSelection.h:23
HcalIsoTrkAnalyzer::t_eMipDR3
double t_eMipDR3
Definition: HcalIsoTrkAnalyzer.cc:197
HLTConfigProvider::size
unsigned int size() const
number of trigger paths in trigger table
Definition: HLTConfigProvider.h:63
HcalIsoTrkAnalyzer::t_RunNo
unsigned int t_RunNo
Definition: HcalIsoTrkAnalyzer.cc:190
HcalIsoTrkAnalyzer::fillDescriptions
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
Definition: HcalIsoTrkAnalyzer.cc:826
HcalIsoTrkAnalyzer::tok_alg_
edm::EDGetTokenT< BXVector< GlobalAlgBlk > > tok_alg_
Definition: HcalIsoTrkAnalyzer.cc:177
TFileService.h
trigger::TriggerObject::energy
float energy() const
Definition: TriggerObject.h:61
HcalIsoTrkAnalyzer::a_mipR2_
const double a_mipR2_
Definition: HcalIsoTrkAnalyzer.cc:143
CaloSubdetectorGeometry.h
HcalDetId::ieta
constexpr int ieta() const
get the cell ieta
Definition: HcalDetId.h:155
HcalIsoTrkAnalyzer::a_charIsoR_
double a_charIsoR_
Definition: HcalIsoTrkAnalyzer.cc:161
HcalIsoTrkAnalyzer::t_eHcal
double t_eHcal
Definition: HcalIsoTrkAnalyzer.cc:200
edm::ParameterSet
Definition: ParameterSet.h:47
math::XYZPoint
XYZPointD XYZPoint
point in space with cartesian internal representation
Definition: Point3D.h:12
HcalIsoTrkAnalyzer::t_qltyMissFlag
bool t_qltyMissFlag
Definition: HcalIsoTrkAnalyzer.cc:201
AlCaHLTBitMon_ParallelJobs.p
def p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
HcalIsoTrkAnalyzer::newDepth_
const std::vector< int > newDepth_
Definition: HcalIsoTrkAnalyzer.cc:158
GenEventInfoProduct.h
Event.h
HcalIsoTrkAnalyzer::tok_resp_
edm::ESGetToken< HcalRespCorrs, HcalRespCorrsRcd > tok_resp_
Definition: HcalIsoTrkAnalyzer.cc:187
LumiDetails.h
HcalIsoTrkAnalyzer::eEcalMax_
const double eEcalMax_
Definition: HcalIsoTrkAnalyzer.cc:144
deltaR.h
type
type
Definition: SiPixelVCal_PayloadInspector.cc:39
TrackSelection.h
jetUpdater_cfi.sort
sort
Definition: jetUpdater_cfi.py:29
HcalIsoTrkAnalyzer::t_trackType
std::vector< int > * t_trackType
Definition: HcalIsoTrkAnalyzer.cc:209
trigger::TriggerObjectCollection
std::vector< TriggerObject > TriggerObjectCollection
collection of trigger physics objects (e.g., all isolated muons)
Definition: TriggerObject.h:75
HcalIsoTrkAnalyzer::t_allvertex
int t_allvertex
Definition: HcalIsoTrkAnalyzer.cc:208
gainCalibHelper::gainCalibPI::type
type
Definition: SiPixelGainCalibHelper.h:40
spr::trackSelectionParameters::maxOutMiss
int maxOutMiss
Definition: TrackSelection.h:24
HcalIsoTrkAnalyzer::HcalIsoTrkAnalyzer
HcalIsoTrkAnalyzer(edm::ParameterSet const &)
Definition: HcalIsoTrkAnalyzer.cc:212
HcalIsoTrkAnalyzer::t_emaxNearP
double t_emaxNearP
Definition: HcalIsoTrkAnalyzer.cc:199
HcalIsoTrkAnalyzer::hdc_
const HcalDDDRecConstants * hdc_
Definition: HcalIsoTrkAnalyzer.cc:162
reco::TrackBase::eta
double eta() const
pseudorapidity of momentum vector
Definition: TrackBase.h:652
trigger::TriggerObject::id
int id() const
getters
Definition: TriggerObject.h:51
reco::JetExtendedAssociation::getValue
const JetExtendedData & getValue(const Container &, const reco::JetBaseRef &)
get value for the association. Throw exception if no association found
Definition: JetExtendedAssociation.cc:50
HcalIsoTrkAnalyzer::oldEta_
std::vector< int > oldEta_
Definition: HcalIsoTrkAnalyzer.cc:164
HcalDetId::subdet
constexpr HcalSubdetector subdet() const
get the subdetector
Definition: HcalDetId.h:138
LorentzVector.h
l1t::L1TGlobalUtil::retrieveL1
void retrieveL1(const edm::Event &iEvent, const edm::EventSetup &evSetup)
initialize the class (mainly reserve)
Definition: L1TGlobalUtil.cc:66
HcalIsoTrkAnalyzer::t_eMipDR4
double t_eMipDR4
Definition: HcalIsoTrkAnalyzer.cc:197
HcalDetId
Definition: HcalDetId.h:12
edm::Service< TFileService >
spr::eCone_hcal
double eCone_hcal(const CaloGeometry *geo, edm::Handle< T > &hits, const GlobalPoint &hpoint1, const GlobalPoint &point1, double dR, const GlobalVector &trackMom, int &nRecHits, double hbThr=-100, double heThr=-100, double hfThr=-100, double hoThr=-100, double tMin=-500, double tMax=500, int detOnly=-1, int useRaw=0, bool debug=false)
createfilelist.int
int
Definition: createfilelist.py:10
TriggerNames.h
iEvent
int iEvent
Definition: GenABIO.cc:224
HcalIsoTrkAnalyzer::labelGenTrack_
const std::string labelGenTrack_
Definition: HcalIsoTrkAnalyzer.cc:156
HcalIsoTrkAnalyzer::tok_Muon_
edm::EDGetTokenT< reco::MuonCollection > tok_Muon_
Definition: HcalIsoTrkAnalyzer.cc:178
HcalIsoTrkAnalyzer::tok_geom_
edm::ESGetToken< CaloGeometry, CaloGeometryRecord > tok_geom_
Definition: HcalIsoTrkAnalyzer.cc:184
HcalIsoTrkAnalyzer::a_mipR5_
const double a_mipR5_
Definition: HcalIsoTrkAnalyzer.cc:144
HcalIsoTrkAnalyzer::hcalScale_
const double hcalScale_
Definition: HcalIsoTrkAnalyzer.cc:146
HcalIsoTrkAnalyzer::tok_sevlv_
edm::ESGetToken< EcalSeverityLevelAlgo, EcalSeverityLevelAlgoRcd > tok_sevlv_
Definition: HcalIsoTrkAnalyzer.cc:183
trigger::Keys
std::vector< size_type > Keys
Definition: TriggerTypeDefs.h:19
M_PI
#define M_PI
Definition: BXVectorInputProducer.cc:49
HcalIsoTrkAnalyzer::eThreshold
double eThreshold(const DetId &id, const CaloGeometry *geo) const
Definition: HcalIsoTrkAnalyzer.cc:1336
trackerHitRTTI::vector
Definition: trackerHitRTTI.h:21
GlobalAlgBlk.h
trigger::TriggerObject::eta
float eta() const
Definition: TriggerObject.h:53
HcalIsoTrkAnalyzer::t_l3eta
double t_l3eta
Definition: HcalIsoTrkAnalyzer.cc:195
HcalIsoTrkAnalyzer::slopeRestrictionP_
const double slopeRestrictionP_
Definition: HcalIsoTrkAnalyzer.cc:145
HcalIsoTrkAnalyzer::maxRestrictionP_
const double maxRestrictionP_
Definition: HcalIsoTrkAnalyzer.cc:145
MagneticField.h
edm::EventSetup
Definition: EventSetup.h:58
HcalRespCorrs.h
trigger::TriggerEvent
The single EDProduct to be saved for each event (AOD case)
Definition: TriggerEvent.h:25
HcalIsoTrkAnalyzer::t_DetIds
std::vector< unsigned int > * t_DetIds
Definition: HcalIsoTrkAnalyzer.cc:203
HLTConfigProvider.h
get
#define get
HitPattern.h
PDWG_DiPhoton_SD_cff.triggerEvent
triggerEvent
Definition: PDWG_DiPhoton_SD_cff.py:39
spr::trackSelectionParameters::minQuality
reco::TrackBase::TrackQuality minQuality
Definition: TrackSelection.h:21
HcalIsoTrkAnalyzer::t_ieta
int t_ieta
Definition: HcalIsoTrkAnalyzer.cc:191
ClusterTask_cfi.trig
trig
Definition: ClusterTask_cfi.py:398
HcalIsoTrkAnalyzer::a_coneR2_
double a_coneR2_
Definition: HcalIsoTrkAnalyzer.cc:161
HcalIsoTrkAnalyzer::t_iphi
int t_iphi
Definition: HcalIsoTrkAnalyzer.cc:191
TFileService::make
T * make(const Args &...args) const
make new ROOT object
Definition: TFileService.h:64
edm::ESGetToken< HcalDDDRecConstants, HcalRecNumberingRecord >
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
TriggerObject.h
HLTConfigProvider::triggerIndex
unsigned int triggerIndex(const std::string &triggerName) const
slot position of trigger path in trigger table (0 to size-1)
Definition: HLTConfigProvider.h:73
edm::EventSetup::getData
bool getData(T &iHolder) const
Definition: EventSetup.h:127
CaloTopology.h
CaloTowerCollection.h
HcalIsoTrkAnalyzer::tree
TTree * tree
Definition: HcalIsoTrkAnalyzer.cc:189
photonIsolationHIProducer_cfi.hbhe
hbhe
Definition: photonIsolationHIProducer_cfi.py:8
HcalIsoTrkAnalyzer::nRun_
unsigned int nRun_
Definition: HcalIsoTrkAnalyzer.cc:160
HcalIsoTrkAnalyzer::notaMuon
bool notaMuon(const reco::Track *pTrack0, const edm::Handle< reco::MuonCollection > &muonh)
Definition: HcalIsoTrkAnalyzer.cc:1421
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
HcalIsoTrkAnalyzer::ignoreTrigger_
const bool ignoreTrigger_
Definition: HcalIsoTrkAnalyzer.cc:150
reco::TrackBase::qualityByName
static TrackQuality qualityByName(const std::string &name)
Definition: TrackBase.cc:126
HcalIsoTrkAnalyzer::hitEthrEE0_
const double hitEthrEE0_
Definition: HcalIsoTrkAnalyzer.cc:152
VertexFwd.h
DDAxes::phi
HcalIsoTrkAnalyzer::hitEthrEE2_
const double hitEthrEE2_
Definition: HcalIsoTrkAnalyzer.cc:153
CaloSubdetectorTopology.h
HcalIsoTrkAnalyzer::t_l1pt
double t_l1pt
Definition: HcalIsoTrkAnalyzer.cc:194
CaloTopologyRecord.h
HcalIsoTrkAnalyzer::theTrackQuality_
const std::string theTrackQuality_
Definition: HcalIsoTrkAnalyzer.cc:140
HcalTopology.h
HcalIsoTrkAnalyzer::t_HitEnergies1
std::vector< double > * t_HitEnergies1
Definition: HcalIsoTrkAnalyzer.cc:204
HcalIsoTrkAnalyzer::fillTree
std::array< int, 3 > fillTree(std::vector< math::XYZTLorentzVector > &vecL1, std::vector< math::XYZTLorentzVector > &vecL3, math::XYZPoint &leadPV, std::vector< spr::propagatedTrackDirection > &trkCaloDirections, std::vector< spr::propagatedTrackID > &trkCaloDets, const CaloGeometry *geo, const CaloTopology *topo, const HcalTopology *theHBHETopology, const EcalChannelStatus *theEcalChStatus, const EcalSeverityLevelAlgo *theEcalSevlv, edm::Handle< EcalRecHitCollection > &barrelRecHitsHandle, edm::Handle< EcalRecHitCollection > &endcapRecHitsHandle, edm::Handle< HBHERecHitCollection > &hbhe, edm::Handle< CaloTowerCollection > &towerHandle, edm::Handle< reco::GenParticleCollection > &genParticles, const HcalRespCorrs *respCorrs, const edm::Handle< reco::MuonCollection > &muonh)
Definition: HcalIsoTrkAnalyzer.cc:915
EcalTrigTowerConstituentsMap.h
HcalIsoTrkAnalyzer::t_TracksProp
int t_TracksProp
Definition: HcalIsoTrkAnalyzer.cc:207
submitPVResolutionJobs.desc
string desc
Definition: submitPVResolutionJobs.py:251
HLTConfigProvider
Definition: HLTConfigProvider.h:29
std
Definition: JetResolutionObject.h:76
HcalIsoTrkAnalyzer::pTrackLow_
const double pTrackLow_
Definition: HcalIsoTrkAnalyzer.cc:147
trigger::TriggerObject::pz
float pz() const
Definition: TriggerObject.h:59
HcalIsoTrkAnalyzer::tok_parts_
edm::EDGetTokenT< reco::GenParticleCollection > tok_parts_
Definition: HcalIsoTrkAnalyzer.cc:168
HcalIsoTrkAnalyzer::t_ietaAll
std::vector< int > * t_ietaAll
Definition: HcalIsoTrkAnalyzer.cc:209
genParticles2HepMC_cfi.genEventInfo
genEventInfo
Definition: genParticles2HepMC_cfi.py:6
HLTConfigProvider::init
bool init(const edm::Run &iRun, const edm::EventSetup &iSetup, const std::string &processName, bool &changed)
d'tor
Definition: HLTConfigProvider.cc:36
HcalIsoTrkAnalyzer::etahalfdist_
double etahalfdist_
Definition: HcalIsoTrkAnalyzer.cc:165
Calorimetry_cff.bField
bField
Definition: Calorimetry_cff.py:284
HcalIsoTrkAnalyzer::t_mindR2
double t_mindR2
Definition: HcalIsoTrkAnalyzer.cc:196
Vertex.h
HcalIsoTrkAnalyzer::hitEthrEB_
const double hitEthrEB_
Definition: HcalIsoTrkAnalyzer.cc:152
HcalIsoTrkAnalyzer::labelTower_
const std::string labelTower_
Definition: HcalIsoTrkAnalyzer.cc:157
HcalIsoTrkAnalyzer::triggerEvent_
const edm::InputTag triggerEvent_
Definition: HcalIsoTrkAnalyzer.cc:155
HcalIsoTrkAnalyzer::hitEthrEE1_
const double hitEthrEE1_
Definition: HcalIsoTrkAnalyzer.cc:152
Frameworkfwd.h
HcalIsoTrkAnalyzer::t_eAnnular
double t_eAnnular
Definition: HcalIsoTrkAnalyzer.cc:199
edm::LogVerbatim
Log< level::Info, true > LogVerbatim
Definition: MessageLogger.h:128
CaloPropagateTrack.h
triggerObjects_cff.id
id
Definition: triggerObjects_cff.py:29
math::XYZTLorentzVector
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
Definition: LorentzVector.h:29
spr::trackSelectionParameters::maxInMiss
int maxInMiss
Definition: TrackSelection.h:24
HcalIsoTrkAnalyzer::l1GtUtils_
l1t::L1TGlobalUtil * l1GtUtils_
Definition: HcalIsoTrkAnalyzer.cc:135
HcalIsoTrkAnalyzer::trackP
double trackP(const reco::Track *, const edm::Handle< reco::GenParticleCollection > &)
Definition: HcalIsoTrkAnalyzer.cc:1289
HcalIsoTrkAnalyzer::t_EventWeight
double t_EventWeight
Definition: HcalIsoTrkAnalyzer.cc:193
flavorHistoryFilter_cfi.dr
dr
Definition: flavorHistoryFilter_cfi.py:37
HcalIsoTrkAnalyzer
Definition: HcalIsoTrkAnalyzer.cc:91
CaloGeometry.h
TFileService::kSharedResource
static const std::string kSharedResource
Definition: TFileService.h:76
edm::TriggerNames
Definition: TriggerNames.h:55
HcalIsoTrkAnalyzer::a_mipR3_
const double a_mipR3_
Definition: HcalIsoTrkAnalyzer.cc:143
HcalIsoTrkAnalyzer::unCorrect_
const bool unCorrect_
Definition: HcalIsoTrkAnalyzer.cc:151
HcalDDDRecConstants.h
HcalIsoTrkAnalyzer::t_gentrackP
double t_gentrackP
Definition: HcalIsoTrkAnalyzer.cc:198
HcalIsoTrkAnalyzer::l1Filter_
const std::string l1Filter_
Definition: HcalIsoTrkAnalyzer.cc:141
reco::deltaR
constexpr auto deltaR(const T1 &t1, const T2 &t2) -> decltype(t1.eta())
Definition: deltaR.h:30
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
HcalRecHitCollections.h
HcalIsoTrkAnalyzer::collapseDepth_
const bool collapseDepth_
Definition: HcalIsoTrkAnalyzer.cc:151
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)
HcalIsoTrkAnalyzer::t_TrigPassSel
bool t_TrigPassSel
Definition: HcalIsoTrkAnalyzer.cc:202
L1TGlobalUtil.h
HcalIsoTrkAnalyzer::hltConfig_
HLTConfigProvider hltConfig_
Definition: HcalIsoTrkAnalyzer.cc:137
HcalIsoTrkAnalyzer::tree2
TTree * tree2
Definition: HcalIsoTrkAnalyzer.cc:189
HcalDDDRecConstants
Definition: HcalDDDRecConstants.h:23
HcalIsoTrkAnalyzer::analyze
void analyze(edm::Event const &, edm::EventSetup const &) override
Definition: HcalIsoTrkAnalyzer.cc:397
HcalIsoTrkAnalyzer::t_EventNo
unsigned int t_EventNo
Definition: HcalIsoTrkAnalyzer.cc:190
HcalIsoTrkAnalyzer::oldDepth_
std::vector< int > oldDepth_
Definition: HcalIsoTrkAnalyzer.cc:164
HcalIsoTrkAnalyzer::pTrackMin_
const double pTrackMin_
Definition: HcalIsoTrkAnalyzer.cc:144
HcalIsoTrkAnalyzer::etadist_
double etadist_
Definition: HcalIsoTrkAnalyzer.cc:165
reco::TrackBase::pz
double pz() const
z coordinate of momentum vector
Definition: TrackBase.h:646
HcalIsoTrkAnalyzer::t_rhoh
double t_rhoh
Definition: HcalIsoTrkAnalyzer.cc:200
funct::abs
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
spr::chargeIsolationEcal
double chargeIsolationEcal(unsigned int trkIndex, std::vector< spr::propagatedTrackID > &vdetIds, const CaloGeometry *geo, const CaloTopology *caloTopology, int ieta, int iphi, bool debug=false)
Definition: ChargeIsolation.cc:15
HcalIsoTrkAnalyzer::t_TracksSaved
int t_TracksSaved
Definition: HcalIsoTrkAnalyzer.cc:207
HcalDetId::ietaAbs
constexpr int ietaAbs() const
get the absolute value of the cell ieta
Definition: HcalDetId.h:148
ParameterSet.h
dummy
Definition: DummySelector.h:38
HcalIsoTrkAnalyzer::beginJob
void beginJob() override
Definition: HcalIsoTrkAnalyzer.cc:712
JetChargeProducer_cfi.exp
exp
Definition: JetChargeProducer_cfi.py:6
HcalDetId::zside
constexpr int zside() const
get the z-side of the cell (1/-1)
Definition: HcalDetId.h:141
HcalIsoTrkAnalyzer::t_l3pt
double t_l3pt
Definition: HcalIsoTrkAnalyzer.cc:195
HcalIsoTrkAnalyzer::t_pt
double t_pt
Definition: HcalIsoTrkAnalyzer.cc:193
HcalIsoTrkAnalyzer::tok_recVtx_
edm::EDGetTokenT< reco::VertexCollection > tok_recVtx_
Definition: HcalIsoTrkAnalyzer.cc:170
edm::HandleBase::isValid
bool isValid() const
Definition: HandleBase.h:70
HcalIsoTrkAnalyzer::t_eHcal30
double t_eHcal30
Definition: HcalIsoTrkAnalyzer.cc:200
edm::Event
Definition: Event.h:73
spr::eCone_ecal
double eCone_ecal(const CaloGeometry *geo, edm::Handle< T > &barrelhits, edm::Handle< T > &endcaphits, const GlobalPoint &hpoint1, const GlobalPoint &point1, double dR, const GlobalVector &trackMom, int &nRecHits, double ebThr=-100, double eeThr=-100, double tMin=-500, double tMax=500, bool debug=false)
HcalIsoTrkAnalyzer::eIsolate1_
const double eIsolate1_
Definition: HcalIsoTrkAnalyzer.cc:146
MagneticField
Definition: MagneticField.h:19
edm::Log
Definition: MessageLogger.h:70
HcalIsoTrkAnalyzer::t_eMipDR
double t_eMipDR
Definition: HcalIsoTrkAnalyzer.cc:197
HcalIsoTrkAnalyzer::t_HitEnergies3
std::vector< double > * t_HitEnergies3
Definition: HcalIsoTrkAnalyzer.cc:204
HcalIsoTrkAnalyzer::endRun
void endRun(edm::Run const &, edm::EventSetup const &) override
Definition: HcalIsoTrkAnalyzer.cc:821
HcalIsoTrkAnalyzer::processName_
const std::string processName_
Definition: HcalIsoTrkAnalyzer.cc:141
trigger::TriggerObject::mass
float mass() const
Definition: TriggerObject.h:55
edm::InputTag
Definition: InputTag.h:15
label
const char * label
Definition: PFTauDecayModeTools.cc:11
HcalIsoTrkAnalyzer::labelHBHE_
const std::string labelHBHE_
Definition: HcalIsoTrkAnalyzer.cc:157
EcalChannelStatusRcd.h
HcalIsoTrkAnalyzer::labelEB_
const std::string labelEB_
Definition: HcalIsoTrkAnalyzer.cc:156
hit
Definition: SiStripHitEffFromCalibTree.cc:88
HcalIsoTrkAnalyzer::storeEnergy
void storeEnergy(int indx, const HcalRespCorrs *respCorrs, const std::vector< DetId > &ids, std::vector< double > &edet, double &eHcal, std::vector< unsigned int > *detIds, std::vector< double > *hitEnergies)
Definition: HcalIsoTrkAnalyzer.cc:1362
RemoveAddSevLevel.flag
flag
Definition: RemoveAddSevLevel.py:117
HcalIsoTrkAnalyzer::prescaleHigh_
const int prescaleHigh_
Definition: HcalIsoTrkAnalyzer.cc:148
HcalIsoTrkAnalyzer::t_Tracks
int t_Tracks
Definition: HcalIsoTrkAnalyzer.cc:207
ValidationMatrix.hlt
hlt
Definition: ValidationMatrix.py:459
HcalIsoTrkAnalyzer::dataType_
const int dataType_
Definition: HcalIsoTrkAnalyzer.cc:149
HcalIsoTrkAnalyzer::hep17_
const bool hep17_
Definition: HcalIsoTrkAnalyzer.cc:159
HcalIsoTrkAnalyzer::tok_hbhe_
edm::EDGetTokenT< HBHERecHitCollection > tok_hbhe_
Definition: HcalIsoTrkAnalyzer.cc:174
HcalIsoTrkAnalyzer::l2Filter_
const std::string l2Filter_
Definition: HcalIsoTrkAnalyzer.cc:142