Auxiliary class for performing Lorentz boosts.
More...
#include <JLorentzBoost.hh>
Auxiliary class for performing Lorentz boosts.
Definition at line 46 of file JLorentzBoost.hh.
JAANET::JLorentzBoost::JLorentzBoost |
( |
| ) |
|
|
inline |
JAANET::JLorentzBoost::JLorentzBoost |
( |
const Boost & |
boost | ) |
|
|
inline |
double JAANET::JLorentzBoost::getGamma |
( |
| ) |
const |
|
inline |
Retrieve gamma factor.
- Returns
- gamma factor
Definition at line 71 of file JLorentzBoost.hh.
73 const double beta2 = this->BetaVector().Mag2();
75 return 1.0 / sqrt(1.0 - beta2);
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.
88 return static_cast<const Boost&
>(*this)(x4);
void JAANET::JLorentzBoost::operator() |
( |
JVertex3D & |
vertex | ) |
const |
|
inline |
Lorentz boost operator.
- Parameters
-
Definition at line 97 of file JLorentzBoost.hh.
100 using namespace ROOT::Math;
102 const XYZTVector x0(vertex.getX(), vertex.getY(), vertex.getZ(), vertex.getT() *
getSpeedOfLight());
103 const XYZTVector x1 = (*this)(x0);
105 const JPosition3D pos1(x1.X(), x1.Y(), x1.Z());
107 vertex.setPosition(pos1);
const double getSpeedOfLight()
Get speed of light.
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.
122 using namespace ROOT::Math;
126 const XYZTVector x0(track.getX(), track.getY(), track.getZ(), track.getT() *
getSpeedOfLight());
127 const XYZTVector x1 = (*this)(x0);
129 const PxPyPzEVector p0(Ekin * track.getDX(), Ekin * track.getDY(), Ekin * track.getDZ(), track.getE());
130 const PxPyPzEVector
p1 = (*this)(p0);
132 const JVector3D pos1(x1.X(), x1.Y(), x1.Z());
133 const JVersor3D dir1(
p1.X(),
p1.Y(),
p1.Z());
135 track.setPosition (pos1);
136 track.setDirection(dir1);
double getKineticEnergy(const Trk &trk)
Get track kinetic energy.
const double getSpeedOfLight()
Get speed of light.
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.
152 using namespace ROOT::Math;
161 const PxPyPzEVector p0(Ekin.
x, Ekin.
y, Ekin.
z, track.
E);
162 const PxPyPzEVector
p1 = (*this)(p0);
165 track.
dir =
Vec(p1.Px(), p1.Py(), p1.Pz());
179 track.
pos =
Vec(x0.getX(), x0.getY(), x0.getZ());
181 track.
len = x0.getDistance(x1);
double t
track time [ns] (when the particle is at pos )
double E
Energy [GeV] (either MC truth or reconstructed)
double len() const
Get length.
bool is_finalstate(const Trk &track)
Test whether given track corresponds to a final state particle.
The Vec class is a straightforward 3-d vector, which also works in pyroot.
JPosition3D getPosition(const Vec &pos)
Get position.
double len
length, if applicable [m]
static const int TRK_ST_ININUCLEI
Initial state nuclei (gseagen)
double getKineticEnergy(const Trk &trk)
Get track kinetic energy.
bool is_initialstate(const Trk &track)
Test whether given track corresponds to an initial state particle.
Vec & normalize()
Normalise this vector.
int status
MC status code, see km3net-dataformat/definitions/trkmembers.csv for values.
Vec pos
postion [m] of the track at time t
const double getSpeedOfLight()
Get speed of light.
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.
197 const double dt = hit.
t - hit.
tdc;
202 hit.
pos =
Vec(vertex.getX(), vertex.getY(), vertex.getZ());
203 hit.
t = vertex.getT();
unsigned int tdc
hit tdc (=time in ns)
The Vec class is a straightforward 3-d vector, which also works in pyroot.
JPosition3D getPosition(const Vec &pos)
Get position.
double getGamma() const
Retrieve gamma factor.
double t
hit time (from tdc+calibration or MC truth)
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.
220 for (
T i = __begin;
i != __end; ++
i) {
do set_variable OUTPUT_DIRECTORY $WORKDIR T
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.
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());
The documentation for this struct was generated from the following file: