5 #ifndef DataFormats_PatCandidates_Lepton_h
6 #define DataFormats_PatCandidates_Lepton_h
31 template <
class LeptonType>
76 std::string prunedKey = ( key.find(
"pat::") == 0 ) ? std::string(key, 5) :
key;
105 "The key for which you're setting isolation does not correspond " <<
106 "to an individual isolation but to the sum of more independent isolations " <<
107 "(e.g. Calo = Ecal + Hcal), so you can't SET the value, just GET it.\n" <<
108 "Please set up each component independly.\n";
167 if (it->first == key)
return & it->second;
175 for (; it != ed; ++it) {
176 if (it->first == key) { it->second = dep;
return; }
203 template <
class LeptonType>
214 template <
class LeptonType>
221 template <
class LeptonType>
228 template <
class LeptonType>
235 template <
class LeptonType>
void ecalIsoDeposit(const IsoDeposit &dep)
const IsoDeposit * trackIsoDeposit() const
const reco::GenParticle * genLepton() const
void setIsolation(IsolationKeys key, float value)
void trackIsoDeposit(const IsoDeposit &dep)
std::vector< std::pair< IsolationKeys, pat::IsoDeposit > > IsoDepositPairs
const reco::GenParticle * genParticle(size_t idx=0) const
const IsoDeposit * hcalIsoDeposit() const
float userIso(uint8_t index=0) const
void hcalIsoDeposit(const IsoDeposit &dep)
IsolationKeys
Enum defining isolation keys.
const IsoDeposit * isoDeposit(IsolationKeys key) const
Returns the IsoDeposit associated with some key, or a null pointer if it is not available.
void setGenParticleRef(const reco::GenParticleRef &ref, bool embed=false)
Set the generator level particle reference.
void setIsoDeposit(IsolationKeys key, const IsoDeposit &dep)
Sets the IsoDeposit associated with some key; if it is already existent, it is overwritten.
float particleIso() const
float neutralHadronIso() const
Lepton()
default constructor
void setGenLepton(const reco::GenParticleRef &gl, bool embed=false)
void setUserIso(float value, uint8_t index=0)
Sets user isolation variable #index.
Analysis-level lepton class.
math::XYZPoint Point
point in the space
virtual Lepton< LeptonType > * clone() const
virtual ~Lepton()
destructor
const IsoDeposit * ecalIsoDeposit() const
IsoDepositPairs isoDeposits_
float userIsolation(const std::string &key) const
unsigned int index
index type
float userIsolation(IsolationKeys key) const
std::vector< float > isolations_
void userIsoDeposit(const IsoDeposit &dep, uint8_t index=0)
void setTrackIso(float trackIso)
Sets tracker isolation variable.
Templated PAT object container.
void setEcalIso(float caloIso)
Sets ecal isolation variable.
void setHcalIso(float caloIso)
Sets hcal isolation variable.
float chargedHadronIso() const
const IsoDeposit * userIsoDeposit(uint8_t index=0) const
math::XYZTLorentzVector LorentzVector
Lorentz vector.