CMS 3D CMS Logo

ValidIsoTrkCalib.cc
Go to the documentation of this file.
1 //
2 // Package: ValidIsoTrkCalib
3 // Class: ValidIsoTrkCalib
4 //
5 
6 /*
7  Description: Validation for Isolated tracks Calibration
8 
9  Implementation:
10 See the twiki page for details:
11 https://twiki.cern.ch/twiki/bin/view/CMS/ValidIsoTrkCalib
12 
13 */
14 
15 //
16 // Original Author: Andrey Pozdnyakov
17 // Created: Tue Nov 4 01:16:05 CET 2008
18 //
19 
20 // system include files
21 
22 #include <memory>
23 
24 // user include files
27 
28 //#include "FWCore/Framework/interface/Event.h"
29 //#include "FWCore/Framework/interface/MakerMacros.h"
30 //#include "FWCore/ParameterSet/interface/ParameterSet.h"
31 
40 
50 
52 
53 #include "TROOT.h"
54 #include "TFile.h"
55 #include "TTree.h"
56 #include "TH1F.h"
57 
58 #include <fstream>
59 #include <map>
60 
61 class ValidIsoTrkCalib : public edm::one::EDAnalyzer<edm::one::SharedResources> {
62 public:
63  explicit ValidIsoTrkCalib(const edm::ParameterSet&);
64 
65  // double getDistInPlaneSimple(const GlobalPoint caloPoint, const GlobalPoint rechitPoint);
66 
67 private:
68  void beginJob() override;
69  void analyze(const edm::Event&, const edm::EventSetup&) override;
70 
71  // ----------member data ---------------------------
72 
73  //Variables from HcalIsotrackAnalyzer
74 
77  double taECALCone_;
78  double taHCALCone_;
79 
80  const CaloGeometry* geo;
81  // nothing is done with these tags, so I leave it - cowden
84  std::vector<edm::InputTag> genecalLabel_;
85 
91 
94 
95  //std::string m_inputTrackLabel;
96  //std::string m_hcalLabel;
97 
99  string AxB_;
101 
104  //string calibFactorsFileName_;
105  // string corrfile;
106 
108  //bool takeAllRecHits_, takeGenTracks_;
109  int gen, iso, pix;
110  float genPt[500], genPhi[500], genEta[500];
111  float isoPt[500], isoPhi[500], isoEta[500];
112  float pixPt[500], pixPhi[500], pixEta[500];
113  //int hbheiEta[5000],hbheiPhi[5000],hbheDepth[5000];
114  //float hbheEnergy[5000];
115 
116  int NisoTrk;
118  float ptNear;
119  float ptrack, rvert;
120  //float eecal, ehcal;
121 
125 
126  Float_t emEnergy;
127  Float_t targetE;
128 
129  //TFile* rootFile;
130  // TTree* tree;
131  TTree *tTree, *fTree;
132 
133  Float_t xTrkEcal;
134  Float_t yTrkEcal;
135  Float_t zTrkEcal;
136 
137  Float_t xTrkHcal;
138  Float_t yTrkHcal;
139  Float_t zTrkHcal;
140 
141  int Nhits;
142  float eClustBefore; //Calo energy before calibration
143  float eClustAfter; //After calibration
144  float eTrack; //Track energy
145  float etaTrack;
146  float phiTrack;
147  float eECAL; // Energy deposited in ECAL
148  int numHits; //number of rechits
149  //float e3x3;
150 
158  int iEta;
159  int iPhi;
160  int iEtaTr;
161  int iPhiTr;
162  float iDr, delR;
163  int dietatr;
164  int diphitr;
165 
166  float iTime;
167  float HTime[100];
168  float e3x3Before;
169  float e3x3After;
170  float e5x5Before;
171  float e5x5After;
174  float PtNearBy;
176 
178  // map<UInt_t, Float_t> CalibFactors;
179  // Bool_t ReadCalibFactors(string);
180 
181  TH1F* nTracks;
182 
184  // int Lumi_n;
185 };
186 
188  usesResource(TFileService::kSharedResource);
189 
190  //takeAllRecHits_=iConfig.getUntrackedParameter<bool>("takeAllRecHits");
191  takeGenTracks_ = iConfig.getUntrackedParameter<bool>("takeGenTracks");
192 
193  tok_genTrack_ = consumes<reco::TrackCollection>(iConfig.getParameter<edm::InputTag>("genTracksLabel"));
194  genhbheLabel_ = iConfig.getParameter<edm::InputTag>("genHBHE");
195  //genhoLabel_=iConfig.getParameter<edm::InputTag>("genHO");
196  //genecalLabel_=iConfig.getParameter<std::vector<edm::InputTag> >("genECAL");
197 
198  // m_hcalLabel = iConfig.getUntrackedParameter<std::string> ("hcalRecHitsLabel","hbhereco");
199 
200  tok_hbhe_ = consumes<HBHERecHitCollection>(iConfig.getParameter<edm::InputTag>("hbheInput"));
201  tok_ho_ = consumes<HORecHitCollection>(iConfig.getParameter<edm::InputTag>("hoInput"));
202  //eLabel_=iConfig.getParameter<edm::InputTag>("eInput");
203  tok_track_ =
204  consumes<reco::IsolatedPixelTrackCandidateCollection>(iConfig.getParameter<edm::InputTag>("HcalIsolTrackInput"));
205  tok_track1_ = consumes<reco::TrackCollection>(iConfig.getParameter<edm::InputTag>("trackInput"));
206 
207  tok_recalibCorrs_ = esConsumes(edm::ESInputTag("", "recalibrate"));
208  tok_geom_ = esConsumes();
209 
210  associationConeSize_ = iConfig.getParameter<double>("associationConeSize");
211  allowMissingInputs_ = iConfig.getUntrackedParameter<bool>("allowMissingInputs", true);
212  // outputFileName_=iConfig.getParameter<std::string>("outputFileName");
213  // calibFactorsFileName_=iConfig.getParameter<std::string>("calibFactorsFileName");
214 
215  AxB_ = iConfig.getParameter<std::string>("AxB");
216  calibrationConeSize_ = iConfig.getParameter<double>("calibrationConeSize");
217 
218  MinNTrackHitsBarrel = iConfig.getParameter<int>("MinNTrackHitsBarrel");
219  MinNTECHitsEndcap = iConfig.getParameter<int>("MinNTECHitsEndcap");
220  energyECALmip = iConfig.getParameter<double>("energyECALmip");
221  energyMinIso = iConfig.getParameter<double>("energyMinIso");
222  energyMaxIso = iConfig.getParameter<double>("energyMaxIso");
223  maxPNear = iConfig.getParameter<double>("maxPNear");
224 
225  edm::ParameterSet parameters = iConfig.getParameter<edm::ParameterSet>("TrackAssociatorParameters");
229 
230  // taECALCone_=iConfig.getUntrackedParameter<double>("TrackAssociatorECALCone",0.5);
231  //taHCALCone_=iConfig.getUntrackedParameter<double>("TrackAssociatorHCALCone",0.6);
232 }
233 
234 // ------------ method called to for each event ------------
236  try {
238 
239  edm::LogInfo("CalibConstants") << " Loaded: OK ";
240 
241  } catch (const cms::Exception& e) {
242  edm::LogWarning("CalibConstants") << " Not Found!! ";
243  }
244 
246  iEvent.getByToken(tok_genTrack_, generalTracks);
247 
249  iEvent.getByToken(tok_track1_, isoProdTracks);
250 
252  //edm::Handle<reco::TrackCollection> isoPixelTracks;
253  iEvent.getByToken(tok_track_, isoPixelTracks);
254 
255  /*
256  edm::Handle<EcalRecHitCollection> ecal;
257  iEvent.getByLabel(eLabel_,ecal);
258  const EcalRecHitCollection Hitecal = *(ecal.product());
259  */
260 
262  iEvent.getByToken(tok_hbhe_, hbhe);
263  const HBHERecHitCollection Hithbhe = *(hbhe.product());
264 
265  geo = &iSetup.getData(tok_geom_);
266 
267  const HcalGeometry* gHcal = static_cast<const HcalGeometry*>(geo->getSubdetectorGeometry(DetId::Hcal, HcalBarrel));
268  //Note: even though it says HcalBarrel, we actually get the whole Hcal detector geometry!
269 
270  // Lumi_n=iEvent.luminosityBlock();
271  parameters_.useEcal = true;
272  parameters_.useHcal = true;
273  parameters_.useCalo = false;
274  parameters_.useMuon = false;
275  //parameters_.dREcal = taECALCone_;
276  //parameters_.dRHcal = taHCALCone_;
277 
278  //cout<<"Hello World. TrackCollectionSize: "<< isoPixelTracks->size()<<endl;
279 
280  if (isoPixelTracks->empty())
281  return;
282 
283  for (reco::TrackCollection::const_iterator trit = isoProdTracks->begin(); trit != isoProdTracks->end(); trit++) {
284  reco::IsolatedPixelTrackCandidateCollection::const_iterator isoMatched = isoPixelTracks->begin();
285  //reco::TrackCollection::const_iterator isoMatched=isoPixelTracks->begin();
286  bool matched = false;
287 
288  //for (reco::IsolatedPixelTrackCandidateCollection::const_iterator trit = isoPixelTracks->begin(); trit!=isoPixelTracks->end(); trit++)
289  for (reco::IsolatedPixelTrackCandidateCollection::const_iterator it = isoPixelTracks->begin();
290  it != isoPixelTracks->end();
291  it++)
292  //for (reco::TrackCollection::const_iterator it = isoPixelTracks->begin(); it!=isoPixelTracks->end(); it++)
293  {
294  if (abs((trit->pt() - it->pt()) / it->pt()) < 0.005 && abs(trit->eta() - it->eta()) < 0.01) {
295  isoMatched = it;
296  matched = true;
297  break;
298  }
299  }
300  // CUT
301 
302  if (!matched)
303  continue;
304  if (isoMatched->maxPtPxl() > maxPNear)
305  continue;
306 
307  ptNear = isoMatched->maxPtPxl();
308  //cout<<"Point 0.1 isoMatch. ptnear: "<<ptNear<<endl;
309 
310  // CUT
311  if (trit->hitPattern().numberOfValidHits() < MinNTrackHitsBarrel)
312  continue;
313  if (fabs(trit->eta()) > 1.47 && trit->hitPattern().numberOfValidStripTECHits() < MinNTECHitsEndcap)
314  continue;
315 
316  //cout<<"Point 0.2.1 after numofvalidhits HB: "<<trit->hitPattern().numberOfValidHits()<<endl;
317  //cout<<"Point 0.2.2 after numofvalidstrips HE: "<<trit->hitPattern().numberOfValidStripTECHits()<<endl;
318 
319  numVH = trit->hitPattern().numberOfValidHits();
320  numVS = trit->hitPattern().numberOfValidStripTECHits();
321 
322  trackE = sqrt(trit->px() * trit->px() + trit->py() * trit->py() + trit->pz() * trit->pz() + 0.14 * 0.14);
323  trackPt = trit->pt();
324  trackEta = trit->eta();
325  trackPhi = trit->phi();
326 
327  emEnergy = isoMatched->energyIn();
328 
329  //cout<<"Point 0.3. Matched :: pt: "<<trit->pt()<<" wholeEnergy: "<<trackE<<" emEnergy: "<<emEnergy<<" eta: "<<etahcal<<" phi: "<<phihcal<<endl;
330  //cout<<"Point 0.4. EM energy in cone: "<<emEnergy<<" EtaHcal: "<<etahcal<<" PhiHcal: "<<phihcal<<endl;
331 
333  iEvent,
334  iSetup,
336  parameters_);
337 
338  //float etaecal=info.trkGlobPosAtEcal.eta();
339  //float phiecal=info.trkGlobPosAtEcal.phi();
340  // float etahcal=info.trkGlobPosAtHcal.eta();
341  // float phihcal=info.trkGlobPosAtHcal.phi();
342 
343  xTrkEcal = info.trkGlobPosAtEcal.x();
344  yTrkEcal = info.trkGlobPosAtEcal.y();
345  zTrkEcal = info.trkGlobPosAtEcal.z();
346 
347  xTrkHcal = info.trkGlobPosAtHcal.x();
348  yTrkHcal = info.trkGlobPosAtHcal.y();
349  zTrkHcal = info.trkGlobPosAtHcal.z();
350 
351  if (xTrkEcal == 0 && yTrkEcal == 0 && zTrkEcal == 0) {
352  cout << "zero point at Ecal" << endl;
353  continue;
354  }
355  if (xTrkHcal == 0 && yTrkHcal == 0 && zTrkHcal == 0) {
356  cout << "zero point at Hcal" << endl;
357  continue;
358  }
359 
360  /*GlobalVector trackMomAtEcal = info.trkMomAtEcal;
361  GlobalVector trackMomAtHcal = info.trkMomAtHcal;
362 
363  PxTrkHcal = trackMomAtHcal.x();
364  PyTrkHcal = trackMomAtHcal.y();
365  PzTrkHcal = trackMomAtHcal.z();
366  */
367 
368  GlobalPoint gPointEcal(xTrkEcal, yTrkEcal, zTrkEcal);
369  GlobalPoint gPointHcal(xTrkHcal, yTrkHcal, zTrkHcal);
370 
371  int iphitrue = -10;
372  int ietatrue = 100;
373  const HcalDetId tempId = gHcal->getClosestCell(gPointHcal);
374  ietatrue = tempId.ieta();
375  iphitrue = tempId.iphi();
376 
377  MaxHit_struct MaxHit;
378 
379  MaxHit.hitenergy = -100.;
380 
381  //container for used recHits
382  std::vector<DetId> usedHits;
383  //
384  usedHits.clear();
385  //cout <<"Point 1. Entrance to HBHECollection"<<endl;
386 
387  //float dddeta = 1000.;
388  //float dddphi = 1000.;
389  //int iphitrue = 1234;
390  //int ietatrue = 1234;
391 
392  GlobalPoint gPhot;
393 
394  for (HBHERecHitCollection::const_iterator hhit = Hithbhe.begin(); hhit != Hithbhe.end(); hhit++) {
395  //check that this hit was not considered before and push it into usedHits
396  bool hitIsUsed = false;
397  for (uint32_t i = 0; i < usedHits.size(); i++) {
398  if (usedHits[i] == hhit->id())
399  hitIsUsed = true;
400  }
401  if (hitIsUsed)
402  continue;
403  usedHits.push_back(hhit->id());
404  //
405 
406  // rof 16.05.2008 start: include the possibility for recalibration
407  float recal = 1;
408  // rof end
409 
410  GlobalPoint pos = geo->getPosition(hhit->detid());
411  //float phihit = pos.phi();
412  //float etahit = pos.eta();
413 
414  int iphihitm = (hhit->id()).iphi();
415  int ietahitm = (hhit->id()).ieta();
416  int depthhit = (hhit->id()).depth();
417  float enehit = hhit->energy() * recal;
418 
419  if (depthhit != 1)
420  continue;
421 
422  /*
423  float dphi = fabs(phihcal - phihit);
424  if(dphi > 4.*atan(1.)) dphi = 8.*atan(1.) - dphi;
425  float deta = fabs(etahcal - etahit);
426  float dr = sqrt(dphi*dphi + deta*deta);
427  */
428 
429  //double distAtHcal = getDistInPlaneTrackDir(gPointHcal, trackMomAtHcal, pos);
430  double distAtHcal = getDistInPlaneSimple(gPointHcal, pos);
431 
432  if (distAtHcal < associationConeSize_) {
433  for (HBHERecHitCollection::const_iterator hhit2 = Hithbhe.begin(); hhit2 != Hithbhe.end(); hhit2++) {
434  int iphihitm2 = (hhit2->id()).iphi();
435  int ietahitm2 = (hhit2->id()).ieta();
436  int depthhit2 = (hhit2->id()).depth();
437  float enehit2 = hhit2->energy() * recal;
438 
439  if (iphihitm == iphihitm2 && ietahitm == ietahitm2 && depthhit != depthhit2)
440  enehit = enehit + enehit2;
441  }
442 
443  //cout<<"IN CONE ieta: "<<ietahitm<<" iphi: "<<iphihitm<<" depthhit: "<<depthhit<<" dr: "<<dr<<" energy: "<<enehit<<endl;
444 
445  //Find a Hit with Maximum Energy
446 
447  if (enehit > MaxHit.hitenergy) {
448  MaxHit.hitenergy = enehit;
449  MaxHit.ietahitm = (hhit->id()).ieta();
450  MaxHit.iphihitm = (hhit->id()).iphi();
451  MaxHit.dr = distAtHcal;
452  //MaxHit.depthhit = (hhit->id()).depth();
453  MaxHit.depthhit = 1;
454 
455  //gPhot = geo->getPosition(hhit->detid());
456  }
457  }
458  } //end of all HBHE hits cycle
459 
460  usedHits.clear();
461 
462  //cout<<"Hottest ieta: "<<MaxHit.ietahitm<<" iphi: "<<MaxHit.iphihitm<<" dr: "<<MaxHit.dr<<endl;
463  //cout<<"Track ieta: "<<ietatrue<<" iphi: "<<iphitrue<<endl;
464 
465  //cout<<"Point 3. MaxHit :::En "<<MaxHit.hitenergy<<" ieta: "<<MaxHit.ietahitm<<" iphi: "<<MaxHit.iphihitm<<endl;
466 
467  Bool_t passCuts = kFALSE;
468  if (trackE > energyMinIso && trackE < energyMaxIso && emEnergy < energyECALmip && MaxHit.hitenergy > 0. &&
469  abs(MaxHit.ietahitm) < 29)
470  passCuts = kTRUE;
471 
472  //cout<<"Pont 0.1.1. trackE:"<<trackE<<" emEn: "<<emEnergy<<endl;
473 
474  numHits = 0;
475 
476  eClustBefore = 0.0;
477  eClustAfter = 0.0;
478  eBeforeDepth1 = 0.0;
479  eAfterDepth1 = 0.0;
480  eBeforeDepth2 = 0.0;
481  eAfterDepth2 = 0.0;
482  CentHitFactor = 0.0;
483  e3x3After = 0.0;
484  e3x3Before = 0.0;
485  e5x5After = 0.0;
486  e5x5Before = 0.0;
487 
488  for (HBHERecHitCollection::const_iterator hhit = Hithbhe.begin(); hhit != Hithbhe.end(); hhit++) {
489  //check that this hit was not considered before and push it into usedHits
490  bool hitIsUsed = false;
491  for (uint32_t i = 0; i < usedHits.size(); i++) {
492  if (usedHits[i] == hhit->id())
493  hitIsUsed = true;
494  }
495  if (hitIsUsed)
496  continue;
497  usedHits.push_back(hhit->id());
498 
499  int DIETA = 100;
500  if (MaxHit.ietahitm * (hhit->id()).ieta() > 0) {
501  DIETA = MaxHit.ietahitm - (hhit->id()).ieta();
502  }
503  if (MaxHit.ietahitm * (hhit->id()).ieta() < 0) {
504  DIETA = MaxHit.ietahitm - (hhit->id()).ieta();
505  DIETA = DIETA > 0 ? DIETA - 1 : DIETA + 1;
506  }
507 
508  int DIPHI = abs(MaxHit.iphihitm - (hhit->id()).iphi());
509  DIPHI = DIPHI > 36 ? 72 - DIPHI : DIPHI;
510 
511  int numbercell = 100; //always collect Wide clastor!
512 
513  //if(AxB_=="5x5" || AxB_=="3x3" || AxB_=="7x7"|| AxB_=="Cone")
514 
515  //if(AxB_=="3x3") numbercell = 1;
516  //if(AxB_=="5x5") numbercell = 2;
517  //if(AxB_=="Cone") numbercell = 1000;
518 
519  if (abs(DIETA) <= numbercell &&
520  (abs(DIPHI) <= numbercell || (abs(MaxHit.ietahitm) >= 20 && abs(DIPHI) <= numbercell + 1))) {
521  const GlobalPoint pos2 = geo->getPosition(hhit->detid());
522 
523  if (passCuts && hhit->energy() > 0) {
524  float factor = 0.0;
525  // factor = CalibFactors[hhit->id()];
526  factor = respRecalib->getValues(hhit->id())->getValue();
527 
528  //if(i<5){cout<<" calib factors: "<<factor<<" ij "<<100*i+j<<endl;}
529 
530  if (hhit->id().ieta() == MaxHit.ietahitm && hhit->id().iphi() == MaxHit.iphihitm)
532 
533  if (hhit->id().ieta() == MaxHit.ietahitm && hhit->id().iphi() == MaxHit.iphihitm)
534  iTime = hhit->time();
535 
536  if (AxB_ != "3x3" && AxB_ != "5x5" && AxB_ != "Cone")
537  edm::LogWarning(" AxB ") << " Not supported: " << AxB_;
538 
539  if (abs(DIETA) <= 2 && (abs(DIPHI) <= 2 || ((abs(MaxHit.ietahitm) > 20 && abs(DIPHI) <= 4) &&
540  !((abs(MaxHit.ietahitm) == 21 || abs(MaxHit.ietahitm) == 22) &&
541  abs((hhit->id()).ieta()) <= 20 && abs(DIPHI) > 2)))) {
542  e5x5Before += hhit->energy();
543  e5x5After += hhit->energy() * factor;
544  }
545 
546  if (abs(DIETA) <= 1 && (abs(DIPHI) <= 1 || ((abs(MaxHit.ietahitm) > 20 && abs(DIPHI) <= 2) &&
547  !(abs(MaxHit.ietahitm) == 21 && abs((hhit->id()).ieta()) <= 20 &&
548  abs(DIPHI) > 1)))) {
549  e3x3Before += hhit->energy();
550  e3x3After += hhit->energy() * factor;
551  }
552 
553  if (AxB_ == "5x5") {
554  if (abs(DIETA) <= 2 && (abs(DIPHI) <= 2 || (abs(MaxHit.ietahitm) > 20 && abs(DIPHI) <= 4))) {
555  if (abs(MaxHit.ietahitm) == 21 && abs((hhit->id()).ieta()) <= 20 && abs(DIPHI) > 3)
556  continue;
557 
558  HTime[numHits] = hhit->time();
559  numHits++;
560 
561  eClustBefore += hhit->energy();
562  eClustAfter += hhit->energy() * factor;
563 
564  if ((hhit->id().depth() == 1) && (abs(hhit->id().ieta()) > 17) && (abs(hhit->id().ieta()) < 29)) {
565  eBeforeDepth1 += hhit->energy();
566  eAfterDepth1 += hhit->energy() * factor;
567  } else if ((hhit->id().depth() == 2) && (abs(hhit->id().ieta()) > 17) && (abs(hhit->id().ieta()) < 29)) {
568  eBeforeDepth2 += hhit->energy();
569  eAfterDepth2 += hhit->energy() * factor;
570  }
571  }
572  } //end of 5x5
573 
574  if (AxB_ == "3x3") {
575  if (abs(DIETA) <= 1 && (abs(DIPHI) <= 1 || (abs(MaxHit.ietahitm) > 20 && abs(DIPHI) <= 2))) {
576  if (abs(MaxHit.ietahitm) == 21 && abs((hhit->id()).ieta()) <= 20 && abs(DIPHI) > 2)
577  continue;
578 
579  HTime[numHits] = hhit->time();
580  numHits++;
581 
582  eClustBefore += hhit->energy();
583  eClustAfter += hhit->energy() * factor;
584 
585  if ((hhit->id().depth() == 1) && (abs(hhit->id().ieta()) > 17) && (abs(hhit->id().ieta()) < 29)) {
586  eBeforeDepth1 += hhit->energy();
587  eAfterDepth1 += hhit->energy() * factor;
588  } else if ((hhit->id().depth() == 2) && (abs(hhit->id().ieta()) > 17) && (abs(hhit->id().ieta()) < 29)) {
589  eBeforeDepth2 += hhit->energy();
590  eAfterDepth2 += hhit->energy() * factor;
591  }
592  }
593  } //end of 3x3
594 
595  if (AxB_ == "Cone" && getDistInPlaneSimple(gPointHcal, pos2) < calibrationConeSize_) {
596  HTime[numHits] = hhit->time();
597  numHits++;
598 
599  eClustBefore += hhit->energy();
600  eClustAfter += hhit->energy() * factor;
601 
602  if ((hhit->id().depth() == 1) && (abs(hhit->id().ieta()) > 17) && (abs(hhit->id().ieta()) < 29)) {
603  eBeforeDepth1 += hhit->energy();
604  eAfterDepth1 += hhit->energy() * factor;
605  } else if ((hhit->id().depth() == 2) && (abs(hhit->id().ieta()) > 17) && (abs(hhit->id().ieta()) < 29)) {
606  eBeforeDepth2 += hhit->energy();
607  eAfterDepth2 += hhit->energy() * factor;
608  }
609 
610  } //end of Cone
611 
612  } //end of passCuts
613 
614  } //end of DIETA DIPHI
615 
616  } //end of associatedcone HBHE hits cycle
617 
618  int dieta_M_P = 100;
619  int diphi_M_P = 100;
620  if (MaxHit.ietahitm * ietatrue > 0) {
621  dieta_M_P = abs(MaxHit.ietahitm - ietatrue);
622  }
623  if (MaxHit.ietahitm * ietatrue < 0) {
624  dieta_M_P = abs(MaxHit.ietahitm - ietatrue) - 1;
625  }
626  diphi_M_P = abs(MaxHit.iphihitm - iphitrue);
627  diphi_M_P = diphi_M_P > 36 ? 72 - diphi_M_P : diphi_M_P;
628 
629  if (passCuts)
630 
631  {
632  eventNumber = iEvent.id().event();
633  runNumber = iEvent.id().run();
634 
635  eCentHitBefore = MaxHit.hitenergy;
637  eECAL = emEnergy;
640  PtNearBy = ptNear;
641 
642  eTrack = trackE;
643  phiTrack = trackPhi;
644  etaTrack = trackEta;
645 
646  iEta = MaxHit.ietahitm;
647  iPhi = MaxHit.iphihitm;
648 
649  iEtaTr = ietatrue;
650  iPhiTr = iphitrue;
651  iDr = sqrt(diphi_M_P * diphi_M_P + dieta_M_P * dieta_M_P);
652  delR = MaxHit.dr;
653  dietatr = dieta_M_P;
654  diphitr = diphi_M_P;
655 
656  fTree->Fill();
657  }
658 
659  } //end of isoProdTracks cycle
660 
661  /* ------------------ Some stuff for general tracks ---------- ----*/
662  //cout<<" generalTracks Size: "<< generalTracks->size()<<endl;
663  int n = generalTracks->size();
664  nTracks->Fill(n);
665 
666  if (takeGenTracks_ && iEvent.id().event() % 10 == 1) {
667  gen = generalTracks->size();
668  iso = isoProdTracks->size();
669  pix = isoPixelTracks->size();
670 
671  genPt[0] = -33;
672  genPhi[0] = -33;
673  genEta[0] = -33;
674 
675  isoPt[0] = -33;
676  isoPhi[0] = -33;
677  isoEta[0] = -33;
678 
679  pixPt[0] = -33;
680  pixPhi[0] = -33;
681  pixEta[0] = -33;
682 
683  Int_t gencount = 0, isocount = 0, pixcount = 0;
684  for (reco::TrackCollection::const_iterator gentr = generalTracks->begin(); gentr != generalTracks->end(); gentr++) {
685  genPt[gencount] = gentr->pt();
686  genPhi[gencount] = gentr->phi();
687  genEta[gencount] = gentr->eta();
688  gencount++;
689  }
690 
691  for (reco::TrackCollection::const_iterator isotr = isoProdTracks->begin(); isotr != isoProdTracks->end(); isotr++) {
692  isoPt[isocount] = isotr->pt();
693  isoPhi[isocount] = isotr->phi();
694  isoEta[isocount] = isotr->eta();
695  isocount++;
696  }
697 
698  for (reco::IsolatedPixelTrackCandidateCollection::const_iterator pixtr = isoPixelTracks->begin();
699  pixtr != isoPixelTracks->end();
700  pixtr++) {
701  pixPt[pixcount] = pixtr->pt();
702  pixPhi[pixcount] = pixtr->phi();
703  pixEta[pixcount] = pixtr->eta();
704  pixcount++;
705  }
706  }
707 
708  tTree->Fill();
709 }
710 
711 // ------------ method called once each job just before starting event loop ------------
713  // if(!ReadCalibFactors(calibFactorsFileName_.c_str() )) {cout<<"Cant read file with cailib coefficients!! ---"<<endl;}
714 
715  // try{
716  // edm::ESHandle <HcalRespCorrs> recalibCorrs;
717  // iSetup.get<HcalRespCorrsRcd>().get("recalibrate",recalibCorrs);
718  // respRecalib = recalibCorrs.product();
719  //
720  // edm::LogInfo("CalibConstants")<<" Loaded: OK ";
721  //
722  // }catch(const cms::Exception & e) {
723  // edm::LogWarning("CalibConstants")<<" Not Found!! ";
724  // }
725 
726  // rootFile = new TFile(outputFileName_.c_str(),"RECREATE");
727 
728  //@@@@@@@@@@@@@
729  //TFileDirectory ValDir = fs->mkdir("Validation");
730 
731  nTracks = fs->make<TH1F>("nTracks", "general;number of general tracks", 11, -0.5, 10.5);
732 
733  tTree = fs->make<TTree>("tTree", "Tree for gen info");
734 
735  fTree = fs->make<TTree>("fTree", "Tree for IsoTrack Calibration");
736 
737  fTree->Branch("eventNumber", &eventNumber, "eventNumber/I");
738  fTree->Branch("runNumber", &runNumber, "runNumber/I");
739 
740  fTree->Branch("eClustBefore", &eClustBefore, "eClustBefore/F");
741  fTree->Branch("eClustAfter", &eClustAfter, "eClustAfter/F");
742  fTree->Branch("eTrack", &eTrack, "eTrack/F");
743  fTree->Branch("etaTrack", &etaTrack, "etaTrack/F");
744  fTree->Branch("phiTrack", &phiTrack, "phiTrack/F");
745 
746  fTree->Branch("numHits", &numHits, "numHits/I");
747  fTree->Branch("eECAL", &eECAL, "eECAL/F");
748  fTree->Branch("PtNearBy", &PtNearBy, "PtNearBy/F");
749  fTree->Branch("numValidTrkHits", &numValidTrkHits, "numValidTrkHits/F");
750  fTree->Branch("numValidTrkStrips", &numValidTrkStrips, "numValidTrkStrips/F");
751 
752  fTree->Branch("eBeforeDepth1", &eBeforeDepth1, "eBeforeDepth1/F");
753  fTree->Branch("eBeforeDepth2", &eBeforeDepth2, "eBeforeDepth2/F");
754  fTree->Branch("eAfterDepth1", &eAfterDepth1, "eAfterDepth1/F");
755  fTree->Branch("eAfterDepth2", &eAfterDepth2, "eAfterDepth2/F");
756 
757  fTree->Branch("e3x3Before", &e3x3Before, "e3x3Before/F");
758  fTree->Branch("e3x3After", &e3x3After, "e3x3After/F");
759  fTree->Branch("e5x5Before", &e5x5Before, "e5x5Before/F");
760  fTree->Branch("e5x5After", &e5x5After, "e5x5After/F");
761 
762  fTree->Branch("eCentHitAfter", &eCentHitAfter, "eCentHitAfter/F");
763  fTree->Branch("eCentHitBefore", &eCentHitBefore, "eCentHitBefore/F");
764  fTree->Branch("iEta", &iEta, "iEta/I");
765  fTree->Branch("iPhi", &iPhi, "iPhi/I");
766 
767  fTree->Branch("iEtaTr", &iEtaTr, "iEtaTr/I");
768  fTree->Branch("iPhiTr", &iPhiTr, "iPhiTr/I");
769  fTree->Branch("dietatr", &dietatr, "dietatr/I");
770  fTree->Branch("diphitr", &diphitr, "diphitr/I");
771  fTree->Branch("iDr", &iDr, "iDr/F");
772  fTree->Branch("delR", &delR, "delR/F");
773 
774  fTree->Branch("iTime", &iTime, "iTime/F");
775  fTree->Branch("HTime", HTime, "HTime[numHits]/F");
776 
777  fTree->Branch("xTrkEcal", &xTrkEcal, "xTrkEcal/F");
778  fTree->Branch("yTrkEcal", &yTrkEcal, "yTrkEcal/F");
779  fTree->Branch("zTrkEcal", &zTrkEcal, "zTrkEcal/F");
780  fTree->Branch("xTrkHcal", &xTrkHcal, "xTrkHcal/F");
781  fTree->Branch("yTrkHcal", &yTrkHcal, "yTrkHcal/F");
782  fTree->Branch("zTrkHcal", &zTrkHcal, "zTrkHcal/F");
783 
784  if (takeGenTracks_) {
785  tTree->Branch("gen", &gen, "gen/I");
786  tTree->Branch("iso", &iso, "iso/I");
787  tTree->Branch("pix", &pix, "pix/I");
788  tTree->Branch("genPt", genPt, "genPt[gen]/F");
789  tTree->Branch("genPhi", genPhi, "genPhi[gen]/F");
790  tTree->Branch("genEta", genEta, "genEta[gen]/F");
791 
792  tTree->Branch("isoPt", isoPt, "isoPt[iso]/F");
793  tTree->Branch("isoPhi", isoPhi, "isoPhi[iso]/F");
794  tTree->Branch("isoEta", isoEta, "isoEta[iso]/F");
795 
796  tTree->Branch("pixPt", pixPt, "pixPt[pix]/F");
797  tTree->Branch("pixPhi", pixPhi, "pixPhi[pix]/F");
798  tTree->Branch("pixEta", pixEta, "pixEta[pix]/F");
799  }
800 }
801 
802 //define this as a plug-in
muonTagProbeFilters_cff.matched
matched
Definition: muonTagProbeFilters_cff.py:62
getDistInPlaneSimple
double getDistInPlaneSimple(const GlobalPoint caloPoint, const GlobalPoint rechitPoint)
Definition: ConeDefinition.h:9
ValidIsoTrkCalib::taHCALCone_
double taHCALCone_
Definition: ValidIsoTrkCalib.cc:78
BeamSpotPI::parameters
parameters
Definition: BeamSpotPayloadInspectorHelper.h:29
HcalRespCorrsRcd.h
ValidIsoTrkCalib::PtNearBy
float PtNearBy
Definition: ValidIsoTrkCalib.cc:174
EDAnalyzer.h
HcalRespCorrs
Definition: HcalRespCorrs.h:17
mps_fire.i
i
Definition: mps_fire.py:428
edm::ESInputTag
Definition: ESInputTag.h:87
edm::SortedCollection::const_iterator
std::vector< T >::const_iterator const_iterator
Definition: SortedCollection.h:80
ValidIsoTrkCalib::yTrkEcal
Float_t yTrkEcal
Definition: ValidIsoTrkCalib.cc:134
ValidIsoTrkCalib::Nhits
int Nhits
Definition: ValidIsoTrkCalib.cc:141
ValidIsoTrkCalib::e3x3Before
float e3x3Before
Definition: ValidIsoTrkCalib.cc:168
dqmiodumpmetadata.n
n
Definition: dqmiodumpmetadata.py:28
ValidIsoTrkCalib::trackE
float trackE
Definition: ValidIsoTrkCalib.cc:117
ValidIsoTrkCalib::runNumber
int runNumber
Definition: ValidIsoTrkCalib.cc:173
ValidIsoTrkCalib::pixEta
float pixEta[500]
Definition: ValidIsoTrkCalib.cc:112
TrackAssociatorParameters::useCalo
bool useCalo
Definition: TrackAssociatorParameters.h:81
MaxHit_struct
Definition: CommonUsefulStuff.h:43
HcalDetId::iphi
constexpr int iphi() const
get the cell iphi
Definition: HcalDetId.h:157
ValidIsoTrkCalib::analyze
void analyze(const edm::Event &, const edm::EventSetup &) override
Definition: ValidIsoTrkCalib.cc:235
MaxHit_struct::hitenergy
float hitenergy
Definition: CommonUsefulStuff.h:47
TrackDetectorAssociator.h
ValidIsoTrkCalib::beginJob
void beginJob() override
Definition: ValidIsoTrkCalib.cc:712
ValidIsoTrkCalib::eBeforeDepth2
float eBeforeDepth2
Definition: ValidIsoTrkCalib.cc:153
CaloGeometry::getPosition
GlobalPoint getPosition(const DetId &id) const
Get the position of a given detector id.
Definition: CaloGeometry.cc:50
edm::EDGetTokenT< reco::TrackCollection >
ValidIsoTrkCalib::xTrkEcal
Float_t xTrkEcal
Definition: ValidIsoTrkCalib.cc:133
ValidIsoTrkCalib::calibrationConeSize_
double calibrationConeSize_
Definition: ValidIsoTrkCalib.cc:100
TrackDetectorAssociator::useDefaultPropagator
void useDefaultPropagator()
use the default propagator
Definition: TrackDetectorAssociator.cc:81
ValidIsoTrkCalib::trackAssociator_
TrackDetectorAssociator trackAssociator_
Definition: ValidIsoTrkCalib.cc:75
gather_cfg.cout
cout
Definition: gather_cfg.py:144
pos
Definition: PixelAliasList.h:18
EBDetId.h
EEDetId.h
DetId::Hcal
Definition: DetId.h:28
ValidIsoTrkCalib::eTrack
float eTrack
Definition: ValidIsoTrkCalib.cc:144
MaxHit_struct::dr
float dr
Definition: CommonUsefulStuff.h:48
CaloGeometry::getSubdetectorGeometry
const CaloSubdetectorGeometry * getSubdetectorGeometry(const DetId &id) const
access the subdetector geometry for the given subdetector directly
Definition: CaloGeometry.cc:34
edm::SortedCollection
Definition: SortedCollection.h:49
edm::EDConsumerBase::consumesCollector
ConsumesCollector consumesCollector()
Use a ConsumesCollector to gather consumes information from helper functions.
Definition: EDConsumerBase.cc:46
info
static const TGPicture * info(bool iBackgroundIsBlack)
Definition: FWCollectionSummaryWidget.cc:153
edm::ParameterSet::getUntrackedParameter
T getUntrackedParameter(std::string const &, T const &) const
ValidIsoTrkCalib::emEnergy
Float_t emEnergy
Definition: ValidIsoTrkCalib.cc:126
TrackAssociatorParameters::useMuon
bool useMuon
Definition: TrackAssociatorParameters.h:83
edm::LogInfo
Log< level::Info, false > LogInfo
Definition: MessageLogger.h:125
edm::one::EDAnalyzer
Definition: EDAnalyzer.h:30
HcalBarrel
Definition: HcalAssistant.h:33
IsolatedPixelTrackCandidate.h
edm::Handle< reco::TrackCollection >
edm::LogWarning
Log< level::Warning, false > LogWarning
Definition: MessageLogger.h:122
ValidIsoTrkCalib::maxPNear
double maxPNear
Definition: ValidIsoTrkCalib.cc:123
HcalCondObjectContainer::getValues
const Item * getValues(DetId fId, bool throwOnFail=true) const
Definition: HcalCondObjectContainer.h:159
ValidIsoTrkCalib::iDr
float iDr
Definition: ValidIsoTrkCalib.cc:162
EcalRecHitCollections.h
ValidIsoTrkCalib::targetE
Float_t targetE
Definition: ValidIsoTrkCalib.cc:127
HcalGeometry.h
ValidIsoTrkCalib::geo
const CaloGeometry * geo
Definition: ValidIsoTrkCalib.cc:80
ValidIsoTrkCalib::numValidTrkHits
float numValidTrkHits
Definition: ValidIsoTrkCalib.cc:175
ValidIsoTrkCalib::pix
int pix
Definition: ValidIsoTrkCalib.cc:109
ValidIsoTrkCalib::eCentHitBefore
float eCentHitBefore
Definition: ValidIsoTrkCalib.cc:155
LEDCalibrationChannels.iphi
iphi
Definition: LEDCalibrationChannels.py:64
ValidIsoTrkCalib::isoPt
float isoPt[500]
Definition: ValidIsoTrkCalib.cc:111
ValidIsoTrkCalib::e5x5Before
float e5x5Before
Definition: ValidIsoTrkCalib.cc:170
ValidIsoTrkCalib::eClustAfter
float eClustAfter
Definition: ValidIsoTrkCalib.cc:143
ValidIsoTrkCalib::NisoTrk
int NisoTrk
Definition: ValidIsoTrkCalib.cc:116
ValidIsoTrkCalib::AxB_
string AxB_
Definition: ValidIsoTrkCalib.cc:99
ValidIsoTrkCalib::MinNTrackHitsBarrel
int MinNTrackHitsBarrel
Definition: ValidIsoTrkCalib.cc:122
CaloGeometry
Definition: CaloGeometry.h:21
ValidIsoTrkCalib::tTree
TTree * tTree
Definition: ValidIsoTrkCalib.cc:131
ValidIsoTrkCalib::eECAL
float eECAL
Definition: ValidIsoTrkCalib.cc:147
CommonUsefulStuff.h
ValidIsoTrkCalib::numHits
int numHits
Definition: ValidIsoTrkCalib.cc:148
ValidIsoTrkCalib::parameters_
TrackAssociatorParameters parameters_
Definition: ValidIsoTrkCalib.cc:76
ValidIsoTrkCalib::eAfterDepth1
float eAfterDepth1
Definition: ValidIsoTrkCalib.cc:152
DEFINE_FWK_MODULE
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
ValidIsoTrkCalib::ValidIsoTrkCalib
ValidIsoTrkCalib(const edm::ParameterSet &)
Definition: ValidIsoTrkCalib.cc:187
ValidIsoTrkCalib::trackPt
float trackPt
Definition: ValidIsoTrkCalib.cc:117
MaxHit_struct::iphihitm
int iphihitm
Definition: CommonUsefulStuff.h:44
edm::SortedCollection::begin
const_iterator begin() const
Definition: SortedCollection.h:262
ValidIsoTrkCalib::e3x3After
float e3x3After
Definition: ValidIsoTrkCalib.cc:169
mathSSE::sqrt
T sqrt(T t)
Definition: SSEVec.h:19
ValidIsoTrkCalib::CentHitFactor
float CentHitFactor
Definition: ValidIsoTrkCalib.cc:157
MaxHit_struct::ietahitm
int ietahitm
Definition: CommonUsefulStuff.h:45
ValidIsoTrkCalib::genhbheLabel_
edm::InputTag genhbheLabel_
Definition: ValidIsoTrkCalib.cc:82
ValidIsoTrkCalib::numVH
float numVH
Definition: ValidIsoTrkCalib.cc:175
ValidIsoTrkCalib::zTrkEcal
Float_t zTrkEcal
Definition: ValidIsoTrkCalib.cc:135
ValidIsoTrkCalib::MinNTECHitsEndcap
int MinNTECHitsEndcap
Definition: ValidIsoTrkCalib.cc:122
DQMScaleToClient_cfi.factor
factor
Definition: DQMScaleToClient_cfi.py:8
ValidIsoTrkCalib::genPt
float genPt[500]
Definition: ValidIsoTrkCalib.cc:110
ValidIsoTrkCalib::xTrkHcal
Float_t xTrkHcal
Definition: ValidIsoTrkCalib.cc:137
ValidIsoTrkCalib::eAfterDepth2
float eAfterDepth2
Definition: ValidIsoTrkCalib.cc:154
ValidIsoTrkCalib::allowMissingInputs_
bool allowMissingInputs_
Definition: ValidIsoTrkCalib.cc:102
Point3DBase< float, GlobalTag >
TrackAssociatorParameters::loadParameters
void loadParameters(const edm::ParameterSet &, edm::ConsumesCollector &)
Definition: TrackAssociatorParameters.cc:18
gen
Definition: PythiaDecays.h:13
ValidIsoTrkCalib::outputFileName_
string outputFileName_
Definition: ValidIsoTrkCalib.cc:103
LEDCalibrationChannels.depth
depth
Definition: LEDCalibrationChannels.py:65
ValidIsoTrkCalib::fs
edm::Service< TFileService > fs
Definition: ValidIsoTrkCalib.cc:183
ValidIsoTrkCalib::trackPhi
float trackPhi
Definition: ValidIsoTrkCalib.cc:117
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
EcalSubdetector.h
ValidIsoTrkCalib::tok_recalibCorrs_
edm::ESGetToken< HcalRespCorrs, HcalRespCorrsRcd > tok_recalibCorrs_
Definition: ValidIsoTrkCalib.cc:92
ValidIsoTrkCalib::HTime
float HTime[100]
Definition: ValidIsoTrkCalib.cc:167
ValidIsoTrkCalib::iEtaTr
int iEtaTr
Definition: ValidIsoTrkCalib.cc:160
ValidIsoTrkCalib::iEta
int iEta
Definition: ValidIsoTrkCalib.cc:158
ValidIsoTrkCalib::isoPhi
float isoPhi[500]
Definition: ValidIsoTrkCalib.cc:111
LEDCalibrationChannels.ieta
ieta
Definition: LEDCalibrationChannels.py:63
ValidIsoTrkCalib::e5x5After
float e5x5After
Definition: ValidIsoTrkCalib.cc:171
CaloSubdetectorGeometry.h
HcalDetId::ieta
constexpr int ieta() const
get the cell ieta
Definition: HcalDetId.h:155
ValidIsoTrkCalib::energyMaxIso
double energyMaxIso
Definition: ValidIsoTrkCalib.cc:124
ValidIsoTrkCalib::eventNumber
int eventNumber
Definition: ValidIsoTrkCalib.cc:172
edm::ParameterSet
Definition: ParameterSet.h:47
ValidIsoTrkCalib::zTrkHcal
Float_t zTrkHcal
Definition: ValidIsoTrkCalib.cc:139
ValidIsoTrkCalib::pixPt
float pixPt[500]
Definition: ValidIsoTrkCalib.cc:112
ValidIsoTrkCalib::trackEta
float trackEta
Definition: ValidIsoTrkCalib.cc:117
TrackDetectorAssociator::getFreeTrajectoryState
static FreeTrajectoryState getFreeTrajectoryState(const MagneticField *, const reco::Track &)
get FreeTrajectoryState from different track representations
Definition: TrackDetectorAssociator.cc:553
edm::SortedCollection::end
const_iterator end() const
Definition: SortedCollection.h:267
HcalDetId.h
ValidIsoTrkCalib::iPhi
int iPhi
Definition: ValidIsoTrkCalib.cc:159
ValidIsoTrkCalib::pixPhi
float pixPhi[500]
Definition: ValidIsoTrkCalib.cc:112
TrackDetectorAssociator
Definition: TrackDetectorAssociator.h:44
ValidIsoTrkCalib::delR
float delR
Definition: ValidIsoTrkCalib.cc:162
CaloTopologyRecord.h
reco::JetExtendedAssociation::getValue
const JetExtendedData & getValue(const Container &, const reco::JetBaseRef &)
get value for the association. Throw exception if no association found
Definition: JetExtendedAssociation.cc:50
ValidIsoTrkCalib::associationConeSize_
double associationConeSize_
Definition: ValidIsoTrkCalib.cc:98
ValidIsoTrkCalib::numVS
float numVS
Definition: ValidIsoTrkCalib.cc:175
ValidIsoTrkCalib::genEta
float genEta[500]
Definition: ValidIsoTrkCalib.cc:110
HcalDetId
Definition: HcalDetId.h:12
edm::Service< TFileService >
ValidIsoTrkCalib::taECALCone_
double taECALCone_
Definition: ValidIsoTrkCalib.cc:77
iEvent
int iEvent
Definition: GenABIO.cc:224
ValidIsoTrkCalib::genhoLabel_
edm::InputTag genhoLabel_
Definition: ValidIsoTrkCalib.cc:83
ValidIsoTrkCalib::tok_ho_
edm::EDGetTokenT< HORecHitCollection > tok_ho_
Definition: ValidIsoTrkCalib.cc:88
ValidIsoTrkCalib::tok_track_
edm::EDGetTokenT< reco::IsolatedPixelTrackCandidateCollection > tok_track_
Definition: ValidIsoTrkCalib.cc:89
ValidIsoTrkCalib::tok_geom_
edm::ESGetToken< CaloGeometry, CaloGeometryRecord > tok_geom_
Definition: ValidIsoTrkCalib.cc:93
ValidIsoTrkCalib::tok_track1_
edm::EDGetTokenT< reco::TrackCollection > tok_track1_
Definition: ValidIsoTrkCalib.cc:90
ValidIsoTrkCalib::eCentHitAfter
float eCentHitAfter
Definition: ValidIsoTrkCalib.cc:156
edm::EventSetup
Definition: EventSetup.h:57
ValidIsoTrkCalib::iso
int iso
Definition: ValidIsoTrkCalib.cc:109
HcalRespCorrs.h
ValidIsoTrkCalib::tok_genTrack_
edm::EDGetTokenT< reco::TrackCollection > tok_genTrack_
Definition: ValidIsoTrkCalib.cc:86
ValidIsoTrkCalib::eBeforeDepth1
float eBeforeDepth1
Definition: ValidIsoTrkCalib.cc:151
ValidIsoTrkCalib::ptNear
float ptNear
Definition: ValidIsoTrkCalib.cc:118
edm::ESGetToken< HcalRespCorrs, HcalRespCorrsRcd >
edm::EventSetup::getData
bool getData(T &iHolder) const
Definition: EventSetup.h:120
ValidIsoTrkCalib::eClustBefore
float eClustBefore
Definition: ValidIsoTrkCalib.cc:142
photonIsolationHIProducer_cfi.hbhe
hbhe
Definition: photonIsolationHIProducer_cfi.py:8
TrackDetMatchInfo
Definition: TrackDetMatchInfo.h:13
GeomDet.h
CaloCellGeometry.h
TrackAssociatorParameters::useHcal
bool useHcal
Definition: TrackAssociatorParameters.h:79
ValidIsoTrkCalib::energyMinIso
double energyMinIso
Definition: ValidIsoTrkCalib.cc:124
ValidIsoTrkCalib::dietatr
int dietatr
Definition: ValidIsoTrkCalib.cc:163
ValidIsoTrkCalib::fTree
TTree * fTree
Definition: ValidIsoTrkCalib.cc:131
ValidIsoTrkCalib::ptrack
float ptrack
Definition: ValidIsoTrkCalib.cc:119
ValidIsoTrkCalib::takeGenTracks_
bool takeGenTracks_
Definition: ValidIsoTrkCalib.cc:107
ValidIsoTrkCalib::gen
int gen
Definition: ValidIsoTrkCalib.cc:109
Frameworkfwd.h
ValidIsoTrkCalib::energyECALmip
double energyECALmip
Definition: ValidIsoTrkCalib.cc:123
ValidIsoTrkCalib::isoEta
float isoEta[500]
Definition: ValidIsoTrkCalib.cc:111
ValidIsoTrkCalib::phiTrack
float phiTrack
Definition: ValidIsoTrkCalib.cc:146
CaloGeometry.h
TFileService::kSharedResource
static const std::string kSharedResource
Definition: TFileService.h:76
ValidIsoTrkCalib::diphitr
int diphitr
Definition: ValidIsoTrkCalib.cc:164
ValidIsoTrkCalib::tok_hbhe_
edm::EDGetTokenT< HBHERecHitCollection > tok_hbhe_
Definition: ValidIsoTrkCalib.cc:87
ValidIsoTrkCalib::nTracks
TH1F * nTracks
Definition: ValidIsoTrkCalib.cc:181
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
HcalRecHitCollections.h
ValidIsoTrkCalib::iTime
float iTime
Definition: ValidIsoTrkCalib.cc:166
TrackAssociatorParameters::bFieldToken
edm::ESGetToken< MagneticField, IdealMagneticFieldRecord > bFieldToken
Definition: TrackAssociatorParameters.h:130
ValidIsoTrkCalib::etaTrack
float etaTrack
Definition: ValidIsoTrkCalib.cc:145
edm::EDConsumerBase::esConsumes
auto esConsumes()
Definition: EDConsumerBase.h:200
isolatedTracks_cfi.generalTracks
generalTracks
Definition: isolatedTracks_cfi.py:31
cms::Exception
Definition: Exception.h:70
ValidIsoTrkCalib::genecalLabel_
std::vector< edm::InputTag > genecalLabel_
Definition: ValidIsoTrkCalib.cc:84
funct::abs
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
TrackDetectorAssociator::associate
TrackDetMatchInfo associate(const edm::Event &, const edm::EventSetup &, const FreeTrajectoryState &, const AssociatorParameters &)
Definition: TrackDetectorAssociator.cc:110
ValidIsoTrkCalib::genPhi
float genPhi[500]
Definition: ValidIsoTrkCalib.cc:110
ValidIsoTrkCalib
Definition: ValidIsoTrkCalib.cc:61
ValidIsoTrkCalib::iPhiTr
int iPhiTr
Definition: ValidIsoTrkCalib.cc:161
ValidIsoTrkCalib::rvert
float rvert
Definition: ValidIsoTrkCalib.cc:119
ValidIsoTrkCalib::respRecalib
const HcalRespCorrs * respRecalib
Definition: ValidIsoTrkCalib.cc:177
edm::Event
Definition: Event.h:73
HcalGeometry
Definition: HcalGeometry.h:17
ValidIsoTrkCalib::yTrkHcal
Float_t yTrkHcal
Definition: ValidIsoTrkCalib.cc:138
ValidIsoTrkCalib::numValidTrkStrips
float numValidTrkStrips
Definition: ValidIsoTrkCalib.cc:175
IsolatedPixelTrackCandidateFwd.h
edm::InputTag
Definition: InputTag.h:15
edm::ConsumesCollector
Definition: ConsumesCollector.h:45
TFileService::make
T * make(const Args &... args) const
make new ROOT object
Definition: TFileService.h:64
TrackAssociatorParameters::useEcal
bool useEcal
Definition: TrackAssociatorParameters.h:78
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37
HcalGeometry::getClosestCell
DetId getClosestCell(const GlobalPoint &r) const override
Definition: HcalGeometry.cc:107
TrackAssociatorParameters
Definition: TrackAssociatorParameters.h:43
MaxHit_struct::depthhit
int depthhit
Definition: CommonUsefulStuff.h:46