Definition the generic trajectory of a particle (base class for helix/straight trajectories). More...
#include <Trajectory.h>
Public Member Functions | |
virtual bool | crosses (const BarrelSimplifiedGeometry &layer) const =0 |
Check if trajectory crosses a barrel layer. More... | |
const math::XYZTLorentzVector & | getMomentum () |
Simple getter: return momentum of the particle that was used to create trajectory. More... | |
const math::XYZTLorentzVector & | getPosition () |
Simple getter: return position of the particle that was used to create trajectory. More... | |
virtual void | move (double deltaTimeC)=0 |
Move the particle along the trajectory for a given time. More... | |
virtual double | nextCrossingTimeC (const BarrelSimplifiedGeometry &layer, bool onLayer=false) const =0 |
Return delta time (t*c) of the next intersection of trajectory and barrel layer. More... | |
double | nextCrossingTimeC (const ForwardSimplifiedGeometry &layer, bool onLayer=false) const |
Return delta time (t*c) of the next intersection of trajectory and forward layer. More... | |
double | nextCrossingTimeC (const SimplifiedGeometry &layer, bool onLayer=false) const |
Return delta time (t*c) of the next intersection of trajectory and generic layer. More... | |
virtual | ~Trajectory () |
Static Public Member Functions | |
static std::unique_ptr< Trajectory > | createTrajectory (const fastsim::Particle &particle, const double magneticFieldZ) |
Calls constructor of derived classes. More... | |
Protected Member Functions | |
Trajectory (const fastsim::Particle &particle) | |
Constructor of base class. More... | |
Protected Attributes | |
math::XYZTLorentzVector | momentum_ |
momentum of the particle that was used to create trajectory More... | |
math::XYZTLorentzVector | position_ |
position of the particle that was used to create trajectory More... | |
Definition the generic trajectory of a particle (base class for helix/straight trajectories).
Mathematical representation of a particle's trajectory. Provides three basic funtions:
Definition at line 26 of file Trajectory.h.
|
virtual |
Definition at line 10 of file Trajectory.cc.
|
protected |
Constructor of base class.
Usually constructor of derived classes HelixTrajectory or StraightTrajectory are called.
Definition at line 12 of file Trajectory.cc.
References fastsim::Particle::momentum(), and fastsim::Particle::position().
|
static |
Calls constructor of derived classes.
Decides whether a straight (uncharged particle or very high pT charged particle) or a helix trajectory (generic charged particle) is constructed.
particle | The particle that should be decayed. |
magneticFieldZ | The strenght of the magnetic field at the position of the particle. |
Definition at line 17 of file Trajectory.cc.
References funct::abs(), fastsim::Particle::charge(), MillePedeFileConverter_cfg::e, TrackValidation_cff::e5, LogDebug, CaloMaterial_cfi::magneticFieldZ, fastsim::Particle::momentum(), and fastsim::Constants::speedOfLight.
Referenced by fastsim::LayerNavigator::moveParticleToNextLayer().
|
pure virtual |
Check if trajectory crosses a barrel layer.
Virtual function since different behavior of straight and helix trajectory. This funtion does not exist for forward layers since those are always hit - unless particle has exactly 0 momentum in Z direction which doesn't happen for numerical reasons.
Implemented in fastsim::StraightTrajectory, and fastsim::HelixTrajectory.
|
inline |
Simple getter: return momentum of the particle that was used to create trajectory.
Definition at line 48 of file Trajectory.h.
References momentum_.
|
inline |
Simple getter: return position of the particle that was used to create trajectory.
Definition at line 45 of file Trajectory.h.
References position_.
|
pure virtual |
Move the particle along the trajectory for a given time.
deltaTimeC | Time in units of t*c.. |
Implemented in fastsim::StraightTrajectory, and fastsim::HelixTrajectory.
|
pure virtual |
Return delta time (t*c) of the next intersection of trajectory and barrel layer.
Different treatment of intersection of straight/helix layers with barrel layers. Implementation in derived classes.
layer | A barrel layer. |
onLayer | Specify if the particle already is on the layer (in that case the second solution has to be picked). |
Implemented in fastsim::StraightTrajectory, and fastsim::HelixTrajectory.
double Trajectory::nextCrossingTimeC | ( | const ForwardSimplifiedGeometry & | layer, |
bool | onLayer = false |
||
) | const |
Return delta time (t*c) of the next intersection of trajectory and forward layer.
Since only momentum in Z direction matters, same function for straight and helix trajectories.
layer | A forward layer. |
onLayer | Specify if the particle already is on the layer (in this case there is no solution). |
Definition at line 40 of file Trajectory.cc.
References phase1PixelTopology::layer.
double Trajectory::nextCrossingTimeC | ( | const SimplifiedGeometry & | layer, |
bool | onLayer = false |
||
) | const |
Return delta time (t*c) of the next intersection of trajectory and generic layer.
Calculation different for barrel/forward layers and straight/helix trajectory. Chooses which function has to be called.
layer | A barrel or forward layer. |
onLayer | Specify if the particle already is on the layer (leads to different constraints for forward/barrel layers). |
Definition at line 32 of file Trajectory.cc.
References phase1PixelTopology::layer.
|
protected |
momentum of the particle that was used to create trajectory
Definition at line 92 of file Trajectory.h.
Referenced by getMomentum(), and fastsim::StraightTrajectory::nextCrossingTimeC().
|
protected |
position of the particle that was used to create trajectory
Definition at line 91 of file Trajectory.h.
Referenced by getPosition(), and fastsim::StraightTrajectory::nextCrossingTimeC().