CMS 3D CMS Logo

GflashTrajectory.h

Go to the documentation of this file.
00001 #ifndef GflashTrajectory_H
00002 #define GflashTrajectory_H 1
00003 
00004 #include "CLHEP/Geometry/Point3D.h"
00005 #include "CLHEP/Geometry/Vector3D.h"
00006 
00007 class GflashTrajectoryPoint;
00008 
00009 class GflashTrajectory 
00010 {
00011 public:
00012 
00013   GflashTrajectory();
00014   ~GflashTrajectory();
00015 
00016   void initializeTrajectory(const HepVector3D &, const HepPoint3D &, double q, double Field);
00017 
00018   void setCotTheta(double cotTheta);
00019   void setCurvature(double curvature);
00020   void setZ0(double z0);
00021   void setD0(double d0);
00022   void setPhi0(double phi0);
00023 
00024   double getCotTheta() const { return _cotTheta; }
00025   double getCurvature() const  { return _curvature; }
00026   double getZ0() const { return _z0; };
00027   double getD0() const { return _d0; };
00028   double getPhi0() const { return _phi0;};
00029 
00030   // Get sines and cosines of Phi0 and Theta
00031   double getSinPhi0() const;
00032   double getCosPhi0() const;
00033   double getSinTheta() const;
00034   double getCosTheta() const;
00035 
00036   // Get Position as a function of (three-dimensional) path length
00037   HepPoint3D getPosition(double s = 0.0) const;
00038 
00039   // Get Direction as a function of (three-dimensional) path length
00040   HepVector3D getDirection(double s = 0.0) const;
00041 
00042   void getGflashTrajectoryPoint(GflashTrajectoryPoint& point, double s) const;
00043   double getPathLengthAtRhoEquals(double rho) const; 
00044   double getPathLengthAtZ(double z) const; 
00045 
00046   double getZAtR(double r) const;
00047   double getL2DAtR(double r) const;
00048 
00049   //needed whenever _sinPhi0, _cosPh0, _sinTheta, or _cosTheta is used.
00050   void _refreshCache() const;
00051 
00052   // neede whenever _ss or _cc are used.
00053   void _cacheSinesAndCosines(double s) const;
00054 
00055 private:
00056 
00057   // This is the GflashTrajectory:
00058   double _cotTheta;
00059   double _curvature;
00060   double _z0;
00061   double _d0;
00062   double _phi0;
00063 
00064   // This is the cache
00065   mutable bool   _isStale;
00066   mutable double _sinPhi0;
00067   mutable double _cosPhi0;
00068   mutable double _sinTheta;
00069   mutable double _cosTheta;
00070   mutable double _s;
00071 
00072   mutable double _aa;
00073   mutable double _ss;
00074   mutable double _cc;
00075 
00076 };
00077 
00078 #endif
00079 
00080 

Generated on Tue Jun 9 17:47:04 2009 for CMSSW by  doxygen 1.5.4