Belle II Software  release-05-01-25
ARICHTrack.h
1 /**************************************************************************
2  * BASF2 (Belle Analysis Framework 2) *
3  * Copyright(C) 2010 - Belle II Collaboration *
4  * *
5  * Author: The Belle II Collaboration *
6  * Contributors: Luka Santelj *
7  * *
8  * This software is provided "as is" without any warranty. *
9  **************************************************************************/
10 
11 #ifndef ARICHTRACK_H
12 #define ARICHTRACK_H
13 
14 #include <tracking/dataobjects/ExtHit.h>
15 #include <arich/dataobjects/ARICHPhoton.h>
16 #include <arich/dataobjects/ARICHAeroHit.h>
17 #include <vector>
18 
19 namespace Belle2 {
34  class ARICHTrack : public RelationsObject {
35  public:
36 
40  ARICHTrack()
41  {}
42 
48  ARICHTrack(TVector3 position,
49  TVector3 momentum)
50  {
51 
52  m_x = (float) position.x();
53  m_y = (float) position.y();
54  m_z = (float) position.z();
55  m_momentum = (float) momentum.Mag();
56  momentum = momentum.Unit();
57  m_dx = (float) momentum.x();
58  m_dy = (float) momentum.y();
59  m_dz = (float) momentum.z();
60 
61  }
62 
63 
68  explicit ARICHTrack(const ARICHAeroHit* aeroHit)
69  {
70 
71  TVector3 pos = aeroHit->getPosition();
72  m_x = (float) pos.X();
73  m_y = (float) pos.Y();
74  m_z = (float) pos.Z();
75 
76  TVector3 mom = aeroHit->getMomentum();
77  m_momentum = (float) mom.Mag();
78  mom = mom.Unit();
79  m_dx = (float) mom.X();
80  m_dy = (float) mom.Y();
81  m_dz = (float) mom.Z();
82  }
83 
84 
89  explicit ARICHTrack(const ExtHit* extHit)
90  {
91 
92  TVector3 pos = extHit->getPosition();
93  m_x = (float) pos.X();
94  m_y = (float) pos.Y();
95  m_z = (float) pos.Z();
96 
97  TVector3 mom = extHit->getMomentum();
98  m_momentum = (float) mom.Mag();
99  mom = mom.Unit();
100  m_dx = (float) mom.X();
101  m_dy = (float) mom.Y();
102  m_dz = (float) mom.Z();
103  }
104 
105 
110  void setHapdWindowHit(const ExtHit* extHit)
111  {
112  TVector3 pos = extHit->getPosition();
113  m_winX = (float) pos.X();
114  m_winY = (float) pos.Y();
115  m_hitWin = true;
116  }
117 
123  void setHapdWindowHit(double x, double y)
124  {
125  m_winX = (float) x;
126  m_winY = (float) y;
127  m_hitWin = true;
128  }
129 
130 
135  TVector3 getPosition() const { return TVector3(m_x, m_y, m_z);}
136 
141  TVector3 getDirection() const { return TVector3(m_dx, m_dy, m_dz);}
142 
147  double getMomentum() const { return double(m_momentum);}
148 
153  bool hitsWindow() const { return m_hitWin;}
154 
159  TVector2 windowHitPosition() const {return TVector2(m_winX, m_winY);}
160 
161 
168  void setReconstructedValues(TVector3 r, TVector3 dir, double p)
169  {
170  m_x = (float) r.X();
171  m_y = (float) r.Y();
172  m_z = (float) r.Z();
173  m_dx = (float) dir.X();
174  m_dy = (float) dir.Y();
175  m_dz = (float) dir.Z();
176  m_momentum = (float) p;
177  }
178 
182  void addPhoton(ARICHPhoton photon)
183  {
184  m_photons.emplace_back(photon);
185  }
186 
191  const std::vector<ARICHPhoton>& getPhotons() const { return m_photons; }
192 
193  private:
194 
195  float m_x = 0;
196  float m_y = 0;
197  float m_z = 0;
198  float m_dx = 0;
199  float m_dy = 0;
200  float m_dz = 0;
201  float m_momentum;
203  bool m_hitWin = 0;
204  float m_winX = 0;
205  float m_winY = 0;
208  std::vector<ARICHPhoton> m_photons;
210  ClassDef(ARICHTrack, 2);
212  };
214 } // namespace Belle2
215 
216 #endif // ARICHTRACK_H
Belle2::ARICHAeroHit::getPosition
TVector3 getPosition() const
Get track position (at entrance in 1. aerogel plane)
Definition: ARICHAeroHit.h:78
Belle2::ARICHTrack::m_x
float m_x
Reconstructed position.
Definition: ARICHTrack.h:203
Belle2::ARICHTrack::getMomentum
double getMomentum() const
returns track momentum
Definition: ARICHTrack.h:155
Belle2::ARICHAeroHit::getMomentum
TVector3 getMomentum() const
Get track momentum (at entrance in 1. aerogel plane)
Definition: ARICHAeroHit.h:81
Belle2::ARICHTrack::m_dz
float m_dz
Reconstructed direction.
Definition: ARICHTrack.h:208
Belle2::ARICHTrack::m_photons
std::vector< ARICHPhoton > m_photons
collection of ARICHPhotons associated with the track
Definition: ARICHTrack.h:216
Belle2::ExtHit::getPosition
TVector3 getPosition() const
Get position of this extrapolation hit.
Definition: ExtHit.h:153
Belle2::ARICHTrack::m_dy
float m_dy
Reconstructed direction.
Definition: ARICHTrack.h:207
Belle2::ARICHTrack::m_z
float m_z
Reconstructed position.
Definition: ARICHTrack.h:205
Belle2::ARICHTrack::getDirection
TVector3 getDirection() const
returns track direction vector
Definition: ARICHTrack.h:149
Belle2::ARICHAeroHit
Datastore class that holds information on track parameters at the entrance in aerogel.
Definition: ARICHAeroHit.h:37
Belle2::ARICHTrack::setReconstructedValues
void setReconstructedValues(TVector3 r, TVector3 dir, double p)
Sets the reconstructed value of track parameters.
Definition: ARICHTrack.h:176
Belle2::ARICHTrack::m_momentum
float m_momentum
Reconstructed momentum.
Definition: ARICHTrack.h:209
Belle2::ARICHTrack::hitsWindow
bool hitsWindow() const
Returns true if track hits HAPD window.
Definition: ARICHTrack.h:161
Belle2::ExtHit
Store one Ext hit as a ROOT object.
Definition: ExtHit.h:40
Belle2::ARICHTrack::getPosition
TVector3 getPosition() const
returns track position vector
Definition: ARICHTrack.h:143
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::ARICHTrack
Datastore class that holds position and momentum information of tracks that hit ARICH.
Definition: ARICHTrack.h:42
Belle2::ARICHTrack::m_winY
float m_winY
y position of track extrapolated to HAPD plane
Definition: ARICHTrack.h:213
Belle2::ARICHTrack::addPhoton
void addPhoton(ARICHPhoton photon)
Add ARICHPhoton to collection of photons.
Definition: ARICHTrack.h:190
Belle2::ARICHTrack::ClassDef
ClassDef(ARICHTrack, 2)
the class title
Belle2::RelationsObject
RelationsInterface< TObject > RelationsObject
Provides interface for getting/adding relations to objects in StoreArrays.
Definition: RelationsObject.h:443
Belle2::ARICHTrack::m_hitWin
bool m_hitWin
true if track hits HAPD window
Definition: ARICHTrack.h:211
Belle2::ExtHit::getMomentum
TVector3 getMomentum() const
Get momentum at this extrapolation hit.
Definition: ExtHit.h:157
Belle2::ARICHTrack::setHapdWindowHit
void setHapdWindowHit(const ExtHit *extHit)
Set information about hit on HAPD window.
Definition: ARICHTrack.h:118
Belle2::ARICHTrack::m_winX
float m_winX
x position of track extrapolated to HAPD plane
Definition: ARICHTrack.h:212
Belle2::ARICHTrack::getPhotons
const std::vector< ARICHPhoton > & getPhotons() const
Returns vector of ARICHPhoton's associated with track.
Definition: ARICHTrack.h:199
Belle2::ARICHTrack::m_y
float m_y
Reconstructed position.
Definition: ARICHTrack.h:204
Belle2::ARICHTrack::m_dx
float m_dx
Reconstructed direction.
Definition: ARICHTrack.h:206
Belle2::ARICHTrack::ARICHTrack
ARICHTrack()
Empty constructor for ROOT IO.
Definition: ARICHTrack.h:48
Belle2::ARICHTrack::windowHitPosition
TVector2 windowHitPosition() const
Get HAPD window hit position.
Definition: ARICHTrack.h:167
Belle2::ARICHPhoton
Struct for ARICH reconstructed photon (hit related to track) information.
Definition: ARICHPhoton.h:27