21 , phi_(
std::atan(momentum_.Py()/momentum_.Px()) + (momentum_.Px()*particle.
charge() < 0 ? 3.*
M_PI/2. :
M_PI/2. ))
29 , centerX_(position_.
X() - radius_ * (momentum_.Py()/momentum_.Px()) /
std::
sqrt((momentum_.Py()/momentum_.Px())*(momentum_.Py()/momentum_.Px())+1) * (momentum_.Px()*particle.
charge() < 0 ? 1. : -1.))
30 , centerY_(position_.
Y() - radius_ * 1 /
std::
sqrt((momentum_.Py()/momentum_.Px())*(momentum_.Py()/momentum_.Px())+1) * (momentum_.Px()*particle.
charge() < 0 ? -1. : 1.))
33 , centerR_(
std::
sqrt(centerX_*centerX_ + centerY_*centerY_))
34 , minR_(
std::
abs(centerR_ - radius_))
35 , maxR_(centerR_ + radius_)
93 double delta = b*b - 4*a*
c;
105 double sqrtDelta =
sqrt(delta);
106 double phi1 = 0, phi2 = 0;
108 phi1 = std::asin((2.*c) / (-b + sqrtDelta));
109 phi2 = std::asin((-b + sqrtDelta) / (2.*a));
111 phi1 = std::asin((-b - sqrtDelta) / (2.*a));
112 phi2 = std::asin((2.*c) / (-b - sqrtDelta));
117 phi1 = - phi1 +
M_PI;
120 phi2 = - phi2 +
M_PI;
164 bool particleMovesInwards1 = momX1*posX1 + momY1*posY1 < 0;
170 bool particleMovesInwards2 = momX2*posX2 + momY2*posY2 < 0;
172 if(particleMovesInwards1 != particleMovesInwards)
176 else if(particleMovesInwards2 != particleMovesInwards)
const double minR_
The minimal distance of the helix from the center of the tracker.
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)