CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
AlCaIsoTracksProducer.cc
Go to the documentation of this file.
1 // -*- C++ -*-
2 //#define DebugLog
3 
4 // system include files
5 #include <atomic>
6 #include <memory>
7 #include <string>
8 #include <cmath>
9 #include <iostream>
10 #include <sstream>
11 #include <fstream>
12 #include <vector>
13 #include <boost/regex.hpp>
14 
15 // user include files
26 
53 
55 
60 
74 
75 
76 //
77 // class declaration
78 //
79 
80 namespace AlCaIsoTracks {
81  struct Counters {
82  Counters() : nAll_(0), nGood_(0) {}
83  mutable std::atomic<unsigned int> nAll_, nGood_;
84  };
85 }
86 
87 class AlCaIsoTracksProducer : public edm::stream::EDProducer<edm::GlobalCache<AlCaIsoTracks::Counters> > {
88 public:
91 
92  static std::unique_ptr<AlCaIsoTracks::Counters> initializeGlobalCache(edm::ParameterSet const& ) {
93  return std::unique_ptr<AlCaIsoTracks::Counters>(new AlCaIsoTracks::Counters());
94  }
95 
96  virtual void produce(edm::Event &, edm::EventSetup const&) override;
97  virtual void endStream() override;
98  static void globalEndJob(const AlCaIsoTracks::Counters* counters);
99 
100 private:
101 
102  virtual void beginRun(edm::Run const&, edm::EventSetup const&) override;
103  virtual void endRun(edm::Run const&, edm::EventSetup const&) override;
104  reco::HcalIsolatedTrackCandidateCollection* select(edm::Handle<edm::TriggerResults>& triggerResults, const std::vector<std::string> & triggerNames_, edm::Handle<reco::TrackCollection>& trkCollection, math::XYZPoint& leadPV,edm::Handle<EcalRecHitCollection>& barrelRecHitsHandle, edm::Handle<EcalRecHitCollection>& endcapRecHitsHandle, edm::Handle<HBHERecHitCollection>& hbhe, double ptL1, double etaL1, double phiL1);
105  void setPtEtaPhi(std::vector< edm::Ref<l1extra::L1JetParticleCollection> >& objref, double &ptL1, double &etaL1, double &phiL1);
106 
107  // ----------member data ---------------------------
109  std::vector<std::string> trigNames_, HLTNames_;
110  unsigned int nRun_, nAll_, nGood_;
122 
132 };
133 
134 
136  nRun_(0), nAll_(0), nGood_(0) {
137  //Get the run parameters
138  const double isolationRadius(28.9);
139  trigNames_ = iConfig.getParameter<std::vector<std::string> >("Triggers");
140  theTrackQuality_ = iConfig.getParameter<std::string>("TrackQuality");
141  processName_ = iConfig.getParameter<std::string>("ProcessName");
142  maxRestrictionPt_ = iConfig.getParameter<double>("MinTrackPt");
143  slopeRestrictionPt_ = iConfig.getParameter<double>("SlopeTrackPt");
144  selectionParameter_.minPt = (slopeRestrictionPt_ > 0) ? (maxRestrictionPt_ - 2.5/slopeRestrictionPt_) : maxRestrictionPt_;
146  selectionParameter_.maxDxyPV = iConfig.getParameter<double>("MaxDxyPV");
147  selectionParameter_.maxDzPV = iConfig.getParameter<double>("MaxDzPV");
148  selectionParameter_.maxChi2 = iConfig.getParameter<double>("MaxChi2");
149  selectionParameter_.maxDpOverP = iConfig.getParameter<double>("MaxDpOverP");
150  selectionParameter_.minOuterHit = iConfig.getParameter<int>("MinOuterHit");
151  selectionParameter_.minLayerCrossed = iConfig.getParameter<int>("MinLayerCrossed");
152  selectionParameter_.maxInMiss = iConfig.getParameter<int>("MaxInMiss");
153  selectionParameter_.maxOutMiss = iConfig.getParameter<int>("MaxOutMiss");
154  a_coneR_ = iConfig.getParameter<double>("ConeRadius");
155  a_charIsoR_ = a_coneR_ + isolationRadius;
156  a_mipR_ = iConfig.getParameter<double>("ConeRadiusMIP");
157  pTrackMin_ = iConfig.getParameter<double>("MinimumTrackP");
158  eEcalMax_ = iConfig.getParameter<double>("MaximumEcalEnergy");
159  eIsolation_ = iConfig.getParameter<double>("IsolationEnergy");
160  labelGenTrack_ = iConfig.getParameter<edm::InputTag>("TrackLabel");
161  labelRecVtx_ = iConfig.getParameter<edm::InputTag>("VertexLabel");
162  labelBS_ = iConfig.getParameter<edm::InputTag>("BeamSpotLabel");
163  labelEB_ = iConfig.getParameter<edm::InputTag>("EBRecHitLabel");
164  labelEE_ = iConfig.getParameter<edm::InputTag>("EERecHitLabel");
165  labelHBHE_ = iConfig.getParameter<edm::InputTag>("HBHERecHitLabel");
166  labelHltGT_ = iConfig.getParameter<edm::InputTag>("L1GTSeedLabel");
167  labelTriggerEvent_ = iConfig.getParameter<edm::InputTag>("TriggerEventLabel");
168  labelTriggerResults_ = iConfig.getParameter<edm::InputTag>("TriggerResultLabel");
169  labelIsoTk_ = iConfig.getParameter<std::string>("IsoTrackLabel");
170 
171  // define tokens for access
172  tok_hltGT_ = consumes<trigger::TriggerFilterObjectWithRefs>(labelHltGT_);
173  tok_trigEvt_ = consumes<trigger::TriggerEvent>(labelTriggerEvent_);
174  tok_trigRes_ = consumes<edm::TriggerResults>(labelTriggerResults_);
175  tok_genTrack_ = consumes<reco::TrackCollection>(labelGenTrack_);
176  tok_recVtx_ = consumes<reco::VertexCollection>(labelRecVtx_);
177  tok_bs_ = consumes<reco::BeamSpot>(labelBS_);
178  tok_EB_ = consumes<EcalRecHitCollection>(labelEB_);
179  tok_EE_ = consumes<EcalRecHitCollection>(labelEE_);
180  tok_hbhe_ = consumes<HBHERecHitCollection>(labelHBHE_);
181 
182  edm::LogInfo("HcalIsoTrack") <<"Parameters read from config file \n"
183  <<"\t minPt " << maxRestrictionPt_
184  <<":" << slopeRestrictionPt_
185  <<"\t theTrackQuality " << theTrackQuality_
186  <<"\t minQuality " << selectionParameter_.minQuality
187  <<"\t maxDxyPV " << selectionParameter_.maxDxyPV
188  <<"\t maxDzPV " << selectionParameter_.maxDzPV
189  <<"\t maxChi2 " << selectionParameter_.maxChi2
190  <<"\t maxDpOverP " << selectionParameter_.maxDpOverP
191  <<"\t minOuterHit " << selectionParameter_.minOuterHit
192  <<"\t minLayerCrossed " << selectionParameter_.minLayerCrossed
193  <<"\t maxInMiss " << selectionParameter_.maxInMiss
194  <<"\t maxOutMiss " << selectionParameter_.maxOutMiss
195  <<"\t a_coneR " << a_coneR_
196  <<"\t a_charIsoR " << a_charIsoR_
197  <<"\t a_mipR " << a_mipR_
198  <<"\t pTrackMin " << pTrackMin_
199  <<"\t eEcalMax " << eEcalMax_
200  <<"\t eIsolation " << eIsolation_
201  << "\tProcess " << processName_;
202  for (unsigned int k=0; k<trigNames_.size(); ++k)
203  edm::LogInfo("HcalIsoTrack") << "Trigger[" << k << "] " << trigNames_[k];
204 
205  //create also IsolatedPixelTrackCandidateCollection which contains isolation info and reference to primary track
206  produces<reco::HcalIsolatedTrackCandidateCollection>(labelIsoTk_);
207  produces<reco::VertexCollection>(labelRecVtx_.label());
208  produces<EcalRecHitCollection>(labelEB_.instance());
209  produces<EcalRecHitCollection>(labelEE_.instance());
210  produces<HBHERecHitCollection>(labelHBHE_.label());
211 
212  edm::LogInfo("HcalIsoTrack") << " Expected to produce the collections:\n"
213  << "reco::HcalIsolatedTrackCandidateCollection "
214  << " with label HcalIsolatedTrackCollection\n"
215  << "reco::VertexCollection with label " << labelRecVtx_.label() << "\n"
216  << "EcalRecHitCollection with label EcalRecHitsEB\n"
217  << "EcalRecHitCollection with label EcalRecHitsEE\n"
218  << "HBHERecHitCollection with label " << labelHBHE_.label();
219 }
220 
221 
223 
224 
226 
227  nAll_++;
228 #ifdef DebugLog
229  edm::LogInfo("HcalIsoTrack") << "Run " << iEvent.id().run() << " Event "
230  << iEvent.id().event() << " Luminosity "
231  << iEvent.luminosityBlock() << " Bunch "
232  << iEvent.bunchCrossing();
233 #endif
234  bool valid(true);
235  //Step1: Get all the relevant containers
236  trigger::TriggerEvent triggerEvent;
237  edm::Handle<trigger::TriggerEvent> triggerEventHandle;
238  iEvent.getByToken(tok_trigEvt_, triggerEventHandle);
239  if (!triggerEventHandle.isValid()) {
240  edm::LogWarning("HcalIsoTrack") << "Cannot access the collection " << labelTriggerEvent_;
241  valid = false;
242  }
244  iEvent.getByToken(tok_trigRes_, triggerResults);
245  if (!triggerResults.isValid()) {
246  edm::LogWarning("HcalIsoTrack") << "Cannot access the collection " << labelTriggerResults_;
247  valid = false;
248  }
249 
251  iEvent.getByToken(tok_genTrack_, trkCollection);
252  if (!trkCollection.isValid()) {
253  edm::LogWarning("HcalIsoTrack") << "Cannot access the collection " << labelGenTrack_;
254  valid = false;
255  }
256  reco::TrackCollection::const_iterator trkItr;
257 
259  iEvent.getByToken(tok_recVtx_, recVtxs);
260  if (!recVtxs.isValid()) {
261  edm::LogWarning("HcalIsoTrack") << "Cannot access the collection " << labelGenTrack_;
262  valid = false;
263  }
264 
265  edm::Handle<reco::BeamSpot> beamSpotH;
266  iEvent.getByToken(tok_bs_, beamSpotH);
267  math::XYZPoint leadPV(0,0,0);
268  if (valid) {
269  if (recVtxs->size()>0 && !((*recVtxs)[0].isFake())) {
270  leadPV = math::XYZPoint((*recVtxs)[0].x(),(*recVtxs)[0].y(),
271  (*recVtxs)[0].z());
272  } else if (beamSpotH.isValid()) {
273  leadPV = beamSpotH->position();
274  }
275  }
276 #ifdef DebugLog
277  edm::LogInfo("HcalIsoTrack") << "Primary Vertex " << leadPV;
278 #endif
279 
280  edm::Handle<EcalRecHitCollection> barrelRecHitsHandle;
281  iEvent.getByToken(tok_EB_, barrelRecHitsHandle);
282  if (!barrelRecHitsHandle.isValid()) {
283  edm::LogWarning("HcalIsoTrack") << "Cannot access the collection " << labelEB_;
284  valid = false;
285  }
286  edm::Handle<EcalRecHitCollection> endcapRecHitsHandle;
287  iEvent.getByToken(tok_EE_, endcapRecHitsHandle);
288  if (!endcapRecHitsHandle.isValid()) {
289  edm::LogWarning("HcalIsoTrack") << "Cannot access the collection " << labelEE_;
290  valid = false;
291  }
293  iEvent.getByToken(tok_hbhe_, hbhe);
294  if (!hbhe.isValid()) {
295  edm::LogWarning("HcalIsoTrack") << "Cannot access the collection " << labelHBHE_;
296  valid = false;
297  }
298 
299  //Get L1 trigger object
300  double ptL1(0), etaL1(0), phiL1(0);
302  iEvent.getByToken(tok_hltGT_, l1trigobj);
303 
304  if (l1trigobj.isValid()) {
305  std::vector< edm::Ref<l1extra::L1JetParticleCollection> > l1tauobjref;
306  l1trigobj->getObjects(trigger::TriggerL1TauJet, l1tauobjref);
307  setPtEtaPhi(l1tauobjref,ptL1,etaL1,phiL1);
308 
309  std::vector< edm::Ref<l1extra::L1JetParticleCollection> > l1jetobjref;
310  l1trigobj->getObjects(trigger::TriggerL1CenJet, l1jetobjref);
311  setPtEtaPhi(l1jetobjref,ptL1,etaL1,phiL1);
312 
313  std::vector< edm::Ref<l1extra::L1JetParticleCollection> > l1forjetobjref;
314  l1trigobj->getObjects(trigger::TriggerL1ForJet, l1forjetobjref);
315  setPtEtaPhi(l1forjetobjref,ptL1,etaL1,phiL1);
316  } else {
317  valid = false;
318  }
319 
320  std::auto_ptr<reco::HcalIsolatedTrackCandidateCollection> outputHcalIsoTrackColl(new reco::HcalIsolatedTrackCandidateCollection);
321  std::auto_ptr<reco::VertexCollection> outputVColl(new reco::VertexCollection);
322  std::auto_ptr<EBRecHitCollection> outputEBColl(new EBRecHitCollection);
323  std::auto_ptr<EERecHitCollection> outputEEColl(new EERecHitCollection);
324  std::auto_ptr<HBHERecHitCollection> outputHBHEColl(new HBHERecHitCollection);
325 
326  //For valid HLT record
327  if (!valid) {
328  edm::LogWarning("HcalIsoTrack") << "Error! Can't get some of the products";
329  } else {
330  trigger::TriggerEvent triggerEvent = *(triggerEventHandle.product());
331  if (triggerResults.isValid()) {
332  const edm::TriggerNames & triggerNames = iEvent.triggerNames(*triggerResults);
333  const std::vector<std::string> & triggerNames_ = triggerNames.triggerNames();
334  reco::HcalIsolatedTrackCandidateCollection* isotk = select(triggerResults, triggerNames_, trkCollection, leadPV, barrelRecHitsHandle, endcapRecHitsHandle, hbhe, ptL1, etaL1, phiL1);
335 #ifdef DebugLog
336  edm::LogInfo("HcalIsoTrack") << "AlCaIsoTracksProducer::select returns "
337  << isotk->size() << " isolated tracks";
338 #endif
339 
340  if (isotk->size() > 0) {
341  for (reco::HcalIsolatedTrackCandidateCollection::const_iterator itr=isotk->begin(); itr!=isotk->end(); ++itr)
342  outputHcalIsoTrackColl->push_back(*itr);
343 
344  for (reco::VertexCollection::const_iterator vtx=recVtxs->begin(); vtx!=recVtxs->end(); ++vtx)
345  outputVColl->push_back(*vtx);
346 
347  for (edm::SortedCollection<EcalRecHit>::const_iterator ehit=barrelRecHitsHandle->begin(); ehit!=barrelRecHitsHandle->end(); ++ehit)
348  outputEBColl->push_back(*ehit);
349 
350  for (edm::SortedCollection<EcalRecHit>::const_iterator ehit=endcapRecHitsHandle->begin(); ehit!=endcapRecHitsHandle->end(); ++ehit)
351  outputEEColl->push_back(*ehit);
352 
353  for (std::vector<HBHERecHit>::const_iterator hhit=hbhe->begin(); hhit!=hbhe->end(); ++hhit)
354  outputHBHEColl->push_back(*hhit);
355  ++nGood_;
356  }
357  }
358  }
359  iEvent.put(outputHcalIsoTrackColl, labelIsoTk_);
360  iEvent.put(outputVColl, labelRecVtx_.label());
361  iEvent.put(outputEBColl, labelEB_.instance());
362  iEvent.put(outputEEColl, labelEE_.instance());
363  iEvent.put(outputHBHEColl, labelHBHE_.label());
364 }
365 
367  globalCache()->nAll_ += nAll_;
368  globalCache()->nGood_ += nGood_;
369 }
370 
372  edm::LogInfo("HcalIsoTrack") << "Finds " << count->nGood_ <<" good tracks in "
373  << count->nAll_ << " events";
374 }
375 
376 void AlCaIsoTracksProducer::beginRun(edm::Run const& iRun, edm::EventSetup const& iSetup) {
377  bool changed(false);
378  edm::LogInfo("HcalIsoTrack") << "Run[" << nRun_ << "] " << iRun.run()
379  << " hltconfig.init " << hltConfig_.init(iRun,iSetup,processName_,changed);
380 
382  iSetup.get<IdealMagneticFieldRecord>().get(bFieldH);
383  bField = bFieldH.product();
385  iSetup.get<CaloGeometryRecord>().get(pG);
386  geo = pG.product();
387 }
388 
390  edm::LogInfo("HcalIsoTrack") << "endRun [" << nRun_ << "] " << iRun.run();
391  ++nRun_;
392 }
393 
396  const std::vector<std::string> & triggerNames_,
397  edm::Handle<reco::TrackCollection>& trkCollection,
398  math::XYZPoint& leadPV,edm::Handle<EcalRecHitCollection>& barrelRecHitsHandle,
399  edm::Handle<EcalRecHitCollection>& endcapRecHitsHandle,
401  double ptL1, double etaL1, double phiL1) {
402 
404  bool ok(false);
405 
406  // Find a good HLT trigger
407  for (unsigned int iHLT=0; iHLT<triggerResults->size(); iHLT++) {
408  int hlt = triggerResults->accept(iHLT);
409  for (unsigned int i=0; i<trigNames_.size(); ++i) {
410  if (triggerNames_[iHLT].find(trigNames_[i].c_str())!=std::string::npos) {
411  if (hlt > 0) {
412  ok = true;
413  }
414  edm::LogInfo("HcalIsoTrack") << "The trigger we are looking for "
415  << triggerNames_[iHLT] << " Flag "
416  << hlt << ":" << ok;
417  }
418  }
419  }
420 
421  //Propagate tracks to calorimeter surface)
422  std::vector<spr::propagatedTrackDirection> trkCaloDirections;
424  trkCaloDirections, false);
425 
426  std::vector<spr::propagatedTrackDirection>::const_iterator trkDetItr;
427  unsigned int nTracks(0), nselTracks(0);
428  for (trkDetItr = trkCaloDirections.begin(),nTracks=0;
429  trkDetItr != trkCaloDirections.end(); trkDetItr++,nTracks++) {
430  const reco::Track* pTrack = &(*(trkDetItr->trkItr));
431  math::XYZTLorentzVector v4(pTrack->px(), pTrack->py(),
432  pTrack->pz(), pTrack->p());
433 #ifdef DebugLog
434  edm::LogInfo("HcalIsoTrack") << "This track : " << nTracks
435  << " (pt|eta|phi|p) :" << pTrack->pt()
436  << "|" << pTrack->eta() << "|"
437  << pTrack->phi() << "|" << pTrack->p();
438 #endif
439  //Selection of good track
441  bool qltyFlag = spr::goodTrack(pTrack,leadPV,selectionParameter_,false);
442 #ifdef DebugLog
443  edm::LogInfo("HcalIsoTrack") << "qltyFlag|okECAL|okHCAL : " << qltyFlag
444  << "|" << trkDetItr->okECAL << "|"
445  << trkDetItr->okHCAL;
446 #endif
447  if (qltyFlag && trkDetItr->okECAL && trkDetItr->okHCAL) {
448  double t_p = pTrack->p();
449  nselTracks++;
450  int nRH_eMipDR(0), nNearTRKs(0);
451  double eMipDR = spr::eCone_ecal(geo, barrelRecHitsHandle,
452  endcapRecHitsHandle,
453  trkDetItr->pointHCAL,
454  trkDetItr->pointECAL, a_mipR_,
455  trkDetItr->directionECAL,
456  nRH_eMipDR);
457  double hmaxNearP = spr::chargeIsolationCone(nTracks,
458  trkCaloDirections,
459  a_charIsoR_,
460  nNearTRKs, false);
461 #ifdef DebugLog
462  edm::LogInfo("HcalIsoTrack") << "This track : " << nTracks
463  << " (pt|eta|phi|p) :" << pTrack->pt()
464  << "|" << pTrack->eta() << "|"
465  << pTrack->phi() << "|" << t_p
466  << " e_MIP " << eMipDR
467  << " Chg Isolation " << hmaxNearP;
468 #endif
469  if (t_p>pTrackMin_ && eMipDR<eEcalMax_ && hmaxNearP<eIsolation_) {
470  reco::HcalIsolatedTrackCandidate newCandidate(v4);
471  newCandidate.SetMaxP(hmaxNearP);
472  newCandidate.SetEnergyEcal(eMipDR);
473  newCandidate.setL1(ptL1,etaL1,phiL1);
474  newCandidate.SetEtaPhiEcal((trkDetItr->pointECAL).eta(),
475  (trkDetItr->pointECAL).phi());
476  HcalDetId detId = HcalDetId(trkDetItr->detIdHCAL);
477  newCandidate.SetEtaPhiHcal((trkDetItr->pointHCAL).eta(),
478  (trkDetItr->pointHCAL).phi(),
479  detId.ieta(), detId.iphi());
480  int indx(0);
481  reco::TrackCollection::const_iterator trkItr1;
482  for (trkItr1=trkCollection->begin(); trkItr1 != trkCollection->end(); ++trkItr1,++indx) {
483  const reco::Track* pTrack1 = &(*trkItr1);
484  if (pTrack1 == pTrack) {
485  reco::TrackRef tRef = reco::TrackRef(trkCollection,indx);
486  newCandidate.setTrack(tRef);
487  break;
488  }
489  }
490  trackCollection->push_back(newCandidate);
491  }
492  }
493  }
494  return trackCollection;
495 }
496 
497 void AlCaIsoTracksProducer::setPtEtaPhi(std::vector< edm::Ref<l1extra::L1JetParticleCollection> >& objref, double &ptL1, double &etaL1, double &phiL1) {
498 
499  for (unsigned int p=0; p<objref.size(); p++) {
500  if (objref[p]->pt()>ptL1) {
501  ptL1 = objref[p]->pt();
502  phiL1 = objref[p]->phi();
503  etaL1 = objref[p]->eta();
504  }
505  }
506 }
507 
509 
RunNumber_t run() const
Definition: EventID.h:39
double p() const
momentum vector magnitude
Definition: TrackBase.h:610
T getParameter(std::string const &) const
EventNumber_t event() const
Definition: EventID.h:41
int i
Definition: DBlmapReader.cc:9
virtual edm::TriggerNames const & triggerNames(edm::TriggerResults const &triggerResults) const
Definition: Event.cc:215
const unsigned int nTracks(const reco::Vertex &sv)
std::vector< spr::propagatedTrackID > propagateCALO(edm::Handle< reco::TrackCollection > &trkCollection, const CaloGeometry *geo, const MagneticField *bField, std::string &theTrackQuality, bool debug=false)
RunNumber_t run() const
Definition: RunBase.h:40
The single EDProduct to be saved for each event (AOD case)
Definition: TriggerEvent.h:25
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:462
AlCaIsoTracksProducer(edm::ParameterSet const &, const AlCaIsoTracks::Counters *count)
virtual void endStream() override
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:17
edm::EDGetTokenT< EcalRecHitCollection > tok_EE_
virtual void beginRun(edm::Run const &, edm::EventSetup const &) override
const CaloGeometry * geo
std::vector< T >::const_iterator const_iterator
int bunchCrossing() const
Definition: EventBase.h:65
edm::EDGetTokenT< reco::TrackCollection > tok_genTrack_
virtual void produce(edm::Event &, edm::EventSetup const &) override
edm::LuminosityBlockNumber_t luminosityBlock() const
Definition: EventBase.h:62
double phi() const
azimuthal angle of momentum vector
Definition: TrackBase.h:640
std::vector< Vertex > VertexCollection
collection of Vertex objects
Definition: VertexFwd.h:9
std::atomic< unsigned int > nAll_
static void globalEndJob(const AlCaIsoTracks::Counters *counters)
double chargeIsolationCone(unsigned int trkIndex, std::vector< spr::propagatedTrackDirection > &trkDirs, double dR, int &nNearTRKs, bool debug=false)
double px() const
x coordinate of momentum vector
Definition: TrackBase.h:622
edm::EDGetTokenT< trigger::TriggerFilterObjectWithRefs > tok_hltGT_
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:7
Strings const & triggerNames() const
Definition: TriggerNames.cc:24
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
Definition: LorentzVector.h:29
edm::EDGetTokenT< EcalRecHitCollection > tok_EB_
std::vector< std::string > HLTNames_
edm::EDGetTokenT< reco::BeamSpot > tok_bs_
int iEvent
Definition: GenABIO.cc:230
edm::EDGetTokenT< reco::VertexCollection > tok_recVtx_
double eta() const
pseudorapidity of momentum vector
Definition: TrackBase.h:646
std::vector< HcalIsolatedTrackCandidate > HcalIsolatedTrackCandidateCollection
collectin of HcalIsolatedTrackCandidate objects
bool goodTrack(const reco::Track *pTrack, math::XYZPoint leadPV, trackSelectionParameters parameters, bool debug=false)
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
Definition: Event.h:121
void SetEtaPhiEcal(double eta, double phi)
eta, phi at ECAL surface
double pt() const
track transverse momentum
Definition: TrackBase.h:616
void setPtEtaPhi(std::vector< edm::Ref< l1extra::L1JetParticleCollection > > &objref, double &ptL1, double &etaL1, double &phiL1)
edm::EDGetTokenT< HBHERecHitCollection > tok_hbhe_
int ieta() const
get the cell ieta
Definition: HcalDetId.h:56
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
void SetEtaPhiHcal(double eta, double phi, int ieta, int iphi)
eta, phi at HCAL surface
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)
const MagneticField * bField
static std::string const triggerResults
Definition: EdmProvDump.cc:41
bool isValid() const
Definition: HandleBase.h:75
edm::EDGetTokenT< trigger::TriggerEvent > tok_trigEvt_
double pz() const
z coordinate of momentum vector
Definition: TrackBase.h:634
virtual void endRun(edm::Run const &, edm::EventSetup const &) override
int iphi() const
get the cell iphi
Definition: HcalDetId.cc:101
static TrackQuality qualityByName(const std::string &name)
Definition: TrackBase.cc:125
static std::unique_ptr< AlCaIsoTracks::Counters > initializeGlobalCache(edm::ParameterSet const &)
T const * product() const
Definition: Handle.h:81
void setL1(double pt, double eta, double phi)
XYZPointD XYZPoint
point in space with cartesian internal representation
Definition: Point3D.h:12
bool init(const edm::Run &iRun, const edm::EventSetup &iSetup, const std::string &processName, bool &changed)
d&#39;tor
const T & get() const
Definition: EventSetup.h:56
edm::Ref< TrackCollection > TrackRef
persistent reference to a Track
Definition: TrackFwd.h:20
T const * product() const
Definition: ESHandle.h:86
std::string const & label() const
Definition: InputTag.h:36
spr::trackSelectionParameters selectionParameter_
std::vector< std::string > trigNames_
edm::EventID id() const
Definition: EventBase.h:59
reco::TrackBase::TrackQuality minQuality
void setTrack(const reco::TrackRef &tr)
reco::HcalIsolatedTrackCandidateCollection * select(edm::Handle< edm::TriggerResults > &triggerResults, const std::vector< std::string > &triggerNames_, edm::Handle< reco::TrackCollection > &trkCollection, math::XYZPoint &leadPV, edm::Handle< EcalRecHitCollection > &barrelRecHitsHandle, edm::Handle< EcalRecHitCollection > &endcapRecHitsHandle, edm::Handle< HBHERecHitCollection > &hbhe, double ptL1, double etaL1, double phiL1)
edm::EDGetTokenT< edm::TriggerResults > tok_trigRes_
std::string const & instance() const
Definition: InputTag.h:37
std::atomic< unsigned int > nGood_
double py() const
y coordinate of momentum vector
Definition: TrackBase.h:628
Definition: Run.h:43