#include <PhotonTkIsolation.h>
Public Member Functions | |
int | getNumberTracks (const reco::Candidate *) const |
double | getPtTracks (const reco::Candidate *) const |
PhotonTkIsolation (double extRadius, double intRadius, double etLow, double lip, double drb, const reco::TrackCollection *trackCollection, reco::TrackBase::Point beamPoint) | |
PhotonTkIsolation (double extRadius, double intRadius, double strip, double etLow, double lip, double drb, const reco::TrackCollection *trackCollection, reco::TrackBase::Point beamPoint) | |
PhotonTkIsolation (double extRadius, double intRadiusBarrel, double intRadiusEndcap, double stripBarrel, double stripEndcap, double etLow, double lip, double drb, const reco::TrackCollection *, reco::TrackBase::Point beamPoint, const std::string &) | |
PhotonTkIsolation (double extRadius, double intRadiusBarrel, double intRadiusEndcap, double stripBarrel, double stripEndcap, double etLow, double lip, double drb, const reco::TrackCollection *trackCollection, reco::TrackBase::Point beamPoint) | |
void | setDzOption (const std::string &s) |
~PhotonTkIsolation () | |
Private Member Functions | |
std::pair< int, double > | getIso (const reco::Candidate *) const |
Private Attributes | |
reco::TrackBase::Point | beamPoint_ |
double | drb_ |
int | dzOption_ |
double | etLow_ |
double | extRadius_ |
double | intRadiusBarrel_ |
double | intRadiusEndcap_ |
double | lip_ |
double | stripBarrel_ |
double | stripEndcap_ |
const reco::TrackCollection * | trackCollection_ |
Definition at line 27 of file PhotonTkIsolation.h.
PhotonTkIsolation::PhotonTkIsolation | ( | double | extRadius, |
double | intRadius, | ||
double | etLow, | ||
double | lip, | ||
double | drb, | ||
const reco::TrackCollection * | trackCollection, | ||
reco::TrackBase::Point | beamPoint | ||
) | [inline] |
Definition at line 31 of file PhotonTkIsolation.h.
References setDzOption().
: extRadius_(extRadius), intRadiusBarrel_(intRadius), intRadiusEndcap_(intRadius), stripBarrel_(0.0), stripEndcap_(0.0), etLow_(etLow), lip_(lip), drb_(drb), trackCollection_(trackCollection), beamPoint_(beamPoint) { setDzOption("vz"); }
PhotonTkIsolation::PhotonTkIsolation | ( | double | extRadius, |
double | intRadius, | ||
double | strip, | ||
double | etLow, | ||
double | lip, | ||
double | drb, | ||
const reco::TrackCollection * | trackCollection, | ||
reco::TrackBase::Point | beamPoint | ||
) | [inline] |
Definition at line 53 of file PhotonTkIsolation.h.
References setDzOption().
: extRadius_(extRadius), intRadiusBarrel_(intRadius), intRadiusEndcap_(intRadius), stripBarrel_(strip), stripEndcap_(strip), etLow_(etLow), lip_(lip), drb_(drb), trackCollection_(trackCollection), beamPoint_(beamPoint) { setDzOption("vz"); }
PhotonTkIsolation::PhotonTkIsolation | ( | double | extRadius, |
double | intRadiusBarrel, | ||
double | intRadiusEndcap, | ||
double | stripBarrel, | ||
double | stripEndcap, | ||
double | etLow, | ||
double | lip, | ||
double | drb, | ||
const reco::TrackCollection * | trackCollection, | ||
reco::TrackBase::Point | beamPoint | ||
) | [inline] |
Definition at line 77 of file PhotonTkIsolation.h.
References setDzOption().
: extRadius_(extRadius), intRadiusBarrel_(intRadiusBarrel), intRadiusEndcap_(intRadiusEndcap), stripBarrel_(stripBarrel), stripEndcap_(stripEndcap), etLow_(etLow), lip_(lip), drb_(drb), trackCollection_(trackCollection), beamPoint_(beamPoint) { setDzOption("vz"); }
PhotonTkIsolation::PhotonTkIsolation | ( | double | extRadius, |
double | intRadiusBarrel, | ||
double | intRadiusEndcap, | ||
double | stripBarrel, | ||
double | stripEndcap, | ||
double | etLow, | ||
double | lip, | ||
double | drb, | ||
const reco::TrackCollection * | trackCollection, | ||
reco::TrackBase::Point | beamPoint, | ||
const std::string & | dzOptionString | ||
) |
Definition at line 32 of file PhotonTkIsolation.cc.
References setDzOption().
: extRadius_(extRadius), intRadiusBarrel_(intRadiusBarrel), intRadiusEndcap_(intRadiusEndcap), stripBarrel_(stripBarrel), stripEndcap_(stripEndcap), etLow_(etLow), lip_(lip), drb_(drb), trackCollection_(trackCollection), beamPoint_(beamPoint) { setDzOption(dzOptionString); }
PhotonTkIsolation::~PhotonTkIsolation | ( | ) |
Definition at line 57 of file PhotonTkIsolation.cc.
{ }
std::pair< int, double > PhotonTkIsolation::getIso | ( | const reco::Candidate * | photon | ) | const [private] |
Definition at line 64 of file PhotonTkIsolation.cc.
References beamPoint_, egammaisolation::EgammaTrackSelector::bs, drb_, egammaisolation::EgammaTrackSelector::dz, dzOption_, reco::Candidate::eta(), etLow_, extRadius_, intRadiusBarrel_, intRadiusEndcap_, lip_, reco::Candidate::momentum(), stripBarrel_, stripEndcap_, trackCollection_, reco::Candidate::vertex(), egammaisolation::EgammaTrackSelector::vtx, and egammaisolation::EgammaTrackSelector::vz.
Referenced by getNumberTracks(), and getPtTracks().
{ int counter =0 ; double ptSum =0.; //Take the photon position math::XYZVector mom= photon->momentum(); double photonEta = photon->eta(); //loop over tracks for(reco::TrackCollection::const_iterator trItr = trackCollection_->begin(); trItr != trackCollection_->end(); ++trItr){ //check z-distance of vertex double dzCut = 0; switch( dzOption_ ) { case egammaisolation::EgammaTrackSelector::dz : dzCut = fabs( (*trItr).dz() - photon->vertex().z() ); break; case egammaisolation::EgammaTrackSelector::vz : dzCut = fabs( (*trItr).vz() - photon->vertex().z() ); break; case egammaisolation::EgammaTrackSelector::bs : dzCut = fabs( (*trItr).dz(beamPoint_) - photon->vertex().z() ); break; case egammaisolation::EgammaTrackSelector::vtx: dzCut = fabs( (*trItr).dz(photon->vertex())); break; default : dzCut = fabs( (*trItr).vz() - photon->vertex().z() ); break; } if (dzCut > lip_ ) continue; math::XYZVector tmpTrackMomentumAtVtx = (*trItr).momentum () ; double this_pt = (*trItr).pt(); if ( this_pt < etLow_ ) continue ; if (fabs( (*trItr).dxy(beamPoint_) ) > drb_ ) continue;// only consider tracks from the main vertex double dr = ROOT::Math::VectorUtil::DeltaR(tmpTrackMomentumAtVtx,mom) ; double deta = (*trItr).eta() - photonEta ; if (fabs(photonEta) < 1.479) { if(fabs(dr) < extRadius_ && fabs(dr) >= intRadiusBarrel_ && fabs(deta) >= stripBarrel_) { ++counter; ptSum += this_pt; } } else { if(fabs(dr) < extRadius_ && fabs(dr) >= intRadiusEndcap_ && fabs(deta) >= stripEndcap_) { ++counter; ptSum += this_pt; } } }//end loop over tracks std::pair<int,double> retval; retval.first = counter; retval.second = ptSum; return retval; }
int PhotonTkIsolation::getNumberTracks | ( | const reco::Candidate * | photon | ) | const |
Definition at line 117 of file PhotonTkIsolation.cc.
References getIso().
Referenced by PhotonIsolationCalculator::calculateTrackIso().
{ //counter for the tracks in the isolation cone return getIso(photon).first ; }
double PhotonTkIsolation::getPtTracks | ( | const reco::Candidate * | photon | ) | const |
Definition at line 123 of file PhotonTkIsolation.cc.
References getIso().
Referenced by PhotonIsolationCalculator::calculateTrackIso().
{ return getIso(photon).second ; }
void PhotonTkIsolation::setDzOption | ( | const std::string & | s | ) | [inline] |
Definition at line 123 of file PhotonTkIsolation.h.
References egammaisolation::EgammaTrackSelector::bs, egammaisolation::EgammaTrackSelector::dz, dzOption_, egammaisolation::EgammaTrackSelector::vtx, and egammaisolation::EgammaTrackSelector::vz.
Referenced by PhotonTkIsolation().
{ if( ! s.compare("dz") ) dzOption_ = egammaisolation::EgammaTrackSelector::dz; else if( ! s.compare("vz") ) dzOption_ = egammaisolation::EgammaTrackSelector::vz; else if( ! s.compare("bs") ) dzOption_ = egammaisolation::EgammaTrackSelector::bs; else if( ! s.compare("vtx") )dzOption_ = egammaisolation::EgammaTrackSelector::vtx; else dzOption_ = egammaisolation::EgammaTrackSelector::dz; }
Definition at line 143 of file PhotonTkIsolation.h.
Referenced by getIso().
double PhotonTkIsolation::drb_ [private] |
Definition at line 140 of file PhotonTkIsolation.h.
Referenced by getIso().
int PhotonTkIsolation::dzOption_ [private] |
Definition at line 145 of file PhotonTkIsolation.h.
Referenced by getIso(), and setDzOption().
double PhotonTkIsolation::etLow_ [private] |
Definition at line 138 of file PhotonTkIsolation.h.
Referenced by getIso().
double PhotonTkIsolation::extRadius_ [private] |
Definition at line 133 of file PhotonTkIsolation.h.
Referenced by getIso().
double PhotonTkIsolation::intRadiusBarrel_ [private] |
Definition at line 134 of file PhotonTkIsolation.h.
Referenced by getIso().
double PhotonTkIsolation::intRadiusEndcap_ [private] |
Definition at line 135 of file PhotonTkIsolation.h.
Referenced by getIso().
double PhotonTkIsolation::lip_ [private] |
Definition at line 139 of file PhotonTkIsolation.h.
Referenced by getIso().
double PhotonTkIsolation::stripBarrel_ [private] |
Definition at line 136 of file PhotonTkIsolation.h.
Referenced by getIso().
double PhotonTkIsolation::stripEndcap_ [private] |
Definition at line 137 of file PhotonTkIsolation.h.
Referenced by getIso().
const reco::TrackCollection* PhotonTkIsolation::trackCollection_ [private] |
Definition at line 142 of file PhotonTkIsolation.h.
Referenced by getIso().