CMS 3D CMS Logo

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");
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 {
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);
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  int nRH_eMipDR(0), nNearTRKs(0);
339  //------ ecal energy around track -------------------------------
341  barrelRecHitsHandle,
342  endcapRecHitsHandle,
343  trkDetItr->pointHCAL,
344  trkDetItr->pointECAL,
345  a_mipR_,
346  trkDetItr->directionECAL,
347  nRH_eMipDR);
348  //---- isolation criteria ----------------------------------------------
349  t_hmaxNearP =
350  spr::chargeIsolationCone(nTracks, trkCaloDirections, a_charIsoR_, nNearTRKs, ((verbosity_ / 100) % 10 > 2));
351 
353  //------------ HCAL --------------------------------------------------
354  //------ initialize arrays of DetID and hit energies -----------------
355  t_DetIds->clear();
356  t_DetIds1->clear();
357  t_DetIds3->clear();
358  t_HitEnergies->clear();
359  t_HitEnergies1->clear();
360  t_HitEnergies3->clear();
361  int nRecHits(-999), nRecHits1(-999), nRecHits3(-999);
362  std::vector<DetId> ids, ids1, ids3;
363  //------ hcal energy in the main cone -------------------------------
364  t_eHcal = spr::eCone_hcal(geo,
365  hbhe,
366  trkDetItr->pointHCAL,
367  trkDetItr->pointECAL,
368  a_coneR_,
369  trkDetItr->directionHCAL,
370  nRecHits,
371  ids,
372  *t_HitEnergies);
373  t_DetIds->reserve(ids.size());
374  for (unsigned int k = 0; k < ids.size(); ++k) {
375  t_DetIds->push_back(ids[k].rawId());
376  }
377  //----- hcal energy in the extended cone 1 (a_coneR+10) --------------
379  hbhe,
380  trkDetItr->pointHCAL,
381  trkDetItr->pointECAL,
382  a_coneR_ + 10,
383  trkDetItr->directionHCAL,
384  nRecHits1,
385  ids1,
386  *t_HitEnergies1);
387  t_DetIds1->reserve(ids1.size());
388  for (unsigned int k = 0; k < ids1.size(); ++k) {
389  t_DetIds1->push_back(ids1[k].rawId());
390  }
391  //----- hcal energy in the extended cone 3 (a_coneR+30) --------------
393  hbhe,
394  trkDetItr->pointHCAL,
395  trkDetItr->pointECAL,
396  a_coneR_ + 30,
397  trkDetItr->directionHCAL,
398  nRecHits3,
399  ids3,
400  *t_HitEnergies3);
401  t_DetIds3->reserve(ids3.size());
402  for (unsigned int k = 0; k < ids3.size(); ++k) {
403  t_DetIds3->push_back(ids3[k].rawId());
404  }
405 
406  t_p = pTrack->p();
407  t_pt = pTrack->pt();
408  t_phi = pTrack->phi();
409  if (verbosity_ % 10 > 0) {
410  edm::LogVerbatim("IsoTrack") << "This track : " << nTracks << " (pt/eta/phi/p) :" << pTrack->pt() << "/"
411  << pTrack->eta() << "/" << pTrack->phi() << "/" << t_p;
412  edm::LogVerbatim("IsoTrack") << "e_MIP " << t_eMipDR << " Chg Isolation " << t_hmaxNearP << " eHcal"
413  << t_eHcal << " ieta " << t_ieta << " Quality " << t_qltyMissFlag << ":"
414  << t_qltyPVFlag << ":" << t_selectTk;
415  for (unsigned int lll = 0; lll < t_DetIds->size(); lll++) {
416  edm::LogVerbatim("IsoTrack")
417  << "det id is = " << t_DetIds->at(lll) << " hit enery is = " << t_HitEnergies->at(lll);
418  }
419  }
420  tree->Fill();
421  } // end of conditions on t_eMipDR and t_hmaxNearP
422  } // end of loose check of track quality
423  } // end of loop over tracks
424 
425  h_nTrk->Fill(nTracks);
426  } // end of triggerOK
427 }
428 
430  h_nVtx = fs_->make<TH1F>("h_nVtx", "h_nVtx", 100, 0, 100);
431  h_nTrk = fs_->make<TH1F>("h_nTrk", "h_nTrk", 100, 0, 2000);
432 
433  tree = fs_->make<TTree>("CalibTree", "CalibTree");
434 
435  tree->Branch("t_Run", &t_Run, "t_Run/I");
436  tree->Branch("t_Event", &t_Event, "t_Event/I");
437  tree->Branch("t_nVtx", &t_nVtx, "t_nVtx/I");
438  tree->Branch("t_nTrk", &t_nTrk, "t_nTrk/I");
439  tree->Branch("t_EventWeight", &t_EventWeight, "t_EventWeight/D");
440  tree->Branch("t_p", &t_p, "t_p/D");
441  tree->Branch("t_pt", &t_pt, "t_pt/D");
442  tree->Branch("t_ieta", &t_ieta, "t_ieta/I");
443  tree->Branch("t_phi", &t_phi, "t_phi/D");
444  tree->Branch("t_eMipDR", &t_eMipDR, "t_eMipDR/D");
445  tree->Branch("t_eHcal", &t_eHcal, "t_eHcal/D");
446  tree->Branch("t_eHcal10", &t_eHcal10, "t_eHcal10/D");
447  tree->Branch("t_eHcal30", &t_eHcal30, "t_eHcal30/D");
448  tree->Branch("t_hmaxNearP", &t_hmaxNearP, "t_hmaxNearP/D");
449  tree->Branch("t_selectTk", &t_selectTk, "t_selectTk/O");
450  tree->Branch("t_qltyMissFlag", &t_qltyMissFlag, "t_qltyMissFlag/O");
451  tree->Branch("t_qltyPVFlag", &t_qltyPVFlag, "t_qltyPVFlag/O)");
452 
453  t_DetIds = new std::vector<unsigned int>();
454  t_DetIds1 = new std::vector<unsigned int>();
455  t_DetIds3 = new std::vector<unsigned int>();
456  t_HitEnergies = new std::vector<double>();
457  t_HitEnergies1 = new std::vector<double>();
458  t_HitEnergies3 = new std::vector<double>();
459 
460  tree->Branch("t_DetIds", "std::vector<unsigned int>", &t_DetIds);
461  //tree->Branch("t_DetIds1", "std::vector<unsigned int>", &t_DetIds1);
462  //tree->Branch("t_DetIds3", "std::vector<unsigned int>", &t_DetIds3);
463  tree->Branch("t_HitEnergies", "std::vector<double>", &t_HitEnergies);
464  //tree->Branch("t_HitEnergies1", "std::vector<double>", &t_HitEnergies1);
465  //tree->Branch("t_HitEnergies3", "std::vector<double>", &t_HitEnergies3);
466 }
467 
468 // ------------ method called when starting to processes a run ------------
469 void IsoTrackCalibration::beginRun(edm::Run const &iRun, edm::EventSetup const &iSetup) {
470  bool changed_(true);
471  bool flag = hltConfig_.init(iRun, iSetup, "HLT", changed_);
472  edm::LogInfo("HcalIsoTrack") << "Run[" << nRun_ << "] " << iRun.run() << " process HLT init flag " << flag
473  << " change flag " << changed_;
474 
475  // check if trigger names in (new) config
476  if (changed_) {
477  edm::LogInfo("HcalIsoTrack") << "New trigger menu found !!!";
478  const unsigned int n(hltConfig_.size());
479  for (unsigned itrig = 0; itrig < trigNames_.size(); itrig++) {
480  unsigned int triggerindx = hltConfig_.triggerIndex(trigNames_[itrig]);
481  if (triggerindx >= n) {
482  edm::LogWarning("HcalIsoTrack") << trigNames_[itrig] << " " << triggerindx << " does not exist in "
483  << "the current menu";
484  } else {
485  edm::LogInfo("HcalIsoTrack") << trigNames_[itrig] << " " << triggerindx << " exists";
486  }
487  }
488  }
489 }
490 
491 // ------------ method called when ending the processing of a run ------------
493  ++nRun_;
494  edm::LogWarning("HcalIsoTrack") << "endRun[" << nRun_ << "] " << iRun.run();
495 }
496 
497 // ------------ method called when starting to processes a luminosity block ------------
499 // ------------ method called when ending the processing of a luminosity block ------------
501 // ------------ method fills 'descriptions' with the allowed parameters for the module ------------
503  //The following says we do not know what parameters are allowed so do no validation
504  // Please change this to state exactly what you do use, even if it is no parameters
506  desc.setUnknown();
507  descriptions.addDefault(desc);
508 }
509 
510 //define this as a plug-in
std::vector< double > * t_HitEnergies3
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
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_
T const & getData(const ESGetToken< T, R > &iToken) const noexcept(false)
Definition: EventSetup.h:119
The single EDProduct to be saved for each event (AOD case)
Definition: TriggerEvent.h:26
edm::EDGetTokenT< reco::TrackCollection > tok_genTrack_
const Point & position() const
position
Definition: BeamSpot.h:59
edm::ESGetToken< CaloGeometry, CaloGeometryRecord > tok_geom_
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
TrackQuality
track quality
Definition: TrackBase.h:150
edm::ESGetToken< MagneticField, IdealMagneticFieldRecord > tok_magField_
void beginRun(edm::Run const &, edm::EventSetup const &) override
double p() const
momentum vector magnitude
Definition: TrackBase.h:631
edm::EDGetTokenT< trigger::TriggerEvent > tok_trigEvt_
double chargeIsolationCone(unsigned int trkIndex, std::vector< spr::propagatedTrackDirection > &trkDirs, double dR, int &nNearTRKs, bool debug=false)
std::string const & label() const
Definition: InputTag.h:36
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_
edm::EDGetTokenT< EcalRecHitCollection > tok_EE_
T getUntrackedParameter(std::string const &, T const &) const
double pt() const
track transverse momentum
Definition: TrackBase.h:637
int iEvent
Definition: GenABIO.cc:224
RunNumber_t run() const
Definition: RunBase.h:40
void addDefault(ParameterSetDescription const &psetDescription)
std::vector< std::string > HLTNames_
edm::EDGetTokenT< GenEventInfoProduct > tok_ew_
unsigned int size() const
number of trigger paths in trigger table
bool goodTrack(const reco::Track *pTrack, math::XYZPoint leadPV, trackSelectionParameters parameters, bool debug=false)
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
double phi() const
azimuthal angle of momentum vector
Definition: TrackBase.h:649
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)
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
unsigned int triggerIndex(const std::string &triggerName) const
slot position of trigger path in trigger table (0 to size-1)
static std::string const triggerResults
Definition: EdmProvDump.cc:47
IsoTrackCalibration(const edm::ParameterSet &)
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_
double eta() const
pseudorapidity of momentum vector
Definition: TrackBase.h:652
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_
bool isValid() const
Definition: HandleBase.h:70
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
T * make(const Args &...args) const
make new ROOT object
Definition: TFileService.h:64
Definition: tree.py:1
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_