CMS 3D CMS Logo

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

Analysis-level Generic Particle class (e.g. for hadron or muon not fully reconstructed) More...

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

Inheritance diagram for pat::GenericParticle:
pat::PATObject< reco::RecoCandidate > reco::RecoCandidate reco::LeafCandidate reco::Candidate

Public Member Functions

float caloIso () const
 
virtual CaloTowerRef caloTower () const
 
virtual GenericParticleclone () const
 required reimplementation of the Candidate's clone method More...
 
virtual reco::TrackRef combinedMuon () const
 
float ecalIso () const
 
const IsoDepositecalIsoDeposit () const
 
void ecalIsoDeposit (const IsoDeposit &dep)
 
void embedCaloTower ()
 embeds the calotower instead of keeping a reference to it More...
 
void embedCombined ()
 embeds the combined track instead of keeping a reference to it More...
 
void embedGsfTrack ()
 embeds the gsf track instead of keeping a reference to it More...
 
void embedStandalone ()
 embeds the stand-alone track instead of keeping a reference to it More...
 
void embedSuperCluster ()
 embeds the supercluster instead of keeping a reference to it More...
 
void embedTrack ()
 embeds the master track instead of keeping a reference to it More...
 
void embedTracks ()
 embeds the other tracks instead of keeping references More...
 
 GenericParticle ()
 default constructor More...
 
 GenericParticle (const reco::Candidate &aGenericParticle)
 constructor from Candidate More...
 
 GenericParticle (const edm::RefToBase< reco::Candidate > &aGenericParticleRef)
 constructor from ref to Candidate More...
 
 GenericParticle (const edm::Ptr< reco::Candidate > &aGenericParticleRef)
 constructor from ref to Candidate More...
 
virtual reco::GsfTrackRef gsfTrack () 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...
 
virtual size_t numberOfTracks () const
 number of multiple tracks (not including the master one) More...
 
virtual bool overlap (const Candidate &) const
 
float quality ()
 returns a user defined quality value, if set by the user to some meaningful value More...
 
virtual void setCaloTower (const CaloTowerRef &ref, bool embed=false)
 sets calotower reference (or even embed it into the object) More...
 
virtual void setCombinedMuon (const reco::TrackRef &ref, bool embed=false)
 sets combined muon track reference (or even embed it into the object) More...
 
void setEcalIso (float caloIso)
 Sets ecal isolation variable. More...
 
virtual void setGsfTrack (const reco::GsfTrackRef &ref, bool embed=false)
 sets gsf track reference (or even embed it into the object) More...
 
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 setQuality (float quality)
 sets a user defined quality value More...
 
virtual void setStandAloneMuon (const reco::TrackRef &ref, bool embed=false)
 sets stand-alone muon track reference (or even embed it into the object) More...
 
virtual void setSuperCluster (const reco::SuperClusterRef &ref, bool embed=false)
 sets supercluster reference (or even embed it into the object) More...
 
virtual void setTrack (const reco::TrackRef &ref, bool embed=false)
 sets master track reference (or even embed it into the object) More...
 
void setTrackIso (float trackIso)
 Sets tracker isolation variable. More...
 
virtual void setTracks (const reco::TrackRefVector &refs, bool embed=false)
 sets multiple track references (or even embed the tracks into the object - whatch out for disk size issues!) More...
 
void setUserIso (float value, uint8_t index=0)
 Sets user isolation variable index. More...
 
void setVertexAssociation (const pat::VertexAssociation &assoc)
 Set a single vertex association. More...
 
void setVertexAssociations (const std::vector< pat::VertexAssociation > &assocs)
 Set multiple vertex associations. More...
 
virtual reco::TrackRef standAloneMuon () const
 
virtual reco::SuperClusterRef superCluster () const
 
virtual reco::TrackRef track () const
 
virtual reco::TrackRef track (size_t idx) const
 
float trackIso () const
 
const IsoDeposittrackIsoDeposit () const
 
void trackIsoDeposit (const IsoDeposit &dep)
 
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
 
const pat::VertexAssociationvertexAssociation (size_t index=0) const
 Vertex association (or associations, if any). Return null pointer if none has been set. More...
 
const std::vector
< pat::VertexAssociation > & 
vertexAssociations () const
 Vertex associations. Can be empty if it was not enabled in the config file. More...
 
virtual ~GenericParticle ()
 destructor More...
 
- Public Member Functions inherited from pat::PATObject< reco::RecoCandidate >
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 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::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::RecoCandidate &obj)
 constructor from a base object (leaves invalid reference to original object!) More...
 
 PATObject (const edm::RefToBase< reco::RecoCandidate > &ref)
 constructor from reference More...
 
 PATObject (const edm::Ptr< reco::RecoCandidate > &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
 
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 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
 
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...
 
- Public Member Functions inherited from reco::RecoCandidate
virtual const TrackbestTrack () const
 best track pointer More...
 
virtual TrackBaseRef bestTrackRef () const
 best track RefToBase More...
 
virtual TrackType bestTrackType () const
 track type More...
 
virtual float dxyError () const
 uncertainty on dxy More...
 
virtual float dzError () const
 uncertainty on dz More...
 
virtual bool overlap (const Candidate &) const =0
 check overlap with another candidate More...
 
 RecoCandidate ()
 default constructor More...
 
template<typename P4 >
 RecoCandidate (Charge q, const P4 &p4, const Point &vtx=Point(0, 0, 0), int pdgId=0, int status=0)
 constructor from values More...
 
virtual ~RecoCandidate ()
 destructor More...
 
- Public Member Functions inherited from reco::LeafCandidate
virtual Vector boostToCM () const
 
virtual int charge () const
 electric charge More...
 
void construct (int qx3, float pt, float eta, float phi, float mass, const Point &vtx, int pdgId, int status)
 
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 double energy () const
 energy More...
 
virtual double et () const
 transverse energy More...
 
virtual double et2 () const
 transverse energy squared (use this for cut!) 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 isElectron () 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 ()
 
 LeafCandidate (const Candidate &c)
 
template<typename... Args>
 LeafCandidate (Args &&...args)
 
 LeafCandidate (LeafCandidate &rh)
 
 LeafCandidate (LeafCandidate &&)=default
 
 LeafCandidate (LeafCandidate const &)=default
 
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 size_t numberOfSourceCandidatePtrs () const
 
LeafCandidateoperator= (LeafCandidate &&)=default
 
LeafCandidateoperator= (LeafCandidate const &)=default
 
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 ()
 
virtual void setMass (double m)
 set particle mass More...
 
virtual void setMassConstraint ()
 
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 CandidatePtr sourceCandidatePtr (size_type i) const
 
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 (overwritten by PF...) 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
const_iterator begin () const
 first daughter const_iterator More...
 
iterator begin ()
 first daughter iterator More...
 
 Candidate ()
 default constructor More...
 
const_iterator end () const
 last daughter const_iterator More...
 
iterator end ()
 last daughter iterator 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...
 
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 Types

typedef std::vector< std::pair
< IsolationKeys,
pat::IsoDeposit > > 
IsoDepositPairs
 

Protected Member Functions

void fillInFrom (const reco::Candidate &cand)
 
- 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 Attributes

CaloTowerCollection caloTower_
 
CaloTowerRef caloTowerRef_
 
reco::TrackCollection combinedTrack_
 
reco::TrackRef combinedTrackRef_
 
reco::GsfTrackCollection gsfTrack_
 
reco::GsfTrackRef gsfTrackRef_
 
IsoDepositPairs isoDeposits_
 
std::vector< float > isolations_
 
float quality_
 
reco::TrackCollection standaloneTrack_
 
reco::TrackRef standaloneTrackRef_
 
reco::SuperClusterCollection superCluster_
 
reco::SuperClusterRef superClusterRef_
 
reco::TrackCollection track_
 
reco::TrackRef trackRef_
 
reco::TrackRefVector trackRefs_
 
reco::TrackCollection tracks_
 
std::vector
< pat::VertexAssociation
vtxAss_
 
- Protected Attributes inherited from pat::PATObject< reco::RecoCandidate >
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_
 

Additional Inherited Members

- Public Types inherited from pat::PATObject< reco::RecoCandidate >
typedef reco::RecoCandidate base_type
 
- 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...
 

Detailed Description

Analysis-level Generic Particle class (e.g. for hadron or muon not fully reconstructed)

GenericParticle implements the analysis-level generic particle class within the 'pat' namespace.

Author
Giovanni Petrucciani

Definition at line 40 of file GenericParticle.h.

Member Typedef Documentation

typedef std::vector<std::pair<IsolationKeys, pat::IsoDeposit> > pat::GenericParticle::IsoDepositPairs
protected

Definition at line 281 of file GenericParticle.h.

Constructor & Destructor Documentation

GenericParticle::GenericParticle ( )

default constructor

Definition at line 11 of file GenericParticle.cc.

Referenced by clone().

11  :
12  PATObject<reco::RecoCandidate>()
13 {
14 }
pat::GenericParticle::GenericParticle ( const reco::Candidate aGenericParticle)

constructor from Candidate

pat::GenericParticle::GenericParticle ( const edm::RefToBase< reco::Candidate > &  aGenericParticleRef)

constructor from ref to Candidate

pat::GenericParticle::GenericParticle ( const edm::Ptr< reco::Candidate > &  aGenericParticleRef)

constructor from ref to Candidate

GenericParticle::~GenericParticle ( )
virtual

destructor

Definition at line 44 of file GenericParticle.cc.

44  {
45 }

Member Function Documentation

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

Return 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

Definition at line 196 of file GenericParticle.h.

References pat::CaloIso, and userIsolation().

Referenced by ZToMuMuIsolationSelector< Isolator >::ZToMuMuIsolationSelector().

196 { return userIsolation(pat::CaloIso); }
float userIsolation(IsolationKeys key) const
virtual CaloTowerRef pat::GenericParticle::caloTower ( ) const
inlinevirtual

reference to a CaloTower (might be transient ref if CaloTower is embedded) returns null ref if there is no calotower

Reimplemented from reco::RecoCandidate.

Definition at line 89 of file GenericParticle.h.

References caloTower_, caloTowerRef_, and edm::SortedCollection< T, SORT >::empty().

Referenced by overlap().

CaloTowerCollection caloTower_
CaloTowerRef caloTowerRef_
edm::Ref< CaloTowerCollection > CaloTowerRef
Definition: CaloTowerFwd.h:16
virtual GenericParticle* pat::GenericParticle::clone ( void  ) const
inlinevirtual

required reimplementation of the Candidate's clone method

Reimplemented from reco::RecoCandidate.

Definition at line 56 of file GenericParticle.h.

References GenericParticle().

56 { return new GenericParticle(*this); }
GenericParticle()
default constructor
virtual reco::TrackRef pat::GenericParticle::combinedMuon ( ) const
inlinevirtual

reference to a combined muon Track (might be transient ref if SuperCluster is embedded) returns null ref if there is no combined muon track

Reimplemented from reco::RecoCandidate.

Definition at line 83 of file GenericParticle.h.

References combinedTrack_, and combinedTrackRef_.

Referenced by overlap().

reco::TrackCollection combinedTrack_
edm::Ref< TrackCollection > TrackRef
persistent reference to a Track
Definition: TrackFwd.h:19
reco::TrackRef combinedTrackRef_
float pat::GenericParticle::ecalIso ( ) const
inline

Return the ecal isolation variable that was stored in this object when produced, or -1.0 if there is none

Definition at line 199 of file GenericParticle.h.

References pat::EcalIso, and userIsolation().

Referenced by ZToMuMuIsolationSelector< Isolator >::ZToMuMuIsolationSelector().

199 { return userIsolation(pat::EcalIso); }
float userIsolation(IsolationKeys key) const
const IsoDeposit* pat::GenericParticle::ecalIsoDeposit ( ) const
inline

Definition at line 237 of file GenericParticle.h.

References pat::EcalIso, and isoDeposit().

237 { return isoDeposit(pat::EcalIso ); }
const IsoDeposit * isoDeposit(IsolationKeys key) const
Returns the IsoDeposit associated with some key, or a null pointer if it is not available.
void pat::GenericParticle::ecalIsoDeposit ( const IsoDeposit dep)
inline

Definition at line 243 of file GenericParticle.h.

References pat::EcalIso, and setIsoDeposit().

243 { setIsoDeposit(pat::EcalIso, dep); }
void setIsoDeposit(IsolationKeys key, const IsoDeposit &dep)
Sets the IsoDeposit associated with some key; if it is already existent, it is overwritten.
void GenericParticle::embedCaloTower ( )

embeds the calotower instead of keeping a reference to it

Definition at line 137 of file GenericParticle.cc.

References caloTower_, caloTowerRef_, edm::SortedCollection< T, SORT >::empty(), edm::Ref< C, T, F >::isNonnull(), edm::SortedCollection< T, SORT >::push_back(), and edm::SortedCollection< T, SORT >::swap().

Referenced by pat::PATGenericParticleProducer::produce(), and setCaloTower().

137  {
140  caloTowerRef_ = CaloTowerRef(); // clear, to save space (zeroes compress better)
141 }
bool isNonnull() const
Checks for non-null.
Definition: Ref.h:252
CaloTowerCollection caloTower_
void swap(SortedCollection &other)
void push_back(T const &t)
CaloTowerRef caloTowerRef_
edm::SortedCollection< CaloTower > CaloTowerCollection
Definition: CaloTowerFwd.h:15
edm::Ref< CaloTowerCollection > CaloTowerRef
Definition: CaloTowerFwd.h:16
void GenericParticle::embedCombined ( )

embeds the combined track instead of keeping a reference to it

Definition at line 118 of file GenericParticle.cc.

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

Referenced by pat::PATGenericParticleProducer::produce(), and setCombinedMuon().

118  {
119  combinedTrack_.clear();
120  if (combinedTrackRef_.isNonnull()) combinedTrack_.push_back(*combinedTrackRef_); // import
121  combinedTrackRef_ = reco::TrackRef(); // clear, to save space (zeroes compress better)
122 }
bool isNonnull() const
Checks for non-null.
Definition: Ref.h:252
reco::TrackCollection combinedTrack_
edm::Ref< TrackCollection > TrackRef
persistent reference to a Track
Definition: TrackFwd.h:19
reco::TrackRef combinedTrackRef_
void GenericParticle::embedGsfTrack ( )

embeds the gsf track instead of keeping a reference to it

Definition at line 124 of file GenericParticle.cc.

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

Referenced by pat::PATGenericParticleProducer::produce(), and setGsfTrack().

124  {
125  gsfTrack_.clear();
126  if (gsfTrackRef_.isNonnull()) gsfTrack_.push_back(*gsfTrackRef_); // import
127  gsfTrackRef_ = reco::GsfTrackRef(); // clear, to save space (zeroes compress better)
128 }
edm::Ref< GsfTrackCollection > GsfTrackRef
persistent reference to a GsfTrack
Definition: GsfTrackFwd.h:13
bool isNonnull() const
Checks for non-null.
Definition: Ref.h:252
reco::GsfTrackRef gsfTrackRef_
reco::GsfTrackCollection gsfTrack_
void GenericParticle::embedStandalone ( )

embeds the stand-alone track instead of keeping a reference to it

Definition at line 112 of file GenericParticle.cc.

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

Referenced by pat::PATGenericParticleProducer::produce(), and setStandAloneMuon().

112  {
113  standaloneTrack_.clear();
115  standaloneTrackRef_ = reco::TrackRef(); // clear, to save space (zeroes compress better)
116 }
bool isNonnull() const
Checks for non-null.
Definition: Ref.h:252
reco::TrackRef standaloneTrackRef_
reco::TrackCollection standaloneTrack_
edm::Ref< TrackCollection > TrackRef
persistent reference to a Track
Definition: TrackFwd.h:19
void GenericParticle::embedSuperCluster ( )

embeds the supercluster instead of keeping a reference to it

Definition at line 131 of file GenericParticle.cc.

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

Referenced by pat::PATGenericParticleProducer::produce(), and setSuperCluster().

131  {
132  superCluster_.clear();
133  if (superClusterRef_.isNonnull()) superCluster_.push_back(*superClusterRef_); // import
134  superClusterRef_ = reco::SuperClusterRef(); // clear, to save space (zeroes compress better)
135 }
bool isNonnull() const
Checks for non-null.
Definition: Ref.h:252
edm::Ref< SuperClusterCollection > SuperClusterRef
reference to an object in a collection of SuperCluster objects
reco::SuperClusterCollection superCluster_
reco::SuperClusterRef superClusterRef_
void GenericParticle::embedTrack ( )

embeds the master track instead of keeping a reference to it

Definition at line 97 of file GenericParticle.cc.

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

Referenced by pat::PATGenericParticleProducer::produce(), and setTrack().

97  {
98  track_.clear();
99  if (trackRef_.isNonnull()) track_.push_back(*trackRef_); // import
100  trackRef_ = reco::TrackRef(); // clear, to save space (zeroes compress better)
101 }
bool isNonnull() const
Checks for non-null.
Definition: Ref.h:252
reco::TrackCollection track_
reco::TrackRef trackRef_
edm::Ref< TrackCollection > TrackRef
persistent reference to a Track
Definition: TrackFwd.h:19
void GenericParticle::embedTracks ( )

embeds the other tracks instead of keeping references

Definition at line 103 of file GenericParticle.cc.

References edm::RefVector< C, T, F >::begin(), edm::RefVector< C, T, F >::end(), edm::RefVector< C, T, F >::size(), trackRefs_, and tracks_.

Referenced by pat::PATGenericParticleProducer::produce(), and setTracks().

103  {
104  tracks_.clear();
105  tracks_.reserve(trackRefs_.size());
107  if (it->isNonnull()) tracks_.push_back(**it); // embed track
108  }
109  trackRefs_ = reco::TrackRefVector(); // clear, to save space
110 }
const_iterator end() const
Termination of iteration.
Definition: RefVector.h:255
edm::RefVector< TrackCollection > TrackRefVector
vector of reference to Track in the same collection
Definition: TrackFwd.h:25
const_iterator begin() const
Initialize an iterator over the RefVector.
Definition: RefVector.h:250
reco::TrackCollection tracks_
reco::TrackRefVector trackRefs_
size_type size() const
Size of the RefVector.
Definition: RefVector.h:99
void GenericParticle::fillInFrom ( const reco::Candidate cand)
protected

Definition at line 144 of file GenericParticle.cc.

References reco::Candidate::charge(), i, reco::Candidate::pdgId(), reco::Candidate::polarP4(), edm::RefVector< C, T, F >::push_back(), setCaloTower(), reco::LeafCandidate::setCharge(), setCombinedMuon(), setGsfTrack(), reco::LeafCandidate::setP4(), reco::LeafCandidate::setPdgId(), setStandAloneMuon(), reco::LeafCandidate::setStatus(), setSuperCluster(), setTrack(), setTracks(), reco::LeafCandidate::setVertex(), reco::Candidate::status(), testEve_cfg::tracks, and reco::Candidate::vertex().

144  {
145  // first, kinematics & status
146  setCharge(cand.charge());
147  setP4(cand.polarP4());
148  setVertex(cand.vertex());
149  setPdgId(cand.pdgId());
150  setStatus(cand.status());
151  // then RECO part, if available
152  const reco::RecoCandidate *rc = dynamic_cast<const reco::RecoCandidate *>(&cand);
153  if (rc != 0) {
154  setTrack(rc->track());
155  setGsfTrack(rc->gsfTrack());
156  setStandAloneMuon(rc->standAloneMuon());
157  setCombinedMuon(rc->combinedMuon());
158  setSuperCluster(rc->superCluster());
159  setCaloTower(rc->caloTower());
160  size_t ntracks = rc->numberOfTracks();
161  if (ntracks > 0) {
163  for (size_t i = 0; i < ntracks; ++i) {
164  tracks.push_back(rc->track(i));
165  }
166  setTracks(tracks);
167  }
168  }
169 }
int i
Definition: DBlmapReader.cc:9
virtual void setCharge(Charge q)
set electric charge
Definition: LeafCandidate.h:93
virtual void setStatus(int status)
set status word
virtual int status() const =0
status word
virtual void setP4(const LorentzVector &p4)
set 4-momentum
virtual const PolarLorentzVector & polarP4() const =0
four-momentum Lorentz vector
virtual void setCombinedMuon(const reco::TrackRef &ref, bool embed=false)
sets combined muon track reference (or even embed it into the object)
virtual const Point & vertex() const =0
vertex position
virtual int charge() const =0
electric charge
virtual void setGsfTrack(const reco::GsfTrackRef &ref, bool embed=false)
sets gsf track reference (or even embed it into the object)
virtual void setVertex(const Point &vertex)
set vertex
virtual void setCaloTower(const CaloTowerRef &ref, bool embed=false)
sets calotower reference (or even embed it into the object)
virtual void setTracks(const reco::TrackRefVector &refs, bool embed=false)
sets multiple track references (or even embed the tracks into the object - whatch out for disk size i...
virtual int pdgId() const =0
PDG identifier.
virtual void setStandAloneMuon(const reco::TrackRef &ref, bool embed=false)
sets stand-alone muon track reference (or even embed it into the object)
tuple tracks
Definition: testEve_cfg.py:39
virtual void setPdgId(int pdgId)
void push_back(value_type const &ref)
Add a Ref&lt;C, T&gt; to the RefVector.
Definition: RefVector.h:62
virtual void setTrack(const reco::TrackRef &ref, bool embed=false)
sets master track reference (or even embed it into the object)
virtual void setSuperCluster(const reco::SuperClusterRef &ref, bool embed=false)
sets supercluster reference (or even embed it into the object)
virtual reco::GsfTrackRef pat::GenericParticle::gsfTrack ( ) const
inlinevirtual

reference to a GsfTrack (might be transient ref if SuperCluster is embedded) returns null ref if there is no gsf track

Reimplemented from reco::RecoCandidate.

Definition at line 77 of file GenericParticle.h.

References gsfTrack_, and gsfTrackRef_.

Referenced by Electron.Electron::dxy(), Electron.Electron::dz(), Electron.Electron::edxy(), Electron.Electron::edz(), Electron.Electron::lostInner(), Electron.Electron::mvaIDZZ(), and overlap().

77 { return (gsfTrack_.empty() ? gsfTrackRef_ : reco::GsfTrackRef(&gsfTrack_, 0)); }
edm::Ref< GsfTrackCollection > GsfTrackRef
persistent reference to a GsfTrack
Definition: GsfTrackFwd.h:13
reco::GsfTrackRef gsfTrackRef_
reco::GsfTrackCollection gsfTrack_
float pat::GenericParticle::hcalIso ( ) const
inline

Return the hcal isolation variable that was stored in this object when produced, or -1.0 if there is none

Definition at line 202 of file GenericParticle.h.

References pat::HcalIso, and userIsolation().

Referenced by ZToMuMuIsolationSelector< Isolator >::ZToMuMuIsolationSelector().

202 { return userIsolation(pat::HcalIso); }
float userIsolation(IsolationKeys key) const
const IsoDeposit* pat::GenericParticle::hcalIsoDeposit ( ) const
inline

Definition at line 238 of file GenericParticle.h.

References pat::HcalIso, and isoDeposit().

238 { return isoDeposit(pat::HcalIso ); }
const IsoDeposit * isoDeposit(IsolationKeys key) const
Returns the IsoDeposit associated with some key, or a null pointer if it is not available.
void pat::GenericParticle::hcalIsoDeposit ( const IsoDeposit dep)
inline

Definition at line 244 of file GenericParticle.h.

References pat::HcalIso, and setIsoDeposit().

244 { setIsoDeposit(pat::HcalIso, dep); }
void setIsoDeposit(IsolationKeys key, const IsoDeposit &dep)
Sets the IsoDeposit associated with some key; if it is already existent, it is overwritten.
const IsoDeposit* pat::GenericParticle::isoDeposit ( IsolationKeys  key) const
inline

Returns the IsoDeposit associated with some key, or a null pointer if it is not available.

Definition at line 217 of file GenericParticle.h.

References isoDeposits_.

Referenced by ZMuMuIsolationAnalyzer::analyze(), ZMuMu_Radiative_analyzer::analyze(), ecalIsoDeposit(), hcalIsoDeposit(), trackIsoDeposit(), and userIsoDeposit().

217  {
218  for (IsoDepositPairs::const_iterator it = isoDeposits_.begin(), ed = isoDeposits_.end();
219  it != ed; ++it)
220  {
221  if (it->first == key) return & it->second;
222  }
223  return 0;
224  }
IsoDepositPairs isoDeposits_
string key
FastSim: produces sample of signal events, overlayed with premixed minbias events.
virtual size_t pat::GenericParticle::numberOfTracks ( ) const
inlinevirtual

number of multiple tracks (not including the master one)

Reimplemented from reco::RecoCandidate.

Definition at line 74 of file GenericParticle.h.

References edm::RefVector< C, T, F >::size(), trackRefs_, and tracks_.

Referenced by track().

74 { return tracks_.empty() ? trackRefs_.size() : tracks_.size(); }
reco::TrackCollection tracks_
reco::TrackRefVector trackRefs_
size_type size() const
Size of the RefVector.
Definition: RefVector.h:99
bool GenericParticle::overlap ( const Candidate ) const
virtual

Checks for overlap with another candidate. It will return 'true' if the other candidate is a RecoCandidate, and if they reference to at least one same non null track, supercluster or calotower (except for the multiple tracks) NOTE: It won't work with embedded references

Definition at line 171 of file GenericParticle.cc.

References reco::RecoCandidate::caloTower(), caloTower(), reco::RecoCandidate::combinedMuon(), combinedMuon(), reco::RecoCandidate::gsfTrack(), gsfTrack(), edm::Ref< C, T, F >::isNonnull(), reco::RecoCandidate::standAloneMuon(), standAloneMuon(), reco::RecoCandidate::superCluster(), superCluster(), reco::RecoCandidate::track(), and track().

171  {
172  const reco::RecoCandidate *rc = dynamic_cast<const reco::RecoCandidate *>(&cand);
173  if (rc != 0) {
174  if (rc->track().isNonnull() && (track() == rc->track())) return true;
175  if (rc->gsfTrack().isNonnull() && (gsfTrack() == rc->gsfTrack())) return true;
176  if (rc->standAloneMuon().isNonnull() && (standAloneMuon() == rc->standAloneMuon())) return true;
177  if (rc->combinedMuon().isNonnull() && (combinedMuon() == rc->combinedMuon())) return true;
178  if (rc->superCluster().isNonnull() && (superCluster() == rc->superCluster())) return true;
179  if (rc->caloTower().isNonnull() && (caloTower() == rc->caloTower())) return true;
180  }
181  const GenericParticle *rc2 = dynamic_cast<const GenericParticle *>(&cand);
182  if (rc2 != 0) {
183  if (rc2->track().isNonnull() && (track() == rc2->track())) return true;
184  if (rc2->gsfTrack().isNonnull() && (gsfTrack() == rc2->gsfTrack())) return true;
185  if (rc2->standAloneMuon().isNonnull() && (standAloneMuon() == rc2->standAloneMuon())) return true;
186  if (rc2->combinedMuon().isNonnull() && (combinedMuon() == rc2->combinedMuon())) return true;
187  if (rc2->superCluster().isNonnull() && (superCluster() == rc2->superCluster())) return true;
188  if (rc2->caloTower().isNonnull() && (caloTower() == rc2->caloTower())) return true;
189  }
190  return false;
191 }
virtual reco::GsfTrackRef gsfTrack() const
reference to a GsfTrack
bool isNonnull() const
Checks for non-null.
Definition: Ref.h:252
virtual reco::TrackRef combinedMuon() const
virtual reco::TrackRef standAloneMuon() const
reference to a stand-alone muon Track
virtual reco::TrackRef track() const
reference to a Track
Analysis-level Generic Particle class (e.g. for hadron or muon not fully reconstructed) ...
virtual reco::TrackRef standAloneMuon() const
virtual CaloTowerRef caloTower() const
reference to a CaloTower
virtual CaloTowerRef caloTower() const
virtual reco::TrackRef track() const
virtual reco::GsfTrackRef gsfTrack() const
virtual reco::SuperClusterRef superCluster() const
virtual reco::SuperClusterRef superCluster() const
reference to a SuperCluster
virtual reco::TrackRef combinedMuon() const
reference to a stand-alone muon Track
float pat::GenericParticle::quality ( )
inline

returns a user defined quality value, if set by the user to some meaningful value

Definition at line 122 of file GenericParticle.h.

References quality_.

Referenced by setQuality().

122 { return quality_; }
void GenericParticle::setCaloTower ( const CaloTowerRef ref,
bool  embed = false 
)
virtual

sets calotower reference (or even embed it into the object)

Definition at line 85 of file GenericParticle.cc.

References caloTower_, caloTowerRef_, embedCaloTower(), edm::SortedCollection< T, SORT >::empty(), and edm::SortedCollection< T, SORT >::swap().

Referenced by fillInFrom().

85  {
86  caloTowerRef_ = ref;
87  if (embed) {
88  embedCaloTower();
89  } else if (!caloTower_.empty()) {
91  }
92 }
CaloTowerCollection caloTower_
void swap(SortedCollection &other)
#define embed
Definition: AMPTWrapper.h:178
CaloTowerRef caloTowerRef_
edm::SortedCollection< CaloTower > CaloTowerCollection
Definition: CaloTowerFwd.h:15
void embedCaloTower()
embeds the calotower instead of keeping a reference to it
void GenericParticle::setCombinedMuon ( const reco::TrackRef ref,
bool  embed = false 
)
virtual

sets combined muon track reference (or even embed it into the object)

Definition at line 67 of file GenericParticle.cc.

References combinedTrack_, combinedTrackRef_, and embedCombined().

Referenced by fillInFrom().

67  {
68  combinedTrackRef_ = ref;
69  if (embed) embedCombined(); else combinedTrack_.clear();
70 }
reco::TrackCollection combinedTrack_
#define embed
Definition: AMPTWrapper.h:178
reco::TrackRef combinedTrackRef_
void embedCombined()
embeds the combined track instead of keeping a reference to it
void pat::GenericParticle::setEcalIso ( float  caloIso)
inline

Sets ecal isolation variable.

Definition at line 208 of file GenericParticle.h.

References pat::EcalIso, and setIsolation().

void setIsolation(IsolationKeys key, float value)
float caloIso() const
void GenericParticle::setGsfTrack ( const reco::GsfTrackRef ref,
bool  embed = false 
)
virtual

sets gsf track reference (or even embed it into the object)

Definition at line 73 of file GenericParticle.cc.

References embedGsfTrack(), gsfTrack_, and gsfTrackRef_.

Referenced by fillInFrom().

73  {
74  gsfTrackRef_ = ref;
75  if (embed) embedGsfTrack(); else gsfTrack_.clear();
76 }
#define embed
Definition: AMPTWrapper.h:178
reco::GsfTrackRef gsfTrackRef_
void embedGsfTrack()
embeds the gsf track instead of keeping a reference to it
reco::GsfTrackCollection gsfTrack_
void pat::GenericParticle::setHcalIso ( float  caloIso)
inline

Sets hcal isolation variable.

Definition at line 210 of file GenericParticle.h.

References pat::HcalIso, and setIsolation().

void setIsolation(IsolationKeys key, float value)
float caloIso() const
void pat::GenericParticle::setIsoDeposit ( IsolationKeys  key,
const IsoDeposit dep 
)
inline

Sets the IsoDeposit associated with some key; if it is already existent, it is overwritten.

Definition at line 227 of file GenericParticle.h.

References isoDeposits_.

Referenced by ecalIsoDeposit(), hcalIsoDeposit(), pat::PATGenericParticleProducer::produce(), trackIsoDeposit(), and userIsoDeposit().

227  {
228  IsoDepositPairs::iterator it = isoDeposits_.begin(), ed = isoDeposits_.end();
229  for (; it != ed; ++it) {
230  if (it->first == key) { it->second = dep; return; }
231  }
232  isoDeposits_.push_back(std::make_pair(key,dep));
233  }
IsoDepositPairs isoDeposits_
string key
FastSim: produces sample of signal events, overlayed with premixed minbias events.
void pat::GenericParticle::setIsolation ( IsolationKeys  key,
float  value 
)
inline

Sets the isolation variable for a specifc key. Note that you can't set isolation for a pseudo-key like CaloIso

Definition at line 176 of file GenericParticle.h.

References edm::hlt::Exception, isolations_, relval_steps::key, and relativeConstraints::value.

Referenced by ZMuMuTrackUserData::produce(), pat::PATGenericParticleProducer::produce(), setEcalIso(), setHcalIso(), setTrackIso(), and setUserIso().

176  {
177  if (key >= 0) {
178  if (size_t(key) >= isolations_.size()) isolations_.resize(key+1, -1.0);
179  isolations_[key] = value;
180  } else {
181  throw cms::Exception("Illegal Argument") <<
182  "The key for which you're setting isolation does not correspond " <<
183  "to an individual isolation but to the sum of more independent isolations " <<
184  "(e.g. Calo = Ecal + Hcal), so you can't SET the value, just GET it.\n" <<
185  "Please set up each component independly.\n";
186  }
187  }
std::vector< float > isolations_
string key
FastSim: produces sample of signal events, overlayed with premixed minbias events.
void pat::GenericParticle::setQuality ( float  quality)
inline

sets a user defined quality value

Definition at line 124 of file GenericParticle.h.

References quality(), and quality_.

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

124 { quality_ = quality; }
float quality()
returns a user defined quality value, if set by the user to some meaningful value ...
void GenericParticle::setStandAloneMuon ( const reco::TrackRef ref,
bool  embed = false 
)
virtual

sets stand-alone muon track reference (or even embed it into the object)

Definition at line 61 of file GenericParticle.cc.

References embedStandalone(), standaloneTrack_, and standaloneTrackRef_.

Referenced by fillInFrom().

61  {
62  standaloneTrackRef_ = ref;
63  if (embed) embedStandalone(); else standaloneTrack_.clear();
64 }
reco::TrackRef standaloneTrackRef_
#define embed
Definition: AMPTWrapper.h:178
reco::TrackCollection standaloneTrack_
void embedStandalone()
embeds the stand-alone track instead of keeping a reference to it
void GenericParticle::setSuperCluster ( const reco::SuperClusterRef ref,
bool  embed = false 
)
virtual

sets supercluster reference (or even embed it into the object)

Definition at line 79 of file GenericParticle.cc.

References embedSuperCluster(), superCluster_, and superClusterRef_.

Referenced by fillInFrom().

79  {
80  superClusterRef_ = ref;
81  if (embed) embedSuperCluster(); else superCluster_.clear();
82 }
#define embed
Definition: AMPTWrapper.h:178
reco::SuperClusterCollection superCluster_
reco::SuperClusterRef superClusterRef_
void embedSuperCluster()
embeds the supercluster instead of keeping a reference to it
void GenericParticle::setTrack ( const reco::TrackRef ref,
bool  embed = false 
)
virtual

sets master track reference (or even embed it into the object)

Definition at line 49 of file GenericParticle.cc.

References embedTrack(), track_, and trackRef_.

Referenced by fillInFrom().

49  {
50  trackRef_ = ref;
51  if (embed) embedTrack(); else track_.clear();
52 }
reco::TrackCollection track_
void embedTrack()
embeds the master track instead of keeping a reference to it
reco::TrackRef trackRef_
#define embed
Definition: AMPTWrapper.h:178
void pat::GenericParticle::setTrackIso ( float  trackIso)
inline

Sets tracker isolation variable.

Definition at line 206 of file GenericParticle.h.

References setIsolation(), and pat::TrackIso.

void setIsolation(IsolationKeys key, float value)
float trackIso() const
void GenericParticle::setTracks ( const reco::TrackRefVector refs,
bool  embed = false 
)
virtual

sets multiple track references (or even embed the tracks into the object - whatch out for disk size issues!)

Definition at line 55 of file GenericParticle.cc.

References embedTracks(), trackRefs_, and tracks_.

Referenced by fillInFrom().

55  {
56  trackRefs_ = refs;
57  if (embed) embedTracks(); else tracks_.clear();
58 }
#define embed
Definition: AMPTWrapper.h:178
reco::TrackCollection tracks_
void embedTracks()
embeds the other tracks instead of keeping references
reco::TrackRefVector trackRefs_
void pat::GenericParticle::setUserIso ( float  value,
uint8_t  index = 0 
)
inline

Sets user isolation variable index.

Definition at line 212 of file GenericParticle.h.

References setIsolation(), and pat::UserBaseIso.

void setIsolation(IsolationKeys key, float value)
IsolationKeys
Enum defining isolation keys.
Definition: Isolation.h:9
unsigned int index
Definition: LeafCandidate.h:31
void pat::GenericParticle::setVertexAssociation ( const pat::VertexAssociation assoc)
inline

Set a single vertex association.

Definition at line 252 of file GenericParticle.h.

References vtxAss_.

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

252 { vtxAss_ = std::vector<pat::VertexAssociation>(1, assoc); }
std::vector< pat::VertexAssociation > vtxAss_
void pat::GenericParticle::setVertexAssociations ( const std::vector< pat::VertexAssociation > &  assocs)
inline

Set multiple vertex associations.

Definition at line 254 of file GenericParticle.h.

References vtxAss_.

254 { vtxAss_ = assocs; }
std::vector< pat::VertexAssociation > vtxAss_
virtual reco::TrackRef pat::GenericParticle::standAloneMuon ( ) const
inlinevirtual

reference to a stand-alone muon Track (might be transient ref if SuperCluster is embedded) returns null ref if there is no stand-alone muon track

Reimplemented from reco::RecoCandidate.

Definition at line 80 of file GenericParticle.h.

References standaloneTrack_, and standaloneTrackRef_.

Referenced by overlap().

reco::TrackRef standaloneTrackRef_
reco::TrackCollection standaloneTrack_
edm::Ref< TrackCollection > TrackRef
persistent reference to a Track
Definition: TrackFwd.h:19
virtual reco::SuperClusterRef pat::GenericParticle::superCluster ( ) const
inlinevirtual

reference to a SuperCluster (might be transient ref if SuperCluster is embedded) returns null ref if there is no supercluster

Reimplemented from reco::RecoCandidate.

Definition at line 86 of file GenericParticle.h.

References superCluster_, and superClusterRef_.

Referenced by Electron.Electron::absEffAreaIso(), Electron.Electron::mvaIDLoose(), Electron.Electron::mvaIDRun2(), Electron.Electron::mvaIDTight(), and overlap().

edm::Ref< SuperClusterCollection > SuperClusterRef
reference to an object in a collection of SuperCluster objects
reco::SuperClusterCollection superCluster_
reco::SuperClusterRef superClusterRef_
virtual reco::TrackRef pat::GenericParticle::track ( ) const
inlinevirtual

reference to a master track (might be transient refs if Tracks are embedded) returns null ref if there is no master track

Reimplemented from reco::RecoCandidate.

Definition at line 66 of file GenericParticle.h.

References track_, and trackRef_.

Referenced by ZMuMu_vtxAnalyzer::analyze(), overlap(), ZMuMuTrackUserData::produce(), and ZToLLEdmNtupleDumper::produce().

66 { return track_.empty() ? trackRef_ : reco::TrackRef(&track_, 0); }
reco::TrackCollection track_
reco::TrackRef trackRef_
edm::Ref< TrackCollection > TrackRef
persistent reference to a Track
Definition: TrackFwd.h:19
virtual reco::TrackRef pat::GenericParticle::track ( size_t  idx) const
inlinevirtual

reference to one of a set of multiple tracks (might be transient refs if Tracks are embedded) throws exception if idx >= numberOfTracks()

Reimplemented from reco::RecoCandidate.

Definition at line 69 of file GenericParticle.h.

References edm::hlt::Exception, customizeTrackingMonitorSeedNumber::idx, numberOfTracks(), trackRefs_, and tracks_.

69  {
70  if (idx >= numberOfTracks()) throw cms::Exception("Index out of bounds") << "Requested track " << idx << " out of " << numberOfTracks() << ".\n";
71  return (tracks_.empty() ? trackRefs_[idx] : reco::TrackRef(&tracks_, idx) );
72  }
virtual size_t numberOfTracks() const
number of multiple tracks (not including the master one)
reco::TrackCollection tracks_
tuple idx
DEBUGGING if hasattr(process,&quot;trackMonIterativeTracking2012&quot;): print &quot;trackMonIterativeTracking2012 D...
edm::Ref< TrackCollection > TrackRef
persistent reference to a Track
Definition: TrackFwd.h:19
reco::TrackRefVector trackRefs_
float pat::GenericParticle::trackIso ( ) const
inline

Return the tracker isolation variable that was stored in this object when produced, or -1.0 if there is none

Definition at line 192 of file GenericParticle.h.

References pat::TrackIso, and userIsolation().

Referenced by ZMuMu_vtxAnalyzer::analyze(), ZMuMu_efficiencyAnalyzer::analyze(), and ZToMuMuIsolationSelector< Isolator >::ZToMuMuIsolationSelector().

192 { return userIsolation(pat::TrackIso); }
float userIsolation(IsolationKeys key) const
const IsoDeposit* pat::GenericParticle::trackIsoDeposit ( ) const
inline

Definition at line 236 of file GenericParticle.h.

References isoDeposit(), and pat::TrackIso.

236 { return isoDeposit(pat::TrackIso); }
const IsoDeposit * isoDeposit(IsolationKeys key) const
Returns the IsoDeposit associated with some key, or a null pointer if it is not available.
void pat::GenericParticle::trackIsoDeposit ( const IsoDeposit dep)
inline

Definition at line 242 of file GenericParticle.h.

References setIsoDeposit(), and pat::TrackIso.

242 { setIsoDeposit(pat::TrackIso, dep); }
void setIsoDeposit(IsolationKeys key, const IsoDeposit &dep)
Sets the IsoDeposit associated with some key; if it is already existent, it is overwritten.
const IsoDeposit* pat::GenericParticle::userIsoDeposit ( uint8_t  index = 0) const
inline

Definition at line 239 of file GenericParticle.h.

References isoDeposit(), and pat::UserBaseIso.

const IsoDeposit * isoDeposit(IsolationKeys key) const
Returns the IsoDeposit associated with some key, or a null pointer if it is not available.
IsolationKeys
Enum defining isolation keys.
Definition: Isolation.h:9
unsigned int index
Definition: LeafCandidate.h:31
void pat::GenericParticle::userIsoDeposit ( const IsoDeposit dep,
uint8_t  index = 0 
)
inline

Definition at line 245 of file GenericParticle.h.

References setIsoDeposit(), and pat::UserBaseIso.

IsolationKeys
Enum defining isolation keys.
Definition: Isolation.h:9
unsigned int index
Definition: LeafCandidate.h:31
void setIsoDeposit(IsolationKeys key, const IsoDeposit &dep)
Sets the IsoDeposit associated with some key; if it is already existent, it is overwritten.
float pat::GenericParticle::userIsolation ( IsolationKeys  key) const
inline

Returns the isolation variable for a specifc key (or pseudo-key like CaloIso), or -1.0 if not available

Definition at line 129 of file GenericParticle.h.

References pat::CaloIso, pat::EcalIso, pat::HcalIso, isolations_, and relval_steps::key.

Referenced by caloIso(), ecalIso(), hcalIso(), trackIso(), and userIsolation().

129  {
130  if (key >= 0) {
131  //if (key >= isolations_.size()) throw cms::Excepton("Missing Data")
132  //<< "Isolation corresponding to key "
133  //<< key << " was not stored for this particle.";
134  if (size_t(key) >= isolations_.size()) return -1.0;
135  return isolations_[key];
136  } else switch (key) {
137  case pat::CaloIso:
138  //if (isolations_.size() <= pat::HcalIso) throw cms::Excepton("Missing Data")
139  //<< "CalIsoo Isolation was not stored for this particle.";
140  if (isolations_.size() <= pat::HcalIso) return -1.0;
142  default:
143  return -1.0;
144  //throw cms::Excepton("Missing Data") << "Isolation corresponding to key "
145  //<< key << " was not stored for this particle.";
146  }
147  }
std::vector< float > isolations_
string key
FastSim: produces sample of signal events, overlayed with premixed minbias events.
float pat::GenericParticle::userIsolation ( const std::string &  key) const
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 152 of file GenericParticle.h.

References pat::CaloIso, pat::EcalIso, pat::HcalIso, relval_steps::key, pat::PfAllParticleIso, pat::PfChargedHadronIso, pat::PfGammaIso, pat::PfNeutralHadronIso, AlCaHLTBitMon_QueryRunRegistry::string, pat::TrackIso, pat::User1Iso, pat::User2Iso, pat::User3Iso, pat::User4Iso, pat::User5Iso, pat::UserBaseIso, and userIsolation().

152  {
153  // remove leading namespace specifier
154  std::string prunedKey = ( key.find("pat::") == 0 ) ? std::string(key, 5) : key;
155  if ( prunedKey == "TrackIso" ) return userIsolation(pat::TrackIso);
156  if ( prunedKey == "EcalIso" ) return userIsolation(pat::EcalIso);
157  if ( prunedKey == "HcalIso" ) return userIsolation(pat::HcalIso);
158  if ( prunedKey == "PfAllParticleIso" ) return userIsolation(pat::PfAllParticleIso);
159  if ( prunedKey == "PfChargedHadronIso" ) return userIsolation(pat::PfChargedHadronIso);
160  if ( prunedKey == "PfNeutralHadronIso" ) return userIsolation(pat::PfNeutralHadronIso);
161  if ( prunedKey == "PfGammaIso" ) return userIsolation(pat::PfGammaIso);
162  if ( prunedKey == "User1Iso" ) return userIsolation(pat::User1Iso);
163  if ( prunedKey == "User2Iso" ) return userIsolation(pat::User2Iso);
164  if ( prunedKey == "User3Iso" ) return userIsolation(pat::User3Iso);
165  if ( prunedKey == "User4Iso" ) return userIsolation(pat::User4Iso);
166  if ( prunedKey == "User5Iso" ) return userIsolation(pat::User5Iso);
167  if ( prunedKey == "UserBaseIso" ) return userIsolation(pat::UserBaseIso);
168  if ( prunedKey == "CaloIso" ) return userIsolation(pat::CaloIso);
169  //throw cms::Excepton("Missing Data")
170  //<< "Isolation corresponding to key "
171  //<< key << " was not stored for this particle.";
172  return -1.0;
173  }
string key
FastSim: produces sample of signal events, overlayed with premixed minbias events.
float userIsolation(IsolationKeys key) const
const pat::VertexAssociation* pat::GenericParticle::vertexAssociation ( size_t  index = 0) const
inline

Vertex association (or associations, if any). Return null pointer if none has been set.

Definition at line 248 of file GenericParticle.h.

References vtxAss_.

248 { return vtxAss_.size() > index ? & vtxAss_[index] : 0; }
unsigned int index
Definition: LeafCandidate.h:31
std::vector< pat::VertexAssociation > vtxAss_
const std::vector<pat::VertexAssociation>& pat::GenericParticle::vertexAssociations ( ) const
inline

Vertex associations. Can be empty if it was not enabled in the config file.

Definition at line 250 of file GenericParticle.h.

References vtxAss_.

250 { return vtxAss_; }
std::vector< pat::VertexAssociation > vtxAss_

Member Data Documentation

CaloTowerCollection pat::GenericParticle::caloTower_
protected

Definition at line 266 of file GenericParticle.h.

Referenced by caloTower(), embedCaloTower(), and setCaloTower().

CaloTowerRef pat::GenericParticle::caloTowerRef_
protected

Definition at line 265 of file GenericParticle.h.

Referenced by caloTower(), embedCaloTower(), and setCaloTower().

reco::TrackCollection pat::GenericParticle::combinedTrack_
protected

Definition at line 258 of file GenericParticle.h.

Referenced by combinedMuon(), embedCombined(), and setCombinedMuon().

reco::TrackRef pat::GenericParticle::combinedTrackRef_
protected

Definition at line 257 of file GenericParticle.h.

Referenced by combinedMuon(), embedCombined(), and setCombinedMuon().

reco::GsfTrackCollection pat::GenericParticle::gsfTrack_
protected

Definition at line 262 of file GenericParticle.h.

Referenced by embedGsfTrack(), gsfTrack(), and setGsfTrack().

reco::GsfTrackRef pat::GenericParticle::gsfTrackRef_
protected

Definition at line 261 of file GenericParticle.h.

Referenced by embedGsfTrack(), gsfTrack(), and setGsfTrack().

IsoDepositPairs pat::GenericParticle::isoDeposits_
protected

Definition at line 282 of file GenericParticle.h.

Referenced by isoDeposit(), and setIsoDeposit().

std::vector<float> pat::GenericParticle::isolations_
protected

Definition at line 283 of file GenericParticle.h.

Referenced by setIsolation(), and userIsolation().

float pat::GenericParticle::quality_
protected

Definition at line 278 of file GenericParticle.h.

Referenced by quality(), and setQuality().

reco::TrackCollection pat::GenericParticle::standaloneTrack_
protected

Definition at line 258 of file GenericParticle.h.

Referenced by embedStandalone(), setStandAloneMuon(), and standAloneMuon().

reco::TrackRef pat::GenericParticle::standaloneTrackRef_
protected

Definition at line 257 of file GenericParticle.h.

Referenced by embedStandalone(), setStandAloneMuon(), and standAloneMuon().

reco::SuperClusterCollection pat::GenericParticle::superCluster_
protected

Definition at line 270 of file GenericParticle.h.

Referenced by embedSuperCluster(), setSuperCluster(), and superCluster().

reco::SuperClusterRef pat::GenericParticle::superClusterRef_
protected

Definition at line 269 of file GenericParticle.h.

Referenced by embedSuperCluster(), setSuperCluster(), and superCluster().

reco::TrackCollection pat::GenericParticle::track_
protected

Definition at line 258 of file GenericParticle.h.

Referenced by embedTrack(), setTrack(), and track().

reco::TrackRef pat::GenericParticle::trackRef_
protected

Definition at line 257 of file GenericParticle.h.

Referenced by embedTrack(), setTrack(), and track().

reco::TrackRefVector pat::GenericParticle::trackRefs_
protected

Definition at line 273 of file GenericParticle.h.

Referenced by embedTracks(), numberOfTracks(), setTracks(), and track().

reco::TrackCollection pat::GenericParticle::tracks_
protected

Definition at line 274 of file GenericParticle.h.

Referenced by embedTracks(), numberOfTracks(), setTracks(), and track().

std::vector<pat::VertexAssociation> pat::GenericParticle::vtxAss_
protected