#include <PhotonTkIsolation.h>
Public Member Functions | |
std::pair< int, float > | getIso (const reco::Candidate *) const |
PhotonTkIsolation (float extRadius, float intRadius, float strip, float etLow, float lip, float drb, const reco::TrackCollection *trackCollection, reco::TrackBase::Point beamPoint) | |
PhotonTkIsolation (float extRadius, float intRadiusBarrel, float intRadiusEndcap, float stripBarrel, float stripEndcap, float etLow, float lip, float drb, const reco::TrackCollection *trackCollection, reco::TrackBase::Point beamPoint) | |
PhotonTkIsolation (float extRadius, float intRadiusBarrel, float intRadiusEndcap, float stripBarrel, float stripEndcap, float etLow, float lip, float drb, const reco::TrackCollection *, reco::TrackBase::Point beamPoint, const std::string &) | |
PhotonTkIsolation (float extRadius, float intRadius, float etLow, float lip, float drb, const reco::TrackCollection *trackCollection, reco::TrackBase::Point beamPoint) | |
void | setDzOption (const std::string &s) |
~PhotonTkIsolation () | |
Private Attributes | |
reco::TrackBase::Point | beamPoint_ |
float | drb_ |
int | dzOption_ |
float | etLow_ |
float | extRadius2_ |
float | intRadiusBarrel2_ |
float | intRadiusEndcap2_ |
float | lip_ |
float | stripBarrel_ |
float | stripEndcap_ |
const reco::TrackCollection * | trackCollection_ |
Definition at line 25 of file PhotonTkIsolation.h.
PhotonTkIsolation::PhotonTkIsolation | ( | float | extRadius, |
float | intRadius, | ||
float | etLow, | ||
float | lip, | ||
float | drb, | ||
const reco::TrackCollection * | trackCollection, | ||
reco::TrackBase::Point | beamPoint | ||
) | [inline] |
Definition at line 29 of file PhotonTkIsolation.h.
References setDzOption().
: extRadius2_(extRadius*extRadius), intRadiusBarrel2_(intRadius*intRadius), intRadiusEndcap2_(intRadius*intRadius), stripBarrel_(0.0), stripEndcap_(0.0), etLow_(etLow), lip_(lip), drb_(drb), trackCollection_(trackCollection), beamPoint_(beamPoint) { setDzOption("vz"); }
PhotonTkIsolation::PhotonTkIsolation | ( | float | extRadius, |
float | intRadius, | ||
float | strip, | ||
float | etLow, | ||
float | lip, | ||
float | drb, | ||
const reco::TrackCollection * | trackCollection, | ||
reco::TrackBase::Point | beamPoint | ||
) | [inline] |
Definition at line 51 of file PhotonTkIsolation.h.
References setDzOption().
: extRadius2_(extRadius*extRadius), intRadiusBarrel2_(intRadius*intRadius), intRadiusEndcap2_(intRadius*intRadius), stripBarrel_(strip), stripEndcap_(strip), etLow_(etLow), lip_(lip), drb_(drb), trackCollection_(trackCollection), beamPoint_(beamPoint) { setDzOption("vz"); }
PhotonTkIsolation::PhotonTkIsolation | ( | float | extRadius, |
float | intRadiusBarrel, | ||
float | intRadiusEndcap, | ||
float | stripBarrel, | ||
float | stripEndcap, | ||
float | etLow, | ||
float | lip, | ||
float | drb, | ||
const reco::TrackCollection * | trackCollection, | ||
reco::TrackBase::Point | beamPoint | ||
) | [inline] |
Definition at line 75 of file PhotonTkIsolation.h.
References setDzOption().
: extRadius2_(extRadius*extRadius), intRadiusBarrel2_(intRadiusBarrel*intRadiusBarrel), intRadiusEndcap2_(intRadiusEndcap*intRadiusEndcap), stripBarrel_(stripBarrel), stripEndcap_(stripEndcap), etLow_(etLow), lip_(lip), drb_(drb), trackCollection_(trackCollection), beamPoint_(beamPoint) { setDzOption("vz"); }
PhotonTkIsolation::PhotonTkIsolation | ( | float | extRadius, |
float | intRadiusBarrel, | ||
float | intRadiusEndcap, | ||
float | stripBarrel, | ||
float | stripEndcap, | ||
float | etLow, | ||
float | lip, | ||
float | drb, | ||
const reco::TrackCollection * | trackCollection, | ||
reco::TrackBase::Point | beamPoint, | ||
const std::string & | dzOptionString | ||
) |
Definition at line 30 of file PhotonTkIsolation.cc.
References setDzOption().
: extRadius2_(extRadius*extRadius), intRadiusBarrel2_(intRadiusBarrel*intRadiusBarrel), intRadiusEndcap2_(intRadiusEndcap*intRadiusEndcap), stripBarrel_(stripBarrel), stripEndcap_(stripEndcap), etLow_(etLow), lip_(lip), drb_(drb), trackCollection_(trackCollection), beamPoint_(beamPoint) { setDzOption(dzOptionString); }
PhotonTkIsolation::~PhotonTkIsolation | ( | ) |
Definition at line 65 of file PhotonTkIsolation.cc.
{ }
std::pair< int, float > PhotonTkIsolation::getIso | ( | const reco::Candidate * | photon | ) | const |
Definition at line 72 of file PhotonTkIsolation.cc.
References beamPoint_, egammaisolation::EgammaTrackSelector::bs, Geom::deltaR2(), drb_, egammaisolation::EgammaTrackSelector::dz, dzOption_, reco::Candidate::eta(), etLow_, intRadiusBarrel2_, intRadiusEndcap2_, lip_, stripBarrel_, stripEndcap_, trackCollection_, reco::Candidate::vertex(), egammaisolation::EgammaTrackSelector::vtx, and egammaisolation::EgammaTrackSelector::vz.
Referenced by PhotonIsolationCalculator::calculateTrackIso().
{ int counter =0 ; float ptSum =0.; //Take the photon position float photonEta = photon->eta(); //loop over tracks for(reco::TrackCollection::const_iterator trItr = trackCollection_->begin(); trItr != trackCollection_->end(); ++trItr){ //check z-distance of vertex float 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; float this_pt = (*trItr).pt(); if ( this_pt < etLow_ ) continue ; if (fabs( (*trItr).dxy(beamPoint_) ) > drb_ ) continue;// only consider tracks from the main vertex float dr2 = reco::deltaR2(*trItr,*photon) ; float deta = (*trItr).eta() - photonEta ; if (fabs(photonEta) < 1.479) { if(dr2 < extRadius2_ && dr2 >= intRadiusBarrel2_ && fabs(deta) >= stripBarrel_) { ++counter; ptSum += this_pt; } } else { if(dr2 < extRadius2_ && dr2 >= intRadiusEndcap2_ && fabs(deta) >= stripEndcap_) { ++counter; ptSum += this_pt; } } }//end loop over tracks std::pair<int,float> retval; retval.first = counter; retval.second = ptSum; return retval; }
void PhotonTkIsolation::setDzOption | ( | const std::string & | s | ) |
Definition at line 55 of file PhotonTkIsolation.cc.
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 134 of file PhotonTkIsolation.h.
Referenced by getIso().
float PhotonTkIsolation::drb_ [private] |
Definition at line 131 of file PhotonTkIsolation.h.
Referenced by getIso().
int PhotonTkIsolation::dzOption_ [private] |
Definition at line 136 of file PhotonTkIsolation.h.
Referenced by getIso(), and setDzOption().
float PhotonTkIsolation::etLow_ [private] |
Definition at line 129 of file PhotonTkIsolation.h.
Referenced by getIso().
float PhotonTkIsolation::extRadius2_ [private] |
Definition at line 124 of file PhotonTkIsolation.h.
float PhotonTkIsolation::intRadiusBarrel2_ [private] |
Definition at line 125 of file PhotonTkIsolation.h.
Referenced by getIso().
float PhotonTkIsolation::intRadiusEndcap2_ [private] |
Definition at line 126 of file PhotonTkIsolation.h.
Referenced by getIso().
float PhotonTkIsolation::lip_ [private] |
Definition at line 130 of file PhotonTkIsolation.h.
Referenced by getIso().
float PhotonTkIsolation::stripBarrel_ [private] |
Definition at line 127 of file PhotonTkIsolation.h.
Referenced by getIso().
float PhotonTkIsolation::stripEndcap_ [private] |
Definition at line 128 of file PhotonTkIsolation.h.
Referenced by getIso().
const reco::TrackCollection* PhotonTkIsolation::trackCollection_ [private] |
Definition at line 133 of file PhotonTkIsolation.h.
Referenced by getIso().