Mathematical representation of a helix. More...
#include <HelixTrajectory.h>
Public Member Functions | |
bool | crosses (const BarrelSimplifiedGeometry &layer) const override |
Check if an intersection of the trajectory with a barrel layer exists. More... | |
double | getRadParticle (double phi) const |
Return distance of particle from center of the detector if it was at given angle phi of the helix. More... | |
HelixTrajectory (const Particle &particle, double magneticFieldZ) | |
Constructor. 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... | |
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... | |
virtual | ~Trajectory () |
Private Attributes | |
const double | centerR_ |
Distance of the center of the helix from the center of the tracker. More... | |
const double | centerX_ |
X-coordinate of the center of the helix. More... | |
const double | centerY_ |
Y-coordinate of the center of the helix. More... | |
const double | maxR_ |
The maximum distance of the helix from the center of the tracker. More... | |
const double | minR_ |
The minimal distance of the helix from the center of the tracker. More... | |
const double | phi_ |
const double | phiSpeed_ |
The angular speed of the particle on the helix trajectory. More... | |
const double | radius_ |
The radius of the helix. 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 helix.
Reflects trajectory of a charged particle in a magnetic field. The trajectory is defined by cylindrical coordinates (see definition of variables for more information).
Definition at line 21 of file HelixTrajectory.h.
fastsim::HelixTrajectory::HelixTrajectory | ( | const Particle & | particle, |
double | magneticFieldZ | ||
) |
Constructor.
The magnetic field is (to good approximation) constant between two tracker layers (and only in Z-direction).
particle | A (usually charged) particle. |
magneticFieldZ | The magnetic field. |
Definition at line 15 of file HelixTrajectory.cc.
|
overridevirtual |
Check if an intersection of the trajectory with a barrel layer exists.
layer | A barrel layer. |
Implements fastsim::Trajectory.
Definition at line 43 of file HelixTrajectory.cc.
References fastsim::BarrelSimplifiedGeometry::getRadius(), maxR_, and minR_.
Referenced by nextCrossingTimeC().
double fastsim::HelixTrajectory::getRadParticle | ( | double | phi | ) | const |
Return distance of particle from center of the detector if it was at given angle phi of the helix.
phi | angle of the helix |
Definition at line 210 of file HelixTrajectory.cc.
References centerX_, centerY_, funct::cos(), radius_, funct::sin(), and mathSSE::sqrt().
Referenced by 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 191 of file HelixTrajectory.cc.
References centerX_, centerY_, funct::cos(), hiPixelPairStep_cff::deltaPhi, fastsim::Trajectory::momentum_, phi_, phiSpeed_, fastsim::Trajectory::position_, radius_, funct::sin(), and fastsim::Constants::speedOfLight.
Referenced by Vispa.Gui.WidgetContainer.WidgetContainer::autosize(), 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 of two circles with a given radius) 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 48 of file HelixTrajectory.cc.
References a, funct::abs(), b, EnergyCorrector::c, centerX_, centerY_, funct::cos(), crosses(), delta, MillePedeFileConverter_cfg::e, F(), callgraph::G, fastsim::BarrelSimplifiedGeometry::getRadius(), getRadParticle(), M_PI, min(), fastsim::Trajectory::momentum_, fastsim::StraightTrajectory::nextCrossingTimeC(), phi_, phiSpeed_, fastsim::Trajectory::position_, radius_, funct::sin(), fastsim::Constants::speedOfLight, and mathSSE::sqrt().
|
private |
Distance of the center of the helix from the center of the tracker.
Definition at line 66 of file HelixTrajectory.h.
|
private |
X-coordinate of the center of the helix.
Definition at line 64 of file HelixTrajectory.h.
Referenced by getRadParticle(), move(), and nextCrossingTimeC().
|
private |
Y-coordinate of the center of the helix.
Definition at line 65 of file HelixTrajectory.h.
Referenced by getRadParticle(), move(), and nextCrossingTimeC().
|
private |
The maximum distance of the helix from the center of the tracker.
Definition at line 68 of file HelixTrajectory.h.
Referenced by crosses().
|
private |
The minimal distance of the helix from the center of the tracker.
Definition at line 67 of file HelixTrajectory.h.
Referenced by crosses().
|
private |
The angle of the particle alone the helix. Ranges from 0 to 2PI: 0 corresponds to the positive X direction, phi increases counterclockwise
Definition at line 62 of file HelixTrajectory.h.
Referenced by move(), and nextCrossingTimeC().
|
private |
The angular speed of the particle on the helix trajectory.
Definition at line 69 of file HelixTrajectory.h.
Referenced by move(), and nextCrossingTimeC().
|
private |
The radius of the helix.
Definition at line 61 of file HelixTrajectory.h.
Referenced by getRadParticle(), move(), and nextCrossingTimeC().