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_ |
Ranges from 0 to 2PI: 0 corresponds to the positive X direction, phi increases counterclockwise. More... | |
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 18 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 56 of file HelixTrajectory.cc.
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 209 of file HelixTrajectory.cc.
References funct::cos(), funct::sin(), and mathSSE::sqrt().
|
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 193 of file HelixTrajectory.cc.
References funct::cos(), SiPixelRawToDigiRegional_cfi::deltaPhi, funct::sin(), and fastsim::Constants::speedOfLight.
|
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 60 of file HelixTrajectory.cc.
References a, funct::abs(), b, HltBtagPostValidation_cff::c, funct::cos(), dumpMFGeometry_cfg::delta, MillePedeFileConverter_cfg::e, F(), cmssw_cycle_finder::G, M_PI, SiStripPI::min, fastsim::StraightTrajectory::nextCrossingTimeC(), funct::sin(), fastsim::Constants::speedOfLight, mathSSE::sqrt(), RandomServiceHelper::t1, and RandomServiceHelper::t2.
|
private |
Distance of the center of the helix from the center of the tracker.
Definition at line 62 of file HelixTrajectory.h.
|
private |
X-coordinate of the center of the helix.
Definition at line 60 of file HelixTrajectory.h.
|
private |
Y-coordinate of the center of the helix.
Definition at line 61 of file HelixTrajectory.h.
|
private |
The maximum distance of the helix from the center of the tracker.
Definition at line 64 of file HelixTrajectory.h.
|
private |
The minimal distance of the helix from the center of the tracker.
Definition at line 63 of file HelixTrajectory.h.
|
private |
Ranges from 0 to 2PI: 0 corresponds to the positive X direction, phi increases counterclockwise.
The angle of the particle alone the helix.
Definition at line 58 of file HelixTrajectory.h.
|
private |
The angular speed of the particle on the helix trajectory.
Definition at line 65 of file HelixTrajectory.h.
|
private |
The radius of the helix.
Definition at line 57 of file HelixTrajectory.h.