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... | |
double | nextCrossingTimeC (const SimplifiedGeometry &layer, bool onLayer=false) const |
Return delta time (t*c) of the next intersection of trajectory and generic 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... | |
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... | |
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 29 of file Trajectory.h.
|
protected |
Constructor of base class.
Usually constructor of derived classes HelixTrajectory or StraightTrajectory are called.
Definition at line 11 of file Trajectory.cc.
References fastsim::Particle::momentum(), momentum_, fastsim::Particle::position(), and position_.
Referenced by getMomentum().
|
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, LogDebug, 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 52 of file Trajectory.h.
References momentum_, move(), nextCrossingTimeC(), and Trajectory().
|
inline |
Simple getter: return position of the particle that was used to create trajectory.
Definition at line 49 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.
Referenced by Vispa.Gui.WidgetContainer.WidgetContainer::autosize(), Vispa.Gui.VispaWidget.VispaWidget::dragWidget(), getMomentum(), Vispa.Gui.VispaWidget.VispaWidget::setZoom(), and Vispa.Gui.PortConnection.PointToPointConnection::updateConnection().
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 34 of file Trajectory.cc.
References fastsim::SimplifiedGeometry::isForward().
Referenced by getMomentum().
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 47 of file Trajectory.cc.
References fastsim::ForwardSimplifiedGeometry::getZ(), momentum_, and position_.
|
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.
|
protected |
momentum of the particle that was used to create trajectory
Definition at line 95 of file Trajectory.h.
Referenced by getMomentum(), fastsim::HelixTrajectory::move(), fastsim::StraightTrajectory::move(), fastsim::HelixTrajectory::nextCrossingTimeC(), fastsim::StraightTrajectory::nextCrossingTimeC(), nextCrossingTimeC(), and Trajectory().
|
protected |
position of the particle that was used to create trajectory
Definition at line 94 of file Trajectory.h.
Referenced by getPosition(), fastsim::HelixTrajectory::move(), fastsim::StraightTrajectory::move(), fastsim::HelixTrajectory::nextCrossingTimeC(), fastsim::StraightTrajectory::nextCrossingTimeC(), nextCrossingTimeC(), and Trajectory().