BOSS 8.0.0
BESIII Offline Software System
Loading...
Searching...
No Matches
Reconstruction/TrkReco/include/TrkReco/TMDCWireHitMC.h
Go to the documentation of this file.
1//-----------------------------------------------------------------------------
2// $Id: TMDCWireHitMC.h,v 1.6 2010/03/31 09:58:59 liucy Exp $
3//-----------------------------------------------------------------------------
4// Filename : TMDCWireHitMC.h
5// Section : Tracking MDC
6// Owner : Yoshi Iwasaki
7// Email : yoshihito.iwasaki@kek.jp
8//-----------------------------------------------------------------------------
9// Description : A class to represent a MC wire hit in MDC.
10// See http://bsunsrv1.kek.jp/~yiwasaki/tracking/
11//-----------------------------------------------------------------------------
12
13#ifndef TMDCWireHitMC_FLAG_
14#define TMDCWireHitMC_FLAG_
15
16#ifdef TRKRECO_DEBUG_DETAIL
17# ifndef TRKRECO_DEBUG
18# define TRKRECO_DEBUG
19# endif
20#endif
21
22#include <string>
23
24// #define HEP_SHORT_NAMES
25#include "CLHEP/Alist/AList.h"
26#include "CLHEP/Vector/ThreeVector.h"
27#ifndef CLHEP_POINT3D_H
28# include "CLHEP/Geometry/Point3D.h"
29#endif
30#ifndef ENABLE_BACKWARDS_COMPATIBILITY
31typedef HepGeom::Point3D<double> HepPoint3D;
32#endif
33#include "CLHEP/Geometry/Vector3D.h"
34#ifndef ENABLE_BACKWARDS_COMPATIBILITY
35typedef HepGeom::Vector3D<double> HepVector3D;
36#endif
37using namespace CLHEP;
38class TMDC;
39class TMDCWire;
40class TMDCWireHit;
41class TTrackHEP;
42// struct datcdc_mcwirhit;
43class MdcDat_mcwirhit;
44
45/// A class to represent a MC wire hit in MDC.
46class TMDCWireHitMC {
47
48public:
49 /// Constructor.
51
52 /// Destructor
53 virtual ~TMDCWireHitMC();
54
55public: // Selectors
56 /// returns drift distance.
57 float distance( void ) const;
58
59 /// returns hit position.
60 const HepPoint3D& hitPosition( void ) const;
61
62 /// returns an entrance point.
63 const HepPoint3D& entrance( void ) const;
64
65 /// returns vector from entrance to exit point.
66 const HepVector3D& direction( void ) const;
67
68 /// returns momentum vector at the entrance.
69 const Hep3Vector& momentum( void ) const;
70
71 /// returns left or right.
72 int leftRight( void ) const;
73
74 /// returns a pointer to DATMDC_MCWIRHIT.
75 MdcDat_mcwirhit* datcdc( void ) const;
76
77 /// returns a pointer to a TMDCWire.
78 const TMDCWire* const wire( void ) const;
79
80 /// returns a pointer to a GEN_HEPEVT.
81 const TTrackHEP* const hep( void ) const;
82
83 /// returns a pointer to a TMDCWireHit.
84 const TMDCWireHit* const hit( void ) const;
85
86public: // Modifiers
87private:
88 const TMDCWire* _wire;
89 const TMDCWireHit* _hit;
90 HepPoint3D _position;
91 HepPoint3D _entrance;
92 HepVector3D _direction;
93 Hep3Vector _momentum;
94 float _distance;
95 float _energy;
96 int _leftRight;
97 MdcDat_mcwirhit* _datcdc;
98 const TTrackHEP* _hep;
99
100 friend class TMDC;
101};
102
103//-----------------------------------------------------------------------------
104
105#ifdef TMDCWireHitMC_NO_INLINE
106# define inline
107#else
108# undef inline
109# define TMDCWireHitMC_INLINE_DEFINE_HERE
110#endif
111
112#ifdef TMDCWireHitMC_INLINE_DEFINE_HERE
113
114inline float TMDCWireHitMC::distance( void ) const { return _distance; }
115
116inline const HepPoint3D& TMDCWireHitMC::hitPosition( void ) const { return _position; }
117
118inline const HepPoint3D& TMDCWireHitMC::entrance( void ) const { return _entrance; }
119
120inline const HepVector3D& TMDCWireHitMC::direction( void ) const { return _direction; }
121
122inline int TMDCWireHitMC::leftRight( void ) const { return _leftRight; }
123
124inline MdcDat_mcwirhit* TMDCWireHitMC::datcdc( void ) const { return _datcdc; }
125
126inline const TMDCWire* const TMDCWireHitMC::wire( void ) const { return _wire; }
127
128inline const TTrackHEP* const TMDCWireHitMC::hep( void ) const { return _hep; }
129
130inline const TMDCWireHit* const TMDCWireHitMC::hit( void ) const { return _hit; }
131
132inline const Hep3Vector& TMDCWireHitMC::momentum( void ) const { return _momentum; }
133
134#endif
135
136#undef inline
137
138#endif /* TMDCWireHitMC_FLAG_ */
HepGeom::Vector3D< double > HepVector3D
HepGeom::Point3D< double > HepPoint3D
HepGeom::Point3D< double > HepPoint3D
HepGeom::Vector3D< double > HepVector3D
const HepPoint3D & hitPosition(void) const
returns hit position.
const Hep3Vector & momentum(void) const
returns momentum vector at the entrance.
const TTrackHEP *const hep(void) const
returns a pointer to a GEN_HEPEVT.
MdcDat_mcwirhit * datcdc(void) const
returns a pointer to DATMDC_MCWIRHIT.
TMDCWireHitMC(const TMDCWire *, const TMDCWireHit *, MdcDat_mcwirhit *)
Constructor.
const HepVector3D & direction(void) const
returns vector from entrance to exit point.
const TMDCWire *const wire(void) const
returns a pointer to a TMDCWire.
float distance(void) const
returns drift distance.
virtual ~TMDCWireHitMC()
Destructor.
const HepPoint3D & entrance(void) const
returns an entrance point.
const TMDCWireHit *const hit(void) const
returns a pointer to a TMDCWireHit.
int leftRight(void) const
returns left or right.
A class to represent a GEN_HEPEVT particle in tracking.