Analysis-level particle class. More...
#include "DataFormats/PatCandidates/interface/Particle.h"
Public Member Functions | |
virtual Particle * | clone () const |
required reimplementation of the Candidate's clone method More... | |
Particle () | |
default constructor More... | |
Particle (const reco::LeafCandidate &aParticle) | |
constructor from a LeafCandidate More... | |
virtual | ~Particle () |
destructor More... | |
Public Member Functions inherited from pat::PATObject< reco::LeafCandidate > | |
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, const bool overwrite=false) |
Set user-defined int. More... | |
void | addUserData (const std::string &label, const T &data, bool transientOnly=false, bool overwrite=false) |
void | addUserDataFromPtr (const std::string &label, const edm::Ptr< pat::UserData > &data, bool overwrite=false) |
void | addUserFloat (const std::string &label, float data, const bool overwrite=false) |
Set user-defined float. More... | |
void | addUserInt (const std::string &label, int32_t data, const bool overwrite=false) |
Set user-defined int. More... | |
std::vector< std::pair < std::string, pat::LookupTableRecord > > | efficiencies () const |
Returns the efficiencies as <name,value> pairs (by value) More... | |
const pat::LookupTableRecord & | efficiency (const std::string &name) const |
Returns an efficiency given its name. More... | |
const std::vector< std::string > & | efficiencyNames () const |
Returns the list of the names of the stored efficiencies. More... | |
const std::vector < pat::LookupTableRecord > & | efficiencyValues () const |
Returns the list of the values of the stored efficiencies (the ordering is the same as in efficiencyNames()) More... | |
void | embedGenParticle () |
const reco::GenParticle * | genParticle (size_t idx=0) const |
reco::GenParticleRef | genParticleById (int pdgId, int status, uint8_t autoCharge=0) const |
reco::GenParticleRef | genParticleRef (size_t idx=0) const |
std::vector< reco::GenParticleRef > | genParticleRefs () const |
size_t | genParticlesSize () const |
Number of generator level particles stored as ref or embedded. More... | |
const pat::CandKinResolution & | getKinResolution (const std::string &label="") const |
bool | hasKinResolution (const std::string &label="") const |
Check if the kinematic resolutions are stored into this object (possibly specifying a label for them) More... | |
bool | hasOverlaps (const std::string &label) const |
Returns true if there was at least one overlap for this test label. More... | |
bool | hasUserCand (const std::string &key) const |
Return true if there is a user-defined int with a given name. More... | |
bool | hasUserData (const std::string &key) const |
Check if user data with a specific type is present. More... | |
bool | hasUserFloat (const std::string &key) const |
Return true if there is a user-defined float with a given name. More... | |
bool | hasUserFloat (const char *key) const |
a CINT-friendly interface More... | |
bool | hasUserInt (const std::string &key) const |
Return true if there is a user-defined int with a given name. More... | |
const reco::Candidate * | originalObject () const |
access to the original object; returns zero for null Ref and throws for unavailable collection More... | |
const edm::Ptr< reco::Candidate > & | originalObjectRef () const |
reference to original object. Returns a null reference if not available More... | |
const std::vector< std::string > & | overlapLabels () const |
Returns the labels of the overlap tests that found at least one overlap. More... | |
const reco::CandidatePtrVector & | overlaps (const std::string &label) const |
PATObject () | |
default constructor More... | |
PATObject (const reco::LeafCandidate &obj) | |
constructor from a base object (leaves invalid reference to original object!) More... | |
PATObject (const edm::RefToBase< reco::LeafCandidate > &ref) | |
constructor from reference More... | |
PATObject (const edm::Ptr< reco::LeafCandidate > &ref) | |
constructor from reference More... | |
double | resolE (const std::string &label="") const |
Resolution on energy, possibly with a label to specify which resolution to use. More... | |
double | resolEt (const std::string &label="") const |
Resolution on et, possibly with a label to specify which resolution to use. More... | |
double | resolEta (const std::string &label="") const |
Resolution on eta, possibly with a label to specify which resolution to use. More... | |
double | resolM (const std::string &label="") const |
double | resolP (const std::string &label="") const |
Resolution on p, possibly with a label to specify which resolution to use. More... | |
double | resolPhi (const std::string &label="") const |
Resolution on phi, possibly with a label to specify which resolution to use. More... | |
double | resolPInv (const std::string &label="") const |
Resolution on 1/p, possibly with a label to specify which resolution to use. More... | |
double | resolPt (const std::string &label="") const |
Resolution on pt, possibly with a label to specify which resolution to use. More... | |
double | resolPx (const std::string &label="") const |
Resolution on px, possibly with a label to specify which resolution to use. More... | |
double | resolPy (const std::string &label="") const |
Resolution on py, possibly with a label to specify which resolution to use. More... | |
double | resolPz (const std::string &label="") const |
Resolution on pz, possibly with a label to specify which resolution to use. More... | |
double | resolTheta (const std::string &label="") const |
Resolution on theta, possibly with a label to specify which resolution to use. More... | |
void | setEfficiency (const std::string &name, const pat::LookupTableRecord &value) |
void | setGenParticle (const reco::GenParticle &particle) |
Set the generator level particle from a particle not in the Event (embedding it, of course) More... | |
void | setGenParticleRef (const reco::GenParticleRef &ref, bool embed=false) |
Set the generator level particle reference. More... | |
void | setKinResolution (const pat::CandKinResolution &resol, const std::string &label="") |
Add a kinematic resolution to this object (possibly with a label) More... | |
void | setOverlaps (const std::string &label, const reco::CandidatePtrVector &overlaps) |
const TriggerObjectStandAlone * | triggerObjectMatch (const size_t idx=0) const |
get one matched trigger object by index More... | |
const TriggerObjectStandAlone * | triggerObjectMatchByAlgorithm (const std::string &nameAlgorithm, const bool algoCondAccepted=true, const size_t idx=0) const |
const TriggerObjectStandAlone * | triggerObjectMatchByAlgorithm (const char *nameAlgorithm, const bool algoCondAccepted=true, const size_t idx=0) const |
const TriggerObjectStandAlone * | triggerObjectMatchByAlgorithm (const std::string &nameAlgorithm, const unsigned algoCondAccepted, const size_t idx=0) const |
const TriggerObjectStandAlone * | triggerObjectMatchByAlgorithm (const char *nameAlgorithm, const unsigned algoCondAccepted, const size_t idx=0) const |
const TriggerObjectStandAlone * | triggerObjectMatchByCollection (const std::string &coll, const size_t idx=0) const |
get one matched trigger object from a certain collection by index More... | |
const TriggerObjectStandAlone * | triggerObjectMatchByCollection (const char *coll, const size_t idx=0) const |
const TriggerObjectStandAlone * | triggerObjectMatchByCondition (const std::string &nameCondition, const size_t idx=0) const |
get one matched L1 object used in a succeeding object combination of a certain L1 condition by index More... | |
const TriggerObjectStandAlone * | triggerObjectMatchByCondition (const char *nameCondition, const size_t idx=0) const |
const TriggerObjectStandAlone * | triggerObjectMatchByFilter (const std::string &labelFilter, const size_t idx=0) const |
get one matched HLT object used in a certain HLT filter by index More... | |
const TriggerObjectStandAlone * | triggerObjectMatchByFilter (const char *labelFilter, const size_t idx=0) const |
const TriggerObjectStandAlone * | triggerObjectMatchByFilterID (const unsigned triggerObjectType, const size_t idx=0) const |
const TriggerObjectStandAlone * | triggerObjectMatchByPath (const std::string &namePath, const bool pathLastFilterAccepted=false, const bool pathL3FilterAccepted=true, const size_t idx=0) const |
const TriggerObjectStandAlone * | triggerObjectMatchByPath (const char *namePath, const bool pathLastFilterAccepted=false, const bool pathL3FilterAccepted=true, const size_t idx=0) const |
const TriggerObjectStandAlone * | triggerObjectMatchByPath (const std::string &namePath, const unsigned pathLastFilterAccepted, const unsigned pathL3FilterAccepted=1, const size_t idx=0) const |
const TriggerObjectStandAlone * | triggerObjectMatchByPath (const char *namePath, const unsigned pathLastFilterAccepted, const unsigned pathL3FilterAccepted=1, const size_t idx=0) const |
const TriggerObjectStandAlone * | triggerObjectMatchByType (const trigger::TriggerObjectType triggerObjectType, const size_t idx=0) const |
get one matched trigger object of a certain type by index More... | |
const TriggerObjectStandAlone * | triggerObjectMatchByType (const unsigned triggerObjectType, const size_t idx=0) const |
const TriggerObjectStandAloneCollection & | triggerObjectMatches () const |
get all matched trigger objects More... | |
const TriggerObjectStandAloneCollection | triggerObjectMatchesByAlgorithm (const std::string &nameAlgorithm, const bool algoCondAccepted=true) const |
const TriggerObjectStandAloneCollection | triggerObjectMatchesByAlgorithm (const char *nameAlgorithm, const bool algoCondAccepted=true) const |
const TriggerObjectStandAloneCollection | triggerObjectMatchesByAlgorithm (const std::string &nameAlgorithm, const unsigned algoCondAccepted) const |
const TriggerObjectStandAloneCollection | triggerObjectMatchesByAlgorithm (const char *nameAlgorithm, const unsigned algoCondAccepted) const |
const TriggerObjectStandAloneCollection | triggerObjectMatchesByCollection (const std::string &coll) const |
get all matched trigger objects from a certain collection More... | |
const TriggerObjectStandAloneCollection | triggerObjectMatchesByCollection (const char *coll) const |
const TriggerObjectStandAloneCollection | triggerObjectMatchesByCondition (const std::string &nameCondition) const |
get all matched L1 objects used in a succeeding object combination of a certain L1 condition More... | |
const TriggerObjectStandAloneCollection | triggerObjectMatchesByCondition (const char *nameCondition) const |
const TriggerObjectStandAloneCollection | triggerObjectMatchesByFilter (const std::string &labelFilter) const |
get all matched HLT objects used in a certain HLT filter More... | |
const TriggerObjectStandAloneCollection | triggerObjectMatchesByFilter (const char *labelFilter) const |
const TriggerObjectStandAloneCollection | triggerObjectMatchesByFilterID (const unsigned triggerObjectType) const |
const TriggerObjectStandAloneCollection | triggerObjectMatchesByPath (const std::string &namePath, const bool pathLastFilterAccepted=false, const bool pathL3FilterAccepted=true) const |
const TriggerObjectStandAloneCollection | triggerObjectMatchesByPath (const char *namePath, const bool pathLastFilterAccepted=false, const bool pathL3FilterAccepted=true) const |
const TriggerObjectStandAloneCollection | triggerObjectMatchesByPath (const std::string &namePath, const unsigned pathLastFilterAccepted, const unsigned pathL3FilterAccepted=1) const |
const TriggerObjectStandAloneCollection | triggerObjectMatchesByPath (const char *namePath, const unsigned pathLastFilterAccepted, const unsigned pathL3FilterAccepted=1) const |
const TriggerObjectStandAloneCollection | triggerObjectMatchesByType (const trigger::TriggerObjectType triggerObjectType) const |
const TriggerObjectStandAloneCollection | triggerObjectMatchesByType (const unsigned triggerObjectType) const |
void | unpackTriggerObjectPathNames (const edm::TriggerNames &names) |
unpack path names of matched trigger objects (if they were packed before embedding, which is not normally the case) More... | |
reco::CandidatePtr | userCand (const std::string &key) const |
const std::vector< std::string > & | userCandNames () const |
Get list of user-defined cand names. More... | |
const T * | userData (const std::string &key) const |
Returns user-defined data. Returns NULL if the data is not present, or not of type T. More... | |
const void * | userDataBare (const std::string &key) const |
const std::vector< std::string > & | userDataNames () const |
Get list of user data object names. More... | |
const std::string & | userDataObjectType (const std::string &key) const |
Get human-readable type of user data object, for debugging. More... | |
float | userFloat (const std::string &key) const |
float | userFloat (const char *key) const |
a CINT-friendly interface More... | |
const std::vector< std::string > & | userFloatNames () const |
Get list of user-defined float names. More... | |
std::vector< float > | userFloatRange (const std::string &key) const |
return a range of values corresponding to key More... | |
int32_t | userInt (const std::string &key) const |
const std::vector< std::string > & | userIntNames () const |
Get list of user-defined int names. More... | |
std::vector< int > | userIntRange (const std::string &key) const |
returns a range of values corresponding to key More... | |
virtual | ~PATObject () |
destructor More... | |
Public Member Functions inherited from reco::LeafCandidate | |
virtual Vector | boostToCM () const final |
virtual int | charge () const final |
electric charge More... | |
void | construct (int qx3, float pt, float eta, float phi, float mass, const Point &vtx, int pdgId, int status) |
virtual const Candidate * | daughter (size_type) const |
return daughter at a given position (throws an exception) More... | |
virtual Candidate * | daughter (size_type) |
return daughter at a given position (throws an exception) More... | |
virtual Candidate * | daughter (const std::string &s) |
return daughter with a specified role name More... | |
virtual const Candidate * | daughter (const std::string &s) const |
return daughter with a specified role name More... | |
virtual double | energy () const final |
energy More... | |
virtual double | et () const final |
transverse energy More... | |
virtual double | et2 () const final |
transverse energy squared (use this for cut!) More... | |
virtual double | eta () const final |
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 final |
is long lived? More... | |
virtual double | mass () const final |
mass More... | |
virtual bool | massConstraint () const final |
do mass constraint? More... | |
virtual double | massSqr () const final |
mass squared More... | |
virtual const CandidateBaseRef & | masterClone () const |
virtual const CandidatePtr & | masterClonePtr () const |
template<typename Ref > | |
Ref | masterRef () const |
cast master clone reference to a concrete type More... | |
virtual Vector | momentum () const final |
spatial momentum vector More... | |
virtual const Candidate * | mother (size_type) const |
return mother at a given position (throws an exception) More... | |
virtual double | mt () const final |
transverse mass More... | |
virtual double | mtSqr () const final |
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 |
LeafCandidate & | operator= (LeafCandidate &&)=default |
LeafCandidate & | operator= (LeafCandidate const &)=default |
virtual double | p () const final |
magnitude of momentum vector More... | |
virtual const LorentzVector & | p4 () const final |
four-momentum Lorentz vector More... | |
virtual int | pdgId () const final |
PDG identifier. More... | |
virtual double | phi () const final |
momentum azimuthal angle More... | |
virtual const PolarLorentzVector & | polarP4 () const final |
four-momentum Lorentz vector More... | |
virtual double | pt () const final |
transverse momentum More... | |
virtual double | px () const final |
x coordinate of momentum vector More... | |
virtual double | py () const final |
y coordinate of momentum vector More... | |
virtual double | pz () const final |
z coordinate of momentum vector More... | |
virtual double | rapidity () const final |
rapidity More... | |
virtual void | setCharge (Charge q) final |
set electric charge More... | |
virtual void | setLongLived () final |
virtual void | setMass (double m) final |
set particle mass More... | |
virtual void | setMassConstraint () final |
virtual void | setP4 (const LorentzVector &p4) final |
set 4-momentum More... | |
virtual void | setP4 (const PolarLorentzVector &p4) final |
set 4-momentum More... | |
virtual void | setPdgId (int pdgId) final |
virtual void | setPz (double pz) final |
virtual void | setStatus (int status) final |
set status word More... | |
virtual void | setThreeCharge (Charge qx3) final |
set electric charge More... | |
virtual void | setVertex (const Point &vertex) |
set vertex More... | |
virtual CandidatePtr | sourceCandidatePtr (size_type i) const |
virtual int | status () const final |
status word More... | |
virtual double | theta () const final |
momentum polar angle More... | |
virtual int | threeCharge () const final |
electric charge More... | |
virtual const Point & | vertex () 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 final |
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 final |
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... | |
virtual const Track * | bestTrack () const |
Candidate () | |
default constructor More... | |
virtual float | dxyError () const |
uncertainty on dxy More... | |
virtual float | dzError () const |
uncertainty on dz 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... | |
Additional Inherited Members | |
Public Types inherited from pat::PATObject< reco::LeafCandidate > | |
typedef reco::LeafCandidate | base_type |
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... | |
Protected Member Functions inherited from pat::PATObject< reco::LeafCandidate > | |
void | addUserDataObject_ (const std::string &label, std::auto_ptr< pat::UserData > &value, bool overwrite=false) |
Protected Attributes inherited from pat::PATObject< reco::LeafCandidate > | |
std::vector< std::string > | efficiencyNames_ |
vector of the efficiencies (names) More... | |
std::vector < pat::LookupTableRecord > | efficiencyValues_ |
vector of the efficiencies (values) More... | |
std::vector< reco::GenParticle > | genParticleEmbedded_ |
vector to hold an embedded generator level particle More... | |
std::vector< reco::GenParticleRef > | genParticleRef_ |
Reference to a generator level particle. More... | |
std::vector< std::string > | kinResolutionLabels_ |
std::vector < pat::CandKinResolution > | kinResolutions_ |
Kinematic resolutions. More... | |
std::vector < reco::CandidatePtrVector > | overlapItems_ |
Overlapping items (sorted by distance) More... | |
std::vector< std::string > | overlapLabels_ |
Overlapping test labels (only if there are any overlaps) More... | |
edm::Ptr< reco::Candidate > | refToOrig_ |
TriggerObjectStandAloneCollection | triggerObjectMatchesEmbedded_ |
vector of trigger matches More... | |
std::vector< std::string > | userCandLabels_ |
std::vector< reco::CandidatePtr > | userCands_ |
std::vector< std::string > | userDataLabels_ |
User data object. More... | |
pat::UserDataCollection | userDataObjects_ |
std::vector< std::string > | userFloatLabels_ |
std::vector< float > | userFloats_ |
std::vector< std::string > | userIntLabels_ |
std::vector< int32_t > | userInts_ |
Analysis-level particle class.
Particle implements an analysis-level particle class within the 'pat' namespace.
Definition at line 32 of file Particle.h.
default constructor
Definition at line 11 of file Particle.cc.
Referenced by clone().
Particle::Particle | ( | const reco::LeafCandidate & | aParticle | ) |
constructor from a LeafCandidate
constructor from reco::LeafCandidate
Definition at line 16 of file Particle.cc.
|
virtual |
|
inlinevirtual |
required reimplementation of the Candidate's clone method
Reimplemented from reco::LeafCandidate.
Definition at line 44 of file Particle.h.
References Particle().