LCIO  02.17
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
TrackerHitImpl.h
Go to the documentation of this file.
1 // -*- C++ -*-
2 #ifndef IMPL_TRACKERHITIMPL_H
3 #define IMPL_TRACKERHITIMPL_H 1
4 
5 #include <string>
6 
7 #include "EVENT/TrackerHit.h"
8 #include "IMPL/AccessChecked.h"
9 #include "LCIODeprecated.h"
10 
11 #define TRKHITNCOVMATRIX 6
12 
13 namespace IMPL {
14 
22 
23  public:
24  // C'tor
25  TrackerHitImpl() ;
26 
28  virtual ~TrackerHitImpl() ;
29 
30 
31  virtual int id() const { return simpleUID() ; }
32 
35  virtual int getCellID0() const ;
36 
41  virtual int getCellID1() const ;
42 
45  virtual const double* getPosition() const ;
46 
49  virtual const EVENT::FloatVec & getCovMatrix() const ;
50 
55  LCIO_DEPRECATED( "Use getEDep() instead" , virtual float getdEdx() const ) ;
56 
59  virtual float getEDep() const { return _EDep ; }
60 
63  virtual float getEDepError() const { return _EDepError ; }
64 
67  virtual float getTime() const ;
68 
69 // /**Type of raw data hit, either one of<br>
70 // * LCIO::TPCHIT<br>
71 // * LCIO::SIMTRACKERHIT<br>
72 // */
73 // virtual const std::string & getType() const ;
74 
79  virtual int getType() const ;
80 
83  virtual int getQuality() const { return _quality ; }
84 
88  virtual const EVENT::LCObjectVec & getRawHits() const ;
89 
90 
93  virtual EVENT::LCObjectVec & rawHits() ;
94 
95 
96  // setters
97 
100  void setCellID0(int id0) ;
101 
106  void setCellID1(int id1) ;
107 
108  void setType(int type) ;
109  void setPosition( const double pos[3]) ;
110  void setCovMatrix( const EVENT::FloatVec& cov );
111  void setCovMatrix( const float cov[TRKHITNCOVMATRIX] );
112  LCIO_DEPRECATED( "Use setEDep(float) instead" , void setdEdx( float dedx ) ) ; // DEPRECATED. renamed to setEDep()
113  void setEDep( float e ) ;
114  void setEDepError( float e ) ;
115  void setTime( float t ) ;
116  void setQuality( int quality ) ;
117  void setQualityBit( int bit , bool val=true ) ;
118 
119 
120 protected:
121 
122  int _cellID0{0} ;
123  int _cellID1{0} ;
124 
125  int _type{0} ;
126  double _pos[3] = {0.,0.,0.} ;
128  float _EDep{0} ;
129  float _EDepError{0} ;
130  float _time{0} ;
131  int _quality{0} ;
133 
134 
135 }; // class
136 } // namespace IMPL
137 #endif /* ifndef IMPL_TRACKERHITIMPL_H */
A generic tracker hit to be used by pattern recognition.
Definition: TrackerHit.h:26
virtual int getCellID1() const
Same name as in CalorimeterHit, even though there are no &#39;cells&#39; in this case 0 if information is not...
virtual int getQuality() const
The quality bit flag of the hit.
void setCovMatrix(const EVENT::FloatVec &cov)
#define TRKHITNCOVMATRIX
virtual const double * getPosition() const
The hit position in [mm].
virtual int getType() const
Type of raw data hit, either one of LCIO::TPCHIT LCIO::SIMTRACKERHIT
virtual const EVENT::FloatVec & getCovMatrix() const
Covariance of the position (x,y,z)
virtual float getTime() const
The time of the hit in [ns].
void setCellID1(int id1)
Sets the second cell id; Only store if the flag word (bit RTHBIT_ID1) of the collection is set...
void setQuality(int quality)
void setQualityBit(int bit, bool val=true)
virtual ~TrackerHitImpl()
Destructor.
virtual EVENT::LCObjectVec & rawHits()
Use to manipulate the raw hits.
EVENT::LCObjectVec _rawHits
void setCellID0(int id0)
Sets the first cell id;.
void setEDepError(float e)
virtual const EVENT::LCObjectVec & getRawHits() const
The raw data hits.
void setType(int type)
virtual float getdEdx() const =0
The dE/dx of the hit in [GeV].
Implementation of the generic tracker hit.
virtual float getEDep() const
The deposited energy of the hit [GeV].
virtual int getCellID0() const
Same name as in CalorimeterHit, even though there are no &#39;cells&#39; in this case.
EVENT::FloatVec _cov
virtual int id() const
Returns an object id for internal (debugging) use in LCIO.
virtual int simpleUID() const
Definition: AccessChecked.h:26
virtual float getEDepError() const
The error measured on EDep [GeV].
Controls access to objects.
Definition: AccessChecked.h:18
LCIO_DEPRECATED("Use getEDep() instead", virtual float getdEdx() const )
The dE/dx of the hit in [GeV/mm].
void setPosition(const double pos[3])