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