9 #include "StPicoHelix.h"
10 #include "StPicoPhysicalHelix.h"
12 #include "PhysicalConstants.h"
13 #include "SystemOfUnits.h"
15 #include "StarClassLibrary/PhysicalConstants.h"
16 #include "StarClassLibrary/SystemOfUnits.h"
34 Double_t B, Double_t q) {
35 mH = (q*B <= 0) ? 1 : -1;
36 if(p.y() == 0 && p.x() == 0) {
45 #ifndef ST_NO_NAMESPACES
47 using namespace units;
49 setCurvature( ::fabs( (c_light*nanosecond/meter*q*B/tesla) /
51 #ifndef ST_NO_NAMESPACES
58 Double_t
phase,
const TVector3& o,
67 return(TVector3(0,0,0));
70 #ifndef ST_NO_NAMESPACES
72 using namespace units;
74 Double_t pt = GeV*fabs(c_light*nanosecond/meter*B/tesla)/(fabs(
mCurvature)*meter);
76 return ( TVector3( pt*cos(
mPhase+
mH*M_PI/2),
79 #ifndef ST_NO_NAMESPACES
95 return (B > 0 ? -
mH :
mH);
102 TVector3 DCA2dPosition = this->at(thePath);
103 DCA2dPosition.SetZ(0);
104 TVector3 position(x,y,0);
105 TVector3 DCAVec = (DCA2dPosition-position);
109 momVec = this->at(1)- this->at(0);
117 Double_t cross = DCAVec.x()*momVec.y() - DCAVec.y()*momVec.x();
118 Double_t theSign = (cross>=0) ? 1. : -1.;
119 return theSign*DCAVec.Perp();
136 Double_t theSign = (sdca2d>=0) ? 1. : -1.;
137 return (this->
distance(pos))*theSign;
143 Double_t theSign = (sdca2d>=0) ? 1. : -1.;
144 return (this->
distance(pos))*theSign;
TVector3 momentumAt(Double_t, Double_t) const
Return momemtum at S.
Double_t x(Double_t s) const
coordinates of helix at point s
Double_t mCurvature
Curvature = 1/R.
TVector3 momentum(Double_t) const
Int_t h() const
Return -sign(q*B);.
~StPicoPhysicalHelix()
Destructor.
TVector3 mOrigin
starting point of a helix
pair< Double_t, Double_t > pathLength(Double_t r) const
path length at given r (cylindrical r)
StPicoPhysicalHelix()
Empty constructor.
virtual void moveOrigin(Double_t s)
Move the origin along the helix to s which becomes then s=0.
void setPhase(Double_t)
Set phase of the helix.
Helis parametrization for the particle.
Int_t charge(Double_t) const
Return charge of a particle.
void setDipAngle(Double_t)
Set dip angle of the helix.
Double_t distance(const TVector3 &p, Bool_t scanPeriods=true) const
minimal distance between point and helix
Double_t geometricSignedDistance(Double_t x, Double_t y)
2d DCA to x,y point signed relative to rotation
Double_t mDipAngle
Dip angle.
Helix parametrization that uses ROOT TVector3.
Double_t phase() const
Return phase: aziumth in xy-plane measured from ring center.
Bool_t mSingularity
true for straight line case (B=0)
Double_t mCosDipAngle
Cos of dip angle.
void setCurvature(Double_t)
Set curvature of the helix.
Double_t curvatureSignedDistance(Double_t x, Double_t y)
2d DCA to x,y point signed relative to curvature