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 <memory>
23 #include <sstream>
24 #include <string>
25 #include <vector>
26 
27 // user include files
28 #include <Math/GenVector/VectorUtil.h>
29 
30 // root objects
31 #include "TROOT.h"
32 #include "TSystem.h"
33 #include "TFile.h"
34 #include "TH1F.h"
35 #include "TH2F.h"
36 #include "TProfile.h"
37 #include "TDirectory.h"
38 #include "TTree.h"
39 
48 
50 //L1 trigger Menus etc
59 
64 // muons and tracks
69 // Vertices
73 // Calorimeters
80 // Trigger
88 //L1 objects
95 // Jets in the event
99 
102 
110 // TFile Service
113 
114 // ecal / hcal
122 
125 
129 
130 // SimHit + SimTrack
136 
137 // track associator
141 
142 class IsolatedTracksNxN : public edm::one::EDAnalyzer<edm::one::SharedResources> {
143 public:
144  explicit IsolatedTracksNxN(const edm::ParameterSet &);
145  ~IsolatedTracksNxN() override;
146 
147  static void fillDescriptions(edm::ConfigurationDescriptions &descriptions);
148 
149 private:
150  void beginJob() override;
151  void analyze(const edm::Event &, const edm::EventSetup &) override;
152  void endJob() override;
153 
154  void printTrack(const reco::Track *pTrack);
155 
156  void bookHistograms();
157 
158  void clearTreeVectors();
159 
160 private:
161  std::unique_ptr<L1GtUtils> m_l1GtUtils;
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 
210  static constexpr size_t NPBins = 15;
211  static constexpr size_t NEtaBins = 3;
213 
218  TH1F *h_nTracks;
225 
226  TTree *tree_;
227 
230  std::vector<std::string> t_L1AlgoNames;
231  std::vector<int> t_L1PreScale;
232  int t_L1Decision[128];
233 
234  std::vector<double> t_L1CenJetPt, t_L1CenJetEta, t_L1CenJetPhi;
235  std::vector<double> t_L1FwdJetPt, t_L1FwdJetEta, t_L1FwdJetPhi;
236  std::vector<double> t_L1TauJetPt, t_L1TauJetEta, t_L1TauJetPhi;
237  std::vector<double> t_L1MuonPt, t_L1MuonEta, t_L1MuonPhi;
238  std::vector<double> t_L1IsoEMPt, t_L1IsoEMEta, t_L1IsoEMPhi;
240  std::vector<double> t_L1METPt, t_L1METEta, t_L1METPhi;
241 
242  std::vector<double> t_PVx, t_PVy, t_PVz, t_PVTracksSumPt;
245  std::vector<int> t_PVNTracksHP, t_PVNTracksHPWt;
246 
247  std::vector<double> t_jetPt, t_jetEta, t_jetPhi;
248  std::vector<double> t_nTrksJetCalo, t_nTrksJetVtx;
249 
251  std::vector<double> t_trackPtAll;
253 
254  std::vector<double> t_trackP, t_trackPt, t_trackEta, t_trackPhi;
257  std::vector<double> t_trackDxyPV, t_trackDzPV;
258  std::vector<double> t_trackChiSq;
259  std::vector<int> t_trackPVIdx;
260 
262  std::vector<int> t_trackHitsTOB, t_trackHitsTEC;
269  std::vector<double> t_trackOutPosOutHitDr, t_trackL;
270 
271  std::vector<double> t_maxNearP31x31;
272  std::vector<double> t_maxNearP21x21;
273  std::vector<int> t_ecalSpike11x11;
274 
275  std::vector<double> t_e7x7, t_e9x9, t_e11x11, t_e15x15;
281 
282  std::vector<double> t_esimPdgId, t_simTrackP, t_trkEcalEne;
283  std::vector<double> t_esim7x7, t_esim9x9, t_esim11x11, t_esim15x15;
289 
291  std::vector<double> t_h3x3, t_h5x5, t_h7x7;
292  std::vector<double> t_h3x3Sig, t_h5x5Sig, t_h7x7Sig;
293  std::vector<int> t_infoHcal;
294 
295  std::vector<double> t_trkHcalEne;
296  std::vector<double> t_hsim3x3, t_hsim5x5, t_hsim7x7;
302 };
303 
304 static const bool useL1EventSetup(true);
305 static const bool useL1GtTriggerMenuLite(true);
306 
308  : trackerHitAssociatorConfig_(consumesCollector()),
309  doMC_(iConfig.getUntrackedParameter<bool>("doMC", false)),
310  writeAllTracks_(iConfig.getUntrackedParameter<bool>("writeAllTracks", false)),
311  myverbose_(iConfig.getUntrackedParameter<int>("verbosity", 5)),
312  pvTracksPtMin_(iConfig.getUntrackedParameter<double>("pvTracksPtMin", 1.0)),
313  debugTrks_(iConfig.getUntrackedParameter<int>("debugTracks", 0)),
314  printTrkHitPattern_(iConfig.getUntrackedParameter<bool>("printTrkHitPattern", false)),
315  minTrackP_(iConfig.getUntrackedParameter<double>("minTrackP", 1.0)),
316  maxTrackEta_(iConfig.getUntrackedParameter<double>("maxTrackEta", 5.0)),
317  debugL1Info_(iConfig.getUntrackedParameter<bool>("debugL1Info", false)),
318  L1TriggerAlgoInfo_(iConfig.getUntrackedParameter<bool>("l1TriggerAlgoInfo", false)),
319  tMinE_(iConfig.getUntrackedParameter<double>("timeMinCutECAL", -500.)),
320  tMaxE_(iConfig.getUntrackedParameter<double>("timeMaxCutECAL", 500.)),
321  tMinH_(iConfig.getUntrackedParameter<double>("timeMinCutHCAL", -500.)),
322  tMaxH_(iConfig.getUntrackedParameter<double>("timeMaxCutHCAL", 500.)) {
323  if (L1TriggerAlgoInfo_) {
324  m_l1GtUtils = std::make_unique<L1GtUtils>(
326  }
327 
328  usesResource(TFileService::kSharedResource);
329 
330  //now do what ever initialization is needed
331 
332  edm::InputTag L1extraTauJetSource_ = iConfig.getParameter<edm::InputTag>("l1extraTauJetSource");
333  edm::InputTag L1extraCenJetSource_ = iConfig.getParameter<edm::InputTag>("l1extraCenJetSource");
334  edm::InputTag L1extraFwdJetSource_ = iConfig.getParameter<edm::InputTag>("l1extraFwdJetSource");
335  edm::InputTag L1extraMuonSource_ = iConfig.getParameter<edm::InputTag>("l1extraMuonSource");
336  edm::InputTag L1extraIsoEmSource_ = iConfig.getParameter<edm::InputTag>("l1extraIsoEmSource");
337  edm::InputTag L1extraNonIsoEmSource_ = iConfig.getParameter<edm::InputTag>("l1extraNonIsoEmSource");
338  edm::InputTag L1GTReadoutRcdSource_ = iConfig.getParameter<edm::InputTag>("l1GTReadoutRcdSource");
339  edm::InputTag L1GTObjectMapRcdSource_ = iConfig.getParameter<edm::InputTag>("l1GTObjectMapRcdSource");
340  edm::InputTag JetSrc_ = iConfig.getParameter<edm::InputTag>("jetSource");
341  edm::InputTag JetExtender_ = iConfig.getParameter<edm::InputTag>("jetExtender");
342  edm::InputTag HBHERecHitSource_ = iConfig.getParameter<edm::InputTag>("hbheRecHitSource");
343 
344  // define tokens for access
345  tok_L1extTauJet_ = consumes<l1extra::L1JetParticleCollection>(L1extraTauJetSource_);
346  tok_L1extCenJet_ = consumes<l1extra::L1JetParticleCollection>(L1extraCenJetSource_);
347  tok_L1extFwdJet_ = consumes<l1extra::L1JetParticleCollection>(L1extraFwdJetSource_);
348  tok_L1extMu_ = consumes<l1extra::L1MuonParticleCollection>(L1extraMuonSource_);
349  tok_L1extIsoEm_ = consumes<l1extra::L1EmParticleCollection>(L1extraIsoEmSource_);
350  tok_L1extNoIsoEm_ = consumes<l1extra::L1EmParticleCollection>(L1extraNonIsoEmSource_);
351  tok_jets_ = consumes<reco::CaloJetCollection>(JetSrc_);
352  tok_hbhe_ = consumes<HBHERecHitCollection>(HBHERecHitSource_);
353 
354  tok_genTrack_ = consumes<reco::TrackCollection>(edm::InputTag("generalTracks"));
355  tok_recVtx_ = consumes<reco::VertexCollection>(edm::InputTag("offlinePrimaryVertices"));
356  tok_bs_ = consumes<reco::BeamSpot>(edm::InputTag("offlineBeamSpot"));
357  tok_EB_ = consumes<EcalRecHitCollection>(edm::InputTag("ecalRecHit", "EcalRecHitsEB"));
358  tok_EE_ = consumes<EcalRecHitCollection>(edm::InputTag("ecalRecHit", "EcalRecHitsEE"));
359 
360  tok_simTk_ = consumes<edm::SimTrackContainer>(edm::InputTag("g4SimHits"));
361  tok_simVtx_ = consumes<edm::SimVertexContainer>(edm::InputTag("g4SimHits"));
362  tok_caloEB_ = consumes<edm::PCaloHitContainer>(edm::InputTag("g4SimHits", "EcalHitsEB"));
363  tok_caloEE_ = consumes<edm::PCaloHitContainer>(edm::InputTag("g4SimHits", "EcalHitsEE"));
364  tok_caloHH_ = consumes<edm::PCaloHitContainer>(edm::InputTag("g4SimHits", "HcalHits"));
365 
366  if (myverbose_ >= 0) {
367  edm::LogVerbatim("IsoTrack") << "Parameters read from config file \n"
368  << " doMC " << doMC_ << "\t myverbose " << myverbose_ << "\t minTrackP "
369  << minTrackP_ << "\t maxTrackEta " << maxTrackEta_ << "\t tMinE " << tMinE_
370  << "\t tMaxE " << tMaxE_ << "\t tMinH " << tMinH_ << "\t tMaxH " << tMaxH_
371  << "\n debugL1Info " << debugL1Info_ << "\t L1TriggerAlgoInfo " << L1TriggerAlgoInfo_
372  << "\n";
373  }
374 
375  tok_geom_ = esConsumes<CaloGeometry, CaloGeometryRecord>();
376  tok_caloTopology_ = esConsumes<CaloTopology, CaloTopologyRecord>();
377  tok_topo_ = esConsumes<HcalTopology, HcalRecNumberingRecord>();
378  tok_magField_ = esConsumes<MagneticField, IdealMagneticFieldRecord>();
379  tok_ecalChStatus_ = esConsumes<EcalChannelStatus, EcalChannelStatusRcd>();
380  tok_sevlv_ = esConsumes<EcalSeverityLevelAlgo, EcalSeverityLevelAlgoRcd>();
381  tok_htmap_ = esConsumes<EcalTrigTowerConstituentsMap, IdealGeometryRecord>();
382 }
383 
385 
388  desc.addUntracked<bool>("doMC", false);
389  desc.addUntracked<bool>("writeAllTracks", false);
390  desc.addUntracked<int>("verbosity", 1);
391  desc.addUntracked<double>("pvTracksPtMin", 0.200);
392  desc.addUntracked<int>("debugTracks", 0);
393  desc.addUntracked<bool>("printTrkHitPattern", true);
394  desc.addUntracked<double>("minTrackP", 1.0);
395  desc.addUntracked<double>("maxTrackEta", 2.6);
396  desc.addUntracked<bool>("debugL1Info", false);
397  desc.addUntracked<bool>("l1TriggerAlgoInfo", false);
398  desc.add<edm::InputTag>("l1extraTauJetSource", edm::InputTag("l1extraParticles", "Tau"));
399  desc.add<edm::InputTag>("l1extraCenJetSource", edm::InputTag("l1extraParticles", "Central"));
400  desc.add<edm::InputTag>("l1extraFwdJetSource", edm::InputTag("l1extraParticles", "Forward"));
401  desc.add<edm::InputTag>("l1extraMuonSource", edm::InputTag("l1extraParticles"));
402  desc.add<edm::InputTag>("l1extraIsoEmSource", edm::InputTag("l1extraParticles", "Isolated"));
403  desc.add<edm::InputTag>("l1extraNonIsoEmSource", edm::InputTag("l1extraParticles", "NonIsolated"));
404  desc.add<edm::InputTag>("l1GTReadoutRcdSource", edm::InputTag("gtDigis"));
405  desc.add<edm::InputTag>("l1GTObjectMapRcdSource", edm::InputTag("hltL1GtObjectMap"));
406  desc.add<edm::InputTag>("jetSource", edm::InputTag("iterativeCone5CaloJets"));
407  desc.add<edm::InputTag>("jetExtender", edm::InputTag("iterativeCone5JetExtender"));
408  desc.add<edm::InputTag>("hbheRecHitSource", edm::InputTag("hbhereco"));
409  desc.addUntracked<double>("maxNearTrackPT", 1.0);
410  desc.addUntracked<double>("timeMinCutECAL", -500.0);
411  desc.addUntracked<double>("timeMaxCutECAL", 500.0);
412  desc.addUntracked<double>("timeMinCutHCAL", -500.0);
413  desc.addUntracked<double>("timeMaxCutHCAL", 500.0);
414  descriptions.add("isolatedTracksNxN", desc);
415 }
416 
418  bool haveIsoTrack = false;
419 
420  const MagneticField *bField = &iSetup.getData(tok_magField_);
421 
423 
424  t_RunNo = iEvent.id().run();
425  t_EvtNo = iEvent.id().event();
426  t_Lumi = iEvent.luminosityBlock();
427  t_Bunch = iEvent.bunchCrossing();
428 
429  ++nEventProc_;
430 
432  iEvent.getByToken(tok_genTrack_, trkCollection);
433  if (debugTrks_ > 1) {
434  edm::LogVerbatim("IsoTrack") << "Track Collection: ";
435  edm::LogVerbatim("IsoTrack") << "Number of Tracks " << trkCollection->size();
436  }
437  std::string theTrackQuality = "highPurity";
438  reco::TrackBase::TrackQuality trackQuality_ = reco::TrackBase::qualityByName(theTrackQuality);
439 
440  //===================== save L1 Trigger information =======================
441  if (L1TriggerAlgoInfo_) {
442  m_l1GtUtils->getL1GtRunCache(iEvent, iSetup, useL1EventSetup, useL1GtTriggerMenuLite);
443 
444  int iErrorCode = -1;
445  int l1ConfCode = -1;
446  const bool l1Conf = m_l1GtUtils->availableL1Configuration(iErrorCode, l1ConfCode);
447  if (!l1Conf) {
448  edm::LogVerbatim("IsoTrack")
449  << "\nL1 configuration code:" << l1ConfCode << "\nNo valid L1 trigger configuration available."
450  << "\nSee text above for error code interpretation"
451  << "\nNo return here, in order to test each method, protected against configuration error.";
452  }
453 
454  const L1GtTriggerMenu *m_l1GtMenu = m_l1GtUtils->ptrL1TriggerMenuEventSetup(iErrorCode);
455  const AlgorithmMap &algorithmMap = m_l1GtMenu->gtAlgorithmMap();
456  const std::string &menuName = m_l1GtMenu->gtTriggerMenuName();
457 
458  if (!initL1_) {
459  initL1_ = true;
460  edm::LogVerbatim("IsoTrack") << "menuName " << menuName;
461  for (CItAlgo itAlgo = algorithmMap.begin(); itAlgo != algorithmMap.end(); itAlgo++) {
462  std::string algName = itAlgo->first;
463  int algBitNumber = (itAlgo->second).algoBitNumber();
464  l1AlgoMap_.insert(std::pair<std::pair<unsigned int, std::string>, int>(
465  std::pair<unsigned int, std::string>(algBitNumber, algName), 0));
466  }
467  std::map<std::pair<unsigned int, std::string>, int>::iterator itr;
468  for (itr = l1AlgoMap_.begin(); itr != l1AlgoMap_.end(); itr++) {
469  edm::LogVerbatim("IsoTrack") << " ********** " << (itr->first).first << " " << (itr->first).second << " "
470  << itr->second;
471  }
472  }
473 
474  std::vector<int> algbits;
475  for (CItAlgo itAlgo = algorithmMap.begin(); itAlgo != algorithmMap.end(); itAlgo++) {
476  std::string algName = itAlgo->first;
477  int algBitNumber = (itAlgo->second).algoBitNumber();
478  bool decision = m_l1GtUtils->decision(iEvent, itAlgo->first, iErrorCode);
479  int preScale = m_l1GtUtils->prescaleFactor(iEvent, itAlgo->first, iErrorCode);
480 
481  // save the algo names which fired
482  if (decision) {
483  l1AlgoMap_[std::pair<unsigned int, std::string>(algBitNumber, algName)] += 1;
484  h_L1AlgoNames->Fill(algBitNumber);
485  t_L1AlgoNames.push_back(itAlgo->first);
486  t_L1PreScale.push_back(preScale);
487  t_L1Decision[algBitNumber] = 1;
488  algbits.push_back(algBitNumber);
489  }
490  }
491 
492  if (debugL1Info_) {
493  for (unsigned int ii = 0; ii < t_L1AlgoNames.size(); ii++) {
494  edm::LogVerbatim("IsoTrack") << ii << " " << t_L1AlgoNames[ii] << " " << t_L1PreScale[ii] << " " << algbits[ii];
495  }
496  for (int i = 0; i < 128; ++i) {
497  edm::LogVerbatim("IsoTrack") << "L1Decision: " << i << ":" << t_L1Decision[i];
498  }
499  }
500 
501  // L1Taus
503  l1extra::L1JetParticleCollection::const_iterator itr;
504  int iL1Obj = 0;
505  for (itr = l1TauHandle->begin(), iL1Obj = 0; itr != l1TauHandle->end(); ++itr, iL1Obj++) {
506  if (iL1Obj < 1) {
507  t_L1TauJetPt.push_back(itr->pt());
508  t_L1TauJetEta.push_back(itr->eta());
509  t_L1TauJetPhi.push_back(itr->phi());
510  }
511  if (debugL1Info_) {
512  edm::LogVerbatim("IsoTrack") << "tauJ p/pt " << itr->momentum() << " " << itr->pt() << " eta/phi "
513  << itr->eta() << " " << itr->phi();
514  }
515  }
516 
517  // L1 Central Jets
518  const edm::Handle<l1extra::L1JetParticleCollection> &l1CenJetHandle = iEvent.getHandle(tok_L1extCenJet_);
519  for (itr = l1CenJetHandle->begin(), iL1Obj = 0; itr != l1CenJetHandle->end(); ++itr, iL1Obj++) {
520  if (iL1Obj < 1) {
521  t_L1CenJetPt.push_back(itr->pt());
522  t_L1CenJetEta.push_back(itr->eta());
523  t_L1CenJetPhi.push_back(itr->phi());
524  }
525  if (debugL1Info_) {
526  edm::LogVerbatim("IsoTrack") << "cenJ p/pt " << itr->momentum() << " " << itr->pt() << " eta/phi "
527  << itr->eta() << " " << itr->phi();
528  }
529  }
530 
531  // L1 Forward Jets
532  const edm::Handle<l1extra::L1JetParticleCollection> &l1FwdJetHandle = iEvent.getHandle(tok_L1extFwdJet_);
533  for (itr = l1FwdJetHandle->begin(), iL1Obj = 0; itr != l1FwdJetHandle->end(); ++itr, iL1Obj++) {
534  if (iL1Obj < 1) {
535  t_L1FwdJetPt.push_back(itr->pt());
536  t_L1FwdJetEta.push_back(itr->eta());
537  t_L1FwdJetPhi.push_back(itr->phi());
538  }
539  if (debugL1Info_) {
540  edm::LogVerbatim("IsoTrack") << "fwdJ p/pt " << itr->momentum() << " " << itr->pt() << " eta/phi "
541  << itr->eta() << " " << itr->phi();
542  }
543  }
544 
545  // L1 Isolated EM onjects
546  l1extra::L1EmParticleCollection::const_iterator itrEm;
547  const edm::Handle<l1extra::L1EmParticleCollection> &l1IsoEmHandle = iEvent.getHandle(tok_L1extIsoEm_);
548  for (itrEm = l1IsoEmHandle->begin(), iL1Obj = 0; itrEm != l1IsoEmHandle->end(); ++itrEm, iL1Obj++) {
549  if (iL1Obj < 1) {
550  t_L1IsoEMPt.push_back(itrEm->pt());
551  t_L1IsoEMEta.push_back(itrEm->eta());
552  t_L1IsoEMPhi.push_back(itrEm->phi());
553  }
554  if (debugL1Info_) {
555  edm::LogVerbatim("IsoTrack") << "isoEm p/pt " << itrEm->momentum() << " " << itrEm->pt() << " eta/phi "
556  << itrEm->eta() << " " << itrEm->phi();
557  }
558  }
559 
560  // L1 Non-Isolated EM onjects
561  const edm::Handle<l1extra::L1EmParticleCollection> &l1NonIsoEmHandle = iEvent.getHandle(tok_L1extNoIsoEm_);
562  for (itrEm = l1NonIsoEmHandle->begin(), iL1Obj = 0; itrEm != l1NonIsoEmHandle->end(); ++itrEm, iL1Obj++) {
563  if (iL1Obj < 1) {
564  t_L1NonIsoEMPt.push_back(itrEm->pt());
565  t_L1NonIsoEMEta.push_back(itrEm->eta());
566  t_L1NonIsoEMPhi.push_back(itrEm->phi());
567  }
568  if (debugL1Info_) {
569  edm::LogVerbatim("IsoTrack") << "nonIsoEm p/pt " << itrEm->momentum() << " " << itrEm->pt() << " eta/phi "
570  << itrEm->eta() << " " << itrEm->phi();
571  }
572  }
573 
574  // L1 Muons
575  l1extra::L1MuonParticleCollection::const_iterator itrMu;
577  for (itrMu = l1MuHandle->begin(), iL1Obj = 0; itrMu != l1MuHandle->end(); ++itrMu, iL1Obj++) {
578  if (iL1Obj < 1) {
579  t_L1MuonPt.push_back(itrMu->pt());
580  t_L1MuonEta.push_back(itrMu->eta());
581  t_L1MuonPhi.push_back(itrMu->phi());
582  }
583  if (debugL1Info_) {
584  edm::LogVerbatim("IsoTrack") << "l1muon p/pt " << itrMu->momentum() << " " << itrMu->pt() << " eta/phi "
585  << itrMu->eta() << " " << itrMu->phi();
586  }
587  }
588  }
589 
590  //============== store the information about all the Non-Fake vertices ===============
591 
592  const edm::Handle<reco::VertexCollection> &recVtxs = iEvent.getHandle(tok_recVtx_);
593 
594  std::vector<reco::Track> svTracks;
595  math::XYZPoint leadPV(0, 0, 0);
596  double sumPtMax = -1.0;
597  for (unsigned int ind = 0; ind < recVtxs->size(); ind++) {
598  if (!((*recVtxs)[ind].isFake())) {
599  double vtxTrkSumPt = 0.0, vtxTrkSumPtWt = 0.0;
600  int vtxTrkNWt = 0;
601  double vtxTrkSumPtHP = 0.0, vtxTrkSumPtHPWt = 0.0;
602  int vtxTrkNHP = 0, vtxTrkNHPWt = 0;
603 
604  reco::Vertex::trackRef_iterator vtxTrack = (*recVtxs)[ind].tracks_begin();
605 
606  for (vtxTrack = (*recVtxs)[ind].tracks_begin(); vtxTrack != (*recVtxs)[ind].tracks_end(); vtxTrack++) {
607  if ((*vtxTrack)->pt() < pvTracksPtMin_)
608  continue;
609 
610  bool trkQuality = (*vtxTrack)->quality(trackQuality_);
611 
612  vtxTrkSumPt += (*vtxTrack)->pt();
613 
614  vtxTrkSumPt += (*vtxTrack)->pt();
615  if (trkQuality) {
616  vtxTrkSumPtHP += (*vtxTrack)->pt();
617  vtxTrkNHP++;
618  }
619 
620  double weight = (*recVtxs)[ind].trackWeight(*vtxTrack);
621  h_PVTracksWt->Fill(weight);
622  if (weight > 0.5) {
623  vtxTrkSumPtWt += (*vtxTrack)->pt();
624  vtxTrkNWt++;
625  if (trkQuality) {
626  vtxTrkSumPtHPWt += (*vtxTrack)->pt();
627  vtxTrkNHPWt++;
628  }
629  }
630  }
631 
632  if (vtxTrkSumPt > sumPtMax) {
633  sumPtMax = vtxTrkSumPt;
634  leadPV = math::XYZPoint((*recVtxs)[ind].x(), (*recVtxs)[ind].y(), (*recVtxs)[ind].z());
635  }
636 
637  t_PVx.push_back((*recVtxs)[ind].x());
638  t_PVy.push_back((*recVtxs)[ind].y());
639  t_PVz.push_back((*recVtxs)[ind].z());
640  t_PVisValid.push_back((*recVtxs)[ind].isValid());
641  t_PVNTracks.push_back((*recVtxs)[ind].tracksSize());
642  t_PVndof.push_back((*recVtxs)[ind].ndof());
643  t_PVNTracksWt.push_back(vtxTrkNWt);
644  t_PVTracksSumPt.push_back(vtxTrkSumPt);
645  t_PVTracksSumPtWt.push_back(vtxTrkSumPtWt);
646 
647  t_PVNTracksHP.push_back(vtxTrkNHP);
648  t_PVNTracksHPWt.push_back(vtxTrkNHPWt);
649  t_PVTracksSumPtHP.push_back(vtxTrkSumPtHP);
650  t_PVTracksSumPtHPWt.push_back(vtxTrkSumPtHPWt);
651 
652  if (myverbose_ == 4) {
653  edm::LogVerbatim("IsoTrack") << "PV " << ind << " isValid " << (*recVtxs)[ind].isValid() << " isFake "
654  << (*recVtxs)[ind].isFake() << " hasRefittedTracks() " << ind << " "
655  << (*recVtxs)[ind].hasRefittedTracks() << " refittedTrksSize "
656  << (*recVtxs)[ind].refittedTracks().size() << " tracksSize() "
657  << (*recVtxs)[ind].tracksSize() << " sumPt " << vtxTrkSumPt;
658  }
659  } // if vtx is not Fake
660  } // loop over PVs
661  //===================================================================================
662 
663  // Get the beamspot
664  const edm::Handle<reco::BeamSpot> &beamSpotH = iEvent.getHandle(tok_bs_);
665  math::XYZPoint bspot;
666  bspot = (beamSpotH.isValid()) ? beamSpotH->position() : math::XYZPoint(0, 0, 0);
667 
668  //=====================================================================
669 
671 
672  for (unsigned int ijet = 0; ijet < (*jets).size(); ijet++) {
673  t_jetPt.push_back((*jets)[ijet].pt());
674  t_jetEta.push_back((*jets)[ijet].eta());
675  t_jetPhi.push_back((*jets)[ijet].phi());
676  t_nTrksJetVtx.push_back(-1.0);
677  t_nTrksJetCalo.push_back(-1.0);
678  }
679 
680  //===================================================================================
681 
682  // get handles to calogeometry and calotopology
683  const CaloGeometry *geo = &iSetup.getData(tok_geom_);
684  const CaloTopology *caloTopology = &iSetup.getData(tok_caloTopology_);
685  const HcalTopology *theHBHETopology = &iSetup.getData(tok_topo_);
686 
687  edm::Handle<EcalRecHitCollection> barrelRecHitsHandle;
688  iEvent.getByToken(tok_EB_, barrelRecHitsHandle);
689  edm::Handle<EcalRecHitCollection> endcapRecHitsHandle;
690  iEvent.getByToken(tok_EE_, endcapRecHitsHandle);
691 
692  // Retrieve the good/bad ECAL channels from the DB
693  const EcalChannelStatus *theEcalChStatus = &iSetup.getData(tok_ecalChStatus_);
694  const EcalSeverityLevelAlgo *sevlv = &iSetup.getData(tok_sevlv_);
695 
696  // Retrieve trigger tower map
697  const EcalTrigTowerConstituentsMap &ttMap = iSetup.getData(tok_htmap_);
698 
700  iEvent.getByToken(tok_hbhe_, hbhe);
701  if (!hbhe.isValid()) {
702  ++nbad_;
703  if (nbad_ < 10)
704  edm::LogVerbatim("IsoTrack") << "No HBHE rechit collection";
705  return;
706  }
707  const HBHERecHitCollection Hithbhe = *(hbhe.product());
708 
709  //get Handles to SimTracks and SimHits
711  if (doMC_)
712  iEvent.getByToken(tok_simTk_, SimTk);
713 
715  if (doMC_)
716  iEvent.getByToken(tok_simVtx_, SimVtx);
717 
718  //get Handles to PCaloHitContainers of eb/ee/hbhe
720  if (doMC_)
721  iEvent.getByToken(tok_caloEB_, pcaloeb);
722 
724  if (doMC_)
725  iEvent.getByToken(tok_caloEE_, pcaloee);
726 
728  if (doMC_)
729  iEvent.getByToken(tok_caloHH_, pcalohh);
730 
731  //associates tracker rechits/simhits to a track
732  std::unique_ptr<TrackerHitAssociator> associate;
733  if (doMC_)
734  associate = std::make_unique<TrackerHitAssociator>(iEvent, trackerHitAssociatorConfig_);
735 
736  //===================================================================================
737 
738  h_nTracks->Fill(trkCollection->size());
739 
740  int nTracks = 0;
741 
742  t_nTracks = trkCollection->size();
743 
744  // get the list of DetIds closest to the impact point of track on surface calorimeters
745  std::vector<spr::propagatedTrackID> trkCaloDets;
746  spr::propagateCALO(trkCollection, geo, bField, theTrackQuality, trkCaloDets, false);
747  std::vector<spr::propagatedTrackID>::const_iterator trkDetItr;
748 
749  if (myverbose_ > 2) {
750  for (trkDetItr = trkCaloDets.begin(); trkDetItr != trkCaloDets.end(); trkDetItr++) {
751  edm::LogVerbatim("IsoTrack") << trkDetItr->trkItr->p() << " " << trkDetItr->trkItr->eta() << " "
752  << trkDetItr->okECAL << " " << trkDetItr->okHCAL;
753  if (trkDetItr->okECAL) {
754  if (trkDetItr->detIdECAL.subdetId() == EcalBarrel)
755  edm::LogVerbatim("IsoTrack") << (EBDetId)trkDetItr->detIdECAL;
756  else
757  edm::LogVerbatim("IsoTrack") << (EEDetId)trkDetItr->detIdECAL;
758  }
759  if (trkDetItr->okHCAL)
760  edm::LogVerbatim("IsoTrack") << (HcalDetId)trkDetItr->detIdHCAL;
761  }
762  }
763 
764  int nvtxTracks = 0;
765  for (trkDetItr = trkCaloDets.begin(), nTracks = 0; trkDetItr != trkCaloDets.end(); trkDetItr++, nTracks++) {
766  const reco::Track *pTrack = &(*(trkDetItr->trkItr));
767 
768  // find vertex index the track is associated with
769  int pVtxTkId = -1;
770  for (unsigned int ind = 0; ind < recVtxs->size(); ind++) {
771  if (!((*recVtxs)[ind].isFake())) {
772  reco::Vertex::trackRef_iterator vtxTrack = (*recVtxs)[ind].tracks_begin();
773  for (vtxTrack = (*recVtxs)[ind].tracks_begin(); vtxTrack != (*recVtxs)[ind].tracks_end(); vtxTrack++) {
774  const edm::RefToBase<reco::Track> &pvtxTrack = (*vtxTrack);
775  if (pTrack == pvtxTrack.get()) {
776  pVtxTkId = ind;
777  break;
778  if (myverbose_ > 2) {
779  if (pTrack->pt() > 1.0) {
780  edm::LogVerbatim("IsoTrack") << "Debug the track association with vertex ";
781  edm::LogVerbatim("IsoTrack") << pTrack << " " << pvtxTrack.get();
782  edm::LogVerbatim("IsoTrack")
783  << " trkVtxIndex " << nvtxTracks << " vtx " << ind << " pt " << pTrack->pt() << " eta "
784  << pTrack->eta() << " " << pTrack->pt() - pvtxTrack->pt() << " "
785  << pTrack->eta() - pvtxTrack->eta();
786  nvtxTracks++;
787  }
788  }
789  }
790  }
791  }
792  }
793 
794  const reco::HitPattern &hitp = pTrack->hitPattern();
795  int nLayersCrossed = hitp.trackerLayersWithMeasurement();
796  int nOuterHits = hitp.stripTOBLayersWithMeasurement() + hitp.stripTECLayersWithMeasurement();
797 
798  bool ifGood = pTrack->quality(trackQuality_);
799  double pt1 = pTrack->pt();
800  double p1 = pTrack->p();
801  double eta1 = pTrack->momentum().eta();
802  double phi1 = pTrack->momentum().phi();
803  double etaEcal1 = trkDetItr->etaECAL;
804  double phiEcal1 = trkDetItr->phiECAL;
805  double etaHcal1 = trkDetItr->etaHCAL;
806  double phiHcal1 = trkDetItr->phiHCAL;
807  double dxy1 = pTrack->dxy();
808  double dz1 = pTrack->dz();
809  double chisq1 = pTrack->normalizedChi2();
810  double dxybs1 = beamSpotH.isValid() ? pTrack->dxy(bspot) : pTrack->dxy();
811  double dzbs1 = beamSpotH.isValid() ? pTrack->dz(bspot) : pTrack->dz();
812  double dxypv1 = pTrack->dxy();
813  double dzpv1 = pTrack->dz();
814  if (pVtxTkId >= 0) {
815  math::XYZPoint thisTkPV =
816  math::XYZPoint((*recVtxs)[pVtxTkId].x(), (*recVtxs)[pVtxTkId].y(), (*recVtxs)[pVtxTkId].z());
817  dxypv1 = pTrack->dxy(thisTkPV);
818  dzpv1 = pTrack->dz(thisTkPV);
819  }
820 
821  h_recEtaPt_0->Fill(eta1, pt1);
822  h_recEtaP_0->Fill(eta1, p1);
823  h_recPt_0->Fill(pt1);
824  h_recP_0->Fill(p1);
825  h_recEta_0->Fill(eta1);
826  h_recPhi_0->Fill(phi1);
827 
828  if (ifGood && nLayersCrossed > 7) {
829  h_recEtaPt_1->Fill(eta1, pt1);
830  h_recEtaP_1->Fill(eta1, p1);
831  h_recPt_1->Fill(pt1);
832  h_recP_1->Fill(p1);
833  h_recEta_1->Fill(eta1);
834  h_recPhi_1->Fill(phi1);
835  }
836 
837  if (!ifGood)
838  continue;
839 
840  if (writeAllTracks_ && p1 > 2.0 && nLayersCrossed > 7) {
841  t_trackPAll.push_back(p1);
842  t_trackEtaAll.push_back(eta1);
843  t_trackPhiAll.push_back(phi1);
844  t_trackPtAll.push_back(pt1);
845  t_trackDxyAll.push_back(dxy1);
846  t_trackDzAll.push_back(dz1);
847  t_trackDxyPVAll.push_back(dxypv1);
848  t_trackDzPVAll.push_back(dzpv1);
849  t_trackChiSqAll.push_back(chisq1);
850  }
851  if (doMC_) {
852  edm::SimTrackContainer::const_iterator matchedSimTrkAll =
853  spr::matchedSimTrack(iEvent, SimTk, SimVtx, pTrack, *associate, false);
854  if (writeAllTracks_ && matchedSimTrkAll != SimTk->end())
855  t_trackPdgIdAll.push_back(matchedSimTrkAll->type());
856  }
857 
858  if (pt1 > minTrackP_ && std::abs(eta1) < maxTrackEta_ && trkDetItr->okECAL) {
859  double maxNearP31x31 = 999.0, maxNearP25x25 = 999.0, maxNearP21x21 = 999.0, maxNearP15x15 = 999.0;
860  maxNearP31x31 = spr::chargeIsolationEcal(nTracks, trkCaloDets, geo, caloTopology, 15, 15);
861  maxNearP25x25 = spr::chargeIsolationEcal(nTracks, trkCaloDets, geo, caloTopology, 12, 12);
862  maxNearP21x21 = spr::chargeIsolationEcal(nTracks, trkCaloDets, geo, caloTopology, 10, 10);
863  maxNearP15x15 = spr::chargeIsolationEcal(nTracks, trkCaloDets, geo, caloTopology, 7, 7);
864 
865  int iTrkEtaBin = -1, iTrkMomBin = -1;
866  for (unsigned int ieta = 0; ieta < NEtaBins; ieta++) {
868  iTrkEtaBin = ieta;
869  }
870  for (unsigned int ipt = 0; ipt < NPBins; ipt++) {
871  if (p1 > genPartPBins[ipt] && p1 < genPartPBins[ipt + 1])
872  iTrkMomBin = ipt;
873  }
874  if (iTrkMomBin >= 0 && iTrkEtaBin >= 0) {
875  h_maxNearP31x31[iTrkMomBin][iTrkEtaBin]->Fill(maxNearP31x31);
876  h_maxNearP25x25[iTrkMomBin][iTrkEtaBin]->Fill(maxNearP25x25);
877  h_maxNearP21x21[iTrkMomBin][iTrkEtaBin]->Fill(maxNearP21x21);
878  h_maxNearP15x15[iTrkMomBin][iTrkEtaBin]->Fill(maxNearP15x15);
879  }
880  if (maxNearP31x31 < 0.0 && nLayersCrossed > 7 && nOuterHits > 4) {
881  h_recEtaPt_2->Fill(eta1, pt1);
882  h_recEtaP_2->Fill(eta1, p1);
883  h_recPt_2->Fill(pt1);
884  h_recP_2->Fill(p1);
885  h_recEta_2->Fill(eta1);
886  h_recPhi_2->Fill(phi1);
887  }
888 
889  // if charge isolated in ECAL, store the further quantities
890  if (maxNearP31x31 < 1.0) {
891  haveIsoTrack = true;
892 
893  // get the matching simTrack
894  double simTrackP = -1;
895  if (doMC_) {
896  edm::SimTrackContainer::const_iterator matchedSimTrk =
897  spr::matchedSimTrack(iEvent, SimTk, SimVtx, pTrack, *associate, false);
898  if (matchedSimTrk != SimTk->end())
899  simTrackP = matchedSimTrk->momentum().P();
900  }
901 
902  // get ECal Tranverse Profile
903  std::pair<double, bool> e7x7P, e9x9P, e11x11P, e15x15P;
904  std::pair<double, bool> e7x7_10SigP, e9x9_10SigP, e11x11_10SigP, e15x15_10SigP;
905  std::pair<double, bool> e7x7_15SigP, e9x9_15SigP, e11x11_15SigP, e15x15_15SigP;
906  std::pair<double, bool> e7x7_20SigP, e9x9_20SigP, e11x11_20SigP, e15x15_20SigP;
907  std::pair<double, bool> e7x7_25SigP, e9x9_25SigP, e11x11_25SigP, e15x15_25SigP;
908  std::pair<double, bool> e7x7_30SigP, e9x9_30SigP, e11x11_30SigP, e15x15_30SigP;
909 
910  spr::caloSimInfo simInfo3x3, simInfo5x5, simInfo7x7, simInfo9x9;
911  spr::caloSimInfo simInfo11x11, simInfo13x13, simInfo15x15, simInfo21x21, simInfo25x25, simInfo31x31;
912  double trkEcalEne = 0;
913 
914  const DetId isoCell = trkDetItr->detIdECAL;
915  e7x7P = spr::eECALmatrix(isoCell,
916  barrelRecHitsHandle,
917  endcapRecHitsHandle,
918  *theEcalChStatus,
919  geo,
920  caloTopology,
921  sevlv,
922  3,
923  3,
924  -100.0,
925  -100.0,
926  tMinE_,
927  tMaxE_);
928  e9x9P = spr::eECALmatrix(isoCell,
929  barrelRecHitsHandle,
930  endcapRecHitsHandle,
931  *theEcalChStatus,
932  geo,
933  caloTopology,
934  sevlv,
935  4,
936  4,
937  -100.0,
938  -100.0,
939  tMinE_,
940  tMaxE_);
941  e11x11P = spr::eECALmatrix(isoCell,
942  barrelRecHitsHandle,
943  endcapRecHitsHandle,
944  *theEcalChStatus,
945  geo,
946  caloTopology,
947  sevlv,
948  5,
949  5,
950  -100.0,
951  -100.0,
952  tMinE_,
953  tMaxE_);
954  e15x15P = spr::eECALmatrix(isoCell,
955  barrelRecHitsHandle,
956  endcapRecHitsHandle,
957  *theEcalChStatus,
958  geo,
959  caloTopology,
960  sevlv,
961  7,
962  7,
963  -100.0,
964  -100.0,
965  tMinE_,
966  tMaxE_);
967 
968  e7x7_10SigP = spr::eECALmatrix(isoCell,
969  barrelRecHitsHandle,
970  endcapRecHitsHandle,
971  *theEcalChStatus,
972  geo,
973  caloTopology,
974  sevlv,
975  3,
976  3,
977  0.030,
978  0.150,
979  tMinE_,
980  tMaxE_);
981  e9x9_10SigP = spr::eECALmatrix(isoCell,
982  barrelRecHitsHandle,
983  endcapRecHitsHandle,
984  *theEcalChStatus,
985  geo,
986  caloTopology,
987  sevlv,
988  4,
989  4,
990  0.030,
991  0.150,
992  tMinE_,
993  tMaxE_);
994  e11x11_10SigP = spr::eECALmatrix(isoCell,
995  barrelRecHitsHandle,
996  endcapRecHitsHandle,
997  *theEcalChStatus,
998  geo,
999  caloTopology,
1000  sevlv,
1001  5,
1002  5,
1003  0.030,
1004  0.150,
1005  tMinE_,
1006  tMaxE_);
1007  e15x15_10SigP = spr::eECALmatrix(isoCell,
1008  barrelRecHitsHandle,
1009  endcapRecHitsHandle,
1010  *theEcalChStatus,
1011  geo,
1012  caloTopology,
1013  sevlv,
1014  7,
1015  7,
1016  0.030,
1017  0.150,
1018  tMinE_,
1019  tMaxE_);
1020 
1021  e7x7_15SigP = spr::eECALmatrix(isoCell,
1022  barrelRecHitsHandle,
1023  endcapRecHitsHandle,
1024  *theEcalChStatus,
1025  geo,
1026  caloTopology,
1027  sevlv,
1028  ttMap,
1029  3,
1030  3,
1031  0.20,
1032  0.45,
1033  tMinE_,
1034  tMaxE_);
1035  e9x9_15SigP = spr::eECALmatrix(isoCell,
1036  barrelRecHitsHandle,
1037  endcapRecHitsHandle,
1038  *theEcalChStatus,
1039  geo,
1040  caloTopology,
1041  sevlv,
1042  ttMap,
1043  4,
1044  4,
1045  0.20,
1046  0.45,
1047  tMinE_,
1048  tMaxE_);
1049  e11x11_15SigP = spr::eECALmatrix(isoCell,
1050  barrelRecHitsHandle,
1051  endcapRecHitsHandle,
1052  *theEcalChStatus,
1053  geo,
1054  caloTopology,
1055  sevlv,
1056  ttMap,
1057  5,
1058  5,
1059  0.20,
1060  0.45,
1061  tMinE_,
1062  tMaxE_);
1063  e15x15_15SigP = spr::eECALmatrix(isoCell,
1064  barrelRecHitsHandle,
1065  endcapRecHitsHandle,
1066  *theEcalChStatus,
1067  geo,
1068  caloTopology,
1069  sevlv,
1070  ttMap,
1071  7,
1072  7,
1073  0.20,
1074  0.45,
1075  tMinE_,
1076  tMaxE_,
1077  false);
1078 
1079  e7x7_20SigP = spr::eECALmatrix(isoCell,
1080  barrelRecHitsHandle,
1081  endcapRecHitsHandle,
1082  *theEcalChStatus,
1083  geo,
1084  caloTopology,
1085  sevlv,
1086  3,
1087  3,
1088  0.060,
1089  0.300,
1090  tMinE_,
1091  tMaxE_);
1092  e9x9_20SigP = spr::eECALmatrix(isoCell,
1093  barrelRecHitsHandle,
1094  endcapRecHitsHandle,
1095  *theEcalChStatus,
1096  geo,
1097  caloTopology,
1098  sevlv,
1099  4,
1100  4,
1101  0.060,
1102  0.300,
1103  tMinE_,
1104  tMaxE_);
1105  e11x11_20SigP = spr::eECALmatrix(isoCell,
1106  barrelRecHitsHandle,
1107  endcapRecHitsHandle,
1108  *theEcalChStatus,
1109  geo,
1110  caloTopology,
1111  sevlv,
1112  5,
1113  5,
1114  0.060,
1115  0.300,
1116  tMinE_,
1117  tMaxE_);
1118  e15x15_20SigP = spr::eECALmatrix(isoCell,
1119  barrelRecHitsHandle,
1120  endcapRecHitsHandle,
1121  *theEcalChStatus,
1122  geo,
1123  caloTopology,
1124  sevlv,
1125  7,
1126  7,
1127  0.060,
1128  0.300,
1129  tMinE_,
1130  tMaxE_);
1131 
1132  e7x7_25SigP = spr::eECALmatrix(isoCell,
1133  barrelRecHitsHandle,
1134  endcapRecHitsHandle,
1135  *theEcalChStatus,
1136  geo,
1137  caloTopology,
1138  sevlv,
1139  3,
1140  3,
1141  0.075,
1142  0.375,
1143  tMinE_,
1144  tMaxE_);
1145  e9x9_25SigP = spr::eECALmatrix(isoCell,
1146  barrelRecHitsHandle,
1147  endcapRecHitsHandle,
1148  *theEcalChStatus,
1149  geo,
1150  caloTopology,
1151  sevlv,
1152  4,
1153  4,
1154  0.075,
1155  0.375,
1156  tMinE_,
1157  tMaxE_);
1158  e11x11_25SigP = spr::eECALmatrix(isoCell,
1159  barrelRecHitsHandle,
1160  endcapRecHitsHandle,
1161  *theEcalChStatus,
1162  geo,
1163  caloTopology,
1164  sevlv,
1165  5,
1166  5,
1167  0.075,
1168  0.375,
1169  tMinE_,
1170  tMaxE_);
1171  e15x15_25SigP = spr::eECALmatrix(isoCell,
1172  barrelRecHitsHandle,
1173  endcapRecHitsHandle,
1174  *theEcalChStatus,
1175  geo,
1176  caloTopology,
1177  sevlv,
1178  7,
1179  7,
1180  0.075,
1181  0.375,
1182  tMinE_,
1183  tMaxE_);
1184 
1185  e7x7_30SigP = spr::eECALmatrix(isoCell,
1186  barrelRecHitsHandle,
1187  endcapRecHitsHandle,
1188  *theEcalChStatus,
1189  geo,
1190  caloTopology,
1191  sevlv,
1192  3,
1193  3,
1194  0.090,
1195  0.450,
1196  tMinE_,
1197  tMaxE_);
1198  e9x9_30SigP = spr::eECALmatrix(isoCell,
1199  barrelRecHitsHandle,
1200  endcapRecHitsHandle,
1201  *theEcalChStatus,
1202  geo,
1203  caloTopology,
1204  sevlv,
1205  4,
1206  4,
1207  0.090,
1208  0.450,
1209  tMinE_,
1210  tMaxE_);
1211  e11x11_30SigP = spr::eECALmatrix(isoCell,
1212  barrelRecHitsHandle,
1213  endcapRecHitsHandle,
1214  *theEcalChStatus,
1215  geo,
1216  caloTopology,
1217  sevlv,
1218  5,
1219  5,
1220  0.090,
1221  0.450,
1222  tMinE_,
1223  tMaxE_);
1224  e15x15_30SigP = spr::eECALmatrix(isoCell,
1225  barrelRecHitsHandle,
1226  endcapRecHitsHandle,
1227  *theEcalChStatus,
1228  geo,
1229  caloTopology,
1230  sevlv,
1231  7,
1232  7,
1233  0.090,
1234  0.450,
1235  tMinE_,
1236  tMaxE_);
1237  if (myverbose_ == 2) {
1238  edm::LogVerbatim("IsoTrack") << "clean ecal rechit ";
1239  edm::LogVerbatim("IsoTrack") << "e7x7 " << e7x7P.first << " e9x9 " << e9x9P.first << " e11x11 "
1240  << e11x11P.first << " e15x15 " << e15x15P.first;
1241  edm::LogVerbatim("IsoTrack") << "e7x7_10Sig " << e7x7_10SigP.first << " e11x11_10Sig " << e11x11_10SigP.first
1242  << " e15x15_10Sig " << e15x15_10SigP.first;
1243  }
1244 
1245  if (doMC_) {
1246  // check the energy from SimHits
1248  iEvent, isoCell, geo, caloTopology, pcaloeb, pcaloee, SimTk, SimVtx, pTrack, *associate, 1, 1, simInfo3x3);
1250  iEvent, isoCell, geo, caloTopology, pcaloeb, pcaloee, SimTk, SimVtx, pTrack, *associate, 2, 2, simInfo5x5);
1252  iEvent, isoCell, geo, caloTopology, pcaloeb, pcaloee, SimTk, SimVtx, pTrack, *associate, 3, 3, simInfo7x7);
1254  iEvent, isoCell, geo, caloTopology, pcaloeb, pcaloee, SimTk, SimVtx, pTrack, *associate, 4, 4, simInfo9x9);
1256  isoCell,
1257  geo,
1258  caloTopology,
1259  pcaloeb,
1260  pcaloee,
1261  SimTk,
1262  SimVtx,
1263  pTrack,
1264  *associate,
1265  5,
1266  5,
1267  simInfo11x11);
1269  isoCell,
1270  geo,
1271  caloTopology,
1272  pcaloeb,
1273  pcaloee,
1274  SimTk,
1275  SimVtx,
1276  pTrack,
1277  *associate,
1278  6,
1279  6,
1280  simInfo13x13);
1282  isoCell,
1283  geo,
1284  caloTopology,
1285  pcaloeb,
1286  pcaloee,
1287  SimTk,
1288  SimVtx,
1289  pTrack,
1290  *associate,
1291  7,
1292  7,
1293  simInfo15x15,
1294  150.0,
1295  false);
1297  isoCell,
1298  geo,
1299  caloTopology,
1300  pcaloeb,
1301  pcaloee,
1302  SimTk,
1303  SimVtx,
1304  pTrack,
1305  *associate,
1306  10,
1307  10,
1308  simInfo21x21);
1310  isoCell,
1311  geo,
1312  caloTopology,
1313  pcaloeb,
1314  pcaloee,
1315  SimTk,
1316  SimVtx,
1317  pTrack,
1318  *associate,
1319  12,
1320  12,
1321  simInfo25x25);
1323  isoCell,
1324  geo,
1325  caloTopology,
1326  pcaloeb,
1327  pcaloee,
1328  SimTk,
1329  SimVtx,
1330  pTrack,
1331  *associate,
1332  15,
1333  15,
1334  simInfo31x31);
1335 
1336  trkEcalEne = spr::eCaloSimInfo(iEvent, geo, pcaloeb, pcaloee, SimTk, SimVtx, pTrack, *associate);
1337  if (myverbose_ == 1) {
1338  edm::LogVerbatim("IsoTrack") << "Track momentum " << pt1;
1339  edm::LogVerbatim("IsoTrack") << "ecal siminfo ";
1340  edm::LogVerbatim("IsoTrack") << "simInfo3x3: eTotal " << simInfo3x3.eTotal << " eMatched "
1341  << simInfo3x3.eMatched << " eRest " << simInfo3x3.eRest << " eGamma "
1342  << simInfo3x3.eGamma << " eNeutralHad " << simInfo3x3.eNeutralHad
1343  << " eChargedHad " << simInfo3x3.eChargedHad;
1344  edm::LogVerbatim("IsoTrack") << "simInfo5x5: eTotal " << simInfo5x5.eTotal << " eMatched "
1345  << simInfo5x5.eMatched << " eRest " << simInfo5x5.eRest << " eGamma "
1346  << simInfo5x5.eGamma << " eNeutralHad " << simInfo5x5.eNeutralHad
1347  << " eChargedHad " << simInfo5x5.eChargedHad;
1348  edm::LogVerbatim("IsoTrack") << "simInfo7x7: eTotal " << simInfo7x7.eTotal << " eMatched "
1349  << simInfo7x7.eMatched << " eRest " << simInfo7x7.eRest << " eGamma "
1350  << simInfo7x7.eGamma << " eNeutralHad " << simInfo7x7.eNeutralHad
1351  << " eChargedHad " << simInfo7x7.eChargedHad;
1352  edm::LogVerbatim("IsoTrack") << "simInfo9x9: eTotal " << simInfo9x9.eTotal << " eMatched "
1353  << simInfo9x9.eMatched << " eRest " << simInfo9x9.eRest << " eGamma "
1354  << simInfo9x9.eGamma << " eNeutralHad " << simInfo9x9.eNeutralHad
1355  << " eChargedHad " << simInfo9x9.eChargedHad;
1356  edm::LogVerbatim("IsoTrack") << "simInfo11x11: eTotal " << simInfo11x11.eTotal << " eMatched "
1357  << simInfo11x11.eMatched << " eRest " << simInfo11x11.eRest << " eGamma "
1358  << simInfo11x11.eGamma << " eNeutralHad " << simInfo11x11.eNeutralHad
1359  << " eChargedHad " << simInfo11x11.eChargedHad;
1360  edm::LogVerbatim("IsoTrack") << "simInfo15x15: eTotal " << simInfo15x15.eTotal << " eMatched "
1361  << simInfo15x15.eMatched << " eRest " << simInfo15x15.eRest << " eGamma "
1362  << simInfo15x15.eGamma << " eNeutralHad " << simInfo15x15.eNeutralHad
1363  << " eChargedHad " << simInfo15x15.eChargedHad;
1364  edm::LogVerbatim("IsoTrack") << "simInfo31x31: eTotal " << simInfo31x31.eTotal << " eMatched "
1365  << simInfo31x31.eMatched << " eRest " << simInfo31x31.eRest << " eGamma "
1366  << simInfo31x31.eGamma << " eNeutralHad " << simInfo31x31.eNeutralHad
1367  << " eChargedHad " << simInfo31x31.eChargedHad;
1368  edm::LogVerbatim("IsoTrack") << "trkEcalEne" << trkEcalEne;
1369  }
1370  }
1371 
1372  // ======= Get HCAL information
1373  double hcalScale = 1.0;
1374  if (std::abs(pTrack->eta()) < 1.4) {
1375  hcalScale = 120.0;
1376  } else {
1377  hcalScale = 135.0;
1378  }
1379 
1380  double maxNearHcalP3x3 = -1, maxNearHcalP5x5 = -1, maxNearHcalP7x7 = -1;
1381  maxNearHcalP3x3 = spr::chargeIsolationHcal(nTracks, trkCaloDets, theHBHETopology, 1, 1);
1382  maxNearHcalP5x5 = spr::chargeIsolationHcal(nTracks, trkCaloDets, theHBHETopology, 2, 2);
1383  maxNearHcalP7x7 = spr::chargeIsolationHcal(nTracks, trkCaloDets, theHBHETopology, 3, 3);
1384 
1385  double h3x3 = 0, h5x5 = 0, h7x7 = 0;
1386  double h3x3Sig = 0, h5x5Sig = 0, h7x7Sig = 0;
1387  double trkHcalEne = 0;
1388  spr::caloSimInfo hsimInfo3x3, hsimInfo5x5, hsimInfo7x7;
1389 
1390  if (trkDetItr->okHCAL) {
1391  const DetId ClosestCell(trkDetItr->detIdHCAL);
1392  // bool includeHO=false, bool algoNew=true, bool debug=false
1393  h3x3 = spr::eHCALmatrix(
1394  theHBHETopology, ClosestCell, hbhe, 1, 1, false, true, -100.0, -100.0, -100.0, -100.0, tMinH_, tMaxH_);
1395  h5x5 = spr::eHCALmatrix(
1396  theHBHETopology, ClosestCell, hbhe, 2, 2, false, true, -100.0, -100.0, -100.0, -100.0, tMinH_, tMaxH_);
1397  h7x7 = spr::eHCALmatrix(
1398  theHBHETopology, ClosestCell, hbhe, 3, 3, false, true, -100.0, -100.0, -100.0, -100.0, tMinH_, tMaxH_);
1399  h3x3Sig = spr::eHCALmatrix(
1400  theHBHETopology, ClosestCell, hbhe, 1, 1, false, true, 0.7, 0.8, -100.0, -100.0, tMinH_, tMaxH_);
1401  h5x5Sig = spr::eHCALmatrix(
1402  theHBHETopology, ClosestCell, hbhe, 2, 2, false, true, 0.7, 0.8, -100.0, -100.0, tMinH_, tMaxH_);
1403  h7x7Sig = spr::eHCALmatrix(
1404  theHBHETopology, ClosestCell, hbhe, 3, 3, false, true, 0.7, 0.8, -100.0, -100.0, tMinH_, tMaxH_);
1405 
1406  if (myverbose_ == 2) {
1407  edm::LogVerbatim("IsoTrack") << "HCAL 3x3 " << h3x3 << " " << h3x3Sig << " 5x5 " << h5x5 << " " << h5x5Sig
1408  << " 7x7 " << h7x7 << " " << h7x7Sig;
1409  }
1410 
1411  if (doMC_) {
1413  iEvent, theHBHETopology, ClosestCell, geo, pcalohh, SimTk, SimVtx, pTrack, *associate, 1, 1, hsimInfo3x3);
1415  iEvent, theHBHETopology, ClosestCell, geo, pcalohh, SimTk, SimVtx, pTrack, *associate, 2, 2, hsimInfo5x5);
1417  theHBHETopology,
1418  ClosestCell,
1419  geo,
1420  pcalohh,
1421  SimTk,
1422  SimVtx,
1423  pTrack,
1424  *associate,
1425  3,
1426  3,
1427  hsimInfo7x7,
1428  150.0,
1429  false,
1430  false);
1431  trkHcalEne = spr::eCaloSimInfo(iEvent, geo, pcalohh, SimTk, SimVtx, pTrack, *associate);
1432  if (myverbose_ == 1) {
1433  edm::LogVerbatim("IsoTrack") << "Hcal siminfo ";
1434  edm::LogVerbatim("IsoTrack")
1435  << "hsimInfo3x3: eTotal " << hsimInfo3x3.eTotal << " eMatched " << hsimInfo3x3.eMatched << " eRest "
1436  << hsimInfo3x3.eRest << " eGamma " << hsimInfo3x3.eGamma << " eNeutralHad " << hsimInfo3x3.eNeutralHad
1437  << " eChargedHad " << hsimInfo3x3.eChargedHad;
1438  edm::LogVerbatim("IsoTrack")
1439  << "hsimInfo5x5: eTotal " << hsimInfo5x5.eTotal << " eMatched " << hsimInfo5x5.eMatched << " eRest "
1440  << hsimInfo5x5.eRest << " eGamma " << hsimInfo5x5.eGamma << " eNeutralHad " << hsimInfo5x5.eNeutralHad
1441  << " eChargedHad " << hsimInfo5x5.eChargedHad;
1442  edm::LogVerbatim("IsoTrack")
1443  << "hsimInfo7x7: eTotal " << hsimInfo7x7.eTotal << " eMatched " << hsimInfo7x7.eMatched << " eRest "
1444  << hsimInfo7x7.eRest << " eGamma " << hsimInfo7x7.eGamma << " eNeutralHad " << hsimInfo7x7.eNeutralHad
1445  << " eChargedHad " << hsimInfo7x7.eChargedHad;
1446  edm::LogVerbatim("IsoTrack") << "trkHcalEne " << trkHcalEne;
1447  }
1448  }
1449 
1450  // debug the ecal and hcal matrix
1451  if (myverbose_ == 4) {
1452  edm::LogVerbatim("IsoTrack") << "Run " << iEvent.id().run() << " Event " << iEvent.id().event();
1453  std::vector<std::pair<DetId, double> > v7x7 =
1454  spr::eHCALmatrixCell(theHBHETopology, ClosestCell, hbhe, 3, 3, false, false);
1455  double sumv = 0.0;
1456 
1457  for (unsigned int iv = 0; iv < v7x7.size(); iv++) {
1458  sumv += v7x7[iv].second;
1459  }
1460  edm::LogVerbatim("IsoTrack") << "h7x7 " << h7x7 << " v7x7 " << sumv << " in " << v7x7.size();
1461  for (unsigned int iv = 0; iv < v7x7.size(); iv++) {
1462  HcalDetId id = v7x7[iv].first;
1463  edm::LogVerbatim("IsoTrack") << " Cell " << iv << " 0x" << std::hex << v7x7[iv].first() << std::dec << " "
1464  << id << " Energy " << v7x7[iv].second;
1465  }
1466  }
1467  }
1468  if (doMC_) {
1469  trkHcalEne = spr::eCaloSimInfo(iEvent, geo, pcalohh, SimTk, SimVtx, pTrack, *associate);
1470  }
1471 
1472  // ====================================================================================================
1473  // get diff between track outermost hit position and the propagation point at outermost surface of tracker
1474  std::pair<math::XYZPoint, double> point2_TK0 = spr::propagateTrackerEnd(pTrack, bField, false);
1475  math::XYZPoint diff(pTrack->outerPosition().X() - point2_TK0.first.X(),
1476  pTrack->outerPosition().Y() - point2_TK0.first.Y(),
1477  pTrack->outerPosition().Z() - point2_TK0.first.Z());
1478  double trackOutPosOutHitDr = diff.R();
1479  double trackL = point2_TK0.second;
1480  if (myverbose_ == 5) {
1481  edm::LogVerbatim("IsoTrack") << " propagted " << point2_TK0.first << " " << point2_TK0.first.eta() << " "
1482  << point2_TK0.first.phi();
1483  edm::LogVerbatim("IsoTrack") << " outerPosition() " << pTrack->outerPosition() << " "
1484  << pTrack->outerPosition().eta() << " " << pTrack->outerPosition().phi();
1485  edm::LogVerbatim("IsoTrack") << "diff " << diff << " diffR " << diff.R() << " diffR/L "
1486  << diff.R() / point2_TK0.second;
1487  }
1488 
1489  for (unsigned int ind = 0; ind < recVtxs->size(); ind++) {
1490  if (!((*recVtxs)[ind].isFake())) {
1491  reco::Vertex::trackRef_iterator vtxTrack = (*recVtxs)[ind].tracks_begin();
1492  if (reco::deltaR(eta1, phi1, (*vtxTrack)->eta(), (*vtxTrack)->phi()) < 0.01)
1493  t_trackPVIdx.push_back(ind);
1494  else
1495  t_trackPVIdx.push_back(-1);
1496  }
1497  }
1498 
1499  // Fill the tree Branches here
1500  t_trackPVIdx.push_back(pVtxTkId);
1501  t_trackP.push_back(p1);
1502  t_trackPt.push_back(pt1);
1503  t_trackEta.push_back(eta1);
1504  t_trackPhi.push_back(phi1);
1505  t_trackEcalEta.push_back(etaEcal1);
1506  t_trackEcalPhi.push_back(phiEcal1);
1507  t_trackHcalEta.push_back(etaHcal1);
1508  t_trackHcalPhi.push_back(phiHcal1);
1509  t_trackDxy.push_back(dxy1);
1510  t_trackDz.push_back(dz1);
1511  t_trackDxyBS.push_back(dxybs1);
1512  t_trackDzBS.push_back(dzbs1);
1513  t_trackDxyPV.push_back(dxypv1);
1514  t_trackDzPV.push_back(dzpv1);
1515  t_trackChiSq.push_back(chisq1);
1516  t_trackNOuterHits.push_back(nOuterHits);
1517  t_NLayersCrossed.push_back(nLayersCrossed);
1518 
1527 
1534 
1543  t_trackOutPosOutHitDr.push_back(trackOutPosOutHitDr);
1544  t_trackL.push_back(trackL);
1545 
1546  t_maxNearP31x31.push_back(maxNearP31x31);
1547  t_maxNearP21x21.push_back(maxNearP21x21);
1548 
1549  t_ecalSpike11x11.push_back(e11x11P.second);
1550  t_e7x7.push_back(e7x7P.first);
1551  t_e9x9.push_back(e9x9P.first);
1552  t_e11x11.push_back(e11x11P.first);
1553  t_e15x15.push_back(e15x15P.first);
1554 
1555  t_e7x7_10Sig.push_back(e7x7_10SigP.first);
1556  t_e9x9_10Sig.push_back(e9x9_10SigP.first);
1557  t_e11x11_10Sig.push_back(e11x11_10SigP.first);
1558  t_e15x15_10Sig.push_back(e15x15_10SigP.first);
1559  t_e7x7_15Sig.push_back(e7x7_15SigP.first);
1560  t_e9x9_15Sig.push_back(e9x9_15SigP.first);
1561  t_e11x11_15Sig.push_back(e11x11_15SigP.first);
1562  t_e15x15_15Sig.push_back(e15x15_15SigP.first);
1563  t_e7x7_20Sig.push_back(e7x7_20SigP.first);
1564  t_e9x9_20Sig.push_back(e9x9_20SigP.first);
1565  t_e11x11_20Sig.push_back(e11x11_20SigP.first);
1566  t_e15x15_20Sig.push_back(e15x15_20SigP.first);
1567  t_e7x7_25Sig.push_back(e7x7_25SigP.first);
1568  t_e9x9_25Sig.push_back(e9x9_25SigP.first);
1569  t_e11x11_25Sig.push_back(e11x11_25SigP.first);
1570  t_e15x15_25Sig.push_back(e15x15_25SigP.first);
1571  t_e7x7_30Sig.push_back(e7x7_30SigP.first);
1572  t_e9x9_30Sig.push_back(e9x9_30SigP.first);
1573  t_e11x11_30Sig.push_back(e11x11_30SigP.first);
1574  t_e15x15_30Sig.push_back(e15x15_30SigP.first);
1575 
1576  if (doMC_) {
1577  t_esim7x7.push_back(simInfo7x7.eTotal);
1578  t_esim9x9.push_back(simInfo9x9.eTotal);
1579  t_esim11x11.push_back(simInfo11x11.eTotal);
1580  t_esim15x15.push_back(simInfo15x15.eTotal);
1581 
1582  t_esim7x7Matched.push_back(simInfo7x7.eMatched);
1583  t_esim9x9Matched.push_back(simInfo9x9.eMatched);
1584  t_esim11x11Matched.push_back(simInfo11x11.eMatched);
1585  t_esim15x15Matched.push_back(simInfo15x15.eMatched);
1586 
1587  t_esim7x7Rest.push_back(simInfo7x7.eRest);
1588  t_esim9x9Rest.push_back(simInfo9x9.eRest);
1589  t_esim11x11Rest.push_back(simInfo11x11.eRest);
1590  t_esim15x15Rest.push_back(simInfo15x15.eRest);
1591 
1592  t_esim7x7Photon.push_back(simInfo7x7.eGamma);
1593  t_esim9x9Photon.push_back(simInfo9x9.eGamma);
1594  t_esim11x11Photon.push_back(simInfo11x11.eGamma);
1595  t_esim15x15Photon.push_back(simInfo15x15.eGamma);
1596 
1597  t_esim7x7NeutHad.push_back(simInfo7x7.eNeutralHad);
1598  t_esim9x9NeutHad.push_back(simInfo9x9.eNeutralHad);
1599  t_esim11x11NeutHad.push_back(simInfo11x11.eNeutralHad);
1600  t_esim15x15NeutHad.push_back(simInfo15x15.eNeutralHad);
1601 
1602  t_esim7x7CharHad.push_back(simInfo7x7.eChargedHad);
1603  t_esim9x9CharHad.push_back(simInfo9x9.eChargedHad);
1604  t_esim11x11CharHad.push_back(simInfo11x11.eChargedHad);
1605  t_esim15x15CharHad.push_back(simInfo15x15.eChargedHad);
1606 
1607  t_trkEcalEne.push_back(trkEcalEne);
1608  t_simTrackP.push_back(simTrackP);
1609  t_esimPdgId.push_back(simInfo11x11.pdgMatched);
1610  }
1611 
1612  t_maxNearHcalP3x3.push_back(maxNearHcalP3x3);
1613  t_maxNearHcalP5x5.push_back(maxNearHcalP5x5);
1614  t_maxNearHcalP7x7.push_back(maxNearHcalP7x7);
1615 
1616  t_h3x3.push_back(h3x3);
1617  t_h5x5.push_back(h5x5);
1618  t_h7x7.push_back(h7x7);
1619  t_h3x3Sig.push_back(h3x3Sig);
1620  t_h5x5Sig.push_back(h5x5Sig);
1621  t_h7x7Sig.push_back(h7x7Sig);
1622 
1623  t_infoHcal.push_back(trkDetItr->okHCAL);
1624  if (doMC_) {
1625  t_trkHcalEne.push_back(hcalScale * trkHcalEne);
1626 
1627  t_hsim3x3.push_back(hcalScale * hsimInfo3x3.eTotal);
1628  t_hsim5x5.push_back(hcalScale * hsimInfo5x5.eTotal);
1629  t_hsim7x7.push_back(hcalScale * hsimInfo7x7.eTotal);
1630 
1631  t_hsim3x3Matched.push_back(hcalScale * hsimInfo3x3.eMatched);
1632  t_hsim5x5Matched.push_back(hcalScale * hsimInfo5x5.eMatched);
1633  t_hsim7x7Matched.push_back(hcalScale * hsimInfo7x7.eMatched);
1634 
1635  t_hsim3x3Rest.push_back(hcalScale * hsimInfo3x3.eRest);
1636  t_hsim5x5Rest.push_back(hcalScale * hsimInfo5x5.eRest);
1637  t_hsim7x7Rest.push_back(hcalScale * hsimInfo7x7.eRest);
1638 
1639  t_hsim3x3Photon.push_back(hcalScale * hsimInfo3x3.eGamma);
1640  t_hsim5x5Photon.push_back(hcalScale * hsimInfo5x5.eGamma);
1641  t_hsim7x7Photon.push_back(hcalScale * hsimInfo7x7.eGamma);
1642 
1643  t_hsim3x3NeutHad.push_back(hcalScale * hsimInfo3x3.eNeutralHad);
1644  t_hsim5x5NeutHad.push_back(hcalScale * hsimInfo5x5.eNeutralHad);
1645  t_hsim7x7NeutHad.push_back(hcalScale * hsimInfo7x7.eNeutralHad);
1646 
1647  t_hsim3x3CharHad.push_back(hcalScale * hsimInfo3x3.eChargedHad);
1648  t_hsim5x5CharHad.push_back(hcalScale * hsimInfo5x5.eChargedHad);
1649  t_hsim7x7CharHad.push_back(hcalScale * hsimInfo7x7.eChargedHad);
1650  }
1651 
1652  } // if loosely isolated track
1653  } // check p1/eta
1654  } // loop over track collection
1655 
1656  if (haveIsoTrack)
1657  tree_->Fill();
1658 }
1659 
1660 // ----- method called once each job just before starting event loop ----
1662  nEventProc_ = 0;
1663  nbad_ = 0;
1664  initL1_ = false;
1665  double tempgen_TH[NPBins + 1] = {
1666  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};
1667 
1668  for (unsigned int i = 0; i < NPBins + 1; i++)
1669  genPartPBins[i] = tempgen_TH[i];
1670 
1671  double tempgen_Eta[NEtaBins + 1] = {0.0, 1.131, 1.653, 2.172};
1672 
1673  for (unsigned int i = 0; i < NEtaBins + 1; i++)
1674  genPartEtaBins[i] = tempgen_Eta[i];
1675 
1676  bookHistograms();
1677 }
1678 
1679 // ----- method called once each job just after ending the event loop ----
1681  if (L1TriggerAlgoInfo_) {
1682  std::map<std::pair<unsigned int, std::string>, int>::iterator itr;
1683  for (itr = l1AlgoMap_.begin(); itr != l1AlgoMap_.end(); itr++) {
1684  edm::LogVerbatim("IsoTrack") << " ****endjob**** " << (itr->first).first << " " << (itr->first).second << " "
1685  << itr->second;
1686  int ibin = (itr->first).first;
1687  TString name((itr->first).second);
1688  h_L1AlgoNames->GetXaxis()->SetBinLabel(ibin + 1, name);
1689  }
1690  edm::LogVerbatim("IsoTrack") << "Number of Events Processed " << nEventProc_;
1691  }
1692 }
1693 
1694 //========================================================================================================
1695 
1697  t_PVx.clear();
1698  t_PVy.clear();
1699  t_PVz.clear();
1700  t_PVisValid.clear();
1701  t_PVndof.clear();
1702  t_PVNTracks.clear();
1703  t_PVNTracksWt.clear();
1704  t_PVTracksSumPt.clear();
1705  t_PVTracksSumPtWt.clear();
1706  t_PVNTracksHP.clear();
1707  t_PVNTracksHPWt.clear();
1708  t_PVTracksSumPtHP.clear();
1709  t_PVTracksSumPtHPWt.clear();
1710 
1711  for (int i = 0; i < 128; i++)
1712  t_L1Decision[i] = 0;
1713  t_L1AlgoNames.clear();
1714  t_L1PreScale.clear();
1715 
1716  t_L1CenJetPt.clear();
1717  t_L1CenJetEta.clear();
1718  t_L1CenJetPhi.clear();
1719  t_L1FwdJetPt.clear();
1720  t_L1FwdJetEta.clear();
1721  t_L1FwdJetPhi.clear();
1722  t_L1TauJetPt.clear();
1723  t_L1TauJetEta.clear();
1724  t_L1TauJetPhi.clear();
1725  t_L1MuonPt.clear();
1726  t_L1MuonEta.clear();
1727  t_L1MuonPhi.clear();
1728  t_L1IsoEMPt.clear();
1729  t_L1IsoEMEta.clear();
1730  t_L1IsoEMPhi.clear();
1731  t_L1NonIsoEMPt.clear();
1732  t_L1NonIsoEMEta.clear();
1733  t_L1NonIsoEMPhi.clear();
1734  t_L1METPt.clear();
1735  t_L1METEta.clear();
1736  t_L1METPhi.clear();
1737 
1738  t_jetPt.clear();
1739  t_jetEta.clear();
1740  t_jetPhi.clear();
1741  t_nTrksJetCalo.clear();
1742  t_nTrksJetVtx.clear();
1743 
1744  t_trackPAll.clear();
1745  t_trackEtaAll.clear();
1746  t_trackPhiAll.clear();
1747  t_trackPdgIdAll.clear();
1748  t_trackPtAll.clear();
1749  t_trackDxyAll.clear();
1750  t_trackDzAll.clear();
1751  t_trackDxyPVAll.clear();
1752  t_trackDzPVAll.clear();
1753  t_trackChiSqAll.clear();
1754 
1755  t_trackP.clear();
1756  t_trackPt.clear();
1757  t_trackEta.clear();
1758  t_trackPhi.clear();
1759  t_trackEcalEta.clear();
1760  t_trackEcalPhi.clear();
1761  t_trackHcalEta.clear();
1762  t_trackHcalPhi.clear();
1763  t_NLayersCrossed.clear();
1764  t_trackNOuterHits.clear();
1765  t_trackDxy.clear();
1766  t_trackDxyBS.clear();
1767  t_trackDz.clear();
1768  t_trackDzBS.clear();
1769  t_trackDxyPV.clear();
1770  t_trackDzPV.clear();
1771  t_trackChiSq.clear();
1772  t_trackPVIdx.clear();
1773  t_trackHitsTOB.clear();
1774  t_trackHitsTEC.clear();
1775  t_trackHitInMissTOB.clear();
1776  t_trackHitInMissTEC.clear();
1777  t_trackHitInMissTIB.clear();
1778  t_trackHitInMissTID.clear();
1779  t_trackHitInMissTIBTID.clear();
1780  t_trackHitOutMissTOB.clear();
1781  t_trackHitOutMissTEC.clear();
1782  t_trackHitOutMissTIB.clear();
1783  t_trackHitOutMissTID.clear();
1784  t_trackHitOutMissTOBTEC.clear();
1785  t_trackHitInMeasTOB.clear();
1786  t_trackHitInMeasTEC.clear();
1787  t_trackHitInMeasTIB.clear();
1788  t_trackHitInMeasTID.clear();
1789  t_trackHitOutMeasTOB.clear();
1790  t_trackHitOutMeasTEC.clear();
1791  t_trackHitOutMeasTIB.clear();
1792  t_trackHitOutMeasTID.clear();
1793  t_trackOutPosOutHitDr.clear();
1794  t_trackL.clear();
1795 
1796  t_maxNearP31x31.clear();
1797  t_maxNearP21x21.clear();
1798 
1799  t_ecalSpike11x11.clear();
1800  t_e7x7.clear();
1801  t_e9x9.clear();
1802  t_e11x11.clear();
1803  t_e15x15.clear();
1804 
1805  t_e7x7_10Sig.clear();
1806  t_e9x9_10Sig.clear();
1807  t_e11x11_10Sig.clear();
1808  t_e15x15_10Sig.clear();
1809  t_e7x7_15Sig.clear();
1810  t_e9x9_15Sig.clear();
1811  t_e11x11_15Sig.clear();
1812  t_e15x15_15Sig.clear();
1813  t_e7x7_20Sig.clear();
1814  t_e9x9_20Sig.clear();
1815  t_e11x11_20Sig.clear();
1816  t_e15x15_20Sig.clear();
1817  t_e7x7_25Sig.clear();
1818  t_e9x9_25Sig.clear();
1819  t_e11x11_25Sig.clear();
1820  t_e15x15_25Sig.clear();
1821  t_e7x7_30Sig.clear();
1822  t_e9x9_30Sig.clear();
1823  t_e11x11_30Sig.clear();
1824  t_e15x15_30Sig.clear();
1825 
1826  if (doMC_) {
1827  t_simTrackP.clear();
1828  t_esimPdgId.clear();
1829  t_trkEcalEne.clear();
1830 
1831  t_esim7x7.clear();
1832  t_esim9x9.clear();
1833  t_esim11x11.clear();
1834  t_esim15x15.clear();
1835 
1836  t_esim7x7Matched.clear();
1837  t_esim9x9Matched.clear();
1838  t_esim11x11Matched.clear();
1839  t_esim15x15Matched.clear();
1840 
1841  t_esim7x7Rest.clear();
1842  t_esim9x9Rest.clear();
1843  t_esim11x11Rest.clear();
1844  t_esim15x15Rest.clear();
1845 
1846  t_esim7x7Photon.clear();
1847  t_esim9x9Photon.clear();
1848  t_esim11x11Photon.clear();
1849  t_esim15x15Photon.clear();
1850 
1851  t_esim7x7NeutHad.clear();
1852  t_esim9x9NeutHad.clear();
1853  t_esim11x11NeutHad.clear();
1854  t_esim15x15NeutHad.clear();
1855 
1856  t_esim7x7CharHad.clear();
1857  t_esim9x9CharHad.clear();
1858  t_esim11x11CharHad.clear();
1859  t_esim15x15CharHad.clear();
1860  }
1861 
1862  t_maxNearHcalP3x3.clear();
1863  t_maxNearHcalP5x5.clear();
1864  t_maxNearHcalP7x7.clear();
1865 
1866  t_h3x3.clear();
1867  t_h5x5.clear();
1868  t_h7x7.clear();
1869  t_h3x3Sig.clear();
1870  t_h5x5Sig.clear();
1871  t_h7x7Sig.clear();
1872 
1873  t_infoHcal.clear();
1874 
1875  if (doMC_) {
1876  t_trkHcalEne.clear();
1877 
1878  t_hsim3x3.clear();
1879  t_hsim5x5.clear();
1880  t_hsim7x7.clear();
1881  t_hsim3x3Matched.clear();
1882  t_hsim5x5Matched.clear();
1883  t_hsim7x7Matched.clear();
1884  t_hsim3x3Rest.clear();
1885  t_hsim5x5Rest.clear();
1886  t_hsim7x7Rest.clear();
1887  t_hsim3x3Photon.clear();
1888  t_hsim5x5Photon.clear();
1889  t_hsim7x7Photon.clear();
1890  t_hsim3x3NeutHad.clear();
1891  t_hsim5x5NeutHad.clear();
1892  t_hsim7x7NeutHad.clear();
1893  t_hsim3x3CharHad.clear();
1894  t_hsim5x5CharHad.clear();
1895  t_hsim7x7CharHad.clear();
1896  }
1897 }
1898 
1900  char hname[100], htit[100];
1901 
1903  TFileDirectory dir = fs->mkdir("nearMaxTrackP");
1904 
1905  for (unsigned int ieta = 0; ieta < NEtaBins; ieta++) {
1906  double lowEta = -5.0, highEta = 5.0;
1907  lowEta = genPartEtaBins[ieta];
1908  highEta = genPartEtaBins[ieta + 1];
1909 
1910  for (unsigned int ipt = 0; ipt < NPBins; ipt++) {
1911  double lowP = 0.0, highP = 300.0;
1912  lowP = genPartPBins[ipt];
1913  highP = genPartPBins[ipt + 1];
1914  sprintf(hname, "h_maxNearP31x31_ptBin%i_etaBin%i", ipt, ieta);
1915  sprintf(htit, "maxNearP in 31x31 (%3.2f<|#eta|<%3.2f), (%2.0f<trkP<%3.0f)", lowEta, highEta, lowP, highP);
1916  h_maxNearP31x31[ipt][ieta] = dir.make<TH1F>(hname, htit, 220, -2.0, 20.0);
1917  h_maxNearP31x31[ipt][ieta]->Sumw2();
1918  sprintf(hname, "h_maxNearP25x25_ptBin%i_etaBin%i", ipt, ieta);
1919  sprintf(htit, "maxNearP in 25x25 (%3.2f<|#eta|<%3.2f), (%2.0f<trkP<%3.0f)", lowEta, highEta, lowP, highP);
1920  h_maxNearP25x25[ipt][ieta] = dir.make<TH1F>(hname, htit, 220, -2.0, 20.0);
1921  h_maxNearP25x25[ipt][ieta]->Sumw2();
1922  sprintf(hname, "h_maxNearP21x21_ptBin%i_etaBin%i", ipt, ieta);
1923  sprintf(htit, "maxNearP in 21x21 (%3.2f<|#eta|<%3.2f), (%2.0f<trkP<%3.0f)", lowEta, highEta, lowP, highP);
1924  h_maxNearP21x21[ipt][ieta] = dir.make<TH1F>(hname, htit, 220, -2.0, 20.0);
1925  h_maxNearP21x21[ipt][ieta]->Sumw2();
1926  sprintf(hname, "h_maxNearP15x15_ptBin%i_etaBin%i", ipt, ieta);
1927  sprintf(htit, "maxNearP in 15x15 (%3.2f<|#eta|<%3.2f), (%2.0f<trkP<%3.0f)", lowEta, highEta, lowP, highP);
1928  h_maxNearP15x15[ipt][ieta] = dir.make<TH1F>(hname, htit, 220, -2.0, 20.0);
1929  h_maxNearP15x15[ipt][ieta]->Sumw2();
1930  }
1931  }
1932 
1933  h_L1AlgoNames = fs->make<TH1I>("h_L1AlgoNames", "h_L1AlgoNames:Bin Labels", 128, -0.5, 127.5);
1934 
1935  // Reconstructed Tracks
1936 
1937  h_PVTracksWt = fs->make<TH1F>("h_PVTracksWt", "h_PVTracksWt", 600, -0.1, 1.1);
1938 
1939  h_nTracks = fs->make<TH1F>("h_nTracks", "h_nTracks", 1000, -0.5, 999.5);
1940 
1941  sprintf(hname, "h_recEtaPt_0");
1942  sprintf(htit, "h_recEtaPt (all tracks Eta vs pT)");
1943  h_recEtaPt_0 = fs->make<TH2F>(hname, htit, 30, -3.0, 3.0, 15, genPartPBins);
1944 
1945  sprintf(hname, "h_recEtaP_0");
1946  sprintf(htit, "h_recEtaP (all tracks Eta vs pT)");
1947  h_recEtaP_0 = fs->make<TH2F>(hname, htit, 30, -3.0, 3.0, 15, genPartPBins);
1948 
1949  h_recPt_0 = fs->make<TH1F>("h_recPt_0", "Pt (all tracks)", 15, genPartPBins);
1950  h_recP_0 = fs->make<TH1F>("h_recP_0", "P (all tracks)", 15, genPartPBins);
1951  h_recEta_0 = fs->make<TH1F>("h_recEta_0", "Eta (all tracks)", 60, -3.0, 3.0);
1952  h_recPhi_0 = fs->make<TH1F>("h_recPhi_0", "Phi (all tracks)", 100, -3.2, 3.2);
1953  //-------------------------
1954  sprintf(hname, "h_recEtaPt_1");
1955  sprintf(htit, "h_recEtaPt (all good tracks Eta vs pT)");
1956  h_recEtaPt_1 = fs->make<TH2F>(hname, htit, 30, -3.0, 3.0, 15, genPartPBins);
1957 
1958  sprintf(hname, "h_recEtaP_1");
1959  sprintf(htit, "h_recEtaP (all good tracks Eta vs pT)");
1960  h_recEtaP_1 = fs->make<TH2F>(hname, htit, 30, -3.0, 3.0, 15, genPartPBins);
1961 
1962  h_recPt_1 = fs->make<TH1F>("h_recPt_1", "Pt (all good tracks)", 15, genPartPBins);
1963  h_recP_1 = fs->make<TH1F>("h_recP_1", "P (all good tracks)", 15, genPartPBins);
1964  h_recEta_1 = fs->make<TH1F>("h_recEta_1", "Eta (all good tracks)", 60, -3.0, 3.0);
1965  h_recPhi_1 = fs->make<TH1F>("h_recPhi_1", "Phi (all good tracks)", 100, -3.2, 3.2);
1966  //-------------------------
1967  sprintf(hname, "h_recEtaPt_2");
1968  sprintf(htit, "h_recEtaPt (charge isolation Eta vs pT)");
1969  h_recEtaPt_2 = fs->make<TH2F>(hname, htit, 30, -3.0, 3.0, 15, genPartPBins);
1970 
1971  sprintf(hname, "h_recEtaP_2");
1972  sprintf(htit, "h_recEtaP (charge isolation Eta vs pT)");
1973  h_recEtaP_2 = fs->make<TH2F>(hname, htit, 30, -3.0, 3.0, 15, genPartPBins);
1974 
1975  h_recPt_2 = fs->make<TH1F>("h_recPt_2", "Pt (charge isolation)", 15, genPartPBins);
1976  h_recP_2 = fs->make<TH1F>("h_recP_2", "P (charge isolation)", 15, genPartPBins);
1977  h_recEta_2 = fs->make<TH1F>("h_recEta_2", "Eta (charge isolation)", 60, -3.0, 3.0);
1978  h_recPhi_2 = fs->make<TH1F>("h_recPhi_2", "Phi (charge isolation)", 100, -3.2, 3.2);
1979 
1980  tree_ = fs->make<TTree>("tree", "tree");
1981  tree_->SetAutoSave(10000);
1982 
1983  tree_->Branch("t_EvtNo", &t_EvtNo, "t_EvtNo/I");
1984  tree_->Branch("t_RunNo", &t_RunNo, "t_RunNo/I");
1985  tree_->Branch("t_Lumi", &t_Lumi, "t_Lumi/I");
1986  tree_->Branch("t_Bunch", &t_Bunch, "t_Bunch/I");
1987 
1988  //----- L1Trigger information
1989  for (int i = 0; i < 128; i++)
1990  t_L1Decision[i] = 0;
1991 
1992  tree_->Branch("t_L1Decision", t_L1Decision, "t_L1Decision[128]/I");
1993  tree_->Branch("t_L1AlgoNames", &t_L1AlgoNames);
1994  tree_->Branch("t_L1PreScale", &t_L1PreScale);
1995  tree_->Branch("t_L1CenJetPt", &t_L1CenJetPt);
1996  tree_->Branch("t_L1CenJetEta", &t_L1CenJetEta);
1997  tree_->Branch("t_L1CenJetPhi", &t_L1CenJetPhi);
1998  tree_->Branch("t_L1FwdJetPt", &t_L1FwdJetPt);
1999  tree_->Branch("t_L1FwdJetEta", &t_L1FwdJetEta);
2000  tree_->Branch("t_L1FwdJetPhi", &t_L1FwdJetPhi);
2001  tree_->Branch("t_L1TauJetPt", &t_L1TauJetPt);
2002  tree_->Branch("t_L1TauJetEta", &t_L1TauJetEta);
2003  tree_->Branch("t_L1TauJetPhi", &t_L1TauJetPhi);
2004  tree_->Branch("t_L1MuonPt", &t_L1MuonPt);
2005  tree_->Branch("t_L1MuonEta", &t_L1MuonEta);
2006  tree_->Branch("t_L1MuonPhi", &t_L1MuonPhi);
2007  tree_->Branch("t_L1IsoEMPt", &t_L1IsoEMPt);
2008  tree_->Branch("t_L1IsoEMEta", &t_L1IsoEMEta);
2009  tree_->Branch("t_L1IsoEMPhi", &t_L1IsoEMPhi);
2010  tree_->Branch("t_L1NonIsoEMPt", &t_L1NonIsoEMPt);
2011  tree_->Branch("t_L1NonIsoEMEta", &t_L1NonIsoEMEta);
2012  tree_->Branch("t_L1NonIsoEMPhi", &t_L1NonIsoEMPhi);
2013  tree_->Branch("t_L1METPt", &t_L1METPt);
2014  tree_->Branch("t_L1METEta", &t_L1METEta);
2015  tree_->Branch("t_L1METPhi", &t_L1METPhi);
2016 
2017  tree_->Branch("t_jetPt", &t_jetPt);
2018  tree_->Branch("t_jetEta", &t_jetEta);
2019  tree_->Branch("t_jetPhi", &t_jetPhi);
2020  tree_->Branch("t_nTrksJetCalo", &t_nTrksJetCalo);
2021  tree_->Branch("t_nTrksJetVtx", &t_nTrksJetVtx);
2022 
2023  tree_->Branch("t_trackPAll", &t_trackPAll);
2024  tree_->Branch("t_trackPhiAll", &t_trackPhiAll);
2025  tree_->Branch("t_trackEtaAll", &t_trackEtaAll);
2026  tree_->Branch("t_trackPtAll", &t_trackPtAll);
2027  tree_->Branch("t_trackDxyAll", &t_trackDxyAll);
2028  tree_->Branch("t_trackDzAll", &t_trackDzAll);
2029  tree_->Branch("t_trackDxyPVAll", &t_trackDxyPVAll);
2030  tree_->Branch("t_trackDzPVAll", &t_trackDzPVAll);
2031  tree_->Branch("t_trackChiSqAll", &t_trackChiSqAll);
2032  //tree_->Branch("t_trackPdgIdAll", &t_trackPdgIdAll);
2033 
2034  tree_->Branch("t_trackP", &t_trackP);
2035  tree_->Branch("t_trackPt", &t_trackPt);
2036  tree_->Branch("t_trackEta", &t_trackEta);
2037  tree_->Branch("t_trackPhi", &t_trackPhi);
2038  tree_->Branch("t_trackEcalEta", &t_trackEcalEta);
2039  tree_->Branch("t_trackEcalPhi", &t_trackEcalPhi);
2040  tree_->Branch("t_trackHcalEta", &t_trackHcalEta);
2041  tree_->Branch("t_trackHcalPhi", &t_trackHcalPhi);
2042 
2043  tree_->Branch("t_trackNOuterHits", &t_trackNOuterHits);
2044  tree_->Branch("t_NLayersCrossed", &t_NLayersCrossed);
2045  tree_->Branch("t_trackHitsTOB", &t_trackHitsTOB);
2046  tree_->Branch("t_trackHitsTEC", &t_trackHitsTEC);
2047  tree_->Branch("t_trackHitInMissTOB", &t_trackHitInMissTOB);
2048  tree_->Branch("t_trackHitInMissTEC", &t_trackHitInMissTEC);
2049  tree_->Branch("t_trackHitInMissTIB", &t_trackHitInMissTIB);
2050  tree_->Branch("t_trackHitInMissTID", &t_trackHitInMissTID);
2051  tree_->Branch("t_trackHitInMissTIBTID", &t_trackHitInMissTIBTID);
2052  tree_->Branch("t_trackHitOutMissTOB", &t_trackHitOutMissTOB);
2053  tree_->Branch("t_trackHitOutMissTEC", &t_trackHitOutMissTEC);
2054  tree_->Branch("t_trackHitOutMissTIB", &t_trackHitOutMissTIB);
2055  tree_->Branch("t_trackHitOutMissTID", &t_trackHitOutMissTID);
2056  tree_->Branch("t_trackHitOutMissTOBTEC", &t_trackHitOutMissTOBTEC);
2057  tree_->Branch("t_trackHitInMeasTOB", &t_trackHitInMeasTOB);
2058  tree_->Branch("t_trackHitInMeasTEC", &t_trackHitInMeasTEC);
2059  tree_->Branch("t_trackHitInMeasTIB", &t_trackHitInMeasTIB);
2060  tree_->Branch("t_trackHitInMeasTID", &t_trackHitInMeasTID);
2061  tree_->Branch("t_trackHitOutMeasTOB", &t_trackHitOutMeasTOB);
2062  tree_->Branch("t_trackHitOutMeasTEC", &t_trackHitOutMeasTEC);
2063  tree_->Branch("t_trackHitOutMeasTIB", &t_trackHitOutMeasTIB);
2064  tree_->Branch("t_trackHitOutMeasTID", &t_trackHitOutMeasTID);
2065  tree_->Branch("t_trackOutPosOutHitDr", &t_trackOutPosOutHitDr);
2066  tree_->Branch("t_trackL", &t_trackL);
2067 
2068  tree_->Branch("t_trackDxy", &t_trackDxy);
2069  tree_->Branch("t_trackDxyBS", &t_trackDxyBS);
2070  tree_->Branch("t_trackDz", &t_trackDz);
2071  tree_->Branch("t_trackDzBS", &t_trackDzBS);
2072  tree_->Branch("t_trackDxyPV", &t_trackDxyPV);
2073  tree_->Branch("t_trackDzPV", &t_trackDzPV);
2074  tree_->Branch("t_trackChiSq", &t_trackChiSq);
2075  tree_->Branch("t_trackPVIdx", &t_trackPVIdx);
2076 
2077  tree_->Branch("t_maxNearP31x31", &t_maxNearP31x31);
2078  tree_->Branch("t_maxNearP21x21", &t_maxNearP21x21);
2079 
2080  tree_->Branch("t_ecalSpike11x11", &t_ecalSpike11x11);
2081  tree_->Branch("t_e7x7", &t_e7x7);
2082  tree_->Branch("t_e9x9", &t_e9x9);
2083  tree_->Branch("t_e11x11", &t_e11x11);
2084  tree_->Branch("t_e15x15", &t_e15x15);
2085 
2086  tree_->Branch("t_e7x7_10Sig", &t_e7x7_10Sig);
2087  tree_->Branch("t_e9x9_10Sig", &t_e9x9_10Sig);
2088  tree_->Branch("t_e11x11_10Sig", &t_e11x11_10Sig);
2089  tree_->Branch("t_e15x15_10Sig", &t_e15x15_10Sig);
2090  tree_->Branch("t_e7x7_15Sig", &t_e7x7_15Sig);
2091  tree_->Branch("t_e9x9_15Sig", &t_e9x9_15Sig);
2092  tree_->Branch("t_e11x11_15Sig", &t_e11x11_15Sig);
2093  tree_->Branch("t_e15x15_15Sig", &t_e15x15_15Sig);
2094  tree_->Branch("t_e7x7_20Sig", &t_e7x7_20Sig);
2095  tree_->Branch("t_e9x9_20Sig", &t_e9x9_20Sig);
2096  tree_->Branch("t_e11x11_20Sig", &t_e11x11_20Sig);
2097  tree_->Branch("t_e15x15_20Sig", &t_e15x15_20Sig);
2098  tree_->Branch("t_e7x7_25Sig", &t_e7x7_25Sig);
2099  tree_->Branch("t_e9x9_25Sig", &t_e9x9_25Sig);
2100  tree_->Branch("t_e11x11_25Sig", &t_e11x11_25Sig);
2101  tree_->Branch("t_e15x15_25Sig", &t_e15x15_25Sig);
2102  tree_->Branch("t_e7x7_30Sig", &t_e7x7_30Sig);
2103  tree_->Branch("t_e9x9_30Sig", &t_e9x9_30Sig);
2104  tree_->Branch("t_e11x11_30Sig", &t_e11x11_30Sig);
2105  tree_->Branch("t_e15x15_30Sig", &t_e15x15_30Sig);
2106 
2107  if (doMC_) {
2108  tree_->Branch("t_esim7x7", &t_esim7x7);
2109  tree_->Branch("t_esim9x9", &t_esim9x9);
2110  tree_->Branch("t_esim11x11", &t_esim11x11);
2111  tree_->Branch("t_esim15x15", &t_esim15x15);
2112 
2113  tree_->Branch("t_esim7x7Matched", &t_esim7x7Matched);
2114  tree_->Branch("t_esim9x9Matched", &t_esim9x9Matched);
2115  tree_->Branch("t_esim11x11Matched", &t_esim11x11Matched);
2116  tree_->Branch("t_esim15x15Matched", &t_esim15x15Matched);
2117 
2118  tree_->Branch("t_esim7x7Rest", &t_esim7x7Rest);
2119  tree_->Branch("t_esim9x9Rest", &t_esim9x9Rest);
2120  tree_->Branch("t_esim11x11Rest", &t_esim11x11Rest);
2121  tree_->Branch("t_esim15x15Rest", &t_esim15x15Rest);
2122 
2123  tree_->Branch("t_esim7x7Photon", &t_esim7x7Photon);
2124  tree_->Branch("t_esim9x9Photon", &t_esim9x9Photon);
2125  tree_->Branch("t_esim11x11Photon", &t_esim11x11Photon);
2126  tree_->Branch("t_esim15x15Photon", &t_esim15x15Photon);
2127 
2128  tree_->Branch("t_esim7x7NeutHad", &t_esim7x7NeutHad);
2129  tree_->Branch("t_esim9x9NeutHad", &t_esim9x9NeutHad);
2130  tree_->Branch("t_esim11x11NeutHad", &t_esim11x11NeutHad);
2131  tree_->Branch("t_esim15x15NeutHad", &t_esim15x15NeutHad);
2132 
2133  tree_->Branch("t_esim7x7CharHad", &t_esim7x7CharHad);
2134  tree_->Branch("t_esim9x9CharHad", &t_esim9x9CharHad);
2135  tree_->Branch("t_esim11x11CharHad", &t_esim11x11CharHad);
2136  tree_->Branch("t_esim15x15CharHad", &t_esim15x15CharHad);
2137 
2138  tree_->Branch("t_trkEcalEne", &t_trkEcalEne);
2139  tree_->Branch("t_simTrackP", &t_simTrackP);
2140  tree_->Branch("t_esimPdgId", &t_esimPdgId);
2141  }
2142 
2143  tree_->Branch("t_maxNearHcalP3x3", &t_maxNearHcalP3x3);
2144  tree_->Branch("t_maxNearHcalP5x5", &t_maxNearHcalP5x5);
2145  tree_->Branch("t_maxNearHcalP7x7", &t_maxNearHcalP7x7);
2146  tree_->Branch("t_h3x3", &t_h3x3);
2147  tree_->Branch("t_h5x5", &t_h5x5);
2148  tree_->Branch("t_h7x7", &t_h7x7);
2149  tree_->Branch("t_h3x3Sig", &t_h3x3Sig);
2150  tree_->Branch("t_h5x5Sig", &t_h5x5Sig);
2151  tree_->Branch("t_h7x7Sig", &t_h7x7Sig);
2152  tree_->Branch("t_infoHcal", &t_infoHcal);
2153 
2154  if (doMC_) {
2155  tree_->Branch("t_trkHcalEne", &t_trkHcalEne);
2156  tree_->Branch("t_hsim3x3", &t_hsim3x3);
2157  tree_->Branch("t_hsim5x5", &t_hsim5x5);
2158  tree_->Branch("t_hsim7x7", &t_hsim7x7);
2159  tree_->Branch("t_hsim3x3Matched", &t_hsim3x3Matched);
2160  tree_->Branch("t_hsim5x5Matched", &t_hsim5x5Matched);
2161  tree_->Branch("t_hsim7x7Matched", &t_hsim7x7Matched);
2162  tree_->Branch("t_hsim3x3Rest", &t_hsim3x3Rest);
2163  tree_->Branch("t_hsim5x5Rest", &t_hsim5x5Rest);
2164  tree_->Branch("t_hsim7x7Rest", &t_hsim7x7Rest);
2165  tree_->Branch("t_hsim3x3Photon", &t_hsim3x3Photon);
2166  tree_->Branch("t_hsim5x5Photon", &t_hsim5x5Photon);
2167  tree_->Branch("t_hsim7x7Photon", &t_hsim7x7Photon);
2168  tree_->Branch("t_hsim3x3NeutHad", &t_hsim3x3NeutHad);
2169  tree_->Branch("t_hsim5x5NeutHad", &t_hsim5x5NeutHad);
2170  tree_->Branch("t_hsim7x7NeutHad", &t_hsim7x7NeutHad);
2171  tree_->Branch("t_hsim3x3CharHad", &t_hsim3x3CharHad);
2172  tree_->Branch("t_hsim5x5CharHad", &t_hsim5x5CharHad);
2173  tree_->Branch("t_hsim7x7CharHad", &t_hsim7x7CharHad);
2174  }
2175  tree_->Branch("t_nTracks", &t_nTracks, "t_nTracks/I");
2176 }
2177 
2179  std::string theTrackQuality = "highPurity";
2180  reco::TrackBase::TrackQuality trackQuality_ = reco::TrackBase::qualityByName(theTrackQuality);
2181 
2182  edm::LogVerbatim("IsoTrack") << " Reference Point " << pTrack->referencePoint() << "\n TrackMmentum "
2183  << pTrack->momentum() << " (pt,eta,phi)(" << pTrack->pt() << "," << pTrack->eta() << ","
2184  << pTrack->phi() << ")"
2185  << " p " << pTrack->p() << "\n Normalized chi2 " << pTrack->normalizedChi2()
2186  << " charge " << pTrack->charge() << " qoverp() " << pTrack->qoverp() << "+-"
2187  << pTrack->qoverpError() << " d0 " << pTrack->d0() << "\n NValidHits "
2188  << pTrack->numberOfValidHits() << " NLostHits " << pTrack->numberOfLostHits()
2189  << " TrackQuality " << pTrack->qualityName(trackQuality_) << " "
2190  << pTrack->quality(trackQuality_);
2191 
2192  if (printTrkHitPattern_) {
2193  const reco::HitPattern &p = pTrack->hitPattern();
2194 
2195  std::ostringstream st1;
2196  st1 << "default ";
2197  for (int i = 0; i < p.numberOfAllHits(reco::HitPattern::TRACK_HITS); i++) {
2198  p.printHitPattern(reco::HitPattern::TRACK_HITS, i, st1);
2199  }
2200  edm::LogVerbatim("IsoTrack") << st1.str();
2201  std::ostringstream st2;
2202  st2 << "trackerMissingInnerHits() ";
2203  for (int i = 0; i < p.numberOfAllHits(reco::HitPattern::MISSING_INNER_HITS); i++) {
2204  p.printHitPattern(reco::HitPattern::MISSING_INNER_HITS, i, st2);
2205  }
2206  edm::LogVerbatim("IsoTrack") << st2.str();
2207  std::ostringstream st3;
2208  st3 << "trackerMissingOuterHits() ";
2209  for (int i = 0; i < p.numberOfAllHits(reco::HitPattern::MISSING_OUTER_HITS); i++) {
2210  p.printHitPattern(reco::HitPattern::MISSING_OUTER_HITS, i, st3);
2211  }
2212  edm::LogVerbatim("IsoTrack") << st3.str();
2213 
2214  edm::LogVerbatim("IsoTrack") << "\n \t trackerLayersWithMeasurement() " << p.trackerLayersWithMeasurement()
2215  << "\n \t pixelLayersWithMeasurement() " << p.pixelLayersWithMeasurement()
2216  << "\n \t stripLayersWithMeasurement() " << p.stripLayersWithMeasurement()
2217  << "\n \t pixelBarrelLayersWithMeasurement() " << p.pixelBarrelLayersWithMeasurement()
2218  << "\n \t pixelEndcapLayersWithMeasurement() " << p.pixelEndcapLayersWithMeasurement()
2219  << "\n \t stripTIBLayersWithMeasurement() " << p.stripTIBLayersWithMeasurement()
2220  << "\n \t stripTIDLayersWithMeasurement() " << p.stripTIDLayersWithMeasurement()
2221  << "\n \t stripTOBLayersWithMeasurement() " << p.stripTOBLayersWithMeasurement()
2222  << "\n \t stripTECLayersWithMeasurement() " << p.stripTECLayersWithMeasurement();
2223  }
2224 }
2225 
2226 //define this as a plug-in
bool quality(const TrackQuality) const
Track quality.
Definition: TrackBase.h:553
std::vector< double > t_L1FwdJetPhi
std::vector< double > t_L1METPt
static const std::string kSharedResource
Definition: TFileService.h:76
std::vector< double > t_maxNearHcalP5x5
std::vector< int > t_trackHitOutMeasTEC
Log< level::Info, true > LogVerbatim
std::vector< double > t_hsim7x7Photon
edm::EDGetTokenT< l1extra::L1JetParticleCollection > tok_L1extCenJet_
const bool L1TriggerAlgoInfo_
double qoverp() const
q / p
Definition: TrackBase.h:600
std::vector< double > t_hsim5x5Matched
const bool printTrkHitPattern_
std::vector< double > t_esim7x7Rest
static constexpr size_t NEtaBins
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_PVTracksSumPtWt
std::vector< double > t_h5x5
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
std::vector< int > t_trackHitOutMissTEC
~IsolatedTracksNxN() override
std::vector< double > t_jetPt
static std::string qualityName(TrackQuality)
Definition: TrackBase.h:573
std::vector< double > t_L1IsoEMPt
std::vector< double > t_L1TauJetPhi
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< int > t_trackHitOutMeasTOB
T const & getData(const ESGetToken< T, R > &iToken) const noexcept(false)
Definition: EventSetup.h:119
int32_t *__restrict__ iv
std::vector< double > t_esim9x9
double qoverpError() const
error on signed transverse curvature
Definition: TrackBase.h:733
const bool isValid(const Frame &aFrame, const FrameQuality &aQuality, const uint16_t aExpectedPos)
std::vector< double > t_jetEta
std::vector< double > t_L1MuonPt
unsigned short numberOfValidHits() const
number of valid hits found
Definition: TrackBase.h:799
const math::XYZPoint & outerPosition() const
position of the outermost hit
Definition: Track.h:62
const Point & position() const
position
Definition: BeamSpot.h:59
std::vector< double > t_e7x7
std::vector< int > t_trackHitOutMissTOB
std::vector< double > t_esim7x7NeutHad
std::vector< int > t_trackHitInMeasTID
std::vector< double > t_trackEtaAll
std::vector< int > t_trackHitOutMeasTID
TH1F * h_maxNearP25x25[NPBins][NEtaBins]
TrackQuality
track quality
Definition: TrackBase.h:151
std::vector< double > t_trackPhi
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_trackDxyPVAll
double p() const
momentum vector magnitude
Definition: TrackBase.h:632
int trackerLayersWithMeasurement() const
Definition: HitPattern.cc:534
std::vector< double > t_PVy
static constexpr size_t nL1BitsMax
std::vector< double > t_esim7x7
std::vector< double > t_hsim3x3
std::vector< double > t_esim15x15
std::vector< double > t_hsim5x5Photon
std::vector< double > t_L1CenJetPhi
std::vector< double > t_trackPdgIdAll
std::vector< int > t_L1PreScale
std::vector< double > t_h5x5Sig
std::vector< double > t_PVTracksSumPt
std::vector< double > t_esim7x7Matched
std::vector< double > t_esim15x15Rest
std::vector< double > t_L1METEta
int stripTIDLayersWithMeasurement() const
Definition: HitPattern.cc:608
std::vector< int > t_trackHitInMissTOB
Definition: weight.py:1
edm::ESGetToken< EcalChannelStatus, EcalChannelStatusRcd > tok_ecalChStatus_
std::vector< int > t_trackHitInMeasTEC
std::vector< int > t_trackHitsTOB
std::vector< double > t_esim9x9CharHad
IsolatedTracksNxN(const edm::ParameterSet &)
edm::EDGetTokenT< edm::SimVertexContainer > tok_simVtx_
const Point & referencePoint() const
Reference point on the track.
Definition: TrackBase.h:668
std::vector< double > t_esim9x9Photon
std::vector< double > t_h3x3Sig
int stripTIBLayersWithoutMeasurement(HitCategory category) const
Definition: HitPattern.cc:660
std::vector< double > t_trackDxyPV
edm::EDGetTokenT< reco::BeamSpot > tok_bs_
static constexpr size_t NPBins
std::vector< int > t_trackHitOutMeasTIB
std::vector< double > t_trackDxy
std::vector< double > t_e9x9_10Sig
std::vector< double > t_e15x15_10Sig
std::vector< double > t_esimPdgId
std::vector< double > t_maxNearHcalP7x7
std::vector< double > t_trackChiSq
std::vector< double > t_hsim5x5NeutHad
std::vector< int > t_trackHitInMissTIB
const double maxTrackEta_
std::vector< double > t_e9x9
std::vector< double > t_L1TauJetPt
int stripTECLayersWithMeasurement() const
Definition: HitPattern.cc:628
std::vector< double > t_PVx
double genPartPBins[NPBins+1]
std::vector< double > t_trackEta
AlgorithmMap::const_iterator CItAlgo
iterators through map containing the algorithms
std::vector< double > t_hsim3x3NeutHad
std::vector< double > t_hsim7x7
const std::string & gtTriggerMenuName() const
std::vector< double > t_PVTracksSumPtHP
double eNeutralHad
Definition: CaloSimInfo.h:46
std::vector< double > t_L1CenJetEta
std::vector< double > t_L1FwdJetEta
std::vector< double > t_trackHcalPhi
double pt() const
track transverse momentum
Definition: TrackBase.h:638
double eChargedHad
Definition: CaloSimInfo.h:47
edm::ESGetToken< CaloGeometry, CaloGeometryRecord > tok_geom_
std::vector< double > t_esim11x11Matched
int charge() const
track electric charge
Definition: TrackBase.h:597
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:623
double chargeIsolationEcal(unsigned int trkIndex, std::vector< spr::propagatedTrackID > &vdetIds, const CaloGeometry *geo, const CaloTopology *caloTopology, int ieta, int iphi, bool debug=false)
int iEvent
Definition: GenABIO.cc:224
std::vector< double > t_e11x11_30Sig
std::vector< double > t_nTrksJetVtx
edm::ESGetToken< MagneticField, IdealMagneticFieldRecord > tok_magField_
std::vector< double > t_L1NonIsoEMEta
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_nTrksJetCalo
std::vector< double > t_L1NonIsoEMPhi
std::vector< double > t_L1IsoEMPhi
std::vector< double > t_hsim5x5CharHad
std::vector< double > t_h3x3
std::vector< double > t_esim7x7CharHad
edm::EDGetTokenT< edm::PCaloHitContainer > tok_caloHH_
std::vector< double > t_PVz
ConsumesCollector consumesCollector()
Use a ConsumesCollector to gather consumes information from helper functions.
std::vector< double > t_trackOutPosOutHitDr
std::vector< int > t_PVNTracksHPWt
std::vector< int > t_PVNTracksHP
std::vector< double > t_e15x15_25Sig
std::vector< double > t_hsim7x7Matched
std::vector< int > t_trackHitInMeasTIB
edm::EDGetTokenT< edm::PCaloHitContainer > tok_caloEB_
std::vector< double > t_e11x11
int stripTOBLayersWithoutMeasurement(HitCategory category) const
Definition: HitPattern.cc:680
std::vector< double > t_e7x7_15Sig
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
void analyze(const edm::Event &, const edm::EventSetup &) override
int stripTOBLayersWithMeasurement() const
Definition: HitPattern.cc:618
std::vector< double > t_esim11x11
std::vector< double > t_hsim5x5
std::vector< int > t_PVisValid
std::vector< int > t_trackHitInMissTEC
std::vector< double > t_trackDz
double phi() const
azimuthal angle of momentum vector
Definition: TrackBase.h:650
std::vector< double > t_e15x15_30Sig
std::vector< double > t_esim15x15CharHad
std::vector< double > t_e7x7_20Sig
std::vector< double > t_L1IsoEMEta
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
std::vector< double > t_trackChiSqAll
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)
std::vector< double > t_L1MuonEta
edm::EDGetTokenT< reco::TrackCollection > tok_genTrack_
std::vector< double > t_simTrackP
int stripTECLayersWithoutMeasurement(HitCategory category) const
Definition: HitPattern.cc:690
edm::ESGetToken< CaloTopology, CaloTopologyRecord > tok_caloTopology_
std::vector< double > t_trackPhiAll
edm::EDGetTokenT< l1extra::L1JetParticleCollection > tok_L1extFwdJet_
std::vector< double > t_trackDxyAll
edm::EDGetTokenT< l1extra::L1EmParticleCollection > tok_L1extIsoEm_
std::vector< double > t_hsim7x7Rest
unsigned short numberOfLostHits() const
number of cases where track crossed a layer without getting a hit.
Definition: TrackBase.h:802
std::vector< int > t_NLayersCrossed
std::vector< double > t_L1METPhi
std::vector< double > t_e11x11_10Sig
std::vector< double > t_trackL
edm::EDGetTokenT< l1extra::L1MuonParticleCollection > tok_L1extMu_
ii
Definition: cuy.py:589
std::vector< double > t_e7x7_25Sig
constexpr auto deltaR(const T1 &t1, const T2 &t2) -> decltype(t1.eta())
Definition: deltaR.h:30
edm::ESGetToken< HcalTopology, HcalRecNumberingRecord > tok_topo_
std::vector< double > t_e11x11_25Sig
std::vector< double > t_maxNearHcalP3x3
std::vector< double > t_hsim3x3CharHad
std::vector< unsigned int > m_triggerMaskAlgoTrig
std::vector< double > t_esim11x11Photon
edm::ESGetToken< EcalTrigTowerConstituentsMap, IdealGeometryRecord > tok_htmap_
double eta() const
pseudorapidity of momentum vector
Definition: TrackBase.h:653
Definition: DetId.h:17
std::vector< double > t_jetPhi
std::vector< double > t_esim11x11NeutHad
static TrackQuality qualityByName(const std::string &name)
Definition: TrackBase.cc:126
std::vector< double > t_esim9x9NeutHad
const HitPattern & hitPattern() const
Access the hit pattern, indicating in which Tracker layers the track has hits.
Definition: TrackBase.h:505
std::vector< int > t_trackHitInMissTIBTID
double d0() const
dxy parameter in perigee convention (d0 = -dxy)
Definition: TrackBase.h:612
std::vector< double > t_trackPAll
std::vector< double > t_esim15x15NeutHad
void endJob() override
std::vector< double > t_trackDzBS
std::vector< double > t_e15x15
XYZPointD XYZPoint
point in space with cartesian internal representation
Definition: Point3D.h:12
const double pvTracksPtMin_
edm::EDGetTokenT< l1extra::L1EmParticleCollection > tok_L1extNoIsoEm_
edm::EDGetTokenT< reco::VertexCollection > tok_recVtx_
TH1F * h_maxNearP31x31[NPBins][NEtaBins]
std::vector< double > t_e9x9_30Sig
std::vector< double > t_e11x11_20Sig
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:594
edm::EDGetTokenT< edm::PCaloHitContainer > tok_caloEE_
edm::EDGetTokenT< EcalRecHitCollection > tok_EB_
std::vector< double > t_trackDzPVAll
TH1F * h_maxNearP15x15[NPBins][NEtaBins]
std::vector< double > t_trackEcalEta
void add(std::string const &label, ParameterSetDescription const &psetDescription)
std::vector< double > t_esim7x7Photon
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)
static const bool useL1GtTriggerMenuLite(true)
std::vector< double > t_hsim5x5Rest
std::vector< double > t_L1CenJetPt
std::vector< double > t_trackP
const Vector & momentum() const
track momentum vector
Definition: TrackBase.h:665
std::vector< double > t_esim11x11CharHad
bool isValid() const
Definition: HandleBase.h:70
std::vector< double > t_e15x15_20Sig
std::vector< double > t_esim15x15Photon
std::vector< int > t_trackNOuterHits
std::vector< double > t_trkHcalEne
edm::EDGetTokenT< HBHERecHitCollection > tok_hbhe_
std::vector< double > t_L1NonIsoEMPt
std::vector< double > t_maxNearP31x31
TrackerHitAssociator::Config trackerHitAssociatorConfig_
std::vector< int > t_infoHcal
std::vector< double > t_e7x7_30Sig
std::vector< int > t_PVndof
std::pair< math::XYZPoint, double > propagateTrackerEnd(const reco::Track *, const MagneticField *, bool debug=false)
void printTrack(const reco::Track *pTrack)
std::vector< double > t_trackDxyBS
std::unique_ptr< L1GtUtils > m_l1GtUtils
std::vector< double > t_esim11x11Rest
std::vector< int > t_trackHitInMissTID
std::vector< double > t_trackPtAll
std::vector< int > t_PVNTracksWt
std::vector< double > t_hsim7x7NeutHad
std::vector< int > t_ecalSpike11x11
TH1F * h_maxNearP21x21[NPBins][NEtaBins]
int stripTIDLayersWithoutMeasurement(HitCategory category) const
Definition: HitPattern.cc:670
std::vector< double > t_e11x11_15Sig
std::vector< int > t_PVNTracks
std::vector< double > t_trackDzPV
std::vector< double > t_e9x9_25Sig
std::vector< double > t_trkEcalEne
std::map< std::pair< unsigned int, std::string >, int > l1AlgoMap_
std::vector< double > t_hsim3x3Matched
std::vector< double > t_L1TauJetEta
std::vector< int > t_trackHitOutMissTID
std::vector< std::string > t_L1AlgoNames
std::vector< double > t_PVTracksSumPtHPWt
edm::EDGetTokenT< reco::CaloJetCollection > tok_jets_
std::vector< int > t_trackHitOutMissTOBTEC
edm::ESGetToken< EcalSeverityLevelAlgo, EcalSeverityLevelAlgoRcd > tok_sevlv_
std::vector< double > t_hsim3x3Photon
std::vector< int > t_trackHitInMeasTOB
std::vector< double > t_hsim3x3Rest
std::vector< double > t_trackDzAll
void beginJob() override
const AlgorithmMap & gtAlgorithmMap() const
get / set the algorithm map (by name)
std::vector< double > t_e9x9_15Sig
std::vector< double > t_e7x7_10Sig
std::vector< double > t_trackHcalEta
std::vector< double > t_L1FwdJetPt
double genPartEtaBins[NEtaBins+1]
double chargeIsolationHcal(unsigned int trkIndex, std::vector< spr::propagatedTrackID > &vdetIds, const HcalTopology *topology, int ieta, int iphi, bool debug=false)
std::vector< int > t_trackPVIdx
std::vector< double > t_e15x15_15Sig
std::vector< double > t_esim15x15Matched
value_type const * get() const
Definition: RefToBase.h:209
std::vector< double > t_hsim7x7CharHad
std::vector< double > t_trackEcalPhi
std::vector< double > t_L1MuonPhi
std::vector< int > t_trackHitOutMissTIB
std::vector< TrackBaseRef >::const_iterator trackRef_iterator
The iteratator for the vector<TrackRef>
Definition: Vertex.h:38
std::vector< double > t_esim9x9Matched
std::vector< double > t_h7x7Sig
static const bool useL1EventSetup(true)
std::vector< double > t_h7x7
std::vector< int > t_trackHitsTEC
std::vector< double > t_esim9x9Rest
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:609
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_
int stripTIBLayersWithMeasurement() const
Definition: HitPattern.cc:598
std::vector< double > t_trackPt
std::vector< double > t_maxNearP21x21
std::vector< double > t_e9x9_20Sig
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)