CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes
EgammaHLTTrackIsolation Class Reference

#include <RecoEgamma/EgammaHLTAlgos/interface/EgammaHLTTrackIsolation.h>

Public Member Functions

 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 > 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. More...
 
std::pair< int, float > electronIsolation (const reco::Track *const tr, const reco::ElectronCollection *allEle, const reco::TrackCollection *isoTracks)
 
std::pair< int, float > electronIsolation (const reco::Track *const tr, const reco::TrackCollection *isoTracks, GlobalPoint vertex)
 
float electronPtSum (const reco::Track *const tr, const reco::TrackCollection *isoTracks)
 Get Pt sum of tracks inside an isolation cone for electrons. More...
 
float electronPtSum (const reco::Track *const tr, const reco::TrackCollection *isoTracks, GlobalPoint vertex)
 
float electronPtSum (const reco::Track *const tr, const reco::ElectronCollection *allEle, const reco::TrackCollection *isoTracks)
 
int electronTrackCount (const reco::Track *const tr, const reco::TrackCollection *isoTracks)
 Get number of tracks inside an isolation cone for electrons. More...
 
int electronTrackCount (const reco::Track *const tr, const reco::TrackCollection *isoTracks, GlobalPoint vertex)
 
double getConeSize ()
 Get isolation cone size. More...
 
double getPtMin ()
 Get pt cut for itracks. More...
 
double getRspan ()
 Get maximum transverse distance of ivertex from beam line. More...
 
double getvetoConesize ()
 Get veto cone size. More...
 
double getZspan ()
 Get maximum ivertex z-coordinate spread. More...
 
std::pair< int, float > photonIsolation (const reco::RecoCandidate *const recocand, const reco::TrackCollection *isoTracks, bool useVertex)
 
std::pair< int, float > photonIsolation (const reco::RecoCandidate *const recocand, const reco::TrackCollection *isoTracks, GlobalPoint vertex)
 
std::pair< int, float > photonIsolation (const reco::RecoCandidate *const recocand, const reco::ElectronCollection *allEle, const reco::TrackCollection *isoTracks)
 
float photonPtSum (const reco::RecoCandidate *const recocand, const reco::TrackCollection *isoTracks, bool useVertex)
 
float photonPtSum (const reco::RecoCandidate *const recocand, const reco::TrackCollection *isoTracks, GlobalPoint vertex)
 
float photonPtSum (const reco::RecoCandidate *const recocand, const reco::ElectronCollection *allEle, const reco::TrackCollection *isoTracks)
 
int photonTrackCount (const reco::RecoCandidate *const recocand, const reco::TrackCollection *isoTracks, bool useVertex)
 
int photonTrackCount (const reco::RecoCandidate *const recocand, const reco::TrackCollection *isoTracks, GlobalPoint vertex)
 
int photonTrackCount (const reco::RecoCandidate *const recocand, const reco::ElectronCollection *allEle, const reco::TrackCollection *isoTracks)
 

Private Member Functions

std::pair< int, float > findIsoTracks (GlobalVector mom, GlobalPoint vtx, const reco::TrackCollection *isoTracks, bool isElectron, bool useVertex=true)
 
std::pair< int, float > findIsoTracksWithoutEle (GlobalVector mom, GlobalPoint vtx, const reco::ElectronCollection *allEle, const reco::TrackCollection *isoTracks)
 

Private Attributes

double conesize
 
double ptMin
 
double rspan
 
double stripBarrel
 
double stripEndcap
 
double vetoConesize
 
double zspan
 

Detailed Description

Description: Number of tracks inside an isolation cone, with con geometry defined by ptMin, conesize, rspan and zspan. Usage: <usage>

Definition at line 42 of file EgammaHLTTrackIsolation.h.

Constructor & Destructor Documentation

◆ EgammaHLTTrackIsolation()

EgammaHLTTrackIsolation::EgammaHLTTrackIsolation ( double  egTrkIso_PtMin,
double  egTrkIso_ConeSize,
double  egTrkIso_ZSpan,
double  egTrkIso_RSpan,
double  egTrkIso_VetoConeSize,
double  egTrkIso_stripBarrel = 0,
double  egTrkIso_stripEndcap = 0 
)
inline

Definition at line 44 of file EgammaHLTTrackIsolation.h.

51  : ptMin(egTrkIso_PtMin),
52  conesize(egTrkIso_ConeSize),
53  zspan(egTrkIso_ZSpan),
54  rspan(egTrkIso_RSpan),
55  vetoConesize(egTrkIso_VetoConeSize),
56  stripBarrel(egTrkIso_stripBarrel),
57  stripEndcap(egTrkIso_stripEndcap) {
58  /*
59  std::cout << "EgammaHLTTrackIsolation instance:"
60  << " ptMin=" << ptMin << " "
61  << " conesize="<< conesize << " "
62  << " zspan=" << zspan << " "
63  << " rspan=" << rspan << " "
64  << " vetoConesize="<< vetoConesize
65  << std::endl;
66  */
67  }

Member Function Documentation

◆ electronIsolation() [1/3]

std::pair< int, float > EgammaHLTTrackIsolation::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.

Definition at line 18 of file EgammaHLTTrackIsolation.cc.

References findIsoTracks(), reco::TrackBase::momentum(), AlCaHLTBitMon_ParallelJobs::p, reco::TrackBase::vertex(), and extraflags_cff::vtx.

Referenced by electronPtSum(), and electronTrackCount().

19  {
20  GlobalPoint vtx(0, 0, tr->vertex().z());
21  const reco::Track::Vector& p = tr->momentum();
22  GlobalVector mom(p.x(), p.y(), p.z());
23  return findIsoTracks(mom, vtx, isoTracks, true);
24 }
const Point & vertex() const
reference point on the track. This method is DEPRECATED, please use referencePoint() instead ...
Definition: TrackBase.h:676
std::pair< int, float > findIsoTracks(GlobalVector mom, GlobalPoint vtx, const reco::TrackCollection *isoTracks, bool isElectron, bool useVertex=true)
const Vector & momentum() const
track momentum vector
Definition: TrackBase.h:664
math::XYZVector Vector
spatial vector
Definition: TrackBase.h:77

◆ electronIsolation() [2/3]

std::pair< int, float > EgammaHLTTrackIsolation::electronIsolation ( const reco::Track *const  tr,
const reco::ElectronCollection allEle,
const reco::TrackCollection isoTracks 
)

Definition at line 36 of file EgammaHLTTrackIsolation.cc.

References findIsoTracksWithoutEle(), reco::TrackBase::momentum(), AlCaHLTBitMon_ParallelJobs::p, reco::TrackBase::vertex(), and extraflags_cff::vtx.

38  {
39  GlobalPoint vtx(0, 0, tr->vertex().z());
40  const reco::Track::Vector& p = tr->momentum();
41  GlobalVector mom(p.x(), p.y(), p.z());
42  return findIsoTracksWithoutEle(mom, vtx, allEle, isoTracks);
43 }
const Point & vertex() const
reference point on the track. This method is DEPRECATED, please use referencePoint() instead ...
Definition: TrackBase.h:676
const Vector & momentum() const
track momentum vector
Definition: TrackBase.h:664
std::pair< int, float > findIsoTracksWithoutEle(GlobalVector mom, GlobalPoint vtx, const reco::ElectronCollection *allEle, const reco::TrackCollection *isoTracks)
math::XYZVector Vector
spatial vector
Definition: TrackBase.h:77

◆ electronIsolation() [3/3]

std::pair< int, float > EgammaHLTTrackIsolation::electronIsolation ( const reco::Track *const  tr,
const reco::TrackCollection isoTracks,
GlobalPoint  vertex 
)

Definition at line 26 of file EgammaHLTTrackIsolation.cc.

References findIsoTracks(), reco::TrackBase::momentum(), AlCaHLTBitMon_ParallelJobs::p, extraflags_cff::vtx, and PV3DBase< T, PVType, FrameType >::z().

28  {
29  // Just to insure consistency with no-vertex-code
30  GlobalPoint vtx(0, 0, zvtx.z());
31  const reco::Track::Vector& p = tr->momentum();
32  GlobalVector mom(p.x(), p.y(), p.z());
33  return findIsoTracks(mom, vtx, isoTracks, true);
34 }
std::pair< int, float > findIsoTracks(GlobalVector mom, GlobalPoint vtx, const reco::TrackCollection *isoTracks, bool isElectron, bool useVertex=true)
const Vector & momentum() const
track momentum vector
Definition: TrackBase.h:664
math::XYZVector Vector
spatial vector
Definition: TrackBase.h:77

◆ electronPtSum() [1/3]

float EgammaHLTTrackIsolation::electronPtSum ( const reco::Track *const  tr,
const reco::TrackCollection isoTracks 
)
inline

Get Pt sum of tracks inside an isolation cone for electrons.

Definition at line 119 of file EgammaHLTTrackIsolation.h.

References electronIsolation().

Referenced by egHLT::OffHelper::fillIsolData().

119  {
120  return electronIsolation(tr, isoTracks).second;
121  }
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. ...

◆ electronPtSum() [2/3]

float EgammaHLTTrackIsolation::electronPtSum ( const reco::Track *const  tr,
const reco::TrackCollection isoTracks,
GlobalPoint  vertex 
)
inline

Definition at line 122 of file EgammaHLTTrackIsolation.h.

References electronIsolation(), and bphysicsOniaDQM_cfi::vertex.

122  {
123  return electronIsolation(tr, isoTracks, vertex).second;
124  }
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. ...

◆ electronPtSum() [3/3]

float EgammaHLTTrackIsolation::electronPtSum ( const reco::Track *const  tr,
const reco::ElectronCollection allEle,
const reco::TrackCollection isoTracks 
)
inline

Definition at line 125 of file EgammaHLTTrackIsolation.h.

References electronIsolation().

127  {
128  return electronIsolation(tr, allEle, isoTracks).second;
129  }
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. ...

◆ electronTrackCount() [1/2]

int EgammaHLTTrackIsolation::electronTrackCount ( const reco::Track *const  tr,
const reco::TrackCollection isoTracks 
)
inline

Get number of tracks inside an isolation cone for electrons.

Definition at line 92 of file EgammaHLTTrackIsolation.h.

References electronIsolation().

92  {
93  return electronIsolation(tr, isoTracks).first;
94  }
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. ...

◆ electronTrackCount() [2/2]

int EgammaHLTTrackIsolation::electronTrackCount ( const reco::Track *const  tr,
const reco::TrackCollection isoTracks,
GlobalPoint  vertex 
)
inline

Definition at line 95 of file EgammaHLTTrackIsolation.h.

References electronIsolation(), and bphysicsOniaDQM_cfi::vertex.

95  {
96  return electronIsolation(tr, isoTracks, vertex).first;
97  }
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. ...

◆ findIsoTracks()

std::pair< int, float > EgammaHLTTrackIsolation::findIsoTracks ( GlobalVector  mom,
GlobalPoint  vtx,
const reco::TrackCollection isoTracks,
bool  isElectron,
bool  useVertex = true 
)
private

Definition at line 78 of file EgammaHLTTrackIsolation.cc.

References PVValHelper::dz, PV3DBase< T, PVType, FrameType >::eta(), M_PI, ntrack, PV3DBase< T, PVType, FrameType >::phi(), DiDispStaMuonMonitor_cfi::pt, ptMin, dttmaxenums::R, rspan, mathSSE::sqrt(), stripBarrel, stripEndcap, VerticesFromLeptons_cfi::useVertex, vetoConesize, extraflags_cff::vtx, and zspan.

Referenced by electronIsolation(), and photonIsolation().

79  {
80  // Check that reconstructed tracks fit within cone boundaries,
81  // (Note: tracks will not always stay within boundaries)
82  int ntrack = 0;
83  float ptSum = 0.;
84 
85  for (reco::TrackCollection::const_iterator trItr = isoTracks->begin(); trItr != isoTracks->end(); ++trItr) {
86  GlobalPoint ivtx(trItr->vertex().x(), trItr->vertex().y(), trItr->vertex().z());
87  reco::Track::Vector ip = trItr->momentum();
88  GlobalVector imom(ip.x(), ip.y(), ip.z());
89 
90  float pt = imom.perp();
91  float dperp = 0.;
92  float dz = 0.;
93  float deta = 0.;
94  float dphi = 0.;
95  if (useVertex) {
96  dperp = ivtx.perp() - vtx.perp();
97  dz = ivtx.z() - vtx.z();
98  deta = imom.eta() - mom.eta();
99  dphi = imom.phi() - mom.phi();
100  } else {
101  //in case of unkown photon vertex, modify direction of photon to point from
102  //current track vertex to sc instead of from (0.,0.,0.) to sc. In this
103  //way, all tracks are considered based on direction alone.
104  GlobalVector mom_temp = mom - GlobalVector(ivtx.x(), ivtx.y(), ivtx.z());
105  deta = imom.eta() - mom_temp.eta();
106  dphi = imom.phi() - mom_temp.phi();
107  }
108  // Correct dmom_phi's from [-2pi,2pi] to [-pi,pi]
109  if (dphi > M_PI)
110  dphi = dphi - 2 * M_PI;
111  else if (dphi < -M_PI)
112  dphi = dphi + 2 * M_PI;
113 
114  float R = sqrt(dphi * dphi + deta * deta);
115 
116  // Apply boundary cut
117  // bool selected=false;
118 
119  // if (pt > ptMin && R < conesize &&
120  // fabs(dperp) < rspan && fabs(dz) < zspan) selected=true;
121 
122  // if (selected) {
123  // ntrack++;
124  // if (!isElectron || R > vetoConesize) ptSum+=pt; //to exclude electron track
125  // }
126  // float theVetoVar = R;
127  // if (isElectron) theVetoVar = R;
128 
129  //hmm how do I figure out if this is barrel or endcap?
130  //abs(mom.eta())<1.5 is the obvious choice but that will be electron not detector eta for electrons
131  //well lets leave it as that for now, its what reco does (well with eta=1.479)
132  double innerStrip = fabs(mom.eta()) < 1.479 ? stripBarrel : stripEndcap;
133 
134  if (pt > ptMin && R < conesize && R > vetoConesize && fabs(dperp) < rspan && fabs(dz) < zspan &&
135  fabs(deta) >= innerStrip) {
136  ntrack++;
137  ptSum += pt;
138  }
139  }
140 
141  // if (isElectron) ntrack-=1; //to exclude electron track
142 
143  return (std::pair<int, float>(ntrack, ptSum));
144 }
Geom::Phi< T > phi() const
Definition: PV3DBase.h:66
T eta() const
Definition: PV3DBase.h:73
T sqrt(T t)
Definition: SSEVec.h:19
#define M_PI
#define ntrack
math::XYZVector Vector
spatial vector
Definition: TrackBase.h:77
Global3DVector GlobalVector
Definition: GlobalVector.h:10

◆ findIsoTracksWithoutEle()

std::pair< int, float > EgammaHLTTrackIsolation::findIsoTracksWithoutEle ( GlobalVector  mom,
GlobalPoint  vtx,
const reco::ElectronCollection allEle,
const reco::TrackCollection isoTracks 
)
private

Definition at line 146 of file EgammaHLTTrackIsolation.cc.

References conesize, PVValHelper::dz, PV3DBase< T, PVType, FrameType >::eta(), M_PI, ntrack, PV3DBase< T, PVType, FrameType >::phi(), DiDispStaMuonMonitor_cfi::pt, ptMin, dttmaxenums::R, rspan, mathSSE::sqrt(), stripBarrel, stripEndcap, vetoConesize, extraflags_cff::vtx, and zspan.

Referenced by electronIsolation(), and photonIsolation().

149  {
150  // Check that reconstructed tracks fit within cone boundaries,
151  // (Note: tracks will not always stay within boundaries)
152  int iele = 0;
153  int ntrack = 0;
154  float ptSum = 0.;
155  std::vector<float> etaele;
156  std::vector<float> phiele;
157 
158  // std::cout << "allEle.size() = " << allEle->size() << std::endl;
159 
160  // Store ALL electrons eta and phi
161  for (reco::ElectronCollection::const_iterator iElectron = allEle->begin(); iElectron != allEle->end(); iElectron++) {
162  iele++;
163  reco::TrackRef anothereletrackref = iElectron->track();
164  etaele.push_back(anothereletrackref->momentum().eta());
165  phiele.push_back(anothereletrackref->momentum().phi());
166  // std::cout << "Electron " << iele << ": phi = " << anothereletrackref->momentum().phi() << ", eta = " << anothereletrackref->momentum().eta() << std::endl;
167  }
168 
169  for (reco::TrackCollection::const_iterator trItr = isoTracks->begin(); trItr != isoTracks->end(); ++trItr) {
170  GlobalPoint ivtx(trItr->vertex().x(), trItr->vertex().y(), trItr->vertex().z());
171  reco::Track::Vector ip = trItr->momentum();
172  GlobalVector imom(ip.x(), ip.y(), ip.z());
173 
174  float pt = imom.perp();
175  float dperp = ivtx.perp() - vtx.perp();
176  float dz = ivtx.z() - vtx.z();
177  float deta = imom.eta() - mom.eta();
178  float dphi = imom.phi() - mom.phi();
179 
180  // Correct dmom_phi's from [-2pi,2pi] to [-pi,pi]
181  if (dphi > M_PI)
182  dphi = dphi - 2 * M_PI;
183  else if (dphi < -M_PI)
184  dphi = dphi + 2 * M_PI;
185 
186  float R = sqrt(dphi * dphi + deta * deta);
187 
188  // Apply boundary cut
189  bool selected = false;
190  bool passedconeveto = true;
191 
192  //hmm how do I figure out if this is barrel or endcap?
193  //abs(mom.eta())<1.5 is the obvious choice but that will be electron not detector eta for electrons
194  //well lets leave it as that for now, its what reco does (well with eta=1.479)
195  double innerStrip = fabs(mom.eta()) < 1.479 ? stripBarrel : stripEndcap;
196 
197  if (pt > ptMin && R < conesize && fabs(dperp) < rspan && fabs(dz) < zspan && fabs(deta) >= innerStrip)
198  selected = true;
199 
200  // Check that NO electron is counted in the isolation
201  for (unsigned int eleItr = 0; eleItr < etaele.size(); ++eleItr) {
202  deta = etaele[eleItr] - imom.eta();
203  dphi = phiele[eleItr] - imom.phi();
204 
205  // Correct dmom_phi's from [-2pi,2pi] to [-pi,pi]
206  if (dphi > M_PI)
207  dphi = dphi - 2 * M_PI;
208  else if (dphi < -M_PI)
209  dphi = dphi + 2 * M_PI;
210 
211  R = sqrt(dphi * dphi + deta * deta);
212  if (R < vetoConesize)
213  passedconeveto = false;
214  }
215 
216  if (selected && passedconeveto) {
217  ntrack++;
218  ptSum += pt; //to exclude electron tracks
219  }
220  }
221 
222  // ntrack-=1; //to exclude electron track
223 
224  return (std::pair<int, float>(ntrack, ptSum));
225 }
Geom::Phi< T > phi() const
Definition: PV3DBase.h:66
T eta() const
Definition: PV3DBase.h:73
T sqrt(T t)
Definition: SSEVec.h:19
#define M_PI
#define ntrack
math::XYZVector Vector
spatial vector
Definition: TrackBase.h:77

◆ getConeSize()

double EgammaHLTTrackIsolation::getConeSize ( )
inline

Get isolation cone size.

Definition at line 151 of file EgammaHLTTrackIsolation.h.

References conesize.

◆ getPtMin()

double EgammaHLTTrackIsolation::getPtMin ( )
inline

Get pt cut for itracks.

Definition at line 149 of file EgammaHLTTrackIsolation.h.

References ptMin.

149 { return ptMin; }

◆ getRspan()

double EgammaHLTTrackIsolation::getRspan ( )
inline

Get maximum transverse distance of ivertex from beam line.

Definition at line 155 of file EgammaHLTTrackIsolation.h.

References rspan.

155 { return rspan; }

◆ getvetoConesize()

double EgammaHLTTrackIsolation::getvetoConesize ( )
inline

Get veto cone size.

Definition at line 157 of file EgammaHLTTrackIsolation.h.

References vetoConesize.

◆ getZspan()

double EgammaHLTTrackIsolation::getZspan ( )
inline

Get maximum ivertex z-coordinate spread.

Definition at line 153 of file EgammaHLTTrackIsolation.h.

References zspan.

153 { return zspan; }

◆ photonIsolation() [1/3]

std::pair< int, float > EgammaHLTTrackIsolation::photonIsolation ( const reco::RecoCandidate *const  recocand,
const reco::TrackCollection isoTracks,
bool  useVertex 
)

Get number of tracks and Pt sum of tracks inside an isolation cone for photons set useVertex=true to use PhotonCandidate vertex from EgammaPhotonVtxFinder set useVertex=false to consider all tracks for isolation

Definition at line 45 of file EgammaHLTTrackIsolation.cc.

References findIsoTracks(), reco::RecoCandidate::superCluster(), VerticesFromLeptons_cfi::useVertex, reco::LeafCandidate::vertex(), and extraflags_cff::vtx.

Referenced by photonPtSum(), and photonTrackCount().

47  {
48  if (useVertex) {
49  GlobalPoint vtx(0, 0, recocandidate->vertex().z());
50  return photonIsolation(recocandidate, isoTracks, vtx);
51  } else {
52  reco::RecoCandidate::Point pos = recocandidate->superCluster()->position();
53  GlobalVector mom(pos.x(), pos.y(), pos.z());
54  return findIsoTracks(mom, GlobalPoint(), isoTracks, false, false);
55  }
56 }
Global3DPoint GlobalPoint
Definition: GlobalPoint.h:10
std::pair< int, float > photonIsolation(const reco::RecoCandidate *const recocand, const reco::TrackCollection *isoTracks, bool useVertex)
std::pair< int, float > findIsoTracks(GlobalVector mom, GlobalPoint vtx, const reco::TrackCollection *isoTracks, bool isElectron, bool useVertex=true)
math::XYZPoint Point
point in the space
Definition: Candidate.h:40

◆ photonIsolation() [2/3]

std::pair< int, float > EgammaHLTTrackIsolation::photonIsolation ( const reco::RecoCandidate *const  recocand,
const reco::TrackCollection isoTracks,
GlobalPoint  vertex 
)

Definition at line 58 of file EgammaHLTTrackIsolation.cc.

References findIsoTracks(), reco::RecoCandidate::superCluster(), extraflags_cff::vtx, and PV3DBase< T, PVType, FrameType >::z().

60  {
61  // to insure consistency with no-free-vertex-code
62  GlobalPoint vtx(0, 0, zvtx.z());
63 
64  reco::RecoCandidate::Point pos = recocandidate->superCluster()->position();
65  GlobalVector mom(pos.x() - vtx.x(), pos.y() - vtx.y(), pos.z() - vtx.z());
66 
67  return findIsoTracks(mom, vtx, isoTracks, false);
68 }
std::pair< int, float > findIsoTracks(GlobalVector mom, GlobalPoint vtx, const reco::TrackCollection *isoTracks, bool isElectron, bool useVertex=true)
math::XYZPoint Point
point in the space
Definition: Candidate.h:40

◆ photonIsolation() [3/3]

std::pair< int, float > EgammaHLTTrackIsolation::photonIsolation ( const reco::RecoCandidate *const  recocand,
const reco::ElectronCollection allEle,
const reco::TrackCollection isoTracks 
)

Definition at line 70 of file EgammaHLTTrackIsolation.cc.

References findIsoTracksWithoutEle(), and reco::RecoCandidate::superCluster().

72  {
73  reco::RecoCandidate::Point pos = recocandidate->superCluster()->position();
74  GlobalVector mom(pos.x(), pos.y(), pos.z());
75  return findIsoTracksWithoutEle(mom, GlobalPoint(), allEle, isoTracks);
76 }
Global3DPoint GlobalPoint
Definition: GlobalPoint.h:10
std::pair< int, float > findIsoTracksWithoutEle(GlobalVector mom, GlobalPoint vtx, const reco::ElectronCollection *allEle, const reco::TrackCollection *isoTracks)
math::XYZPoint Point
point in the space
Definition: Candidate.h:40

◆ photonPtSum() [1/3]

float EgammaHLTTrackIsolation::photonPtSum ( const reco::RecoCandidate *const  recocand,
const reco::TrackCollection isoTracks,
bool  useVertex 
)
inline

Get Pt sum of tracks inside an isolation cone for photons set useVertex=true to use Photon vertex from EgammaPhotonVtxFinder set useVertex=false to consider all tracks for isolation

Definition at line 134 of file EgammaHLTTrackIsolation.h.

References photonIsolation(), and VerticesFromLeptons_cfi::useVertex.

Referenced by egHLT::OffHelper::fillIsolData(), and EgammaHLTPhotonTrackIsolationProducersRegional::produce().

134  {
135  return photonIsolation(recocand, isoTracks, useVertex).second;
136  }
std::pair< int, float > photonIsolation(const reco::RecoCandidate *const recocand, const reco::TrackCollection *isoTracks, bool useVertex)

◆ photonPtSum() [2/3]

float EgammaHLTTrackIsolation::photonPtSum ( const reco::RecoCandidate *const  recocand,
const reco::TrackCollection isoTracks,
GlobalPoint  vertex 
)
inline

Definition at line 137 of file EgammaHLTTrackIsolation.h.

References photonIsolation(), and bphysicsOniaDQM_cfi::vertex.

139  {
140  return photonIsolation(recocand, isoTracks, vertex).second;
141  }
std::pair< int, float > photonIsolation(const reco::RecoCandidate *const recocand, const reco::TrackCollection *isoTracks, bool useVertex)

◆ photonPtSum() [3/3]

float EgammaHLTTrackIsolation::photonPtSum ( const reco::RecoCandidate *const  recocand,
const reco::ElectronCollection allEle,
const reco::TrackCollection isoTracks 
)
inline

Definition at line 142 of file EgammaHLTTrackIsolation.h.

References photonIsolation().

144  {
145  return photonIsolation(recocand, allEle, isoTracks).second;
146  }
std::pair< int, float > photonIsolation(const reco::RecoCandidate *const recocand, const reco::TrackCollection *isoTracks, bool useVertex)

◆ photonTrackCount() [1/3]

int EgammaHLTTrackIsolation::photonTrackCount ( const reco::RecoCandidate *const  recocand,
const reco::TrackCollection isoTracks,
bool  useVertex 
)
inline

Get number of tracks inside an isolation cone for photons set useVertex=true to use Photon vertex from EgammaPhotonVtxFinder set useVertex=false to consider all tracks for isolation

Definition at line 102 of file EgammaHLTTrackIsolation.h.

References photonIsolation(), and VerticesFromLeptons_cfi::useVertex.

Referenced by egHLT::OffHelper::fillIsolData(), and EgammaHLTPhotonTrackIsolationProducersRegional::produce().

104  {
105  return photonIsolation(recocand, isoTracks, useVertex).first;
106  }
std::pair< int, float > photonIsolation(const reco::RecoCandidate *const recocand, const reco::TrackCollection *isoTracks, bool useVertex)

◆ photonTrackCount() [2/3]

int EgammaHLTTrackIsolation::photonTrackCount ( const reco::RecoCandidate *const  recocand,
const reco::TrackCollection isoTracks,
GlobalPoint  vertex 
)
inline

Definition at line 107 of file EgammaHLTTrackIsolation.h.

References photonIsolation(), and bphysicsOniaDQM_cfi::vertex.

109  {
110  return photonIsolation(recocand, isoTracks, vertex).first;
111  }
std::pair< int, float > photonIsolation(const reco::RecoCandidate *const recocand, const reco::TrackCollection *isoTracks, bool useVertex)

◆ photonTrackCount() [3/3]

int EgammaHLTTrackIsolation::photonTrackCount ( const reco::RecoCandidate *const  recocand,
const reco::ElectronCollection allEle,
const reco::TrackCollection isoTracks 
)
inline

Definition at line 112 of file EgammaHLTTrackIsolation.h.

References photonIsolation().

114  {
115  return photonIsolation(recocand, allEle, isoTracks).first;
116  }
std::pair< int, float > photonIsolation(const reco::RecoCandidate *const recocand, const reco::TrackCollection *isoTracks, bool useVertex)

Member Data Documentation

◆ conesize

double EgammaHLTTrackIsolation::conesize
private

Definition at line 173 of file EgammaHLTTrackIsolation.h.

Referenced by findIsoTracksWithoutEle(), and getConeSize().

◆ ptMin

double EgammaHLTTrackIsolation::ptMin
private

Definition at line 172 of file EgammaHLTTrackIsolation.h.

Referenced by findIsoTracks(), findIsoTracksWithoutEle(), and getPtMin().

◆ rspan

double EgammaHLTTrackIsolation::rspan
private

Definition at line 175 of file EgammaHLTTrackIsolation.h.

Referenced by findIsoTracks(), findIsoTracksWithoutEle(), and getRspan().

◆ stripBarrel

double EgammaHLTTrackIsolation::stripBarrel
private

Definition at line 179 of file EgammaHLTTrackIsolation.h.

Referenced by findIsoTracks(), and findIsoTracksWithoutEle().

◆ stripEndcap

double EgammaHLTTrackIsolation::stripEndcap
private

Definition at line 180 of file EgammaHLTTrackIsolation.h.

Referenced by findIsoTracks(), and findIsoTracksWithoutEle().

◆ vetoConesize

double EgammaHLTTrackIsolation::vetoConesize
private

◆ zspan

double EgammaHLTTrackIsolation::zspan
private

Definition at line 174 of file EgammaHLTTrackIsolation.h.

Referenced by findIsoTracks(), findIsoTracksWithoutEle(), and getZspan().