test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
EgammaHLTTrackIsolation.h
Go to the documentation of this file.
1 #ifndef EgammaHLTAlgos_EgammaHLTTrackIsolation_h
2 #define EgammaHLTAlgos_EgammaHLTTrackIsolation_h
3 // -*- C++ -*-
4 //
5 // Package: EgammaHLTAlgos
6 // Class : EgammaHLTTrackIsolation
7 //
15 //
16 // Original Author: Monica Vazquez Acosta - CERN
17 // Created: Tue Jun 13 12:19:32 CEST 2006
18 //
19 
20 
29 
31 
35 
40 
41 
42 
44 
45 
46 
48 {
49 
50  public:
51 
52 
53  EgammaHLTTrackIsolation(double egTrkIso_PtMin,
54  double egTrkIso_ConeSize,
55  double egTrkIso_ZSpan,
56  double egTrkIso_RSpan,
57  double egTrkIso_VetoConeSize,
58  double egTrkIso_stripBarrel=0,
59  double egTrkIso_stripEndcap=0) :
60  ptMin(egTrkIso_PtMin),
61  conesize(egTrkIso_ConeSize),
62  zspan(egTrkIso_ZSpan),
63  rspan(egTrkIso_RSpan),
64  vetoConesize(egTrkIso_VetoConeSize),
65  stripBarrel(egTrkIso_stripBarrel),
66  stripEndcap(egTrkIso_stripEndcap)
67  {
68 
69  /*
70  std::cout << "EgammaHLTTrackIsolation instance:"
71  << " ptMin=" << ptMin << " "
72  << " conesize="<< conesize << " "
73  << " zspan=" << zspan << " "
74  << " rspan=" << rspan << " "
75  << " vetoConesize="<< vetoConesize
76  << std::endl;
77  */
78  }
79 
80 
82  std::pair<int,float> electronIsolation(const reco::Track * const tr, const reco::TrackCollection* isoTracks);
83  std::pair<int,float> electronIsolation(const reco::Track * const tr, const reco::ElectronCollection* allEle, const reco::TrackCollection* isoTracks);
84  std::pair<int,float> electronIsolation(const reco::Track * const tr, const reco::TrackCollection* isoTracks, GlobalPoint vertex);
85 
89  std::pair<int,float> photonIsolation(const reco::RecoCandidate * const recocand, const reco::TrackCollection* isoTracks, bool useVertex);
90  std::pair<int,float> photonIsolation(const reco::RecoCandidate * const recocand, const reco::TrackCollection* isoTracks, GlobalPoint vertex);
91  std::pair<int,float> photonIsolation(const reco::RecoCandidate * const recocand, const reco::ElectronCollection* allEle, const reco::TrackCollection* isoTracks);
92 
94  int electronTrackCount(const reco::Track * const tr, const reco::TrackCollection* isoTracks)
95  {return electronIsolation(tr,isoTracks).first;}
96  int electronTrackCount(const reco::Track * const tr, const reco::TrackCollection* isoTracks, GlobalPoint vertex)
97  {return electronIsolation(tr,isoTracks,vertex).first;}
98 
102  int photonTrackCount(const reco::RecoCandidate * const recocand, const reco::TrackCollection* isoTracks, bool useVertex)
103  {return photonIsolation(recocand,isoTracks,useVertex).first;}
104  int photonTrackCount(const reco::RecoCandidate * const recocand, const reco::TrackCollection* isoTracks, GlobalPoint vertex)
105  {return photonIsolation(recocand,isoTracks,vertex).first;}
106  int photonTrackCount(const reco::RecoCandidate * const recocand, const reco::ElectronCollection* allEle, const reco::TrackCollection* isoTracks)
107  {return photonIsolation(recocand,allEle,isoTracks).first;}
108 
110  float electronPtSum(const reco::Track * const tr, const reco::TrackCollection* isoTracks)
111  {return electronIsolation(tr,isoTracks).second;}
112  float electronPtSum(const reco::Track * const tr, const reco::TrackCollection* isoTracks, GlobalPoint vertex)
113  {return electronIsolation(tr,isoTracks,vertex).second;}
114  float electronPtSum(const reco::Track * const tr, const reco::ElectronCollection* allEle ,const reco::TrackCollection* isoTracks)
115  {return electronIsolation(tr,allEle,isoTracks).second;}
116 
120  float photonPtSum(const reco::RecoCandidate * const recocand, const reco::TrackCollection* isoTracks, bool useVertex)
121  {return photonIsolation(recocand,isoTracks, useVertex).second;}
122  float photonPtSum(const reco::RecoCandidate * const recocand, const reco::TrackCollection* isoTracks, GlobalPoint vertex)
123  {return photonIsolation(recocand,isoTracks, vertex).second;}
124  float photonPtSum(const reco::RecoCandidate * const recocand, const reco::ElectronCollection* allEle, const reco::TrackCollection* isoTracks)
125  {return photonIsolation(recocand,allEle,isoTracks).second;}
126 
127 
129  double getPtMin() { return ptMin;}
131  double getConeSize() { return conesize; }
133  double getZspan() {return zspan; }
135  double getRspan() { return rspan; }
137  double getvetoConesize() { return vetoConesize; }
138 
139  private:
140  // Call track reconstruction
141  std::pair<int,float> findIsoTracks(GlobalVector mom, GlobalPoint vtx, const reco::TrackCollection* isoTracks, bool isElectron, bool useVertex=true);
142  std::pair<int,float> findIsoTracksWithoutEle(GlobalVector mom, GlobalPoint vtx, const reco::ElectronCollection* allEle, const reco::TrackCollection* isoTracks);
143 
144  // Parameters of isolation cone geometry.
145  double ptMin;
146  double conesize;
147  double zspan;
148  double rspan;
149  double vetoConesize;
150 
151  //added for inner eta strip veto (I'll keep the violation of CMS naming conventions to be consistant)
152  double stripBarrel;
153  double stripEndcap;
154 
155 
156 
157 };
158 
159 
160 #endif
float photonPtSum(const reco::RecoCandidate *const recocand, const reco::TrackCollection *isoTracks, GlobalPoint vertex)
double getConeSize()
Get isolation cone size.
double getZspan()
Get maximum ivertex z-coordinate spread.
int photonTrackCount(const reco::RecoCandidate *const recocand, const reco::TrackCollection *isoTracks, GlobalPoint vertex)
double getRspan()
Get maximum transverse distance of ivertex from beam line.
std::pair< int, float > electronIsolation(const reco::Track *const tr, const reco::TrackCollection *isoTracks)
Get number of tracks and Pt sum of tracks inside an isolation cone for electrons. ...
std::vector< Track > TrackCollection
collection of Tracks
Definition: TrackFwd.h:14
int electronTrackCount(const reco::Track *const tr, const reco::TrackCollection *isoTracks)
Get number of tracks inside an isolation cone for electrons.
int photonTrackCount(const reco::RecoCandidate *const recocand, const reco::TrackCollection *isoTracks, bool useVertex)
float electronPtSum(const reco::Track *const tr, const reco::ElectronCollection *allEle, const reco::TrackCollection *isoTracks)
int photonTrackCount(const reco::RecoCandidate *const recocand, const reco::ElectronCollection *allEle, const reco::TrackCollection *isoTracks)
bool isElectron(const Candidate &part)
Definition: pdgIdUtils.h:7
float electronPtSum(const reco::Track *const tr, const reco::TrackCollection *isoTracks)
Get Pt sum of tracks inside an isolation cone for electrons.
float photonPtSum(const reco::RecoCandidate *const recocand, const reco::ElectronCollection *allEle, const reco::TrackCollection *isoTracks)
std::vector< Electron > ElectronCollection
collectin of Electron objects
Definition: ElectronFwd.h:9
std::pair< int, float > photonIsolation(const reco::RecoCandidate *const recocand, const reco::TrackCollection *isoTracks, bool useVertex)
EgammaHLTTrackIsolation(double egTrkIso_PtMin, double egTrkIso_ConeSize, double egTrkIso_ZSpan, double egTrkIso_RSpan, double egTrkIso_VetoConeSize, double egTrkIso_stripBarrel=0, double egTrkIso_stripEndcap=0)
std::pair< int, float > findIsoTracks(GlobalVector mom, GlobalPoint vtx, const reco::TrackCollection *isoTracks, bool isElectron, bool useVertex=true)
double getPtMin()
Get pt cut for itracks.
float electronPtSum(const reco::Track *const tr, const reco::TrackCollection *isoTracks, GlobalPoint vertex)
std::pair< int, float > findIsoTracksWithoutEle(GlobalVector mom, GlobalPoint vtx, const reco::ElectronCollection *allEle, const reco::TrackCollection *isoTracks)
double getvetoConesize()
Get veto cone size.
float photonPtSum(const reco::RecoCandidate *const recocand, const reco::TrackCollection *isoTracks, bool useVertex)
int electronTrackCount(const reco::Track *const tr, const reco::TrackCollection *isoTracks, GlobalPoint vertex)