12 #include <Math/VectorUtil.h>
15 double intRadiusBarrel,
16 double intRadiusEndcap,
25 : extRadius_(extRadius),
26 intRadiusBarrel_(intRadiusBarrel),
27 intRadiusEndcap_(intRadiusEndcap),
28 stripBarrel_(stripBarrel),
29 stripEndcap_(stripEndcap),
33 trackCollection_(trackCollection),
34 beamPoint_(beamPoint) {
51 double tmpElectronEtaAtVertex = (*tmpTrack).eta();
53 for (reco::TrackCollection::const_iterator itrTr = (*trackCollection_).begin(); itrTr != (*trackCollection_).end();
55 double this_pt = (*itrTr).pt();
62 dzCut = fabs((*itrTr).dz() - (*tmpTrack).dz());
65 dzCut = fabs((*itrTr).vz() - (*tmpTrack).vz());
71 dzCut = fabs((*itrTr).dz(tmpTrack->
vertex()));
74 dzCut = fabs((*itrTr).vz() - (*tmpTrack).vz());
82 double deta = (*itrTr).eta() - tmpElectronEtaAtVertex;
86 if (dr < extRadius_ && dr >= intRadius &&
std::abs(deta) >= strip &&
passAlgo(*itrTr)) {
93 std::pair<int, double> retval;
95 retval.second = ptSum;
102 return getIso(electron).first;
bool passAlgo(const reco::TrackBase &trk) const
std::vector< Track > TrackCollection
collection of Tracks
int getNumberTracks(const reco::GsfElectron *) const
ElectronTkIsolation(double extRadius, double intRadius, double ptLow, double lip, double drb, const reco::TrackCollection *trackCollection, reco::TrackBase::Point beamPoint)
TrackAlgorithm algo() const
GsfTrackRef gsfTrack() const override
reference to a GsfTrack
const Point & vertex() const
reference point on the track. This method is DEPRECATED, please use referencePoint() instead ...
void setDzOption(const std::string &s)
Abs< T >::type abs(const T &t)
std::vector< int > algosToReject_
math::XYZPoint Point
point in the space
std::pair< int, double > getIso(const reco::GsfElectron *) const
TrackAlgorithm originalAlgo() const
XYZVectorD XYZVector
spatial vector with cartesian internal representation
double getPtTracks(const reco::GsfElectron *) const
static std::atomic< unsigned int > counter
reco::TrackBase::Point beamPoint_