LCIO  02.17
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
SimTrackerHitImpl.h
Go to the documentation of this file.
1 #ifndef IMPL_SIMTRACKERHITIMPL_H
2 #define IMPL_SIMTRACKERHITIMPL_H 1
3 
4 
5 #include "EVENT/SimTrackerHit.h"
6 #include "EVENT/MCParticle.h"
7 #include "AccessChecked.h"
8 #include "LCIODeprecated.h"
9 
10 namespace IMPL {
11 
12 
21 
22  public:
23 
27 
29  SimTrackerHitImpl(const SimTrackerHitImpl&) = default ;
30 
32  SimTrackerHitImpl& operator=(const SimTrackerHitImpl&) = default ;
33 
35  virtual ~SimTrackerHitImpl() ;
36 
37  virtual int id() const { return simpleUID() ; }
38 
41  LCIO_DEPRECATED("Use getCellID0() instead", virtual int getCellID() const ) ;
42 
45  virtual int getCellID0() const ;
46 
51  virtual int getCellID1() const ;
52 
56  virtual const double * getPosition() const ;
57 
62  LCIO_DEPRECATED("Use getEDep() instead", virtual float getdEdx() const ) ;
63 
66  virtual float getEDep() const ;
67 
68 
71  virtual float getTime() const ;
72 
73 
77  virtual EVENT::MCParticle * getMCParticle() const ;
78 
79 
83  virtual const float* getMomentum() const ;
84 
88  virtual float getPathLength() const ;
89 
92  virtual int getQuality() const { return _quality ; }
93 
94  // ---------- setters ------------------------
95 
98  void setCellID0(int id0) ;
99 
104  void setCellID1(int id1) ;
105 
108  void setPosition( const double pos[3]) ;
109 
114  LCIO_DEPRECATED("Use setEDep(float) instead", void setdEdx( float dEdX ) ) ;
115 
118  void setEDep( float e ) ;
119 
122  void setTime( float t ) ;
123 
126  void setMCParticle( EVENT::MCParticle* particle) ;
127 
130  void setMomentum( const float p[3] ) ;
131 
134  void setMomentum( float px, float py, float pz ) ;
135 
136  /* Set the path length.
137  */
138  void setPathLength(float pathLength);
139 
140  /* Set the quality flag of the hit.
141  */
142  void setQuality( int quality ) ;
143 
144  /* Set a quality bit of the hit.
145  */
146  void setQualityBit( int bit , bool val=true ) ;
147 
150  virtual bool isOverlay() const ;
151 
154  virtual bool isProducedBySecondary() const ;
155 
156  // setters for quality bits
157  void setOverlay(bool val) ;
158 
159  void setProducedBySecondary(bool val) ;
160 
161  protected:
162  int _cellID0 ;
163  int _cellID1 ;
164  double _pos[3] ;
165  float _EDep ;
166  float _time ;
168  float _p[3] ;
169  float _pathLength ;
170  int _quality ;
171 
172 }; // class
173 } // namespace IMPL
174 #endif /* ifndef IMPL_SIMTRACKERHITIMLP_H */
void setQuality(int quality)
float _p[3]
<– fixme: ROOT cannot handle this pointer !!????
void setPathLength(float pathLength)
virtual int getCellID() const =0
DEPRECATED: use ()
void setProducedBySecondary(bool val)
virtual int getQuality() const
The quality bit flag of the hit.
virtual ~SimTrackerHitImpl()
Destructor.
A generic simulated tracker hit.
Definition: SimTrackerHit.h:23
void setCellID1(int id1)
Sets the second cell id; Only store if the flag word (bit THBIT_ID1) of the collection is set...
virtual float getPathLength() const
The path length of the particle in the sensitive material that resulted in this hit.
LCIO_DEPRECATED("Use getCellID0() instead", virtual int getCellID() const )
DEPRECATED: use ()
EVENT::MCParticle * _particle
virtual bool isProducedBySecondary() const
True if the particle has been created by a secondary particle that is not stored in the MCParticle co...
virtual const float * getMomentum() const
Returns the 3-momentum of the particle at the hits position in [GeV] - optional, only if bit LCIO::TH...
void setEDep(float e)
Sets EDep.
Implementation of SimTrackerHit.
virtual int getCellID0() const
Same name as in CalorimeterHit, even though there are no 'cells' in this case.
virtual float getdEdx() const =0
Returns the dE/dx of the hit in [GeV].
virtual const double * getPosition() const
Returns the hit position.
virtual int id() const
Returns an object id for internal (debugging) use in LCIO.
virtual int getCellID1() const
Same name as in CalorimeterHit, even though there are no 'cells' in this case 0 if information is not...
SimTrackerHitImpl()
Default constructor, initializes values to 0.
void setMomentum(const float p[3])
Sets the momentum of the particle at the hit's position.
virtual bool isOverlay() const
True if the hit has been overlayed by the simulation (or digitization) program.
void setCellID0(int id0)
Sets the first cell id;.
The LCIO Monte Carlo particle.
Definition: MCParticle.h:27
virtual EVENT::MCParticle * getMCParticle() const
Returns the MC particle that caused the hit.
void setQualityBit(int bit, bool val=true)
virtual float getTime() const
Returns the time of the hit.
virtual int simpleUID() const
Definition: AccessChecked.h:26
void setTime(float t)
Sets the time.
SimTrackerHitImpl & operator=(const SimTrackerHitImpl &)=default
default assignment operator - use with care
Controls access to objects.
Definition: AccessChecked.h:18
void setPosition(const double pos[3])
Sets the position.
void setMCParticle(EVENT::MCParticle *particle)
Sets the MCParticle that caused the hit.
virtual float getEDep() const
Returns the deposited energy of the hit [GeV].