Belle II Software  release-08-01-10
WireHitMC.h
1 /**************************************************************************
2  * basf2 (Belle II Analysis Software Framework) *
3  * Author: The Belle II Collaboration *
4  * *
5  * See git log for contributors and copyright holders. *
6  * This file is licensed under LGPL-3.0, see LICENSE.md. *
7  **************************************************************************/
8 
9 //-----------------------------------------------------------------------------
10 // Description : A class to represent a MC wire hit in CDC.
11 //-----------------------------------------------------------------------------
12 
13 #ifndef TRGCDCWireHitMC_FLAG_
14 #define TRGCDCWireHitMC_FLAG_
15 
16 #include "CLHEP/Geometry/Point3D.h"
17 #include "CLHEP/Geometry/Vector3D.h"
18 
19 #ifdef TRGCDC_SHORT_NAMES
20 #define TCWHitMC TRGCDCWireHitMC
21 #endif
22 
23 namespace Belle2 {
29  class TRGCDCWire;
30  class TRGCDCWireHit;
31  class TRGCDCTrackMC;
32 
35 
36  public:
39 
41  virtual ~TRGCDCWireHitMC();
42 
43  public:// Selectors
45  float distance(void) const;
46 
48  const HepGeom::Point3D<double>& hitPosition(void) const;
49 
51  const HepGeom::Point3D<double>& entrance(void) const;
52 
54  const HepGeom::Vector3D<double>& direction(void) const;
55 
57  const CLHEP::Hep3Vector& momentum(void) const;
58 
60  int leftRight(void) const;
61 
63  const TRGCDCWire* wire(void) const;
64 
66  const TRGCDCTrackMC* hep(void) const;
67 
69  const TRGCDCWireHit* hit(void) const;
70 
71  private:
73  const TRGCDCWire* _wire;
81  HepGeom::Vector3D<double> _direction;
83  CLHEP::Hep3Vector _momentum;
85  float _distance;
87  float _energy;
92 
93  friend class TRGCDC;
94  };
95 
96 //-----------------------------------------------------------------------------
97 
98  inline
99  float
101  {
102  return _distance;
103  }
104 
105  inline
108  {
109  return _position;
110  }
111 
112  inline
115  {
116  return _entrance;
117  }
118 
119  inline
120  const HepGeom::Vector3D<double>&
122  {
123  return _direction;
124  }
125 
126  inline
127  int
129  {
130  return _leftRight;
131  }
132 
133  inline
134  const TRGCDCWire*
136  {
137  return _wire;
138  }
139 
140  inline
141  const TRGCDCTrackMC*
143  {
144  return _hep;
145  }
146 
147  inline
148  const TRGCDCWireHit*
150  {
151  return _hit;
152  }
153 
154  inline
155  const CLHEP::Hep3Vector&
157  {
158  return _momentum;
159  }
160 
162 } // namespace Belle2
163 
164 #endif /* TRGCDCWireHitMC_FLAG_ */
A class to represent a GEN_HEPEVT particle in tracking.
Definition: TrackMC.h:32
A class to represent a MC wire hit in CDC.
Definition: WireHitMC.h:34
int _leftRight
leftright info
Definition: WireHitMC.h:91
float _distance
distance
Definition: WireHitMC.h:85
CLHEP::Hep3Vector _momentum
momentum
Definition: WireHitMC.h:83
const TRGCDCWire * _wire
pointer to TRGCDCWire
Definition: WireHitMC.h:73
const TRGCDCWireHit * _hit
pointer to TRGCDCWireHit
Definition: WireHitMC.h:75
HepGeom::Vector3D< double > _direction
direction vector
Definition: WireHitMC.h:81
const TRGCDCTrackMC * _hep
pointer to TRGCDCTrackMC
Definition: WireHitMC.h:89
HepGeom::Point3D< double > _position
position vector
Definition: WireHitMC.h:77
HepGeom::Point3D< double > _entrance
entrance vector
Definition: WireHitMC.h:79
float _energy
energy
Definition: WireHitMC.h:87
A class to represent a wire hit in CDC.
Definition: WireHit.h:33
A class to represent a wire in CDC.
Definition: Wire.h:56
The instance of TRGCDC is a singleton.
Definition: TRGCDC.h:69
const TRGCDCWire * wire(void) const
returns a pointer to a TRGCDCWire.
Definition: WireHitMC.h:135
virtual ~TRGCDCWireHitMC()
Destructor.
Definition: WireHitMC.cc:32
const HepGeom::Point3D< double > & hitPosition(void) const
returns hit position.
Definition: WireHitMC.h:107
const CLHEP::Hep3Vector & momentum(void) const
returns momentum vector at the entrance.
Definition: WireHitMC.h:156
int leftRight(void) const
returns left or right.
Definition: WireHitMC.h:128
float distance(void) const
returns drift distance.
Definition: WireHitMC.h:100
const HepGeom::Point3D< double > & entrance(void) const
returns an entrance point.
Definition: WireHitMC.h:114
const TRGCDCWireHit * hit(void) const
returns a pointer to a TRGCDCWireHit.
Definition: WireHitMC.h:149
const TRGCDCTrackMC * hep(void) const
returns a pointer to a GEN_HEPEVT.
Definition: WireHitMC.h:142
const HepGeom::Vector3D< double > & direction(void) const
returns vector from entrance to exit point.
Definition: WireHitMC.h:121
TRGCDCWireHitMC(const TRGCDCWire *, const TRGCDCWireHit *)
Constructor.
Definition: WireHitMC.cc:21
Abstract base class for different kinds of events.