Mathematical representation of a straight trajectory. More...
#include <StraightTrajectory.h>
Public Member Functions | |
bool | crosses (const BarrelSimplifiedGeometry &layer) const override |
Check if an intersection of the trajectory with a barrel layer exists. More... | |
void | move (double deltaTimeC) override |
Move the particle along the helix trajectory for a given time. More... | |
double | nextCrossingTimeC (const BarrelSimplifiedGeometry &layer, bool onLayer=false) const override |
Return delta time (t*c) of the next intersection of trajectory and barrel layer. More... | |
StraightTrajectory (const Particle &particle) | |
Constructor. More... | |
StraightTrajectory (const Trajectory &trajectory) | |
Use Copy Constructor. More... | |
Public Member Functions inherited from fastsim::Trajectory | |
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... | |
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... | |
Additional Inherited Members | |
Static Public Member Functions inherited from fastsim::Trajectory | |
static std::unique_ptr< Trajectory > | createTrajectory (const fastsim::Particle &particle, const double magneticFieldZ) |
Calls constructor of derived classes. More... | |
Protected Member Functions inherited from fastsim::Trajectory | |
Trajectory (const fastsim::Particle &particle) | |
Constructor of base class. More... | |
Protected Attributes inherited from fastsim::Trajectory | |
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... | |
Mathematical representation of a straight trajectory.
Reflects trajectory of a uncharged particle.
Definition at line 19 of file StraightTrajectory.h.
|
inline |
Constructor.
Definition at line 26 of file StraightTrajectory.h.
|
inline |
Use Copy Constructor.
Definition at line 32 of file StraightTrajectory.h.
|
inlineoverridevirtual |
Check if an intersection of the trajectory with a barrel layer exists.
There is always an intersection between a straight line and a barrel layer unless the trajectory is parallel to z axis. In this case, the particle is not propagated anyways since it will not hit any detector material.
layer | A barrel layer. |
Implements fastsim::Trajectory.
Definition at line 40 of file StraightTrajectory.h.
References move(), and nextCrossingTimeC().
|
overridevirtual |
Move the particle along the helix trajectory for a given time.
deltaTimeC | Time in units of t*c.. |
Implements fastsim::Trajectory.
Definition at line 81 of file StraightTrajectory.cc.
References fastsim::Trajectory::momentum_, fastsim::Trajectory::position_, and fastsim::Constants::speedOfLight.
Referenced by Vispa.Gui.WidgetContainer.WidgetContainer::autosize(), crosses(), Vispa.Gui.VispaWidget.VispaWidget::dragWidget(), Vispa.Gui.VispaWidget.VispaWidget::setZoom(), and Vispa.Gui.PortConnection.PointToPointConnection::updateConnection().
|
overridevirtual |
Return delta time (t*c) of the next intersection of trajectory and barrel layer.
This function solves the quadratic equation (basically intersection a circle with a given radius and a straight line) in order to calculate the moment in time when the particle's trajectory intersects with a given barrel layer.
layer | A barrel layer. |
onLayer | Specify if the particle already is on the layer (in that case the second solution has to be picked). |
Implements fastsim::Trajectory.
Definition at line 8 of file StraightTrajectory.cc.
References a, b, EnergyCorrector::c, delta, fastsim::BarrelSimplifiedGeometry::getRadius(), fastsim::Trajectory::momentum_, fastsim::Trajectory::position_, and mathSSE::sqrt().
Referenced by crosses(), and fastsim::HelixTrajectory::nextCrossingTimeC().