CMS 3D CMS Logo

IsoTrackCalib.cc
Go to the documentation of this file.
1 // system include files
2 #include <memory>
3 
4 // Root objects
5 #include "TROOT.h"
6 #include "TSystem.h"
7 #include "TFile.h"
8 #include "TProfile.h"
9 #include "TDirectory.h"
10 #include "TTree.h"
11 #include "TLorentzVector.h"
12 #include "TInterpreter.h"
13 
19 
20 //L1 trigger Menus etc
26 
30 
31 //Tracks
36 // Vertices
40 // Jets
44 
45 //Triggers
52 
62 
65 
74 
77 
79 
80 class IsoTrackCalib : public edm::one::EDAnalyzer<edm::one::WatchRuns, edm::one::SharedResources> {
81 public:
82  explicit IsoTrackCalib(const edm::ParameterSet&);
83  ~IsoTrackCalib() override;
84 
85  static void fillDescriptions(edm::ConfigurationDescriptions& descriptions);
86 
87 private:
88  void beginJob() override;
89  void analyze(const edm::Event&, const edm::EventSetup&) override;
90  void endJob() override {}
91  void beginRun(edm::Run const&, edm::EventSetup const&) override;
92  void endRun(edm::Run const&, edm::EventSetup const&) override;
93 
97  double deltaR(double eta1, double eta2, double phi1, double phi2);
98 
103  const int verbosity_;
104  const std::vector<std::string> l1Names_;
107  const double a_coneR_, a_charIsoR_, a_mipR_;
108  std::vector<bool>* t_l1bits;
109 
122 
125 
126  TTree* tree;
131 
133  std::vector<unsigned int>* t_DetIds;
134  std::vector<double>*t_HitEnergies, pbin;
136  TH1I *h_iEta, *h_tkEta0[5], *h_tkEta1[5], *h_tkEta2[5];
137  TH1I *h_tkEta3[5], *h_tkEta4[5], *h_tkEta5[5];
139  TH1F* h_jetpt[4];
140  TH1I *h_tketa0[6], *h_tketa1[6], *h_tketa2[6];
141  TH1I *h_tketa3[6], *h_tketa4[6], *h_tketa5[6];
142  std::map<std::pair<unsigned int, std::string>, int> l1AlgoMap_;
143 };
144 
145 static const bool useL1GtTriggerMenuLite(true);
147  : m_l1GtUtils(iConfig, consumesCollector(), useL1GtTriggerMenuLite, *this, L1GtUtils::UseEventSetupIn::Event),
148  verbosity_(iConfig.getUntrackedParameter<int>("Verbosity", 0)),
149  l1Names_(iConfig.getUntrackedParameter<std::vector<std::string> >("L1Seed")),
150  theTrackQuality_(iConfig.getUntrackedParameter<std::string>("TrackQuality", "highPurity")),
151  a_coneR_(iConfig.getUntrackedParameter<double>("ConeRadius", 34.98)),
152  a_charIsoR_(a_coneR_ + 28.9),
153  a_mipR_(iConfig.getUntrackedParameter<double>("ConeRadiusMIP", 14.0)),
154  tok_genTrack_(consumes<reco::TrackCollection>(edm::InputTag("generalTracks"))),
155  tok_recVtx_(consumes<reco::VertexCollection>(edm::InputTag("offlinePrimaryVertices"))),
156  tok_bs_(consumes<reco::BeamSpot>(edm::InputTag("offlineBeamSpot"))),
157  tok_ew_(consumes<GenEventInfoProduct>(edm::InputTag("generatorSmeared"))),
158  tok_jets_(consumes<reco::GenJetCollection>(iConfig.getParameter<edm::InputTag>("JetSource"))),
159  tok_pfjets_(consumes<reco::PFJetCollection>(edm::InputTag("ak5PFJets"))) {
160  usesResource(TFileService::kSharedResource);
161 
162  //now do whatever initialization is needed
164  selectionParameters_.minPt = iConfig.getUntrackedParameter<double>("MinTrackPt", 10.0);
165  selectionParameters_.minQuality = trackQuality_;
166  selectionParameters_.maxDxyPV = iConfig.getUntrackedParameter<double>("MaxDxyPV", 0.2);
167  selectionParameters_.maxDzPV = iConfig.getUntrackedParameter<double>("MaxDzPV", 5.0);
168  selectionParameters_.maxChi2 = iConfig.getUntrackedParameter<double>("MaxChi2", 5.0);
169  selectionParameters_.maxDpOverP = iConfig.getUntrackedParameter<double>("MaxDpOverP", 0.1);
170  selectionParameters_.minOuterHit = iConfig.getUntrackedParameter<int>("MinOuterHit", 4);
171  selectionParameters_.minLayerCrossed = iConfig.getUntrackedParameter<int>("MinLayerCrossed", 8);
172  selectionParameters_.maxInMiss = iConfig.getUntrackedParameter<int>("MaxInMiss", 0);
173  selectionParameters_.maxOutMiss = iConfig.getUntrackedParameter<int>("MaxOutMiss", 0);
174  bool isItAOD = iConfig.getUntrackedParameter<bool>("IsItAOD", false);
175  edm::InputTag L1extraTauJetSource_ = iConfig.getParameter<edm::InputTag>("L1extraTauJetSource");
176  edm::InputTag L1extraCenJetSource_ = iConfig.getParameter<edm::InputTag>("L1extraCenJetSource");
177  edm::InputTag L1extraFwdJetSource_ = iConfig.getParameter<edm::InputTag>("L1extraFwdJetSource");
178 
179  // define tokens for access
180  if (isItAOD) {
181  tok_EB_ = consumes<EcalRecHitCollection>(edm::InputTag("reducedEcalRecHitsEB"));
182  tok_EE_ = consumes<EcalRecHitCollection>(edm::InputTag("reducedEcalRecHitsEE"));
183  tok_hbhe_ = consumes<HBHERecHitCollection>(edm::InputTag("reducedHcalRecHits", "hbhereco"));
184  } else {
185  tok_EB_ = consumes<EcalRecHitCollection>(edm::InputTag("ecalRecHit", "EcalRecHitsEB"));
186  tok_EE_ = consumes<EcalRecHitCollection>(edm::InputTag("ecalRecHit", "EcalRecHitsEE"));
187  tok_hbhe_ = consumes<HBHERecHitCollection>(edm::InputTag("hbhereco"));
188  }
189  tok_L1extTauJet_ = consumes<l1extra::L1JetParticleCollection>(L1extraTauJetSource_);
190  tok_L1extCenJet_ = consumes<l1extra::L1JetParticleCollection>(L1extraCenJetSource_);
191  tok_L1extFwdJet_ = consumes<l1extra::L1JetParticleCollection>(L1extraFwdJetSource_);
192  if (verbosity_ >= 0) {
193  edm::LogVerbatim("IsoTrack") << "Parameters read from config file \n"
194  << "\t minPt " << selectionParameters_.minPt << "\t theTrackQuality "
195  << theTrackQuality_ << "\t minQuality " << selectionParameters_.minQuality
196  << "\t maxDxyPV " << selectionParameters_.maxDxyPV << "\t maxDzPV "
198  << "\t maxDpOverP " << selectionParameters_.maxDpOverP << "\t minOuterHit "
199  << selectionParameters_.minOuterHit << "\t minLayerCrossed "
200  << selectionParameters_.minLayerCrossed << "\t maxInMiss "
201  << selectionParameters_.maxInMiss << "\t maxOutMiss "
202  << selectionParameters_.maxOutMiss << "\t a_coneR " << a_coneR_ << "\t a_charIsoR "
203  << a_charIsoR_ << "\t a_mipR " << a_mipR_ << "\t isItAOD " << isItAOD;
204  edm::LogVerbatim("IsoTrack") << l1Names_.size() << " triggers to be studied";
205  for (unsigned int k = 0; k < l1Names_.size(); ++k)
206  edm::LogVerbatim("IsoTrack") << "[" << k << "]: " << l1Names_[k];
207  }
208 
209  tok_geom_ = esConsumes<CaloGeometry, CaloGeometryRecord>();
210  tok_magField_ = esConsumes<MagneticField, IdealMagneticFieldRecord>();
211 }
212 
214  // do anything here that needs to be done at desctruction time
215  // (e.g. close files, deallocate resources etc.)
216 }
217 
218 // ------------ method fills 'descriptions' with the allowed parameters for the module ------------
220  std::vector<std::string> seeds = {
221  "L1_SingleJet36", "L1_SingleJet52", "L1_SingleJet68", "L1_SingleJet92", "L1_SingleJet128"};
223  desc.addUntracked<int>("Verbosity", 0);
224  desc.addUntracked<std::vector<std::string> >("L1Seed", seeds);
225  desc.addUntracked<std::string>("TrackQuality", "highPurity");
226  desc.addUntracked<double>("MinTrackPt", 10.0);
227  desc.addUntracked<double>("MaxDxyPV", 0.02);
228  desc.addUntracked<double>("MaxDzPV", 0.02);
229  desc.addUntracked<double>("MaxChi2", 5.0);
230  desc.addUntracked<double>("MaxDpOverP", 0.1);
231  desc.addUntracked<int>("MinOuterHit", 4);
232  desc.addUntracked<int>("MinLayerCrossed", 8);
233  desc.addUntracked<int>("MaxInMiss", 0);
234  desc.addUntracked<int>("MaxOutMiss", 0);
235  desc.addUntracked<double>("ConeRadius", 34.98);
236  desc.addUntracked<double>("ConeRadiusMIP", 14.0);
237  desc.addUntracked<bool>("IsItAOD", false);
238  descriptions.add("isoTrackCalib", desc);
239 }
240 
242  t_Run = iEvent.id().run();
243  t_Event = iEvent.id().event();
244  if (verbosity_ % 10 > 0)
245  edm::LogVerbatim("IsoTrack") << "Run " << t_Run << " Event " << t_Event << " Luminosity "
246  << iEvent.luminosityBlock() << " Bunch " << iEvent.bunchCrossing()
247  << " starts ==========";
248 
249  //Get magnetic field and geometry
250  const CaloGeometry* geo = &iSetup.getData(tok_geom_);
251  const MagneticField* bField = &iSetup.getData(tok_magField_);
252 
253  //Get track collection
255  iEvent.getByToken(tok_genTrack_, trkCollection);
256 
257  //event weight for FLAT sample
258  t_EventWeight = 1.0;
260  iEvent.getByToken(tok_ew_, genEventInfo);
261  if (genEventInfo.isValid())
262  t_EventWeight = genEventInfo->weight();
263 
264  // genJet information
266  iEvent.getByToken(tok_jets_, genJets);
267  if (genJets.isValid()) {
268  for (unsigned iGenJet = 0; iGenJet < genJets->size(); ++iGenJet) {
269  const reco::GenJet& genJet = (*genJets)[iGenJet];
270  double genJetPt = genJet.pt();
271  double genJetEta = genJet.eta();
272  h_jetpt[0]->Fill(genJetPt);
273  h_jetpt[1]->Fill(genJetPt, t_EventWeight);
274  if (genJetEta > -2.5 && genJetEta < 2.5) {
275  h_jetpt[2]->Fill(genJetPt);
276  h_jetpt[3]->Fill(genJetPt, t_EventWeight);
277  }
278  break;
279  }
280  }
281 
282  //pf jets
284  iEvent.getByToken(tok_pfjets_, pfJets);
285 
286  //Define the best vertex and the beamspot
288  iEvent.getByToken(tok_recVtx_, recVtxs);
289  edm::Handle<reco::BeamSpot> beamSpotH;
290  iEvent.getByToken(tok_bs_, beamSpotH);
291  math::XYZPoint leadPV(0, 0, 0);
292  if (!recVtxs->empty() && !((*recVtxs)[0].isFake())) {
293  leadPV = math::XYZPoint((*recVtxs)[0].x(), (*recVtxs)[0].y(), (*recVtxs)[0].z());
294  } else if (beamSpotH.isValid()) {
295  leadPV = beamSpotH->position();
296  }
297  if (verbosity_ > 10) {
298  if ((verbosity_ % 100) / 10 > 2)
299  edm::LogVerbatim("IsoTrack") << "Primary Vertex " << leadPV;
300  if (beamSpotH.isValid())
301  edm::LogVerbatim("IsoTrack") << " Beam Spot " << beamSpotH->position();
302  }
303 
304  // RecHits
305  edm::Handle<EcalRecHitCollection> barrelRecHitsHandle;
306  edm::Handle<EcalRecHitCollection> endcapRecHitsHandle;
307  iEvent.getByToken(tok_EB_, barrelRecHitsHandle);
308  iEvent.getByToken(tok_EE_, endcapRecHitsHandle);
310  iEvent.getByToken(tok_hbhe_, hbhe);
312 
313  for (rhitItr = hbhe->begin(); rhitItr != hbhe->end(); rhitItr++) {
314  double rec_energy = rhitItr->energy();
315  int rec_ieta = rhitItr->id().ieta();
316  int rec_depth = rhitItr->id().depth();
317  int rec_zside = rhitItr->id().zside();
318  double num1_1 = rec_zside * (rec_ieta + 0.2 * (rec_depth - 1));
319  if (verbosity_ % 10 > 0)
320  edm::LogVerbatim("IsoTrack") << "detid/rechit/ieta/zside/depth/num "
321  << " = " << rhitItr->id() << "/" << rec_energy << "/" << rec_ieta << "/" << rec_zside
322  << "/" << rec_depth << "/" << num1_1;
323  h_iEta->Fill(rec_ieta);
324  h_Rechit_E->Fill(rec_energy);
325  h_RecHit_iEta->Fill(rec_ieta, rec_energy);
326  h_RecHit_num->Fill(num1_1, rec_energy);
327  }
328 
329  //Propagate tracks to calorimeter surface)
330  std::vector<spr::propagatedTrackDirection> trkCaloDirections;
331  spr::propagateCALO(trkCollection, geo, bField, theTrackQuality_, trkCaloDirections, ((verbosity_ / 100) % 10 > 2));
332  std::vector<spr::propagatedTrackDirection>::const_iterator trkDetItr;
333  for (trkDetItr = trkCaloDirections.begin(); trkDetItr != trkCaloDirections.end(); trkDetItr++) {
334  if (trkDetItr->okHCAL) {
335  HcalDetId detId = (HcalDetId)(trkDetItr->detIdHCAL);
336  int tk_ieta = detId.ieta();
337  const reco::Track* pTrack = &(*(trkDetItr->trkItr));
338  double tk_p = pTrack->p();
339  h_tketa0[0]->Fill(tk_ieta);
340  for (unsigned int k = 1; k < pbin.size(); ++k) {
341  if (tk_p >= pbin[k - 1] && tk_p < pbin[k]) {
342  h_tketa0[k]->Fill(tk_ieta);
343  break;
344  }
345  }
346  }
347  }
349  t_l1bits->clear();
350  for (unsigned int i = 0; i < l1Names_.size(); ++i)
351  t_l1bits->push_back(false);
352  bool useL1EventSetup = true;
353  bool useL1GtTriggerMenuLite = true;
354 
356  int iErrorCode = -1;
357  int l1ConfCode = -1;
358  const bool l1Conf = m_l1GtUtils.availableL1Configuration(iErrorCode, l1ConfCode);
359  if (!l1Conf) {
360  edm::LogVerbatim("IsoTrack") << "\nL1 configuration code:" << l1ConfCode
361  << "\nNo valid L1 trigger configuration available."
362  << "\nSee text above for error code interpretation"
363  << "\nNo return here, in order to test each method"
364  << ", protected against configuration error.";
365  }
366 
367  const AlgorithmMap& algorithmMap = m_l1GtMenu->gtAlgorithmMap();
368  const std::string& menuName = m_l1GtMenu->gtTriggerMenuName();
369  if (verbosity_ % 10 > 0)
370  edm::LogVerbatim("IsoTrack") << "menuName " << menuName << std::endl;
371 
372  std::vector<int> algbits;
373  for (CItAlgo itAlgo = algorithmMap.begin(); itAlgo != algorithmMap.end(); itAlgo++) {
374  std::string algName = itAlgo->first;
375  int algBitNumber = (itAlgo->second).algoBitNumber();
376  bool decision = m_l1GtUtils.decision(iEvent, itAlgo->first, iErrorCode);
377 
378  bool l1ok(false);
379  if (verbosity_ % 10 > 0)
380  edm::LogVerbatim("IsoTrack") << algName << " " << algBitNumber << " " << decision;
381  for (unsigned int i = 0; i < l1Names_.size(); ++i) {
382  if (algName.find(l1Names_[i]) != std::string::npos) {
383  if (verbosity_ % 10 > 0)
384  edm::LogVerbatim("IsoTrack") << "match found"
385  << " " << algName << " " << decision;
386  t_l1bits->at(i) = (decision > 0);
387  if (decision > 0)
388  l1ok = true;
389  }
390  }
391  if (verbosity_ % 10 > 0)
392  edm::LogVerbatim("IsoTrack") << "l1 ok =" << l1ok;
393 
394  if (l1ok) {
396  iEvent.getByToken(tok_L1extTauJet_, l1TauHandle);
397  l1extra::L1JetParticleCollection::const_iterator itr;
398  double ptTriggered = -10;
399  double etaTriggered = -100;
400  double phiTriggered = -100;
401 
402  for (itr = l1TauHandle->begin(); itr != l1TauHandle->end(); ++itr) {
403  if (itr->pt() > ptTriggered) {
404  ptTriggered = itr->pt();
405  etaTriggered = itr->eta();
406  phiTriggered = itr->phi();
407  }
408  if (verbosity_ % 10 > 0)
409  edm::LogVerbatim("IsoTrack") << "tauJ pt " << itr->pt() << " eta/phi " << itr->eta() << " " << itr->phi();
410  }
412  iEvent.getByToken(tok_L1extCenJet_, l1CenJetHandle);
413  for (itr = l1CenJetHandle->begin(); itr != l1CenJetHandle->end(); ++itr) {
414  if (itr->pt() > ptTriggered) {
415  ptTriggered = itr->pt();
416  etaTriggered = itr->eta();
417  phiTriggered = itr->phi();
418  }
419  if (verbosity_ % 10 > 0)
420  edm::LogVerbatim("IsoTrack") << "cenJ pt " << itr->pt() << " eta/phi " << itr->eta() << " "
421  << itr->phi();
422  }
424  iEvent.getByToken(tok_L1extFwdJet_, l1FwdJetHandle);
425  for (itr = l1FwdJetHandle->begin(); itr != l1FwdJetHandle->end(); ++itr) {
426  if (itr->pt() > ptTriggered) {
427  ptTriggered = itr->pt();
428  etaTriggered = itr->eta();
429  phiTriggered = itr->phi();
430  }
431  if (verbosity_ % 10 > 0)
432  edm::LogVerbatim("IsoTrack") << "forJ pt " << itr->pt() << " eta/phi " << itr->eta() << " " << itr->phi();
433  }
434  if (verbosity_ % 10 > 0)
435  edm::LogVerbatim("IsoTrack") << "jets pt/eta/phi = " << ptTriggered << "/" << etaTriggered << "/"
436  << phiTriggered;
438  unsigned int nTracks(0), nselTracks(0);
439  for (trkDetItr = trkCaloDirections.begin(), nTracks = 0; trkDetItr != trkCaloDirections.end();
440  trkDetItr++, nTracks++) {
441  const reco::Track* pTrack = &(*(trkDetItr->trkItr));
442  math::XYZTLorentzVector v4(pTrack->px(), pTrack->py(), pTrack->pz(), pTrack->p());
443 
444  t_mindR1 = deltaR(etaTriggered, v4.eta(), phiTriggered, v4.phi());
445  t_mindR2 = -999;
446  if (verbosity_ % 10 > 0)
447  edm::LogVerbatim("IsoTrack") << "This track : " << nTracks << " (pt/eta/phi/p) :" << pTrack->pt() << "/"
448  << pTrack->eta() << "/" << pTrack->phi() << "/" << pTrack->p();
449 
450  if (verbosity_ % 10 > 0)
451  edm::LogVerbatim("IsoTrack") << "dr values are = " << t_mindR1;
452 
453  t_l1pt = ptTriggered;
454  t_l1eta = etaTriggered;
455  t_l1phi = phiTriggered;
456  t_l3pt = -999;
457  t_l3eta = -999;
458  t_l3phi = -999;
459 
460  //Selection of good track
461  t_selectTk = spr::goodTrack(pTrack, leadPV, selectionParameters_, ((verbosity_ / 100) % 10 > 2));
463  oneCutParameters.maxDxyPV = 10;
464  oneCutParameters.maxDzPV = 100;
465  oneCutParameters.maxInMiss = 2;
466  oneCutParameters.maxOutMiss = 2;
467  bool qltyFlag = spr::goodTrack(pTrack, leadPV, oneCutParameters, ((verbosity_ / 100) % 10 > 2));
468  oneCutParameters = selectionParameters_;
469  oneCutParameters.maxDxyPV = 10;
470  oneCutParameters.maxDzPV = 100;
471  t_qltyMissFlag = spr::goodTrack(pTrack, leadPV, oneCutParameters, ((verbosity_ / 100) % 10 > 2));
472  oneCutParameters = selectionParameters_;
473  oneCutParameters.maxInMiss = 2;
474  oneCutParameters.maxOutMiss = 2;
475  t_qltyPVFlag = spr::goodTrack(pTrack, leadPV, oneCutParameters, ((verbosity_ / 100) % 10 > 2));
476  t_ieta = 0;
477  if (trkDetItr->okHCAL) {
478  HcalDetId detId = (HcalDetId)(trkDetItr->detIdHCAL);
479  t_ieta = detId.ieta();
480  }
481  if (verbosity_ % 10 > 0)
482  edm::LogVerbatim("IsoTrack") << "qltyFlag|okECAL|okHCAL : " << qltyFlag << "|" << trkDetItr->okECAL << "/"
483  << trkDetItr->okHCAL;
484  t_qltyFlag = (qltyFlag && trkDetItr->okECAL && trkDetItr->okHCAL);
485  t_p = pTrack->p();
486  h_tketa1[0]->Fill(t_ieta);
487  for (unsigned int k = 1; k < pbin.size(); ++k) {
488  if (t_p >= pbin[k - 1] && t_p < pbin[k]) {
489  h_tketa1[k]->Fill(t_ieta);
490  break;
491  }
492  }
493  if (t_qltyFlag) {
494  nselTracks++;
495  h_tketa2[0]->Fill(t_ieta);
496  for (unsigned int k = 1; k < pbin.size(); ++k) {
497  if (t_p >= pbin[k - 1] && t_p < pbin[k]) {
498  h_tketa2[k]->Fill(t_ieta);
499  break;
500  }
501  }
502  int nRH_eMipDR(0), nNearTRKs(0), nRecHits(-999);
504  barrelRecHitsHandle,
505  endcapRecHitsHandle,
506  trkDetItr->pointHCAL,
507  trkDetItr->pointECAL,
508  a_mipR_,
509  trkDetItr->directionECAL,
510  nRH_eMipDR);
511  t_DetIds->clear();
512  t_HitEnergies->clear();
513  std::vector<DetId> ids;
514  t_eHcal = spr::eCone_hcal(geo,
515  hbhe,
516  trkDetItr->pointHCAL,
517  trkDetItr->pointECAL,
518  a_coneR_,
519  trkDetItr->directionHCAL,
520  nRecHits,
521  ids,
522  *t_HitEnergies);
523  for (unsigned int k = 0; k < ids.size(); ++k) {
524  t_DetIds->push_back(ids[k].rawId());
525  }
527  nTracks, trkCaloDirections, a_charIsoR_, nNearTRKs, ((verbosity_ / 100) % 10 > 2));
528  if (t_hmaxNearP < 2) {
529  h_tketa3[0]->Fill(t_ieta);
530  for (unsigned int k = 1; k < pbin.size(); ++k) {
531  if (t_p >= pbin[k - 1] && t_p < pbin[k]) {
532  h_tketa3[k]->Fill(t_ieta);
533  break;
534  }
535  }
536  if (t_eMipDR < 1) {
537  h_tketa4[0]->Fill(t_ieta);
538  for (unsigned int k = 1; k < pbin.size(); ++k) {
539  if (t_p >= pbin[k - 1] && t_p < pbin[k]) {
540  h_tketa4[k]->Fill(t_ieta);
541  break;
542  }
543  }
544  if (t_mindR1 > 1) {
545  h_tketa5[0]->Fill(t_ieta);
546  for (unsigned int k = 1; k < pbin.size(); ++k) {
547  if (t_p >= pbin[k - 1] && t_p < pbin[k]) {
548  h_tketa5[k]->Fill(t_ieta);
549  break;
550  }
551  }
552  }
553  }
554  }
555  if (verbosity_ % 10 > 0) {
556  edm::LogVerbatim("IsoTrack") << "This track : " << nTracks << " (pt/eta/phi/p) :" << pTrack->pt() << "/"
557  << pTrack->eta() << "/" << pTrack->phi() << "/" << t_p;
558  edm::LogVerbatim("IsoTrack") << "e_MIP " << t_eMipDR << " Chg Isolation " << t_hmaxNearP << " eHcal"
559  << t_eHcal << " ieta " << t_ieta << " Quality " << t_qltyMissFlag << ":"
560  << t_qltyPVFlag << ":" << t_selectTk;
561  for (unsigned int lll = 0; lll < t_DetIds->size(); lll++) {
562  edm::LogVerbatim("IsoTrack") << "det id is = " << t_DetIds->at(lll) << " "
563  << " hit enery is = " << t_HitEnergies->at(lll);
564  }
565  }
566  if (t_p > 20.0 && t_eMipDR < 2.0 && t_hmaxNearP < 10.0) {
567  tree->Fill();
568  }
569  }
570  }
571  }
572  }
573 }
574 
576  h_RecHit_iEta = fs_->make<TProfile>("rechit_ieta", "Rec hit vs. ieta", 60, -30, 30, 0, 1000);
577  h_RecHit_num = fs_->make<TProfile>("rechit_num", "Rec hit vs. num", 100, 0, 20, 0, 1000);
578  h_iEta = fs_->make<TH1I>("iEta", "iEta", 60, -30, 30);
579  h_Rechit_E = fs_->make<TH1F>("Rechit_E", "Rechit_E", 100, 0, 1000);
580 
581  double prange[5] = {20, 30, 40, 60, 100};
582  for (int k = 0; k < 5; ++k)
583  pbin.push_back(prange[k]);
584  std::string type[6] = {"All", "Trigger OK", "Tree Selected", "Charge Isolation", "MIP Cut", "L1 Cut"};
585  for (unsigned int k = 0; k < pbin.size(); ++k) {
586  char name[20], namp[20], title[100];
587  if (k == 0)
588  sprintf(namp, "all momentum");
589  else
590  sprintf(namp, "p = %4.0f:%4.0f GeV", pbin[k - 1], pbin[k]);
591  sprintf(name, "TrackEta0%d", k);
592  sprintf(title, "Track #eta for tracks with %s (%s)", namp, type[0].c_str());
593  h_tketa0[k] = fs_->make<TH1I>(name, title, 60, -30, 30);
594  sprintf(name, "TrackEta1%d", k);
595  sprintf(title, "Track #eta for tracks with %s (%s)", namp, type[1].c_str());
596  h_tketa1[k] = fs_->make<TH1I>(name, title, 60, -30, 30);
597  sprintf(name, "TrackEta2%d", k);
598  sprintf(title, "Track #eta for tracks with %s (%s)", namp, type[2].c_str());
599  h_tketa2[k] = fs_->make<TH1I>(name, title, 60, -30, 30);
600  sprintf(name, "TrackEta3%d", k);
601  sprintf(title, "Track #eta for tracks with %s (%s)", namp, type[3].c_str());
602  h_tketa3[k] = fs_->make<TH1I>(name, title, 60, -30, 30);
603  sprintf(name, "TrackEta4%d", k);
604  sprintf(title, "Track #eta for tracks with %s (%s)", namp, type[4].c_str());
605  h_tketa4[k] = fs_->make<TH1I>(name, title, 60, -30, 30);
606  sprintf(name, "TrackEta5%d", k);
607  sprintf(title, "Track #eta for tracks with %s (%s)", namp, type[5].c_str());
608  h_tketa5[k] = fs_->make<TH1I>(name, title, 60, -30, 30);
609  }
610  h_jetpt[0] = fs_->make<TH1F>("Jetpt0", "Jet p_T (All)", 500, 0., 2500.);
611  h_jetpt[1] = fs_->make<TH1F>("Jetpt1", "Jet p_T (All Weighted)", 500, 0., 2500.);
612  h_jetpt[2] = fs_->make<TH1F>("Jetpt2", "Jet p_T (|#eta| < 2.5)", 500, 0., 2500.);
613  h_jetpt[3] = fs_->make<TH1F>("Jetpt3", "Jet p_T (|#eta| < 2.5 Weighted)", 500, 0., 2500.);
614 
615  tree = fs_->make<TTree>("CalibTree", "CalibTree");
616 
617  tree->Branch("t_Run", &t_Run, "t_Run/I");
618  tree->Branch("t_Event", &t_Event, "t_Event/I");
619  tree->Branch("t_ieta", &t_ieta, "t_ieta/I");
620  tree->Branch("t_EventWeight", &t_EventWeight, "t_EventWeight/D");
621  tree->Branch("t_l1pt", &t_l1pt, "t_l1pt/D");
622  tree->Branch("t_l1eta", &t_l1eta, "t_l1eta/D");
623  tree->Branch("t_l1phi", &t_l1phi, "t_l1phi/D");
624  tree->Branch("t_l3pt", &t_l3pt, "t_l3pt/D");
625  tree->Branch("t_l3eta", &t_l3eta, "t_l3eta/D");
626  tree->Branch("t_l3phi", &t_l3phi, "t_l3phi/D");
627  tree->Branch("t_p", &t_p, "t_p/D");
628  tree->Branch("t_mindR1", &t_mindR1, "t_mindR1/D");
629  tree->Branch("t_mindR2", &t_mindR2, "t_mindR2/D");
630  tree->Branch("t_eMipDR", &t_eMipDR, "t_eMipDR/D");
631  tree->Branch("t_eHcal", &t_eHcal, "t_eHcal/D");
632  tree->Branch("t_hmaxNearP", &t_hmaxNearP, "t_hmaxNearP/D");
633  tree->Branch("t_selectTk", &t_selectTk, "t_selectTk/O");
634  tree->Branch("t_qltyFlag", &t_qltyFlag, "t_qltyFlag/O");
635  tree->Branch("t_qltyMissFlag", &t_qltyMissFlag, "t_qltyMissFlag/O");
636  tree->Branch("t_qltyPVFlag", &t_qltyPVFlag, "t_qltyPVFlag/O)");
637 
638  t_DetIds = new std::vector<unsigned int>();
639  t_HitEnergies = new std::vector<double>();
640  t_l1bits = new std::vector<bool>();
641  tree->Branch("t_DetIds", "std::vector<unsigned int>", &t_DetIds);
642  tree->Branch("t_HitEnergies", "std::vector<double>", &t_HitEnergies);
643  tree->Branch("t_l1bits", "std::vector<bool>", &t_l1bits);
644 }
645 
646 // ------------ method called when starting to processes a run ------------
647 void IsoTrackCalib::beginRun(edm::Run const& iRun, edm::EventSetup const& iSetup) {
648  bool changed = false;
649  bool ok = hltConfig_.init(iRun, iSetup, "HLT", changed);
650  edm::LogVerbatim("IsoTrack") << "Run " << iRun.run() << " hltconfig.init " << ok;
651 
652  int iErrorCode = -1;
654  const AlgorithmMap& algorithmMap = m_l1GtMenu->gtAlgorithmMap();
655  const std::string& menuName = m_l1GtMenu->gtTriggerMenuName();
656 
657  if (verbosity_ % 10 > 0)
658  edm::LogVerbatim("IsoTrack") << "menuName " << menuName;
659  for (CItAlgo itAlgo = algorithmMap.begin(); itAlgo != algorithmMap.end(); itAlgo++) {
660  std::string algName = itAlgo->first;
661  int algBitNumber = (itAlgo->second).algoBitNumber();
662  l1AlgoMap_.insert(std::pair<std::pair<unsigned int, std::string>, int>(
663  std::pair<unsigned int, std::string>(algBitNumber, algName), 0));
664  }
665  std::map<std::pair<unsigned int, std::string>, int>::iterator itr;
666  for (itr = l1AlgoMap_.begin(); itr != l1AlgoMap_.end(); itr++) {
667  if (verbosity_ % 10 > 0)
668  edm::LogVerbatim("IsoTrack") << " ********** " << (itr->first).first << " " << (itr->first).second << " "
669  << itr->second;
670  }
671 }
672 
673 // ------------ method called when ending the processing of a run ------------
674 void IsoTrackCalib::endRun(edm::Run const& iRun, edm::EventSetup const&) {
675  edm::LogVerbatim("IsoTrack") << "endRun " << iRun.run() << std::endl;
676 }
677 
679  return (vec1.eta() - vec2.eta());
680 }
681 
683  double phi1 = vec1.phi();
684  if (phi1 < 0)
685  phi1 += 2.0 * M_PI;
686  double phi2 = vec2.phi();
687  if (phi2 < 0)
688  phi2 += 2.0 * M_PI;
689  double dphi = phi1 - phi2;
690  if (dphi > M_PI)
691  dphi -= 2. * M_PI;
692  else if (dphi < -M_PI)
693  dphi += 2. * M_PI;
694  return dphi;
695 }
696 
698  double deta = dEta(vec1, vec2);
699  double dphi = dPhi(vec1, vec2);
700  return std::sqrt(deta * deta + dphi * dphi);
701 }
702 
703 double IsoTrackCalib::deltaR(double eta1, double eta2, double phi1, double phi2) {
704  double deta = eta1 - eta2;
705  if (phi1 < 0)
706  phi1 += 2.0 * M_PI;
707  if (phi2 < 0)
708  phi2 += 2.0 * M_PI;
709  double dphi = phi1 - phi2;
710  if (dphi > M_PI)
711  dphi -= 2. * M_PI;
712  else if (dphi < -M_PI)
713  dphi += 2. * M_PI;
714  return std::sqrt(deta * deta + dphi * dphi);
715 }
716 
717 //define this as a plug-in
spr::trackSelectionParameters::maxDxyPV
double maxDxyPV
Definition: TrackSelection.h:22
IsoTrackCalib::a_charIsoR_
const double a_charIsoR_
Definition: IsoTrackCalib.cc:107
GenEventInfoProduct
Definition: GenEventInfoProduct.h:17
L1GtTriggerMenu.h
GenJetCollection.h
DDAxes::y
L1CaloJetHTTProducer_cfi.genJets
genJets
Definition: L1CaloJetHTTProducer_cfi.py:7
IsoTrackCalib::h_tketa1
TH1I * h_tketa1[6]
Definition: IsoTrackCalib.cc:140
IsoTrackCalib::h_tkEta1
TH1I * h_tkEta1[5]
Definition: IsoTrackCalib.cc:136
L1GtTriggerMenu::gtTriggerMenuName
const std::string & gtTriggerMenuName() const
Definition: L1GtTriggerMenu.h:91
IsoTrackCalib::endJob
void endJob() override
Definition: IsoTrackCalib.cc:90
runGCPTkAlMap.title
string title
Definition: runGCPTkAlMap.py:94
IsoTrackCalib::h_jetpt
TH1F * h_jetpt[4]
Definition: IsoTrackCalib.cc:139
useL1EventSetup
static const bool useL1EventSetup(true)
EDAnalyzer.h
IsoTrackCalib::verbosity_
const int verbosity_
Definition: IsoTrackCalib.cc:103
mps_fire.i
i
Definition: mps_fire.py:428
IsoTrackCalib::h_tkEta5
TH1I * h_tkEta5[5]
Definition: IsoTrackCalib.cc:137
edm::SortedCollection::const_iterator
std::vector< T >::const_iterator const_iterator
Definition: SortedCollection.h:80
reco::GenJet
Jets made from MC generator particles.
Definition: GenJet.h:23
IsoTrackCalib::tok_jets_
const edm::EDGetTokenT< reco::GenJetCollection > tok_jets_
Definition: IsoTrackCalib.cc:117
MessageLogger.h
IsoTrackCalib::t_Event
int t_Event
Definition: IsoTrackCalib.cc:127
align::BeamSpot
Definition: StructureType.h:95
TriggerResults.h
vec1
std::vector< double > vec1
Definition: HCALResponse.h:15
spr::trackSelectionParameters::maxDzPV
double maxDzPV
Definition: TrackSelection.h:22
reco::GenJetCollection
std::vector< GenJet > GenJetCollection
collection of GenJet objects
Definition: GenJetCollection.h:14
spr::trackSelectionParameters::maxChi2
double maxChi2
Definition: TrackSelection.h:22
IsoTrackCalib::beginRun
void beginRun(edm::Run const &, edm::EventSetup const &) override
Definition: IsoTrackCalib.cc:647
IsoTrackCalib::tok_genTrack_
const edm::EDGetTokenT< reco::TrackCollection > tok_genTrack_
Definition: IsoTrackCalib.cc:110
IsoTrackCalib::endRun
void endRun(edm::Run const &, edm::EventSetup const &) override
Definition: IsoTrackCalib.cc:674
IsoTrackCalib::t_qltyPVFlag
bool t_qltyPVFlag
Definition: IsoTrackCalib.cc:132
reco::TrackBase::p
double p() const
momentum vector magnitude
Definition: TrackBase.h:631
IsoTrackCalib::IsoTrackCalib
IsoTrackCalib(const edm::ParameterSet &)
Definition: IsoTrackCalib.cc:146
edm::Run
Definition: Run.h:45
IsoTrackCalib::t_EventWeight
double t_EventWeight
Definition: IsoTrackCalib.cc:128
IsoTrackCalib::h_iEta
TH1I * h_iEta
Definition: IsoTrackCalib.cc:136
TriggerEvent.h
edm::EDGetTokenT< reco::TrackCollection >
IsoTrackCalib::pbin
std::vector< double > pbin
Definition: IsoTrackCalib.cc:134
TrackBase.h
edm
HLT enums.
Definition: AlignableModifier.h:19
IsoTrackCalib::h_tkEta2
TH1I * h_tkEta2[5]
Definition: IsoTrackCalib.cc:136
IsoTrackCalib::h_tkEta4
TH1I * h_tkEta4[5]
Definition: IsoTrackCalib.cc:137
tree
Definition: tree.py:1
L1GtTriggerMenuRcd.h
L1GtUtils::getL1GtRunCache
void getL1GtRunCache(const edm::Run &, const edm::EventSetup &, const bool, const bool)
get all the run-constant quantities for L1 trigger and cache them
Definition: L1GtUtils.cc:314
IsoTrackCalib::t_l1pt
double t_l1pt
Definition: IsoTrackCalib.cc:128
PFJet.h
IsoTrackCalib::t_DetIds
std::vector< unsigned int > * t_DetIds
Definition: IsoTrackCalib.cc:133
IsoTrackCalib::t_l1bits
std::vector< bool > * t_l1bits
Definition: IsoTrackCalib.cc:108
HLT_FULL_cff.InputTag
InputTag
Definition: HLT_FULL_cff.py:89301
edm::ParameterSetDescription
Definition: ParameterSetDescription.h:52
useL1GtTriggerMenuLite
static const bool useL1GtTriggerMenuLite(true)
reco::TrackBase::TrackQuality
TrackQuality
track quality
Definition: TrackBase.h:150
l1t::UseEventSetupIn
UseEventSetupIn
Definition: L1TGlobalUtil.h:42
IsoTrackCalib::fillDescriptions
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
Definition: IsoTrackCalib.cc:219
TriggerFilterObjectWithRefs.h
reco::TrackBase::px
double px() const
x coordinate of momentum vector
Definition: TrackBase.h:640
IsoTrackCalib::t_mindR2
double t_mindR2
Definition: IsoTrackCalib.cc:130
spr::goodTrack
bool goodTrack(const reco::Track *pTrack, math::XYZPoint leadPV, trackSelectionParameters parameters, bool debug=false)
Definition: TrackSelection.cc:10
edm::ParameterSet::getUntrackedParameter
T getUntrackedParameter(std::string const &, T const &) const
DDAxes::x
L1GtUtils::decision
const bool decision(const edm::Event &iEvent, const std::string &nameAlgoTechTrig, int &errorCode) const
Definition: L1GtUtils.cc:1066
reco::LeafCandidate::pt
double pt() const final
transverse momentum
Definition: LeafCandidate.h:146
reco
fixed size matrix
Definition: AlignmentAlgorithmBase.h:46
edm::one::EDAnalyzer
Definition: EDAnalyzer.h:30
vec2
std::vector< vec1 > vec2
Definition: HCALResponse.h:16
BeamSpotPI::nTracks
Definition: BeamSpotPayloadInspectorHelper.h:42
convertSQLiteXML.ok
bool ok
Definition: convertSQLiteXML.py:98
IsoTrackCalib::l1Names_
const std::vector< std::string > l1Names_
Definition: IsoTrackCalib.cc:104
edm::Handle< reco::TrackCollection >
edm::RunBase::run
RunNumber_t run() const
Definition: RunBase.h:40
IsoTrackCalib::tok_bs_
const edm::EDGetTokenT< reco::BeamSpot > tok_bs_
Definition: IsoTrackCalib.cc:112
IsoTrackCalib::t_eMipDR
double t_eMipDR
Definition: IsoTrackCalib.cc:130
IsoTrackCalib::~IsoTrackCalib
~IsoTrackCalib() override
Definition: IsoTrackCalib.cc:213
IsoTrackCalib::t_l3pt
double t_l3pt
Definition: IsoTrackCalib.cc:129
IsoTrackCalib::l1AlgoMap_
std::map< std::pair< unsigned int, std::string >, int > l1AlgoMap_
Definition: IsoTrackCalib.cc:142
reco::TrackBase::pt
double pt() const
track transverse momentum
Definition: TrackBase.h:637
MakerMacros.h
CaloGeometry
Definition: CaloGeometry.h:21
IsoTrackCalib::t_l3eta
double t_l3eta
Definition: IsoTrackCalib.cc:129
IsoTrackCalib::h_tkEta3
TH1I * h_tkEta3[5]
Definition: IsoTrackCalib.cc:137
Track.h
TrackFwd.h
DEFINE_FWK_MODULE
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
IsoTrackCalib::h_RecHit_num
TProfile * h_RecHit_num
Definition: IsoTrackCalib.cc:135
BeamSpot.h
IsoTrackCalib::m_l1GtUtils
L1GtUtils m_l1GtUtils
Definition: IsoTrackCalib.cc:101
CItAlgo
AlgorithmMap::const_iterator CItAlgo
iterators through map containing the algorithms
Definition: L1GtTriggerMenuFwd.h:38
IsoTrackCalib::h_RecHit_iEta
TProfile * h_RecHit_iEta
Definition: IsoTrackCalib.cc:135
edm::ConfigurationDescriptions::add
void add(std::string const &label, ParameterSetDescription const &psetDescription)
Definition: ConfigurationDescriptions.cc:57
IsoTrackCalib::fs_
edm::Service< TFileService > fs_
Definition: IsoTrackCalib.cc:99
IsoTrackCalib::t_qltyFlag
bool t_qltyFlag
Definition: IsoTrackCalib.cc:132
reco::TrackBase::py
double py() const
y coordinate of momentum vector
Definition: TrackBase.h:643
IsoTrackCalib::tok_EB_
edm::EDGetTokenT< EcalRecHitCollection > tok_EB_
Definition: IsoTrackCalib.cc:113
IsoTrackCalib::tok_hbhe_
edm::EDGetTokenT< HBHERecHitCollection > tok_hbhe_
Definition: IsoTrackCalib.cc:115
IsoTrackCalib::dPhi
double dPhi(math::XYZTLorentzVector &, math::XYZTLorentzVector &)
Definition: IsoTrackCalib.cc:682
Service.h
IsoTrackCalib::tok_EE_
edm::EDGetTokenT< EcalRecHitCollection > tok_EE_
Definition: IsoTrackCalib.cc:114
ChargeIsolation.h
IsoTrackCalib::t_l3phi
double t_l3phi
Definition: IsoTrackCalib.cc:129
mathSSE::sqrt
T sqrt(T t)
Definition: SSEVec.h:19
HLT_FULL_cff.eta2
eta2
Definition: HLT_FULL_cff.py:9551
DDAxes::z
IsoTrackCalib
Definition: IsoTrackCalib.cc:80
reco::Track
Definition: Track.h:27
AlgorithmMap
std::map< std::string, L1GtAlgorithm > AlgorithmMap
map containing the algorithms
Definition: L1GtTriggerMenuFwd.h:31
IsoTrackCalib::tok_recVtx_
const edm::EDGetTokenT< reco::VertexCollection > tok_recVtx_
Definition: IsoTrackCalib.cc:111
IdealMagneticFieldRecord.h
IsoTrackCalib::hltConfig_
HLTConfigProvider hltConfig_
Definition: IsoTrackCalib.cc:100
Event
spr::trackSelectionParameters::minPt
double minPt
Definition: TrackSelection.h:20
L1GtUtils
Definition: L1GtUtils.h:66
spr::trackSelectionParameters
Definition: TrackSelection.h:12
spr::trackSelectionParameters::minOuterHit
int minOuterHit
Definition: TrackSelection.h:23
dqmdumpme.k
k
Definition: dqmdumpme.py:60
reco::BeamSpot::position
const Point & position() const
position
Definition: BeamSpot.h:59
IsoTrackCalib::h_Rechit_E
TH1F * h_Rechit_E
Definition: IsoTrackCalib.cc:138
eECALMatrix.h
spr::chargeIsolationCone
double chargeIsolationCone(unsigned int trkIndex, std::vector< spr::propagatedTrackDirection > &trkDirs, double dR, int &nNearTRKs, bool debug=false)
Definition: ChargeIsolation.cc:288
eCone.h
reco::TrackBase::phi
double phi() const
azimuthal angle of momentum vector
Definition: TrackBase.h:649
IsoTrackCalib::h_tketa4
TH1I * h_tketa4[6]
Definition: IsoTrackCalib.cc:141
first
auto first
Definition: CAHitNtupletGeneratorKernelsImpl.h:125
L1GtUtils::availableL1Configuration
const bool availableL1Configuration(int &errorCode, int &l1ConfCode) const
Definition: L1GtUtils.cc:1679
IsoTrackCalib::t_Run
int t_Run
Definition: IsoTrackCalib.cc:127
spr::trackSelectionParameters::maxDpOverP
double maxDpOverP
Definition: TrackSelection.h:22
edm::ConfigurationDescriptions
Definition: ConfigurationDescriptions.h:28
spr::trackSelectionParameters::minLayerCrossed
int minLayerCrossed
Definition: TrackSelection.h:23
IsoTrackCalib::t_p
double t_p
Definition: IsoTrackCalib.cc:129
IsoTrackCalib::tok_L1extFwdJet_
edm::EDGetTokenT< l1extra::L1JetParticleCollection > tok_L1extFwdJet_
Definition: IsoTrackCalib.cc:121
TFileService.h
HLT_FULL_cff.eta1
eta1
Definition: HLT_FULL_cff.py:9550
IsoTrackCalib::deltaR
double deltaR(double eta1, double eta2, double phi1, double phi2)
Definition: IsoTrackCalib.cc:703
IsoTrackCalib::t_mindR1
double t_mindR1
Definition: IsoTrackCalib.cc:129
IsoTrackCalib::h_tketa0
TH1I * h_tketa0[6]
Definition: IsoTrackCalib.cc:140
CaloSubdetectorGeometry.h
HcalDetId::ieta
constexpr int ieta() const
get the cell ieta
Definition: HcalDetId.h:155
L1JetParticleFwd.h
edm::ParameterSet
Definition: ParameterSet.h:47
math::XYZPoint
XYZPointD XYZPoint
point in space with cartesian internal representation
Definition: Point3D.h:12
L1GtTriggerMenu
Definition: L1GtTriggerMenu.h:48
GenEventInfoProduct.h
Event.h
LumiDetails.h
reco::LeafCandidate::eta
double eta() const final
momentum pseudorapidity
Definition: LeafCandidate.h:152
type
type
Definition: SiPixelVCal_PayloadInspector.cc:39
IsoTrackCalib::dEta
double dEta(math::XYZTLorentzVector &, math::XYZTLorentzVector &)
Definition: IsoTrackCalib.cc:678
TrackSelection.h
IsoTrackCalib::h_jetp
TH1F * h_jetp
Definition: IsoTrackCalib.cc:138
spr::trackSelectionParameters::maxOutMiss
int maxOutMiss
Definition: TrackSelection.h:24
IsoTrackCalib::h_tketa2
TH1I * h_tketa2[6]
Definition: IsoTrackCalib.cc:140
reco::TrackBase::eta
double eta() const
pseudorapidity of momentum vector
Definition: TrackBase.h:652
LorentzVector.h
IsoTrackCalib::tok_pfjets_
const edm::EDGetTokenT< reco::PFJetCollection > tok_pfjets_
Definition: IsoTrackCalib.cc:118
IsoTrackCalib::tok_L1extTauJet_
edm::EDGetTokenT< l1extra::L1JetParticleCollection > tok_L1extTauJet_
Definition: IsoTrackCalib.cc:119
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
M_PI
#define M_PI
Definition: BXVectorInputProducer.cc:49
trackerHitRTTI::vector
Definition: trackerHitRTTI.h:21
MagneticField.h
edm::EventSetup
Definition: EventSetup.h:58
IsoTrackCalib::h_tketa5
TH1I * h_tketa5[6]
Definition: IsoTrackCalib.cc:141
HLTConfigProvider.h
HitPattern.h
spr::trackSelectionParameters::minQuality
reco::TrackBase::TrackQuality minQuality
Definition: TrackSelection.h:21
IsoTrackCalib::h_tketa3
TH1I * h_tketa3[6]
Definition: IsoTrackCalib.cc:141
TFileService::make
T * make(const Args &...args) const
make new ROOT object
Definition: TFileService.h:64
edm::ESGetToken< CaloGeometry, CaloGeometryRecord >
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
TriggerObject.h
edm::EventSetup::getData
bool getData(T &iHolder) const
Definition: EventSetup.h:127
CaloTopology.h
photonIsolationHIProducer_cfi.hbhe
hbhe
Definition: photonIsolationHIProducer_cfi.py:8
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
reco::TrackBase::qualityByName
static TrackQuality qualityByName(const std::string &name)
Definition: TrackBase.cc:126
VertexFwd.h
CaloSubdetectorTopology.h
IsoTrackCalib::selectionParameters_
spr::trackSelectionParameters selectionParameters_
Definition: IsoTrackCalib.cc:105
CaloTopologyRecord.h
HcalTopology.h
IsoTrackCalib::t_hmaxNearP
double t_hmaxNearP
Definition: IsoTrackCalib.cc:130
EcalTrigTowerConstituentsMap.h
submitPVResolutionJobs.desc
string desc
Definition: submitPVResolutionJobs.py:251
HLTConfigProvider
Definition: HLTConfigProvider.h:29
IsoTrackCalib::h_tkEta0
TH1I * h_tkEta0[5]
Definition: IsoTrackCalib.cc:136
IsoTrackCalib::t_HitEnergies
std::vector< double > * t_HitEnergies
Definition: IsoTrackCalib.cc:134
std
Definition: JetResolutionObject.h:76
IsoTrackCalib::analyze
void analyze(const edm::Event &, const edm::EventSetup &) override
Definition: IsoTrackCalib.cc:241
DetachedQuadStep_cff.seeds
seeds
Definition: DetachedQuadStep_cff.py:195
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
reco::PFJetCollection
std::vector< PFJet > PFJetCollection
collection of PFJet objects
Definition: PFJetCollection.h:14
Calorimetry_cff.bField
bField
Definition: Calorimetry_cff.py:284
IsoTrackCalib::dR
double dR(math::XYZTLorentzVector &, math::XYZTLorentzVector &)
Definition: IsoTrackCalib.cc:697
Vertex.h
Frameworkfwd.h
IsoTrackCalib::tok_ew_
const edm::EDGetTokenT< GenEventInfoProduct > tok_ew_
Definition: IsoTrackCalib.cc:116
edm::LogVerbatim
Log< level::Info, true > LogVerbatim
Definition: MessageLogger.h:128
CaloPropagateTrack.h
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
L1GtUtils.h
IsoTrackCalib::t_ieta
int t_ieta
Definition: IsoTrackCalib.cc:127
l1t::VertexCollection
std::vector< Vertex > VertexCollection
Definition: Vertex.h:12
IsoTrackCalib::t_selectTk
bool t_selectTk
Definition: IsoTrackCalib.cc:132
CaloGeometry.h
TFileService::kSharedResource
static const std::string kSharedResource
Definition: TFileService.h:76
IsoTrackCalib::t_l1phi
double t_l1phi
Definition: IsoTrackCalib.cc:128
IsoTrackCalib::a_coneR_
const double a_coneR_
Definition: IsoTrackCalib.cc:107
IsoTrackCalib::tok_magField_
edm::ESGetToken< MagneticField, IdealMagneticFieldRecord > tok_magField_
Definition: IsoTrackCalib.cc:124
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17
IsoTrackCalib::tok_L1extCenJet_
edm::EDGetTokenT< l1extra::L1JetParticleCollection > tok_L1extCenJet_
Definition: IsoTrackCalib.cc:120
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
IsoTrackCalib::t_l1eta
double t_l1eta
Definition: IsoTrackCalib.cc:128
IsoTrackCalib::theTrackQuality_
const std::string theTrackQuality_
Definition: IsoTrackCalib.cc:106
reco::TrackBase::pz
double pz() const
z coordinate of momentum vector
Definition: TrackBase.h:646
GenJet.h
L1GtTriggerMenuFwd.h
ParameterSet.h
IsoTrackCalib::tree
TTree * tree
Definition: IsoTrackCalib.cc:126
edm::HandleBase::isValid
bool isValid() const
Definition: HandleBase.h:70
IsoTrackCalib::t_qltyMissFlag
bool t_qltyMissFlag
Definition: IsoTrackCalib.cc:132
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)
MagneticField
Definition: MagneticField.h:19
IsoTrackCalib::m_l1GtMenu
const L1GtTriggerMenu * m_l1GtMenu
Definition: IsoTrackCalib.cc:102
edm::Log
Definition: MessageLogger.h:70
L1JetParticle.h
L1GtUtils::ptrL1TriggerMenuEventSetup
const L1GtTriggerMenu * ptrL1TriggerMenuEventSetup(int &errorCode)
return a pointer to the L1 trigger menu from event setup
Definition: L1GtUtils.cc:1619
edm::InputTag
Definition: InputTag.h:15
IsoTrackCalib::tok_geom_
edm::ESGetToken< CaloGeometry, CaloGeometryRecord > tok_geom_
Definition: IsoTrackCalib.cc:123
L1GlobalTriggerReadoutRecord.h
reco::TrackCollection
std::vector< Track > TrackCollection
collection of Tracks
Definition: TrackFwd.h:14
IsoTrackCalib::beginJob
void beginJob() override
Definition: IsoTrackCalib.cc:575
IsoTrackCalib::t_eHcal
double t_eHcal
Definition: IsoTrackCalib.cc:130
pfJetBenchmark_cfi.pfJets
pfJets
Definition: pfJetBenchmark_cfi.py:4
EcalChannelStatusRcd.h
L1GtTriggerMenu::gtAlgorithmMap
const AlgorithmMap & gtAlgorithmMap() const
get / set the algorithm map (by name)
Definition: L1GtTriggerMenu.h:187
IsoTrackCalib::a_mipR_
const double a_mipR_
Definition: IsoTrackCalib.cc:107