Analysis-level lepton class. More...
#include "DataFormats/PatCandidates/interface/Lepton.h"
Public Member Functions | |
float | caloIso () const |
float | chargedHadronIso () const |
virtual Lepton< LeptonType > * | clone () const |
float | ecalIso () const |
const IsoDeposit * | ecalIsoDeposit () const |
void | ecalIsoDeposit (const IsoDeposit &dep) |
const reco::GenParticle * | genLepton () const |
float | hcalIso () const |
const IsoDeposit * | hcalIsoDeposit () const |
void | hcalIsoDeposit (const IsoDeposit &dep) |
const IsoDeposit * | isoDeposit (IsolationKeys key) const |
Returns the IsoDeposit associated with some key, or a null pointer if it is not available. More... | |
Lepton () | |
default constructor More... | |
Lepton (const LeptonType &aLepton) | |
constructor from LeptonType More... | |
Lepton (const edm::RefToBase< LeptonType > &aLeptonRef) | |
constructor from ref to LeptonType More... | |
Lepton (const edm::Ptr< LeptonType > &aLeptonRef) | |
constructor from ref to LeptonType More... | |
float | neutralHadronIso () const |
float | particleIso () const |
float | photonIso () const |
float | puChargedHadronIso () const |
void | setEcalIso (float caloIso) |
Sets ecal isolation variable. More... | |
void | setGenLepton (const reco::GenParticleRef &gl, bool embed=false) |
void | setHcalIso (float caloIso) |
Sets hcal isolation variable. More... | |
void | setIsoDeposit (IsolationKeys key, const IsoDeposit &dep) |
Sets the IsoDeposit associated with some key; if it is already existent, it is overwritten. More... | |
void | setIsolation (IsolationKeys key, float value) |
void | setTrackIso (float trackIso) |
Sets tracker isolation variable. More... | |
void | setUserIso (float value, uint8_t index=0) |
Sets user isolation variable #index. More... | |
float | trackIso () const |
const IsoDeposit * | trackIsoDeposit () const |
void | trackIsoDeposit (const IsoDeposit &dep) |
float | userIso (uint8_t index=0) const |
const IsoDeposit * | userIsoDeposit (uint8_t index=0) const |
void | userIsoDeposit (const IsoDeposit &dep, uint8_t index=0) |
float | userIsolation (IsolationKeys key) const |
float | userIsolation (const std::string &key) const |
virtual | ~Lepton () |
destructor More... | |
Public Member Functions inherited from pat::PATObject< LeptonType > | |
void | addGenParticleRef (const reco::GenParticleRef &ref) |
void | addTriggerObjectMatch (const TriggerObjectStandAlone &trigObj) |
add a trigger match More... | |
void | addUserCand (const std::string &label, const reco::CandidatePtr &data) |
Set user-defined int. More... | |
void | addUserData (const std::string &label, const T &data, bool transientOnly=false) |
void | addUserDataFromPtr (const std::string &label, const edm::Ptr< pat::UserData > &data) |
void | addUserFloat (const std::string &label, float data) |
Set user-defined float. More... | |
void | addUserInt (const std::string &label, int32_t data) |
Set user-defined int. More... | |
std::vector< std::pair < std::string, pat::LookupTableRecord > > | efficiencies () const |
Returns the efficiencies as <name,value> pairs (by value) More... | |
const pat::LookupTableRecord & | efficiency (const std::string &name) const |
Returns an efficiency given its name. More... | |
const std::vector< std::string > & | efficiencyNames () const |
Returns the list of the names of the stored efficiencies. More... | |
const std::vector < pat::LookupTableRecord > & | efficiencyValues () const |
Returns the list of the values of the stored efficiencies (the ordering is the same as in efficiencyNames()) More... | |
void | embedGenParticle () |
const reco::GenParticle * | genParticle (size_t idx=0) const |
reco::GenParticleRef | genParticleById (int pdgId, int status, uint8_t autoCharge=0) const |
reco::GenParticleRef | genParticleRef (size_t idx=0) const |
std::vector< reco::GenParticleRef > | genParticleRefs () const |
size_t | genParticlesSize () const |
Number of generator level particles stored as ref or embedded. More... | |
const pat::CandKinResolution & | getKinResolution (const std::string &label="") const |
bool | hasKinResolution (const std::string &label="") const |
Check if the kinematic resolutions are stored into this object (possibly specifying a label for them) More... | |
bool | hasOverlaps (const std::string &label) const |
Returns true if there was at least one overlap for this test label. More... | |
bool | hasUserCand (const std::string &key) const |
Return true if there is a user-defined int with a given name. More... | |
bool | hasUserData (const std::string &key) const |
Check if user data with a specific type is present. More... | |
bool | hasUserFloat (const std::string &key) const |
Return true if there is a user-defined float with a given name. More... | |
bool | hasUserFloat (const char *key) const |
a CINT-friendly interface More... | |
bool | hasUserInt (const std::string &key) const |
Return true if there is a user-defined int with a given name. More... | |
const reco::Candidate * | originalObject () const |
access to the original object; returns zero for null Ref and throws for unavailable collection More... | |
const edm::Ptr< reco::Candidate > & | originalObjectRef () const |
reference to original object. Returns a null reference if not available More... | |
const std::vector< std::string > & | overlapLabels () const |
Returns the labels of the overlap tests that found at least one overlap. More... | |
const reco::CandidatePtrVector & | overlaps (const std::string &label) const |
PATObject () | |
default constructor More... | |
PATObject (const LeptonType &obj) | |
constructor from a base object (leaves invalid reference to original object!) More... | |
PATObject (const edm::RefToBase< LeptonType > &ref) | |
constructor from reference More... | |
PATObject (const edm::Ptr< LeptonType > &ref) | |
constructor from reference More... | |
double | resolE (const std::string &label="") const |
Resolution on energy, possibly with a label to specify which resolution to use. More... | |
double | resolEt (const std::string &label="") const |
Resolution on et, possibly with a label to specify which resolution to use. More... | |
double | resolEta (const std::string &label="") const |
Resolution on eta, possibly with a label to specify which resolution to use. More... | |
double | resolM (const std::string &label="") const |
double | resolP (const std::string &label="") const |
Resolution on p, possibly with a label to specify which resolution to use. More... | |
double | resolPhi (const std::string &label="") const |
Resolution on phi, possibly with a label to specify which resolution to use. More... | |
double | resolPInv (const std::string &label="") const |
Resolution on 1/p, possibly with a label to specify which resolution to use. More... | |
double | resolPt (const std::string &label="") const |
Resolution on pt, possibly with a label to specify which resolution to use. More... | |
double | resolPx (const std::string &label="") const |
Resolution on px, possibly with a label to specify which resolution to use. More... | |
double | resolPy (const std::string &label="") const |
Resolution on py, possibly with a label to specify which resolution to use. More... | |
double | resolPz (const std::string &label="") const |
Resolution on pz, possibly with a label to specify which resolution to use. More... | |
double | resolTheta (const std::string &label="") const |
Resolution on theta, possibly with a label to specify which resolution to use. More... | |
void | setEfficiency (const std::string &name, const pat::LookupTableRecord &value) |
void | setGenParticle (const reco::GenParticle &particle) |
Set the generator level particle from a particle not in the Event (embedding it, of course) More... | |
void | setGenParticleRef (const reco::GenParticleRef &ref, bool embed=false) |
Set the generator level particle reference. More... | |
void | setKinResolution (const pat::CandKinResolution &resol, const std::string &label="") |
Add a kinematic resolution to this object (possibly with a label) More... | |
void | setOverlaps (const std::string &label, const reco::CandidatePtrVector &overlaps) |
const TriggerObjectStandAlone * | triggerObjectMatch (const size_t idx=0) const |
get one matched trigger object by index More... | |
const TriggerObjectStandAlone * | triggerObjectMatchByAlgorithm (const std::string &nameAlgorithm, const bool algoCondAccepted=true, const size_t idx=0) const |
const TriggerObjectStandAlone * | triggerObjectMatchByAlgorithm (const char *nameAlgorithm, const bool algoCondAccepted=true, const size_t idx=0) const |
const TriggerObjectStandAlone * | triggerObjectMatchByAlgorithm (const std::string &nameAlgorithm, const unsigned algoCondAccepted, const size_t idx=0) const |
const TriggerObjectStandAlone * | triggerObjectMatchByAlgorithm (const char *nameAlgorithm, const unsigned algoCondAccepted, const size_t idx=0) const |
const TriggerObjectStandAlone * | triggerObjectMatchByCollection (const std::string &coll, const size_t idx=0) const |
get one matched trigger object from a certain collection by index More... | |
const TriggerObjectStandAlone * | triggerObjectMatchByCollection (const char *coll, const size_t idx=0) const |
const TriggerObjectStandAlone * | triggerObjectMatchByCondition (const std::string &nameCondition, const size_t idx=0) const |
get one matched L1 object used in a succeeding object combination of a certain L1 condition by index More... | |
const TriggerObjectStandAlone * | triggerObjectMatchByCondition (const char *nameCondition, const size_t idx=0) const |
const TriggerObjectStandAlone * | triggerObjectMatchByFilter (const std::string &labelFilter, const size_t idx=0) const |
get one matched HLT object used in a certain HLT filter by index More... | |
const TriggerObjectStandAlone * | triggerObjectMatchByFilter (const char *labelFilter, const size_t idx=0) const |
const TriggerObjectStandAlone * | triggerObjectMatchByFilterID (const unsigned triggerObjectType, const size_t idx=0) const |
const TriggerObjectStandAlone * | triggerObjectMatchByPath (const std::string &namePath, const bool pathLastFilterAccepted=false, const bool pathL3FilterAccepted=true, const size_t idx=0) const |
const TriggerObjectStandAlone * | triggerObjectMatchByPath (const char *namePath, const bool pathLastFilterAccepted=false, const bool pathL3FilterAccepted=true, const size_t idx=0) const |
const TriggerObjectStandAlone * | triggerObjectMatchByPath (const std::string &namePath, const unsigned pathLastFilterAccepted, const unsigned pathL3FilterAccepted=1, const size_t idx=0) const |
const TriggerObjectStandAlone * | triggerObjectMatchByPath (const char *namePath, const unsigned pathLastFilterAccepted, const unsigned pathL3FilterAccepted=1, const size_t idx=0) const |
const TriggerObjectStandAlone * | triggerObjectMatchByType (const trigger::TriggerObjectType triggerObjectType, const size_t idx=0) const |
get one matched trigger object of a certain type by index More... | |
const TriggerObjectStandAlone * | triggerObjectMatchByType (const unsigned triggerObjectType, const size_t idx=0) const |
const TriggerObjectStandAloneCollection & | triggerObjectMatches () const |
get all matched trigger objects More... | |
const TriggerObjectStandAloneCollection | triggerObjectMatchesByAlgorithm (const std::string &nameAlgorithm, const bool algoCondAccepted=true) const |
const TriggerObjectStandAloneCollection | triggerObjectMatchesByAlgorithm (const char *nameAlgorithm, const bool algoCondAccepted=true) const |
const TriggerObjectStandAloneCollection | triggerObjectMatchesByAlgorithm (const std::string &nameAlgorithm, const unsigned algoCondAccepted) const |
const TriggerObjectStandAloneCollection | triggerObjectMatchesByAlgorithm (const char *nameAlgorithm, const unsigned algoCondAccepted) const |
const TriggerObjectStandAloneCollection | triggerObjectMatchesByCollection (const std::string &coll) const |
get all matched trigger objects from a certain collection More... | |
const TriggerObjectStandAloneCollection | triggerObjectMatchesByCollection (const char *coll) const |
const TriggerObjectStandAloneCollection | triggerObjectMatchesByCondition (const std::string &nameCondition) const |
get all matched L1 objects used in a succeeding object combination of a certain L1 condition More... | |
const TriggerObjectStandAloneCollection | triggerObjectMatchesByCondition (const char *nameCondition) const |
const TriggerObjectStandAloneCollection | triggerObjectMatchesByFilter (const std::string &labelFilter) const |
get all matched HLT objects used in a certain HLT filter More... | |
const TriggerObjectStandAloneCollection | triggerObjectMatchesByFilter (const char *labelFilter) const |
const TriggerObjectStandAloneCollection | triggerObjectMatchesByFilterID (const unsigned triggerObjectType) const |
const TriggerObjectStandAloneCollection | triggerObjectMatchesByPath (const std::string &namePath, const bool pathLastFilterAccepted=false, const bool pathL3FilterAccepted=true) const |
const TriggerObjectStandAloneCollection | triggerObjectMatchesByPath (const char *namePath, const bool pathLastFilterAccepted=false, const bool pathL3FilterAccepted=true) const |
const TriggerObjectStandAloneCollection | triggerObjectMatchesByPath (const std::string &namePath, const unsigned pathLastFilterAccepted, const unsigned pathL3FilterAccepted=1) const |
const TriggerObjectStandAloneCollection | triggerObjectMatchesByPath (const char *namePath, const unsigned pathLastFilterAccepted, const unsigned pathL3FilterAccepted=1) const |
const TriggerObjectStandAloneCollection | triggerObjectMatchesByType (const trigger::TriggerObjectType triggerObjectType) const |
const TriggerObjectStandAloneCollection | triggerObjectMatchesByType (const unsigned triggerObjectType) const |
void | unpackTriggerObjectPathNames (const edm::TriggerNames &names) |
unpack path names of matched trigger objects (if they were packed before embedding, which is not normally the case) More... | |
reco::CandidatePtr | userCand (const std::string &key) const |
const std::vector< std::string > & | userCandNames () const |
Get list of user-defined cand names. More... | |
const T * | userData (const std::string &key) const |
Returns user-defined data. Returns NULL if the data is not present, or not of type T. More... | |
const void * | userDataBare (const std::string &key) const |
const std::vector< std::string > & | userDataNames () const |
Get list of user data object names. More... | |
const std::string & | userDataObjectType (const std::string &key) const |
Get human-readable type of user data object, for debugging. More... | |
float | userFloat (const std::string &key) const |
float | userFloat (const char *key) const |
a CINT-friendly interface More... | |
const std::vector< std::string > & | userFloatNames () const |
Get list of user-defined float names. More... | |
int32_t | userInt (const std::string &key) const |
const std::vector< std::string > & | userIntNames () const |
Get list of user-defined int names. More... | |
virtual | ~PATObject () |
destructor More... | |
Protected Types | |
typedef std::vector< std::pair < IsolationKeys, pat::IsoDeposit > > | IsoDepositPairs |
Protected Attributes | |
IsoDepositPairs | isoDeposits_ |
std::vector< float > | isolations_ |
Protected Attributes inherited from pat::PATObject< LeptonType > | |
std::vector< std::string > | efficiencyNames_ |
vector of the efficiencies (names) More... | |
std::vector < pat::LookupTableRecord > | efficiencyValues_ |
vector of the efficiencies (values) More... | |
std::vector< reco::GenParticle > | genParticleEmbedded_ |
vector to hold an embedded generator level particle More... | |
std::vector< reco::GenParticleRef > | genParticleRef_ |
Reference to a generator level particle. More... | |
std::vector< std::string > | kinResolutionLabels_ |
std::vector < pat::CandKinResolution > | kinResolutions_ |
Kinematic resolutions. More... | |
std::vector < reco::CandidatePtrVector > | overlapItems_ |
Overlapping items (sorted by distance) More... | |
std::vector< std::string > | overlapLabels_ |
Overlapping test labels (only if there are any overlaps) More... | |
edm::Ptr< reco::Candidate > | refToOrig_ |
TriggerObjectStandAloneCollection | triggerObjectMatchesEmbedded_ |
vector of trigger matches More... | |
std::vector< std::string > | userCandLabels_ |
std::vector< reco::CandidatePtr > | userCands_ |
std::vector< std::string > | userDataLabels_ |
User data object. More... | |
pat::UserDataCollection | userDataObjects_ |
std::vector< std::string > | userFloatLabels_ |
std::vector< float > | userFloats_ |
std::vector< std::string > | userIntLabels_ |
std::vector< int32_t > | userInts_ |
Additional Inherited Members | |
Public Types inherited from pat::PATObject< LeptonType > | |
typedef LeptonType | base_type |
Analysis-level lepton class.
Lepton implements the analysis-level charged lepton class within the 'pat' namespace. It currently provides the link to the generated lepton and the isolation information.
Please post comments and questions to the Physics Tools hypernews: https://hypernews.cern.ch/HyperNews/CMS/get/physTools.html
|
protected |
pat::Lepton< LeptonType >::Lepton | ( | ) |
default constructor
Definition at line 206 of file Lepton.h.
pat::Lepton< LeptonType >::Lepton | ( | const LeptonType & | aLepton | ) |
pat::Lepton< LeptonType >::Lepton | ( | const edm::RefToBase< LeptonType > & | aLeptonRef | ) |
pat::Lepton< LeptonType >::Lepton | ( | const edm::Ptr< LeptonType > & | aLeptonRef | ) |
|
virtual |
|
inline |
Returns the sum of ecal and hcal isolation variable that were stored in this object when produced, or -1.0 if at least one is missing (overloaded if specific isolation functions are available from the derived objects)
Definition at line 121 of file Lepton.h.
Referenced by dummy::Isolationdummy().
|
inline |
Returns the isolation calculated with only the charged hadron PFCandidates
Definition at line 138 of file Lepton.h.
|
inlinevirtual |
Reimplemented in pat::Tau, pat::Electron, and pat::Muon.
|
inline |
Returns the ecal isolation variable that was stored in this object when produced, or -1.0 if there is none (overloaded if specific isolation functions are available from the derived objects)
Definition at line 126 of file Lepton.h.
Referenced by dummy::Isolationdummy().
|
inline |
Definition at line 185 of file Lepton.h.
|
inline |
Definition at line 191 of file Lepton.h.
|
inline |
Definition at line 42 of file Lepton.h.
Referenced by gamma_radiative_analyzer::analyze(), and ZMuMu_Radiative_analyzer::analyze().
|
inline |
Returns the hcal isolation variable that was stored in this object when produced, or -1.0 if there is none (overloaded if specific isolation functions are available from the derived objects)
Definition at line 131 of file Lepton.h.
Referenced by dummy::Isolationdummy().
|
inline |
Definition at line 186 of file Lepton.h.
|
inline |
Definition at line 192 of file Lepton.h.
|
inline |
Returns the IsoDeposit associated with some key, or a null pointer if it is not available.
Definition at line 165 of file Lepton.h.
Referenced by ZMuMuIsolationAnalyzer::analyze(), ZMuMu_Radiative_analyzer::analyze(), pat::Lepton< reco::Muon >::ecalIsoDeposit(), ZGlobalVsSAIsolationAnalyzer::evaluate(), pat::Lepton< reco::Muon >::hcalIsoDeposit(), pat::Lepton< reco::Muon >::trackIsoDeposit(), and pat::Lepton< reco::Muon >::userIsoDeposit().
|
inline |
Returns the isolation calculated with only the neutral hadron PFCandidates
Definition at line 141 of file Lepton.h.
|
inline |
PARTICLE FLOW ISOLATION Returns the isolation calculated with all the PFCandidates
Definition at line 135 of file Lepton.h.
|
inline |
Returns the isolation calculated with only the gamma PFCandidates
Definition at line 144 of file Lepton.h.
|
inline |
Returns the isolation calculated with only the pile-up charged hadron PFCandidates
Definition at line 147 of file Lepton.h.
|
inline |
Sets ecal isolation variable.
Definition at line 156 of file Lepton.h.
Referenced by aod2patFilterZee::filter().
|
inline |
Definition at line 44 of file Lepton.h.
|
inline |
Sets hcal isolation variable.
Definition at line 158 of file Lepton.h.
Referenced by aod2patFilterZee::filter().
|
inline |
Sets the IsoDeposit associated with some key; if it is already existent, it is overwritten.
Definition at line 175 of file Lepton.h.
Referenced by pat::Lepton< reco::Muon >::ecalIsoDeposit(), pat::PATElectronProducer::fillElectron(), pat::PATElectronProducer::fillElectron2(), pat::PATMuonProducer::fillMuon(), pat::Lepton< reco::Muon >::hcalIsoDeposit(), pat::PATTauProducer::produce(), pat::PATElectronProducer::produce(), pat::Lepton< reco::Muon >::trackIsoDeposit(), and pat::Lepton< reco::Muon >::userIsoDeposit().
|
inline |
Sets the userIsolation variable for a specific key. Note that you can't set isolation for a pseudo-key like CaloIso
Definition at line 98 of file Lepton.h.
Referenced by pat::PATElectronProducer::fillElectron(), pat::PATElectronProducer::fillElectron2(), pat::PATMuonProducer::fillMuon(), ZMuMuMuonUserData::produce(), pat::PATMuonProducer::produce(), pat::PATTauProducer::produce(), pat::PATElectronProducer::produce(), pat::Lepton< reco::Muon >::setEcalIso(), pat::Lepton< reco::Muon >::setHcalIso(), pat::Lepton< reco::Muon >::setTrackIso(), and pat::Lepton< reco::Muon >::setUserIso().
|
inline |
Sets tracker isolation variable.
Definition at line 154 of file Lepton.h.
Referenced by aod2patFilterZee::filter().
|
inline |
Sets user isolation variable #index.
Definition at line 160 of file Lepton.h.
|
inline |
Returns the tracker isolation variable that was stored in this object when produced, or -1.0 if there is none (overloaded if specific isolation functions are available from the derived objects)
Definition at line 116 of file Lepton.h.
Referenced by dummy::Isolationdummy().
|
inline |
Definition at line 184 of file Lepton.h.
|
inline |
Definition at line 190 of file Lepton.h.
|
inline |
Returns the user defined isolation variable #index that was stored in this object when produced, or -1.0 if there is none
Definition at line 150 of file Lepton.h.
|
inline |
Definition at line 187 of file Lepton.h.
|
inline |
Definition at line 193 of file Lepton.h.
|
inline |
Returns the isolation variable for a specific key (or pseudo-key like CaloIso), or -1.0 if not available
Definition at line 49 of file Lepton.h.
Referenced by pat::Lepton< reco::Muon >::caloIso(), pat::Lepton< reco::Muon >::chargedHadronIso(), pat::Lepton< reco::Muon >::ecalIso(), pat::Lepton< reco::Muon >::hcalIso(), pat::Lepton< reco::Muon >::neutralHadronIso(), pat::Lepton< reco::Muon >::particleIso(), pat::Lepton< reco::Muon >::photonIso(), pat::Lepton< reco::Muon >::puChargedHadronIso(), WenuPlots::ReturnCandVar(), ZeePlots::ReturnCandVar(), PFElectronSelector::spring11Cuts(), PFMuonSelector::TopPag12LjetsCuts(), pat::Lepton< reco::Muon >::trackIso(), pat::Lepton< reco::Muon >::userIso(), and pat::Lepton< reco::Muon >::userIsolation().
|
inline |
Returns the isolation variable for string type function arguments (to be used with the cut-string parser); the possible values of the strings are the enums defined in DataFormats/PatCandidates/interface/Isolation.h
Definition at line 72 of file Lepton.h.
|
protected |
Definition at line 199 of file Lepton.h.
Referenced by pat::Lepton< reco::Muon >::isoDeposit(), and pat::Lepton< reco::Muon >::setIsoDeposit().
|
protected |
Definition at line 200 of file Lepton.h.
Referenced by pat::Lepton< reco::Muon >::setIsolation(), and pat::Lepton< reco::Muon >::userIsolation().