LCIO  "2.7.4"
 All Classes Namespaces Functions Variables Typedefs Friends Pages
TrackerHitImpl.h
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 "EVENT/TPCHit.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  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  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 ;
123  int _cellID1 ;
124 
125  int _type ;
126  double _pos[3] ;
127  EVENT::FloatVec _cov ;
128  //float _dEdx ; // DEPRECATED. renamed to _EDep
129  float _EDep ;
130  float _EDepError ;
131  float _time ;
132  int _quality ;
133  EVENT::LCObjectVec _rawHits ;
134 
135 
136 }; // class
137 } // namespace IMPL
138 #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 'cells' in this case 0 if information is not...
Definition: TrackerHitImpl.cc:37
virtual int getQuality() const
The quality bit flag of the hit.
Definition: TrackerHitImpl.h:83
virtual const double * getPosition() const
The hit position in [mm].
Definition: TrackerHitImpl.cc:41
std::vector< LCObject * > LCObjectVec
Vector of (pointers to) LCObjects.
Definition: LCObject.h:17
virtual int getType() const
Type of raw data hit, either one of LCIO::TPCHIT LCIO::SIMTRACKERHIT
Definition: TrackerHitImpl.cc:78
virtual const EVENT::FloatVec & getCovMatrix() const
Covariance of the position (x,y,z)
Definition: TrackerHitImpl.cc:43
std::vector< float > FloatVec
Vector of floats.
Definition: LCIOSTLTypes.h:18
virtual float getTime() const
The time of the hit in [ns].
Definition: TrackerHitImpl.cc:56
void setCellID1(int id1)
Sets the second cell id; Only store if the flag word (bit RTHBIT_ID1) of the collection is set...
Definition: TrackerHitImpl.cc:87
virtual float getdEdx() const
The dE/dx of the hit in [GeV/mm].
Definition: TrackerHitImpl.cc:48
virtual ~TrackerHitImpl()
Destructor.
Definition: TrackerHitImpl.cc:29
virtual EVENT::LCObjectVec & rawHits()
Use to manipulate the raw hits.
Definition: TrackerHitImpl.cc:63
void setCellID0(int id0)
Sets the first cell id;.
Definition: TrackerHitImpl.cc:82
virtual const EVENT::LCObjectVec & getRawHits() const
The raw data hits.
Definition: TrackerHitImpl.cc:59
Implementation of the generic tracker hit.
Definition: TrackerHitImpl.h:21
virtual float getEDep() const
The deposited energy of the hit [GeV].
Definition: TrackerHitImpl.h:59
virtual int getCellID0() const
Same name as in CalorimeterHit, even though there are no 'cells' in this case.
Definition: TrackerHitImpl.cc:33
virtual int id() const
Returns an object id for internal (debugging) use in LCIO.
Definition: TrackerHitImpl.h:31
virtual float getEDepError() const
The error measured on EDep [GeV].
Definition: TrackerHitImpl.h:63
Controls access to objects.
Definition: AccessChecked.h:17