CMS 3D CMS Logo

IsolatedTracksCone.cc
Go to the documentation of this file.
1 // -*- C++ -*-
2 //
3 // Package: IsolatedParticles
4 // Class: IsolatedTracksCone
5 //
14 //
15 // Original Author: Jim Hirschauer (adaptation of Seema Sharma's
16 // IsolatedTracksNew)
17 // Created: Thu Nov 6 15:30:40 CST 2008
18 //
19 //
20 // system include files
21 #include <cmath>
22 #include <map>
23 #include <memory>
24 #include <string>
25 #include <vector>
26 
27 #include <Math/GenVector/VectorUtil.h>
28 
29 // user include files
38 
40 
50 // muons and tracks
54 // Vertices
57 //L1 objects
64 
74 
75 //TFile Service
78 
79 // ecal / hcal
86 
89 
90 // SimHit, SimTrack, ...
96 
97 // track associator
100 
101 // tracker hit associator
105 
106 // root objects
107 #include "TROOT.h"
108 #include "TSystem.h"
109 #include "TFile.h"
110 #include "TH1F.h"
111 #include "TH2F.h"
112 #include "TProfile.h"
113 #include "TDirectory.h"
114 #include "TTree.h"
115 
116 class IsolatedTracksCone : public edm::one::EDAnalyzer<edm::one::SharedResources> {
117 
118 public:
119  explicit IsolatedTracksCone(const edm::ParameterSet&);
120  ~IsolatedTracksCone() override;
121 
122  static void fillDescriptions(edm::ConfigurationDescriptions& descriptions);
123 
124 private:
125  void beginJob() override ;
126  void analyze(const edm::Event&, const edm::EventSetup&) override;
127  void endJob() override ;
128 
129  void printTrack(const reco::Track* pTrack);
130 
131  // void BookHistograms();
132  void buildTree();
133  void clearTrackVectors();
134 
135  double deltaPhi(double v1, double v2);
136  double deltaR(double eta1, double phi1, double eta2, double phi2);
137 
138  static constexpr int nEtaBins_ = 4;
139  static constexpr int nPBins_ = 21;
140  std::array<double,nPBins_+1> genPartPBins_;
141  std::array<double,nEtaBins_+1> genPartEtaBins;
142 
143  const bool doMC_;
144  const int myverbose_;
145  const bool useJetTrigger_;
147  const int debugTrks_;
149 
151 
155 
159 
163 
168 
170  const int debugEcalSimInfo_;
172 
173  // track associator to detector parameters
175  std::unique_ptr<TrackDetectorAssociator> trackAssociator_;
176 
177  TTree* ntp_;
178 
179  TH1F* h_RawPt ;
180  TH1F* h_RawP ;
181  TH1F* h_RawEta;
182  TH1F* h_RawPhi;
183 
184  int nRawTRK ;
186  int nFailPt ;
187  int nFailEta ;
188  int nMissEcal ;
189  int nMissHcal ;
190  int nEVT;
192  int nTRK;
193  double leadL1JetPT;
194  double leadL1JetEta;
195  double leadL1JetPhi;
196 
197  std::unique_ptr<std::vector<std::vector<int> > > t_v_hnNearTRKs;
198  std::unique_ptr<std::vector<std::vector<int> > > t_v_hnLayers_maxNearP;
199  std::unique_ptr<std::vector<std::vector<int> > > t_v_htrkQual_maxNearP;
200  std::unique_ptr<std::vector<std::vector<double> > > t_v_hmaxNearP_goodTrk;
201  std::unique_ptr<std::vector<std::vector<double> > > t_v_hmaxNearP;
202 
203  std::unique_ptr<std::vector<std::vector<int> > > t_v_cone_hnNearTRKs;
204  std::unique_ptr<std::vector<std::vector<int> > > t_v_cone_hnLayers_maxNearP;
205  std::unique_ptr<std::vector<std::vector<int> > > t_v_cone_htrkQual_maxNearP;
206  std::unique_ptr<std::vector<std::vector<double> > > t_v_cone_hmaxNearP_goodTrk;
207  std::unique_ptr<std::vector<std::vector<double> > > t_v_cone_hmaxNearP;
208 
209  std::unique_ptr<std::vector<double> > t_trkNOuterHits;
210  std::unique_ptr<std::vector<double> > t_trkNLayersCrossed;
211  std::unique_ptr<std::vector<double> > t_dtFromLeadJet;
212  std::unique_ptr<std::vector<double> > t_trkP;
213  std::unique_ptr<std::vector<double> > t_simP;
214  std::unique_ptr<std::vector<double> > t_trkPt;
215  std::unique_ptr<std::vector<double> > t_trkEta;
216  std::unique_ptr<std::vector<double> > t_trkPhi;
217  std::unique_ptr<std::vector<double> > t_e3x3;
218 
219  std::unique_ptr<std::vector<std::vector<double> > > t_v_eDR;
220  std::unique_ptr<std::vector<std::vector<double> > > t_v_eMipDR;
221 
222  std::unique_ptr<std::vector<double> > t_h3x3;
223  std::unique_ptr<std::vector<double> > t_h5x5;
224  std::unique_ptr<std::vector<double> > t_hsim3x3;
225  std::unique_ptr<std::vector<double> > t_hsim5x5;
226 
227  std::unique_ptr<std::vector<double> > t_nRH_h3x3;
228  std::unique_ptr<std::vector<double> > t_nRH_h5x5;
229 
230  std::unique_ptr<std::vector<double> > t_hsim3x3Matched;
231  std::unique_ptr<std::vector<double> > t_hsim5x5Matched;
232  std::unique_ptr<std::vector<double> > t_hsim3x3Rest;
233  std::unique_ptr<std::vector<double> > t_hsim5x5Rest;
234  std::unique_ptr<std::vector<double> > t_hsim3x3Photon;
235  std::unique_ptr<std::vector<double> > t_hsim5x5Photon;
236  std::unique_ptr<std::vector<double> > t_hsim3x3NeutHad;
237  std::unique_ptr<std::vector<double> > t_hsim5x5NeutHad;
238  std::unique_ptr<std::vector<double> > t_hsim3x3CharHad;
239  std::unique_ptr<std::vector<double> > t_hsim5x5CharHad;
240  std::unique_ptr<std::vector<double> > t_hsim3x3PdgMatched;
241  std::unique_ptr<std::vector<double> > t_hsim5x5PdgMatched;
242  std::unique_ptr<std::vector<double> > t_hsim3x3Total;
243  std::unique_ptr<std::vector<double> > t_hsim5x5Total;
244 
245  std::unique_ptr<std::vector<int> > t_hsim3x3NMatched;
246  std::unique_ptr<std::vector<int> > t_hsim3x3NRest;
247  std::unique_ptr<std::vector<int> > t_hsim3x3NPhoton;
248  std::unique_ptr<std::vector<int> > t_hsim3x3NNeutHad;
249  std::unique_ptr<std::vector<int> > t_hsim3x3NCharHad;
250  std::unique_ptr<std::vector<int> > t_hsim3x3NTotal;
251 
252  std::unique_ptr<std::vector<int> > t_hsim5x5NMatched;
253  std::unique_ptr<std::vector<int> > t_hsim5x5NRest;
254  std::unique_ptr<std::vector<int> > t_hsim5x5NPhoton;
255  std::unique_ptr<std::vector<int> > t_hsim5x5NNeutHad;
256  std::unique_ptr<std::vector<int> > t_hsim5x5NCharHad;
257  std::unique_ptr<std::vector<int> > t_hsim5x5NTotal;
258 
259  std::unique_ptr<std::vector<double> > t_distFromHotCell_h3x3;
260  std::unique_ptr<std::vector<int> > t_ietaFromHotCell_h3x3;
261  std::unique_ptr<std::vector<int> > t_iphiFromHotCell_h3x3;
262  std::unique_ptr<std::vector<double> > t_distFromHotCell_h5x5;
263  std::unique_ptr<std::vector<int> > t_ietaFromHotCell_h5x5;
264  std::unique_ptr<std::vector<int> > t_iphiFromHotCell_h5x5;
265 
266  std::unique_ptr<std::vector<double> > t_trkHcalEne;
267  std::unique_ptr<std::vector<double> > t_trkEcalEne;
268 
269  std::unique_ptr<std::vector<std::vector<double> > > t_v_hsimInfoConeMatched;
270  std::unique_ptr<std::vector<std::vector<double> > > t_v_hsimInfoConeRest;
271  std::unique_ptr<std::vector<std::vector<double> > > t_v_hsimInfoConePhoton;
272  std::unique_ptr<std::vector<std::vector<double> > > t_v_hsimInfoConeNeutHad;
273  std::unique_ptr<std::vector<std::vector<double> > > t_v_hsimInfoConeCharHad;
274  std::unique_ptr<std::vector<std::vector<double> > > t_v_hsimInfoConePdgMatched;
275  std::unique_ptr<std::vector<std::vector<double> > > t_v_hsimInfoConeTotal;
276 
277  std::unique_ptr<std::vector<std::vector<int> > > t_v_hsimInfoConeNMatched;
278  std::unique_ptr<std::vector<std::vector<int> > > t_v_hsimInfoConeNRest;
279  std::unique_ptr<std::vector<std::vector<int> > > t_v_hsimInfoConeNPhoton;
280  std::unique_ptr<std::vector<std::vector<int> > > t_v_hsimInfoConeNNeutHad;
281  std::unique_ptr<std::vector<std::vector<int> > > t_v_hsimInfoConeNCharHad;
282  std::unique_ptr<std::vector<std::vector<int> > > t_v_hsimInfoConeNTotal;
283 
284  std::unique_ptr<std::vector<std::vector<double> > > t_v_hsimCone;
285  std::unique_ptr<std::vector<std::vector<double> > > t_v_hCone;
286  std::unique_ptr<std::vector<std::vector<int> > > t_v_nRecHitsCone;
287  std::unique_ptr<std::vector<std::vector<int> > > t_v_nSimHitsCone;
288 
289  std::unique_ptr<std::vector<std::vector<double> > > t_v_distFromHotCell;
290  std::unique_ptr<std::vector<std::vector<int> > > t_v_ietaFromHotCell;
291  std::unique_ptr<std::vector<std::vector<int> > > t_v_iphiFromHotCell;
292 
293  std::unique_ptr<std::vector<std::vector<int> > > t_v_hlTriggers;
294  std::unique_ptr<std::vector<int> > t_hltHB;
295  std::unique_ptr<std::vector<int> > t_hltHE;
296  std::unique_ptr<std::vector<int> > t_hltL1Jet15;
297  std::unique_ptr<std::vector<int> > t_hltJet30;
298  std::unique_ptr<std::vector<int> > t_hltJet50;
299  std::unique_ptr<std::vector<int> > t_hltJet80;
300  std::unique_ptr<std::vector<int> > t_hltJet110;
301  std::unique_ptr<std::vector<int> > t_hltJet140;
302  std::unique_ptr<std::vector<int> > t_hltJet180;
303  std::unique_ptr<std::vector<int> > t_hltL1SingleEG5;
304  std::unique_ptr<std::vector<int> > t_hltZeroBias;
305  std::unique_ptr<std::vector<int> > t_hltMinBiasHcal;
306  std::unique_ptr<std::vector<int> > t_hltMinBiasEcal;
307  std::unique_ptr<std::vector<int> > t_hltMinBiasPixel;
308  std::unique_ptr<std::vector<int> > t_hltSingleIsoTau30_Trk5;
309  std::unique_ptr<std::vector<int> > t_hltDoubleLooseIsoTau15_Trk5;
310 
311  std::unique_ptr<std::vector<std::vector<int> > > t_v_RH_h3x3_ieta;
312  std::unique_ptr<std::vector<std::vector<int> > > t_v_RH_h3x3_iphi;
313  std::unique_ptr<std::vector<std::vector<double> > > t_v_RH_h3x3_ene ;
314  std::unique_ptr<std::vector<std::vector<int> > > t_v_RH_h5x5_ieta;
315  std::unique_ptr<std::vector<std::vector<int> > > t_v_RH_h5x5_iphi;
316  std::unique_ptr<std::vector<std::vector<double> > > t_v_RH_h5x5_ene ;
317  std::unique_ptr<std::vector<std::vector<int> > > t_v_RH_r26_ieta ;
318  std::unique_ptr<std::vector<std::vector<int> > > t_v_RH_r26_iphi ;
319  std::unique_ptr<std::vector<std::vector<double> > > t_v_RH_r26_ene ;
320  std::unique_ptr<std::vector<std::vector<int> > > t_v_RH_r44_ieta ;
321  std::unique_ptr<std::vector<std::vector<int> > > t_v_RH_r44_iphi ;
322  std::unique_ptr<std::vector<std::vector<double> > > t_v_RH_r44_ene ;
323 
324  std::unique_ptr<std::vector<unsigned int> > t_irun;
325  std::unique_ptr<std::vector<unsigned int> > t_ievt;
326  std::unique_ptr<std::vector<unsigned int> > t_ilum;
327 
328 };
329 
331  doMC_(iConfig.getUntrackedParameter<bool>("doMC",false)),
332  myverbose_(iConfig.getUntrackedParameter<int>("verbosity",5)),
333  useJetTrigger_(iConfig.getUntrackedParameter<bool>("useJetTrigger",false)),
334  drLeadJetVeto_(iConfig.getUntrackedParameter<double>("drLeadJetVeto",1.2)),
335  ptMinLeadJet_(iConfig.getUntrackedParameter<double>("ptMinLeadJet",15.0)),
336  debugTrks_(iConfig.getUntrackedParameter<int>("debugTracks")),
337  printTrkHitPattern_(iConfig.getUntrackedParameter<bool>("printTrkHitPattern")),
339  tok_L1extTauJet_(consumes<l1extra::L1JetParticleCollection>(iConfig.getParameter<edm::InputTag>("L1extraTauJetSource"))),
340  tok_L1extCenJet_(consumes<l1extra::L1JetParticleCollection>(iConfig.getParameter<edm::InputTag>("L1extraCenJetSource"))),
341  tok_L1extFwdJet_(consumes<l1extra::L1JetParticleCollection>(iConfig.getParameter<edm::InputTag>("L1extraFwdJetSource"))),
342  tok_EB_(consumes<EcalRecHitCollection>(edm::InputTag("ecalRecHit","EcalRecHitsEB"))),
343  tok_EE_(consumes<EcalRecHitCollection>(edm::InputTag("ecalRecHit","EcalRecHitsEE"))),
344  tok_hbhe_(consumes<HBHERecHitCollection>(edm::InputTag("hbhereco"))),
345  tok_genTrack_(consumes<reco::TrackCollection>(edm::InputTag("generalTracks"))),
346  tok_simTk_(consumes<edm::SimTrackContainer>(edm::InputTag("g4SimHits"))),
347  tok_simVtx_(consumes<edm::SimVertexContainer>(edm::InputTag("g4SimHits"))),
348  tok_caloEB_(consumes<edm::PCaloHitContainer>(edm::InputTag("g4SimHits","EcalHitsEB"))),
349  tok_caloEE_(consumes<edm::PCaloHitContainer>(edm::InputTag("g4SimHits", "EcalHitsEE"))),
350  tok_caloHH_(consumes<edm::PCaloHitContainer>(edm::InputTag("g4SimHits", "HcalHits"))),
351  tok_trigger_(consumes<edm::TriggerResults>(edm::InputTag("TriggerResults","","HLT"))),
352  minTrackP_(iConfig.getUntrackedParameter<double>("minTrackP",10.0)),
353  maxTrackEta_(iConfig.getUntrackedParameter<double>("maxTrackEta",5.0)),
354  maxNearTrackP_(iConfig.getUntrackedParameter<double>("maxNearTrackP",1.0)),
355  debugEcalSimInfo_(iConfig.getUntrackedParameter<int>("debugEcalSimInfo")),
356  applyEcalIsolation_(iConfig.getUntrackedParameter<bool>("applyEcalIsolation")) {
357 
358  //now do what ever initialization is needed
359 
360  edm::ParameterSet parameters = iConfig.getParameter<edm::ParameterSet>("TrackAssociatorParameters");
362  parameters_.loadParameters( parameters, iC);
363  trackAssociator_ = std::unique_ptr<TrackDetectorAssociator>(new TrackDetectorAssociator());
364  trackAssociator_->useDefaultPropagator();
365 
366  if(myverbose_>=0) {
367  edm::LogVerbatim("IsoTrack") <<"Parameters read from config file \n"
368  << "myverbose_ " << myverbose_ << "\n"
369  << "useJetTrigger_ " << useJetTrigger_ << "\n"
370  << "drLeadJetVeto_ " << drLeadJetVeto_ << "\n"
371  << "minTrackP_ " << minTrackP_ << "\n"
372  << "maxTrackEta_ " << maxTrackEta_ << "\n"
373  << "maxNearTrackP_ " << maxNearTrackP_;
374  }
375 }
376 
378 }
379 
381 
383  desc.addUntracked<bool>("doMC", false);
384  desc.addUntracked<int>("verbosity", 1);
385  desc.addUntracked<bool>("useJetTrigger", false);
386  desc.addUntracked<double>("drLeadJetVeto", 1.2);
387  desc.addUntracked<double>("ptMinLeadJet", 15.0);
388  desc.addUntracked<int>("debugTracks", 0);
389  desc.addUntracked<bool>("printTrkHitPattern", true);
390  desc.addUntracked<double>("minTrackP", 1.0);
391  desc.addUntracked<double>("maxTrackEta", 2.6);
392  desc.addUntracked<double>("maxNearTrackP", 1.0);
393  desc.addUntracked<bool>("debugEcalSimInfo", false);
394  desc.addUntracked<bool>("applyEcalIsolation", true);
395  desc.addUntracked<bool>("debugL1Info", false);
396  desc.add<edm::InputTag>("L1extraTauJetSource",edm::InputTag("l1extraParticles","Tau"));
397  desc.add<edm::InputTag>("L1extraCenJetSource",edm::InputTag("l1extraParticles","Central"));
398  desc.add<edm::InputTag>("L1extraFwdJetSource",edm::InputTag("l1extraParticles","Forward"));
399  //The following parameters are used as default for track association
400  edm::ParameterSetDescription desc_TrackAssoc;
401  desc_TrackAssoc.add<double>("muonMaxDistanceSigmaX",0.0);
402  desc_TrackAssoc.add<double>("muonMaxDistanceSigmaY",0.0);
403  desc_TrackAssoc.add<edm::InputTag>("CSCSegmentCollectionLabel",edm::InputTag("cscSegments"));
404  desc_TrackAssoc.add<double>("dRHcal",9999.0);
405  desc_TrackAssoc.add<double>("dREcal",9999.0);
406  desc_TrackAssoc.add<edm::InputTag>("CaloTowerCollectionLabel",edm::InputTag("towerMaker"));
407  desc_TrackAssoc.add<bool>("useEcal",true);
408  desc_TrackAssoc.add<double>("dREcalPreselection",0.05);
409  desc_TrackAssoc.add<edm::InputTag>("HORecHitCollectionLabel",edm::InputTag("horeco"));
410  desc_TrackAssoc.add<double>("dRMuon",9999.0);
411  desc_TrackAssoc.add<std::string>("crossedEnergyType","SinglePointAlongTrajectory");
412  desc_TrackAssoc.add<double>("muonMaxDistanceX",5.0);
413  desc_TrackAssoc.add<double>("muonMaxDistanceY",5.0);
414  desc_TrackAssoc.add<bool>("useHO",false);
415  desc_TrackAssoc.add<bool>("accountForTrajectoryChangeCalo",false);
416  desc_TrackAssoc.add<edm::InputTag>("DTRecSegment4DCollectionLabel",edm::InputTag("dt4DSegments"));
417  desc_TrackAssoc.add<edm::InputTag>("EERecHitCollectionLabel",edm::InputTag("ecalRecHit","EcalRecHitsEE"));
418  desc_TrackAssoc.add<double>("dRHcalPreselection",0.2);
419  desc_TrackAssoc.add<bool>("useMuon",false);
420  desc_TrackAssoc.add<bool>("useCalo",true);
421  desc_TrackAssoc.add<edm::InputTag>("EBRecHitCollectionLabel",edm::InputTag("ecalRecHit","EcalRecHitsEB"));
422  desc_TrackAssoc.add<double>("dRMuonPreselection",0.2);
423  desc_TrackAssoc.add<bool>("truthMatch",false);
424  desc_TrackAssoc.add<edm::InputTag>("HBHERecHitCollectionLabel",edm::InputTag("hbhereco"));
425  desc_TrackAssoc.add<bool>("useHcal",true);
426  desc_TrackAssoc.add<bool>("usePreshower",false);
427  desc_TrackAssoc.add<double>("dRPreshowerPreselection",0.2);
428  desc_TrackAssoc.add<double>("trajectoryUncertaintyTolerance",1.0);
429  desc.add<edm::ParameterSetDescription>("TrackAssociatorParameters",desc_TrackAssoc);
430  descriptions.add("isolatedTracksCone",desc);
431 }
432 
434  const edm::EventSetup& iSetup) {
435 
436  unsigned int irun = (unsigned int)iEvent.id().run();
437  unsigned int ilum = (unsigned int)iEvent.getLuminosityBlock().luminosityBlock();
438  unsigned int ievt = (unsigned int)iEvent.id().event();
439 
440 
441 
443 
444  // check the L1 objects
445  bool L1Pass = false;
446  leadL1JetPT=-999, leadL1JetEta=-999, leadL1JetPhi=-999;
447  if( !useJetTrigger_) {
448  L1Pass = true;
449  } else {
451  iEvent.getByToken(tok_L1extTauJet_,l1TauHandle);
452  l1extra::L1JetParticleCollection::const_iterator itr;
453  for(itr = l1TauHandle->begin(); itr != l1TauHandle->end(); ++itr)
454  {
455  if( itr->pt()>leadL1JetPT) {
456  leadL1JetPT = itr->pt();
457  leadL1JetEta = itr->eta();
458  leadL1JetPhi = itr->phi();
459  }
460  }
462  iEvent.getByToken(tok_L1extCenJet_,l1CenJetHandle);
463  for( itr = l1CenJetHandle->begin(); itr != l1CenJetHandle->end(); ++itr)
464  {
465  if( itr->pt()>leadL1JetPT) {
466  leadL1JetPT = itr->pt();
467  leadL1JetEta = itr->eta();
468  leadL1JetPhi = itr->phi();
469  }
470  }
472  iEvent.getByToken(tok_L1extFwdJet_,l1FwdJetHandle);
473  for( itr = l1FwdJetHandle->begin(); itr != l1FwdJetHandle->end(); ++itr)
474  {
475  if( itr->pt()>leadL1JetPT) {
476  leadL1JetPT = itr->pt();
477  leadL1JetEta = itr->eta();
478  leadL1JetPhi = itr->phi();
479  }
480  }
482  {
483  L1Pass = true;
484  }
485 
486  }
487 
488 
490  // Break now if L1Pass is false
492  if (!L1Pass) {
493  nEVT_failL1++;
494  // edm::LogVerbatim("IsoTrack") << "L1Pass is false : " << L1Pass;
495  // return;
496  }
497 
499  // Get the collection handles
501 
502 
504  iSetup.get<CaloGeometryRecord>().get(pG);
505  const CaloGeometry* geo = pG.product();
506  const CaloSubdetectorGeometry* gEB =
508  const CaloSubdetectorGeometry* gEE =
510  const CaloSubdetectorGeometry* gHB =
512  const CaloSubdetectorGeometry* gHE =
514 
515  edm::ESHandle<CaloTopology> theCaloTopology;
516  iSetup.get<CaloTopologyRecord>().get(theCaloTopology);
517  const CaloTopology *caloTopology = theCaloTopology.product();
518 
520  iSetup.get<HcalRecNumberingRecord>().get(htopo);
521  const HcalTopology* theHBHETopology = htopo.product();
522 
523  edm::Handle<EcalRecHitCollection> barrelRecHitsHandle;
524  edm::Handle<EcalRecHitCollection> endcapRecHitsHandle;
525  iEvent.getByToken(tok_EB_,barrelRecHitsHandle);
526  iEvent.getByToken(tok_EE_,endcapRecHitsHandle);
527 
528  // Retrieve the good/bad ECAL channels from the DB
530  iSetup.get<EcalChannelStatusRcd>().get(ecalChStatus);
531  const EcalChannelStatus* theEcalChStatus = ecalChStatus.product();
532 
534  iEvent.getByToken(tok_hbhe_,hbhe);
535  const HBHERecHitCollection Hithbhe = *(hbhe.product());
536 
538  iEvent.getByToken(tok_genTrack_, trkCollection);
539  reco::TrackCollection::const_iterator trkItr;
540  if(debugTrks_>1){
541  edm::LogVerbatim("IsoTrack") << "Track Collection: ";
542  edm::LogVerbatim("IsoTrack") << "Number of Tracks "<< trkCollection->size();
543  }
544  std::string theTrackQuality = "highPurity";
545  reco::TrackBase::TrackQuality trackQuality_=
546  reco::TrackBase::qualityByName(theTrackQuality);
547 
548  //get Handles to SimTracks and SimHits
550  if (doMC_) iEvent.getByToken(tok_simTk_,SimTk);
551  edm::SimTrackContainer::const_iterator simTrkItr;
552 
554  if (doMC_) iEvent.getByToken(tok_simVtx_,SimVtx);
555 
556  //get Handles to PCaloHitContainers of eb/ee/hbhe
558  if (doMC_) iEvent.getByToken(tok_caloEB_, pcaloeb);
559 
561  if (doMC_) iEvent.getByToken(tok_caloEE_, pcaloee);
562 
564  if (doMC_) iEvent.getByToken(tok_caloHH_, pcalohh);
565 
566 
567 
569  // Get HLT_IsoTrackHB/HE Information
571 
573  iEvent.getByToken( tok_trigger_, triggerResults);
574 
575 
576 
577  std::vector<int> v_hlTriggers;
578  int hltHB(-99);
579  int hltHE(-99);
580  int hltL1Jet15 (-99);
581  int hltJet30 (-99);
582  int hltJet50 (-99);
583  int hltJet80 (-99);
584  int hltJet110 (-99);
585  int hltJet140 (-99);
586  int hltJet180 (-99);
587  int hltL1SingleEG5 (-99);
588  int hltZeroBias (-99);
589  int hltMinBiasHcal (-99);
590  int hltMinBiasEcal (-99);
591  int hltMinBiasPixel (-99);
592  int hltSingleIsoTau30_Trk5 (-99);
593  int hltDoubleLooseIsoTau15_Trk5(-99);
594 
595  if (triggerResults.isValid()) {
596 
597  const edm::TriggerNames & triggerNames = iEvent.triggerNames(*triggerResults);
598  // TriggerNames class triggerNames.init(*triggerResults);
599 
600 
601  for (unsigned int i=0; i<triggerResults->size(); i++){
602  // edm::LogVerbatim("IsoTrack") << "triggerNames.triggerName(" << i << ") = " << triggerNames.triggerName(i);
603  if (triggerNames.triggerName(i) == "HLT_IsoTrackHE_1E31") hltHE = triggerResults->accept(i);
604  if (triggerNames.triggerName(i) == "HLT_IsoTrackHB_1E31") hltHB = triggerResults->accept(i);
605  if (triggerNames.triggerName(i) == "HLT_L1Jet15") hltL1Jet15 = triggerResults->accept(i);
606  if (triggerNames.triggerName(i) == "HLT_Jet30") hltJet30 = triggerResults->accept(i);
607  if (triggerNames.triggerName(i) == "HLT_Jet50") hltJet50 = triggerResults->accept(i);
608  if (triggerNames.triggerName(i) == "HLT_Jet80") hltJet80 = triggerResults->accept(i);
609  if (triggerNames.triggerName(i) == "HLT_Jet110") hltJet110 = triggerResults->accept(i);
610  if (triggerNames.triggerName(i) == "HLT_Jet140") hltJet140 = triggerResults->accept(i);
611  if (triggerNames.triggerName(i) == "HLT_Jet180") hltJet180 = triggerResults->accept(i);
612  if (triggerNames.triggerName(i) == "HLT_L1SingleEG5") hltL1SingleEG5 = triggerResults->accept(i);
613  if (triggerNames.triggerName(i) == "HLT_ZeroBias") hltZeroBias = triggerResults->accept(i);
614  if (triggerNames.triggerName(i) == "HLT_MinBiasHcal") hltMinBiasHcal = triggerResults->accept(i);
615  if (triggerNames.triggerName(i) == "HLT_MinBiasEcal") hltMinBiasEcal = triggerResults->accept(i);
616  if (triggerNames.triggerName(i) == "HLT_MinBiasPixel") hltMinBiasPixel = triggerResults->accept(i);
617  if (triggerNames.triggerName(i) == "HLT_SingleIsoTau30_Trk5") hltSingleIsoTau30_Trk5 = triggerResults->accept(i);
618  if (triggerNames.triggerName(i) == "HLT_DoubleLooseIsoTau15_Trk5") hltDoubleLooseIsoTau15_Trk5 = triggerResults->accept(i);
619  }
620  }
621 
622 
623 
624 
626  // Primary loop over tracks
628  std::unique_ptr<TrackerHitAssociator> associate;
629  if (doMC_) associate.reset(new TrackerHitAssociator(iEvent, trackerHitAssociatorConfig_));
630 
631 
632  nTRK = 0;
633  nRawTRK = 0;
634  nFailPt = 0;
635  nFailEta = 0;
637  nMissEcal = 0;
638  nMissHcal = 0;
639 
640  for( trkItr = trkCollection->begin();
641  trkItr != trkCollection->end(); ++trkItr)
642  {
643 
644  nRawTRK++;
645 
646  const reco::Track* pTrack = &(*trkItr);
647 
649  // Check for min Pt and max Eta P
651 
652  bool trkQual = pTrack->quality(trackQuality_);
653  bool goodPt = pTrack->p()>minTrackP_;
654  bool goodEta = std::abs(pTrack->momentum().eta())<maxTrackEta_;
655 
656  double eta1 = pTrack->momentum().eta();
657  double phi1 = pTrack->momentum().phi();
658  double pt1 = pTrack->pt();
659  double p1 = pTrack->p();
660 
661 
662  if (!goodEta){
663  nFailEta++;
664  }
665  if (!goodPt){
666  nFailPt++;
667  }
668  if (!trkQual){
670  }
671 
672  h_RawPt->Fill(pt1);
673  h_RawP->Fill(p1);
674  h_RawEta->Fill(eta1);
675  h_RawPhi->Fill(phi1);
676 
677  if( !goodEta || !goodPt || !trkQual) continue; // Skip to next track
678 
680  // Find track trajectory
682 
683 
684  const FreeTrajectoryState fts1 =
685  trackAssociator_->getFreeTrajectoryState(iSetup, *pTrack);
686 
687 
688  TrackDetMatchInfo info1 =
689  trackAssociator_->associate(iEvent, iSetup, fts1, parameters_);
690 
691 
692 
694  // First confirm track makes it to Hcal
696 
697  if (info1.trkGlobPosAtHcal.x()==0 &&
698  info1.trkGlobPosAtHcal.y()==0 &&
699  info1.trkGlobPosAtHcal.z()==0)
700  {
701  nMissHcal++;
702  continue;
703  }
704 
705  const GlobalPoint hpoint1(info1.trkGlobPosAtHcal.x(),
706  info1.trkGlobPosAtHcal.y(),
707  info1.trkGlobPosAtHcal.z());
708 
709 
710 
712  // Get basic quantities
714 
715  const reco::HitPattern& hitp = pTrack->hitPattern();
716  int nLayersCrossed = hitp.trackerLayersWithMeasurement();
717  int nOuterHits = hitp.stripTOBLayersWithMeasurement()
718  +hitp.stripTECLayersWithMeasurement() ;
719 
720 
721  double simP = 0;
722  if (doMC_) {
723  edm::SimTrackContainer::const_iterator matchedSimTrk =
724  spr::matchedSimTrack(iEvent, SimTk, SimVtx, pTrack, *associate, false);
725  simP = matchedSimTrk->momentum().P();
726  }
728  // Get Ecal Point
730 
731  const GlobalPoint point1(info1.trkGlobPosAtEcal.x(),
732  info1.trkGlobPosAtEcal.y(),
733  info1.trkGlobPosAtEcal.z());
734 
735 
736  // Sanity check that track hits Ecal
737 
738  if (info1.trkGlobPosAtEcal.x()==0 &&
739  info1.trkGlobPosAtEcal.y()==0 &&
740  info1.trkGlobPosAtEcal.z()==0)
741  {
742  edm::LogVerbatim("IsoTrack") << "Track doesn't reach Ecal.";
743  nMissEcal++;
744  continue;
745  }
746 
747  // Get Track Momentum - make sure you have latest version of TrackDetMatchInfo
748 
749  GlobalVector trackMomAtEcal = info1.trkMomAtEcal;
750  GlobalVector trackMomAtHcal = info1.trkMomAtHcal;
751 
753  // If using Jet trigger, get distance from leading jet
755 
756  double drFromLeadJet = 999.0;
757  if( useJetTrigger_) {
758  double dphi = deltaPhi(phi1, leadL1JetPhi);
759  double deta = eta1 - leadL1JetEta;
760  drFromLeadJet = sqrt(dphi*dphi + deta*deta);
761  }
762 
763 
765  // Define Arrays for sizes of Charge, Neut Iso Radii and
766  // Clustering Cone Radius.
768 
769  const int a_size = 7;
770  double a_coneR[a_size];
771  double a_charIsoR[a_size];
772  double a_neutIsoR[a_size];
773 
774  a_coneR[0] = 17.49; // = area of 2x2
775  a_coneR[1] = 26.23; // = area of 3x3
776  a_coneR[2] = 30.61;
777  a_coneR[3] = 34.98; // = area of 4x4
778  a_coneR[4] = 39.35;
779  a_coneR[5] = 43.72; // = area of 5x5
780  a_coneR[6] = 52.46; // = area of 6x6
781 
782  for (int i=0; i<a_size; i++){
783  a_charIsoR[i] = a_coneR[i]+28.9; // 28.9 gives 55.1 for 3x3 benchmark
784  a_neutIsoR[i] = a_charIsoR[i]*0.726; // Ecal radius = 0.726*Hcal radius
785  }
786 
788  // Do Neutral Iso in radius on Ecal surface.
790 
791  // NxN cluster
792  double e3x3=-999.0;
793  double trkEcalEne =-999.0;
795  iSetup.get<EcalSeverityLevelAlgoRcd>().get(sevlv);
796 
797  if(std::abs(point1.eta())<1.479) {
798  const DetId isoCell = gEB->getClosestCell(point1);
799  e3x3 = spr::eECALmatrix(isoCell,barrelRecHitsHandle,endcapRecHitsHandle, *theEcalChStatus, geo, caloTopology, sevlv.product(),1,1).first;
800  trkEcalEne = spr::eCaloSimInfo(iEvent, geo, pcaloeb, pcaloee, SimTk, SimVtx, pTrack, *associate);
801  } else {
802  const DetId isoCell = gEE->getClosestCell(point1);
803  e3x3 = spr::eECALmatrix(isoCell,barrelRecHitsHandle,endcapRecHitsHandle, *theEcalChStatus, geo, caloTopology, sevlv.product(),1,1).first;
804  trkEcalEne = spr::eCaloSimInfo(iEvent, geo, pcaloeb, pcaloee, SimTk, SimVtx, pTrack, *associate);
805  }
806 
807  // Cone cluster
808 
809  // Set up array of cone sizes for MIP cut
810  const int a_mip_size = 5;
811  double a_mipR[a_mip_size];
812  a_mipR[0] = 3.84; // = area of 3x3 ecal
813  a_mipR[1] = 14.0;
814  a_mipR[2] = 19.0;
815  a_mipR[3] = 24.0;
816  a_mipR[4] = 9.0; // = from standard analyzer
817 
818  std::vector<double> v_eDR;
819  for (int i = 0 ; i < a_size ; i++){
820  int nRH_eDR = 0;
821 
822  // Cone in ecal
823  double eDR = spr::eCone_ecal(geo,
824  barrelRecHitsHandle,
825  endcapRecHitsHandle,
826  hpoint1, point1,
827  a_neutIsoR[i],
828  trackMomAtEcal, nRH_eDR);
829  v_eDR.push_back(eDR);
830 
831  }
832 
833  std::vector<double> v_eMipDR;
834  for (int i = 0 ; i < a_mip_size ; i++){
835  int nRH_eMipDR = 0;
836  double eMipDR = spr::eCone_ecal(geo, barrelRecHitsHandle,
837  endcapRecHitsHandle,
838  hpoint1, point1,
839  a_mipR[i], trackMomAtEcal, nRH_eMipDR);
840 
841  v_eMipDR.push_back(eMipDR);
842  }
843 
844 
846  // Do charge isolation in radius at Hcal surface for 5 different
847  // radii defined above in a_charIso
849 
850  std::vector<double> v_hmaxNearP_goodTrk;
851  std::vector<double> v_hmaxNearP ;
852  std::vector<int> v_hnNearTRKs ;
853  std::vector<int> v_hnLayers_maxNearP;
854  std::vector<int> v_htrkQual_maxNearP;
855 
856  std::vector<double> v_cone_hmaxNearP_goodTrk;
857  std::vector<double> v_cone_hmaxNearP ;
858  std::vector<int> v_cone_hnNearTRKs ;
859  std::vector<int> v_cone_hnLayers_maxNearP;
860  std::vector<int> v_cone_htrkQual_maxNearP;
861 
862  for (int i = 0 ; i < a_size ; i++){
863 
864  double hmaxNearP = -999.0;
865  int hnNearTRKs = 0;
866  int hnLayers_maxNearP = 0;
867  int htrkQual_maxNearP = -1;
868  double hmaxNearP_goodTrk = -999.0;
869 
870  double conehmaxNearP = -999.0;
871  int conehnNearTRKs = 0;
872  int conehnLayers_maxNearP = 0;
873  int conehtrkQual_maxNearP = -1;
874  double conehmaxNearP_goodTrk = -999.0;
875 
876  conehmaxNearP = spr::coneChargeIsolation(iEvent, iSetup,
877  trkItr, trkCollection,
879  theTrackQuality, conehnNearTRKs,
880  conehnLayers_maxNearP,
881  conehtrkQual_maxNearP,
882  conehmaxNearP_goodTrk,
883  hpoint1, trackMomAtHcal,
884  a_charIsoR[i]);
885 
886  v_hmaxNearP_goodTrk.push_back(hmaxNearP_goodTrk);
887  v_hmaxNearP .push_back(hmaxNearP );
888  v_hnNearTRKs .push_back(hnNearTRKs );
889  v_hnLayers_maxNearP.push_back(hnLayers_maxNearP);
890  v_htrkQual_maxNearP.push_back(htrkQual_maxNearP);
891 
892  v_cone_hmaxNearP_goodTrk.push_back(conehmaxNearP_goodTrk);
893  v_cone_hmaxNearP .push_back(conehmaxNearP );
894  v_cone_hnNearTRKs .push_back(conehnNearTRKs );
895  v_cone_hnLayers_maxNearP.push_back(conehnLayers_maxNearP);
896  v_cone_htrkQual_maxNearP.push_back(conehtrkQual_maxNearP);
897 
898  }
899 
900  double h3x3=-999.0, h5x5=-999.0;
901  double hsim3x3=-999.0, hsim5x5=-999.0, trkHcalEne=-999.0;
902  std::map<std::string, double> hsimInfo3x3, hsimInfo5x5;
903  double distFromHotCell_h3x3 = -99.;
904  int ietaFromHotCell_h3x3 = -99;
905  int iphiFromHotCell_h3x3 = -99;
906  double distFromHotCell_h5x5 = -99.;
907  int ietaFromHotCell_h5x5 = -99;
908  int iphiFromHotCell_h5x5 = -99;
909 
910  GlobalPoint gPosHotCell_h3x3(0.,0.,0.);
911  GlobalPoint gPosHotCell_h5x5(0.,0.,0.);
912 
913  int nRH_h3x3(0), nRH_h5x5(0);
914 
915  // Hcal Energy Clustering
916 
917  // Get closetcell for ietaFromHotCell and iphiFromHotCell
918  DetId ClosestCell;
919  if( std::abs(pTrack->eta())<1.392) {
920  ClosestCell = gHB->getClosestCell(hpoint1);
921  } else {
922  ClosestCell = gHE->getClosestCell(hpoint1);
923  }
924  // Transform into HcalDetId so that I can get ieta, iphi later.
925  HcalDetId ClosestCell_HcalDetId(ClosestCell.rawId());
926 
927  // Using NxN Cluster
928  std::vector<int> v_RH_h3x3_ieta;
929  std::vector<int> v_RH_h3x3_iphi;
930  std::vector<double> v_RH_h3x3_ene;
931  std::vector<int> v_RH_h5x5_ieta;
932  std::vector<int> v_RH_h5x5_iphi;
933  std::vector<double> v_RH_h5x5_ene;
934 
935 
936  h3x3 = spr::eHCALmatrix(geo, theHBHETopology, ClosestCell, hbhe,1,1,
937  nRH_h3x3, v_RH_h3x3_ieta, v_RH_h3x3_iphi, v_RH_h3x3_ene,
938  gPosHotCell_h3x3);
939  distFromHotCell_h3x3 = spr::getDistInPlaneTrackDir(hpoint1, trackMomAtHcal, gPosHotCell_h3x3);
940 
941  h5x5 = spr::eHCALmatrix(geo, theHBHETopology, ClosestCell, hbhe,2,2,
942  nRH_h5x5, v_RH_h5x5_ieta, v_RH_h5x5_iphi, v_RH_h5x5_ene,
943  gPosHotCell_h5x5);
944  distFromHotCell_h5x5 = spr::getDistInPlaneTrackDir(hpoint1, trackMomAtHcal, gPosHotCell_h5x5);
945 
946 
947  // double heta = (double)hpoint1.eta();
948  // double hphi = (double)hpoint1.phi();
949  std::vector<int> multiplicity3x3;
950  std::vector<int> multiplicity5x5;
951  if (doMC_) {
952  hsim3x3 = spr::eHCALmatrix(theHBHETopology, ClosestCell,
953  pcalohh,1,1);
954  hsim5x5 = spr::eHCALmatrix(theHBHETopology, ClosestCell,
955  pcalohh,2,2);
956 
957  hsimInfo3x3 = spr::eHCALSimInfo(iEvent, theHBHETopology, ClosestCell, pcalohh, SimTk, SimVtx, pTrack, *associate, 1,1, multiplicity3x3);
958  hsimInfo5x5 = spr::eHCALSimInfo(iEvent, theHBHETopology, ClosestCell, pcalohh, SimTk, SimVtx, pTrack, *associate, 2,2, multiplicity5x5);
959 
960  // Get energy from all simhits in hcal associated with iso track
961  trkHcalEne = spr::eCaloSimInfo(iEvent, geo, pcalohh, SimTk, SimVtx, pTrack, *associate);
962  }
963 
964  // Finally for cones of varying radii.
965  std::vector<double> v_hsimInfoConeMatched;
966  std::vector<double> v_hsimInfoConeRest ;
967  std::vector<double> v_hsimInfoConePhoton ;
968  std::vector<double> v_hsimInfoConeNeutHad;
969  std::vector<double> v_hsimInfoConeCharHad;
970  std::vector<double> v_hsimInfoConePdgMatched;
971  std::vector<double> v_hsimInfoConeTotal ;
972 
973  std::vector<int> v_hsimInfoConeNMatched;
974  std::vector<int> v_hsimInfoConeNTotal ;
975  std::vector<int> v_hsimInfoConeNNeutHad;
976  std::vector<int> v_hsimInfoConeNCharHad;
977  std::vector<int> v_hsimInfoConeNPhoton ;
978  std::vector<int> v_hsimInfoConeNRest ;
979 
980  std::vector<double> v_hsimCone ;
981  std::vector<double> v_hCone ;
982 
983  std::vector<int> v_nRecHitsCone ;
984  std::vector<int> v_nSimHitsCone ;
985 
986  std::vector<double> v_distFromHotCell;
987  std::vector<int> v_ietaFromHotCell;
988  std::vector<int> v_iphiFromHotCell;
989  GlobalPoint gposHotCell(0.,0.,0.);
990 
991 
992  std::vector<int> v_RH_r26_ieta;
993  std::vector<int> v_RH_r26_iphi;
994  std::vector<double> v_RH_r26_ene;
995  std::vector<int> v_RH_r44_ieta;
996  std::vector<int> v_RH_r44_iphi;
997  std::vector<double> v_RH_r44_ene;
998 
999 
1000 
1001  for (int i = 0 ; i < a_size ; i++){
1002 
1003 
1004  std::map<std::string, double> hsimInfoCone;
1005  double hsimCone = -999.0, hCone = -999.0;
1006  double distFromHotCell = -99.0;
1007  int ietaFromHotCell = -99;
1008  int iphiFromHotCell = -99;
1009  int ietaHotCell = -99;
1010  int iphiHotCell = -99;
1011  int nRecHitsCone = -999;
1012  int nSimHitsCone = -999;
1013 
1014  std::vector<int> multiplicityCone;
1015  std::vector<DetId> coneRecHitDetIds;
1016  if (doMC_)
1017  hsimCone = spr::eCone_hcal(geo, pcalohh, hpoint1, point1,
1018  a_coneR[i], trackMomAtHcal, nSimHitsCone);
1019 
1020  // If needed, get ieta and iphi of rechits for cones of 23.25
1021  // and for hitmap for debugging
1022  bool makeHitmaps = false;
1023  if (a_coneR[i] == 26.23 && makeHitmaps)
1024  {
1025 
1026  hCone = spr::eCone_hcal(geo, hbhe, hpoint1, point1,
1027  a_coneR[i], trackMomAtHcal,nRecHitsCone,
1028  v_RH_r26_ieta, v_RH_r26_iphi, v_RH_r26_ene,
1029  coneRecHitDetIds, distFromHotCell,
1030  ietaHotCell, iphiHotCell, gposHotCell);
1031  }
1032  else if (a_coneR[i] == 43.72 && makeHitmaps)
1033  {
1034 
1035  hCone = spr::eCone_hcal(geo, hbhe, hpoint1, point1,
1036  a_coneR[i], trackMomAtHcal,nRecHitsCone,
1037  v_RH_r44_ieta, v_RH_r44_iphi, v_RH_r44_ene,
1038  coneRecHitDetIds, distFromHotCell,
1039  ietaHotCell, iphiHotCell, gposHotCell);
1040  }
1041  else
1042  {
1043 
1044  hCone = spr::eCone_hcal(geo, hbhe, hpoint1, point1,
1045  a_coneR[i], trackMomAtHcal, nRecHitsCone,
1046  coneRecHitDetIds, distFromHotCell,
1047  ietaHotCell, iphiHotCell, gposHotCell);
1048  }
1049 
1050 
1051 
1052  if (ietaHotCell != 99){
1053  ietaFromHotCell = ietaHotCell-ClosestCell_HcalDetId.ieta();
1054  iphiFromHotCell = iphiHotCell-ClosestCell_HcalDetId.iphi();
1055  }
1056 
1057  // SimHits NOT matched to RecHits
1058  if (doMC_) {
1059  hsimInfoCone = spr::eHCALSimInfoCone(iEvent,pcalohh, SimTk, SimVtx, pTrack, *associate, geo, hpoint1, point1, a_coneR[i], trackMomAtHcal, multiplicityCone);
1060 
1061 
1062 
1063  // SimHits matched to RecHits
1064  // hsimInfoCone = spr::eHCALSimInfoCone(iEvent,pcalohh, SimTk, SimVtx,
1065  // pTrack, *associate,
1066  // geo, hpoint1, point1,
1067  // a_coneR[i], trackMomAtHcal,
1068  // multiplicityCone,
1069  // coneRecHitDetIds);
1070 
1071  v_hsimInfoConeMatched .push_back(hsimInfoCone["eMatched" ]);
1072  v_hsimInfoConeRest .push_back(hsimInfoCone["eRest" ]);
1073  v_hsimInfoConePhoton .push_back(hsimInfoCone["eGamma" ]);
1074  v_hsimInfoConeNeutHad .push_back(hsimInfoCone["eNeutralHad"]);
1075  v_hsimInfoConeCharHad .push_back(hsimInfoCone["eChargedHad"]);
1076  v_hsimInfoConePdgMatched.push_back(hsimInfoCone["pdgMatched" ]);
1077  v_hsimInfoConeTotal .push_back(hsimInfoCone["eTotal" ]);
1078 
1079  v_hsimInfoConeNMatched .push_back(multiplicityCone.at(0));
1080 
1081  v_hsimInfoConeNTotal .push_back(multiplicityCone.at(1));
1082  v_hsimInfoConeNNeutHad .push_back(multiplicityCone.at(2));
1083  v_hsimInfoConeNCharHad .push_back(multiplicityCone.at(3));
1084  v_hsimInfoConeNPhoton .push_back(multiplicityCone.at(4));
1085  v_hsimInfoConeNRest .push_back(multiplicityCone.at(5));
1086 
1087  v_hsimCone .push_back(hsimCone );
1088  v_nSimHitsCone .push_back(nSimHitsCone );
1089  }
1090  v_hCone .push_back(hCone );
1091  v_nRecHitsCone .push_back(nRecHitsCone );
1092 
1093  v_distFromHotCell .push_back(distFromHotCell );
1094  v_ietaFromHotCell .push_back(ietaFromHotCell );
1095  v_iphiFromHotCell .push_back(iphiFromHotCell );
1096 
1097 
1098  }
1099 
1100 
1102  // Fill Vectors that go into root file
1104 
1105  t_v_hnNearTRKs ->push_back(v_hnNearTRKs );
1106  t_v_hnLayers_maxNearP ->push_back(v_hnLayers_maxNearP );
1107  t_v_htrkQual_maxNearP ->push_back(v_htrkQual_maxNearP );
1108  t_v_hmaxNearP_goodTrk ->push_back(v_hmaxNearP_goodTrk );
1109  t_v_hmaxNearP ->push_back(v_hmaxNearP );
1110 
1111  t_v_cone_hnNearTRKs ->push_back(v_cone_hnNearTRKs );
1112  t_v_cone_hnLayers_maxNearP ->push_back(v_cone_hnLayers_maxNearP);
1113  t_v_cone_htrkQual_maxNearP ->push_back(v_cone_htrkQual_maxNearP);
1114  t_v_cone_hmaxNearP_goodTrk ->push_back(v_cone_hmaxNearP_goodTrk);
1115  t_v_cone_hmaxNearP ->push_back(v_cone_hmaxNearP );
1116 
1117  // t_hScale ->push_back(hScale );
1118  t_trkNOuterHits ->push_back(nOuterHits );
1119  t_trkNLayersCrossed ->push_back(nLayersCrossed );
1120  t_dtFromLeadJet ->push_back(drFromLeadJet );
1121  t_trkP ->push_back(p1 );
1122  t_trkPt ->push_back(pt1 );
1123  t_trkEta ->push_back(eta1 );
1124  t_trkPhi ->push_back(phi1 );
1125 
1126  t_e3x3 ->push_back(e3x3 );
1127  t_v_eDR ->push_back(v_eDR );
1128  t_v_eMipDR ->push_back(v_eMipDR );
1129 
1130  t_h3x3 ->push_back(h3x3 );
1131  t_h5x5 ->push_back(h5x5 );
1132  t_nRH_h3x3 ->push_back(nRH_h3x3 );
1133  t_nRH_h5x5 ->push_back(nRH_h5x5 );
1134 
1135  t_v_RH_h3x3_ieta ->push_back(v_RH_h3x3_ieta);
1136  t_v_RH_h3x3_iphi ->push_back(v_RH_h3x3_iphi);
1137  t_v_RH_h3x3_ene ->push_back(v_RH_h3x3_ene);
1138  t_v_RH_h5x5_ieta ->push_back(v_RH_h5x5_ieta);
1139  t_v_RH_h5x5_iphi ->push_back(v_RH_h5x5_iphi);
1140  t_v_RH_h5x5_ene ->push_back(v_RH_h5x5_ene);
1141 
1142  if (doMC_) {
1143  t_simP ->push_back(simP );
1144  t_hsim3x3 ->push_back(hsim3x3 );
1145  t_hsim5x5 ->push_back(hsim5x5 );
1146 
1147  t_hsim3x3Matched ->push_back(hsimInfo3x3["eMatched"] );
1148  t_hsim5x5Matched ->push_back(hsimInfo5x5["eMatched"] );
1149  t_hsim3x3Rest ->push_back(hsimInfo3x3["eRest"] );
1150  t_hsim5x5Rest ->push_back(hsimInfo5x5["eRest"] );
1151  t_hsim3x3Photon ->push_back(hsimInfo3x3["eGamma"] );
1152  t_hsim5x5Photon ->push_back(hsimInfo5x5["eGamma"] );
1153  t_hsim3x3NeutHad ->push_back(hsimInfo3x3["eNeutralHad"]);
1154  t_hsim5x5NeutHad ->push_back(hsimInfo5x5["eNeutralHad"]);
1155  t_hsim3x3CharHad ->push_back(hsimInfo3x3["eChargedHad"]);
1156  t_hsim5x5CharHad ->push_back(hsimInfo5x5["eChargedHad"]);
1157  t_hsim3x3Total ->push_back(hsimInfo3x3["eTotal"] );
1158  t_hsim5x5Total ->push_back(hsimInfo5x5["eTotal"] );
1159  t_hsim3x3PdgMatched ->push_back(hsimInfo3x3["pdgMatched"] );
1160  t_hsim5x5PdgMatched ->push_back(hsimInfo5x5["pdgMatched"] );
1161 
1162  t_hsim3x3NMatched ->push_back(multiplicity3x3.at(0));
1163  t_hsim3x3NTotal ->push_back(multiplicity3x3.at(1));
1164  t_hsim3x3NNeutHad ->push_back(multiplicity3x3.at(2));
1165  t_hsim3x3NCharHad ->push_back(multiplicity3x3.at(3));
1166  t_hsim3x3NPhoton ->push_back(multiplicity3x3.at(4));
1167  t_hsim3x3NRest ->push_back(multiplicity3x3.at(5));
1168 
1169  t_hsim5x5NMatched ->push_back(multiplicity5x5.at(0));
1170  t_hsim5x5NTotal ->push_back(multiplicity5x5.at(1));
1171  t_hsim5x5NNeutHad ->push_back(multiplicity5x5.at(2));
1172  t_hsim5x5NCharHad ->push_back(multiplicity5x5.at(3));
1173  t_hsim5x5NPhoton ->push_back(multiplicity5x5.at(4));
1174  t_hsim5x5NRest ->push_back(multiplicity5x5.at(5));
1175  }
1176 
1177  t_distFromHotCell_h3x3->push_back(distFromHotCell_h3x3);
1178  t_ietaFromHotCell_h3x3->push_back(ietaFromHotCell_h3x3);
1179  t_iphiFromHotCell_h3x3->push_back(iphiFromHotCell_h3x3);
1180  t_distFromHotCell_h5x5->push_back(distFromHotCell_h5x5);
1181  t_ietaFromHotCell_h5x5->push_back(ietaFromHotCell_h5x5);
1182  t_iphiFromHotCell_h5x5->push_back(iphiFromHotCell_h5x5);
1183 
1184  if (doMC_) {
1185  t_trkHcalEne ->push_back(trkHcalEne );
1186  t_trkEcalEne ->push_back(trkEcalEne );
1187 
1188  t_v_hsimInfoConeMatched ->push_back(v_hsimInfoConeMatched );
1189  t_v_hsimInfoConeRest ->push_back(v_hsimInfoConeRest );
1190  t_v_hsimInfoConePhoton ->push_back(v_hsimInfoConePhoton );
1191  t_v_hsimInfoConeNeutHad ->push_back(v_hsimInfoConeNeutHad );
1192  t_v_hsimInfoConeCharHad ->push_back(v_hsimInfoConeCharHad );
1193  t_v_hsimInfoConePdgMatched ->push_back(v_hsimInfoConePdgMatched);
1194  t_v_hsimInfoConeTotal ->push_back(v_hsimInfoConeTotal );
1195 
1196  t_v_hsimInfoConeNMatched ->push_back(v_hsimInfoConeNMatched );
1197  t_v_hsimInfoConeNTotal ->push_back(v_hsimInfoConeNTotal );
1198  t_v_hsimInfoConeNNeutHad ->push_back(v_hsimInfoConeNNeutHad );
1199  t_v_hsimInfoConeNCharHad ->push_back(v_hsimInfoConeNCharHad );
1200  t_v_hsimInfoConeNPhoton ->push_back(v_hsimInfoConeNPhoton );
1201  t_v_hsimInfoConeNRest ->push_back(v_hsimInfoConeNRest );
1202 
1203  t_v_hsimCone ->push_back(v_hsimCone );
1204  t_v_hCone ->push_back(v_hCone );
1205  t_v_nRecHitsCone->push_back(v_nRecHitsCone);
1206  t_v_nSimHitsCone->push_back(v_nSimHitsCone);
1207  }
1208 
1209 
1210  t_v_distFromHotCell->push_back(v_distFromHotCell);
1211  t_v_ietaFromHotCell->push_back(v_ietaFromHotCell);
1212  t_v_iphiFromHotCell->push_back(v_iphiFromHotCell);
1213 
1214  t_v_RH_r26_ieta ->push_back(v_RH_r26_ieta);
1215  t_v_RH_r26_iphi ->push_back(v_RH_r26_iphi);
1216  t_v_RH_r26_ene ->push_back(v_RH_r26_ene);
1217  t_v_RH_r44_ieta ->push_back(v_RH_r44_ieta);
1218  t_v_RH_r44_iphi ->push_back(v_RH_r44_iphi);
1219  t_v_RH_r44_ene ->push_back(v_RH_r44_ene);
1220 
1221 
1222 
1223  t_v_hlTriggers ->push_back(v_hlTriggers);
1224  t_hltHB ->push_back(hltHB);
1225  t_hltHE ->push_back(hltHE);
1226  t_hltL1Jet15 ->push_back(hltL1Jet15 );
1227  t_hltJet30 ->push_back(hltJet30 );
1228  t_hltJet50 ->push_back(hltJet50 );
1229  t_hltJet80 ->push_back(hltJet80 );
1230  t_hltJet110 ->push_back(hltJet110 );
1231  t_hltJet140 ->push_back(hltJet140 );
1232  t_hltJet180 ->push_back(hltJet180 );
1233  t_hltL1SingleEG5 ->push_back(hltL1SingleEG5 );
1234  t_hltZeroBias ->push_back(hltZeroBias );
1235  t_hltMinBiasHcal ->push_back(hltMinBiasHcal );
1236  t_hltMinBiasEcal ->push_back(hltMinBiasEcal );
1237  t_hltMinBiasPixel ->push_back(hltMinBiasPixel );
1238  t_hltSingleIsoTau30_Trk5 ->push_back(hltSingleIsoTau30_Trk5 );
1239  t_hltDoubleLooseIsoTau15_Trk5->push_back(hltDoubleLooseIsoTau15_Trk5);
1240 
1241  t_irun->push_back(irun);
1242  t_ievt->push_back(ievt);
1243  t_ilum->push_back(ilum);
1244 
1245  nTRK++;
1246 
1247 
1248  } // Loop over track collection
1249 
1250  // edm::LogVerbatim("IsoTrack") << "nEVT= " << nEVT;
1251 
1252  ntp_->Fill();
1253  nEVT++;
1254 
1255 }
1256 
1258 
1259  // hbScale = 120.0;
1260  // heScale = 135.0;
1261  nEVT=0;
1262  nEVT_failL1=0;
1263  nTRK=0;
1264 
1265  genPartPBins_ = { { 0.0, 1.0, 2.0, 3.0, 4.0,
1266  5.0, 6.0, 7.0, 8.0, 9.0,
1267  10.0, 12.0, 15.0, 20.0, 25.0,
1268  30.0, 40.0, 50.0, 60.0, 70.0,
1269  80.0, 100.0} };
1270 
1271 
1272  genPartEtaBins = { {0.0, 0.5, 1.1, 1.7, 2.0} };
1273 
1274  t_v_hnNearTRKs = std::make_unique<std::vector<std::vector<int> > >();
1275  t_v_hnLayers_maxNearP = std::make_unique<std::vector<std::vector<int> > >();
1276  t_v_htrkQual_maxNearP = std::make_unique<std::vector<std::vector<int> > >();
1277  t_v_hmaxNearP_goodTrk = std::make_unique<std::vector<std::vector<double> > >();
1278  t_v_hmaxNearP = std::make_unique<std::vector<std::vector<double> > >();
1279 
1280  t_v_cone_hnNearTRKs = std::make_unique<std::vector<std::vector<int> > >();
1281  t_v_cone_hnLayers_maxNearP = std::make_unique<std::vector<std::vector<int> > >();
1282  t_v_cone_htrkQual_maxNearP = std::make_unique<std::vector<std::vector<int> > > ();
1283  t_v_cone_hmaxNearP_goodTrk = std::make_unique<std::vector<std::vector<double> > >();
1284  t_v_cone_hmaxNearP = std::make_unique<std::vector<std::vector<double> > >();
1285 
1286  // t_hScale = std::make_unique<std::vector<double> >();
1287  t_trkNOuterHits = std::make_unique<std::vector<double> >();
1288  t_trkNLayersCrossed = std::make_unique<std::vector<double> >();
1289  t_dtFromLeadJet = std::make_unique<std::vector<double> >();
1290  t_trkP = std::make_unique<std::vector<double> >();
1291  t_trkPt = std::make_unique<std::vector<double> >();
1292  t_trkEta = std::make_unique<std::vector<double> >();
1293  t_trkPhi = std::make_unique<std::vector<double> >();
1294 
1295  t_e3x3 = std::make_unique<std::vector<double> >();
1296  t_v_eDR = std::make_unique<std::vector<std::vector<double> > >();
1297  t_v_eMipDR = std::make_unique<std::vector<std::vector<double> > >();
1298 
1299  t_h3x3 = std::make_unique<std::vector<double> >();
1300  t_h5x5 = std::make_unique<std::vector<double> >();
1301 
1302  t_nRH_h3x3 = std::make_unique<std::vector<double> >();
1303  t_nRH_h5x5 = std::make_unique<std::vector<double> >();
1304 
1305  if (doMC_) {
1306  t_simP = std::make_unique<std::vector<double> >();
1307  t_hsim3x3 = std::make_unique<std::vector<double> >();
1308  t_hsim5x5 = std::make_unique<std::vector<double> >();
1309 
1310  t_hsim3x3Matched = std::make_unique<std::vector<double> >();
1311  t_hsim5x5Matched = std::make_unique<std::vector<double> >();
1312  t_hsim3x3Rest = std::make_unique<std::vector<double> >();
1313  t_hsim5x5Rest = std::make_unique<std::vector<double> >();
1314  t_hsim3x3Photon = std::make_unique<std::vector<double> >();
1315  t_hsim5x5Photon = std::make_unique<std::vector<double> >();
1316  t_hsim3x3NeutHad = std::make_unique<std::vector<double> >();
1317  t_hsim5x5NeutHad = std::make_unique<std::vector<double> >();
1318  t_hsim3x3CharHad = std::make_unique<std::vector<double> >();
1319  t_hsim5x5CharHad = std::make_unique<std::vector<double> >();
1320  t_hsim3x3PdgMatched = std::make_unique<std::vector<double> >();
1321  t_hsim5x5PdgMatched = std::make_unique<std::vector<double> >();
1322  t_hsim3x3Total = std::make_unique<std::vector<double> >();
1323  t_hsim5x5Total = std::make_unique<std::vector<double> >();
1324 
1325  t_hsim3x3NMatched = std::make_unique<std::vector<int> >();
1326  t_hsim3x3NTotal = std::make_unique<std::vector<int> >();
1327  t_hsim3x3NNeutHad = std::make_unique<std::vector<int> >();
1328  t_hsim3x3NCharHad = std::make_unique<std::vector<int> >();
1329  t_hsim3x3NPhoton = std::make_unique<std::vector<int> >();
1330  t_hsim3x3NRest = std::make_unique<std::vector<int> >();
1331 
1332  t_hsim5x5NMatched = std::make_unique<std::vector<int> >();
1333  t_hsim5x5NTotal = std::make_unique<std::vector<int> >();
1334  t_hsim5x5NNeutHad = std::make_unique<std::vector<int> >();
1335  t_hsim5x5NCharHad = std::make_unique<std::vector<int> >();
1336  t_hsim5x5NPhoton = std::make_unique<std::vector<int> >();
1337  t_hsim5x5NRest = std::make_unique<std::vector<int> >();
1338 
1339  t_trkHcalEne = std::make_unique<std::vector<double> >();
1340  t_trkEcalEne = std::make_unique<std::vector<double> >();
1341  }
1342 
1343  t_distFromHotCell_h3x3 = std::make_unique<std::vector<double> >();
1344  t_ietaFromHotCell_h3x3 = std::make_unique<std::vector<int> >();
1345  t_iphiFromHotCell_h3x3 = std::make_unique<std::vector<int> >();
1346  t_distFromHotCell_h5x5 = std::make_unique<std::vector<double> >();
1347  t_ietaFromHotCell_h5x5 = std::make_unique<std::vector<int> >();
1348  t_iphiFromHotCell_h5x5 = std::make_unique<std::vector<int> >();
1349 
1350  if (doMC_) {
1351  t_v_hsimInfoConeMatched = std::make_unique<std::vector<std::vector<double> > >();
1352  t_v_hsimInfoConeRest = std::make_unique<std::vector<std::vector<double> > >();
1353  t_v_hsimInfoConePhoton = std::make_unique<std::vector<std::vector<double> > >();
1354  t_v_hsimInfoConeNeutHad = std::make_unique<std::vector<std::vector<double> > >();
1355  t_v_hsimInfoConeCharHad = std::make_unique<std::vector<std::vector<double> > >();
1356  t_v_hsimInfoConePdgMatched= std::make_unique<std::vector<std::vector<double> > >();
1357  t_v_hsimInfoConeTotal = std::make_unique<std::vector<std::vector<double> > >();
1358 
1359  t_v_hsimInfoConeNMatched = std::make_unique<std::vector<std::vector<int> > >();
1360  t_v_hsimInfoConeNTotal = std::make_unique<std::vector<std::vector<int> > >();
1361  t_v_hsimInfoConeNNeutHad = std::make_unique<std::vector<std::vector<int> > >();
1362  t_v_hsimInfoConeNCharHad = std::make_unique<std::vector<std::vector<int> > >();
1363  t_v_hsimInfoConeNPhoton = std::make_unique<std::vector<std::vector<int> > >();
1364  t_v_hsimInfoConeNRest = std::make_unique<std::vector<std::vector<int> > >();
1365 
1366  t_v_hsimCone = std::make_unique<std::vector<std::vector<double> > >();
1367  }
1368 
1369  t_v_hCone = std::make_unique<std::vector<std::vector<double> > >();
1370  t_v_nRecHitsCone= std::make_unique<std::vector<std::vector<int> > >();
1371  t_v_nSimHitsCone= std::make_unique<std::vector<std::vector<int> > >();
1372 
1373  t_v_distFromHotCell= std::make_unique<std::vector<std::vector<double> > >();
1374  t_v_ietaFromHotCell= std::make_unique<std::vector<std::vector<int> > >();
1375  t_v_iphiFromHotCell= std::make_unique<std::vector<std::vector<int> > >();
1376 
1377  t_v_RH_h3x3_ieta = std::make_unique<std::vector<std::vector<int> > >();
1378  t_v_RH_h3x3_iphi = std::make_unique<std::vector<std::vector<int> > >();
1379  t_v_RH_h3x3_ene = std::make_unique<std::vector<std::vector<double> > >();
1380  t_v_RH_h5x5_ieta = std::make_unique<std::vector<std::vector<int> > >();
1381  t_v_RH_h5x5_iphi = std::make_unique<std::vector<std::vector<int> > >();
1382  t_v_RH_h5x5_ene = std::make_unique<std::vector<std::vector<double> > >();
1383  t_v_RH_r26_ieta = std::make_unique<std::vector<std::vector<int> > >();
1384  t_v_RH_r26_iphi = std::make_unique<std::vector<std::vector<int> > >();
1385  t_v_RH_r26_ene = std::make_unique<std::vector<std::vector<double> > >();
1386  t_v_RH_r44_ieta = std::make_unique<std::vector<std::vector<int> > >();
1387  t_v_RH_r44_iphi = std::make_unique<std::vector<std::vector<int> > >();
1388  t_v_RH_r44_ene = std::make_unique<std::vector<std::vector<double> > >();
1389 
1390 
1391  t_v_hlTriggers = std::make_unique<std::vector<std::vector<int> > >();
1392 
1393  t_hltHE = std::make_unique<std::vector<int> >();
1394  t_hltHB = std::make_unique<std::vector<int> >();
1395  t_hltL1Jet15 = std::make_unique<std::vector<int> >();
1396  t_hltJet30 = std::make_unique<std::vector<int> >();
1397  t_hltJet50 = std::make_unique<std::vector<int> >();
1398  t_hltJet80 = std::make_unique<std::vector<int> >();
1399  t_hltJet110 = std::make_unique<std::vector<int> >();
1400  t_hltJet140 = std::make_unique<std::vector<int> >();
1401  t_hltJet180 = std::make_unique<std::vector<int> >();
1402  t_hltL1SingleEG5 = std::make_unique<std::vector<int> >();
1403  t_hltZeroBias = std::make_unique<std::vector<int> >();
1404  t_hltMinBiasHcal = std::make_unique<std::vector<int> >();
1405  t_hltMinBiasEcal = std::make_unique<std::vector<int> >();
1406  t_hltMinBiasPixel = std::make_unique<std::vector<int> >();
1407  t_hltSingleIsoTau30_Trk5 = std::make_unique<std::vector<int> >();
1408  t_hltDoubleLooseIsoTau15_Trk5 = std::make_unique<std::vector<int> >();
1409 
1410 
1411  t_irun = std::make_unique<std::vector<unsigned int> >();
1412  t_ievt = std::make_unique<std::vector<unsigned int> >();
1413  t_ilum = std::make_unique<std::vector<unsigned int> >();
1414 
1415  buildTree();
1416 }
1417 
1419 
1420  t_v_hnNearTRKs ->clear();
1421  t_v_hnLayers_maxNearP ->clear();
1422  t_v_htrkQual_maxNearP ->clear();
1423  t_v_hmaxNearP_goodTrk ->clear();
1424  t_v_hmaxNearP ->clear();
1425 
1426  t_v_cone_hnNearTRKs ->clear();
1427  t_v_cone_hnLayers_maxNearP ->clear();
1428  t_v_cone_htrkQual_maxNearP ->clear();
1429  t_v_cone_hmaxNearP_goodTrk ->clear();
1430  t_v_cone_hmaxNearP ->clear();
1431 
1432  // t_hScale ->clear();
1433  t_trkNOuterHits ->clear();
1434  t_trkNLayersCrossed ->clear();
1435  t_dtFromLeadJet ->clear();
1436  t_trkP ->clear();
1437  t_trkPt ->clear();
1438  t_trkEta ->clear();
1439  t_trkPhi ->clear();
1440  t_e3x3 ->clear();
1441  t_v_eDR ->clear();
1442  t_v_eMipDR ->clear();
1443  t_h3x3 ->clear();
1444  t_h5x5 ->clear();
1445  t_nRH_h3x3 ->clear();
1446  t_nRH_h5x5 ->clear();
1447 
1448  if (doMC_) {
1449  t_simP ->clear();
1450  t_hsim3x3 ->clear();
1451  t_hsim5x5 ->clear();
1452  t_hsim3x3Matched ->clear();
1453  t_hsim5x5Matched ->clear();
1454  t_hsim3x3Rest ->clear();
1455  t_hsim5x5Rest ->clear();
1456  t_hsim3x3Photon ->clear();
1457  t_hsim5x5Photon ->clear();
1458  t_hsim3x3NeutHad ->clear();
1459  t_hsim5x5NeutHad ->clear();
1460  t_hsim3x3CharHad ->clear();
1461  t_hsim5x5CharHad ->clear();
1462  t_hsim3x3PdgMatched ->clear();
1463  t_hsim5x5PdgMatched ->clear();
1464  t_hsim3x3Total ->clear();
1465  t_hsim5x5Total ->clear();
1466 
1467  t_hsim3x3NMatched ->clear();
1468  t_hsim3x3NTotal ->clear();
1469  t_hsim3x3NNeutHad ->clear();
1470  t_hsim3x3NCharHad ->clear();
1471  t_hsim3x3NPhoton ->clear();
1472  t_hsim3x3NRest ->clear();
1473 
1474  t_hsim5x5NMatched ->clear();
1475  t_hsim5x5NTotal ->clear();
1476  t_hsim5x5NNeutHad ->clear();
1477  t_hsim5x5NCharHad ->clear();
1478  t_hsim5x5NPhoton ->clear();
1479  t_hsim5x5NRest ->clear();
1480 
1481  t_trkHcalEne ->clear();
1482  t_trkEcalEne ->clear();
1483  }
1484 
1485  t_distFromHotCell_h3x3 ->clear();
1486  t_ietaFromHotCell_h3x3 ->clear();
1487  t_iphiFromHotCell_h3x3 ->clear();
1488  t_distFromHotCell_h5x5 ->clear();
1489  t_ietaFromHotCell_h5x5 ->clear();
1490  t_iphiFromHotCell_h5x5 ->clear();
1491 
1492  if (doMC_) {
1493  t_v_hsimInfoConeMatched ->clear();
1494  t_v_hsimInfoConeRest ->clear();
1495  t_v_hsimInfoConePhoton ->clear();
1496  t_v_hsimInfoConeNeutHad ->clear();
1497  t_v_hsimInfoConeCharHad ->clear();
1498  t_v_hsimInfoConePdgMatched->clear();
1499  t_v_hsimInfoConeTotal ->clear();
1500 
1501  t_v_hsimInfoConeNMatched ->clear();
1502  t_v_hsimInfoConeNRest ->clear();
1503  t_v_hsimInfoConeNPhoton ->clear();
1504  t_v_hsimInfoConeNNeutHad ->clear();
1505  t_v_hsimInfoConeNCharHad ->clear();
1506  t_v_hsimInfoConeNTotal ->clear();
1507 
1508  t_v_hsimCone ->clear();
1509  }
1510 
1511  t_v_hCone ->clear();
1512  t_v_nRecHitsCone->clear();
1513  t_v_nSimHitsCone->clear();
1514 
1515  t_v_distFromHotCell->clear();
1516  t_v_ietaFromHotCell->clear();
1517  t_v_iphiFromHotCell->clear();
1518 
1519  t_v_RH_h3x3_ieta ->clear();
1520  t_v_RH_h3x3_iphi ->clear();
1521  t_v_RH_h3x3_ene ->clear();
1522  t_v_RH_h5x5_ieta ->clear();
1523  t_v_RH_h5x5_iphi ->clear();
1524  t_v_RH_h5x5_ene ->clear();
1525  t_v_RH_r26_ieta ->clear();
1526  t_v_RH_r26_iphi ->clear();
1527  t_v_RH_r26_ene ->clear();
1528  t_v_RH_r44_ieta ->clear();
1529  t_v_RH_r44_iphi ->clear();
1530  t_v_RH_r44_ene ->clear();
1531 
1532  t_v_hlTriggers ->clear();
1533  t_hltHB->clear();
1534  t_hltHE->clear();
1535  t_hltL1Jet15 ->clear();
1536  t_hltJet30 ->clear();
1537  t_hltJet50 ->clear();
1538  t_hltJet80 ->clear();
1539  t_hltJet110 ->clear();
1540  t_hltJet140 ->clear();
1541  t_hltJet180 ->clear();
1542  t_hltL1SingleEG5 ->clear();
1543  t_hltZeroBias ->clear();
1544  t_hltMinBiasHcal ->clear();
1545  t_hltMinBiasEcal ->clear();
1546  t_hltMinBiasPixel ->clear();
1547  t_hltSingleIsoTau30_Trk5 ->clear();
1549 
1550  t_irun->clear();
1551  t_ievt->clear();
1552  t_ilum->clear();
1553 }
1554 
1555 // ----- method called once each job just after ending the event loop ----
1557 
1558  edm::LogVerbatim("IsoTrack") << "Number of Events Processed " << nEVT
1559  << " failed L1 " << nEVT_failL1;
1560 
1561 }
1562 
1563 
1565 
1567  h_RawPt = fs->make<TH1F>("hRawPt", "hRawPt", 100, 0.0, 100.0);
1568  h_RawP = fs->make<TH1F>("hRawP", "hRawP", 100, 0.0, 100.0);
1569  h_RawEta = fs->make<TH1F>("hRawEta", "hRawEta", 15, 0.0, 3.0);
1570  h_RawPhi = fs->make<TH1F>("hRawPhi", "hRawPhi", 100, -3.2, 3.2);
1571 
1572  ntp_ = fs->make<TTree>("ntp", "ntp");
1573 
1574  // Counters
1575  ntp_->Branch("nEVT" , &nEVT , "nEVT/I" );
1576  ntp_->Branch("leadL1JetPT" , &leadL1JetPT , "leadL1JetPT/D");
1577  ntp_->Branch("leadL1JetEta", &leadL1JetEta, "leadL1JetEta/D");
1578  ntp_->Branch("leadL1JetPhi", &leadL1JetPhi, "leadL1JetPhi/D");
1579  ntp_->Branch("nTRK", &nTRK, "nTRK/I");
1580  ntp_->Branch("nRawTRK" , &nRawTRK ,"nRawTRK/I");
1581  ntp_->Branch("nFailHighPurityQaul", &nFailHighPurityQaul,"nFailHighPurityQaul/I");
1582  ntp_->Branch("nFailPt" , &nFailPt ,"nFailPt/I");
1583  ntp_->Branch("nFailEta" , &nFailEta ,"nFailEta/I");
1584  ntp_->Branch("nMissEcal" , &nMissEcal ,"nMissEcal/I");
1585  ntp_->Branch("nMissHcal" , &nMissHcal ,"nMissHcal/I");
1586 
1587  ntp_->Branch("hnNearTRKs" ,"std::vector<std::vector<int> > ",&t_v_hnNearTRKs );
1588  ntp_->Branch("hnLayers_maxNearP" ,"std::vector<std::vector<int> > ",&t_v_hnLayers_maxNearP );
1589  ntp_->Branch("htrkQual_maxNearP" ,"std::vector<std::vector<int> > ",&t_v_htrkQual_maxNearP );
1590  ntp_->Branch("hmaxNearP_goodTrk" ,"std::vector<std::vector<double> >",&t_v_hmaxNearP_goodTrk );
1591  ntp_->Branch("hmaxNearP" ,"std::vector<std::vector<double> >",&t_v_hmaxNearP );
1592 
1593  ntp_->Branch("cone_hnNearTRKs" ,"std::vector<std::vector<int> > ",&t_v_cone_hnNearTRKs );
1594  ntp_->Branch("cone_hnLayers_maxNearP","std::vector<std::vector<int> > ",&t_v_cone_hnLayers_maxNearP);
1595  ntp_->Branch("cone_htrkQual_maxNearP","std::vector<std::vector<int> > ",&t_v_cone_htrkQual_maxNearP);
1596  ntp_->Branch("cone_hmaxNearP_goodTrk","std::vector<std::vector<double> >",&t_v_cone_hmaxNearP_goodTrk);
1597  ntp_->Branch("cone_hmaxNearP" ,"std::vector<std::vector<double> >",&t_v_cone_hmaxNearP );
1598 
1599 //ntp_->Branch("hScale" , "std::vector<double>", &t_hScale );
1600  ntp_->Branch("trkNOuterHits" , "std::vector<double>", &t_trkNOuterHits );
1601  ntp_->Branch("trkNLayersCrossed", "std::vector<double>", &t_trkNLayersCrossed);
1602  ntp_->Branch("drFromLeadJet" , "std::vector<double>", &t_dtFromLeadJet );
1603  ntp_->Branch("trkP" , "std::vector<double>", &t_trkP );
1604  ntp_->Branch("trkPt" , "std::vector<double>", &t_trkPt );
1605  ntp_->Branch("trkEta" , "std::vector<double>", &t_trkEta );
1606  ntp_->Branch("trkPhi" , "std::vector<double>", &t_trkPhi );
1607  ntp_->Branch("e3x3" , "std::vector<double>", &t_e3x3 );
1608 
1609  ntp_->Branch("e3x3" , "std::vector<double>" , &t_e3x3);
1610  ntp_->Branch("v_eDR" , "std::vector<std::vector<double> >", &t_v_eDR);
1611  ntp_->Branch("v_eMipDR" , "std::vector<std::vector<double> >", &t_v_eMipDR);
1612 
1613  ntp_->Branch("h3x3" , "std::vector<double>", &t_h3x3);
1614  ntp_->Branch("h5x5" , "std::vector<double>", &t_h5x5);
1615  ntp_->Branch("nRH_h3x3" , "std::vector<double>", &t_nRH_h3x3);
1616  ntp_->Branch("nRH_h5x5" , "std::vector<double>", &t_nRH_h5x5);
1617 
1618  if (doMC_) {
1619  ntp_->Branch("simP" , "std::vector<double>", &t_simP);
1620  ntp_->Branch("hsim3x3" , "std::vector<double>", &t_hsim3x3);
1621  ntp_->Branch("hsim5x5" , "std::vector<double>", &t_hsim5x5);
1622 
1623  ntp_->Branch("hsim3x3Matched" , "std::vector<double>", &t_hsim3x3Matched);
1624  ntp_->Branch("hsim5x5Matched" , "std::vector<double>", &t_hsim5x5Matched);
1625  ntp_->Branch("hsim3x3Rest" , "std::vector<double>", &t_hsim3x3Rest);
1626  ntp_->Branch("hsim5x5Rest" , "std::vector<double>", &t_hsim5x5Rest);
1627  ntp_->Branch("hsim3x3Photon" , "std::vector<double>", &t_hsim3x3Photon);
1628  ntp_->Branch("hsim5x5Photon" , "std::vector<double>", &t_hsim5x5Photon);
1629  ntp_->Branch("hsim3x3NeutHad" , "std::vector<double>", &t_hsim3x3NeutHad);
1630  ntp_->Branch("hsim5x5NeutHad" , "std::vector<double>", &t_hsim5x5NeutHad);
1631  ntp_->Branch("hsim3x3CharHad" , "std::vector<double>", &t_hsim3x3CharHad);
1632  ntp_->Branch("hsim5x5CharHad" , "std::vector<double>", &t_hsim5x5CharHad);
1633  ntp_->Branch("hsim3x3PdgMatched", "std::vector<double>", &t_hsim3x3PdgMatched);
1634  ntp_->Branch("hsim5x5PdgMatched", "std::vector<double>", &t_hsim5x5PdgMatched);
1635  ntp_->Branch("hsim3x3Total" , "std::vector<double>", &t_hsim3x3Total);
1636  ntp_->Branch("hsim5x5Total" , "std::vector<double>", &t_hsim5x5Total);
1637 
1638  ntp_->Branch("hsim3x3NMatched" , "std::vector<int>", &t_hsim3x3NMatched);
1639  ntp_->Branch("hsim3x3NRest" , "std::vector<int>", &t_hsim3x3NRest);
1640  ntp_->Branch("hsim3x3NPhoton" , "std::vector<int>", &t_hsim3x3NPhoton);
1641  ntp_->Branch("hsim3x3NNeutHad" , "std::vector<int>", &t_hsim3x3NNeutHad);
1642  ntp_->Branch("hsim3x3NCharHad" , "std::vector<int>", &t_hsim3x3NCharHad);
1643  ntp_->Branch("hsim3x3NTotal" , "std::vector<int>", &t_hsim3x3NTotal);
1644 
1645  ntp_->Branch("hsim5x5NMatched" , "std::vector<int>", &t_hsim5x5NMatched);
1646  ntp_->Branch("hsim5x5NRest" , "std::vector<int>", &t_hsim5x5NRest);
1647  ntp_->Branch("hsim5x5NPhoton" , "std::vector<int>", &t_hsim5x5NPhoton);
1648  ntp_->Branch("hsim5x5NNeutHad" , "std::vector<int>", &t_hsim5x5NNeutHad);
1649  ntp_->Branch("hsim5x5NCharHad" , "std::vector<int>", &t_hsim5x5NCharHad);
1650  ntp_->Branch("hsim5x5NTotal" , "std::vector<int>", &t_hsim5x5NTotal);
1651 
1652  ntp_->Branch("trkHcalEne" , "std::vector<double>", &t_trkHcalEne);
1653  ntp_->Branch("trkEcalEne" , "std::vector<double>", &t_trkEcalEne);
1654  }
1655 
1656  ntp_->Branch("distFromHotCell_h3x3", "std::vector<double>", &t_distFromHotCell_h3x3);
1657  ntp_->Branch("ietaFromHotCell_h3x3", "std::vector<int>", &t_ietaFromHotCell_h3x3);
1658  ntp_->Branch("iphiFromHotCell_h3x3", "std::vector<int>", &t_iphiFromHotCell_h3x3);
1659  ntp_->Branch("distFromHotCell_h5x5", "std::vector<double>", &t_distFromHotCell_h5x5);
1660  ntp_->Branch("ietaFromHotCell_h5x5", "std::vector<int>", &t_ietaFromHotCell_h5x5);
1661  ntp_->Branch("iphiFromHotCell_h5x5", "std::vector<int>", &t_iphiFromHotCell_h5x5);
1662 
1663  if (doMC_) {
1664  ntp_->Branch("v_hsimInfoConeMatched" ,"std::vector<std::vector<double> >",&t_v_hsimInfoConeMatched);
1665  ntp_->Branch("v_hsimInfoConeRest" ,"std::vector<std::vector<double> >",&t_v_hsimInfoConeRest);
1666  ntp_->Branch("v_hsimInfoConePhoton" ,"std::vector<std::vector<double> >",&t_v_hsimInfoConePhoton);
1667  ntp_->Branch("v_hsimInfoConeNeutHad" ,"std::vector<std::vector<double> >",&t_v_hsimInfoConeNeutHad);
1668  ntp_->Branch("v_hsimInfoConeCharHad" ,"std::vector<std::vector<double> >",&t_v_hsimInfoConeCharHad);
1669  ntp_->Branch("v_hsimInfoConePdgMatched","std::vector<std::vector<double> >",&t_v_hsimInfoConePdgMatched);
1670  ntp_->Branch("v_hsimInfoConeTotal" ,"std::vector<std::vector<double> >",&t_v_hsimInfoConeTotal);
1671 
1672  ntp_->Branch("v_hsimInfoConeNMatched" ,"std::vector<std::vector<int> >" ,&t_v_hsimInfoConeNMatched );
1673  ntp_->Branch("v_hsimInfoConeNRest" ,"std::vector<std::vector<int> >" ,&t_v_hsimInfoConeNRest );
1674  ntp_->Branch("v_hsimInfoConeNPhoton" ,"std::vector<std::vector<int> >" ,&t_v_hsimInfoConeNPhoton );
1675  ntp_->Branch("v_hsimInfoConeNNeutHad" ,"std::vector<std::vector<int> >" ,&t_v_hsimInfoConeNNeutHad );
1676  ntp_->Branch("v_hsimInfoConeNCharHad" ,"std::vector<std::vector<int> >" ,&t_v_hsimInfoConeNCharHad );
1677  ntp_->Branch("v_hsimInfoConeNTotal" ,"std::vector<std::vector<int> >" ,&t_v_hsimInfoConeNTotal );
1678 
1679  ntp_->Branch("v_hsimCone" ,"std::vector<std::vector<double> >",&t_v_hsimCone );
1680  }
1681 
1682  ntp_->Branch("v_hCone" ,"std::vector<std::vector<double> >",&t_v_hCone );
1683  ntp_->Branch("v_nRecHitsCone" ,"std::vector<std::vector<int> >" ,&t_v_nRecHitsCone);
1684  ntp_->Branch("v_nSimHitsCone" ,"std::vector<std::vector<int> >" ,&t_v_nSimHitsCone);
1685 
1686  ntp_->Branch("v_distFromHotCell", "std::vector<std::vector<double> >",&t_v_distFromHotCell);
1687  ntp_->Branch("v_ietaFromHotCell", "std::vector<std::vector<int> >", &t_v_ietaFromHotCell);
1688  ntp_->Branch("v_iphiFromHotCell", "std::vector<std::vector<int> >", &t_v_iphiFromHotCell );
1689 
1690  ntp_->Branch("v_RH_h3x3_ieta", "std::vector<std::vector<int> >" ,&t_v_RH_h3x3_ieta);
1691  ntp_->Branch("v_RH_h3x3_iphi", "std::vector<std::vector<int> >" ,&t_v_RH_h3x3_iphi);
1692  ntp_->Branch("v_RH_h3x3_ene", "std::vector<std::vector<double> >",&t_v_RH_h3x3_ene);
1693  ntp_->Branch("v_RH_h5x5_ieta", "std::vector<std::vector<int> >" ,&t_v_RH_h5x5_ieta);
1694  ntp_->Branch("v_RH_h5x5_iphi", "std::vector<std::vector<int> >" ,&t_v_RH_h5x5_iphi);
1695  ntp_->Branch("v_RH_h5x5_ene", "std::vector<std::vector<double> >",&t_v_RH_h5x5_ene);
1696  ntp_->Branch("v_RH_r26_ieta", "std::vector<std::vector<int> >" ,&t_v_RH_r26_ieta);
1697  ntp_->Branch("v_RH_r26_iphi", "std::vector<std::vector<int> >" ,&t_v_RH_r26_iphi);
1698  ntp_->Branch("v_RH_r26_ene", "std::vector<std::vector<double> >",&t_v_RH_r26_ene );
1699  ntp_->Branch("v_RH_r44_ieta", "std::vector<std::vector<int> >" ,&t_v_RH_r44_ieta);
1700  ntp_->Branch("v_RH_r44_iphi", "std::vector<std::vector<int> >" ,&t_v_RH_r44_iphi);
1701  ntp_->Branch("v_RH_r44_ene", "std::vector<std::vector<double> >",&t_v_RH_r44_ene );
1702 
1703  ntp_->Branch("v_hlTriggers","std::vector<std::vector<int> >",&t_v_hlTriggers);
1704  ntp_->Branch("v_hltHB", "std::vector<int>", &t_hltHB);
1705  ntp_->Branch("v_hltHE", "std::vector<int>", &t_hltHE);
1706  ntp_->Branch("v_hltL1Jet15", "std::vector<int>", &t_hltL1Jet15);
1707  ntp_->Branch("v_hltJet30", "std::vector<int>", &t_hltJet30);
1708  ntp_->Branch("v_hltJet50", "std::vector<int>", &t_hltJet50);
1709  ntp_->Branch("v_hltJet80", "std::vector<int>", &t_hltJet80);
1710  ntp_->Branch("v_hltJet110", "std::vector<int>", &t_hltJet110);
1711  ntp_->Branch("v_hltJet140", "std::vector<int>", &t_hltJet140);
1712  ntp_->Branch("v_hltJet180", "std::vector<int>", &t_hltJet180);
1713  ntp_->Branch("v_hltL1SingleEG5", "std::vector<int>", &t_hltL1SingleEG5);
1714  ntp_->Branch("v_hltZeroBias", "std::vector<int>", &t_hltZeroBias);
1715  ntp_->Branch("v_hltMinBiasHcal", "std::vector<int>", &t_hltMinBiasHcal);
1716  ntp_->Branch("v_hltMinBiasEcal", "std::vector<int>", &t_hltMinBiasEcal);
1717  ntp_->Branch("v_hltMinBiasPixel","std::vector<int>", &t_hltMinBiasPixel);
1718  ntp_->Branch("v_hltSingleIsoTau30_Trk5", "std::vector<int>", &t_hltSingleIsoTau30_Trk5);
1719  ntp_->Branch("v_hltDoubleLooseIsoTau15_Trk5", "std::vector<int>", &t_hltDoubleLooseIsoTau15_Trk5);
1720 
1721  ntp_->Branch("irun", "std::vector<unsigned int>", &t_irun);
1722  ntp_->Branch("ievt", "std::vector<unsigned int>", &t_ievt);
1723  ntp_->Branch("ilum", "std::vector<unsigned int>", &t_ilum);
1724 
1725 }
1726 
1727 
1729 
1730  std::string theTrackQuality = "highPurity";
1731  reco::TrackBase::TrackQuality trackQuality_ = reco::TrackBase::qualityByName(theTrackQuality);
1732 
1733  edm::LogVerbatim("IsoTrack") << " Reference Point "
1734  << pTrack->referencePoint() <<"\n"
1735  << " TrackMmentum " << pTrack->momentum()
1736  << " (pt,eta,phi)(" << pTrack->pt()
1737  << "," << pTrack->eta() << "," << pTrack->phi()
1738  << ")" << " p " << pTrack->p() << "\n"
1739  << " Normalized chi2 " <<pTrack->normalizedChi2()
1740  <<" charge " << pTrack->charge()
1741  << " qoverp() " << pTrack->qoverp() <<"+-"
1742  << pTrack->qoverpError() << " d0 " <<pTrack->d0()
1743  << "\n" << " NValidHits "
1744  << pTrack->numberOfValidHits() << " NLostHits "
1745  << pTrack->numberOfLostHits() << " TrackQuality "
1746  << pTrack->qualityName(trackQuality_) << " "
1747  << pTrack->quality(trackQuality_);
1748 
1749  if (printTrkHitPattern_) {
1750  const reco::HitPattern& p = pTrack->hitPattern();
1751  for (int i=0; i<p.numberOfAllHits(reco::HitPattern::TRACK_HITS); i++) {
1753  }
1754  }
1755 
1756 }
1757 
1758 double IsolatedTracksCone::deltaPhi(double v1, double v2) {
1759  // Computes the correctly normalized phi difference
1760  // v1, v2 = phi of object 1 and 2
1761  double diff = std::abs(v2 - v1);
1762  double corr = 2.0*M_PI - diff;
1763  return ((diff < M_PI) ? diff : corr);
1764 }
1765 
1766 
1767 double IsolatedTracksCone::deltaR(double eta1, double phi1,
1768  double eta2, double phi2) {
1769  double deta = eta1 - eta2;
1770  double dphi = deltaPhi(phi1, phi2);
1771  return std::sqrt(deta*deta + dphi*dphi);
1772 }
1773 
1774 
1775 //define this as a plug-in
1777 
1778 
RunNumber_t run() const
Definition: EventID.h:39
double qoverp() const
q / p
Definition: TrackBase.h:573
std::unique_ptr< std::vector< int > > t_hltJet30
double p() const
momentum vector magnitude
Definition: TrackBase.h:615
double eCone_hcal(const CaloGeometry *geo, edm::Handle< T > &hits, const GlobalPoint &hpoint1, const GlobalPoint &point1, double dR, const GlobalVector &trackMom, int &nRecHits, double hbThr=-100, double heThr=-100, double hfThr=-100, double hoThr=-100, double tMin=-500, double tMax=500, int detOnly=-1, int useRaw=0, bool debug=false)
std::unique_ptr< std::vector< int > > t_hsim3x3NCharHad
std::unique_ptr< std::vector< double > > t_trkPt
T getParameter(std::string const &) const
const CaloSubdetectorGeometry * getSubdetectorGeometry(const DetId &id) const
access the subdetector geometry for the given subdetector directly
Definition: CaloGeometry.cc:49
EventNumber_t event() const
Definition: EventID.h:41
double coneChargeIsolation(const edm::Event &iEvent, const edm::EventSetup &iSetup, reco::TrackCollection::const_iterator trkItr, edm::Handle< reco::TrackCollection > trkCollection, TrackDetectorAssociator &associator, TrackAssociatorParameters &parameters_, const std::string &theTrackQuality, int &nNearTRKs, int &nLayers_maxNearP, int &trkQual_maxNearP, double &maxNearP_goodTrk, const GlobalPoint &hpoint1, const GlobalVector &trackMom, double dR)
std::array< double, nPBins_+1 > genPartPBins_
std::unique_ptr< std::vector< double > > t_trkPhi
std::unique_ptr< std::vector< double > > t_e3x3
std::unique_ptr< std::vector< double > > t_trkNLayersCrossed
const Point & referencePoint() const
Reference point on the track.
Definition: TrackBase.h:681
std::unique_ptr< std::vector< double > > t_hsim5x5NeutHad
std::unique_ptr< std::vector< int > > t_hltZeroBias
std::unique_ptr< std::vector< int > > t_ietaFromHotCell_h3x3
TrackAssociatorParameters parameters_
std::vector< PCaloHit > PCaloHitContainer
static std::string qualityName(TrackQuality)
Definition: TrackBase.h:532
double getDistInPlaneTrackDir(const GlobalPoint &caloPoint, const GlobalVector &caloVector, const GlobalPoint &rechitPoint, bool debug=false)
Definition: FindDistCone.cc:12
std::unique_ptr< std::vector< int > > t_hltHB
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
std::unique_ptr< std::vector< int > > t_ietaFromHotCell_h5x5
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::unique_ptr< std::vector< std::vector< double > > > t_v_hsimInfoConePhoton
std::unique_ptr< std::vector< double > > t_simP
std::unique_ptr< std::vector< double > > t_hsim3x3NeutHad
std::unique_ptr< std::vector< int > > t_hsim5x5NTotal
ParameterDescriptionBase * addUntracked(U const &iLabel, T const &value)
const edm::EDGetTokenT< edm::SimTrackContainer > tok_simTk_
double d0() const
dxy parameter in perigee convention (d0 = -dxy)
Definition: TrackBase.h:597
const edm::EDGetTokenT< l1extra::L1JetParticleCollection > tok_L1extTauJet_
std::unique_ptr< std::vector< std::vector< int > > > t_v_cone_hnNearTRKs
std::unique_ptr< std::vector< double > > t_hsim5x5Total
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)
std::unique_ptr< std::vector< int > > t_hsim5x5NNeutHad
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:561
std::unique_ptr< std::vector< std::vector< int > > > t_v_hnNearTRKs
const edm::EDGetTokenT< reco::TrackCollection > tok_genTrack_
std::unique_ptr< std::vector< int > > t_hsim3x3NTotal
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:579
TrackQuality
track quality
Definition: TrackBase.h:151
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:17
std::unique_ptr< std::vector< int > > t_hsim5x5NRest
std::unique_ptr< std::vector< double > > t_hsim5x5
std::unique_ptr< std::vector< std::vector< double > > > t_v_RH_h5x5_ene
std::unique_ptr< std::vector< std::vector< double > > > t_v_hsimCone
bool accept() const
Has at least one path accepted the event?
std::unique_ptr< std::vector< double > > t_distFromHotCell_h3x3
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:47
std::vector< Track > TrackCollection
collection of Tracks
Definition: TrackFwd.h:15
std::unique_ptr< std::vector< std::vector< int > > > t_v_htrkQual_maxNearP
void loadParameters(const edm::ParameterSet &, edm::ConsumesCollector &)
std::unique_ptr< std::vector< std::vector< double > > > t_v_cone_hmaxNearP_goodTrk
std::unique_ptr< std::vector< double > > t_hsim5x5Photon
double phi() const
azimuthal angle of momentum vector
Definition: TrackBase.h:645
unsigned short numberOfLostHits() const
number of cases where track crossed a layer without getting a hit.
Definition: TrackBase.h:826
const TrackerHitAssociator::Config trackerHitAssociatorConfig_
std::unique_ptr< std::vector< double > > t_hsim3x3
T * make(const Args &...args) const
make new ROOT object
Definition: TFileService.h:64
std::unique_ptr< std::vector< int > > t_hltHE
std::unique_ptr< std::vector< int > > t_hsim5x5NPhoton
std::unique_ptr< std::vector< int > > t_iphiFromHotCell_h5x5
std::unique_ptr< std::vector< int > > t_hltJet110
const Vector & momentum() const
track momentum vector
Definition: TrackBase.h:675
std::unique_ptr< std::vector< double > > t_hsim5x5Rest
std::unique_ptr< std::vector< int > > t_hsim5x5NMatched
void beginJob() override
std::unique_ptr< std::vector< std::vector< int > > > t_v_hlTriggers
std::unique_ptr< std::vector< std::vector< int > > > t_v_hsimInfoConeNRest
int trackerLayersWithMeasurement() const
Definition: HitPattern.cc:520
std::unique_ptr< std::vector< double > > t_hsim3x3Rest
#define constexpr
std::unique_ptr< std::vector< std::vector< int > > > t_v_RH_h5x5_iphi
std::unique_ptr< std::vector< int > > t_hltMinBiasPixel
math::XYZPoint trkGlobPosAtHcal
std::unique_ptr< std::vector< std::vector< int > > > t_v_RH_r44_iphi
std::unique_ptr< std::vector< double > > t_hsim5x5Matched
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
std::unique_ptr< std::vector< std::vector< double > > > t_v_hmaxNearP
std::unique_ptr< std::vector< int > > t_hltJet50
LuminosityBlockNumber_t luminosityBlock() const
std::unique_ptr< std::vector< int > > t_hltMinBiasHcal
void printHitPattern(HitCategory category, int position, std::ostream &stream) const
Definition: HitPattern.cc:834
std::unique_ptr< std::vector< std::vector< double > > > t_v_hsimInfoConeRest
std::unique_ptr< std::vector< int > > t_iphiFromHotCell_h3x3
std::unique_ptr< std::vector< double > > t_h3x3
int iEvent
Definition: GenABIO.cc:230
std::unique_ptr< std::vector< int > > t_hltDoubleLooseIsoTau15_Trk5
std::unique_ptr< std::vector< std::vector< int > > > t_v_RH_r26_iphi
const edm::EDGetTokenT< edm::PCaloHitContainer > tok_caloEE_
double eta() const
pseudorapidity of momentum vector
Definition: TrackBase.h:651
std::unique_ptr< std::vector< double > > t_dtFromLeadJet
std::unique_ptr< std::vector< std::vector< int > > > t_v_hsimInfoConeNNeutHad
std::unique_ptr< std::vector< std::vector< int > > > t_v_cone_htrkQual_maxNearP
const edm::EDGetTokenT< edm::PCaloHitContainer > tok_caloHH_
std::unique_ptr< std::vector< double > > t_trkNOuterHits
std::unique_ptr< std::vector< std::vector< int > > > t_v_ietaFromHotCell
std::unique_ptr< std::vector< unsigned int > > t_ilum
std::unique_ptr< std::vector< int > > t_hltMinBiasEcal
std::unique_ptr< std::vector< std::vector< double > > > t_v_RH_r26_ene
std::unique_ptr< std::vector< std::vector< int > > > t_v_hnLayers_maxNearP
void analyze(const edm::Event &, const edm::EventSetup &) override
ConsumesCollector consumesCollector()
Use a ConsumesCollector to gather consumes information from helper functions.
T sqrt(T t)
Definition: SSEVec.h:18
unsigned int size() const
Get number of paths stored.
double pt() const
track transverse momentum
Definition: TrackBase.h:621
std::unique_ptr< std::vector< std::vector< int > > > t_v_cone_hnLayers_maxNearP
const edm::EDGetTokenT< edm::SimVertexContainer > tok_simVtx_
std::unique_ptr< std::vector< double > > t_hsim5x5CharHad
std::unique_ptr< std::vector< int > > t_hltL1Jet15
const edm::EDGetTokenT< edm::TriggerResults > tok_trigger_
int numberOfAllHits(HitCategory category) const
Definition: HitPattern.h:808
std::unique_ptr< std::vector< unsigned int > > t_ievt
std::unique_ptr< std::vector< std::vector< double > > > t_v_hsimInfoConeTotal
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
const edm::EDGetTokenT< l1extra::L1JetParticleCollection > tok_L1extFwdJet_
double eCone_ecal(const CaloGeometry *geo, edm::Handle< T > &barrelhits, edm::Handle< T > &endcaphits, const GlobalPoint &hpoint1, const GlobalPoint &point1, double dR, const GlobalVector &trackMom, int &nRecHits, double ebThr=-100, double eeThr=-100, double tMin=-500, double tMax=500, bool debug=false)
LuminosityBlock const & getLuminosityBlock() const
Definition: Event.h:101
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:820
std::unique_ptr< std::vector< double > > t_hsim3x3Photon
std::unique_ptr< std::vector< std::vector< int > > > t_v_nRecHitsCone
static std::string const triggerResults
Definition: EdmProvDump.cc:41
ParameterDescriptionBase * add(U const &iLabel, T const &value)
std::unique_ptr< std::vector< double > > t_hsim3x3Total
bool isValid() const
Definition: HandleBase.h:74
std::unique_ptr< std::vector< std::vector< int > > > t_v_RH_h5x5_ieta
const edm::EDGetTokenT< EcalRecHitCollection > tok_EE_
std::unique_ptr< std::vector< unsigned int > > t_irun
JetCorrectorParameters corr
Definition: classes.h:5
#define M_PI
std::unique_ptr< std::vector< double > > t_nRH_h5x5
double qoverpError() const
error on signed transverse curvature
Definition: TrackBase.h:757
std::unique_ptr< std::vector< std::vector< int > > > t_v_hsimInfoConeNPhoton
virtual DetId getClosestCell(const GlobalPoint &r) const
std::unique_ptr< std::vector< std::vector< double > > > t_v_hsimInfoConeMatched
std::unique_ptr< std::vector< double > > t_hsim5x5PdgMatched
std::unique_ptr< std::vector< double > > t_hsim3x3PdgMatched
std::unique_ptr< std::vector< std::vector< int > > > t_v_RH_r44_ieta
Definition: DetId.h:18
static TrackQuality qualityByName(const std::string &name)
Definition: TrackBase.cc:125
std::unique_ptr< std::vector< std::vector< int > > > t_v_nSimHitsCone
std::unique_ptr< std::vector< int > > t_hltL1SingleEG5
T const * product() const
Definition: Handle.h:81
std::unique_ptr< std::vector< int > > t_hltJet180
GlobalVector trkMomAtEcal
std::unique_ptr< std::vector< double > > t_hsim3x3CharHad
const HitPattern & hitPattern() const
Access the hit pattern, indicating in which Tracker layers the track has hits.
Definition: TrackBase.h:446
std::string const & triggerName(unsigned int index) const
Definition: TriggerNames.cc:27
std::unique_ptr< std::vector< std::vector< double > > > t_v_hsimInfoConeCharHad
std::unique_ptr< std::vector< std::vector< double > > > t_v_hsimInfoConeNeutHad
std::vector< SimVertex > SimVertexContainer
IsolatedTracksCone(const edm::ParameterSet &)
std::unique_ptr< std::vector< std::vector< int > > > t_v_hsimInfoConeNMatched
std::unique_ptr< std::vector< double > > t_distFromHotCell_h5x5
void add(std::string const &label, ParameterSetDescription const &psetDescription)
std::unique_ptr< std::vector< double > > t_trkHcalEne
const edm::EDGetTokenT< EcalRecHitCollection > tok_EB_
std::unique_ptr< std::vector< std::vector< int > > > t_v_RH_h3x3_ieta
bool quality(const TrackQuality) const
Track quality.
Definition: TrackBase.h:510
std::array< double, nEtaBins_+1 > genPartEtaBins
std::unique_ptr< std::vector< std::vector< double > > > t_v_distFromHotCell
std::unique_ptr< std::vector< std::vector< double > > > t_v_hCone
std::unique_ptr< std::vector< std::vector< int > > > t_v_RH_r26_ieta
std::unique_ptr< std::vector< std::vector< double > > > t_v_eDR
GlobalVector trkMomAtHcal
const edm::EDGetTokenT< l1extra::L1JetParticleCollection > tok_L1extCenJet_
std::unique_ptr< std::vector< double > > t_hsim3x3Matched
std::unique_ptr< std::vector< double > > t_trkEcalEne
std::unique_ptr< std::vector< std::vector< int > > > t_v_iphiFromHotCell
edm::EventID id() const
Definition: EventBase.h:60
double deltaPhi(double v1, double v2)
fixed size matrix
std::unique_ptr< std::vector< int > > t_hsim3x3NPhoton
HLT enums.
double p1[4]
Definition: TauolaWrapper.h:89
T get() const
Definition: EventSetup.h:63
std::unique_ptr< std::vector< std::vector< int > > > t_v_hsimInfoConeNCharHad
std::unique_ptr< std::vector< double > > t_nRH_h3x3
std::unique_ptr< std::vector< int > > t_hsim3x3NRest
std::unique_ptr< std::vector< std::vector< int > > > t_v_hsimInfoConeNTotal
void printTrack(const reco::Track *pTrack)
math::XYZPoint trkGlobPosAtEcal
Track position at different parts of the calorimeter.
int charge() const
track electric charge
Definition: TrackBase.h:567
std::unique_ptr< std::vector< std::vector< int > > > t_v_RH_h3x3_iphi
std::unique_ptr< std::vector< double > > t_h5x5
std::unique_ptr< std::vector< int > > t_hltJet80
std::unique_ptr< std::vector< double > > t_trkEta
double deltaR(double eta1, double phi1, double eta2, double phi2)
std::unique_ptr< std::vector< std::vector< double > > > t_v_eMipDR
std::unique_ptr< std::vector< int > > t_hsim3x3NNeutHad
std::unique_ptr< std::vector< double > > t_trkP
T const * product() const
Definition: ESHandle.h:86
std::vector< SimTrack > SimTrackContainer
const edm::EDGetTokenT< edm::PCaloHitContainer > tok_caloEB_
std::unique_ptr< std::vector< int > > t_hltSingleIsoTau30_Trk5
std::unique_ptr< std::vector< int > > t_hltJet140
std::unique_ptr< std::vector< std::vector< double > > > t_v_RH_h3x3_ene
edm::TriggerNames const & triggerNames(edm::TriggerResults const &triggerResults) const override
Definition: Event.cc:301
std::unique_ptr< std::vector< std::vector< double > > > t_v_hmaxNearP_goodTrk
std::unique_ptr< std::vector< int > > t_hsim5x5NCharHad
std::unique_ptr< std::vector< int > > t_hsim3x3NMatched
std::unique_ptr< std::vector< std::vector< double > > > t_v_cone_hmaxNearP
std::unique_ptr< TrackDetectorAssociator > trackAssociator_
const edm::EDGetTokenT< HBHERecHitCollection > tok_hbhe_
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)
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)
std::unique_ptr< std::vector< std::vector< double > > > t_v_RH_r44_ene
std::unique_ptr< std::vector< std::vector< double > > > t_v_hsimInfoConePdgMatched