CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
IsoTrackCalibration.cc
Go to the documentation of this file.
1 // system include files
2 #include <memory>
3 #include <string>
4 #include <vector>
5 
6 // Root objects
7 #include "TROOT.h"
8 #include "TSystem.h"
9 #include "TFile.h"
10 #include "TProfile.h"
11 #include "TDirectory.h"
12 #include "TTree.h"
13 #include "TH1F.h"
14 #include "TLorentzVector.h"
15 #include "TInterpreter.h"
16 
17 //Tracks
22 
23 // Vertices
27 
28 //Triggers
37 
48 
54 
68 
69 class IsoTrackCalibration : public edm::one::EDAnalyzer<edm::one::WatchRuns, edm::one::SharedResources> {
70 public:
71  explicit IsoTrackCalibration(const edm::ParameterSet &);
72  ~IsoTrackCalibration() override;
73 
74  static void fillDescriptions(edm::ConfigurationDescriptions &descriptions);
75 
76 private:
77  void analyze(edm::Event const &, edm::EventSetup const &) override;
78  void beginJob() override;
79  void beginRun(edm::Run const &, edm::EventSetup const &) override;
80  void endRun(edm::Run const &, edm::EventSetup const &) override;
81  virtual void beginLuminosityBlock(edm::LuminosityBlock const &, edm::EventSetup const &);
82  virtual void endLuminosityBlock(edm::LuminosityBlock const &, edm::EventSetup const &);
83 
86  std::vector<std::string> trigNames_, HLTNames_;
93  double maxEcalEnr_;
95  int nRun_;
99 
107 
110 
111  TTree *tree;
117  std::vector<unsigned int> *t_DetIds, *t_DetIds1, *t_DetIds3;
118  std::vector<double> *t_HitEnergies, *t_HitEnergies1, *t_HitEnergies3;
119 
120  TH1F *h_nTrk, *h_nVtx;
122  TH1I *h_iEta, *h_tketa0[5], *h_tketa1[5], *h_tketa2[5];
123  TH1I *h_tketa3[5], *h_tketa4[5], *h_tketa5[5];
125  TH1F *h_jetpt[4];
126  TH1I *h_tketav1[5][6], *h_tketav2[5][6];
127 };
128 
130  usesResource("TFileService");
131  //now do whatever initialization is needed
132  const double isolationRadius(28.9);
133  verbosity_ = iConfig.getUntrackedParameter<int>("Verbosity", 0);
134  trigNames_ = iConfig.getUntrackedParameter<std::vector<std::string> >("Triggers");
135  theTrackQuality_ = iConfig.getUntrackedParameter<std::string>("TrackQuality", "highPurity");
136  reco::TrackBase::TrackQuality trackQuality_ = reco::TrackBase::qualityByName(theTrackQuality_);
137  constTrackPt_ = iConfig.getUntrackedParameter<double>("ConstTrackPt", 10.0);
138  slopeTrackPt_ = iConfig.getUntrackedParameter<double>("SlopeTrackPt", 0.16);
140  selectionParameters_.minQuality = trackQuality_;
141  selectionParameters_.maxDxyPV = iConfig.getUntrackedParameter<double>("MaxDxyPV", 0.02);
142  selectionParameters_.maxDzPV = iConfig.getUntrackedParameter<double>("MaxDzPV", 0.02);
143  selectionParameters_.maxChi2 = iConfig.getUntrackedParameter<double>("MaxChi2", 5.0);
144  selectionParameters_.maxDpOverP = iConfig.getUntrackedParameter<double>("MaxDpOverP", 0.1);
145  selectionParameters_.minOuterHit = iConfig.getUntrackedParameter<int>("MinOuterHit", 4);
146  selectionParameters_.minLayerCrossed = iConfig.getUntrackedParameter<int>("MinLayerCrossed", 8);
147  selectionParameters_.maxInMiss = iConfig.getUntrackedParameter<int>("MaxInMiss", 0);
148  selectionParameters_.maxOutMiss = iConfig.getUntrackedParameter<int>("MaxOutMiss", 0);
149  a_coneR_ = iConfig.getUntrackedParameter<double>("ConeRadius", 34.98);
150  a_charIsoR_ = a_coneR_ + isolationRadius;
151  a_mipR_ = iConfig.getUntrackedParameter<double>("ConeRadiusMIP", 14.0);
152  maxEcalEnr_ = iConfig.getUntrackedParameter<double>("MaxEcalEnergyInCone", 2.5);
153  maxNeighborTrackEnr_ = iConfig.getUntrackedParameter<double>("MaxNeighborTrackEnergy", 40.0);
154  isMC_ = iConfig.getUntrackedParameter<bool>("IsMC", false);
155  isQCD_ = iConfig.getUntrackedParameter<bool>("IsQCD", false);
156  isAOD_ = iConfig.getUntrackedParameter<bool>("IsAOD", true);
157  triggerEvent_ = edm::InputTag("hltTriggerSummaryAOD", "", "HLT");
158  theTriggerResultsLabel_ = edm::InputTag("TriggerResults", "", "HLT");
159 
160  // define tokens for access
161  tok_trigEvt_ = consumes<trigger::TriggerEvent>(triggerEvent_);
162  tok_trigRes_ = consumes<edm::TriggerResults>(theTriggerResultsLabel_);
163  tok_genTrack_ = consumes<reco::TrackCollection>(edm::InputTag("generalTracks"));
164  tok_recVtx_ = consumes<reco::VertexCollection>(edm::InputTag("offlinePrimaryVertices"));
165  tok_bs_ = consumes<reco::BeamSpot>(edm::InputTag("offlineBeamSpot"));
166  tok_ew_ = consumes<GenEventInfoProduct>(edm::InputTag("generator"));
167 
168  if (isAOD_) {
169  tok_EB_ = consumes<EcalRecHitCollection>(edm::InputTag("reducedEcalRecHitsEB"));
170  tok_EE_ = consumes<EcalRecHitCollection>(edm::InputTag("reducedEcalRecHitsEE"));
171  tok_hbhe_ = consumes<HBHERecHitCollection>(edm::InputTag("reducedHcalRecHits", "hbhereco"));
172  } else {
173  tok_EB_ = consumes<EcalRecHitCollection>(edm::InputTag("ecalRecHit", "EcalRecHitsEB"));
174  tok_EE_ = consumes<EcalRecHitCollection>(edm::InputTag("ecalRecHit", "EcalRecHitsEE"));
175  tok_hbhe_ = consumes<HBHERecHitCollection>(edm::InputTag("hbhereco"));
176  }
177 
178  if (verbosity_ >= 0) {
179  edm::LogVerbatim("IsoTrack") << "Parameters read from config file \n"
180  << "\t minPt " << selectionParameters_.minPt << "\t theTrackQuality "
181  << theTrackQuality_ << "\t minQuality " << selectionParameters_.minQuality
182  << "\t maxDxyPV " << selectionParameters_.maxDxyPV << "\t maxDzPV "
184  << "\t maxDpOverP " << selectionParameters_.maxDpOverP << "\t minOuterHit "
185  << selectionParameters_.minOuterHit << "\t minLayerCrossed "
186  << selectionParameters_.minLayerCrossed << "\t maxInMiss "
187  << selectionParameters_.maxInMiss << "\t maxOutMiss "
188  << selectionParameters_.maxOutMiss << "\t a_coneR " << a_coneR_ << "\t a_charIsoR "
189  << a_charIsoR_ << "\t a_mipR " << a_mipR_ << "\t isMC " << isMC_ << "\t isQCD "
190  << isQCD_ << "\t isAOD " << isAOD_;
191  edm::LogVerbatim("IsoTrack") << trigNames_.size() << " triggers to be studied:";
192  for (unsigned int k = 0; k < trigNames_.size(); ++k)
193  edm::LogVerbatim("IsoTrack") << "[" << k << "] " << trigNames_[k];
194  }
195 
196  tok_geom_ = esConsumes<CaloGeometry, CaloGeometryRecord>();
197  tok_magField_ = esConsumes<MagneticField, IdealMagneticFieldRecord>();
198 }
199 
201  // do anything here that needs to be done at desctruction time
202  // (e.g. close files, deallocate resources etc.)
203 }
204 
206  t_Run = iEvent.id().run();
207  t_Event = iEvent.id().event();
208  if (verbosity_ % 10 > 0)
209  edm::LogVerbatim("IsoTrack") << "Run " << t_Run << " Event " << t_Event << " Luminosity "
210  << iEvent.luminosityBlock() << " Bunch " << iEvent.bunchCrossing()
211  << " starts ==========";
212  //Get magnetic field
213  const MagneticField *bField = &iSetup.getData(tok_magField_);
214 
215  // get handles to calogeometry
216  const CaloGeometry *geo = &iSetup.getData(tok_geom_);
217 
218  //Get track collection
220  iEvent.getByToken(tok_genTrack_, trkCollection);
221 
222  //event weight for FLAT sample and PU information
223  t_EventWeight = 1.0;
225  iEvent.getByToken(tok_ew_, genEventInfo);
226  if (genEventInfo.isValid())
227  t_EventWeight = genEventInfo->weight();
228 
229  //Define the best vertex and the beamspot
231  iEvent.getByToken(tok_recVtx_, recVtxs);
232  edm::Handle<reco::BeamSpot> beamSpotH;
233  iEvent.getByToken(tok_bs_, beamSpotH);
234  math::XYZPoint leadPV(0, 0, 0);
235 
236  t_nVtx = recVtxs->size();
237  h_nVtx->Fill(t_nVtx);
238 
239  if (!recVtxs->empty() && !((*recVtxs)[0].isFake())) {
240  leadPV = math::XYZPoint((*recVtxs)[0].x(), (*recVtxs)[0].y(), (*recVtxs)[0].z());
241  } else if (beamSpotH.isValid()) {
242  leadPV = beamSpotH->position();
243  }
244  if ((verbosity_ / 100) % 10 > 0) {
245  edm::LogVerbatim("IsoTrack") << "Primary Vertex " << leadPV;
246  if (beamSpotH.isValid())
247  edm::LogVerbatim("IsoTrack") << " Beam Spot " << beamSpotH->position();
248  }
249 
250  // RecHits
251  edm::Handle<EcalRecHitCollection> barrelRecHitsHandle;
252  edm::Handle<EcalRecHitCollection> endcapRecHitsHandle;
253  iEvent.getByToken(tok_EB_, barrelRecHitsHandle);
254  iEvent.getByToken(tok_EE_, endcapRecHitsHandle);
256  iEvent.getByToken(tok_hbhe_, hbhe);
257 
258  //Trigger
259  bool triggerOK = false;
260  if (isMC_ && !isQCD_) {
261  triggerOK = true; // ignore HLT for single pion MC
262  } else {
263  trigger::TriggerEvent triggerEvent;
264  edm::Handle<trigger::TriggerEvent> triggerEventHandle;
265  iEvent.getByToken(tok_trigEvt_, triggerEventHandle);
266  if (!triggerEventHandle.isValid()) {
267  edm::LogVerbatim("IsoTrack") << "Error! Can't get the product " << triggerEvent_.label();
268  } else {
271  iEvent.getByToken(tok_trigRes_, triggerResults);
272  if (triggerResults.isValid()) {
273  const edm::TriggerNames &triggerNames = iEvent.triggerNames(*triggerResults);
274  const std::vector<std::string> &triggerNames_ = triggerNames.triggerNames();
275  for (unsigned int iHLT = 0; iHLT < triggerResults->size(); iHLT++) {
276  int hlt = triggerResults->accept(iHLT);
277  if (hlt > 0) {
278  for (unsigned int i = 0; i < trigNames_.size(); ++i) {
279  if (triggerNames_[iHLT].find(trigNames_[i]) != std::string::npos) {
280  triggerOK = true;
281  if (verbosity_ % 10 > 0)
282  edm::LogVerbatim("IsoTrack")
283  << "This is the trigger we are looking for " << triggerNames_[iHLT] << " Flag " << hlt;
284  }
285  }
286  }
287  }
288  }
289  }
290  }
291 
292  if (triggerOK) {
293  //Propagate tracks to calorimeter surface)
294  std::vector<spr::propagatedTrackDirection> trkCaloDirections;
295  spr::propagateCALO(trkCollection, geo, bField, theTrackQuality_, trkCaloDirections, ((verbosity_ / 100) % 10 > 2));
296  //Loop over tracks
297  std::vector<spr::propagatedTrackDirection>::const_iterator trkDetItr;
298  unsigned int nTracks(0), nselTracks(0);
299  t_nTrk = trkCaloDirections.size();
300 
301  for (trkDetItr = trkCaloDirections.begin(), nTracks = 0; trkDetItr != trkCaloDirections.end();
302  trkDetItr++, nTracks++) {
303  const reco::Track *pTrack = &(*(trkDetItr->trkItr));
304  if (verbosity_ % 10 > 0)
305  edm::LogVerbatim("IsoTrack") << "This track : " << nTracks << " (pt/eta/phi/p) :" << pTrack->pt() << "/"
306  << pTrack->eta() << "/" << pTrack->phi() << "/" << pTrack->p();
307 
308  t_ieta = 0;
309  if (trkDetItr->okHCAL) {
310  HcalDetId detId = (HcalDetId)(trkDetItr->detIdHCAL);
311  t_ieta = detId.ieta();
312  }
313  // ---------- eta-dependent restriction on Pt ----------------------------
315  // -----------------------------------------------------------------------
316 
317  //Selection of good track
318  t_selectTk = spr::goodTrack(pTrack, leadPV, selectionParameters_, ((verbosity_ / 100) % 10 > 2));
320  oneCutParameters.maxDxyPV = 10;
321  oneCutParameters.maxDzPV = 100;
322  oneCutParameters.maxInMiss = 2;
323  oneCutParameters.maxOutMiss = 2;
324  bool qltyFlag = spr::goodTrack(pTrack, leadPV, oneCutParameters, ((verbosity_ / 100) % 10 > 2));
325  oneCutParameters = selectionParameters_;
326  oneCutParameters.maxDxyPV = 10;
327  oneCutParameters.maxDzPV = 100;
328  t_qltyMissFlag = spr::goodTrack(pTrack, leadPV, oneCutParameters, ((verbosity_ / 100) % 10 > 2));
329  oneCutParameters = selectionParameters_;
330  oneCutParameters.maxInMiss = 2;
331  oneCutParameters.maxOutMiss = 2;
332  t_qltyPVFlag = spr::goodTrack(pTrack, leadPV, oneCutParameters, ((verbosity_ / 100) % 10 > 2));
333 
334  if (verbosity_ % 10 > 0)
335  edm::LogVerbatim("IsoTrack") << "qltyFlag|okECAL|okHCAL : " << qltyFlag << "|" << trkDetItr->okECAL << "/"
336  << trkDetItr->okHCAL;
337  if (qltyFlag && trkDetItr->okECAL && trkDetItr->okHCAL) {
338  nselTracks++;
339  int nRH_eMipDR(0), nNearTRKs(0);
340  //------ ecal energy around track -------------------------------
342  barrelRecHitsHandle,
343  endcapRecHitsHandle,
344  trkDetItr->pointHCAL,
345  trkDetItr->pointECAL,
346  a_mipR_,
347  trkDetItr->directionECAL,
348  nRH_eMipDR);
349  //---- isolation criteria ----------------------------------------------
350  t_hmaxNearP =
351  spr::chargeIsolationCone(nTracks, trkCaloDirections, a_charIsoR_, nNearTRKs, ((verbosity_ / 100) % 10 > 2));
352 
354  //------------ HCAL --------------------------------------------------
355  //------ initialize arrays of DetID and hit energies -----------------
356  t_DetIds->clear();
357  t_DetIds1->clear();
358  t_DetIds3->clear();
359  t_HitEnergies->clear();
360  t_HitEnergies1->clear();
361  t_HitEnergies3->clear();
362  int nRecHits(-999), nRecHits1(-999), nRecHits3(-999);
363  std::vector<DetId> ids, ids1, ids3;
364  //------ hcal energy in the main cone -------------------------------
365  t_eHcal = spr::eCone_hcal(geo,
366  hbhe,
367  trkDetItr->pointHCAL,
368  trkDetItr->pointECAL,
369  a_coneR_,
370  trkDetItr->directionHCAL,
371  nRecHits,
372  ids,
373  *t_HitEnergies);
374  t_DetIds->reserve(ids.size());
375  for (unsigned int k = 0; k < ids.size(); ++k) {
376  t_DetIds->push_back(ids[k].rawId());
377  }
378  //----- hcal energy in the extended cone 1 (a_coneR+10) --------------
380  hbhe,
381  trkDetItr->pointHCAL,
382  trkDetItr->pointECAL,
383  a_coneR_ + 10,
384  trkDetItr->directionHCAL,
385  nRecHits1,
386  ids1,
387  *t_HitEnergies1);
388  t_DetIds1->reserve(ids1.size());
389  for (unsigned int k = 0; k < ids1.size(); ++k) {
390  t_DetIds1->push_back(ids1[k].rawId());
391  }
392  //----- hcal energy in the extended cone 3 (a_coneR+30) --------------
394  hbhe,
395  trkDetItr->pointHCAL,
396  trkDetItr->pointECAL,
397  a_coneR_ + 30,
398  trkDetItr->directionHCAL,
399  nRecHits3,
400  ids3,
401  *t_HitEnergies3);
402  t_DetIds3->reserve(ids3.size());
403  for (unsigned int k = 0; k < ids3.size(); ++k) {
404  t_DetIds3->push_back(ids3[k].rawId());
405  }
406 
407  t_p = pTrack->p();
408  t_pt = pTrack->pt();
409  t_phi = pTrack->phi();
410  if (verbosity_ % 10 > 0) {
411  edm::LogVerbatim("IsoTrack") << "This track : " << nTracks << " (pt/eta/phi/p) :" << pTrack->pt() << "/"
412  << pTrack->eta() << "/" << pTrack->phi() << "/" << t_p;
413  edm::LogVerbatim("IsoTrack") << "e_MIP " << t_eMipDR << " Chg Isolation " << t_hmaxNearP << " eHcal"
414  << t_eHcal << " ieta " << t_ieta << " Quality " << t_qltyMissFlag << ":"
415  << t_qltyPVFlag << ":" << t_selectTk;
416  for (unsigned int lll = 0; lll < t_DetIds->size(); lll++) {
417  edm::LogVerbatim("IsoTrack")
418  << "det id is = " << t_DetIds->at(lll) << " hit enery is = " << t_HitEnergies->at(lll);
419  }
420  }
421  tree->Fill();
422  } // end of conditions on t_eMipDR and t_hmaxNearP
423  } // end of loose check of track quality
424  } // end of loop over tracks
425 
426  h_nTrk->Fill(nTracks);
427  } // end of triggerOK
428 }
429 
431  h_nVtx = fs_->make<TH1F>("h_nVtx", "h_nVtx", 100, 0, 100);
432  h_nTrk = fs_->make<TH1F>("h_nTrk", "h_nTrk", 100, 0, 2000);
433 
434  tree = fs_->make<TTree>("CalibTree", "CalibTree");
435 
436  tree->Branch("t_Run", &t_Run, "t_Run/I");
437  tree->Branch("t_Event", &t_Event, "t_Event/I");
438  tree->Branch("t_nVtx", &t_nVtx, "t_nVtx/I");
439  tree->Branch("t_nTrk", &t_nTrk, "t_nTrk/I");
440  tree->Branch("t_EventWeight", &t_EventWeight, "t_EventWeight/D");
441  tree->Branch("t_p", &t_p, "t_p/D");
442  tree->Branch("t_pt", &t_pt, "t_pt/D");
443  tree->Branch("t_ieta", &t_ieta, "t_ieta/I");
444  tree->Branch("t_phi", &t_phi, "t_phi/D");
445  tree->Branch("t_eMipDR", &t_eMipDR, "t_eMipDR/D");
446  tree->Branch("t_eHcal", &t_eHcal, "t_eHcal/D");
447  tree->Branch("t_eHcal10", &t_eHcal10, "t_eHcal10/D");
448  tree->Branch("t_eHcal30", &t_eHcal30, "t_eHcal30/D");
449  tree->Branch("t_hmaxNearP", &t_hmaxNearP, "t_hmaxNearP/D");
450  tree->Branch("t_selectTk", &t_selectTk, "t_selectTk/O");
451  tree->Branch("t_qltyMissFlag", &t_qltyMissFlag, "t_qltyMissFlag/O");
452  tree->Branch("t_qltyPVFlag", &t_qltyPVFlag, "t_qltyPVFlag/O)");
453 
454  t_DetIds = new std::vector<unsigned int>();
455  t_DetIds1 = new std::vector<unsigned int>();
456  t_DetIds3 = new std::vector<unsigned int>();
457  t_HitEnergies = new std::vector<double>();
458  t_HitEnergies1 = new std::vector<double>();
459  t_HitEnergies3 = new std::vector<double>();
460 
461  tree->Branch("t_DetIds", "std::vector<unsigned int>", &t_DetIds);
462  //tree->Branch("t_DetIds1", "std::vector<unsigned int>", &t_DetIds1);
463  //tree->Branch("t_DetIds3", "std::vector<unsigned int>", &t_DetIds3);
464  tree->Branch("t_HitEnergies", "std::vector<double>", &t_HitEnergies);
465  //tree->Branch("t_HitEnergies1", "std::vector<double>", &t_HitEnergies1);
466  //tree->Branch("t_HitEnergies3", "std::vector<double>", &t_HitEnergies3);
467 }
468 
469 // ------------ method called when starting to processes a run ------------
470 void IsoTrackCalibration::beginRun(edm::Run const &iRun, edm::EventSetup const &iSetup) {
471  bool changed_(true);
472  bool flag = hltConfig_.init(iRun, iSetup, "HLT", changed_);
473  edm::LogInfo("HcalIsoTrack") << "Run[" << nRun_ << "] " << iRun.run() << " process HLT init flag " << flag
474  << " change flag " << changed_;
475 
476  // check if trigger names in (new) config
477  if (changed_) {
478  edm::LogInfo("HcalIsoTrack") << "New trigger menu found !!!";
479  const unsigned int n(hltConfig_.size());
480  for (unsigned itrig = 0; itrig < trigNames_.size(); itrig++) {
481  unsigned int triggerindx = hltConfig_.triggerIndex(trigNames_[itrig]);
482  if (triggerindx >= n) {
483  edm::LogWarning("HcalIsoTrack") << trigNames_[itrig] << " " << triggerindx << " does not exist in "
484  << "the current menu";
485  } else {
486  edm::LogInfo("HcalIsoTrack") << trigNames_[itrig] << " " << triggerindx << " exists";
487  }
488  }
489  }
490 }
491 
492 // ------------ method called when ending the processing of a run ------------
494  ++nRun_;
495  edm::LogWarning("HcalIsoTrack") << "endRun[" << nRun_ << "] " << iRun.run();
496 }
497 
498 // ------------ method called when starting to processes a luminosity block ------------
500 // ------------ method called when ending the processing of a luminosity block ------------
502 // ------------ method fills 'descriptions' with the allowed parameters for the module ------------
504  //The following says we do not know what parameters are allowed so do no validation
505  // Please change this to state exactly what you do use, even if it is no parameters
507  desc.setUnknown();
508  descriptions.addDefault(desc);
509 }
510 
511 //define this as a plug-in
RunNumber_t run() const
Definition: EventID.h:38
unsigned int size() const
number of trigger paths in trigger table
std::vector< double > * t_HitEnergies3
double p() const
momentum vector magnitude
Definition: TrackBase.h:631
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)
Log< level::Info, true > LogVerbatim
EventNumber_t event() const
Definition: EventID.h:40
T getUntrackedParameter(std::string const &, T const &) const
std::vector< spr::propagatedTrackID > propagateCALO(edm::Handle< reco::TrackCollection > &trkCollection, const CaloGeometry *geo, const MagneticField *bField, const std::string &theTrackQuality, bool debug=false)
edm::InputTag theTriggerResultsLabel_
edm::EDGetTokenT< reco::BeamSpot > tok_bs_
RunNumber_t run() const
Definition: RunBase.h:40
The single EDProduct to be saved for each event (AOD case)
Definition: TriggerEvent.h:25
edm::EDGetTokenT< reco::TrackCollection > tok_genTrack_
edm::ESGetToken< CaloGeometry, CaloGeometryRecord > tok_geom_
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:539
TrackQuality
track quality
Definition: TrackBase.h:150
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
edm::ESGetToken< MagneticField, IdealMagneticFieldRecord > tok_magField_
void beginRun(edm::Run const &, edm::EventSetup const &) override
edm::EDGetTokenT< trigger::TriggerEvent > tok_trigEvt_
int bunchCrossing() const
Definition: EventBase.h:64
edm::LuminosityBlockNumber_t luminosityBlock() const
Definition: EventBase.h:61
double phi() const
azimuthal angle of momentum vector
Definition: TrackBase.h:649
T * make(const Args &...args) const
make new ROOT object
Definition: TFileService.h:64
double chargeIsolationCone(unsigned int trkIndex, std::vector< spr::propagatedTrackDirection > &trkDirs, double dR, int &nNearTRKs, bool debug=false)
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:19
std::vector< unsigned int > * t_DetIds1
std::vector< unsigned int > * t_DetIds3
edm::EDGetTokenT< edm::TriggerResults > tok_trigRes_
Strings const & triggerNames() const
Definition: TriggerNames.cc:48
edm::EDGetTokenT< EcalRecHitCollection > tok_EE_
edm::TriggerNames const & triggerNames(edm::TriggerResults const &triggerResults) const override
Definition: Event.cc:275
unsigned int triggerIndex(const std::string &triggerName) const
slot position of trigger path in trigger table (0 to size-1)
bool getData(T &iHolder) const
Definition: EventSetup.h:128
int iEvent
Definition: GenABIO.cc:224
double eta() const
pseudorapidity of momentum vector
Definition: TrackBase.h:652
void addDefault(ParameterSetDescription const &psetDescription)
std::vector< std::string > HLTNames_
edm::EDGetTokenT< GenEventInfoProduct > tok_ew_
bool goodTrack(const reco::Track *pTrack, math::XYZPoint leadPV, trackSelectionParameters parameters, bool debug=false)
double pt() const
track transverse momentum
Definition: TrackBase.h:637
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
constexpr int ieta() const
get the cell ieta
Definition: HcalDetId.h:155
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)
static std::string const triggerResults
Definition: EdmProvDump.cc:44
IsoTrackCalibration(const edm::ParameterSet &)
bool isValid() const
Definition: HandleBase.h:70
std::vector< double > * t_HitEnergies
std::vector< std::string > trigNames_
virtual void beginLuminosityBlock(edm::LuminosityBlock const &, edm::EventSetup const &)
Log< level::Info, false > LogInfo
edm::EDGetTokenT< HBHERecHitCollection > tok_hbhe_
static TrackQuality qualityByName(const std::string &name)
Definition: TrackBase.cc:126
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
edm::EDGetTokenT< EcalRecHitCollection > tok_EB_
std::string const & label() const
Definition: InputTag.h:36
edm::EventID id() const
Definition: EventBase.h:59
void analyze(edm::Event const &, edm::EventSetup const &) override
spr::trackSelectionParameters selectionParameters_
reco::TrackBase::TrackQuality minQuality
void endRun(edm::Run const &, edm::EventSetup const &) override
Log< level::Warning, false > LogWarning
edm::Service< TFileService > fs_
std::vector< double > * t_HitEnergies1
std::vector< unsigned int > * t_DetIds
HLTConfigProvider hltConfig_
Definition: Run.h:45
virtual void endLuminosityBlock(edm::LuminosityBlock const &, edm::EventSetup const &)
edm::EDGetTokenT< reco::VertexCollection > tok_recVtx_