KiTrack  1.7.0
IHit.h
1 #ifndef IHit_h
2 #define IHit_h
3 
4 #include "KiTrack/ISectorSystem.h"
5 
6 namespace KiTrack{
7 
8 
17  class IHit{
18 
19 
20  public:
21 
23  float getX() const { return _x; }
24 
26  float getY() const { return _y; }
27 
29  float getZ() const { return _z; }
30 
32  int getSector() const { return _sector; }
33 
35  virtual const ISectorSystem* getSectorSystem() const =0;
36 
38  unsigned getLayer() const {return getSectorSystem()->getLayer( _sector ); }
39 
41  bool isVirtual() const { return _isVirtual; };
42  void setIsVirtual( bool isVirtual ){ _isVirtual = isVirtual; };
43 
45  float distTo( IHit* otherHit );
46 
48  std::string getPositionInfo();
49  //YV
51  double get3DAngle( IHit* otherHit) const { return _3DAngle ; }
52  //YV
54  double getPhi() const { return _phiMV ; }
55  //YV
57  double getTheta() const { return _thetaMV ; }
58 
59  virtual ~IHit(){}
60 
61  protected:
62 
63 
64  float _x;
65  float _y;
66  float _z;
67 
68  double _3DAngle; //YV
69  double _phiMV; //YV
70  double _thetaMV; //YV
71 
72  int _sector;
73 
74 
75  bool _isVirtual;
76 
77 
78  };
79 
80 
81 
82 }
83 
84 
85 #endif
86 
87 
88 
89 
std::string getPositionInfo()
Definition: IHit.cc:20
double getPhi() const
to be used with mini-vectors:
Definition: IHit.h:54
double get3DAngle(IHit *otherHit) const
to be used with mini-vectors:
Definition: IHit.h:51
unsigned getLayer() const
Definition: IHit.h:38
virtual unsigned getLayer(int sector) const =0
double getTheta() const
to be used with mini-vectors:
Definition: IHit.h:57
float getX() const
Definition: IHit.h:23
bool isVirtual() const
Definition: IHit.h:41
float getY() const
Definition: IHit.h:26
int getSector() const
Definition: IHit.h:32
An Interface for hits.
Definition: IHit.h:17
An interface for Sector Systems.
Definition: ISectorSystem.h:24
float distTo(IHit *otherHit)
Definition: IHit.cc:8
float getZ() const
Definition: IHit.h:29
virtual const ISectorSystem * getSectorSystem() const =0