23 phi_(
std::atan(momentum_.Py() / momentum_.Px()) +
24 (momentum_.Px() * particle.
charge() < 0 ? 3. *
M_PI / 2. :
M_PI / 2.))
33 centerX_(position_.
X() -
34 radius_ * (momentum_.Py() / momentum_.Px()) /
35 std::
sqrt((momentum_.Py() / momentum_.Px()) * (momentum_.Py() / momentum_.Px()) + 1) *
36 (momentum_.Px() * particle.
charge() < 0 ? 1. : -1.)),
37 centerY_(position_.
Y() -
38 radius_ * 1 /
std::
sqrt((momentum_.Py() / momentum_.Px()) * (momentum_.Py() / momentum_.Px()) + 1) *
39 (momentum_.Px() * particle.
charge() < 0 ? -1. : 1.))
43 centerR_(
std::
sqrt(centerX_ * centerX_ + centerY_ * centerY_)),
44 minR_(
std::
abs(centerR_ - radius_)),
45 maxR_(centerR_ + radius_)
101 double a = F * F + G *
G;
102 double b = 2 * E *
F;
103 double c = E * E - G *
G;
105 double delta = b * b - 4 * a *
c;
116 double sqrtDelta =
sqrt(delta);
117 double phi1 = 0, phi2 = 0;
119 phi1 = std::asin((2. * c) / (-b + sqrtDelta));
120 phi2 = std::asin((-b + sqrtDelta) / (2. * a));
122 phi1 = std::asin((-b - sqrtDelta) / (2. * a));
123 phi2 = std::asin((2. * c) / (-b - sqrtDelta));
171 bool particleMovesInwards1 = momX1 * posX1 + momY1 * posY1 < 0;
177 bool particleMovesInwards2 = momX2 * posX2 + momY2 * posY2 < 0;
179 if (particleMovesInwards1 != particleMovesInwards) {
181 }
else if (particleMovesInwards2 != particleMovesInwards) {
const double minR_
The minimal distance of the helix from the center of the tracker.
const double phi_
Ranges from 0 to 2PI: 0 corresponds to the positive X direction, phi increases counterclockwise.
Sin< T >::type sin(const T &t)
const double radius_
The radius of the helix.
Implementation of a barrel detector layer (cylindrical).
static double constexpr speedOfLight
Speed of light [cm / ns].
const double centerY_
Y-coordinate of the center of the helix.
double getRadParticle(double phi) const
Return distance of particle from center of the detector if it was at given angle phi of the helix...
math::XYZTLorentzVector position_
position of the particle that was used to create trajectory
Mathematical representation of a straight trajectory.
Cos< T >::type cos(const T &t)
Abs< T >::type abs(const T &t)
const double maxR_
The maximum distance of the helix from the center of the tracker.
const double phiSpeed_
The angular speed of the particle on the helix trajectory.
bool crosses(const BarrelSimplifiedGeometry &layer) const override
Check if an intersection of the trajectory with a barrel layer exists.
double nextCrossingTimeC(const BarrelSimplifiedGeometry &layer, bool onLayer=false) const override
Return delta time (t*c) of the next intersection of trajectory and barrel layer.
Definition the generic trajectory of a particle (base class for helix/straight trajectories).
const double centerX_
X-coordinate of the center of the helix.
void move(double deltaTimeC) override
Move the particle along the helix trajectory for a given time.
HelixTrajectory(const Particle &particle, double magneticFieldZ)
Constructor.
double nextCrossingTimeC(const BarrelSimplifiedGeometry &layer, bool onLayer=false) const override
Return delta time (t*c) of the next intersection of trajectory and barrel layer.
const double getRadius() const
Return radius of the barrel layer.
Definition of a generic FastSim Particle which can be propagated through the detector (formerly Parti...
math::XYZTLorentzVector momentum_
momentum of the particle that was used to create trajectory
static uInt32 F(BLOWFISH_CTX *ctx, uInt32 x)