LCIO  02.17
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
ReconstructedParticleImpl.h
Go to the documentation of this file.
1 // -*- C++ -*-
2 #ifndef IMPL_RECONSTRUCTEDPARTICLEIMPL_H
3 #define IMPL_RECONSTRUCTEDPARTICLEIMPL_H 1
4 
5 
7 #include "AccessChecked.h"
8 
9 
10 #define NCOVARIANCE 10
11 
12 
13 namespace IMPL {
14 
15 
23 
24  public:
25 
29 
32 
35 
37  virtual ~ReconstructedParticleImpl() ;
38 
39  virtual int id() const { return simpleUID() ; }
40 
41 
46  virtual int getType() const ;
47 
50  virtual bool isCompound() const { return getParticles().size() > 0 ; }
51 
54  virtual const double* getMomentum() const ;
55 
58  virtual double getEnergy() const ;
59 
62  virtual const EVENT::FloatVec & getCovMatrix() const ;
63 
66  virtual double getMass() const ;
67 
70  virtual float getCharge() const ;
71 
74  virtual const float* getReferencePoint() const ;
75 
79  virtual const EVENT::ParticleIDVec & getParticleIDs() const ;
80 
84  virtual EVENT::ParticleID * getParticleIDUsed() const ;
85 
86 
89  virtual float getGoodnessOfPID() const ;
90 
93  virtual const EVENT::ReconstructedParticleVec & getParticles() const ;
94 
97  virtual const EVENT::ClusterVec & getClusters() const ;
98 
99 
102  virtual const EVENT::TrackVec & getTracks() const ;
103 
106  virtual EVENT::Vertex * getStartVertex() const ;
107 
111  virtual EVENT::Vertex * getEndVertex() const ;
112 
113 
114  // setters
115  void setType(int type) ;
116  // void setPrimary(bool primary) ;
117  // void setTypeFlag( int typeFlag) ;
118  void setMomentum( const float* momentum ) ;
119  void setMomentum( const double* momentum ) ;
120  void setEnergy( float energy) ;
121  void setCovMatrix( const float* cov ) ;
122  void setCovMatrix( const EVENT::FloatVec& ) ;
123  void setMass( float mass ) ;
124  void setCharge( float charge ) ;
125  void setReferencePoint( const float* reference ) ;
126  void addParticleID( EVENT::ParticleID* pid ) ;
127  void setParticleIDUsed( EVENT::ParticleID* pid ) ;
128  void setGoodnessOfPID( float goodness ) ;
129  void addParticle( EVENT::ReconstructedParticle* particle ) ;
130  void addCluster( EVENT::Cluster* cluster) ;
131  void addTrack( EVENT::Track* track) ;
132 // void addMCParticle( EVENT::MCParticle* mcParticle , float weight = 1.0 ) ;
133  void setStartVertex( EVENT::Vertex * sv ) ;
134  //void setEndVertex( EVENT::Vertex * ev ) ;
135 
136  protected:
137 
138  int _type{0} ;
139  double _momentum[3] = {0.,0.,0.} ;
140  double _energy{0.} ;
142  double _mass{0.} ;
143  float _charge{} ;
144  float _reference[3] = {0.,0.,0.} ;
146  float _goodnessOfPID{0.} ;
152 
153 
154 }; // class
155 
156 } // namespace IMPL
157 #endif /* ifndef IMPL_RECONSTRUCTEDPARTICLEIMLP_H */
The Vertex class for LCIO.
Definition: Vertex.h:34
void addParticleID(EVENT::ParticleID *pid)
Set the type of reconstructed particle, one of: ReconstructedParticle::SINGLE, ReconstructedParticl...
virtual EVENT::ParticleID * getParticleIDUsed() const
The particle Id used for the kinematics of this particle.
virtual int id() const
Returns an object id for internal (debugging) use in LCIO.
virtual const float * getReferencePoint() const
Reference point of the reconstructedParticle parameters.
void addParticle(EVENT::ReconstructedParticle *particle)
Add a particle that has been used to create this particle.
ReconstructedParticleImpl & operator=(const ReconstructedParticleImpl &)=default
default assignment operator - use with care
virtual int getType() const
Type of reconstructed particle.
virtual const double * getMomentum() const
The magnitude of the reconstructed particle's momentum,.
virtual double getMass() const
Mass of the reconstructed particle, set independently from four vector quantities.
virtual double getEnergy() const
Energy of the reconstructed particle.
EVENT::ReconstructedParticleVec _particles
virtual EVENT::Vertex * getStartVertex() const
The start vertex associated to this particle.
void setReferencePoint(const float *reference)
The LCIO cluster.
Definition: Cluster.h:30
The LCIO track class.
Definition: Track.h:33
virtual const EVENT::TrackVec & getTracks() const
The tracks that have been used for this particle.
virtual const EVENT::ReconstructedParticleVec & getParticles() const
The reconstructed particles that have been combined to this particle.
virtual EVENT::Vertex * getEndVertex() const
The vertex where the particle decays This method actually returns the start vertex from the first dau...
virtual const EVENT::FloatVec & getCovMatrix() const
Covariance matrix of the reconstructed particle's 4vector (10 parameters).
The LCIO reconstructedParticle.
ReconstructedParticleImpl()
Default constructor, initializes values to 0.
Persistent interface for LCIO ParticleIDs.
Definition: ParticleID.h:28
T size(T...args)
void addTrack(EVENT::Track *track)
Add a track that has been used to create this particle.
virtual float getGoodnessOfPID() const
The overall goodness of the PID on a scale of [0;1].
void addCluster(EVENT::Cluster *cluster)
Add a cluster that has been used to create this particle.
virtual const EVENT::ClusterVec & getClusters() const
The clusters that have been used for this particle.
virtual int simpleUID() const
Definition: AccessChecked.h:26
virtual const EVENT::ParticleIDVec & getParticleIDs() const
The particle Id's sorted by their likelihood.
virtual float getCharge() const
Charge of the reconstructed particle.
void setMomentum(const float *momentum)
void setParticleIDUsed(EVENT::ParticleID *pid)
Controls access to objects.
Definition: AccessChecked.h:18
virtual ~ReconstructedParticleImpl()
Destructor.
virtual bool isCompound() const
Convenient method - same as (getParticles().size() > 0 ).
Implementation of ReconstructedParticle.