CMS 3D CMS Logo

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | Friends
pat::Electron Class Reference

Analysis-level electron class. More...

#include "DataFormats/PatCandidates/interface/Electron.h"

Inheritance diagram for pat::Electron:
pat::Lepton< reco::GsfElectron > pat::PATObject< reco::GsfElectron > reco::GsfElectron reco::RecoCandidate reco::LeafCandidate reco::Candidate

Public Types

typedef std::pair< std::string,
float > 
IdPair
 
enum  IPTYPE {
  None = 0, PV2D = 1, PV3D = 2, BS2D = 3,
  BS3D = 4
}
 
typedef enum pat::Electron::IPTYPE IpType
 
- Public Types inherited from pat::PATObject< reco::GsfElectron >
typedef reco::GsfElectron base_type
 
- Public Types inherited from reco::GsfElectron
enum  Classification {
  UNKNOWN =-1, GOLDEN =0, BIGBREM =1, OLDNARROW =2,
  SHOWERING =3, GAP =4
}
 
enum  P4Kind { P4_UNKNOWN =-1, P4_FROM_SUPER_CLUSTER =0, P4_COMBINATION =1, P4_PFLOW_COMBINATION =2 }
 
- Public Types inherited from reco::RecoCandidate
enum  TrackType { noTrackType, recoTrackType, gsfTrackType }
 track type More...
 
- Public Types inherited from reco::LeafCandidate
typedef int Charge
 electric charge type More...
 
typedef CandidateCollection daughters
 collection of daughter candidates More...
 
typedef unsigned int index
 
typedef math::XYZTLorentzVector LorentzVector
 Lorentz vector. More...
 
typedef math::XYZPoint Point
 point in the space More...
 
typedef
math::PtEtaPhiMLorentzVector 
PolarLorentzVector
 Lorentz vector. More...
 
typedef math::XYZVector Vector
 point in the space More...
 
- Public Types inherited from reco::Candidate
enum  { dimension = 3 }
 
enum  { size = dimension * (dimension + 1)/2 }
 matix size More...
 
typedef int Charge
 electric charge type More...
 
typedef candidate::const_iterator const_iterator
 
typedef math::Error< dimension >
::type 
CovarianceMatrix
 covariance error matrix (3x3) More...
 
typedef unsigned int index
 index type More...
 
typedef candidate::iterator iterator
 
typedef math::XYZTLorentzVector LorentzVector
 Lorentz vector. More...
 
typedef math::XYZPoint Point
 point in the space More...
 
typedef
math::PtEtaPhiMLorentzVector 
PolarLorentzVector
 Lorentz vector. More...
 
typedef size_t size_type
 
typedef math::XYZVector Vector
 point in the space More...
 

Public Member Functions

float caloIso () const
 
virtual Electronclone () const
 required reimplementation of the Candidate's clone method More...
 
virtual reco::GsfElectronCoreRef core () const
 override the virtual reco::GsfElectron::core method, so that the embedded core can be used by GsfElectron client methods More...
 
double dB (IpType type=None) const
 
const LorentzVectorecalDrivenMomentum () const
 
float ecalIso () const
 
double edB (IpType type=None) const
 
 Electron ()
 default constructor More...
 
 Electron (const reco::GsfElectron &anElectron)
 constructor from a reco electron More...
 
 Electron (const edm::RefToBase< reco::GsfElectron > &anElectronRef)
 constructor from a RefToBase to a reco electron (to be superseded by Ptr counterpart) More...
 
 Electron (const edm::Ptr< reco::GsfElectron > &anElectronRef)
 constructor from a Ptr to a reco electron More...
 
float electronID (const std::string &name) const
 
const std::vector< IdPair > & electronIDs () const
 
void embedGsfElectronCore ()
 method to store the electron's core internally More...
 
void embedGsfTrack ()
 method to store the electron's GsfTrack internally More...
 
void embedPFCandidate ()
 embed the PFCandidate pointed to by pfCandidateRef_ More...
 
void embedSuperCluster ()
 method to store the electron's SuperCluster internally More...
 
void embedTrack ()
 method to store the electron's Track internally More...
 
reco::GsfTrackRef gsfTrack () const
 override the reco::GsfElectron::gsfTrack method, to access the internal storage of the supercluster More...
 
float hcalIso () const
 
bool isElectronIDAvailable (const std::string &name) const
 Returns true if a specific ID is available in this pat::Electron. More...
 
size_t numberOfSourceCandidatePtrs () const
 
reco::PFCandidateRef pfCandidateRef () const
 reference to the source PFCandidates More...
 
void setDB (double dB, double edB, IpType type=None)
 
void setEcalDrivenMomentum (const Candidate::LorentzVector &mom)
 
void setElectronIDs (const std::vector< IdPair > &ids)
 
void setPFCandidateRef (const reco::PFCandidateRef &ref)
 add a reference to the source IsolatedPFCandidate More...
 
reco::CandidatePtr sourceCandidatePtr (size_type i) const
 get the candidate pointer with index i More...
 
reco::SuperClusterRef superCluster () const
 override the reco::GsfElectron::superCluster method, to access the internal storage of the supercluster More...
 
reco::TrackRef track () const
 override the reco::GsfElectron::track method, to access the internal storage of the track More...
 
float trackIso () const
 
virtual ~Electron ()
 destructor More...
 
- Public Member Functions inherited from pat::Lepton< reco::GsfElectron >
float caloIso () const
 
float chargedHadronIso () const
 
float ecalIso () const
 
const IsoDepositecalIsoDeposit () const
 
void ecalIsoDeposit (const IsoDeposit &dep)
 
const reco::GenParticlegenLepton () const
 
float hcalIso () const
 
const IsoDeposithcalIsoDeposit () const
 
void hcalIsoDeposit (const IsoDeposit &dep)
 
const IsoDepositisoDeposit (IsolationKeys key) const
 Returns the IsoDeposit associated with some key, or a null pointer if it is not available. More...
 
 Lepton ()
 
 Lepton (const reco::GsfElectron &aLepton)
 
 Lepton (const edm::RefToBase< reco::GsfElectron > &aLeptonRef)
 
 Lepton (const edm::Ptr< reco::GsfElectron > &aLeptonRef)
 
float neutralHadronIso () const
 
float particleIso () const
 
float photonIso () 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 IsoDeposittrackIsoDeposit () const
 
void trackIsoDeposit (const IsoDeposit &dep)
 
float userIso (uint8_t index=0) const
 
const IsoDeposituserIsoDeposit (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 ()
 
- Public Member Functions inherited from pat::PATObject< reco::GsfElectron >
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::LookupTableRecordefficiency (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::GenParticlegenParticle (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::GenParticleRefgenParticleRefs () const
 
size_t genParticlesSize () const
 Number of generator level particles stored as ref or embedded. More...
 
const pat::CandKinResolutiongetKinResolution (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 hasUserInt (const std::string &key) const
 Return true if there is a user-defined int with a given name. More...
 
const reco::CandidateoriginalObject () 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::CandidatePtrVectoroverlaps (const std::string &label) const
 
 PATObject ()
 default constructor More...
 
 PATObject (const reco::GsfElectron &obj)
 constructor from a base object (leaves invalid reference to original object!) More...
 
 PATObject (const edm::RefToBase< reco::GsfElectron > &ref)
 constructor from reference More...
 
 PATObject (const edm::Ptr< reco::GsfElectron > &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 TriggerObjectStandAlonetriggerObjectMatch (const size_t idx=0) const
 get one matched trigger object by index More...
 
const TriggerObjectStandAlonetriggerObjectMatchByAlgorithm (const std::string &nameAlgorithm, const bool algoCondAccepted=true, const size_t idx=0) const
 
const TriggerObjectStandAlonetriggerObjectMatchByAlgorithm (const char *nameAlgorithm, const bool algoCondAccepted=true, const size_t idx=0) const
 
const TriggerObjectStandAlonetriggerObjectMatchByAlgorithm (const std::string &nameAlgorithm, const unsigned algoCondAccepted, const size_t idx=0) const
 
const TriggerObjectStandAlonetriggerObjectMatchByAlgorithm (const char *nameAlgorithm, const unsigned algoCondAccepted, const size_t idx=0) const
 
const TriggerObjectStandAlonetriggerObjectMatchByCollection (const std::string &coll, const size_t idx=0) const
 get one matched trigger object from a certain collection by index More...
 
const TriggerObjectStandAlonetriggerObjectMatchByCollection (const char *coll, const size_t idx=0) const
 
const TriggerObjectStandAlonetriggerObjectMatchByCondition (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 TriggerObjectStandAlonetriggerObjectMatchByCondition (const char *nameCondition, const size_t idx=0) const
 
const TriggerObjectStandAlonetriggerObjectMatchByFilter (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 TriggerObjectStandAlonetriggerObjectMatchByFilter (const char *labelFilter, const size_t idx=0) const
 
const TriggerObjectStandAlonetriggerObjectMatchByFilterID (const unsigned triggerObjectType, const size_t idx=0) const
 
const TriggerObjectStandAlonetriggerObjectMatchByPath (const std::string &namePath, const bool pathLastFilterAccepted=false, const bool pathL3FilterAccepted=true, const size_t idx=0) const
 
const TriggerObjectStandAlonetriggerObjectMatchByPath (const char *namePath, const bool pathLastFilterAccepted=false, const bool pathL3FilterAccepted=true, const size_t idx=0) const
 
const TriggerObjectStandAlonetriggerObjectMatchByPath (const std::string &namePath, const unsigned pathLastFilterAccepted, const unsigned pathL3FilterAccepted=1, const size_t idx=0) const
 
const TriggerObjectStandAlonetriggerObjectMatchByPath (const char *namePath, const unsigned pathLastFilterAccepted, const unsigned pathL3FilterAccepted=1, const size_t idx=0) const
 
const TriggerObjectStandAlonetriggerObjectMatchByType (const trigger::TriggerObjectType triggerObjectType, const size_t idx=0) const
 get one matched trigger object of a certain type by index More...
 
const TriggerObjectStandAlonetriggerObjectMatchByType (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
 
reco::CandidatePtr userCand (const std::string &key) const
 
const std::vector< std::string > & userCandNames () const
 Get list of user-defined cand names. More...
 
const TuserData (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
 
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...
 
- Public Member Functions inherited from reco::GsfElectron
void addAmbiguousGsfTrack (const reco::GsfTrackRef &t)
 
bool ambiguous () const
 
GsfTrackRefVector::const_iterator ambiguousGsfTracksBegin () const
 
GsfTrackRefVector::const_iterator ambiguousGsfTracksEnd () const
 
GsfTrackRefVector::size_type ambiguousGsfTracksSize () const
 
CaloCluster_iterator basicClustersBegin () const
 
CaloCluster_iterator basicClustersEnd () const
 
int basicClustersSize () const
 
float caloEnergy () const
 
math::XYZPoint caloPosition () const
 
P4Kind candidateP4Kind () const
 
const ChargeInfochargeInfo () const
 
Classification classification () const
 
void classifyElectron (Classification myclass)
 
void clearAmbiguousGsfTracks ()
 
GsfElectronclone (const GsfElectronCoreRef &core, const CaloClusterPtr &electronCluster, const TrackRef &closestCtfTrack, const TrackBaseRef &conversionPartner, const GsfTrackRefVector &ambiguousTracks) const
 
ClosestCtfTrack closestCtfTrack () const
 
TrackRef closestCtfTrackRef () const
 
float convDcot () const
 
float convDist () const
 
const ConversionRejectionconversionRejectionVariables () const
 
int convFlags () const
 
TrackBaseRef convPartner () const
 
float convRadius () const
 
void correctEcalEnergy (float newEnergy, float newEnergyError)
 
const Correctionscorrections () const
 
void correctMomentum (const LorentzVector &p4, float trackMomentumError, float p4Error)
 
float deltaEtaEleClusterTrackAtCalo () const
 
float deltaEtaSeedClusterTrackAtCalo () const
 
float deltaEtaSuperClusterTrackAtVtx () const
 
float deltaPhiEleClusterTrackAtCalo () const
 
float deltaPhiSeedClusterTrackAtCalo () const
 
float deltaPhiSuperClusterTrackAtVtx () const
 
float dr03EcalRecHitSumEt () const
 
float dr03HcalDepth1TowerSumEt () const
 
float dr03HcalDepth2TowerSumEt () const
 
float dr03HcalTowerSumEt () const
 
const IsolationVariablesdr03IsolationVariables () const
 
float dr03TkSumPt () const
 
float dr04EcalRecHitSumEt () const
 
float dr04HcalDepth1TowerSumEt () const
 
float dr04HcalDepth2TowerSumEt () const
 
float dr04HcalTowerSumEt () const
 
const IsolationVariablesdr04IsolationVariables () const
 
float dr04TkSumPt () const
 
float e1x5 () const
 
float e2x5Max () const
 
float e5x5 () const
 
bool ecalDriven () const
 
bool ecalDrivenSeed () const
 
float ecalEnergy () const
 
float ecalEnergyError () const
 
float eEleClusterOverPout () const
 
CaloClusterPtr electronCluster () const
 
float eSeedClusterOverP () const
 
float eSeedClusterOverPout () const
 
float eSuperClusterOverP () const
 
float fbrem () const
 
const FiducialFlagsfiducialFlags () const
 
 GsfElectron ()
 
 GsfElectron (const GsfElectronCoreRef &)
 
 GsfElectron (const GsfElectron &, const GsfElectronCoreRef &)
 
 GsfElectron (const GsfElectron &electron, const GsfElectronCoreRef &core, const CaloClusterPtr &electronCluster, const TrackRef &closestCtfTrack, const TrackBaseRef &conversionPartner, const GsfTrackRefVector &ambiguousTracks)
 
 GsfElectron (int charge, const ChargeInfo &, const GsfElectronCoreRef &, const TrackClusterMatching &, const TrackExtrapolations &, const ClosestCtfTrack &, const FiducialFlags &, const ShowerShape &, const ConversionRejection &, float fbrem)
 
float hadronicOverEm () const
 
float hadronicOverEm1 () const
 
float hadronicOverEm2 () const
 
float hcalDepth1OverEcal () const
 
float hcalDepth2OverEcal () const
 
float hcalOverEcal () const
 
bool isEB () const
 
bool isEBEEGap () const
 
bool isEBEtaGap () const
 
bool isEBGap () const
 
bool isEBPhiGap () const
 
bool isEcalEnergyCorrected () const
 
bool isEE () const
 
bool isEEDeeGap () const
 
bool isEEGap () const
 
bool isEERingGap () const
 
virtual bool isElectron () const
 
bool isEnergyScaleCorrected () const
 
bool isGap () const
 
bool isGsfCtfChargeConsistent () const
 
bool isGsfCtfScPixChargeConsistent () const
 
bool isGsfScPixChargeConsistent () const
 
const IsolationVariablesisolationVariables03 () const
 
const IsolationVariablesisolationVariables04 () const
 
float mva () const
 
const MvaInputmvaInput () const
 
const MvaOutputmvaOutput () const
 
int numberOfBrems () const
 
virtual bool overlap (const Candidate &) const
 check overlap with another candidate More...
 
const LorentzVectorp4 (P4Kind kind) const
 
float p4Error (P4Kind kind) const
 
bool passingCutBasedPreselection () const
 
bool passingMvaPreselection () const
 
const PflowIsolationVariablespfIsolationVariables () const
 
SuperClusterRef pflowSuperCluster () const
 
const ShowerShapepfShowerShape () const
 
float scE1x5 () const
 
float scE2x5Max () const
 
float scE5x5 () const
 
int scPixCharge () const
 
float scSigmaEtaEta () const
 
float scSigmaIEtaIEta () const
 
void setAmbiguous (bool flag)
 
void setCorrectedEcalEnergy (float newEnergy, float newEnergyError)
 
void setDeltaEtaSuperClusterAtVtx (float de)
 
void setDeltaPhiSuperClusterAtVtx (float dphi)
 
void setDr03Isolation (const IsolationVariables &dr03)
 
void setDr04Isolation (const IsolationVariables &dr04)
 
void setIsolation03 (const IsolationVariables &dr03)
 
void setIsolation04 (const IsolationVariables &dr04)
 
void setMvaInput (const MvaInput &mi)
 
void setMvaOutput (const MvaOutput &mo)
 
void setP4 (P4Kind kind, const LorentzVector &p4, float p4Error, bool setCandidate)
 
void setPassCutBasedPreselection (bool flag)
 
void setPassMvaPreselection (bool flag)
 
void setPfIsolationVariables (const PflowIsolationVariables &iso)
 
void setPfShowerShape (const ShowerShape &shape)
 
void setTrackMomentumError (float trackMomentumError)
 
float shFracInnerHits () const
 
const ShowerShapeshowerShape () const
 
float sigmaEtaEta () const
 
float sigmaIetaIeta () const
 
math::XYZPoint superClusterPosition () const
 
const TrackClusterMatchingtrackClusterMatching () const
 
bool trackerDrivenSeed () const
 
const TrackExtrapolationstrackExtrapolations () const
 
math::XYZVectorF trackMomentumAtCalo () const
 
math::XYZVectorF trackMomentumAtEleClus () const
 
math::XYZVectorF trackMomentumAtVtx () const
 
math::XYZVectorF trackMomentumAtVtxWithConstraint () const
 
float trackMomentumError () const
 
math::XYZVectorF trackMomentumOut () const
 
math::XYZPointF trackPositionAtCalo () const
 
math::XYZPointF TrackPositionAtCalo () const
 
math::XYZPointF trackPositionAtVtx () const
 
math::XYZPointF TrackPositionAtVtx () const
 
virtual ~GsfElectron ()
 
- Public Member Functions inherited from reco::RecoCandidate
const TrackbestTrack () const
 best track pointer More...
 
TrackBaseRef bestTrackRef () const
 best track RefToBase More...
 
TrackType bestTrackType () const
 track type More...
 
virtual CaloTowerRef caloTower () const
 reference to a CaloTower More...
 
virtual reco::TrackRef combinedMuon () const
 reference to a stand-alone muon Track More...
 
virtual size_t numberOfTracks () const
 number of multiple Tracks More...
 
 RecoCandidate ()
 default constructor More...
 
 RecoCandidate (Charge q, const LorentzVector &p4, const Point &vtx=Point(0, 0, 0), int pdgId=0, int status=0)
 constructor from values More...
 
 RecoCandidate (Charge q, const PolarLorentzVector &p4, const Point &vtx=Point(0, 0, 0), int pdgId=0, int status=0)
 constructor from values More...
 
virtual reco::TrackRef standAloneMuon () const
 reference to a stand-alone muon Track More...
 
virtual reco::TrackRef track (size_t) const
 reference to one of multiple Tracks More...
 
virtual ~RecoCandidate ()
 destructor More...
 
- Public Member Functions inherited from reco::LeafCandidate
virtual const_iterator begin () const
 first daughter const_iterator More...
 
virtual iterator begin ()
 first daughter iterator More...
 
template<typename S >
daughter_iterator< S >::type beginFilter (const S &s) const
 
virtual Vector boostToCM () const
 
virtual int charge () const
 electric charge More...
 
virtual const Candidatedaughter (size_type) const
 return daughter at a given position (throws an exception) More...
 
virtual Candidatedaughter (size_type)
 return daughter at a given position (throws an exception) More...
 
virtual Candidatedaughter (const std::string &s)
 return daughter with a specified role name More...
 
virtual const Candidatedaughter (const std::string &s) const
 return daughter with a specified role name More...
 
virtual const_iterator end () const
 last daughter const_iterator More...
 
virtual iterator end ()
 last daughter iterator More...
 
template<typename S >
daughter_iterator< S >::type endFilter (const S &s) const
 
virtual double energy () const
 energy More...
 
virtual double et () const
 transverse energy More...
 
virtual double eta () const
 momentum pseudorapidity More...
 
virtual void fillVertexCovariance (CovarianceMatrix &v) const
 fill SMatrix More...
 
template<typename T >
T get () const
 get a component More...
 
template<typename T , typename Tag >
T get () const
 get a component More...
 
template<typename T >
T get (size_type i) const
 get a component More...
 
template<typename T , typename Tag >
T get (size_type i) const
 get a component More...
 
virtual bool hasMasterClone () const
 
virtual bool hasMasterClonePtr () const
 
virtual bool isCaloMuon () const
 
virtual bool isConvertedPhoton () const
 
virtual bool isGlobalMuon () const
 
virtual bool isJet () const
 
virtual bool isMuon () const
 
virtual bool isPhoton () const
 
virtual bool isStandAloneMuon () const
 
virtual bool isTrackerMuon () const
 
 LeafCandidate ()
 default constructor More...
 
 LeafCandidate (const Candidate &c)
 
 LeafCandidate (Charge q, const LorentzVector &p4, const Point &vtx=Point(0, 0, 0), int pdgId=0, int status=0, bool integerCharge=true)
 constructor from values More...
 
 LeafCandidate (Charge q, const PolarLorentzVector &p4, const Point &vtx=Point(0, 0, 0), int pdgId=0, int status=0, bool integerCharge=true)
 constructor from values More...
 
virtual bool longLived () const
 is long lived? More...
 
virtual double mass () const
 mass More...
 
virtual bool massConstraint () const
 do mass constraint? More...
 
virtual double massSqr () const
 mass squared More...
 
virtual const CandidateBaseRefmasterClone () const
 
virtual const CandidatePtrmasterClonePtr () const
 
template<typename Ref >
Ref masterRef () const
 cast master clone reference to a concrete type More...
 
virtual Vector momentum () const
 spatial momentum vector More...
 
virtual const Candidatemother (size_type) const
 return mother at a given position (throws an exception) More...
 
virtual double mt () const
 transverse mass More...
 
virtual double mtSqr () const
 transverse mass squared More...
 
template<typename T >
size_type numberOf () const
 number of components More...
 
template<typename T , typename Tag >
size_type numberOf () const
 number of components More...
 
virtual size_t numberOfDaughters () const
 number of daughters More...
 
virtual size_t numberOfMothers () const
 number of mothers More...
 
virtual double p () const
 magnitude of momentum vector More...
 
virtual const LorentzVectorp4 () const
 four-momentum Lorentz vector More...
 
virtual int pdgId () const
 PDG identifier. More...
 
virtual double phi () const
 momentum azimuthal angle More...
 
virtual const PolarLorentzVectorpolarP4 () const
 four-momentum Lorentz vector More...
 
virtual double pt () const
 transverse momentum More...
 
virtual double px () const
 x coordinate of momentum vector More...
 
virtual double py () const
 y coordinate of momentum vector More...
 
virtual double pz () const
 z coordinate of momentum vector More...
 
virtual double rapidity () const
 rapidity More...
 
virtual void setCharge (Charge q)
 set electric charge More...
 
virtual void setLongLived ()
 set long lived flag More...
 
virtual void setMass (double m)
 set particle mass More...
 
virtual void setMassConstraint ()
 set mass constraint flag More...
 
virtual void setP4 (const LorentzVector &p4)
 set 4-momentum More...
 
virtual void setP4 (const PolarLorentzVector &p4)
 set 4-momentum More...
 
virtual void setPdgId (int pdgId)
 
virtual void setPz (double pz)
 
virtual void setStatus (int status)
 set status word More...
 
virtual void setThreeCharge (Charge qx3)
 set electric charge More...
 
virtual void setVertex (const Point &vertex)
 set vertex More...
 
virtual int status () const
 status word More...
 
virtual double theta () const
 momentum polar angle More...
 
virtual int threeCharge () const
 electric charge More...
 
virtual const Pointvertex () const
 vertex position More...
 
virtual double vertexChi2 () const
 chi-squares More...
 
virtual double vertexCovariance (int i, int j) const
 (i, j)-th element of error matrix, i, j = 0, ... 2 More...
 
CovarianceMatrix vertexCovariance () const
 return SMatrix More...
 
virtual double vertexNdof () const
 
virtual double vertexNormalizedChi2 () const
 chi-squared divided by n.d.o.f. More...
 
virtual double vx () const
 x coordinate of vertex position More...
 
virtual double vy () const
 y coordinate of vertex position More...
 
virtual double vz () const
 z coordinate of vertex position More...
 
virtual double y () const
 rapidity More...
 
virtual ~LeafCandidate ()
 destructor More...
 
- Public Member Functions inherited from reco::Candidate
template<typename S >
daughter_iterator< S >::type beginFilter (const S &s) const
 
 Candidate ()
 default constructor More...
 
template<typename S >
daughter_iterator< S >::type endFilter (const S &s) const
 
template<typename T >
T get () const
 get a component More...
 
template<typename T , typename Tag >
T get () const
 get a component More...
 
template<typename T >
T get (size_type i) const
 get a component More...
 
template<typename T , typename Tag >
T get (size_type i) const
 get a component More...
 
template<typename Ref >
Ref masterRef () const
 cast master clone reference to a concrete type More...
 
template<typename T >
size_type numberOf () const
 number of components More...
 
template<typename T , typename Tag >
size_type numberOf () const
 number of components More...
 
virtual void setSourceCandidatePtr (const CandidatePtr &ptr)
 Set the ptr to the source Candidate. More...
 
virtual ~Candidate ()
 destructor More...
 

Protected Member Functions

void initImpactParameters ()
 
- Protected Member Functions inherited from reco::RecoCandidate
template<typename R >
bool checkOverlap (const R &r1, const R &r2) const
 check if two components overlap More...
 
- Protected Member Functions inherited from reco::LeafCandidate
void cacheCartesian () const
 set internal cache More...
 
void cachePolar () const
 set internal cache More...
 
void clearCache () const
 clear internal cache More...
 

Protected Attributes

bool cachedDB_
 
std::vector< bool > cachedIP_
 
double dB_
 
LorentzVector ecalDrivenMomentum_
 ECAL-driven momentum. More...
 
double edB_
 
std::vector< double > eip_
 
std::vector< IdPairelectronIDs_
 
bool embeddedGsfElectronCore_
 
bool embeddedGsfTrack_
 
bool embeddedPFCandidate_
 true if the IsolatedPFCandidate is embedded More...
 
bool embeddedSuperCluster_
 
bool embeddedTrack_
 
std::vector
< reco::GsfElectronCore
gsfElectronCore_
 
std::vector< reco::GsfTrackgsfTrack_
 
std::vector< double > ip_
 
reco::PFCandidateCollection pfCandidate_
 
reco::PFCandidateRef pfCandidateRef_
 
std::vector< reco::SuperClustersuperCluster_
 
std::vector< reco::Tracktrack_
 
- Protected Attributes inherited from pat::Lepton< reco::GsfElectron >
IsoDepositPairs isoDeposits_
 
std::vector< float > isolations_
 
- Protected Attributes inherited from pat::PATObject< reco::GsfElectron >
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::GenParticlegenParticleEmbedded_
 vector to hold an embedded generator level particle More...
 
std::vector< reco::GenParticleRefgenParticleRef_
 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::CandidaterefToOrig_
 
TriggerObjectStandAloneCollection triggerObjectMatchesEmbedded_
 vector of trigger matches More...
 
std::vector< std::string > userCandLabels_
 
std::vector< reco::CandidatePtruserCands_
 
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_
 
- Protected Attributes inherited from reco::LeafCandidate
edm::BoolCache cacheCartesianFixed_
 
edm::BoolCache cachePolarFixed_
 has cache been set? More...
 
float eta_
 
float mass_
 
LorentzVector p4Cartesian_
 internal cache for p4 More...
 
PolarLorentzVector p4Polar_
 internal cache for p4 More...
 
int pdgId_
 PDG identifier. More...
 
float phi_
 
float pt_
 four-momentum Lorentz vector More...
 
Charge qx3_
 electric charge More...
 
int status_
 status word More...
 
Point vertex_
 vertex position More...
 

Friends

std::ostream & reco::operator<< (std::ostream &out, const pat::Electron &obj)
 pipe operator (introduced to use pat::Electron with PFTopProjectors) More...
 

Additional Inherited Members

- Static Public Attributes inherited from reco::LeafCandidate
static const unsigned int longLivedTag = 65536
 long lived flag More...
 
static const unsigned int massConstraintTag = 131072
 do mass constraint flag More...
 
- Protected Types inherited from pat::Lepton< reco::GsfElectron >
typedef std::vector< std::pair
< IsolationKeys,
pat::IsoDeposit > > 
IsoDepositPairs
 

Detailed Description

Analysis-level electron class.

pat::Electron implements the analysis-level electron class within the 'pat' namespace.

Please post comments and questions to the Physics Tools hypernews: https://hypernews.cern.ch/HyperNews/CMS/get/physTools.html

Author
Steven Lowette, Giovanni Petrucciani, Frederic Ronga
Version
Id:
Electron.h,v 1.33 2011/03/31 10:13:26 namapane Exp

Definition at line 50 of file Electron.h.

Member Typedef Documentation

typedef std::pair<std::string,float> pat::Electron::IdPair

Definition at line 54 of file Electron.h.

Member Enumeration Documentation

Enumerator
None 
PV2D 
PV3D 
BS2D 
BS3D 

Definition at line 166 of file Electron.h.

Constructor & Destructor Documentation

Electron::Electron ( )

default constructor

Definition at line 13 of file Electron.cc.

References initImpactParameters().

Referenced by clone().

13  :
16  embeddedGsfTrack_(false),
17  embeddedSuperCluster_(false),
18  embeddedTrack_(false),
19  embeddedPFCandidate_(false),
21  cachedDB_(false),
22  dB_(0.0),
23  edB_(0.0)
24 {
26 }
bool embeddedTrack_
Definition: Electron.h:188
double dB_
Definition: Electron.h:210
bool embeddedGsfElectronCore_
Definition: Electron.h:182
void initImpactParameters()
Definition: Electron.cc:98
double edB_
Definition: Electron.h:211
bool embeddedGsfTrack_
Definition: Electron.h:184
bool embeddedSuperCluster_
Definition: Electron.h:186
bool cachedDB_
Definition: Electron.h:209
LorentzVector ecalDrivenMomentum_
ECAL-driven momentum.
Definition: Electron.h:206
bool embeddedPFCandidate_
true if the IsolatedPFCandidate is embedded
Definition: Electron.h:196
math::PtEtaPhiELorentzVectorF LorentzVector
Electron::Electron ( const reco::GsfElectron anElectron)

constructor from a reco electron

constructor from reco::GsfElectron

Definition at line 29 of file Electron.cc.

References initImpactParameters().

29  :
30  Lepton<reco::GsfElectron>(anElectron),
32  embeddedGsfTrack_(false),
33  embeddedSuperCluster_(false),
34  embeddedTrack_(false),
35  embeddedPFCandidate_(false),
36  ecalDrivenMomentum_(anElectron.p4()),
37  cachedDB_(false),
38  dB_(0.0),
39  edB_(0.0)
40 {
42 }
bool embeddedTrack_
Definition: Electron.h:188
const LorentzVector & p4(P4Kind kind) const
Definition: GsfElectron.cc:196
double dB_
Definition: Electron.h:210
bool embeddedGsfElectronCore_
Definition: Electron.h:182
void initImpactParameters()
Definition: Electron.cc:98
double edB_
Definition: Electron.h:211
bool embeddedGsfTrack_
Definition: Electron.h:184
bool embeddedSuperCluster_
Definition: Electron.h:186
bool cachedDB_
Definition: Electron.h:209
LorentzVector ecalDrivenMomentum_
ECAL-driven momentum.
Definition: Electron.h:206
bool embeddedPFCandidate_
true if the IsolatedPFCandidate is embedded
Definition: Electron.h:196
Electron::Electron ( const edm::RefToBase< reco::GsfElectron > &  anElectronRef)

constructor from a RefToBase to a reco electron (to be superseded by Ptr counterpart)

constructor from ref to reco::GsfElectron

Definition at line 45 of file Electron.cc.

References initImpactParameters().

45  :
46  Lepton<reco::GsfElectron>(anElectronRef),
48  embeddedGsfTrack_(false),
49  embeddedSuperCluster_(false),
50  embeddedTrack_(false),
51  embeddedPFCandidate_(false),
52  ecalDrivenMomentum_(anElectronRef->p4()),
53  cachedDB_(false),
54  dB_(0.0),
55  edB_(0.0)
56 {
58 }
bool embeddedTrack_
Definition: Electron.h:188
const LorentzVector & p4(P4Kind kind) const
Definition: GsfElectron.cc:196
double dB_
Definition: Electron.h:210
bool embeddedGsfElectronCore_
Definition: Electron.h:182
void initImpactParameters()
Definition: Electron.cc:98
double edB_
Definition: Electron.h:211
bool embeddedGsfTrack_
Definition: Electron.h:184
bool embeddedSuperCluster_
Definition: Electron.h:186
bool cachedDB_
Definition: Electron.h:209
LorentzVector ecalDrivenMomentum_
ECAL-driven momentum.
Definition: Electron.h:206
bool embeddedPFCandidate_
true if the IsolatedPFCandidate is embedded
Definition: Electron.h:196
Electron::Electron ( const edm::Ptr< reco::GsfElectron > &  anElectronRef)

constructor from a Ptr to a reco electron

constructor from Ptr to reco::GsfElectron

Definition at line 61 of file Electron.cc.

References initImpactParameters().

61  :
62  Lepton<reco::GsfElectron>(anElectronRef),
64  embeddedGsfTrack_(false),
65  embeddedSuperCluster_(false),
66  embeddedTrack_(false),
67  embeddedPFCandidate_(false),
68  ecalDrivenMomentum_(anElectronRef->p4()),
69  cachedDB_(false),
70  dB_(0.0),
71  edB_(0.0)
72 {
74 }
bool embeddedTrack_
Definition: Electron.h:188
double dB_
Definition: Electron.h:210
bool embeddedGsfElectronCore_
Definition: Electron.h:182
void initImpactParameters()
Definition: Electron.cc:98
double edB_
Definition: Electron.h:211
bool embeddedGsfTrack_
Definition: Electron.h:184
bool embeddedSuperCluster_
Definition: Electron.h:186
bool cachedDB_
Definition: Electron.h:209
LorentzVector ecalDrivenMomentum_
ECAL-driven momentum.
Definition: Electron.h:206
bool embeddedPFCandidate_
true if the IsolatedPFCandidate is embedded
Definition: Electron.h:196
Electron::~Electron ( )
virtual

destructor

Definition at line 77 of file Electron.cc.

77  {
78 }

Member Function Documentation

float pat::Electron::caloIso ( ) const
inline

Overload of pat::Lepton::trackIso(); returns the sum of ecalIso() and hcalIso

Definition at line 128 of file Electron.h.

References ecalIso(), and hcalIso().

128 { return ecalIso()+hcalIso(); }
float ecalIso() const
Definition: Electron.h:121
float hcalIso() const
Definition: Electron.h:125
virtual Electron* pat::Electron::clone ( void  ) const
inlinevirtual

required reimplementation of the Candidate's clone method

Reimplemented from pat::Lepton< reco::GsfElectron >.

Definition at line 68 of file Electron.h.

References Electron().

68 { return new Electron(*this); }
Electron()
default constructor
Definition: Electron.cc:13
reco::GsfElectronCoreRef Electron::core ( ) const
virtual

override the virtual reco::GsfElectron::core method, so that the embedded core can be used by GsfElectron client methods

Reimplemented from reco::GsfElectron.

Definition at line 117 of file Electron.cc.

References reco::GsfElectron::core(), embeddedGsfElectronCore_, and gsfElectronCore_.

117  {
120  } else {
121  return reco::GsfElectron::core();
122  }
123 }
edm::Ref< GsfElectronCoreCollection > GsfElectronCoreRef
bool embeddedGsfElectronCore_
Definition: Electron.h:182
std::vector< reco::GsfElectronCore > gsfElectronCore_
Definition: Electron.h:183
virtual GsfElectronCoreRef core() const
Definition: GsfElectron.cc:8
double Electron::dB ( IpType  type_ = None) const

dB gives the impact parameter wrt the beamline. If this is not cached it is not meaningful, since it relies on the distance to the beamline.

Definition at line 237 of file Electron.cc.

References cachedDB_, cachedIP_, dB_, ip_, max(), and None.

Referenced by WenuPlots::analyze(), ElectronVPlusJetsIDSelectionFunctor::firstDataCuts(), WenuPlots::ReturnCandVar(), ZeePlots::ReturnCandVar(), setDB(), and PFElectronSelector::spring11Cuts().

237  {
238  // preserve old functionality exactly
239  if (type_ == None){
240  if ( cachedDB_ ) {
241  return dB_;
242  } else {
244  }
245  }
246  // more IP types (new)
247  else if ( cachedIP_[type_] ) {
248  return ip_[type_];
249  } else {
251  }
252 }
double dB_
Definition: Electron.h:210
const T & max(const T &a, const T &b)
bool cachedDB_
Definition: Electron.h:209
std::vector< double > ip_
Definition: Electron.h:215
std::vector< bool > cachedIP_
Definition: Electron.h:214
const LorentzVector& pat::Electron::ecalDrivenMomentum ( ) const
inline

Definition at line 172 of file Electron.h.

References ecalDrivenMomentum_.

172 {return ecalDrivenMomentum_;}
LorentzVector ecalDrivenMomentum_
ECAL-driven momentum.
Definition: Electron.h:206
float pat::Electron::ecalIso ( ) const
inline

Overload of pat::Lepton::trackIso(); returns the value of the summed Et of all recHits in the ecal in a cone of deltaR<0.4

Definition at line 121 of file Electron.h.

References reco::GsfElectron::dr04EcalRecHitSumEt().

Referenced by caloIso().

121 { return dr04EcalRecHitSumEt(); }
float dr04EcalRecHitSumEt() const
Definition: GsfElectron.h:437
double Electron::edB ( IpType  type_ = None) const

edB gives the uncertainty on the impact parameter wrt the beamline. If this is not cached it is not meaningful, since it relies on the distance to the beamline.

Definition at line 257 of file Electron.cc.

References cachedDB_, cachedIP_, edB_, eip_, max(), and None.

Referenced by ElectronVPlusJetsIDSelectionFunctor::firstDataCuts(), and setDB().

257  {
258  // preserve old functionality exactly
259  if (type_ == None) {
260  if ( cachedDB_ ) {
261  return edB_;
262  } else {
264  }
265  }
266  // more IP types (new)
267  else if ( cachedIP_[type_] ) {
268  return eip_[type_];
269  } else {
271  }
272 
273 }
const T & max(const T &a, const T &b)
double edB_
Definition: Electron.h:211
bool cachedDB_
Definition: Electron.h:209
std::vector< bool > cachedIP_
Definition: Electron.h:214
std::vector< double > eip_
Definition: Electron.h:216
float Electron::electronID ( const std::string &  name) const

Returns a specific electron ID associated to the pat::Electron given its name For cut-based IDs, the value map has the following meaning: 0: fails 1: passes electron ID only 2: passes electron Isolation only 3: passes electron ID and Isolation only 4: passes conversion rejection 5: passes conversion rejection and ID 6: passes conversion rejection and Isolation 7: passes the whole selection For more details have a look at: https://twiki.cern.ch/twiki/bin/view/CMS/SimpleCutBasedEleID https://twiki.cern.ch/twiki/bin/view/CMS/SWGuideCategoryBasedElectronID Note: an exception is thrown if the specified ID is not available

Definition at line 184 of file Electron.cc.

References electronIDs_.

Referenced by WenuPlots::analyze(), WenuPlots::CheckCuts(), ZeePlots::CheckCuts1(), ZeePlots::CheckCuts2(), and PFElectronSelector::spring11Cuts().

184  {
185  for (std::vector<IdPair>::const_iterator it = electronIDs_.begin(), ed = electronIDs_.end(); it != ed; ++it) {
186  if (it->first == name) return it->second;
187  }
188  cms::Exception ex("Key not found");
189  ex << "pat::Electron: the ID " << name << " can't be found in this pat::Electron.\n";
190  ex << "The available IDs are: ";
191  for (std::vector<IdPair>::const_iterator it = electronIDs_.begin(), ed = electronIDs_.end(); it != ed; ++it) {
192  ex << "'" << it->first << "' ";
193  }
194  ex << ".\n";
195  throw ex;
196 }
std::vector< IdPair > electronIDs_
Definition: Electron.h:192
const std::vector<IdPair>& pat::Electron::electronIDs ( ) const
inline

Returns all the electron IDs in the form of <name,value> pairs The 'default' ID is the first in the list

Definition at line 109 of file Electron.h.

References electronIDs_.

109 { return electronIDs_; }
std::vector< IdPair > electronIDs_
Definition: Electron.h:192
void Electron::embedGsfElectronCore ( )

method to store the electron's core internally

method to store the electron's gsfElectronCore internally

Definition at line 146 of file Electron.cc.

References reco::GsfElectron::core(), embeddedGsfElectronCore_, and gsfElectronCore_.

Referenced by pat::PATElectronProducer::fillElectron(), and pat::PATElectronProducer::fillElectron2().

146  {
147  gsfElectronCore_.clear();
148  if (reco::GsfElectron::core().isNonnull()) {
151  }
152 }
bool embeddedGsfElectronCore_
Definition: Electron.h:182
std::vector< reco::GsfElectronCore > gsfElectronCore_
Definition: Electron.h:183
virtual GsfElectronCoreRef core() const
Definition: GsfElectron.cc:8
void Electron::embedGsfTrack ( )

method to store the electron's GsfTrack internally

method to store the electron's gsfTrack internally

Definition at line 155 of file Electron.cc.

References embeddedGsfTrack_, reco::GsfElectron::gsfTrack(), and gsfTrack_.

Referenced by pat::PATElectronProducer::fillElectron(), and pat::PATElectronProducer::fillElectron2().

155  {
156  gsfTrack_.clear();
157  if (reco::GsfElectron::gsfTrack().isNonnull()) {
159  embeddedGsfTrack_ = true;
160  }
161 }
std::vector< reco::GsfTrack > gsfTrack_
Definition: Electron.h:185
GsfTrackRef gsfTrack() const
reference to a GsfTrack
Definition: GsfElectron.h:169
bool embeddedGsfTrack_
Definition: Electron.h:184
void Electron::embedPFCandidate ( )

embed the PFCandidate pointed to by pfCandidateRef_

embed the IsolatedPFCandidate pointed to by pfCandidateRef_

Definition at line 215 of file Electron.cc.

References embeddedPFCandidate_, edm::Ref< C, T, F >::isAvailable(), edm::Ref< C, T, F >::isNonnull(), pfCandidate_, and pfCandidateRef_.

Referenced by pat::PATElectronProducer::produce().

215  {
216  pfCandidate_.clear();
218  pfCandidate_.push_back( *pfCandidateRef_ );
219  embeddedPFCandidate_ = true;
220  }
221 }
bool isAvailable() const
Definition: Ref.h:275
bool isNonnull() const
Checks for non-null.
Definition: Ref.h:249
reco::PFCandidateCollection pfCandidate_
Definition: Electron.h:199
reco::PFCandidateRef pfCandidateRef_
Definition: Electron.h:202
bool embeddedPFCandidate_
true if the IsolatedPFCandidate is embedded
Definition: Electron.h:196
void Electron::embedSuperCluster ( )

method to store the electron's SuperCluster internally

method to store the electron's supercluster internally

Definition at line 165 of file Electron.cc.

References embeddedSuperCluster_, reco::GsfElectron::superCluster(), and superCluster_.

Referenced by pat::PATElectronProducer::fillElectron(), and pat::PATElectronProducer::fillElectron2().

165  {
166  superCluster_.clear();
167  if (reco::GsfElectron::superCluster().isNonnull()) {
169  embeddedSuperCluster_ = true;
170  }
171 }
std::vector< reco::SuperCluster > superCluster_
Definition: Electron.h:187
SuperClusterRef superCluster() const
reference to a SuperCluster
Definition: GsfElectron.h:168
bool embeddedSuperCluster_
Definition: Electron.h:186
void Electron::embedTrack ( )

method to store the electron's Track internally

method to store the electron's track internally

Definition at line 175 of file Electron.cc.

References embeddedTrack_, reco::RecoCandidate::track(), and track_.

Referenced by pat::PATElectronProducer::fillElectron(), and pat::PATElectronProducer::fillElectron2().

175  {
176  track_.clear();
177  if (reco::GsfElectron::track().isNonnull()) {
178  track_.push_back(*reco::GsfElectron::track());
179  embeddedTrack_ = true;
180  }
181 }
bool embeddedTrack_
Definition: Electron.h:188
std::vector< reco::Track > track_
Definition: Electron.h:189
virtual reco::TrackRef track() const
reference to a Track
reco::GsfTrackRef Electron::gsfTrack ( ) const
virtual

override the reco::GsfElectron::gsfTrack method, to access the internal storage of the supercluster

Reimplemented from reco::GsfElectron.

Definition at line 108 of file Electron.cc.

References embeddedGsfTrack_, reco::GsfElectron::gsfTrack(), and gsfTrack_.

Referenced by WenuPlots::analyze(), pat::TrackerIsolationPt::calculate(), pat::CaloIsolationEnergy::calculate(), pat::LeptonVertexSignificance::calculate(), SimpleCutBasedElectronIDSelectionFunctor::spring10Variables(), and PFElectronSelector::spring11Cuts().

108  {
109  if (embeddedGsfTrack_) {
110  return reco::GsfTrackRef(&gsfTrack_, 0);
111  } else {
113  }
114 }
edm::Ref< GsfTrackCollection > GsfTrackRef
persistent reference to a GsfTrack
Definition: GsfTrackFwd.h:13
std::vector< reco::GsfTrack > gsfTrack_
Definition: Electron.h:185
GsfTrackRef gsfTrack() const
reference to a GsfTrack
Definition: GsfElectron.h:169
bool embeddedGsfTrack_
Definition: Electron.h:184
float pat::Electron::hcalIso ( ) const
inline

Overload of pat::Lepton::trackIso(); returns the value of the summed Et of all caloTowers in the hcal in a cone of deltaR<0.4

Definition at line 125 of file Electron.h.

References reco::GsfElectron::dr04HcalTowerSumEt().

Referenced by caloIso().

125 { return dr04HcalTowerSumEt(); }
float dr04HcalTowerSumEt() const
Definition: GsfElectron.h:440
void Electron::initImpactParameters ( )
protected

Definition at line 98 of file Electron.cc.

References cachedIP_, eip_, and ip_.

Referenced by Electron().

98  {
99  for (int i_ = 0; i_<5; ++i_){
100  ip_.push_back(0.0);
101  eip_.push_back(0.0);
102  cachedIP_.push_back(false);
103  }
104 }
std::vector< double > ip_
Definition: Electron.h:215
std::vector< bool > cachedIP_
Definition: Electron.h:214
std::vector< double > eip_
Definition: Electron.h:216
bool Electron::isElectronIDAvailable ( const std::string &  name) const

Returns true if a specific ID is available in this pat::Electron.

Definition at line 198 of file Electron.cc.

References electronIDs_.

Referenced by WenuPlots::analyze().

198  {
199  for (std::vector<IdPair>::const_iterator it = electronIDs_.begin(), ed = electronIDs_.end(); it != ed; ++it) {
200  if (it->first == name) return true;
201  }
202  return false;
203 }
std::vector< IdPair > electronIDs_
Definition: Electron.h:192
size_t pat::Electron::numberOfSourceCandidatePtrs ( ) const
inlinevirtual

return the number of source Candidates ( the candidates used to construct this Candidate)

Reimplemented from reco::LeafCandidate.

Definition at line 141 of file Electron.h.

References edm::Ref< C, T, F >::isNonnull(), and pfCandidateRef_.

141  {
142  return pfCandidateRef_.isNonnull() ? 1 : 0;
143  }
bool isNonnull() const
Checks for non-null.
Definition: Ref.h:249
reco::PFCandidateRef pfCandidateRef_
Definition: Electron.h:202
reco::PFCandidateRef Electron::pfCandidateRef ( ) const

reference to the source PFCandidates

reference to the source PFCandidates null if this has been built from a standard electron

Definition at line 207 of file Electron.cc.

References embeddedPFCandidate_, pfCandidate_, and pfCandidateRef_.

Referenced by pat::PATElectronProducer::fillElectron(), pat::PATElectronProducer::fillElectron2(), and pat::PATElectronProducer::produce().

207  {
208  if (embeddedPFCandidate_) {
210  } else {
211  return pfCandidateRef_;
212  }
213 }
edm::Ref< PFCandidateCollection > PFCandidateRef
persistent reference to a PFCandidate
reco::PFCandidateCollection pfCandidate_
Definition: Electron.h:199
reco::PFCandidateRef pfCandidateRef_
Definition: Electron.h:202
bool embeddedPFCandidate_
true if the IsolatedPFCandidate is embedded
Definition: Electron.h:196
void Electron::setDB ( double  dB,
double  edB,
IpType  type = None 
)

Definition at line 275 of file Electron.cc.

References cachedDB_, cachedIP_, dB(), dB_, edB(), edB_, eip_, ip_, and None.

Referenced by pat::PATElectronProducer::embedHighLevel(), and pat::PATElectronProducer::produce().

275  {
276  if (type == None) { // Preserve old functionality exactly
277  dB_ = dB; edB_ = edB;
278  cachedDB_ = true;
279  } else {
280  ip_[type] = dB;
281  eip_[type] = edB;
282  cachedIP_[type] = true;
283  }
284 }
double edB(IpType type=None) const
Definition: Electron.cc:257
type
Definition: HCALResponse.h:22
double dB_
Definition: Electron.h:210
double edB_
Definition: Electron.h:211
bool cachedDB_
Definition: Electron.h:209
std::vector< double > ip_
Definition: Electron.h:215
std::vector< bool > cachedIP_
Definition: Electron.h:214
double dB(IpType type=None) const
Definition: Electron.cc:237
std::vector< double > eip_
Definition: Electron.h:216
void pat::Electron::setEcalDrivenMomentum ( const Candidate::LorentzVector mom)
inline

Definition at line 173 of file Electron.h.

References ecalDrivenMomentum_.

Referenced by pat::PATElectronProducer::fillElectron2().

173 {ecalDrivenMomentum_=mom;}
LorentzVector ecalDrivenMomentum_
ECAL-driven momentum.
Definition: Electron.h:206
void pat::Electron::setElectronIDs ( const std::vector< IdPair > &  ids)
inline

Store multiple electron ID values, discarding existing ones The first one in the list becomes the 'default' electron id

Definition at line 112 of file Electron.h.

References electronIDs_.

Referenced by pat::PATElectronProducer::produce().

112 { electronIDs_ = ids; }
std::vector< IdPair > electronIDs_
Definition: Electron.h:192
void pat::Electron::setPFCandidateRef ( const reco::PFCandidateRef ref)
inline

add a reference to the source IsolatedPFCandidate

Definition at line 135 of file Electron.h.

References pfCandidateRef_.

Referenced by pat::PATElectronProducer::produce().

135  {
136  pfCandidateRef_ = ref;
137  }
reco::PFCandidateRef pfCandidateRef_
Definition: Electron.h:202
reco::CandidatePtr Electron::sourceCandidatePtr ( size_type  i) const
virtual

get the candidate pointer with index i

reference to the parent PF candidate for use in TopProjector

Reimplemented from reco::LeafCandidate.

Definition at line 224 of file Electron.cc.

References embeddedPFCandidate_, edm::Ref< C, T, F >::get(), edm::Ref< C, T, F >::id(), edm::Ref< C, T, F >::key(), and pfCandidateRef_.

224  {
225  if (embeddedPFCandidate_) {
227  } else {
228  return reco::CandidatePtr();
229  }
230 }
edm::Ptr< Candidate > CandidatePtr
persistent reference to an object in a collection of Candidate objects
Definition: CandidateFwd.h:25
key_type key() const
Accessor for product key.
Definition: Ref.h:265
reco::PFCandidateRef pfCandidateRef_
Definition: Electron.h:202
ProductID id() const
Accessor for product ID.
Definition: Ref.h:255
T const * get() const
Returns C++ pointer to the item.
Definition: Ref.h:241
bool embeddedPFCandidate_
true if the IsolatedPFCandidate is embedded
Definition: Electron.h:196
reco::SuperClusterRef Electron::superCluster ( ) const
virtual

override the reco::GsfElectron::superCluster method, to access the internal storage of the supercluster

Reimplemented from reco::GsfElectron.

Definition at line 127 of file Electron.cc.

References embeddedSuperCluster_, reco::GsfElectron::superCluster(), and superCluster_.

Referenced by WenuPlots::analyze(), WenuPlots::CheckCut(), ZeePlots::CheckCut1(), ZeePlots::CheckCut1Inv(), ZeePlots::CheckCut2(), ZeePlots::CheckCut2Inv(), and WenuPlots::CheckCutInv().

127  {
128  if (embeddedSuperCluster_) {
130  } else {
132  }
133 }
std::vector< reco::SuperCluster > superCluster_
Definition: Electron.h:187
SuperClusterRef superCluster() const
reference to a SuperCluster
Definition: GsfElectron.h:168
edm::Ref< SuperClusterCollection > SuperClusterRef
reference to an object in a collection of SuperCluster objects
bool embeddedSuperCluster_
Definition: Electron.h:186
reco::TrackRef Electron::track ( void  ) const
virtual

override the reco::GsfElectron::track method, to access the internal storage of the track

Reimplemented from reco::RecoCandidate.

Definition at line 137 of file Electron.cc.

References embeddedTrack_, reco::RecoCandidate::track(), and track_.

137  {
138  if (embeddedTrack_) {
139  return reco::TrackRef(&track_, 0);
140  } else {
141  return reco::GsfElectron::track();
142  }
143 }
bool embeddedTrack_
Definition: Electron.h:188
std::vector< reco::Track > track_
Definition: Electron.h:189
virtual reco::TrackRef track() const
reference to a Track
edm::Ref< TrackCollection > TrackRef
persistent reference to a Track
Definition: TrackFwd.h:14
float pat::Electron::trackIso ( ) const
inline

Overload of pat::Lepton::trackIso(); returns the value of the summed track pt in a cone of deltaR<0.4

Definition at line 117 of file Electron.h.

References reco::GsfElectron::dr04TkSumPt().

117 { return dr04TkSumPt(); }
float dr04TkSumPt() const
Definition: GsfElectron.h:436

Friends And Related Function Documentation

std::ostream& reco::operator<< ( std::ostream &  out,
const pat::Electron obj 
)
friend

pipe operator (introduced to use pat::Electron with PFTopProjectors)

Member Data Documentation

bool pat::Electron::cachedDB_
protected

Definition at line 209 of file Electron.h.

Referenced by dB(), edB(), and setDB().

std::vector<bool> pat::Electron::cachedIP_
protected

Definition at line 214 of file Electron.h.

Referenced by dB(), edB(), initImpactParameters(), and setDB().

double pat::Electron::dB_
protected

Definition at line 210 of file Electron.h.

Referenced by dB(), and setDB().

LorentzVector pat::Electron::ecalDrivenMomentum_
protected

ECAL-driven momentum.

Definition at line 206 of file Electron.h.

Referenced by ecalDrivenMomentum(), and setEcalDrivenMomentum().

double pat::Electron::edB_
protected

Definition at line 211 of file Electron.h.

Referenced by edB(), and setDB().

std::vector<double> pat::Electron::eip_
protected

Definition at line 216 of file Electron.h.

Referenced by edB(), initImpactParameters(), and setDB().

std::vector<IdPair> pat::Electron::electronIDs_
protected

Definition at line 192 of file Electron.h.

Referenced by electronID(), electronIDs(), isElectronIDAvailable(), and setElectronIDs().

bool pat::Electron::embeddedGsfElectronCore_
protected

Definition at line 182 of file Electron.h.

Referenced by core(), and embedGsfElectronCore().

bool pat::Electron::embeddedGsfTrack_
protected

Definition at line 184 of file Electron.h.

Referenced by embedGsfTrack(), and gsfTrack().

bool pat::Electron::embeddedPFCandidate_
protected

true if the IsolatedPFCandidate is embedded

Definition at line 196 of file Electron.h.

Referenced by embedPFCandidate(), pfCandidateRef(), and sourceCandidatePtr().

bool pat::Electron::embeddedSuperCluster_
protected

Definition at line 186 of file Electron.h.

Referenced by embedSuperCluster(), and superCluster().

bool pat::Electron::embeddedTrack_
protected

Definition at line 188 of file Electron.h.

Referenced by embedTrack(), and track().

std::vector<reco::GsfElectronCore> pat::Electron::gsfElectronCore_
protected

Definition at line 183 of file Electron.h.

Referenced by core(), and embedGsfElectronCore().

std::vector<reco::GsfTrack> pat::Electron::gsfTrack_
protected

Definition at line 185 of file Electron.h.

Referenced by embedGsfTrack(), and gsfTrack().

std::vector<double> pat::Electron::ip_
protected

Definition at line 215 of file Electron.h.

Referenced by dB(), initImpactParameters(), and setDB().

reco::PFCandidateCollection pat::Electron::pfCandidate_
protected

if embeddedPFCandidate_, a copy of the source IsolatedPFCandidate is stored in this vector

Definition at line 199 of file Electron.h.

Referenced by embedPFCandidate(), and pfCandidateRef().

reco::PFCandidateRef pat::Electron::pfCandidateRef_
protected

reference to the IsolatedPFCandidate this has been built from null if this has been built from a standard electron

Definition at line 202 of file Electron.h.

Referenced by embedPFCandidate(), numberOfSourceCandidatePtrs(), pfCandidateRef(), setPFCandidateRef(), and sourceCandidatePtr().

std::vector<reco::SuperCluster> pat::Electron::superCluster_
protected

Definition at line 187 of file Electron.h.

Referenced by embedSuperCluster(), and superCluster().

std::vector<reco::Track> pat::Electron::track_
protected

Definition at line 189 of file Electron.h.

Referenced by embedTrack(), and track().