LCIO  02.17
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
VertexImpl.h
Go to the documentation of this file.
1 // -*- C++ -*-
2 #ifndef IMPL_VERTEXIMPL_H
3 #define IMPL_VERTEXIMPL_H 1
4 
5 
6 #include "EVENT/Vertex.h"
7 #include "AccessChecked.h"
8 
9 #define VTXCOVMATRIX 6
10 
11 
12 namespace IMPL {
13 
14 
21  class VertexImpl : public EVENT::Vertex, public AccessChecked {
22 
23 
24  public:
25 
28  VertexImpl() ;
29 
31  VertexImpl(const VertexImpl&) = default ;
32 
34  VertexImpl& operator=(const VertexImpl&) = default ;
35 
36 
37  // Destructor.
38  virtual ~VertexImpl() ;
39 
40  virtual int id() const { return simpleUID() ; }
41 
45  virtual bool isPrimary() const ;
46 
50  //virtual int getAlgorithmType() const ;
51  virtual const std::string& getAlgorithmType() const ;
52 
55  virtual float getChi2() const;
56 
59  virtual float getProbability() const;
60 
63  virtual const float* getPosition() const;
64 
68  virtual const EVENT::FloatVec & getCovMatrix() const;
69 
73  virtual const EVENT::FloatVec & getParameters() const;
74 
78 
79  // setters
80  void setPrimary( bool primary ) ;
81  //void setAlgorithmType( int type ) ;
82  void setAlgorithmType( std::string type ) ;
83  void setChi2( float chi2 ) ;
84  void setProbability( float probability ) ;
85  void setPosition( const float vpos[3] ) ;
86  void setPosition( float px, float py, float pz ) ;
87  void setCovMatrix( const float* cov ) ;
88  void setCovMatrix( const EVENT::FloatVec & ) ;
90  void addParameter( float p );
91 
92  protected:
93  int _primary ;
95  float _chi2 ;
96  float _probability ;
97  float _vpos[3] ={0,0,0} ;
101 
102 }; // class
103 
104 } // namespace IMPL
105 #endif /* ifndef IMPL_VERTEXIMLP_H */
void setPosition(const float vpos[3])
Definition: VertexImpl.cc:57
The Vertex class for LCIO.
Definition: Vertex.h:34
virtual EVENT::ReconstructedParticle * getAssociatedParticle() const
Returns Reconstructed Particle associated to the Vertex.
Definition: VertexImpl.cc:28
EVENT::FloatVec _par
Definition: VertexImpl.h:99
virtual int id() const
Returns an object id for internal (debugging) use in LCIO.
Definition: VertexImpl.h:40
void setCovMatrix(const float *cov)
Definition: VertexImpl.cc:68
EVENT::ReconstructedParticle * _aParticle
Definition: VertexImpl.h:100
std::string _type
Definition: VertexImpl.h:94
float _probability
Definition: VertexImpl.h:96
virtual const EVENT::FloatVec & getParameters() const
Additional parameters related to this vertex - check/set the collection parameter "VertexParameterNa...
Definition: VertexImpl.cc:27
void setAlgorithmType(std::string type)
Definition: VertexImpl.cc:42
EVENT::FloatVec _cov
Definition: VertexImpl.h:98
virtual const EVENT::FloatVec & getCovMatrix() const
Covariance matrix of the position (stored as lower triangle matrix, i.e.
Definition: VertexImpl.cc:26
virtual bool isPrimary() const
Checks if the Vertex is the primary vertex of the event.
Definition: VertexImpl.cc:20
STL class.
void addParameter(float p)
Definition: VertexImpl.cc:83
virtual const std::string & getAlgorithmType() const
Type code for the algorithm that has been used to create the vertex - check/set the collection parame...
Definition: VertexImpl.cc:22
void setChi2(float chi2)
Definition: VertexImpl.cc:47
void setAssociatedParticle(EVENT::ReconstructedParticle *aP)
Definition: VertexImpl.cc:78
The LCIO reconstructedParticle.
virtual float getProbability() const
Probability of the vertex fit.
Definition: VertexImpl.cc:24
VertexImpl()
Default constructor, initializes values to 0.
Definition: VertexImpl.cc:8
void setProbability(float probability)
Definition: VertexImpl.cc:52
virtual ~VertexImpl()
Definition: VertexImpl.cc:18
virtual int simpleUID() const
Definition: AccessChecked.h:26
Implementation of Vertex Class.
Definition: VertexImpl.h:21
virtual float getChi2() const
Chi squared of the vertex fit.
Definition: VertexImpl.cc:23
Controls access to objects.
Definition: AccessChecked.h:18
float _vpos[3]
Definition: VertexImpl.h:97
virtual const float * getPosition() const
Position of the vertex.
Definition: VertexImpl.cc:25
VertexImpl & operator=(const VertexImpl &)=default
default assignment operator - use with care
void setPrimary(bool primary)
Definition: VertexImpl.cc:32