class Helix: public TObject { public: // Constructor inline Helix(); // Construct from particle momentum, position, field, and charge. Helix(double Pperp, double Pphi, double Pz, double x, double y, double z, double q, double Field); // Construct on five helix parameters inline Helix( double cotTheta, double curvature, double z0, double d0, double phi0 ); // Destructor virtual ~Helix(); // Set Cot Theta inline void setCotTheta(double cotTheta); // Set Curvature inline void setCurvature(double curvature); // Set Z0 Parameter inline void setZ0(double z0); // Set D0 Parameter inline void setD0(double d0); // Set Phi0 Parameter, will be ranged from 0-2Pi inline void setPhi0(double phi0); // // Assignment operator // inline const Helix & operator=(const Helix &right); // // Get Position as a function of (three-dimensional) path length // virtual HepPoint3D getPosition(double s = 0.0) const; // // Get Direction as a function of (three-dimensional) path length // virtual HepVector3D getDirection(double s = 0.0) const; // // Get the second derivative of the helix vs (three-dimensional) path length // virtual HepVector3D getSecondDerivative(double s = 0.0) const; // // Get both position and direction at once. // virtual void getLocation(Trajectory::Location & loc, double s = 0.0) const; // // Get pathlength at fixed rho=sqrt(x^2 + y^2) // virtual double getPathLengthAtRhoEquals(double rho) const; ////////////////////////////////////////////////////////////////////////////////// // KCDF: analytical computation of helix/plane intersection. // // What we really compute is the intersection of a line and // a circle (projected helix) in the x-y plane. // // >>>>>>>>>> W A R N I N G W A R N I N G W A R N I N G <<<<<<<<<< // > < // > We assume the plane to be parallel or perpendicular < // > to the z axis (i.e. the B-field), < // > since otherwise there is no analytical solution. (One would end up < // > with an equation of type cos(alpha) == alpha.) < // > Although we know this assumption doesn´t hold exactly, we think it < // > is a reasonable first approximation. < // > In cases when our assumption has to be dropped, one can use the < // > intersection point computed here as a *good* starting point of a < // > numerical method, or one uses another analytical method to compute < // > the intersection of the tangent line at the point and the plane. < // > We plan to use one of these approaches in the near future, but < // > this is NOT YET IMPLEMENTED! < // > For the time being, we invoke the old numerical < // > Trajectory::newIntersectionWith in such circumstances. < // > < // >>>>>>>>>> W A R N I N G W A R N I N G W A R N I N G <<<<<<<<<< // // Kurt Rinnert, 08/31/1998 ////////////////////////////////////////////////////////////////////////////////// // Location* newIntersectionWith(const HepPlane3D& plane) const; // Get certain parameters as a function of two-dimensional R. double getPhiAtR(double r) const; double getZAtR(double r) const; double getL2DAtR(double r) const; double getCosAlphaAtR(double r) const; // Get signed 1/radius double getInverseRadius() const; // Get unsigned radius double getRadius() const; // // Get the turning angle as a function of path length // SignedAngle getTurningAngle(double s) const; // Get the Curvature double getCurvature() const; // Get helicity, positive for a counterclockwise helix double getHelicity() const; // Get cotangent of theta double getCotTheta() const; // Get phi0 double getPhi0() const; // Get d0 double getD0() const; // Get the Z0 parameter double getZ0() const; // Get sign of the z component of angular momentum about origin double getSignLz() const; // // Get sines and cosines of Phi0 and Theta // double getSinPhi0() const; // double getCosPhi0() const; // double getSinTheta() const; // double getCosTheta() const; // // Set Parameters. // inline void setParameters(const HepVector &p); // // Get the parameters as a vector. // inline const HepVector & getParameters() const; // // Create a helix from a vector // static Helix create(const HepVector & v); // // Return size of the parameter space (=5) // static unsigned int getParameterSpaceSize(); private: // This is the Helix: double _cotTheta; double _curvature; double _z0; double _d0; double _phi0; }; #include "Helix.icc"