LCIO  "2.7.4"
 All Classes Namespaces Functions Variables Typedefs Friends Pages
ReconstructedParticleImpl.h
1 // -*- C++ -*-
2 #ifndef IMPL_RECONSTRUCTEDPARTICLEIMPL_H
3 #define IMPL_RECONSTRUCTEDPARTICLEIMPL_H 1
4 
5 
6 #include "EVENT/ReconstructedParticle.h"
7 #include "AccessChecked.h"
8 
9 
10 #define NCOVARIANCE 10
11 
12 
13 namespace IMPL {
14 
15 
23 
24  public:
25 
29 
31  virtual ~ReconstructedParticleImpl() ;
32 
33  virtual int id() const { return simpleUID() ; }
34 
35 
40  virtual int getType() const ;
41 
44  virtual bool isCompound() const { return getParticles().size() > 0 ; }
45 
48  virtual const double* getMomentum() const ;
49 
52  virtual double getEnergy() const ;
53 
56  virtual const EVENT::FloatVec & getCovMatrix() const ;
57 
60  virtual double getMass() const ;
61 
64  virtual float getCharge() const ;
65 
68  virtual const float* getReferencePoint() const ;
69 
73  virtual const EVENT::ParticleIDVec & getParticleIDs() const ;
74 
78  virtual EVENT::ParticleID * getParticleIDUsed() const ;
79 
80 
83  virtual float getGoodnessOfPID() const ;
84 
87  virtual const EVENT::ReconstructedParticleVec & getParticles() const ;
88 
91  virtual const EVENT::ClusterVec & getClusters() const ;
92 
93 
96  virtual const EVENT::TrackVec & getTracks() const ;
97 
100  virtual EVENT::Vertex * getStartVertex() const ;
101 
105  virtual EVENT::Vertex * getEndVertex() const ;
106 
107 
108  // setters
109  void setType(int type) ;
110  // void setPrimary(bool primary) ;
111  // void setTypeFlag( int typeFlag) ;
112  void setMomentum( const float* momentum ) ;
113  void setMomentum( const double* momentum ) ;
114  void setEnergy( float energy) ;
115  void setCovMatrix( const float* cov ) ;
116  void setCovMatrix( const EVENT::FloatVec& ) ;
117  void setMass( float mass ) ;
118  void setCharge( float charge ) ;
119  void setReferencePoint( const float* reference ) ;
120  void addParticleID( EVENT::ParticleID* pid ) ;
121  void setParticleIDUsed( EVENT::ParticleID* pid ) ;
122  void setGoodnessOfPID( float goodness ) ;
123  void addParticle( EVENT::ReconstructedParticle* particle ) ;
124  void addCluster( EVENT::Cluster* cluster) ;
125  void addTrack( EVENT::Track* track) ;
126 // void addMCParticle( EVENT::MCParticle* mcParticle , float weight = 1.0 ) ;
127  void setStartVertex( EVENT::Vertex * sv ) ;
128  //void setEndVertex( EVENT::Vertex * ev ) ;
129 
130  protected:
131 
132  int _type ;
133  double _momentum[3] ;
134  double _energy ;
135  EVENT::FloatVec _cov ;
136  double _mass ;
137  float _charge ;
138  float _reference[3] ;
139  EVENT::ParticleID* _pidUsed ;
140  float _goodnessOfPID ;
141  EVENT::ParticleIDVec _pid ;
143  EVENT::ClusterVec _clusters ;
144  EVENT::TrackVec _tracks ;
145  EVENT::Vertex* _sv ;
146 
147 
148 }; // class
149 
150 } // namespace IMPL
151 #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...
Definition: ReconstructedParticleImpl.cc:162
virtual EVENT::ParticleID * getParticleIDUsed() const
The particle Id used for the kinematics of this particle.
Definition: ReconstructedParticleImpl.cc:49
std::vector< Track * > TrackVec
Vector of (pointers to) Tracks.
Definition: Track.h:22
std::vector< ParticleID * > ParticleIDVec
Vector of (pointers to) ParticleIDs.
Definition: ParticleID.h:16
std::vector< float > FloatVec
Vector of floats.
Definition: LCIOSTLTypes.h:18
virtual int id() const
Returns an object id for internal (debugging) use in LCIO.
Definition: ReconstructedParticleImpl.h:33
virtual const float * getReferencePoint() const
Reference point of the reconstructedParticle parameters.
Definition: ReconstructedParticleImpl.cc:46
std::vector< Cluster * > ClusterVec
Vector of (pointers to) Clusters.
Definition: Cluster.h:20
void addParticle(EVENT::ReconstructedParticle *particle)
Add a particle that has been used to create this particle.
Definition: ReconstructedParticleImpl.cc:170
virtual int getType() const
Type of reconstructed particle.
Definition: ReconstructedParticleImpl.cc:38
virtual const double * getMomentum() const
The magnitude of the reconstructed particle's momentum,.
Definition: ReconstructedParticleImpl.cc:41
virtual double getMass() const
Mass of the reconstructed particle, set independently from four vector quantities.
Definition: ReconstructedParticleImpl.cc:44
virtual double getEnergy() const
Energy of the reconstructed particle.
Definition: ReconstructedParticleImpl.cc:42
virtual EVENT::Vertex * getStartVertex() const
The start vertex associated to this particle.
Definition: ReconstructedParticleImpl.cc:68
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.
Definition: ReconstructedParticleImpl.cc:62
virtual const EVENT::ReconstructedParticleVec & getParticles() const
The reconstructed particles that have been combined to this particle.
Definition: ReconstructedParticleImpl.cc:56
virtual EVENT::Vertex * getEndVertex() const
The vertex where the particle decays This method actually returns the start vertex from the first dau...
Definition: ReconstructedParticleImpl.cc:72
virtual const EVENT::FloatVec & getCovMatrix() const
Covariance matrix of the reconstructed particle's 4vector (10 parameters).
Definition: ReconstructedParticleImpl.cc:43
The LCIO reconstructedParticle.
Definition: ReconstructedParticle.h:35
ReconstructedParticleImpl()
Default constructor, initializes values to 0.
Definition: ReconstructedParticleImpl.cc:11
Persistent interface for LCIO ParticleIDs.
Definition: ParticleID.h:28
void addTrack(EVENT::Track *track)
Add a track that has been used to create this particle.
Definition: ReconstructedParticleImpl.cc:182
virtual float getGoodnessOfPID() const
The overall goodness of the PID on a scale of [0;1].
Definition: ReconstructedParticleImpl.cc:51
void addCluster(EVENT::Cluster *cluster)
Add a cluster that has been used to create this particle.
Definition: ReconstructedParticleImpl.cc:176
virtual const EVENT::ClusterVec & getClusters() const
The clusters that have been used for this particle.
Definition: ReconstructedParticleImpl.cc:59
virtual const EVENT::ParticleIDVec & getParticleIDs() const
The particle Id's sorted by their likelihood.
Definition: ReconstructedParticleImpl.cc:54
virtual float getCharge() const
Charge of the reconstructed particle.
Definition: ReconstructedParticleImpl.cc:45
std::vector< ReconstructedParticle * > ReconstructedParticleVec
Vector of (pointers to) ReconstructedParticles.
Definition: ReconstructedParticle.h:26
Controls access to objects.
Definition: AccessChecked.h:17
virtual ~ReconstructedParticleImpl()
Destructor.
Definition: ReconstructedParticleImpl.cc:31
virtual bool isCompound() const
Convenient method - same as (getParticles().size() > 0 ).
Definition: ReconstructedParticleImpl.h:44
Implementation of ReconstructedParticle.
Definition: ReconstructedParticleImpl.h:22