Auxiliary class for performing Lorentz boosts.
More...
#include <JLorentzBoost.hh>
|
| JLorentzBoost () |
| Default constructor.
|
|
| JLorentzBoost (const Boost &boost) |
| Copy constructor.
|
|
double | getGamma () const |
| Retrieve gamma factor.
|
|
template<class CoordSystem > |
LorentzVector< CoordSystem > | operator() (const LorentzVector< CoordSystem > &x4) const |
| Lorentz boost operator.
|
|
void | operator() (JVertex3D &vertex) const |
| Lorentz boost operator.
|
|
void | operator() (JTrack3E &track, const double mass) const |
| Lorentz boost operator.
|
|
void | operator() (Trk &track) const |
| Lorentz boost operator.
|
|
void | operator() (Hit &hit) const |
| Lorentz boost operator.
|
|
template<class T > |
void | operator() (T __begin, T __end) const |
| Lorentz boost operator.
|
|
void | operator() (Evt &event) const |
| Lorentz boost operator.
|
|
Auxiliary class for performing Lorentz boosts.
Definition at line 46 of file JLorentzBoost.hh.
◆ JLorentzBoost() [1/2]
JAANET::JLorentzBoost::JLorentzBoost |
( |
| ) |
|
|
inline |
◆ JLorentzBoost() [2/2]
JAANET::JLorentzBoost::JLorentzBoost |
( |
const Boost & | boost | ) |
|
|
inline |
Copy constructor.
- Parameters
-
Definition at line 61 of file JLorentzBoost.hh.
61 :
62 Boost(boost)
63 {}
◆ getGamma()
double JAANET::JLorentzBoost::getGamma |
( |
| ) |
const |
|
inline |
Retrieve gamma factor.
- Returns
- gamma factor
Definition at line 71 of file JLorentzBoost.hh.
72 {
73 const double beta2 = this->BetaVector().Mag2();
74
75 return 1.0 / sqrt(1.0 - beta2);
76 }
◆ operator()() [1/7]
template<class CoordSystem >
LorentzVector< CoordSystem > JAANET::JLorentzBoost::operator() |
( |
const LorentzVector< CoordSystem > & | x4 | ) |
const |
|
inline |
Lorentz boost operator.
- Parameters
-
- Returns
- boosted 4-vector
Definition at line 86 of file JLorentzBoost.hh.
87 {
88 return static_cast<const Boost&>(*this)(x4);
89 }
◆ operator()() [2/7]
void JAANET::JLorentzBoost::operator() |
( |
JVertex3D & | vertex | ) |
const |
|
inline |
Lorentz boost operator.
- Parameters
-
Definition at line 97 of file JLorentzBoost.hh.
98 {
100 using namespace ROOT::Math;
101
102 const XYZTVector x0(vertex.getX(), vertex.getY(), vertex.getZ(), vertex.getT() * getSpeedOfLight());
103 const XYZTVector x1 = (*this)(x0);
104
106
107 vertex.setPosition(pos1);
108 vertex.setT(x1.T() / getSpeedOfLight());
109 }
Data structure for position in three dimensions.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
◆ operator()() [3/7]
void JAANET::JLorentzBoost::operator() |
( |
JTrack3E & | track, |
|
|
const double | mass ) const |
|
inline |
Lorentz boost operator.
- Parameters
-
track | track |
mass | track particle mass |
Definition at line 118 of file JLorentzBoost.hh.
120 {
122 using namespace ROOT::Math;
123
125
126 const XYZTVector x0(track.getX(), track.getY(), track.getZ(), track.getT() * getSpeedOfLight());
127 const XYZTVector x1 = (*this)(x0);
128
129 const PxPyPzEVector p0(Ekin * track.getDX(), Ekin * track.getDY(), Ekin * track.getDZ(), track.getE());
130 const PxPyPzEVector
p1 = (*this)(p0);
131
132 const JVector3D pos1(x1.X(), x1.Y(), x1.Z());
134
135 track.setPosition (pos1);
136 track.setDirection(dir1);
137 track.setT(x1.T());
139 }
Data structure for vector in three dimensions.
Data structure for normalised vector in three dimensions.
double getKineticEnergy(const Trk &trk)
Get track kinetic energy.
◆ operator()() [4/7]
void JAANET::JLorentzBoost::operator() |
( |
Trk & | track | ) |
const |
|
inline |
Lorentz boost operator.
N.B.: Only initial and final state tracks are boosted.
- Parameters
-
Definition at line 148 of file JLorentzBoost.hh.
149 {
152 using namespace ROOT::Math;
153
154
155
157
160
161 const PxPyPzEVector p0(Ekin.
x, Ekin.
y, Ekin.
z, track.
E);
162 const PxPyPzEVector
p1 = (*this)(p0);
163
167
168
169
170
173 track.
t + track.
len / getSpeedOfLight());
174
175 (*this)(x0);
176 (*this)(x1);
177
178 track.
t = x0.getT() / getSpeedOfLight();
179 track.
pos =
Vec(x0.getX(), x0.getY(), x0.getZ());
180
181 track.
len = x0.getDistance(x1);
182 }
183 }
bool is_finalstate(const Trk &track)
Test whether given track corresponds to a final state particle.
bool is_initialstate(const Trk &track)
Test whether given track corresponds to an initial state particle.
JPosition3D getPosition(const Vec &pos)
Get position.
int status
MC status code, see km3net-dataformat/definitions/trkmembers.csv for values.
double E
Energy [GeV] (either MC truth or reconstructed)
double t
track time [ns] (when the particle is at pos )
double len
length, if applicable [m]
Vec pos
postion [m] of the track at time t
The Vec class is a straightforward 3-d vector, which also works in pyroot.
Vec & normalize()
Normalise this vector.
double len() const
Get length.
static const int TRK_ST_ININUCLEI
Initial state nuclei (gseagen)
◆ operator()() [5/7]
void JAANET::JLorentzBoost::operator() |
( |
Hit & | hit | ) |
const |
|
inline |
Lorentz boost operator.
N.B.: The time-over-threshold is not boosted.
- Parameters
-
Definition at line 192 of file JLorentzBoost.hh.
193 {
196
197 const double dt = hit.
t - hit.
tdc;
198
200 (*this)(vertex);
201
202 hit.
pos =
Vec(vertex.getX(), vertex.getY(), vertex.getZ());
203 hit.
t = vertex.getT();
204
206 }
unsigned int tdc
hit tdc (=time in ns)
double t
hit time (from tdc+calibration or MC truth)
double getGamma() const
Retrieve gamma factor.
◆ operator()() [6/7]
template<class T >
void JAANET::JLorentzBoost::operator() |
( |
T | __begin, |
|
|
T | __end ) const |
|
inline |
Lorentz boost operator.
- Parameters
-
__begin | begin of data |
__end | end of data |
Definition at line 216 of file JLorentzBoost.hh.
217 {
219
220 for (T i = __begin; i != __end; ++i) {
221 (*this)(*i);
222 }
223 }
◆ operator()() [7/7]
void JAANET::JLorentzBoost::operator() |
( |
Evt & | event | ) |
const |
|
inline |
Lorentz boost operator.
N.B.: Intermediate state tracks as well as
the event timestamps and MC-time variable are not boosted.
- Parameters
-
Definition at line 233 of file JLorentzBoost.hh.
234 {
235 (*this)(
event.mc_trks.begin(), event.
mc_trks.end());
236 (*this)(
event.mc_hits.begin(), event.
mc_hits.end());
237 (*this)(
event.trks.begin(), event.
trks.end());
238 (*this)(
event.hits.begin(), event.
hits.end());
239 }
std::vector< Hit > hits
list of hits
std::vector< Hit > mc_hits
MC: list of MC truth hits.
std::vector< Trk > mc_trks
MC: list of MC truth tracks.
std::vector< Trk > trks
list of reconstructed tracks (can be several because of prefits,showers, etc).
The documentation for this struct was generated from the following file: