Particle
From Charm-Tau Detector
Revision as of 15:10, 19 November 2019 by V.S.Vorobev (Talk | contribs)
Class std::ana::Particle
represents reconstructed particles in detector as well as unstable particle candidates formed via combination of final-state-particles.
The following constructors are implemented:
- Default constructor
Particle(ThreeVector momentum, float mass, int pdgCode, EParticleType particleType=c_Undefined); /** All other private members are set to their default values (0). */ Particle(const FourVector& momentum, int pdgCode, EParticleType particleType=c_Undefined); /** Constructor for composite particles. */ Particle(std::vector<ParticlePtr> daughters, int pdgCode); /** Constructor from MC Particle of podio tree */ Particle(const sct::MCParticle &mcparticle); /** Constructor from MC Particle of podio tree */ Particle(const sct::Particle &particle, int pdg, size_t partIndex);
Getters:
-
int pdgCode()
-
float charge()
EFlavorType flavorType() const; EParticleType particleType() const; float mass() const; /** Particle nominal mass */ float pdgMass(void) const; float energy() const;
/** Returns four-momentum vector [px, py, pz, E] */ FourVector fourMomentum() const; const ThreeVector& momentum() const; float momentumMagnitude() const; /** Returns momentum magnitude (same as getMomentumMagnitude but with shorter name) */ float p() const; float px() const; float py() const; float pz() const;
/** Returns vertex position (POCA for charged, IP for neutral FS particles) */ const ThreeVector& vertex() const; float x() const; float y() const; float z() const; size_t mdstIndex() const;
Modificators:
void set3Momentum(ThreeVector p3); void set4Momentum(ThreeVector p3, float mass); inline void set4Momentum(const FourVector &p4); inline void setVertex(ThreeVector vertex); /** Sets 7x7 error matrix (order: px,py,pz,E,x,y,z) */ void setMomentumVertexErrorMatrix(ErrMatrix errMatrix); /** Sets chi^2 probability of fit */ void setPValue(float pValue); void updateMass(int pdgCode); void appendDaughter(ParticlePtr daughter); void removeDaughter(ParticlePtr daughter);