CMS 3D CMS Logo

IsolatedTracksNxN.cc
Go to the documentation of this file.
1 // -*- C++ -*
2 //
3 // Package: IsolatedParticles
4 // Class: IsolatedTracksNxN
5 //
13 //
14 // Original Author: Seema Sharma
15 // Created: Mon Aug 10 15:30:40 CST 2009
16 //
17 //
18 
19 // system include files
20 #include <cmath>
21 #include <map>
22 #include <string>
23 #include <vector>
24 
25 // user include files
26 #include <Math/GenVector/VectorUtil.h>
27 
28 // root objects
29 #include "TROOT.h"
30 #include "TSystem.h"
31 #include "TFile.h"
32 #include "TH1F.h"
33 #include "TH2F.h"
34 #include "TProfile.h"
35 #include "TDirectory.h"
36 #include "TTree.h"
37 
46 
48 //L1 trigger Menus etc
57 
62 // muons and tracks
67 // Vertices
71 // Calorimeters
78 // Trigger
86 //L1 objects
93 // Jets in the event
97 
106 // TFile Service
109 
110 // ecal / hcal
118 
121 
125 
126 // SimHit + SimTrack
132 
133 // track associator
138 
139 class IsolatedTracksNxN : public edm::one::EDAnalyzer<edm::one::SharedResources> {
140 public:
141  explicit IsolatedTracksNxN(const edm::ParameterSet &);
142  ~IsolatedTracksNxN() override;
143 
144  static void fillDescriptions(edm::ConfigurationDescriptions &descriptions);
145 
146 private:
147  void beginJob() override;
148  void analyze(const edm::Event &, const edm::EventSetup &) override;
149  void endJob() override;
150 
151  void printTrack(const reco::Track *pTrack);
152 
153  void bookHistograms();
154 
155  double deltaPhi(double v1, double v2);
156  double deltaR(double eta1, double phi1, double eta2, double phi2);
157 
158  void clearTreeVectors();
159 
160 private:
162  static constexpr size_t nL1BitsMax = 128;
164 
165  // map of trig bit, algo name and num events passed
166  std::map<std::pair<unsigned int, std::string>, int> l1AlgoMap_;
167  std::vector<unsigned int> m_triggerMaskAlgoTrig;
168 
169  const bool doMC_, writeAllTracks_;
170  const int myverbose_;
171  const double pvTracksPtMin_;
172  const int debugTrks_;
174  const double minTrackP_, maxTrackEta_;
176  const double tMinE_, tMaxE_, tMinH_, tMaxH_;
177  bool initL1_;
179 
183 
187 
190 
194 
202 
203  static constexpr size_t NPBins = 15;
204  static constexpr size_t NEtaBins = 3;
205  double genPartPBins[NPBins + 1], genPartEtaBins[NEtaBins + 1];
206 
211  TH1F *h_nTracks;
218 
219  TTree *tree_;
220 
223  std::vector<std::string> *t_L1AlgoNames;
224  std::vector<int> *t_L1PreScale;
225  int t_L1Decision[128];
226 
227  std::vector<double> *t_L1CenJetPt, *t_L1CenJetEta, *t_L1CenJetPhi;
228  std::vector<double> *t_L1FwdJetPt, *t_L1FwdJetEta, *t_L1FwdJetPhi;
229  std::vector<double> *t_L1TauJetPt, *t_L1TauJetEta, *t_L1TauJetPhi;
230  std::vector<double> *t_L1MuonPt, *t_L1MuonEta, *t_L1MuonPhi;
231  std::vector<double> *t_L1IsoEMPt, *t_L1IsoEMEta, *t_L1IsoEMPhi;
233  std::vector<double> *t_L1METPt, *t_L1METEta, *t_L1METPhi;
234 
235  std::vector<double> *t_PVx, *t_PVy, *t_PVz, *t_PVTracksSumPt;
238  std::vector<int> *t_PVNTracksHP, *t_PVNTracksHPWt;
239 
240  std::vector<double> *t_jetPt, *t_jetEta, *t_jetPhi;
241  std::vector<double> *t_nTrksJetCalo, *t_nTrksJetVtx;
242 
244  std::vector<double> *t_trackPtAll;
246 
247  std::vector<double> *t_trackP, *t_trackPt, *t_trackEta, *t_trackPhi;
249  std::vector<double> *t_trackDxy, *t_trackDxyBS, *t_trackDz, *t_trackDzBS;
250  std::vector<double> *t_trackDxyPV, *t_trackDzPV;
251  std::vector<double> *t_trackChiSq;
252  std::vector<int> *t_trackPVIdx;
253 
254  std::vector<int> *t_NLayersCrossed, *t_trackNOuterHits;
255  std::vector<int> *t_trackHitsTOB, *t_trackHitsTEC;
262  std::vector<double> *t_trackOutPosOutHitDr, *t_trackL;
263 
264  std::vector<double> *t_maxNearP31x31;
265  std::vector<double> *t_maxNearP21x21;
266  std::vector<int> *t_ecalSpike11x11;
267 
268  std::vector<double> *t_e7x7, *t_e9x9, *t_e11x11, *t_e15x15;
274 
275  std::vector<double> *t_esimPdgId, *t_simTrackP, *t_trkEcalEne;
276  std::vector<double> *t_esim7x7, *t_esim9x9, *t_esim11x11, *t_esim15x15;
282 
284  std::vector<double> *t_h3x3, *t_h5x5, *t_h7x7;
285  std::vector<double> *t_h3x3Sig, *t_h5x5Sig, *t_h7x7Sig;
286  std::vector<int> *t_infoHcal;
287 
288  std::vector<double> *t_trkHcalEne;
289  std::vector<double> *t_hsim3x3, *t_hsim5x5, *t_hsim7x7;
291  std::vector<double> *t_hsim3x3Rest, *t_hsim5x5Rest, *t_hsim7x7Rest;
295 };
296 
297 static const bool useL1EventSetup(true);
298 static const bool useL1GtTriggerMenuLite(true);
299 
303  doMC_(iConfig.getUntrackedParameter<bool>("doMC", false)),
304  writeAllTracks_(iConfig.getUntrackedParameter<bool>("writeAllTracks", false)),
305  myverbose_(iConfig.getUntrackedParameter<int>("verbosity", 5)),
306  pvTracksPtMin_(iConfig.getUntrackedParameter<double>("pvTracksPtMin", 1.0)),
307  debugTrks_(iConfig.getUntrackedParameter<int>("debugTracks", 0)),
308  printTrkHitPattern_(iConfig.getUntrackedParameter<bool>("printTrkHitPattern", false)),
309  minTrackP_(iConfig.getUntrackedParameter<double>("minTrackP", 1.0)),
310  maxTrackEta_(iConfig.getUntrackedParameter<double>("maxTrackEta", 5.0)),
311  debugL1Info_(iConfig.getUntrackedParameter<bool>("debugL1Info", false)),
312  L1TriggerAlgoInfo_(iConfig.getUntrackedParameter<bool>("l1TriggerAlgoInfo", false)),
313  tMinE_(iConfig.getUntrackedParameter<double>("timeMinCutECAL", -500.)),
314  tMaxE_(iConfig.getUntrackedParameter<double>("timeMaxCutECAL", 500.)),
315  tMinH_(iConfig.getUntrackedParameter<double>("timeMinCutHCAL", -500.)),
316  tMaxH_(iConfig.getUntrackedParameter<double>("timeMaxCutHCAL", 500.)),
340  t_PVx(nullptr),
341  t_PVy(nullptr),
342  t_PVz(nullptr),
350  t_PVndof(nullptr),
353  t_jetPt(nullptr),
354  t_jetEta(nullptr),
355  t_jetPhi(nullptr),
368  t_trackP(nullptr),
407  t_trackL(nullptr),
411  t_e7x7(nullptr),
412  t_e9x9(nullptr),
413  t_e11x11(nullptr),
414  t_e15x15(nullptr),
465  t_h3x3(nullptr),
466  t_h5x5(nullptr),
467  t_h7x7(nullptr),
491  usesResource(TFileService::kSharedResource);
492 
493  //now do what ever initialization is needed
494 
495  edm::InputTag L1extraTauJetSource_ = iConfig.getParameter<edm::InputTag>("l1extraTauJetSource");
496  edm::InputTag L1extraCenJetSource_ = iConfig.getParameter<edm::InputTag>("l1extraCenJetSource");
497  edm::InputTag L1extraFwdJetSource_ = iConfig.getParameter<edm::InputTag>("l1extraFwdJetSource");
498  edm::InputTag L1extraMuonSource_ = iConfig.getParameter<edm::InputTag>("l1extraMuonSource");
499  edm::InputTag L1extraIsoEmSource_ = iConfig.getParameter<edm::InputTag>("l1extraIsoEmSource");
500  edm::InputTag L1extraNonIsoEmSource_ = iConfig.getParameter<edm::InputTag>("l1extraNonIsoEmSource");
501  edm::InputTag L1GTReadoutRcdSource_ = iConfig.getParameter<edm::InputTag>("l1GTReadoutRcdSource");
502  edm::InputTag L1GTObjectMapRcdSource_ = iConfig.getParameter<edm::InputTag>("l1GTObjectMapRcdSource");
503  edm::InputTag JetSrc_ = iConfig.getParameter<edm::InputTag>("jetSource");
504  edm::InputTag JetExtender_ = iConfig.getParameter<edm::InputTag>("jetExtender");
505  edm::InputTag HBHERecHitSource_ = iConfig.getParameter<edm::InputTag>("hbheRecHitSource");
506 
507  // define tokens for access
508  tok_L1extTauJet_ = consumes<l1extra::L1JetParticleCollection>(L1extraTauJetSource_);
509  tok_L1extCenJet_ = consumes<l1extra::L1JetParticleCollection>(L1extraCenJetSource_);
510  tok_L1extFwdJet_ = consumes<l1extra::L1JetParticleCollection>(L1extraFwdJetSource_);
511  tok_L1extMu_ = consumes<l1extra::L1MuonParticleCollection>(L1extraMuonSource_);
512  tok_L1extIsoEm_ = consumes<l1extra::L1EmParticleCollection>(L1extraIsoEmSource_);
513  tok_L1extNoIsoEm_ = consumes<l1extra::L1EmParticleCollection>(L1extraNonIsoEmSource_);
514  tok_jets_ = consumes<reco::CaloJetCollection>(JetSrc_);
515  tok_hbhe_ = consumes<HBHERecHitCollection>(HBHERecHitSource_);
516 
517  tok_genTrack_ = consumes<reco::TrackCollection>(edm::InputTag("generalTracks"));
518  tok_recVtx_ = consumes<reco::VertexCollection>(edm::InputTag("offlinePrimaryVertices"));
519  tok_bs_ = consumes<reco::BeamSpot>(edm::InputTag("offlineBeamSpot"));
520  tok_EB_ = consumes<EcalRecHitCollection>(edm::InputTag("ecalRecHit", "EcalRecHitsEB"));
521  tok_EE_ = consumes<EcalRecHitCollection>(edm::InputTag("ecalRecHit", "EcalRecHitsEE"));
522 
523  tok_simTk_ = consumes<edm::SimTrackContainer>(edm::InputTag("g4SimHits"));
524  tok_simVtx_ = consumes<edm::SimVertexContainer>(edm::InputTag("g4SimHits"));
525  tok_caloEB_ = consumes<edm::PCaloHitContainer>(edm::InputTag("g4SimHits", "EcalHitsEB"));
526  tok_caloEE_ = consumes<edm::PCaloHitContainer>(edm::InputTag("g4SimHits", "EcalHitsEE"));
527  tok_caloHH_ = consumes<edm::PCaloHitContainer>(edm::InputTag("g4SimHits", "HcalHits"));
528 
529  if (myverbose_ >= 0) {
530  edm::LogVerbatim("IsoTrack") << "Parameters read from config file \n"
531  << " doMC " << doMC_ << "\t myverbose " << myverbose_ << "\t minTrackP "
532  << minTrackP_ << "\t maxTrackEta " << maxTrackEta_ << "\t tMinE " << tMinE_
533  << "\t tMaxE " << tMaxE_ << "\t tMinH " << tMinH_ << "\t tMaxH " << tMaxH_
534  << "\n debugL1Info " << debugL1Info_ << "\t L1TriggerAlgoInfo " << L1TriggerAlgoInfo_
535  << "\n";
536  }
537 }
538 
540  delete t_PVx;
541  delete t_PVy;
542  delete t_PVz;
543  delete t_PVisValid;
544  delete t_PVndof;
545  delete t_PVNTracks;
546  delete t_PVNTracksWt;
547  delete t_PVTracksSumPt;
548  delete t_PVTracksSumPtWt;
549  delete t_PVNTracksHP;
550  delete t_PVNTracksHPWt;
551  delete t_PVTracksSumPtHP;
552  delete t_PVTracksSumPtHPWt;
553  delete t_L1AlgoNames;
554  delete t_L1PreScale;
555  delete t_L1CenJetPt;
556  delete t_L1CenJetEta;
557  delete t_L1CenJetPhi;
558  delete t_L1FwdJetPt;
559  delete t_L1FwdJetEta;
560  delete t_L1FwdJetPhi;
561  delete t_L1TauJetPt;
562  delete t_L1TauJetEta;
563  delete t_L1TauJetPhi;
564  delete t_L1MuonPt;
565  delete t_L1MuonEta;
566  delete t_L1MuonPhi;
567  delete t_L1IsoEMPt;
568  delete t_L1IsoEMEta;
569  delete t_L1IsoEMPhi;
570  delete t_L1NonIsoEMPt;
571  delete t_L1NonIsoEMEta;
572  delete t_L1NonIsoEMPhi;
573  delete t_L1METPt;
574  delete t_L1METEta;
575  delete t_L1METPhi;
576  delete t_jetPt;
577  delete t_jetEta;
578  delete t_jetPhi;
579  delete t_nTrksJetCalo;
580  delete t_nTrksJetVtx;
581  delete t_trackPAll;
582  delete t_trackEtaAll;
583  delete t_trackPhiAll;
584  delete t_trackPdgIdAll;
585  delete t_trackPtAll;
586  delete t_trackDxyAll;
587  delete t_trackDzAll;
588  delete t_trackDxyPVAll;
589  delete t_trackDzPVAll;
590  delete t_trackChiSqAll;
591  delete t_trackP;
592  delete t_trackPt;
593  delete t_trackEta;
594  delete t_trackPhi;
595  delete t_trackEcalEta;
596  delete t_trackEcalPhi;
597  delete t_trackHcalEta;
598  delete t_trackHcalPhi;
599  delete t_trackNOuterHits;
600  delete t_NLayersCrossed;
601  delete t_trackDxy;
602  delete t_trackDxyBS;
603  delete t_trackDz;
604  delete t_trackDzBS;
605  delete t_trackDxyPV;
606  delete t_trackDzPV;
607  delete t_trackPVIdx;
608  delete t_trackChiSq;
609  delete t_trackHitsTOB;
610  delete t_trackHitsTEC;
611  delete t_trackHitInMissTOB;
612  delete t_trackHitInMissTEC;
613  delete t_trackHitInMissTIB;
614  delete t_trackHitInMissTID;
615  delete t_trackHitInMissTIBTID;
616  delete t_trackHitOutMissTOB;
617  delete t_trackHitOutMissTEC;
618  delete t_trackHitOutMissTIB;
619  delete t_trackHitOutMissTID;
621  delete t_trackHitInMeasTOB;
622  delete t_trackHitInMeasTEC;
623  delete t_trackHitInMeasTIB;
624  delete t_trackHitInMeasTID;
625  delete t_trackHitOutMeasTOB;
626  delete t_trackHitOutMeasTEC;
627  delete t_trackHitOutMeasTIB;
628  delete t_trackHitOutMeasTID;
629  delete t_trackOutPosOutHitDr;
630  delete t_trackL;
631  delete t_maxNearP31x31;
632  delete t_maxNearP21x21;
633  delete t_ecalSpike11x11;
634  delete t_e7x7;
635  delete t_e9x9;
636  delete t_e11x11;
637  delete t_e15x15;
638  delete t_e7x7_10Sig;
639  delete t_e9x9_10Sig;
640  delete t_e11x11_10Sig;
641  delete t_e15x15_10Sig;
642  delete t_e7x7_15Sig;
643  delete t_e9x9_15Sig;
644  delete t_e11x11_15Sig;
645  delete t_e15x15_15Sig;
646  delete t_e7x7_20Sig;
647  delete t_e9x9_20Sig;
648  delete t_e11x11_20Sig;
649  delete t_e15x15_20Sig;
650  delete t_e7x7_25Sig;
651  delete t_e9x9_25Sig;
652  delete t_e11x11_25Sig;
653  delete t_e15x15_25Sig;
654  delete t_e7x7_30Sig;
655  delete t_e9x9_30Sig;
656  delete t_e11x11_30Sig;
657  delete t_e15x15_30Sig;
658  delete t_esim7x7;
659  delete t_esim9x9;
660  delete t_esim11x11;
661  delete t_esim15x15;
662  delete t_esim7x7Matched;
663  delete t_esim9x9Matched;
664  delete t_esim11x11Matched;
665  delete t_esim15x15Matched;
666  delete t_esim7x7Rest;
667  delete t_esim9x9Rest;
668  delete t_esim11x11Rest;
669  delete t_esim15x15Rest;
670  delete t_esim7x7Photon;
671  delete t_esim9x9Photon;
672  delete t_esim11x11Photon;
673  delete t_esim15x15Photon;
674  delete t_esim7x7NeutHad;
675  delete t_esim9x9NeutHad;
676  delete t_esim11x11NeutHad;
677  delete t_esim15x15NeutHad;
678  delete t_esim7x7CharHad;
679  delete t_esim9x9CharHad;
680  delete t_esim11x11CharHad;
681  delete t_esim15x15CharHad;
682  delete t_trkEcalEne;
683  delete t_simTrackP;
684  delete t_esimPdgId;
685  delete t_maxNearHcalP3x3;
686  delete t_maxNearHcalP5x5;
687  delete t_maxNearHcalP7x7;
688  delete t_h3x3;
689  delete t_h5x5;
690  delete t_h7x7;
691  delete t_h3x3Sig;
692  delete t_h5x5Sig;
693  delete t_h7x7Sig;
694  delete t_infoHcal;
695  delete t_trkHcalEne;
696  delete t_hsim3x3;
697  delete t_hsim5x5;
698  delete t_hsim7x7;
699  delete t_hsim3x3Matched;
700  delete t_hsim5x5Matched;
701  delete t_hsim7x7Matched;
702  delete t_hsim3x3Rest;
703  delete t_hsim5x5Rest;
704  delete t_hsim7x7Rest;
705  delete t_hsim3x3Photon;
706  delete t_hsim5x5Photon;
707  delete t_hsim7x7Photon;
708  delete t_hsim3x3NeutHad;
709  delete t_hsim5x5NeutHad;
710  delete t_hsim7x7NeutHad;
711  delete t_hsim3x3CharHad;
712  delete t_hsim5x5CharHad;
713  delete t_hsim7x7CharHad;
714 }
715 
718  desc.addUntracked<bool>("doMC", false);
719  desc.addUntracked<bool>("writeAllTracks", false);
720  desc.addUntracked<int>("verbosity", 1);
721  desc.addUntracked<double>("pvTracksPtMin", 0.200);
722  desc.addUntracked<int>("debugTracks", 0);
723  desc.addUntracked<bool>("printTrkHitPattern", true);
724  desc.addUntracked<double>("minTrackP", 1.0);
725  desc.addUntracked<double>("maxTrackEta", 2.6);
726  desc.addUntracked<bool>("debugL1Info", false);
727  desc.addUntracked<bool>("l1TriggerAlgoInfo", false);
728  desc.add<edm::InputTag>("l1extraTauJetSource", edm::InputTag("l1extraParticles", "Tau"));
729  desc.add<edm::InputTag>("l1extraCenJetSource", edm::InputTag("l1extraParticles", "Central"));
730  desc.add<edm::InputTag>("l1extraFwdJetSource", edm::InputTag("l1extraParticles", "Forward"));
731  desc.add<edm::InputTag>("l1extraMuonSource", edm::InputTag("l1extraParticles"));
732  desc.add<edm::InputTag>("l1extraIsoEmSource", edm::InputTag("l1extraParticles", "Isolated"));
733  desc.add<edm::InputTag>("l1extraNonIsoEmSource", edm::InputTag("l1extraParticles", "NonIsolated"));
734  desc.add<edm::InputTag>("l1GTReadoutRcdSource", edm::InputTag("gtDigis"));
735  desc.add<edm::InputTag>("l1GTObjectMapRcdSource", edm::InputTag("hltL1GtObjectMap"));
736  desc.add<edm::InputTag>("jetSource", edm::InputTag("iterativeCone5CaloJets"));
737  desc.add<edm::InputTag>("jetExtender", edm::InputTag("iterativeCone5JetExtender"));
738  desc.add<edm::InputTag>("hbheRecHitSource", edm::InputTag("hbhereco"));
739  desc.addUntracked<double>("maxNearTrackPT", 1.0);
740  desc.addUntracked<double>("timeMinCutECAL", -500.0);
741  desc.addUntracked<double>("timeMaxCutECAL", 500.0);
742  desc.addUntracked<double>("timeMinCutHCAL", -500.0);
743  desc.addUntracked<double>("timeMaxCutHCAL", 500.0);
744  descriptions.add("isolatedTracksNxN", desc);
745 }
746 
748  bool haveIsoTrack = false;
749 
751  iSetup.get<IdealMagneticFieldRecord>().get(bFieldH);
752  const MagneticField *bField = bFieldH.product();
753 
755 
756  t_RunNo = iEvent.id().run();
757  t_EvtNo = iEvent.id().event();
758  t_Lumi = iEvent.luminosityBlock();
759  t_Bunch = iEvent.bunchCrossing();
760 
761  ++nEventProc_;
762 
764  iEvent.getByToken(tok_genTrack_, trkCollection);
765  if (debugTrks_ > 1) {
766  edm::LogVerbatim("IsoTrack") << "Track Collection: ";
767  edm::LogVerbatim("IsoTrack") << "Number of Tracks " << trkCollection->size();
768  }
769  std::string theTrackQuality = "highPurity";
770  reco::TrackBase::TrackQuality trackQuality_ = reco::TrackBase::qualityByName(theTrackQuality);
771 
772  //===================== save L1 Trigger information =======================
773  if (L1TriggerAlgoInfo_) {
775 
776  int iErrorCode = -1;
777  int l1ConfCode = -1;
778  const bool l1Conf = m_l1GtUtils.availableL1Configuration(iErrorCode, l1ConfCode);
779  if (!l1Conf) {
780  edm::LogVerbatim("IsoTrack")
781  << "\nL1 configuration code:" << l1ConfCode << "\nNo valid L1 trigger configuration available."
782  << "\nSee text above for error code interpretation"
783  << "\nNo return here, in order to test each method, protected against configuration error.";
784  }
785 
786  const L1GtTriggerMenu *m_l1GtMenu = m_l1GtUtils.ptrL1TriggerMenuEventSetup(iErrorCode);
787  const AlgorithmMap &algorithmMap = m_l1GtMenu->gtAlgorithmMap();
788  const std::string &menuName = m_l1GtMenu->gtTriggerMenuName();
789 
790  if (!initL1_) {
791  initL1_ = true;
792  edm::LogVerbatim("IsoTrack") << "menuName " << menuName;
793  for (CItAlgo itAlgo = algorithmMap.begin(); itAlgo != algorithmMap.end(); itAlgo++) {
794  std::string algName = itAlgo->first;
795  int algBitNumber = (itAlgo->second).algoBitNumber();
796  l1AlgoMap_.insert(std::pair<std::pair<unsigned int, std::string>, int>(
797  std::pair<unsigned int, std::string>(algBitNumber, algName), 0));
798  }
799  std::map<std::pair<unsigned int, std::string>, int>::iterator itr;
800  for (itr = l1AlgoMap_.begin(); itr != l1AlgoMap_.end(); itr++) {
801  edm::LogVerbatim("IsoTrack") << " ********** " << (itr->first).first << " " << (itr->first).second << " "
802  << itr->second;
803  }
804  }
805 
806  std::vector<int> algbits;
807  for (CItAlgo itAlgo = algorithmMap.begin(); itAlgo != algorithmMap.end(); itAlgo++) {
808  std::string algName = itAlgo->first;
809  int algBitNumber = (itAlgo->second).algoBitNumber();
810  bool decision = m_l1GtUtils.decision(iEvent, itAlgo->first, iErrorCode);
811  int preScale = m_l1GtUtils.prescaleFactor(iEvent, itAlgo->first, iErrorCode);
812 
813  // save the algo names which fired
814  if (decision) {
815  l1AlgoMap_[std::pair<unsigned int, std::string>(algBitNumber, algName)] += 1;
816  h_L1AlgoNames->Fill(algBitNumber);
817  t_L1AlgoNames->push_back(itAlgo->first);
818  t_L1PreScale->push_back(preScale);
819  t_L1Decision[algBitNumber] = 1;
820  algbits.push_back(algBitNumber);
821  }
822  }
823 
824  if (debugL1Info_) {
825  for (unsigned int ii = 0; ii < t_L1AlgoNames->size(); ii++) {
826  edm::LogVerbatim("IsoTrack") << ii << " " << (*t_L1AlgoNames)[ii] << " " << (*t_L1PreScale)[ii] << " "
827  << algbits[ii];
828  }
829  for (int i = 0; i < 128; ++i) {
830  edm::LogVerbatim("IsoTrack") << "L1Decision: " << i << ":" << t_L1Decision[i];
831  }
832  }
833 
834  // L1Taus
836  iEvent.getByToken(tok_L1extTauJet_, l1TauHandle);
837  l1extra::L1JetParticleCollection::const_iterator itr;
838  int iL1Obj = 0;
839  for (itr = l1TauHandle->begin(), iL1Obj = 0; itr != l1TauHandle->end(); ++itr, iL1Obj++) {
840  if (iL1Obj < 1) {
841  t_L1TauJetPt->push_back(itr->pt());
842  t_L1TauJetEta->push_back(itr->eta());
843  t_L1TauJetPhi->push_back(itr->phi());
844  }
845  if (debugL1Info_) {
846  edm::LogVerbatim("IsoTrack") << "tauJ p/pt " << itr->momentum() << " " << itr->pt() << " eta/phi "
847  << itr->eta() << " " << itr->phi();
848  }
849  }
850 
851  // L1 Central Jets
853  iEvent.getByToken(tok_L1extCenJet_, l1CenJetHandle);
854  for (itr = l1CenJetHandle->begin(), iL1Obj = 0; itr != l1CenJetHandle->end(); ++itr, iL1Obj++) {
855  if (iL1Obj < 1) {
856  t_L1CenJetPt->push_back(itr->pt());
857  t_L1CenJetEta->push_back(itr->eta());
858  t_L1CenJetPhi->push_back(itr->phi());
859  }
860  if (debugL1Info_) {
861  edm::LogVerbatim("IsoTrack") << "cenJ p/pt " << itr->momentum() << " " << itr->pt() << " eta/phi "
862  << itr->eta() << " " << itr->phi();
863  }
864  }
865 
866  // L1 Forward Jets
868  iEvent.getByToken(tok_L1extFwdJet_, l1FwdJetHandle);
869  for (itr = l1FwdJetHandle->begin(), iL1Obj = 0; itr != l1FwdJetHandle->end(); ++itr, iL1Obj++) {
870  if (iL1Obj < 1) {
871  t_L1FwdJetPt->push_back(itr->pt());
872  t_L1FwdJetEta->push_back(itr->eta());
873  t_L1FwdJetPhi->push_back(itr->phi());
874  }
875  if (debugL1Info_) {
876  edm::LogVerbatim("IsoTrack") << "fwdJ p/pt " << itr->momentum() << " " << itr->pt() << " eta/phi "
877  << itr->eta() << " " << itr->phi();
878  }
879  }
880 
881  // L1 Isolated EM onjects
882  l1extra::L1EmParticleCollection::const_iterator itrEm;
884  iEvent.getByToken(tok_L1extIsoEm_, l1IsoEmHandle);
885  for (itrEm = l1IsoEmHandle->begin(), iL1Obj = 0; itrEm != l1IsoEmHandle->end(); ++itrEm, iL1Obj++) {
886  if (iL1Obj < 1) {
887  t_L1IsoEMPt->push_back(itrEm->pt());
888  t_L1IsoEMEta->push_back(itrEm->eta());
889  t_L1IsoEMPhi->push_back(itrEm->phi());
890  }
891  if (debugL1Info_) {
892  edm::LogVerbatim("IsoTrack") << "isoEm p/pt " << itrEm->momentum() << " " << itrEm->pt() << " eta/phi "
893  << itrEm->eta() << " " << itrEm->phi();
894  }
895  }
896 
897  // L1 Non-Isolated EM onjects
899  iEvent.getByToken(tok_L1extNoIsoEm_, l1NonIsoEmHandle);
900  for (itrEm = l1NonIsoEmHandle->begin(), iL1Obj = 0; itrEm != l1NonIsoEmHandle->end(); ++itrEm, iL1Obj++) {
901  if (iL1Obj < 1) {
902  t_L1NonIsoEMPt->push_back(itrEm->pt());
903  t_L1NonIsoEMEta->push_back(itrEm->eta());
904  t_L1NonIsoEMPhi->push_back(itrEm->phi());
905  }
906  if (debugL1Info_) {
907  edm::LogVerbatim("IsoTrack") << "nonIsoEm p/pt " << itrEm->momentum() << " " << itrEm->pt() << " eta/phi "
908  << itrEm->eta() << " " << itrEm->phi();
909  }
910  }
911 
912  // L1 Muons
913  l1extra::L1MuonParticleCollection::const_iterator itrMu;
915  iEvent.getByToken(tok_L1extMu_, l1MuHandle);
916  for (itrMu = l1MuHandle->begin(), iL1Obj = 0; itrMu != l1MuHandle->end(); ++itrMu, iL1Obj++) {
917  if (iL1Obj < 1) {
918  t_L1MuonPt->push_back(itrMu->pt());
919  t_L1MuonEta->push_back(itrMu->eta());
920  t_L1MuonPhi->push_back(itrMu->phi());
921  }
922  if (debugL1Info_) {
923  edm::LogVerbatim("IsoTrack") << "l1muon p/pt " << itrMu->momentum() << " " << itrMu->pt() << " eta/phi "
924  << itrMu->eta() << " " << itrMu->phi();
925  }
926  }
927  }
928 
929  //============== store the information about all the Non-Fake vertices ===============
930 
932  iEvent.getByToken(tok_recVtx_, recVtxs);
933 
934  std::vector<reco::Track> svTracks;
935  math::XYZPoint leadPV(0, 0, 0);
936  double sumPtMax = -1.0;
937  for (unsigned int ind = 0; ind < recVtxs->size(); ind++) {
938  if (!((*recVtxs)[ind].isFake())) {
939  double vtxTrkSumPt = 0.0, vtxTrkSumPtWt = 0.0;
940  int vtxTrkNWt = 0;
941  double vtxTrkSumPtHP = 0.0, vtxTrkSumPtHPWt = 0.0;
942  int vtxTrkNHP = 0, vtxTrkNHPWt = 0;
943 
944  reco::Vertex::trackRef_iterator vtxTrack = (*recVtxs)[ind].tracks_begin();
945 
946  for (vtxTrack = (*recVtxs)[ind].tracks_begin(); vtxTrack != (*recVtxs)[ind].tracks_end(); vtxTrack++) {
947  if ((*vtxTrack)->pt() < pvTracksPtMin_)
948  continue;
949 
950  bool trkQuality = (*vtxTrack)->quality(trackQuality_);
951 
952  vtxTrkSumPt += (*vtxTrack)->pt();
953 
954  vtxTrkSumPt += (*vtxTrack)->pt();
955  if (trkQuality) {
956  vtxTrkSumPtHP += (*vtxTrack)->pt();
957  vtxTrkNHP++;
958  }
959 
960  double weight = (*recVtxs)[ind].trackWeight(*vtxTrack);
961  h_PVTracksWt->Fill(weight);
962  if (weight > 0.5) {
963  vtxTrkSumPtWt += (*vtxTrack)->pt();
964  vtxTrkNWt++;
965  if (trkQuality) {
966  vtxTrkSumPtHPWt += (*vtxTrack)->pt();
967  vtxTrkNHPWt++;
968  }
969  }
970  }
971 
972  if (vtxTrkSumPt > sumPtMax) {
973  sumPtMax = vtxTrkSumPt;
974  leadPV = math::XYZPoint((*recVtxs)[ind].x(), (*recVtxs)[ind].y(), (*recVtxs)[ind].z());
975  }
976 
977  t_PVx->push_back((*recVtxs)[ind].x());
978  t_PVy->push_back((*recVtxs)[ind].y());
979  t_PVz->push_back((*recVtxs)[ind].z());
980  t_PVisValid->push_back((*recVtxs)[ind].isValid());
981  t_PVNTracks->push_back((*recVtxs)[ind].tracksSize());
982  t_PVndof->push_back((*recVtxs)[ind].ndof());
983  t_PVNTracksWt->push_back(vtxTrkNWt);
984  t_PVTracksSumPt->push_back(vtxTrkSumPt);
985  t_PVTracksSumPtWt->push_back(vtxTrkSumPtWt);
986 
987  t_PVNTracksHP->push_back(vtxTrkNHP);
988  t_PVNTracksHPWt->push_back(vtxTrkNHPWt);
989  t_PVTracksSumPtHP->push_back(vtxTrkSumPtHP);
990  t_PVTracksSumPtHPWt->push_back(vtxTrkSumPtHPWt);
991 
992  if (myverbose_ == 4) {
993  edm::LogVerbatim("IsoTrack") << "PV " << ind << " isValid " << (*recVtxs)[ind].isValid() << " isFake "
994  << (*recVtxs)[ind].isFake() << " hasRefittedTracks() " << ind << " "
995  << (*recVtxs)[ind].hasRefittedTracks() << " refittedTrksSize "
996  << (*recVtxs)[ind].refittedTracks().size() << " tracksSize() "
997  << (*recVtxs)[ind].tracksSize() << " sumPt " << vtxTrkSumPt;
998  }
999  } // if vtx is not Fake
1000  } // loop over PVs
1001  //===================================================================================
1002 
1003  // Get the beamspot
1004  edm::Handle<reco::BeamSpot> beamSpotH;
1005  iEvent.getByToken(tok_bs_, beamSpotH);
1006  math::XYZPoint bspot;
1007  bspot = (beamSpotH.isValid()) ? beamSpotH->position() : math::XYZPoint(0, 0, 0);
1008 
1009  //=====================================================================
1010 
1012  iEvent.getByToken(tok_jets_, jets);
1013  // edm::Handle<reco::JetExtendedAssociation::Container> jetExtender;
1014  // iEvent.getByLabel(JetExtender_,jetExtender);
1015 
1016  for (unsigned int ijet = 0; ijet < (*jets).size(); ijet++) {
1017  t_jetPt->push_back((*jets)[ijet].pt());
1018  t_jetEta->push_back((*jets)[ijet].eta());
1019  t_jetPhi->push_back((*jets)[ijet].phi());
1020  t_nTrksJetVtx->push_back(-1.0);
1021  t_nTrksJetCalo->push_back(-1.0);
1022  }
1023 
1024  //===================================================================================
1025 
1026  // get handles to calogeometry and calotopology
1028  iSetup.get<CaloGeometryRecord>().get(pG);
1029  const CaloGeometry *geo = pG.product();
1030 
1031  edm::ESHandle<CaloTopology> theCaloTopology;
1032  iSetup.get<CaloTopologyRecord>().get(theCaloTopology);
1033  const CaloTopology *caloTopology = theCaloTopology.product();
1034 
1036  iSetup.get<HcalRecNumberingRecord>().get(htopo);
1037  const HcalTopology *theHBHETopology = htopo.product();
1038 
1039  edm::Handle<EcalRecHitCollection> barrelRecHitsHandle;
1040  edm::Handle<EcalRecHitCollection> endcapRecHitsHandle;
1041  iEvent.getByToken(tok_EB_, barrelRecHitsHandle);
1042  iEvent.getByToken(tok_EE_, endcapRecHitsHandle);
1043 
1044  // Retrieve the good/bad ECAL channels from the DB
1045  edm::ESHandle<EcalChannelStatus> ecalChStatus;
1046  iSetup.get<EcalChannelStatusRcd>().get(ecalChStatus);
1047  const EcalChannelStatus *theEcalChStatus = ecalChStatus.product();
1048 
1049  // Retrieve trigger tower map
1051  iSetup.get<IdealGeometryRecord>().get(hTtmap);
1052  const EcalTrigTowerConstituentsMap &ttMap = *hTtmap;
1053 
1055  iEvent.getByToken(tok_hbhe_, hbhe);
1056  if (!hbhe.isValid()) {
1057  ++nbad_;
1058  if (nbad_ < 10)
1059  edm::LogVerbatim("IsoTrack") << "No HBHE rechit collection";
1060  return;
1061  }
1062  const HBHERecHitCollection Hithbhe = *(hbhe.product());
1063 
1064  //get Handles to SimTracks and SimHits
1066  if (doMC_)
1067  iEvent.getByToken(tok_simTk_, SimTk);
1068 
1070  if (doMC_)
1071  iEvent.getByToken(tok_simVtx_, SimVtx);
1072 
1073  //get Handles to PCaloHitContainers of eb/ee/hbhe
1075  if (doMC_)
1076  iEvent.getByToken(tok_caloEB_, pcaloeb);
1077 
1079  if (doMC_)
1080  iEvent.getByToken(tok_caloEE_, pcaloee);
1081 
1083  if (doMC_)
1084  iEvent.getByToken(tok_caloHH_, pcalohh);
1085 
1086  //associates tracker rechits/simhits to a track
1087  std::unique_ptr<TrackerHitAssociator> associate;
1088  if (doMC_)
1089  associate.reset(new TrackerHitAssociator(iEvent, trackerHitAssociatorConfig_));
1090 
1091  //===================================================================================
1092 
1093  h_nTracks->Fill(trkCollection->size());
1094 
1095  int nTracks = 0;
1096 
1097  t_nTracks = trkCollection->size();
1098 
1099  // get the list of DetIds closest to the impact point of track on surface calorimeters
1100  std::vector<spr::propagatedTrackID> trkCaloDets;
1101  spr::propagateCALO(trkCollection, geo, bField, theTrackQuality, trkCaloDets, false);
1102  std::vector<spr::propagatedTrackID>::const_iterator trkDetItr;
1103 
1104  if (myverbose_ > 2) {
1105  for (trkDetItr = trkCaloDets.begin(); trkDetItr != trkCaloDets.end(); trkDetItr++) {
1106  edm::LogVerbatim("IsoTrack") << trkDetItr->trkItr->p() << " " << trkDetItr->trkItr->eta() << " "
1107  << trkDetItr->okECAL << " " << trkDetItr->okHCAL;
1108  if (trkDetItr->okECAL) {
1109  if (trkDetItr->detIdECAL.subdetId() == EcalBarrel)
1110  edm::LogVerbatim("IsoTrack") << (EBDetId)trkDetItr->detIdECAL;
1111  else
1112  edm::LogVerbatim("IsoTrack") << (EEDetId)trkDetItr->detIdECAL;
1113  }
1114  if (trkDetItr->okHCAL)
1115  edm::LogVerbatim("IsoTrack") << (HcalDetId)trkDetItr->detIdHCAL;
1116  }
1117  }
1118 
1119  int nvtxTracks = 0;
1120  for (trkDetItr = trkCaloDets.begin(), nTracks = 0; trkDetItr != trkCaloDets.end(); trkDetItr++, nTracks++) {
1121  const reco::Track *pTrack = &(*(trkDetItr->trkItr));
1122 
1123  // find vertex index the track is associated with
1124  int pVtxTkId = -1;
1125  for (unsigned int ind = 0; ind < recVtxs->size(); ind++) {
1126  if (!((*recVtxs)[ind].isFake())) {
1127  reco::Vertex::trackRef_iterator vtxTrack = (*recVtxs)[ind].tracks_begin();
1128  for (vtxTrack = (*recVtxs)[ind].tracks_begin(); vtxTrack != (*recVtxs)[ind].tracks_end(); vtxTrack++) {
1129  const edm::RefToBase<reco::Track> pvtxTrack = (*vtxTrack);
1130  if (pTrack == pvtxTrack.get()) {
1131  pVtxTkId = ind;
1132  break;
1133  if (myverbose_ > 2) {
1134  if (pTrack->pt() > 1.0) {
1135  edm::LogVerbatim("IsoTrack") << "Debug the track association with vertex ";
1136  edm::LogVerbatim("IsoTrack") << pTrack << " " << pvtxTrack.get();
1137  edm::LogVerbatim("IsoTrack")
1138  << " trkVtxIndex " << nvtxTracks << " vtx " << ind << " pt " << pTrack->pt() << " eta "
1139  << pTrack->eta() << " " << pTrack->pt() - pvtxTrack->pt() << " "
1140  << pTrack->eta() - pvtxTrack->eta();
1141  nvtxTracks++;
1142  }
1143  }
1144  }
1145  }
1146  }
1147  }
1148 
1149  const reco::HitPattern &hitp = pTrack->hitPattern();
1150  int nLayersCrossed = hitp.trackerLayersWithMeasurement();
1151  int nOuterHits = hitp.stripTOBLayersWithMeasurement() + hitp.stripTECLayersWithMeasurement();
1152 
1153  bool ifGood = pTrack->quality(trackQuality_);
1154  double pt1 = pTrack->pt();
1155  double p1 = pTrack->p();
1156  double eta1 = pTrack->momentum().eta();
1157  double phi1 = pTrack->momentum().phi();
1158  double etaEcal1 = trkDetItr->etaECAL;
1159  double phiEcal1 = trkDetItr->phiECAL;
1160  double etaHcal1 = trkDetItr->etaHCAL;
1161  double phiHcal1 = trkDetItr->phiHCAL;
1162  double dxy1 = pTrack->dxy();
1163  double dz1 = pTrack->dz();
1164  double chisq1 = pTrack->normalizedChi2();
1165  double dxybs1 = beamSpotH.isValid() ? pTrack->dxy(bspot) : pTrack->dxy();
1166  double dzbs1 = beamSpotH.isValid() ? pTrack->dz(bspot) : pTrack->dz();
1167  double dxypv1 = pTrack->dxy();
1168  double dzpv1 = pTrack->dz();
1169  if (pVtxTkId >= 0) {
1170  math::XYZPoint thisTkPV =
1171  math::XYZPoint((*recVtxs)[pVtxTkId].x(), (*recVtxs)[pVtxTkId].y(), (*recVtxs)[pVtxTkId].z());
1172  dxypv1 = pTrack->dxy(thisTkPV);
1173  dzpv1 = pTrack->dz(thisTkPV);
1174  }
1175 
1176  h_recEtaPt_0->Fill(eta1, pt1);
1177  h_recEtaP_0->Fill(eta1, p1);
1178  h_recPt_0->Fill(pt1);
1179  h_recP_0->Fill(p1);
1180  h_recEta_0->Fill(eta1);
1181  h_recPhi_0->Fill(phi1);
1182 
1183  if (ifGood && nLayersCrossed > 7) {
1184  h_recEtaPt_1->Fill(eta1, pt1);
1185  h_recEtaP_1->Fill(eta1, p1);
1186  h_recPt_1->Fill(pt1);
1187  h_recP_1->Fill(p1);
1188  h_recEta_1->Fill(eta1);
1189  h_recPhi_1->Fill(phi1);
1190  }
1191 
1192  if (!ifGood)
1193  continue;
1194 
1195  if (writeAllTracks_ && p1 > 2.0 && nLayersCrossed > 7) {
1196  t_trackPAll->push_back(p1);
1197  t_trackEtaAll->push_back(eta1);
1198  t_trackPhiAll->push_back(phi1);
1199  t_trackPtAll->push_back(pt1);
1200  t_trackDxyAll->push_back(dxy1);
1201  t_trackDzAll->push_back(dz1);
1202  t_trackDxyPVAll->push_back(dxypv1);
1203  t_trackDzPVAll->push_back(dzpv1);
1204  t_trackChiSqAll->push_back(chisq1);
1205  }
1206  if (doMC_) {
1207  edm::SimTrackContainer::const_iterator matchedSimTrkAll =
1208  spr::matchedSimTrack(iEvent, SimTk, SimVtx, pTrack, *associate, false);
1209  if (writeAllTracks_ && matchedSimTrkAll != SimTk->end())
1210  t_trackPdgIdAll->push_back(matchedSimTrkAll->type());
1211  }
1212 
1213  if (pt1 > minTrackP_ && std::abs(eta1) < maxTrackEta_ && trkDetItr->okECAL) {
1214  double maxNearP31x31 = 999.0, maxNearP25x25 = 999.0, maxNearP21x21 = 999.0, maxNearP15x15 = 999.0;
1215  maxNearP31x31 = spr::chargeIsolationEcal(nTracks, trkCaloDets, geo, caloTopology, 15, 15);
1216  maxNearP25x25 = spr::chargeIsolationEcal(nTracks, trkCaloDets, geo, caloTopology, 12, 12);
1217  maxNearP21x21 = spr::chargeIsolationEcal(nTracks, trkCaloDets, geo, caloTopology, 10, 10);
1218  maxNearP15x15 = spr::chargeIsolationEcal(nTracks, trkCaloDets, geo, caloTopology, 7, 7);
1219 
1220  int iTrkEtaBin = -1, iTrkMomBin = -1;
1221  for (unsigned int ieta = 0; ieta < NEtaBins; ieta++) {
1222  if (std::abs(eta1) > genPartEtaBins[ieta] && std::abs(eta1) < genPartEtaBins[ieta + 1])
1223  iTrkEtaBin = ieta;
1224  }
1225  for (unsigned int ipt = 0; ipt < NPBins; ipt++) {
1226  if (p1 > genPartPBins[ipt] && p1 < genPartPBins[ipt + 1])
1227  iTrkMomBin = ipt;
1228  }
1229  if (iTrkMomBin >= 0 && iTrkEtaBin >= 0) {
1230  h_maxNearP31x31[iTrkMomBin][iTrkEtaBin]->Fill(maxNearP31x31);
1231  h_maxNearP25x25[iTrkMomBin][iTrkEtaBin]->Fill(maxNearP25x25);
1232  h_maxNearP21x21[iTrkMomBin][iTrkEtaBin]->Fill(maxNearP21x21);
1233  h_maxNearP15x15[iTrkMomBin][iTrkEtaBin]->Fill(maxNearP15x15);
1234  }
1235  if (maxNearP31x31 < 0.0 && nLayersCrossed > 7 && nOuterHits > 4) {
1236  h_recEtaPt_2->Fill(eta1, pt1);
1237  h_recEtaP_2->Fill(eta1, p1);
1238  h_recPt_2->Fill(pt1);
1239  h_recP_2->Fill(p1);
1240  h_recEta_2->Fill(eta1);
1241  h_recPhi_2->Fill(phi1);
1242  }
1243 
1244  // if charge isolated in ECAL, store the further quantities
1245  if (maxNearP31x31 < 1.0) {
1246  haveIsoTrack = true;
1247 
1248  // get the matching simTrack
1249  double simTrackP = -1;
1250  if (doMC_) {
1251  edm::SimTrackContainer::const_iterator matchedSimTrk =
1252  spr::matchedSimTrack(iEvent, SimTk, SimVtx, pTrack, *associate, false);
1253  if (matchedSimTrk != SimTk->end())
1254  simTrackP = matchedSimTrk->momentum().P();
1255  }
1256 
1258  iSetup.get<EcalSeverityLevelAlgoRcd>().get(sevlv);
1259 
1260  // get ECal Tranverse Profile
1261  std::pair<double, bool> e7x7P, e9x9P, e11x11P, e15x15P;
1262  std::pair<double, bool> e7x7_10SigP, e9x9_10SigP, e11x11_10SigP, e15x15_10SigP;
1263  std::pair<double, bool> e7x7_15SigP, e9x9_15SigP, e11x11_15SigP, e15x15_15SigP;
1264  std::pair<double, bool> e7x7_20SigP, e9x9_20SigP, e11x11_20SigP, e15x15_20SigP;
1265  std::pair<double, bool> e7x7_25SigP, e9x9_25SigP, e11x11_25SigP, e15x15_25SigP;
1266  std::pair<double, bool> e7x7_30SigP, e9x9_30SigP, e11x11_30SigP, e15x15_30SigP;
1267 
1268  spr::caloSimInfo simInfo3x3, simInfo5x5, simInfo7x7, simInfo9x9;
1269  spr::caloSimInfo simInfo11x11, simInfo13x13, simInfo15x15, simInfo21x21, simInfo25x25, simInfo31x31;
1270  double trkEcalEne = 0;
1271 
1272  const DetId isoCell = trkDetItr->detIdECAL;
1273  e7x7P = spr::eECALmatrix(isoCell,
1274  barrelRecHitsHandle,
1275  endcapRecHitsHandle,
1276  *theEcalChStatus,
1277  geo,
1278  caloTopology,
1279  sevlv.product(),
1280  3,
1281  3,
1282  -100.0,
1283  -100.0,
1284  tMinE_,
1285  tMaxE_);
1286  e9x9P = spr::eECALmatrix(isoCell,
1287  barrelRecHitsHandle,
1288  endcapRecHitsHandle,
1289  *theEcalChStatus,
1290  geo,
1291  caloTopology,
1292  sevlv.product(),
1293  4,
1294  4,
1295  -100.0,
1296  -100.0,
1297  tMinE_,
1298  tMaxE_);
1299  e11x11P = spr::eECALmatrix(isoCell,
1300  barrelRecHitsHandle,
1301  endcapRecHitsHandle,
1302  *theEcalChStatus,
1303  geo,
1304  caloTopology,
1305  sevlv.product(),
1306  5,
1307  5,
1308  -100.0,
1309  -100.0,
1310  tMinE_,
1311  tMaxE_);
1312  e15x15P = spr::eECALmatrix(isoCell,
1313  barrelRecHitsHandle,
1314  endcapRecHitsHandle,
1315  *theEcalChStatus,
1316  geo,
1317  caloTopology,
1318  sevlv.product(),
1319  7,
1320  7,
1321  -100.0,
1322  -100.0,
1323  tMinE_,
1324  tMaxE_);
1325 
1326  e7x7_10SigP = spr::eECALmatrix(isoCell,
1327  barrelRecHitsHandle,
1328  endcapRecHitsHandle,
1329  *theEcalChStatus,
1330  geo,
1331  caloTopology,
1332  sevlv.product(),
1333  3,
1334  3,
1335  0.030,
1336  0.150,
1337  tMinE_,
1338  tMaxE_);
1339  e9x9_10SigP = spr::eECALmatrix(isoCell,
1340  barrelRecHitsHandle,
1341  endcapRecHitsHandle,
1342  *theEcalChStatus,
1343  geo,
1344  caloTopology,
1345  sevlv.product(),
1346  4,
1347  4,
1348  0.030,
1349  0.150,
1350  tMinE_,
1351  tMaxE_);
1352  e11x11_10SigP = spr::eECALmatrix(isoCell,
1353  barrelRecHitsHandle,
1354  endcapRecHitsHandle,
1355  *theEcalChStatus,
1356  geo,
1357  caloTopology,
1358  sevlv.product(),
1359  5,
1360  5,
1361  0.030,
1362  0.150,
1363  tMinE_,
1364  tMaxE_);
1365  e15x15_10SigP = spr::eECALmatrix(isoCell,
1366  barrelRecHitsHandle,
1367  endcapRecHitsHandle,
1368  *theEcalChStatus,
1369  geo,
1370  caloTopology,
1371  sevlv.product(),
1372  7,
1373  7,
1374  0.030,
1375  0.150,
1376  tMinE_,
1377  tMaxE_);
1378 
1379  e7x7_15SigP = spr::eECALmatrix(isoCell,
1380  barrelRecHitsHandle,
1381  endcapRecHitsHandle,
1382  *theEcalChStatus,
1383  geo,
1384  caloTopology,
1385  sevlv.product(),
1386  ttMap,
1387  3,
1388  3,
1389  0.20,
1390  0.45,
1391  tMinE_,
1392  tMaxE_);
1393  e9x9_15SigP = spr::eECALmatrix(isoCell,
1394  barrelRecHitsHandle,
1395  endcapRecHitsHandle,
1396  *theEcalChStatus,
1397  geo,
1398  caloTopology,
1399  sevlv.product(),
1400  ttMap,
1401  4,
1402  4,
1403  0.20,
1404  0.45,
1405  tMinE_,
1406  tMaxE_);
1407  e11x11_15SigP = spr::eECALmatrix(isoCell,
1408  barrelRecHitsHandle,
1409  endcapRecHitsHandle,
1410  *theEcalChStatus,
1411  geo,
1412  caloTopology,
1413  sevlv.product(),
1414  ttMap,
1415  5,
1416  5,
1417  0.20,
1418  0.45,
1419  tMinE_,
1420  tMaxE_);
1421  e15x15_15SigP = spr::eECALmatrix(isoCell,
1422  barrelRecHitsHandle,
1423  endcapRecHitsHandle,
1424  *theEcalChStatus,
1425  geo,
1426  caloTopology,
1427  sevlv.product(),
1428  ttMap,
1429  7,
1430  7,
1431  0.20,
1432  0.45,
1433  tMinE_,
1434  tMaxE_,
1435  false);
1436 
1437  e7x7_20SigP = spr::eECALmatrix(isoCell,
1438  barrelRecHitsHandle,
1439  endcapRecHitsHandle,
1440  *theEcalChStatus,
1441  geo,
1442  caloTopology,
1443  sevlv.product(),
1444  3,
1445  3,
1446  0.060,
1447  0.300,
1448  tMinE_,
1449  tMaxE_);
1450  e9x9_20SigP = spr::eECALmatrix(isoCell,
1451  barrelRecHitsHandle,
1452  endcapRecHitsHandle,
1453  *theEcalChStatus,
1454  geo,
1455  caloTopology,
1456  sevlv.product(),
1457  4,
1458  4,
1459  0.060,
1460  0.300,
1461  tMinE_,
1462  tMaxE_);
1463  e11x11_20SigP = spr::eECALmatrix(isoCell,
1464  barrelRecHitsHandle,
1465  endcapRecHitsHandle,
1466  *theEcalChStatus,
1467  geo,
1468  caloTopology,
1469  sevlv.product(),
1470  5,
1471  5,
1472  0.060,
1473  0.300,
1474  tMinE_,
1475  tMaxE_);
1476  e15x15_20SigP = spr::eECALmatrix(isoCell,
1477  barrelRecHitsHandle,
1478  endcapRecHitsHandle,
1479  *theEcalChStatus,
1480  geo,
1481  caloTopology,
1482  sevlv.product(),
1483  7,
1484  7,
1485  0.060,
1486  0.300,
1487  tMinE_,
1488  tMaxE_);
1489 
1490  e7x7_25SigP = spr::eECALmatrix(isoCell,
1491  barrelRecHitsHandle,
1492  endcapRecHitsHandle,
1493  *theEcalChStatus,
1494  geo,
1495  caloTopology,
1496  sevlv.product(),
1497  3,
1498  3,
1499  0.075,
1500  0.375,
1501  tMinE_,
1502  tMaxE_);
1503  e9x9_25SigP = spr::eECALmatrix(isoCell,
1504  barrelRecHitsHandle,
1505  endcapRecHitsHandle,
1506  *theEcalChStatus,
1507  geo,
1508  caloTopology,
1509  sevlv.product(),
1510  4,
1511  4,
1512  0.075,
1513  0.375,
1514  tMinE_,
1515  tMaxE_);
1516  e11x11_25SigP = spr::eECALmatrix(isoCell,
1517  barrelRecHitsHandle,
1518  endcapRecHitsHandle,
1519  *theEcalChStatus,
1520  geo,
1521  caloTopology,
1522  sevlv.product(),
1523  5,
1524  5,
1525  0.075,
1526  0.375,
1527  tMinE_,
1528  tMaxE_);
1529  e15x15_25SigP = spr::eECALmatrix(isoCell,
1530  barrelRecHitsHandle,
1531  endcapRecHitsHandle,
1532  *theEcalChStatus,
1533  geo,
1534  caloTopology,
1535  sevlv.product(),
1536  7,
1537  7,
1538  0.075,
1539  0.375,
1540  tMinE_,
1541  tMaxE_);
1542 
1543  e7x7_30SigP = spr::eECALmatrix(isoCell,
1544  barrelRecHitsHandle,
1545  endcapRecHitsHandle,
1546  *theEcalChStatus,
1547  geo,
1548  caloTopology,
1549  sevlv.product(),
1550  3,
1551  3,
1552  0.090,
1553  0.450,
1554  tMinE_,
1555  tMaxE_);
1556  e9x9_30SigP = spr::eECALmatrix(isoCell,
1557  barrelRecHitsHandle,
1558  endcapRecHitsHandle,
1559  *theEcalChStatus,
1560  geo,
1561  caloTopology,
1562  sevlv.product(),
1563  4,
1564  4,
1565  0.090,
1566  0.450,
1567  tMinE_,
1568  tMaxE_);
1569  e11x11_30SigP = spr::eECALmatrix(isoCell,
1570  barrelRecHitsHandle,
1571  endcapRecHitsHandle,
1572  *theEcalChStatus,
1573  geo,
1574  caloTopology,
1575  sevlv.product(),
1576  5,
1577  5,
1578  0.090,
1579  0.450,
1580  tMinE_,
1581  tMaxE_);
1582  e15x15_30SigP = spr::eECALmatrix(isoCell,
1583  barrelRecHitsHandle,
1584  endcapRecHitsHandle,
1585  *theEcalChStatus,
1586  geo,
1587  caloTopology,
1588  sevlv.product(),
1589  7,
1590  7,
1591  0.090,
1592  0.450,
1593  tMinE_,
1594  tMaxE_);
1595  if (myverbose_ == 2) {
1596  edm::LogVerbatim("IsoTrack") << "clean ecal rechit ";
1597  edm::LogVerbatim("IsoTrack") << "e7x7 " << e7x7P.first << " e9x9 " << e9x9P.first << " e11x11 "
1598  << e11x11P.first << " e15x15 " << e15x15P.first;
1599  edm::LogVerbatim("IsoTrack") << "e7x7_10Sig " << e7x7_10SigP.first << " e11x11_10Sig " << e11x11_10SigP.first
1600  << " e15x15_10Sig " << e15x15_10SigP.first;
1601  }
1602 
1603  if (doMC_) {
1604  // check the energy from SimHits
1606  iEvent, isoCell, geo, caloTopology, pcaloeb, pcaloee, SimTk, SimVtx, pTrack, *associate, 1, 1, simInfo3x3);
1608  iEvent, isoCell, geo, caloTopology, pcaloeb, pcaloee, SimTk, SimVtx, pTrack, *associate, 2, 2, simInfo5x5);
1610  iEvent, isoCell, geo, caloTopology, pcaloeb, pcaloee, SimTk, SimVtx, pTrack, *associate, 3, 3, simInfo7x7);
1612  iEvent, isoCell, geo, caloTopology, pcaloeb, pcaloee, SimTk, SimVtx, pTrack, *associate, 4, 4, simInfo9x9);
1613  spr::eECALSimInfo(iEvent,
1614  isoCell,
1615  geo,
1616  caloTopology,
1617  pcaloeb,
1618  pcaloee,
1619  SimTk,
1620  SimVtx,
1621  pTrack,
1622  *associate,
1623  5,
1624  5,
1625  simInfo11x11);
1626  spr::eECALSimInfo(iEvent,
1627  isoCell,
1628  geo,
1629  caloTopology,
1630  pcaloeb,
1631  pcaloee,
1632  SimTk,
1633  SimVtx,
1634  pTrack,
1635  *associate,
1636  6,
1637  6,
1638  simInfo13x13);
1639  spr::eECALSimInfo(iEvent,
1640  isoCell,
1641  geo,
1642  caloTopology,
1643  pcaloeb,
1644  pcaloee,
1645  SimTk,
1646  SimVtx,
1647  pTrack,
1648  *associate,
1649  7,
1650  7,
1651  simInfo15x15,
1652  150.0,
1653  false);
1654  spr::eECALSimInfo(iEvent,
1655  isoCell,
1656  geo,
1657  caloTopology,
1658  pcaloeb,
1659  pcaloee,
1660  SimTk,
1661  SimVtx,
1662  pTrack,
1663  *associate,
1664  10,
1665  10,
1666  simInfo21x21);
1667  spr::eECALSimInfo(iEvent,
1668  isoCell,
1669  geo,
1670  caloTopology,
1671  pcaloeb,
1672  pcaloee,
1673  SimTk,
1674  SimVtx,
1675  pTrack,
1676  *associate,
1677  12,
1678  12,
1679  simInfo25x25);
1680  spr::eECALSimInfo(iEvent,
1681  isoCell,
1682  geo,
1683  caloTopology,
1684  pcaloeb,
1685  pcaloee,
1686  SimTk,
1687  SimVtx,
1688  pTrack,
1689  *associate,
1690  15,
1691  15,
1692  simInfo31x31);
1693 
1694  trkEcalEne = spr::eCaloSimInfo(iEvent, geo, pcaloeb, pcaloee, SimTk, SimVtx, pTrack, *associate);
1695  if (myverbose_ == 1) {
1696  edm::LogVerbatim("IsoTrack") << "Track momentum " << pt1;
1697  edm::LogVerbatim("IsoTrack") << "ecal siminfo ";
1698  edm::LogVerbatim("IsoTrack") << "simInfo3x3: eTotal " << simInfo3x3.eTotal << " eMatched "
1699  << simInfo3x3.eMatched << " eRest " << simInfo3x3.eRest << " eGamma "
1700  << simInfo3x3.eGamma << " eNeutralHad " << simInfo3x3.eNeutralHad
1701  << " eChargedHad " << simInfo3x3.eChargedHad;
1702  edm::LogVerbatim("IsoTrack") << "simInfo5x5: eTotal " << simInfo5x5.eTotal << " eMatched "
1703  << simInfo5x5.eMatched << " eRest " << simInfo5x5.eRest << " eGamma "
1704  << simInfo5x5.eGamma << " eNeutralHad " << simInfo5x5.eNeutralHad
1705  << " eChargedHad " << simInfo5x5.eChargedHad;
1706  edm::LogVerbatim("IsoTrack") << "simInfo7x7: eTotal " << simInfo7x7.eTotal << " eMatched "
1707  << simInfo7x7.eMatched << " eRest " << simInfo7x7.eRest << " eGamma "
1708  << simInfo7x7.eGamma << " eNeutralHad " << simInfo7x7.eNeutralHad
1709  << " eChargedHad " << simInfo7x7.eChargedHad;
1710  edm::LogVerbatim("IsoTrack") << "simInfo9x9: eTotal " << simInfo9x9.eTotal << " eMatched "
1711  << simInfo9x9.eMatched << " eRest " << simInfo9x9.eRest << " eGamma "
1712  << simInfo9x9.eGamma << " eNeutralHad " << simInfo9x9.eNeutralHad
1713  << " eChargedHad " << simInfo9x9.eChargedHad;
1714  edm::LogVerbatim("IsoTrack") << "simInfo11x11: eTotal " << simInfo11x11.eTotal << " eMatched "
1715  << simInfo11x11.eMatched << " eRest " << simInfo11x11.eRest << " eGamma "
1716  << simInfo11x11.eGamma << " eNeutralHad " << simInfo11x11.eNeutralHad
1717  << " eChargedHad " << simInfo11x11.eChargedHad;
1718  edm::LogVerbatim("IsoTrack") << "simInfo15x15: eTotal " << simInfo15x15.eTotal << " eMatched "
1719  << simInfo15x15.eMatched << " eRest " << simInfo15x15.eRest << " eGamma "
1720  << simInfo15x15.eGamma << " eNeutralHad " << simInfo15x15.eNeutralHad
1721  << " eChargedHad " << simInfo15x15.eChargedHad;
1722  edm::LogVerbatim("IsoTrack") << "simInfo31x31: eTotal " << simInfo31x31.eTotal << " eMatched "
1723  << simInfo31x31.eMatched << " eRest " << simInfo31x31.eRest << " eGamma "
1724  << simInfo31x31.eGamma << " eNeutralHad " << simInfo31x31.eNeutralHad
1725  << " eChargedHad " << simInfo31x31.eChargedHad;
1726  edm::LogVerbatim("IsoTrack") << "trkEcalEne" << trkEcalEne;
1727  }
1728  }
1729 
1730  // ======= Get HCAL information
1731  double hcalScale = 1.0;
1732  if (std::abs(pTrack->eta()) < 1.4) {
1733  hcalScale = 120.0;
1734  } else {
1735  hcalScale = 135.0;
1736  }
1737 
1738  double maxNearHcalP3x3 = -1, maxNearHcalP5x5 = -1, maxNearHcalP7x7 = -1;
1739  maxNearHcalP3x3 = spr::chargeIsolationHcal(nTracks, trkCaloDets, theHBHETopology, 1, 1);
1740  maxNearHcalP5x5 = spr::chargeIsolationHcal(nTracks, trkCaloDets, theHBHETopology, 2, 2);
1741  maxNearHcalP7x7 = spr::chargeIsolationHcal(nTracks, trkCaloDets, theHBHETopology, 3, 3);
1742 
1743  double h3x3 = 0, h5x5 = 0, h7x7 = 0;
1744  double h3x3Sig = 0, h5x5Sig = 0, h7x7Sig = 0;
1745  double trkHcalEne = 0;
1746  spr::caloSimInfo hsimInfo3x3, hsimInfo5x5, hsimInfo7x7;
1747 
1748  if (trkDetItr->okHCAL) {
1749  const DetId ClosestCell(trkDetItr->detIdHCAL);
1750  // bool includeHO=false, bool algoNew=true, bool debug=false
1751  h3x3 = spr::eHCALmatrix(
1752  theHBHETopology, ClosestCell, hbhe, 1, 1, false, true, -100.0, -100.0, -100.0, -100.0, tMinH_, tMaxH_);
1753  h5x5 = spr::eHCALmatrix(
1754  theHBHETopology, ClosestCell, hbhe, 2, 2, false, true, -100.0, -100.0, -100.0, -100.0, tMinH_, tMaxH_);
1755  h7x7 = spr::eHCALmatrix(
1756  theHBHETopology, ClosestCell, hbhe, 3, 3, false, true, -100.0, -100.0, -100.0, -100.0, tMinH_, tMaxH_);
1757  h3x3Sig = spr::eHCALmatrix(
1758  theHBHETopology, ClosestCell, hbhe, 1, 1, false, true, 0.7, 0.8, -100.0, -100.0, tMinH_, tMaxH_);
1759  h5x5Sig = spr::eHCALmatrix(
1760  theHBHETopology, ClosestCell, hbhe, 2, 2, false, true, 0.7, 0.8, -100.0, -100.0, tMinH_, tMaxH_);
1761  h7x7Sig = spr::eHCALmatrix(
1762  theHBHETopology, ClosestCell, hbhe, 3, 3, false, true, 0.7, 0.8, -100.0, -100.0, tMinH_, tMaxH_);
1763 
1764  if (myverbose_ == 2) {
1765  edm::LogVerbatim("IsoTrack") << "HCAL 3x3 " << h3x3 << " " << h3x3Sig << " 5x5 " << h5x5 << " " << h5x5Sig
1766  << " 7x7 " << h7x7 << " " << h7x7Sig;
1767  }
1768 
1769  if (doMC_) {
1771  iEvent, theHBHETopology, ClosestCell, geo, pcalohh, SimTk, SimVtx, pTrack, *associate, 1, 1, hsimInfo3x3);
1773  iEvent, theHBHETopology, ClosestCell, geo, pcalohh, SimTk, SimVtx, pTrack, *associate, 2, 2, hsimInfo5x5);
1774  spr::eHCALSimInfo(iEvent,
1775  theHBHETopology,
1776  ClosestCell,
1777  geo,
1778  pcalohh,
1779  SimTk,
1780  SimVtx,
1781  pTrack,
1782  *associate,
1783  3,
1784  3,
1785  hsimInfo7x7,
1786  150.0,
1787  false,
1788  false);
1789  trkHcalEne = spr::eCaloSimInfo(iEvent, geo, pcalohh, SimTk, SimVtx, pTrack, *associate);
1790  if (myverbose_ == 1) {
1791  edm::LogVerbatim("IsoTrack") << "Hcal siminfo ";
1792  edm::LogVerbatim("IsoTrack")
1793  << "hsimInfo3x3: eTotal " << hsimInfo3x3.eTotal << " eMatched " << hsimInfo3x3.eMatched << " eRest "
1794  << hsimInfo3x3.eRest << " eGamma " << hsimInfo3x3.eGamma << " eNeutralHad " << hsimInfo3x3.eNeutralHad
1795  << " eChargedHad " << hsimInfo3x3.eChargedHad;
1796  edm::LogVerbatim("IsoTrack")
1797  << "hsimInfo5x5: eTotal " << hsimInfo5x5.eTotal << " eMatched " << hsimInfo5x5.eMatched << " eRest "
1798  << hsimInfo5x5.eRest << " eGamma " << hsimInfo5x5.eGamma << " eNeutralHad " << hsimInfo5x5.eNeutralHad
1799  << " eChargedHad " << hsimInfo5x5.eChargedHad;
1800  edm::LogVerbatim("IsoTrack")
1801  << "hsimInfo7x7: eTotal " << hsimInfo7x7.eTotal << " eMatched " << hsimInfo7x7.eMatched << " eRest "
1802  << hsimInfo7x7.eRest << " eGamma " << hsimInfo7x7.eGamma << " eNeutralHad " << hsimInfo7x7.eNeutralHad
1803  << " eChargedHad " << hsimInfo7x7.eChargedHad;
1804  edm::LogVerbatim("IsoTrack") << "trkHcalEne " << trkHcalEne;
1805  }
1806  }
1807 
1808  // debug the ecal and hcal matrix
1809  if (myverbose_ == 4) {
1810  edm::LogVerbatim("IsoTrack") << "Run " << iEvent.id().run() << " Event " << iEvent.id().event();
1811  std::vector<std::pair<DetId, double> > v7x7 =
1812  spr::eHCALmatrixCell(theHBHETopology, ClosestCell, hbhe, 3, 3, false, false);
1813  double sumv = 0.0;
1814 
1815  for (unsigned int iv = 0; iv < v7x7.size(); iv++) {
1816  sumv += v7x7[iv].second;
1817  }
1818  edm::LogVerbatim("IsoTrack") << "h7x7 " << h7x7 << " v7x7 " << sumv << " in " << v7x7.size();
1819  for (unsigned int iv = 0; iv < v7x7.size(); iv++) {
1820  HcalDetId id = v7x7[iv].first;
1821  edm::LogVerbatim("IsoTrack") << " Cell " << iv << " 0x" << std::hex << v7x7[iv].first() << std::dec << " "
1822  << id << " Energy " << v7x7[iv].second;
1823  }
1824  }
1825  }
1826  if (doMC_) {
1827  trkHcalEne = spr::eCaloSimInfo(iEvent, geo, pcalohh, SimTk, SimVtx, pTrack, *associate);
1828  }
1829 
1830  // ====================================================================================================
1831  // get diff between track outermost hit position and the propagation point at outermost surface of tracker
1832  std::pair<math::XYZPoint, double> point2_TK0 = spr::propagateTrackerEnd(pTrack, bField, false);
1833  math::XYZPoint diff(pTrack->outerPosition().X() - point2_TK0.first.X(),
1834  pTrack->outerPosition().Y() - point2_TK0.first.Y(),
1835  pTrack->outerPosition().Z() - point2_TK0.first.Z());
1836  double trackOutPosOutHitDr = diff.R();
1837  double trackL = point2_TK0.second;
1838  if (myverbose_ == 5) {
1839  edm::LogVerbatim("IsoTrack") << " propagted " << point2_TK0.first << " " << point2_TK0.first.eta() << " "
1840  << point2_TK0.first.phi();
1841  edm::LogVerbatim("IsoTrack") << " outerPosition() " << pTrack->outerPosition() << " "
1842  << pTrack->outerPosition().eta() << " " << pTrack->outerPosition().phi();
1843  edm::LogVerbatim("IsoTrack") << "diff " << diff << " diffR " << diff.R() << " diffR/L "
1844  << diff.R() / point2_TK0.second;
1845  }
1846 
1847  for (unsigned int ind = 0; ind < recVtxs->size(); ind++) {
1848  if (!((*recVtxs)[ind].isFake())) {
1849  reco::Vertex::trackRef_iterator vtxTrack = (*recVtxs)[ind].tracks_begin();
1850  if (deltaR(eta1, phi1, (*vtxTrack)->eta(), (*vtxTrack)->phi()) < 0.01)
1851  t_trackPVIdx->push_back(ind);
1852  else
1853  t_trackPVIdx->push_back(-1);
1854  }
1855  }
1856 
1857  // Fill the tree Branches here
1858  t_trackPVIdx->push_back(pVtxTkId);
1859  t_trackP->push_back(p1);
1860  t_trackPt->push_back(pt1);
1861  t_trackEta->push_back(eta1);
1862  t_trackPhi->push_back(phi1);
1863  t_trackEcalEta->push_back(etaEcal1);
1864  t_trackEcalPhi->push_back(phiEcal1);
1865  t_trackHcalEta->push_back(etaHcal1);
1866  t_trackHcalPhi->push_back(phiHcal1);
1867  t_trackDxy->push_back(dxy1);
1868  t_trackDz->push_back(dz1);
1869  t_trackDxyBS->push_back(dxybs1);
1870  t_trackDzBS->push_back(dzbs1);
1871  t_trackDxyPV->push_back(dxypv1);
1872  t_trackDzPV->push_back(dzpv1);
1873  t_trackChiSq->push_back(chisq1);
1874  t_trackNOuterHits->push_back(nOuterHits);
1875  t_NLayersCrossed->push_back(nLayersCrossed);
1876 
1877  t_trackHitsTOB->push_back(hitp.stripTOBLayersWithMeasurement());
1878  t_trackHitsTEC->push_back(hitp.stripTECLayersWithMeasurement());
1885 
1892 
1901  t_trackOutPosOutHitDr->push_back(trackOutPosOutHitDr);
1902  t_trackL->push_back(trackL);
1903 
1904  t_maxNearP31x31->push_back(maxNearP31x31);
1905  t_maxNearP21x21->push_back(maxNearP21x21);
1906 
1907  t_ecalSpike11x11->push_back(e11x11P.second);
1908  t_e7x7->push_back(e7x7P.first);
1909  t_e9x9->push_back(e9x9P.first);
1910  t_e11x11->push_back(e11x11P.first);
1911  t_e15x15->push_back(e15x15P.first);
1912 
1913  t_e7x7_10Sig->push_back(e7x7_10SigP.first);
1914  t_e9x9_10Sig->push_back(e9x9_10SigP.first);
1915  t_e11x11_10Sig->push_back(e11x11_10SigP.first);
1916  t_e15x15_10Sig->push_back(e15x15_10SigP.first);
1917  t_e7x7_15Sig->push_back(e7x7_15SigP.first);
1918  t_e9x9_15Sig->push_back(e9x9_15SigP.first);
1919  t_e11x11_15Sig->push_back(e11x11_15SigP.first);
1920  t_e15x15_15Sig->push_back(e15x15_15SigP.first);
1921  t_e7x7_20Sig->push_back(e7x7_20SigP.first);
1922  t_e9x9_20Sig->push_back(e9x9_20SigP.first);
1923  t_e11x11_20Sig->push_back(e11x11_20SigP.first);
1924  t_e15x15_20Sig->push_back(e15x15_20SigP.first);
1925  t_e7x7_25Sig->push_back(e7x7_25SigP.first);
1926  t_e9x9_25Sig->push_back(e9x9_25SigP.first);
1927  t_e11x11_25Sig->push_back(e11x11_25SigP.first);
1928  t_e15x15_25Sig->push_back(e15x15_25SigP.first);
1929  t_e7x7_30Sig->push_back(e7x7_30SigP.first);
1930  t_e9x9_30Sig->push_back(e9x9_30SigP.first);
1931  t_e11x11_30Sig->push_back(e11x11_30SigP.first);
1932  t_e15x15_30Sig->push_back(e15x15_30SigP.first);
1933 
1934  if (doMC_) {
1935  t_esim7x7->push_back(simInfo7x7.eTotal);
1936  t_esim9x9->push_back(simInfo9x9.eTotal);
1937  t_esim11x11->push_back(simInfo11x11.eTotal);
1938  t_esim15x15->push_back(simInfo15x15.eTotal);
1939 
1940  t_esim7x7Matched->push_back(simInfo7x7.eMatched);
1941  t_esim9x9Matched->push_back(simInfo9x9.eMatched);
1942  t_esim11x11Matched->push_back(simInfo11x11.eMatched);
1943  t_esim15x15Matched->push_back(simInfo15x15.eMatched);
1944 
1945  t_esim7x7Rest->push_back(simInfo7x7.eRest);
1946  t_esim9x9Rest->push_back(simInfo9x9.eRest);
1947  t_esim11x11Rest->push_back(simInfo11x11.eRest);
1948  t_esim15x15Rest->push_back(simInfo15x15.eRest);
1949 
1950  t_esim7x7Photon->push_back(simInfo7x7.eGamma);
1951  t_esim9x9Photon->push_back(simInfo9x9.eGamma);
1952  t_esim11x11Photon->push_back(simInfo11x11.eGamma);
1953  t_esim15x15Photon->push_back(simInfo15x15.eGamma);
1954 
1955  t_esim7x7NeutHad->push_back(simInfo7x7.eNeutralHad);
1956  t_esim9x9NeutHad->push_back(simInfo9x9.eNeutralHad);
1957  t_esim11x11NeutHad->push_back(simInfo11x11.eNeutralHad);
1958  t_esim15x15NeutHad->push_back(simInfo15x15.eNeutralHad);
1959 
1960  t_esim7x7CharHad->push_back(simInfo7x7.eChargedHad);
1961  t_esim9x9CharHad->push_back(simInfo9x9.eChargedHad);
1962  t_esim11x11CharHad->push_back(simInfo11x11.eChargedHad);
1963  t_esim15x15CharHad->push_back(simInfo15x15.eChargedHad);
1964 
1965  t_trkEcalEne->push_back(trkEcalEne);
1966  t_simTrackP->push_back(simTrackP);
1967  t_esimPdgId->push_back(simInfo11x11.pdgMatched);
1968  }
1969 
1970  t_maxNearHcalP3x3->push_back(maxNearHcalP3x3);
1971  t_maxNearHcalP5x5->push_back(maxNearHcalP5x5);
1972  t_maxNearHcalP7x7->push_back(maxNearHcalP7x7);
1973 
1974  t_h3x3->push_back(h3x3);
1975  t_h5x5->push_back(h5x5);
1976  t_h7x7->push_back(h7x7);
1977  t_h3x3Sig->push_back(h3x3Sig);
1978  t_h5x5Sig->push_back(h5x5Sig);
1979  t_h7x7Sig->push_back(h7x7Sig);
1980 
1981  t_infoHcal->push_back(trkDetItr->okHCAL);
1982  if (doMC_) {
1983  t_trkHcalEne->push_back(hcalScale * trkHcalEne);
1984 
1985  t_hsim3x3->push_back(hcalScale * hsimInfo3x3.eTotal);
1986  t_hsim5x5->push_back(hcalScale * hsimInfo5x5.eTotal);
1987  t_hsim7x7->push_back(hcalScale * hsimInfo7x7.eTotal);
1988 
1989  t_hsim3x3Matched->push_back(hcalScale * hsimInfo3x3.eMatched);
1990  t_hsim5x5Matched->push_back(hcalScale * hsimInfo5x5.eMatched);
1991  t_hsim7x7Matched->push_back(hcalScale * hsimInfo7x7.eMatched);
1992 
1993  t_hsim3x3Rest->push_back(hcalScale * hsimInfo3x3.eRest);
1994  t_hsim5x5Rest->push_back(hcalScale * hsimInfo5x5.eRest);
1995  t_hsim7x7Rest->push_back(hcalScale * hsimInfo7x7.eRest);
1996 
1997  t_hsim3x3Photon->push_back(hcalScale * hsimInfo3x3.eGamma);
1998  t_hsim5x5Photon->push_back(hcalScale * hsimInfo5x5.eGamma);
1999  t_hsim7x7Photon->push_back(hcalScale * hsimInfo7x7.eGamma);
2000 
2001  t_hsim3x3NeutHad->push_back(hcalScale * hsimInfo3x3.eNeutralHad);
2002  t_hsim5x5NeutHad->push_back(hcalScale * hsimInfo5x5.eNeutralHad);
2003  t_hsim7x7NeutHad->push_back(hcalScale * hsimInfo7x7.eNeutralHad);
2004 
2005  t_hsim3x3CharHad->push_back(hcalScale * hsimInfo3x3.eChargedHad);
2006  t_hsim5x5CharHad->push_back(hcalScale * hsimInfo5x5.eChargedHad);
2007  t_hsim7x7CharHad->push_back(hcalScale * hsimInfo7x7.eChargedHad);
2008  }
2009 
2010  } // if loosely isolated track
2011  } // check p1/eta
2012  } // loop over track collection
2013 
2014  if (haveIsoTrack)
2015  tree_->Fill();
2016 }
2017 
2018 // ----- method called once each job just before starting event loop ----
2020  nEventProc_ = 0;
2021  nbad_ = 0;
2022  initL1_ = false;
2023  double tempgen_TH[NPBins + 1] = {
2024  0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 9.0, 11.0, 15.0, 20.0, 30.0, 50.0, 75.0, 100.0};
2025 
2026  for (unsigned int i = 0; i < NPBins + 1; i++)
2027  genPartPBins[i] = tempgen_TH[i];
2028 
2029  double tempgen_Eta[NEtaBins + 1] = {0.0, 1.131, 1.653, 2.172};
2030 
2031  for (unsigned int i = 0; i < NEtaBins + 1; i++)
2032  genPartEtaBins[i] = tempgen_Eta[i];
2033 
2034  bookHistograms();
2035 }
2036 
2037 // ----- method called once each job just after ending the event loop ----
2039  if (L1TriggerAlgoInfo_) {
2040  std::map<std::pair<unsigned int, std::string>, int>::iterator itr;
2041  for (itr = l1AlgoMap_.begin(); itr != l1AlgoMap_.end(); itr++) {
2042  edm::LogVerbatim("IsoTrack") << " ****endjob**** " << (itr->first).first << " " << (itr->first).second << " "
2043  << itr->second;
2044  int ibin = (itr->first).first;
2045  TString name((itr->first).second);
2046  h_L1AlgoNames->GetXaxis()->SetBinLabel(ibin + 1, name);
2047  }
2048  edm::LogVerbatim("IsoTrack") << "Number of Events Processed " << nEventProc_;
2049  }
2050 }
2051 
2052 //========================================================================================================
2053 
2055  t_PVx->clear();
2056  t_PVy->clear();
2057  t_PVz->clear();
2058  t_PVisValid->clear();
2059  t_PVndof->clear();
2060  t_PVNTracks->clear();
2061  t_PVNTracksWt->clear();
2062  t_PVTracksSumPt->clear();
2063  t_PVTracksSumPtWt->clear();
2064  t_PVNTracksHP->clear();
2065  t_PVNTracksHPWt->clear();
2066  t_PVTracksSumPtHP->clear();
2067  t_PVTracksSumPtHPWt->clear();
2068 
2069  for (int i = 0; i < 128; i++)
2070  t_L1Decision[i] = 0;
2071  t_L1AlgoNames->clear();
2072  t_L1PreScale->clear();
2073 
2074  t_L1CenJetPt->clear();
2075  t_L1CenJetEta->clear();
2076  t_L1CenJetPhi->clear();
2077  t_L1FwdJetPt->clear();
2078  t_L1FwdJetEta->clear();
2079  t_L1FwdJetPhi->clear();
2080  t_L1TauJetPt->clear();
2081  t_L1TauJetEta->clear();
2082  t_L1TauJetPhi->clear();
2083  t_L1MuonPt->clear();
2084  t_L1MuonEta->clear();
2085  t_L1MuonPhi->clear();
2086  t_L1IsoEMPt->clear();
2087  t_L1IsoEMEta->clear();
2088  t_L1IsoEMPhi->clear();
2089  t_L1NonIsoEMPt->clear();
2090  t_L1NonIsoEMEta->clear();
2091  t_L1NonIsoEMPhi->clear();
2092  t_L1METPt->clear();
2093  t_L1METEta->clear();
2094  t_L1METPhi->clear();
2095 
2096  t_jetPt->clear();
2097  t_jetEta->clear();
2098  t_jetPhi->clear();
2099  t_nTrksJetCalo->clear();
2100  t_nTrksJetVtx->clear();
2101 
2102  t_trackPAll->clear();
2103  t_trackEtaAll->clear();
2104  t_trackPhiAll->clear();
2105  t_trackPdgIdAll->clear();
2106  t_trackPtAll->clear();
2107  t_trackDxyAll->clear();
2108  t_trackDzAll->clear();
2109  t_trackDxyPVAll->clear();
2110  t_trackDzPVAll->clear();
2111  t_trackChiSqAll->clear();
2112 
2113  t_trackP->clear();
2114  t_trackPt->clear();
2115  t_trackEta->clear();
2116  t_trackPhi->clear();
2117  t_trackEcalEta->clear();
2118  t_trackEcalPhi->clear();
2119  t_trackHcalEta->clear();
2120  t_trackHcalPhi->clear();
2121  t_NLayersCrossed->clear();
2122  t_trackNOuterHits->clear();
2123  t_trackDxy->clear();
2124  t_trackDxyBS->clear();
2125  t_trackDz->clear();
2126  t_trackDzBS->clear();
2127  t_trackDxyPV->clear();
2128  t_trackDzPV->clear();
2129  t_trackChiSq->clear();
2130  t_trackPVIdx->clear();
2131  t_trackHitsTOB->clear();
2132  t_trackHitsTEC->clear();
2133  t_trackHitInMissTOB->clear();
2134  t_trackHitInMissTEC->clear();
2135  t_trackHitInMissTIB->clear();
2136  t_trackHitInMissTID->clear();
2137  t_trackHitInMissTIBTID->clear();
2138  t_trackHitOutMissTOB->clear();
2139  t_trackHitOutMissTEC->clear();
2140  t_trackHitOutMissTIB->clear();
2141  t_trackHitOutMissTID->clear();
2142  t_trackHitOutMissTOBTEC->clear();
2143  t_trackHitInMeasTOB->clear();
2144  t_trackHitInMeasTEC->clear();
2145  t_trackHitInMeasTIB->clear();
2146  t_trackHitInMeasTID->clear();
2147  t_trackHitOutMeasTOB->clear();
2148  t_trackHitOutMeasTEC->clear();
2149  t_trackHitOutMeasTIB->clear();
2150  t_trackHitOutMeasTID->clear();
2151  t_trackOutPosOutHitDr->clear();
2152  t_trackL->clear();
2153 
2154  t_maxNearP31x31->clear();
2155  t_maxNearP21x21->clear();
2156 
2157  t_ecalSpike11x11->clear();
2158  t_e7x7->clear();
2159  t_e9x9->clear();
2160  t_e11x11->clear();
2161  t_e15x15->clear();
2162 
2163  t_e7x7_10Sig->clear();
2164  t_e9x9_10Sig->clear();
2165  t_e11x11_10Sig->clear();
2166  t_e15x15_10Sig->clear();
2167  t_e7x7_15Sig->clear();
2168  t_e9x9_15Sig->clear();
2169  t_e11x11_15Sig->clear();
2170  t_e15x15_15Sig->clear();
2171  t_e7x7_20Sig->clear();
2172  t_e9x9_20Sig->clear();
2173  t_e11x11_20Sig->clear();
2174  t_e15x15_20Sig->clear();
2175  t_e7x7_25Sig->clear();
2176  t_e9x9_25Sig->clear();
2177  t_e11x11_25Sig->clear();
2178  t_e15x15_25Sig->clear();
2179  t_e7x7_30Sig->clear();
2180  t_e9x9_30Sig->clear();
2181  t_e11x11_30Sig->clear();
2182  t_e15x15_30Sig->clear();
2183 
2184  if (doMC_) {
2185  t_simTrackP->clear();
2186  t_esimPdgId->clear();
2187  t_trkEcalEne->clear();
2188 
2189  t_esim7x7->clear();
2190  t_esim9x9->clear();
2191  t_esim11x11->clear();
2192  t_esim15x15->clear();
2193 
2194  t_esim7x7Matched->clear();
2195  t_esim9x9Matched->clear();
2196  t_esim11x11Matched->clear();
2197  t_esim15x15Matched->clear();
2198 
2199  t_esim7x7Rest->clear();
2200  t_esim9x9Rest->clear();
2201  t_esim11x11Rest->clear();
2202  t_esim15x15Rest->clear();
2203 
2204  t_esim7x7Photon->clear();
2205  t_esim9x9Photon->clear();
2206  t_esim11x11Photon->clear();
2207  t_esim15x15Photon->clear();
2208 
2209  t_esim7x7NeutHad->clear();
2210  t_esim9x9NeutHad->clear();
2211  t_esim11x11NeutHad->clear();
2212  t_esim15x15NeutHad->clear();
2213 
2214  t_esim7x7CharHad->clear();
2215  t_esim9x9CharHad->clear();
2216  t_esim11x11CharHad->clear();
2217  t_esim15x15CharHad->clear();
2218  }
2219 
2220  t_maxNearHcalP3x3->clear();
2221  t_maxNearHcalP5x5->clear();
2222  t_maxNearHcalP7x7->clear();
2223 
2224  t_h3x3->clear();
2225  t_h5x5->clear();
2226  t_h7x7->clear();
2227  t_h3x3Sig->clear();
2228  t_h5x5Sig->clear();
2229  t_h7x7Sig->clear();
2230 
2231  t_infoHcal->clear();
2232 
2233  if (doMC_) {
2234  t_trkHcalEne->clear();
2235 
2236  t_hsim3x3->clear();
2237  t_hsim5x5->clear();
2238  t_hsim7x7->clear();
2239  t_hsim3x3Matched->clear();
2240  t_hsim5x5Matched->clear();
2241  t_hsim7x7Matched->clear();
2242  t_hsim3x3Rest->clear();
2243  t_hsim5x5Rest->clear();
2244  t_hsim7x7Rest->clear();
2245  t_hsim3x3Photon->clear();
2246  t_hsim5x5Photon->clear();
2247  t_hsim7x7Photon->clear();
2248  t_hsim3x3NeutHad->clear();
2249  t_hsim5x5NeutHad->clear();
2250  t_hsim7x7NeutHad->clear();
2251  t_hsim3x3CharHad->clear();
2252  t_hsim5x5CharHad->clear();
2253  t_hsim7x7CharHad->clear();
2254  }
2255 }
2256 
2258  char hname[100], htit[100];
2259 
2261  TFileDirectory dir = fs->mkdir("nearMaxTrackP");
2262 
2263  for (unsigned int ieta = 0; ieta < NEtaBins; ieta++) {
2264  double lowEta = -5.0, highEta = 5.0;
2265  lowEta = genPartEtaBins[ieta];
2266  highEta = genPartEtaBins[ieta + 1];
2267 
2268  for (unsigned int ipt = 0; ipt < NPBins; ipt++) {
2269  double lowP = 0.0, highP = 300.0;
2270  lowP = genPartPBins[ipt];
2271  highP = genPartPBins[ipt + 1];
2272  sprintf(hname, "h_maxNearP31x31_ptBin%i_etaBin%i", ipt, ieta);
2273  sprintf(htit, "maxNearP in 31x31 (%3.2f<|#eta|<%3.2f), (%2.0f<trkP<%3.0f)", lowEta, highEta, lowP, highP);
2274  h_maxNearP31x31[ipt][ieta] = dir.make<TH1F>(hname, htit, 220, -2.0, 20.0);
2275  h_maxNearP31x31[ipt][ieta]->Sumw2();
2276  sprintf(hname, "h_maxNearP25x25_ptBin%i_etaBin%i", ipt, ieta);
2277  sprintf(htit, "maxNearP in 25x25 (%3.2f<|#eta|<%3.2f), (%2.0f<trkP<%3.0f)", lowEta, highEta, lowP, highP);
2278  h_maxNearP25x25[ipt][ieta] = dir.make<TH1F>(hname, htit, 220, -2.0, 20.0);
2279  h_maxNearP25x25[ipt][ieta]->Sumw2();
2280  sprintf(hname, "h_maxNearP21x21_ptBin%i_etaBin%i", ipt, ieta);
2281  sprintf(htit, "maxNearP in 21x21 (%3.2f<|#eta|<%3.2f), (%2.0f<trkP<%3.0f)", lowEta, highEta, lowP, highP);
2282  h_maxNearP21x21[ipt][ieta] = dir.make<TH1F>(hname, htit, 220, -2.0, 20.0);
2283  h_maxNearP21x21[ipt][ieta]->Sumw2();
2284  sprintf(hname, "h_maxNearP15x15_ptBin%i_etaBin%i", ipt, ieta);
2285  sprintf(htit, "maxNearP in 15x15 (%3.2f<|#eta|<%3.2f), (%2.0f<trkP<%3.0f)", lowEta, highEta, lowP, highP);
2286  h_maxNearP15x15[ipt][ieta] = dir.make<TH1F>(hname, htit, 220, -2.0, 20.0);
2287  h_maxNearP15x15[ipt][ieta]->Sumw2();
2288  }
2289  }
2290 
2291  h_L1AlgoNames = fs->make<TH1I>("h_L1AlgoNames", "h_L1AlgoNames:Bin Labels", 128, -0.5, 127.5);
2292 
2293  // Reconstructed Tracks
2294 
2295  h_PVTracksWt = fs->make<TH1F>("h_PVTracksWt", "h_PVTracksWt", 600, -0.1, 1.1);
2296 
2297  h_nTracks = fs->make<TH1F>("h_nTracks", "h_nTracks", 1000, -0.5, 999.5);
2298 
2299  sprintf(hname, "h_recEtaPt_0");
2300  sprintf(htit, "h_recEtaPt (all tracks Eta vs pT)");
2301  h_recEtaPt_0 = fs->make<TH2F>(hname, htit, 30, -3.0, 3.0, 15, genPartPBins);
2302 
2303  sprintf(hname, "h_recEtaP_0");
2304  sprintf(htit, "h_recEtaP (all tracks Eta vs pT)");
2305  h_recEtaP_0 = fs->make<TH2F>(hname, htit, 30, -3.0, 3.0, 15, genPartPBins);
2306 
2307  h_recPt_0 = fs->make<TH1F>("h_recPt_0", "Pt (all tracks)", 15, genPartPBins);
2308  h_recP_0 = fs->make<TH1F>("h_recP_0", "P (all tracks)", 15, genPartPBins);
2309  h_recEta_0 = fs->make<TH1F>("h_recEta_0", "Eta (all tracks)", 60, -3.0, 3.0);
2310  h_recPhi_0 = fs->make<TH1F>("h_recPhi_0", "Phi (all tracks)", 100, -3.2, 3.2);
2311  //-------------------------
2312  sprintf(hname, "h_recEtaPt_1");
2313  sprintf(htit, "h_recEtaPt (all good tracks Eta vs pT)");
2314  h_recEtaPt_1 = fs->make<TH2F>(hname, htit, 30, -3.0, 3.0, 15, genPartPBins);
2315 
2316  sprintf(hname, "h_recEtaP_1");
2317  sprintf(htit, "h_recEtaP (all good tracks Eta vs pT)");
2318  h_recEtaP_1 = fs->make<TH2F>(hname, htit, 30, -3.0, 3.0, 15, genPartPBins);
2319 
2320  h_recPt_1 = fs->make<TH1F>("h_recPt_1", "Pt (all good tracks)", 15, genPartPBins);
2321  h_recP_1 = fs->make<TH1F>("h_recP_1", "P (all good tracks)", 15, genPartPBins);
2322  h_recEta_1 = fs->make<TH1F>("h_recEta_1", "Eta (all good tracks)", 60, -3.0, 3.0);
2323  h_recPhi_1 = fs->make<TH1F>("h_recPhi_1", "Phi (all good tracks)", 100, -3.2, 3.2);
2324  //-------------------------
2325  sprintf(hname, "h_recEtaPt_2");
2326  sprintf(htit, "h_recEtaPt (charge isolation Eta vs pT)");
2327  h_recEtaPt_2 = fs->make<TH2F>(hname, htit, 30, -3.0, 3.0, 15, genPartPBins);
2328 
2329  sprintf(hname, "h_recEtaP_2");
2330  sprintf(htit, "h_recEtaP (charge isolation Eta vs pT)");
2331  h_recEtaP_2 = fs->make<TH2F>(hname, htit, 30, -3.0, 3.0, 15, genPartPBins);
2332 
2333  h_recPt_2 = fs->make<TH1F>("h_recPt_2", "Pt (charge isolation)", 15, genPartPBins);
2334  h_recP_2 = fs->make<TH1F>("h_recP_2", "P (charge isolation)", 15, genPartPBins);
2335  h_recEta_2 = fs->make<TH1F>("h_recEta_2", "Eta (charge isolation)", 60, -3.0, 3.0);
2336  h_recPhi_2 = fs->make<TH1F>("h_recPhi_2", "Phi (charge isolation)", 100, -3.2, 3.2);
2337 
2338  tree_ = fs->make<TTree>("tree", "tree");
2339  tree_->SetAutoSave(10000);
2340 
2341  tree_->Branch("t_EvtNo", &t_EvtNo, "t_EvtNo/I");
2342  tree_->Branch("t_RunNo", &t_RunNo, "t_RunNo/I");
2343  tree_->Branch("t_Lumi", &t_Lumi, "t_Lumi/I");
2344  tree_->Branch("t_Bunch", &t_Bunch, "t_Bunch/I");
2345 
2346  t_PVx = new std::vector<double>();
2347  t_PVy = new std::vector<double>();
2348  t_PVz = new std::vector<double>();
2349  t_PVisValid = new std::vector<int>();
2350  t_PVndof = new std::vector<int>();
2351  t_PVNTracks = new std::vector<int>();
2352  t_PVNTracksWt = new std::vector<int>();
2353  t_PVTracksSumPt = new std::vector<double>();
2354  t_PVTracksSumPtWt = new std::vector<double>();
2355  t_PVNTracksHP = new std::vector<int>();
2356  t_PVNTracksHPWt = new std::vector<int>();
2357  t_PVTracksSumPtHP = new std::vector<double>();
2358  t_PVTracksSumPtHPWt = new std::vector<double>();
2359 
2360  tree_->Branch("PVx", "std::vector<double>", &t_PVx);
2361  tree_->Branch("PVy", "std::vector<double>", &t_PVy);
2362  tree_->Branch("PVz", "std::vector<double>", &t_PVz);
2363  tree_->Branch("PVisValid", "std::vector<int>", &t_PVisValid);
2364  tree_->Branch("PVndof", "std::vector<int>", &t_PVndof);
2365  tree_->Branch("PVNTracks", "std::vector<int>", &t_PVNTracks);
2366  tree_->Branch("PVNTracksWt", "std::vector<int>", &t_PVNTracksWt);
2367  tree_->Branch("t_PVTracksSumPt", "std::vector<double>", &t_PVTracksSumPt);
2368  tree_->Branch("t_PVTracksSumPtWt", "std::vector<double>", &t_PVTracksSumPtWt);
2369  tree_->Branch("PVNTracksHP", "std::vector<int>", &t_PVNTracksHP);
2370  tree_->Branch("PVNTracksHPWt", "std::vector<int>", &t_PVNTracksHPWt);
2371  tree_->Branch("t_PVTracksSumPtHP", "std::vector<double>", &t_PVTracksSumPtHP);
2372  tree_->Branch("t_PVTracksSumPtHPWt", "std::vector<double>", &t_PVTracksSumPtHPWt);
2373 
2374  //----- L1Trigger information
2375  for (int i = 0; i < 128; i++)
2376  t_L1Decision[i] = 0;
2377  t_L1AlgoNames = new std::vector<std::string>();
2378  t_L1PreScale = new std::vector<int>();
2379  t_L1CenJetPt = new std::vector<double>();
2380  t_L1CenJetEta = new std::vector<double>();
2381  t_L1CenJetPhi = new std::vector<double>();
2382  t_L1FwdJetPt = new std::vector<double>();
2383  t_L1FwdJetEta = new std::vector<double>();
2384  t_L1FwdJetPhi = new std::vector<double>();
2385  t_L1TauJetPt = new std::vector<double>();
2386  t_L1TauJetEta = new std::vector<double>();
2387  t_L1TauJetPhi = new std::vector<double>();
2388  t_L1MuonPt = new std::vector<double>();
2389  t_L1MuonEta = new std::vector<double>();
2390  t_L1MuonPhi = new std::vector<double>();
2391  t_L1IsoEMPt = new std::vector<double>();
2392  t_L1IsoEMEta = new std::vector<double>();
2393  t_L1IsoEMPhi = new std::vector<double>();
2394  t_L1NonIsoEMPt = new std::vector<double>();
2395  t_L1NonIsoEMEta = new std::vector<double>();
2396  t_L1NonIsoEMPhi = new std::vector<double>();
2397  t_L1METPt = new std::vector<double>();
2398  t_L1METEta = new std::vector<double>();
2399  t_L1METPhi = new std::vector<double>();
2400 
2401  tree_->Branch("t_L1Decision", t_L1Decision, "t_L1Decision[128]/I");
2402  tree_->Branch("t_L1AlgoNames", "std::vector<string>", &t_L1AlgoNames);
2403  tree_->Branch("t_L1PreScale", "std::vector<int>", &t_L1PreScale);
2404  tree_->Branch("t_L1CenJetPt", "std::vector<double>", &t_L1CenJetPt);
2405  tree_->Branch("t_L1CenJetEta", "std::vector<double>", &t_L1CenJetEta);
2406  tree_->Branch("t_L1CenJetPhi", "std::vector<double>", &t_L1CenJetPhi);
2407  tree_->Branch("t_L1FwdJetPt", "std::vector<double>", &t_L1FwdJetPt);
2408  tree_->Branch("t_L1FwdJetEta", "std::vector<double>", &t_L1FwdJetEta);
2409  tree_->Branch("t_L1FwdJetPhi", "std::vector<double>", &t_L1FwdJetPhi);
2410  tree_->Branch("t_L1TauJetPt", "std::vector<double>", &t_L1TauJetPt);
2411  tree_->Branch("t_L1TauJetEta", "std::vector<double>", &t_L1TauJetEta);
2412  tree_->Branch("t_L1TauJetPhi", "std::vector<double>", &t_L1TauJetPhi);
2413  tree_->Branch("t_L1MuonPt", "std::vector<double>", &t_L1MuonPt);
2414  tree_->Branch("t_L1MuonEta", "std::vector<double>", &t_L1MuonEta);
2415  tree_->Branch("t_L1MuonPhi", "std::vector<double>", &t_L1MuonPhi);
2416  tree_->Branch("t_L1IsoEMPt", "std::vector<double>", &t_L1IsoEMPt);
2417  tree_->Branch("t_L1IsoEMEta", "std::vector<double>", &t_L1IsoEMEta);
2418  tree_->Branch("t_L1IsoEMPhi", "std::vector<double>", &t_L1IsoEMPhi);
2419  tree_->Branch("t_L1NonIsoEMPt", "std::vector<double>", &t_L1NonIsoEMPt);
2420  tree_->Branch("t_L1NonIsoEMEta", "std::vector<double>", &t_L1NonIsoEMEta);
2421  tree_->Branch("t_L1NonIsoEMPhi", "std::vector<double>", &t_L1NonIsoEMPhi);
2422  tree_->Branch("t_L1METPt", "std::vector<double>", &t_L1METPt);
2423  tree_->Branch("t_L1METEta", "std::vector<double>", &t_L1METEta);
2424  tree_->Branch("t_L1METPhi", "std::vector<double>", &t_L1METPhi);
2425 
2426  t_jetPt = new std::vector<double>();
2427  t_jetEta = new std::vector<double>();
2428  t_jetPhi = new std::vector<double>();
2429  t_nTrksJetCalo = new std::vector<double>();
2430  t_nTrksJetVtx = new std::vector<double>();
2431  tree_->Branch("t_jetPt", "std::vector<double>", &t_jetPt);
2432  tree_->Branch("t_jetEta", "std::vector<double>", &t_jetEta);
2433  tree_->Branch("t_jetPhi", "std::vector<double>", &t_jetPhi);
2434  tree_->Branch("t_nTrksJetCalo", "std::vector<double>", &t_nTrksJetCalo);
2435  tree_->Branch("t_nTrksJetVtx", "std::vector<double>", &t_nTrksJetVtx);
2436 
2437  t_trackPAll = new std::vector<double>();
2438  t_trackEtaAll = new std::vector<double>();
2439  t_trackPhiAll = new std::vector<double>();
2440  t_trackPdgIdAll = new std::vector<double>();
2441  t_trackPtAll = new std::vector<double>();
2442  t_trackDxyAll = new std::vector<double>();
2443  t_trackDzAll = new std::vector<double>();
2444  t_trackDxyPVAll = new std::vector<double>();
2445  t_trackDzPVAll = new std::vector<double>();
2446  t_trackChiSqAll = new std::vector<double>();
2447  tree_->Branch("t_trackPAll", "std::vector<double>", &t_trackPAll);
2448  tree_->Branch("t_trackPhiAll", "std::vector<double>", &t_trackPhiAll);
2449  tree_->Branch("t_trackEtaAll", "std::vector<double>", &t_trackEtaAll);
2450  tree_->Branch("t_trackPtAll", "std::vector<double>", &t_trackPtAll);
2451  tree_->Branch("t_trackDxyAll", "std::vector<double>", &t_trackDxyAll);
2452  tree_->Branch("t_trackDzAll", "std::vector<double>", &t_trackDzAll);
2453  tree_->Branch("t_trackDxyPVAll", "std::vector<double>", &t_trackDxyPVAll);
2454  tree_->Branch("t_trackDzPVAll", "std::vector<double>", &t_trackDzPVAll);
2455  tree_->Branch("t_trackChiSqAll", "std::vector<double>", &t_trackChiSqAll);
2456  //tree_->Branch("t_trackPdgIdAll", "std::vector<double>", &t_trackPdgIdAll);
2457 
2458  t_trackP = new std::vector<double>();
2459  t_trackPt = new std::vector<double>();
2460  t_trackEta = new std::vector<double>();
2461  t_trackPhi = new std::vector<double>();
2462  t_trackEcalEta = new std::vector<double>();
2463  t_trackEcalPhi = new std::vector<double>();
2464  t_trackHcalEta = new std::vector<double>();
2465  t_trackHcalPhi = new std::vector<double>();
2466  t_trackNOuterHits = new std::vector<int>();
2467  t_NLayersCrossed = new std::vector<int>();
2468  t_trackDxy = new std::vector<double>();
2469  t_trackDxyBS = new std::vector<double>();
2470  t_trackDz = new std::vector<double>();
2471  t_trackDzBS = new std::vector<double>();
2472  t_trackDxyPV = new std::vector<double>();
2473  t_trackDzPV = new std::vector<double>();
2474  t_trackPVIdx = new std::vector<int>();
2475  t_trackChiSq = new std::vector<double>();
2476  t_trackHitsTOB = new std::vector<int>();
2477  t_trackHitsTEC = new std::vector<int>();
2478  t_trackHitInMissTOB = new std::vector<int>();
2479  t_trackHitInMissTEC = new std::vector<int>();
2480  t_trackHitInMissTIB = new std::vector<int>();
2481  t_trackHitInMissTID = new std::vector<int>();
2482  t_trackHitOutMissTOB = new std::vector<int>();
2483  t_trackHitOutMissTEC = new std::vector<int>();
2484  t_trackHitOutMissTIB = new std::vector<int>();
2485  t_trackHitOutMissTID = new std::vector<int>();
2486  t_trackHitInMissTIBTID = new std::vector<int>();
2487  t_trackHitOutMissTOB = new std::vector<int>();
2488  t_trackHitOutMissTEC = new std::vector<int>();
2489  t_trackHitOutMissTIB = new std::vector<int>();
2490  t_trackHitOutMissTID = new std::vector<int>();
2491  t_trackHitOutMissTOBTEC = new std::vector<int>();
2492  t_trackHitInMeasTOB = new std::vector<int>();
2493  t_trackHitInMeasTEC = new std::vector<int>();
2494  t_trackHitInMeasTIB = new std::vector<int>();
2495  t_trackHitInMeasTID = new std::vector<int>();
2496  t_trackHitOutMeasTOB = new std::vector<int>();
2497  t_trackHitOutMeasTEC = new std::vector<int>();
2498  t_trackHitOutMeasTIB = new std::vector<int>();
2499  t_trackHitOutMeasTID = new std::vector<int>();
2500  t_trackOutPosOutHitDr = new std::vector<double>();
2501  t_trackL = new std::vector<double>();
2502 
2503  tree_->Branch("t_trackP", "std::vector<double>", &t_trackP);
2504  tree_->Branch("t_trackPt", "std::vector<double>", &t_trackPt);
2505  tree_->Branch("t_trackEta", "std::vector<double>", &t_trackEta);
2506  tree_->Branch("t_trackPhi", "std::vector<double>", &t_trackPhi);
2507  tree_->Branch("t_trackEcalEta", "std::vector<double>", &t_trackEcalEta);
2508  tree_->Branch("t_trackEcalPhi", "std::vector<double>", &t_trackEcalPhi);
2509  tree_->Branch("t_trackHcalEta", "std::vector<double>", &t_trackHcalEta);
2510  tree_->Branch("t_trackHcalPhi", "std::vector<double>", &t_trackHcalPhi);
2511 
2512  tree_->Branch("t_trackNOuterHits", "std::vector<int>", &t_trackNOuterHits);
2513  tree_->Branch("t_NLayersCrossed", "std::vector<int>", &t_NLayersCrossed);
2514  tree_->Branch("t_trackHitsTOB", "std::vector<int>", &t_trackHitsTOB);
2515  tree_->Branch("t_trackHitsTEC", "std::vector<int>", &t_trackHitsTEC);
2516  tree_->Branch("t_trackHitInMissTOB", "std::vector<int>", &t_trackHitInMissTOB);
2517  tree_->Branch("t_trackHitInMissTEC", "std::vector<int>", &t_trackHitInMissTEC);
2518  tree_->Branch("t_trackHitInMissTIB", "std::vector<int>", &t_trackHitInMissTIB);
2519  tree_->Branch("t_trackHitInMissTID", "std::vector<int>", &t_trackHitInMissTID);
2520  tree_->Branch("t_trackHitInMissTIBTID", "std::vector<int>", &t_trackHitInMissTIBTID);
2521  tree_->Branch("t_trackHitOutMissTOB", "std::vector<int>", &t_trackHitOutMissTOB);
2522  tree_->Branch("t_trackHitOutMissTEC", "std::vector<int>", &t_trackHitOutMissTEC);
2523  tree_->Branch("t_trackHitOutMissTIB", "std::vector<int>", &t_trackHitOutMissTIB);
2524  tree_->Branch("t_trackHitOutMissTID", "std::vector<int>", &t_trackHitOutMissTID);
2525  tree_->Branch("t_trackHitOutMissTOBTEC", "std::vector<int>", &t_trackHitOutMissTOBTEC);
2526  tree_->Branch("t_trackHitInMeasTOB", "std::vector<int>", &t_trackHitInMeasTOB);
2527  tree_->Branch("t_trackHitInMeasTEC", "std::vector<int>", &t_trackHitInMeasTEC);
2528  tree_->Branch("t_trackHitInMeasTIB", "std::vector<int>", &t_trackHitInMeasTIB);
2529  tree_->Branch("t_trackHitInMeasTID", "std::vector<int>", &t_trackHitInMeasTID);
2530  tree_->Branch("t_trackHitOutMeasTOB", "std::vector<int>", &t_trackHitOutMeasTOB);
2531  tree_->Branch("t_trackHitOutMeasTEC", "std::vector<int>", &t_trackHitOutMeasTEC);
2532  tree_->Branch("t_trackHitOutMeasTIB", "std::vector<int>", &t_trackHitOutMeasTIB);
2533  tree_->Branch("t_trackHitOutMeasTID", "std::vector<int>", &t_trackHitOutMeasTID);
2534  tree_->Branch("t_trackOutPosOutHitDr", "std::vector<double>", &t_trackOutPosOutHitDr);
2535  tree_->Branch("t_trackL", "std::vector<double>", &t_trackL);
2536 
2537  tree_->Branch("t_trackDxy", "std::vector<double>", &t_trackDxy);
2538  tree_->Branch("t_trackDxyBS", "std::vector<double>", &t_trackDxyBS);
2539  tree_->Branch("t_trackDz", "std::vector<double>", &t_trackDz);
2540  tree_->Branch("t_trackDzBS", "std::vector<double>", &t_trackDzBS);
2541  tree_->Branch("t_trackDxyPV", "std::vector<double>", &t_trackDxyPV);
2542  tree_->Branch("t_trackDzPV", "std::vector<double>", &t_trackDzPV);
2543  tree_->Branch("t_trackChiSq", "std::vector<double>", &t_trackChiSq);
2544  tree_->Branch("t_trackPVIdx", "std::vector<int>", &t_trackPVIdx);
2545 
2546  t_maxNearP31x31 = new std::vector<double>();
2547  t_maxNearP21x21 = new std::vector<double>();
2548 
2549  tree_->Branch("t_maxNearP31x31", "std::vector<double>", &t_maxNearP31x31);
2550  tree_->Branch("t_maxNearP21x21", "std::vector<double>", &t_maxNearP21x21);
2551 
2552  t_ecalSpike11x11 = new std::vector<int>();
2553  t_e7x7 = new std::vector<double>();
2554  t_e9x9 = new std::vector<double>();
2555  t_e11x11 = new std::vector<double>();
2556  t_e15x15 = new std::vector<double>();
2557 
2558  tree_->Branch("t_ecalSpike11x11", "std::vector<int>", &t_ecalSpike11x11);
2559  tree_->Branch("t_e7x7", "std::vector<double>", &t_e7x7);
2560  tree_->Branch("t_e9x9", "std::vector<double>", &t_e9x9);
2561  tree_->Branch("t_e11x11", "std::vector<double>", &t_e11x11);
2562  tree_->Branch("t_e15x15", "std::vector<double>", &t_e15x15);
2563 
2564  t_e7x7_10Sig = new std::vector<double>();
2565  t_e9x9_10Sig = new std::vector<double>();
2566  t_e11x11_10Sig = new std::vector<double>();
2567  t_e15x15_10Sig = new std::vector<double>();
2568  t_e7x7_15Sig = new std::vector<double>();
2569  t_e9x9_15Sig = new std::vector<double>();
2570  t_e11x11_15Sig = new std::vector<double>();
2571  t_e15x15_15Sig = new std::vector<double>();
2572  t_e7x7_20Sig = new std::vector<double>();
2573  t_e9x9_20Sig = new std::vector<double>();
2574  t_e11x11_20Sig = new std::vector<double>();
2575  t_e15x15_20Sig = new std::vector<double>();
2576  t_e7x7_25Sig = new std::vector<double>();
2577  t_e9x9_25Sig = new std::vector<double>();
2578  t_e11x11_25Sig = new std::vector<double>();
2579  t_e15x15_25Sig = new std::vector<double>();
2580  t_e7x7_30Sig = new std::vector<double>();
2581  t_e9x9_30Sig = new std::vector<double>();
2582  t_e11x11_30Sig = new std::vector<double>();
2583  t_e15x15_30Sig = new std::vector<double>();
2584 
2585  tree_->Branch("t_e7x7_10Sig", "std::vector<double>", &t_e7x7_10Sig);
2586  tree_->Branch("t_e9x9_10Sig", "std::vector<double>", &t_e9x9_10Sig);
2587  tree_->Branch("t_e11x11_10Sig", "std::vector<double>", &t_e11x11_10Sig);
2588  tree_->Branch("t_e15x15_10Sig", "std::vector<double>", &t_e15x15_10Sig);
2589  tree_->Branch("t_e7x7_15Sig", "std::vector<double>", &t_e7x7_15Sig);
2590  tree_->Branch("t_e9x9_15Sig", "std::vector<double>", &t_e9x9_15Sig);
2591  tree_->Branch("t_e11x11_15Sig", "std::vector<double>", &t_e11x11_15Sig);
2592  tree_->Branch("t_e15x15_15Sig", "std::vector<double>", &t_e15x15_15Sig);
2593  tree_->Branch("t_e7x7_20Sig", "std::vector<double>", &t_e7x7_20Sig);
2594  tree_->Branch("t_e9x9_20Sig", "std::vector<double>", &t_e9x9_20Sig);
2595  tree_->Branch("t_e11x11_20Sig", "std::vector<double>", &t_e11x11_20Sig);
2596  tree_->Branch("t_e15x15_20Sig", "std::vector<double>", &t_e15x15_20Sig);
2597  tree_->Branch("t_e7x7_25Sig", "std::vector<double>", &t_e7x7_25Sig);
2598  tree_->Branch("t_e9x9_25Sig", "std::vector<double>", &t_e9x9_25Sig);
2599  tree_->Branch("t_e11x11_25Sig", "std::vector<double>", &t_e11x11_25Sig);
2600  tree_->Branch("t_e15x15_25Sig", "std::vector<double>", &t_e15x15_25Sig);
2601  tree_->Branch("t_e7x7_30Sig", "std::vector<double>", &t_e7x7_30Sig);
2602  tree_->Branch("t_e9x9_30Sig", "std::vector<double>", &t_e9x9_30Sig);
2603  tree_->Branch("t_e11x11_30Sig", "std::vector<double>", &t_e11x11_30Sig);
2604  tree_->Branch("t_e15x15_30Sig", "std::vector<double>", &t_e15x15_30Sig);
2605 
2606  if (doMC_) {
2607  t_esim7x7 = new std::vector<double>();
2608  t_esim9x9 = new std::vector<double>();
2609  t_esim11x11 = new std::vector<double>();
2610  t_esim15x15 = new std::vector<double>();
2611 
2612  t_esim7x7Matched = new std::vector<double>();
2613  t_esim9x9Matched = new std::vector<double>();
2614  t_esim11x11Matched = new std::vector<double>();
2615  t_esim15x15Matched = new std::vector<double>();
2616 
2617  t_esim7x7Rest = new std::vector<double>();
2618  t_esim9x9Rest = new std::vector<double>();
2619  t_esim11x11Rest = new std::vector<double>();
2620  t_esim15x15Rest = new std::vector<double>();
2621 
2622  t_esim7x7Photon = new std::vector<double>();
2623  t_esim9x9Photon = new std::vector<double>();
2624  t_esim11x11Photon = new std::vector<double>();
2625  t_esim15x15Photon = new std::vector<double>();
2626 
2627  t_esim7x7NeutHad = new std::vector<double>();
2628  t_esim9x9NeutHad = new std::vector<double>();
2629  t_esim11x11NeutHad = new std::vector<double>();
2630  t_esim15x15NeutHad = new std::vector<double>();
2631 
2632  t_esim7x7CharHad = new std::vector<double>();
2633  t_esim9x9CharHad = new std::vector<double>();
2634  t_esim11x11CharHad = new std::vector<double>();
2635  t_esim15x15CharHad = new std::vector<double>();
2636 
2637  t_trkEcalEne = new std::vector<double>();
2638  t_simTrackP = new std::vector<double>();
2639  t_esimPdgId = new std::vector<double>();
2640 
2641  tree_->Branch("t_esim7x7", "std::vector<double>", &t_esim7x7);
2642  tree_->Branch("t_esim9x9", "std::vector<double>", &t_esim9x9);
2643  tree_->Branch("t_esim11x11", "std::vector<double>", &t_esim11x11);
2644  tree_->Branch("t_esim15x15", "std::vector<double>", &t_esim15x15);
2645 
2646  tree_->Branch("t_esim7x7Matched", "std::vector<double>", &t_esim7x7Matched);
2647  tree_->Branch("t_esim9x9Matched", "std::vector<double>", &t_esim9x9Matched);
2648  tree_->Branch("t_esim11x11Matched", "std::vector<double>", &t_esim11x11Matched);
2649  tree_->Branch("t_esim15x15Matched", "std::vector<double>", &t_esim15x15Matched);
2650 
2651  tree_->Branch("t_esim7x7Rest", "std::vector<double>", &t_esim7x7Rest);
2652  tree_->Branch("t_esim9x9Rest", "std::vector<double>", &t_esim9x9Rest);
2653  tree_->Branch("t_esim11x11Rest", "std::vector<double>", &t_esim11x11Rest);
2654  tree_->Branch("t_esim15x15Rest", "std::vector<double>", &t_esim15x15Rest);
2655 
2656  tree_->Branch("t_esim7x7Photon", "std::vector<double>", &t_esim7x7Photon);
2657  tree_->Branch("t_esim9x9Photon", "std::vector<double>", &t_esim9x9Photon);
2658  tree_->Branch("t_esim11x11Photon", "std::vector<double>", &t_esim11x11Photon);
2659  tree_->Branch("t_esim15x15Photon", "std::vector<double>", &t_esim15x15Photon);
2660 
2661  tree_->Branch("t_esim7x7NeutHad", "std::vector<double>", &t_esim7x7NeutHad);
2662  tree_->Branch("t_esim9x9NeutHad", "std::vector<double>", &t_esim9x9NeutHad);
2663  tree_->Branch("t_esim11x11NeutHad", "std::vector<double>", &t_esim11x11NeutHad);
2664  tree_->Branch("t_esim15x15NeutHad", "std::vector<double>", &t_esim15x15NeutHad);
2665 
2666  tree_->Branch("t_esim7x7CharHad", "std::vector<double>", &t_esim7x7CharHad);
2667  tree_->Branch("t_esim9x9CharHad", "std::vector<double>", &t_esim9x9CharHad);
2668  tree_->Branch("t_esim11x11CharHad", "std::vector<double>", &t_esim11x11CharHad);
2669  tree_->Branch("t_esim15x15CharHad", "std::vector<double>", &t_esim15x15CharHad);
2670 
2671  tree_->Branch("t_trkEcalEne", "std::vector<double>", &t_trkEcalEne);
2672  tree_->Branch("t_simTrackP", "std::vector<double>", &t_simTrackP);
2673  tree_->Branch("t_esimPdgId", "std::vector<double>", &t_esimPdgId);
2674  }
2675 
2676  t_maxNearHcalP3x3 = new std::vector<double>();
2677  t_maxNearHcalP5x5 = new std::vector<double>();
2678  t_maxNearHcalP7x7 = new std::vector<double>();
2679  t_h3x3 = new std::vector<double>();
2680  t_h5x5 = new std::vector<double>();
2681  t_h7x7 = new std::vector<double>();
2682  t_h3x3Sig = new std::vector<double>();
2683  t_h5x5Sig = new std::vector<double>();
2684  t_h7x7Sig = new std::vector<double>();
2685  t_infoHcal = new std::vector<int>();
2686 
2687  if (doMC_) {
2688  t_trkHcalEne = new std::vector<double>();
2689  t_hsim3x3 = new std::vector<double>();
2690  t_hsim5x5 = new std::vector<double>();
2691  t_hsim7x7 = new std::vector<double>();
2692  t_hsim3x3Matched = new std::vector<double>();
2693  t_hsim5x5Matched = new std::vector<double>();
2694  t_hsim7x7Matched = new std::vector<double>();
2695  t_hsim3x3Rest = new std::vector<double>();
2696  t_hsim5x5Rest = new std::vector<double>();
2697  t_hsim7x7Rest = new std::vector<double>();
2698  t_hsim3x3Photon = new std::vector<double>();
2699  t_hsim5x5Photon = new std::vector<double>();
2700  t_hsim7x7Photon = new std::vector<double>();
2701  t_hsim3x3NeutHad = new std::vector<double>();
2702  t_hsim5x5NeutHad = new std::vector<double>();
2703  t_hsim7x7NeutHad = new std::vector<double>();
2704  t_hsim3x3CharHad = new std::vector<double>();
2705  t_hsim5x5CharHad = new std::vector<double>();
2706  t_hsim7x7CharHad = new std::vector<double>();
2707  }
2708 
2709  tree_->Branch("t_maxNearHcalP3x3", "std::vector<double>", &t_maxNearHcalP3x3);
2710  tree_->Branch("t_maxNearHcalP5x5", "std::vector<double>", &t_maxNearHcalP5x5);
2711  tree_->Branch("t_maxNearHcalP7x7", "std::vector<double>", &t_maxNearHcalP7x7);
2712  tree_->Branch("t_h3x3", "std::vector<double>", &t_h3x3);
2713  tree_->Branch("t_h5x5", "std::vector<double>", &t_h5x5);
2714  tree_->Branch("t_h7x7", "std::vector<double>", &t_h7x7);
2715  tree_->Branch("t_h3x3Sig", "std::vector<double>", &t_h3x3Sig);
2716  tree_->Branch("t_h5x5Sig", "std::vector<double>", &t_h5x5Sig);
2717  tree_->Branch("t_h7x7Sig", "std::vector<double>", &t_h7x7Sig);
2718  tree_->Branch("t_infoHcal", "std::vector<int>", &t_infoHcal);
2719 
2720  if (doMC_) {
2721  tree_->Branch("t_trkHcalEne", "std::vector<double>", &t_trkHcalEne);
2722  tree_->Branch("t_hsim3x3", "std::vector<double>", &t_hsim3x3);
2723  tree_->Branch("t_hsim5x5", "std::vector<double>", &t_hsim5x5);
2724  tree_->Branch("t_hsim7x7", "std::vector<double>", &t_hsim7x7);
2725  tree_->Branch("t_hsim3x3Matched", "std::vector<double>", &t_hsim3x3Matched);
2726  tree_->Branch("t_hsim5x5Matched", "std::vector<double>", &t_hsim5x5Matched);
2727  tree_->Branch("t_hsim7x7Matched", "std::vector<double>", &t_hsim7x7Matched);
2728  tree_->Branch("t_hsim3x3Rest", "std::vector<double>", &t_hsim3x3Rest);
2729  tree_->Branch("t_hsim5x5Rest", "std::vector<double>", &t_hsim5x5Rest);
2730  tree_->Branch("t_hsim7x7Rest", "std::vector<double>", &t_hsim7x7Rest);
2731  tree_->Branch("t_hsim3x3Photon", "std::vector<double>", &t_hsim3x3Photon);
2732  tree_->Branch("t_hsim5x5Photon", "std::vector<double>", &t_hsim5x5Photon);
2733  tree_->Branch("t_hsim7x7Photon", "std::vector<double>", &t_hsim7x7Photon);
2734  tree_->Branch("t_hsim3x3NeutHad", "std::vector<double>", &t_hsim3x3NeutHad);
2735  tree_->Branch("t_hsim5x5NeutHad", "std::vector<double>", &t_hsim5x5NeutHad);
2736  tree_->Branch("t_hsim7x7NeutHad", "std::vector<double>", &t_hsim7x7NeutHad);
2737  tree_->Branch("t_hsim3x3CharHad", "std::vector<double>", &t_hsim3x3CharHad);
2738  tree_->Branch("t_hsim5x5CharHad", "std::vector<double>", &t_hsim5x5CharHad);
2739  tree_->Branch("t_hsim7x7CharHad", "std::vector<double>", &t_hsim7x7CharHad);
2740  }
2741  tree_->Branch("t_nTracks", &t_nTracks, "t_nTracks/I");
2742 }
2743 
2744 double IsolatedTracksNxN::deltaPhi(double v1, double v2) {
2745  // Computes the correctly normalized phi difference
2746  // v1, v2 = phi of object 1 and 2
2747  double diff = std::abs(v2 - v1);
2748  double corr = 2 * M_PI - diff;
2749  return ((diff < M_PI) ? diff : corr);
2750 }
2751 
2752 double IsolatedTracksNxN::deltaR(double eta1, double phi1, double eta2, double phi2) {
2753  double deta = eta1 - eta2;
2754  double dphi = deltaPhi(phi1, phi2);
2755  return std::sqrt(deta * deta + dphi * dphi);
2756 }
2757 
2759  std::string theTrackQuality = "highPurity";
2760  reco::TrackBase::TrackQuality trackQuality_ = reco::TrackBase::qualityByName(theTrackQuality);
2761 
2762  edm::LogVerbatim("IsoTrack") << " Reference Point " << pTrack->referencePoint() << "\n TrackMmentum "
2763  << pTrack->momentum() << " (pt,eta,phi)(" << pTrack->pt() << "," << pTrack->eta() << ","
2764  << pTrack->phi() << ")"
2765  << " p " << pTrack->p() << "\n Normalized chi2 " << pTrack->normalizedChi2()
2766  << " charge " << pTrack->charge() << " qoverp() " << pTrack->qoverp() << "+-"
2767  << pTrack->qoverpError() << " d0 " << pTrack->d0() << "\n NValidHits "
2768  << pTrack->numberOfValidHits() << " NLostHits " << pTrack->numberOfLostHits()
2769  << " TrackQuality " << pTrack->qualityName(trackQuality_) << " "
2770  << pTrack->quality(trackQuality_);
2771 
2772  if (printTrkHitPattern_) {
2773  const reco::HitPattern &p = pTrack->hitPattern();
2774 
2775  edm::LogVerbatim("IsoTrack") << "default ";
2776  for (int i = 0; i < p.numberOfAllHits(reco::HitPattern::TRACK_HITS); i++) {
2778  }
2779  edm::LogVerbatim("IsoTrack") << "trackerMissingInnerHits() ";
2780  for (int i = 0; i < p.numberOfAllHits(reco::HitPattern::MISSING_INNER_HITS); i++) {
2782  }
2783  edm::LogVerbatim("IsoTrack") << "trackerMissingOuterHits() ";
2784  for (int i = 0; i < p.numberOfAllHits(reco::HitPattern::MISSING_OUTER_HITS); i++) {
2786  }
2787 
2788  edm::LogVerbatim("IsoTrack") << "\n \t trackerLayersWithMeasurement() " << p.trackerLayersWithMeasurement()
2789  << "\n \t pixelLayersWithMeasurement() " << p.pixelLayersWithMeasurement()
2790  << "\n \t stripLayersWithMeasurement() " << p.stripLayersWithMeasurement()
2791  << "\n \t pixelBarrelLayersWithMeasurement() " << p.pixelBarrelLayersWithMeasurement()
2792  << "\n \t pixelEndcapLayersWithMeasurement() " << p.pixelEndcapLayersWithMeasurement()
2793  << "\n \t stripTIBLayersWithMeasurement() " << p.stripTIBLayersWithMeasurement()
2794  << "\n \t stripTIDLayersWithMeasurement() " << p.stripTIDLayersWithMeasurement()
2795  << "\n \t stripTOBLayersWithMeasurement() " << p.stripTOBLayersWithMeasurement()
2796  << "\n \t stripTECLayersWithMeasurement() " << p.stripTECLayersWithMeasurement();
2797  }
2798 }
2799 
2800 //define this as a plug-in
RunNumber_t run() const
Definition: EventID.h:38
std::vector< double > * t_hsim7x7CharHad
double qoverp() const
q / p
Definition: TrackBase.h:578
static const std::string kSharedResource
Definition: TFileService.h:76
double p() const
momentum vector magnitude
Definition: TrackBase.h:599
std::vector< double > * t_hsim3x3Matched
int stripTOBLayersWithMeasurement() const
Definition: HitPattern.cc:597
std::vector< double > * t_esim7x7CharHad
edm::EDGetTokenT< l1extra::L1JetParticleCollection > tok_L1extCenJet_
const std::string & gtTriggerMenuName() const
std::vector< double > * t_e15x15
value_type const * get() const
Definition: RefToBase.h:209
std::vector< double > * t_nTrksJetCalo
const bool L1TriggerAlgoInfo_
T getParameter(std::string const &) const
EventNumber_t event() const
Definition: EventID.h:40
std::vector< double > * t_maxNearHcalP7x7
double deltaPhi(double v1, double v2)
const Point & referencePoint() const
Reference point on the track.
Definition: TrackBase.h:632
std::vector< double > * t_trackPt
std::vector< double > * t_trackPAll
const bool printTrkHitPattern_
std::vector< double > * t_e7x7
std::vector< spr::propagatedTrackID > propagateCALO(edm::Handle< reco::TrackCollection > &trkCollection, const CaloGeometry *geo, const MagneticField *bField, const std::string &theTrackQuality, bool debug=false)
std::vector< double > * t_trackHcalPhi
std::vector< double > * t_trackDxyPVAll
const unsigned int nTracks(const reco::Vertex &sv)
~IsolatedTracksNxN() override
static std::string qualityName(TrackQuality)
Definition: TrackBase.h:551
std::vector< int > * t_trackHitOutMeasTEC
std::vector< double > * t_trackPdgIdAll
void eCaloSimInfo(std::vector< DetId > vdets, const CaloGeometry *geo, edm::Handle< T > &hitsEB, edm::Handle< T > &hitsEE, edm::Handle< edm::SimTrackContainer > &SimTk, edm::Handle< edm::SimVertexContainer > &SimVtx, edm::SimTrackContainer::const_iterator trkInfo, caloSimInfo &info, double timeCut=150, bool debug=false)
std::vector< double > * t_trackOutPosOutHitDr
std::vector< double > * t_maxNearHcalP5x5
std::vector< double > * t_L1NonIsoEMPt
std::vector< int > * t_trackHitOutMeasTIB
std::vector< double > * t_esim7x7
ParameterDescriptionBase * addUntracked(U const &iLabel, T const &value)
std::vector< int > * t_trackHitInMissTOB
std::vector< double > * t_trackDz
double d0() const
dxy parameter in perigee convention (d0 = -dxy)
Definition: TrackBase.h:590
std::vector< double > * t_trackEcalEta
int stripTIBLayersWithMeasurement() const
Definition: HitPattern.cc:577
double normalizedChi2() const
chi-squared divided by n.d.o.f. (or chi-squared * 1e6 if n.d.o.f. is zero)
Definition: TrackBase.h:572
std::vector< double > * t_trackEtaAll
std::vector< double > * t_esim11x11Matched
std::vector< double > * t_L1IsoEMEta
std::vector< double > * t_PVTracksSumPt
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:525
std::vector< double > * t_e9x9_10Sig
TH1F * h_maxNearP25x25[NPBins][NEtaBins]
TrackQuality
track quality
Definition: TrackBase.h:150
std::vector< double > * t_hsim3x3CharHad
int stripTOBLayersWithoutMeasurement(HitCategory category) const
Definition: HitPattern.cc:659
std::vector< int > * t_PVndof
std::vector< std::pair< DetId, double > > eHCALmatrixCell(const HcalTopology *topology, const DetId &det, edm::Handle< T > &hits, int ieta, int iphi, bool includeHO=false, double hbThr=-100, double heThr=-100, double hfThr=-100, double hoThr=-100, bool debug=false)
std::map< std::string, L1GtAlgorithm > AlgorithmMap
map containing the algorithms
std::vector< double > * t_hsim7x7Rest
std::vector< double > * t_L1TauJetPhi
std::vector< double > * t_PVTracksSumPtWt
const bool availableL1Configuration(int &errorCode, int &l1ConfCode) const
Definition: L1GtUtils.cc:1637
std::vector< int > * t_infoHcal
std::vector< double > * t_e11x11_15Sig
std::vector< double > * t_L1TauJetPt
std::vector< int > * t_PVNTracksWt
#define nullptr
std::vector< double > * t_trackEcalPhi
std::vector< double > * t_esim11x11NeutHad
std::vector< double > * t_L1TauJetEta
std::vector< double > * t_e15x15_15Sig
std::vector< double > * t_L1MuonEta
std::vector< double > * t_L1MuonPt
static size_t nL1BitsMax
int bunchCrossing() const
Definition: EventBase.h:64
std::vector< double > * t_h3x3
edm::LuminosityBlockNumber_t luminosityBlock() const
Definition: EventBase.h:61
std::vector< double > * t_L1MuonPhi
double phi() const
azimuthal angle of momentum vector
Definition: TrackBase.h:614
unsigned short numberOfLostHits() const
number of cases where track crossed a layer without getting a hit.
Definition: TrackBase.h:743
const bool decision(const edm::Event &iEvent, const std::string &nameAlgoTechTrig, int &errorCode) const
Definition: L1GtUtils.cc:1024
Definition: weight.py:1
std::vector< double > * t_trackDxyAll
T * make(const Args &...args) const
make new ROOT object
Definition: TFileService.h:64
std::vector< double > * t_maxNearHcalP3x3
IsolatedTracksNxN(const edm::ParameterSet &)
edm::EDGetTokenT< edm::SimVertexContainer > tok_simVtx_
std::vector< double > * t_hsim3x3Photon
edm::EDGetTokenT< reco::BeamSpot > tok_bs_
int pixelLayersWithMeasurement() const
Definition: HitPattern.cc:492
const Vector & momentum() const
track momentum vector
Definition: TrackBase.h:629
std::vector< double > * t_PVTracksSumPtHP
const math::XYZPoint & outerPosition() const
position of the outermost hit
Definition: Track.h:62
std::vector< double > * t_esim11x11Rest
int trackerLayersWithMeasurement() const
Definition: HitPattern.cc:513
int pixelEndcapLayersWithMeasurement() const
Definition: HitPattern.cc:566
const double maxTrackEta_
std::vector< int > * t_trackNOuterHits
std::vector< double > * t_h7x7Sig
std::vector< double > * t_e15x15_30Sig
std::vector< double > * t_trackPhiAll
std::vector< double > * t_e7x7_25Sig
double genPartPBins[NPBins+1]
std::vector< double > * t_trkHcalEne
double deltaR(double eta1, double phi1, double eta2, double phi2)
std::vector< double > * t_e7x7_20Sig
std::vector< double > * t_e11x11_10Sig
AlgorithmMap::const_iterator CItAlgo
iterators through map containing the algorithms
std::vector< double > * t_trackPtAll
std::vector< double > * t_h3x3Sig
static size_t NEtaBins
std::vector< double > * t_esimPdgId
double eNeutralHad
Definition: CaloSimInfo.h:47
void printHitPattern(HitCategory category, int position, std::ostream &stream) const
Definition: HitPattern.cc:803
double eChargedHad
Definition: CaloSimInfo.h:48
std::vector< double > * t_e11x11_20Sig
std::vector< double > * t_jetEta
std::vector< double > * t_maxNearP31x31
std::vector< int > * t_trackHitInMissTEC
double chargeIsolationEcal(unsigned int trkIndex, std::vector< spr::propagatedTrackID > &vdetIds, const CaloGeometry *geo, const CaloTopology *caloTopology, int ieta, int iphi, bool debug=false)
std::vector< double > * t_trkEcalEne
int iEvent
Definition: GenABIO.cc:224
std::vector< double > * t_trackEta
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
std::vector< double > * t_esim9x9Photon
std::vector< int > * t_trackHitInMeasTID
double eta() const
pseudorapidity of momentum vector
Definition: TrackBase.h:617
std::vector< double > * t_hsim5x5Rest
std::vector< double > * t_e11x11
std::vector< double > * t_esim15x15
std::map< std::string, double > eHCALSimInfo(const edm::Event &, const HcalTopology *topology, const DetId &det, const CaloGeometry *geo, edm::Handle< T > &hits, edm::Handle< edm::SimTrackContainer > &SimTk, edm::Handle< edm::SimVertexContainer > &SimVtx, const reco::Track *pTrack, TrackerHitAssociator &associate, int ieta, int iphi, double timeCut=150, bool includeHO=false, bool debug=false)
edm::EDGetTokenT< edm::SimTrackContainer > tok_simTk_
std::vector< double > * t_L1CenJetPt
std::vector< double > * t_trackChiSqAll
std::vector< double > * t_e15x15_25Sig
std::vector< int > * t_trackHitOutMissTIB
edm::EDGetTokenT< edm::PCaloHitContainer > tok_caloHH_
std::vector< double > * t_esim15x15Rest
std::vector< double > * t_esim11x11
std::vector< double > * t_hsim7x7
std::vector< int > * t_PVNTracksHPWt
int stripTIDLayersWithMeasurement() const
Definition: HitPattern.cc:587
ConsumesCollector consumesCollector()
Use a ConsumesCollector to gather consumes information from helper functions.
T sqrt(T t)
Definition: SSEVec.h:19
std::vector< int > * t_trackHitOutMissTID
std::vector< int > * t_trackHitOutMissTOBTEC
double pt() const
track transverse momentum
Definition: TrackBase.h:602
std::vector< int > * t_trackHitsTEC
std::vector< double > * t_e9x9_30Sig
edm::EDGetTokenT< edm::PCaloHitContainer > tok_caloEB_
std::vector< double > * t_L1CenJetPhi
int numberOfAllHits(HitCategory category) const
Definition: HitPattern.h:774
std::vector< double > * t_L1FwdJetEta
std::vector< double > * t_h7x7
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
void analyze(const edm::Event &, const edm::EventSetup &) override
std::vector< int > * t_ecalSpike11x11
std::vector< double > * t_esim15x15NeutHad
std::vector< double > * t_e9x9_20Sig
std::vector< int > * t_trackHitOutMeasTOB
std::vector< int > * t_trackHitInMeasTIB
edm::SimTrackContainer::const_iterator matchedSimTrack(const edm::Event &iEvent, edm::Handle< edm::SimTrackContainer > &SimTk, edm::Handle< edm::SimVertexContainer > &SimVtx, const reco::Track *pTrack, TrackerHitAssociator &associate, bool debug=false)
unsigned short numberOfValidHits() const
number of valid hits found
Definition: TrackBase.h:740
edm::EDGetTokenT< reco::TrackCollection > tok_genTrack_
T * make(const Args &...args) const
make new ROOT object
std::vector< double > * t_trackDzPV
std::vector< int > * t_PVNTracksHP
std::vector< double > * t_L1FwdJetPhi
edm::EDGetTokenT< l1extra::L1JetParticleCollection > tok_L1extFwdJet_
edm::EDGetTokenT< l1extra::L1EmParticleCollection > tok_L1extIsoEm_
ParameterDescriptionBase * add(U const &iLabel, T const &value)
std::vector< double > * t_nTrksJetVtx
bool isValid() const
Definition: HandleBase.h:70
std::vector< double > * t_esim7x7NeutHad
std::vector< double > * t_hsim3x3NeutHad
std::vector< double > * t_L1NonIsoEMPhi
std::vector< double > * t_trackDzBS
std::vector< int > * t_trackHitOutMissTOB
std::vector< double > * t_L1CenJetEta
std::vector< double > * t_trackDzPVAll
JetCorrectorParameters corr
Definition: classes.h:5
edm::EDGetTokenT< l1extra::L1MuonParticleCollection > tok_L1extMu_
ii
Definition: cuy.py:590
#define M_PI
std::vector< double > * t_esim7x7Matched
std::vector< double > * t_esim9x9
std::vector< double > * t_hsim5x5
std::vector< double > * t_h5x5
double qoverpError() const
error on signed transverse curvature
Definition: TrackBase.h:693
std::vector< double > * t_trackDxyPV
std::vector< double > * t_hsim5x5NeutHad
std::vector< double > * t_trackChiSq
double dz() const
dz parameter (= dsz/cos(lambda)). This is the track z0 w.r.t (0,0,0) only if the refPoint is close to...
Definition: TrackBase.h:596
std::vector< double > * t_hsim5x5Photon
std::vector< double > * t_PVy
std::vector< unsigned int > m_triggerMaskAlgoTrig
std::vector< int > * t_L1PreScale
std::vector< double > * t_hsim3x3Rest
int stripTIDLayersWithoutMeasurement(HitCategory category) const
Definition: HitPattern.cc:649
Definition: DetId.h:17
std::vector< int > * t_PVisValid
static TrackQuality qualityByName(const std::string &name)
Definition: TrackBase.cc:126
std::vector< double > * t_esim9x9Rest
std::vector< double > * t_L1METPhi
std::vector< int > * t_trackHitInMissTIB
TFileDirectory mkdir(const std::string &dir, const std::string &descr="")
create a new subdirectory
Definition: TFileService.h:69
std::vector< double > * t_e9x9_15Sig
std::vector< double > * t_e7x7_15Sig
std::vector< double > * t_trackPhi
T const * product() const
Definition: Handle.h:69
std::vector< double > * t_e7x7_10Sig
const HitPattern & hitPattern() const
Access the hit pattern, indicating in which Tracker layers the track has hits.
Definition: TrackBase.h:483
void endJob() override
XYZPointD XYZPoint
point in space with cartesian internal representation
Definition: Point3D.h:12
const double pvTracksPtMin_
edm::EDGetTokenT< l1extra::L1EmParticleCollection > tok_L1extNoIsoEm_
std::vector< double > * t_trackDzAll
edm::EDGetTokenT< reco::VertexCollection > tok_recVtx_
TH1F * h_maxNearP31x31[NPBins][NEtaBins]
std::vector< double > * t_esim11x11CharHad
int stripLayersWithMeasurement() const
Definition: HitPattern.h:975
int pixelBarrelLayersWithMeasurement() const
Definition: HitPattern.cc:555
edm::EDGetTokenT< edm::PCaloHitContainer > tok_caloEE_
edm::EDGetTokenT< EcalRecHitCollection > tok_EB_
TH1F * h_maxNearP15x15[NPBins][NEtaBins]
void add(std::string const &label, ParameterSetDescription const &psetDescription)
std::vector< double > * t_e9x9_25Sig
void eECALSimInfo(const edm::Event &, const DetId &det, const CaloGeometry *geo, const CaloTopology *caloTopology, edm::Handle< T > &hitsEB, edm::Handle< T > &hitsEE, edm::Handle< edm::SimTrackContainer > &SimTk, edm::Handle< edm::SimVertexContainer > &SimVtx, const reco::Track *pTrack, TrackerHitAssociator &associate, int ieta, int iphi, caloSimInfo &info, double timeCut=150, bool debug=false)
std::vector< double > * t_esim7x7Photon
static const bool useL1GtTriggerMenuLite(true)
std::vector< double > * t_esim9x9NeutHad
std::vector< double > * t_L1FwdJetPt
std::vector< double > * t_simTrackP
std::vector< double > * t_hsim7x7Matched
std::vector< int > * t_trackPVIdx
bool quality(const TrackQuality) const
Track quality.
Definition: TrackBase.h:531
std::vector< int > * t_trackHitsTOB
std::vector< double > * t_esim9x9Matched
std::vector< double > * t_hsim7x7NeutHad
std::vector< double > * t_L1IsoEMPhi
std::vector< int > * t_PVNTracks
edm::EDGetTokenT< HBHERecHitCollection > tok_hbhe_
std::vector< double > * t_maxNearP21x21
TrackerHitAssociator::Config trackerHitAssociatorConfig_
edm::EventID id() const
Definition: EventBase.h:59
std::vector< double > * t_L1NonIsoEMEta
double p1[4]
Definition: TauolaWrapper.h:89
std::vector< double > * t_PVz
std::pair< math::XYZPoint, double > propagateTrackerEnd(const reco::Track *, const MagneticField *, bool debug=false)
void printTrack(const reco::Track *pTrack)
std::vector< double > * t_e15x15_20Sig
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:274
T get() const
Definition: EventSetup.h:73
std::vector< double > * t_PVTracksSumPtHPWt
std::vector< double > * t_trackDxy
std::vector< std::string > * t_L1AlgoNames
std::vector< double > * t_hsim5x5CharHad
std::vector< double > * t_e15x15_10Sig
const AlgorithmMap & gtAlgorithmMap() const
get / set the algorithm map (by name)
int stripTECLayersWithMeasurement() const
Definition: HitPattern.cc:607
TH1F * h_maxNearP21x21[NPBins][NEtaBins]
int stripTECLayersWithoutMeasurement(HitCategory category) const
Definition: HitPattern.cc:669
std::vector< double > * t_jetPhi
std::vector< double > * t_trackL
std::vector< double > * t_esim7x7Rest
std::vector< double > * t_trackDxyBS
int charge() const
track electric charge
Definition: TrackBase.h:575
const Point & position() const
position
Definition: BeamSpot.h:59
std::vector< double > * t_trackHcalEta
std::vector< double > * t_L1METPt
std::map< std::pair< unsigned int, std::string >, int > l1AlgoMap_
std::vector< int > * t_NLayersCrossed
edm::EDGetTokenT< reco::CaloJetCollection > tok_jets_
std::vector< int > * t_trackHitInMeasTOB
std::vector< double > * t_PVx
std::vector< int > * t_trackHitInMeasTEC
void beginJob() override
std::vector< double > * t_esim15x15Photon
std::vector< double > * t_e9x9
std::vector< double > * t_hsim5x5Matched
const L1GtTriggerMenu * ptrL1TriggerMenuEventSetup(int &errorCode)
return a pointer to the L1 trigger menu from event setup
Definition: L1GtUtils.cc:1577
double genPartEtaBins[NEtaBins+1]
double dxy() const
dxy parameter. (This is the transverse impact parameter w.r.t. to (0,0,0) ONLY if refPoint is close t...
Definition: TrackBase.h:587
std::vector< double > * t_esim15x15Matched
double chargeIsolationHcal(unsigned int trkIndex, std::vector< spr::propagatedTrackID > &vdetIds, const HcalTopology *topology, int ieta, int iphi, bool debug=false)
std::vector< int > * t_trackHitOutMeasTID
std::vector< double > * t_L1METEta
std::vector< double > * t_e7x7_30Sig
T const * product() const
Definition: ESHandle.h:86
std::vector< int > * t_trackHitOutMissTEC
std::vector< double > * t_e11x11_25Sig
std::vector< double > * t_hsim3x3
std::vector< double > * t_trackP
std::vector< double > * t_hsim7x7Photon
std::vector< TrackBaseRef >::const_iterator trackRef_iterator
The iteratator for the vector<TrackRef>
Definition: Vertex.h:37
#define constexpr
std::vector< double > * t_jetPt
static const bool useL1EventSetup(true)
std::vector< double > * t_L1IsoEMPt
std::vector< double > * t_esim11x11Photon
int stripTIBLayersWithoutMeasurement(HitCategory category) const
Definition: HitPattern.cc:639
std::vector< double > * t_h5x5Sig
std::vector< int > * t_trackHitInMissTID
std::vector< double > * t_e11x11_30Sig
std::vector< int > * t_trackHitInMissTIBTID
std::vector< double > * t_esim9x9CharHad
double eECALmatrix(const DetId &detId, edm::Handle< T > &hitsEB, edm::Handle< T > &hitsEE, const CaloGeometry *geo, const CaloTopology *caloTopology, int ieta, int iphi, double ebThr=-100, double eeThr=-100, double tMin=-500, double tMax=500, bool debug=false)
edm::EDGetTokenT< EcalRecHitCollection > tok_EE_
double eHCALmatrix(const HcalTopology *topology, const DetId &det, edm::Handle< T > &hits, int ieta, int iphi, bool includeHO=false, bool algoNew=true, double hbThr=-100, double heThr=-100, double hfThr=-100, double hoThr=-100, double tMin=-500, double tMax=500, int useRaw=0, bool debug=false)
edm::EDGetTokenT< l1extra::L1JetParticleCollection > tok_L1extTauJet_
std::vector< double > * t_esim15x15CharHad
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
const int prescaleFactor(const edm::Event &iEvent, const std::string &nameAlgoTechTrig, int &errorCode) const
return prescale factor for a given algorithm or technical trigger
Definition: L1GtUtils.cc:1036