File indexing completed on 2024-04-06 12:30:35
0001 #ifndef GflashTrajectory_H
0002 #define GflashTrajectory_H 1
0003
0004 #include "SimGeneral/GFlash/interface/GflashTrajectoryPoint.h"
0005
0006 class GflashTrajectory {
0007 public:
0008 GflashTrajectory();
0009 ~GflashTrajectory();
0010
0011 void initializeTrajectory(const HepGeom::Vector3D<double> &, const HepGeom::Point3D<double> &, double q, double Field);
0012
0013 void setCotTheta(double cotTheta);
0014 void setCurvature(double curvature);
0015 void setZ0(double z0);
0016 void setD0(double d0);
0017 void setPhi0(double phi0);
0018
0019 double getCotTheta() const { return _cotTheta; }
0020 double getCurvature() const { return _curvature; }
0021 double getZ0() const { return _z0; };
0022 double getD0() const { return _d0; };
0023 double getPhi0() const { return _phi0; };
0024
0025
0026 double getSinPhi0() const;
0027 double getCosPhi0() const;
0028 double getSinTheta() const;
0029 double getCosTheta() const;
0030
0031
0032 HepGeom::Point3D<double> getPosition(double s = 0.0) const;
0033
0034
0035 HepGeom::Vector3D<double> getDirection(double s = 0.0) const;
0036
0037 void getGflashTrajectoryPoint(GflashTrajectoryPoint &point, double s) const;
0038 double getPathLengthAtRhoEquals(double rho) const;
0039 double getPathLengthAtZ(double z) const;
0040
0041 double getZAtR(double r) const;
0042 double getL2DAtR(double r) const;
0043
0044
0045 void _refreshCache() const;
0046
0047
0048 void _cacheSinesAndCosines(double s) const;
0049
0050 private:
0051
0052 double _cotTheta;
0053 double _curvature;
0054 double _z0;
0055 double _d0;
0056 double _phi0;
0057
0058
0059 mutable bool _isStale;
0060 mutable double _sinPhi0;
0061 mutable double _cosPhi0;
0062 mutable double _sinTheta;
0063 mutable double _cosTheta;
0064 mutable double _s;
0065
0066 mutable double _aa;
0067 mutable double _ss;
0068 mutable double _cc;
0069 };
0070
0071 #endif