File indexing completed on 2024-04-06 12:31:44
0001 #ifndef SteppingHelixPropagator_SteppingHelixStateInfo_h
0002 #define SteppingHelixPropagator_SteppingHelixStateInfo_h
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016 #include "TrackingTools/TrajectoryState/interface/TrajectoryStateOnSurface.h"
0017
0018 #include "CLHEP/Matrix/SymMatrix.h"
0019 #include "CLHEP/Vector/ThreeVector.h"
0020
0021 class MagneticField;
0022 class MagVolume;
0023 class Surface;
0024 class SteppingHelixPropagator;
0025 class FreeTrajectoryState;
0026
0027 class SteppingHelixStateInfo {
0028 friend class SteppingHelixPropagator;
0029
0030 public:
0031 typedef CLHEP::Hep3Vector Vector;
0032 typedef CLHEP::Hep3Vector Point;
0033
0034 enum Result { OK = 0, FAULT, APPROX, RANGEOUT, INACC, NOT_IMPLEMENTED, WRONG_VOLUME, UNDEFINED, MAX_RESULT };
0035
0036 static const std::string ResultName[MAX_RESULT];
0037
0038 SteppingHelixStateInfo()
0039 : path_(0),
0040 radPath_(0),
0041 dir(0),
0042 magVol(nullptr),
0043 isYokeVol(false),
0044 field(nullptr),
0045 dEdx(0),
0046 dEdXPrime(0),
0047 radX0(1e12),
0048 isComplete(false),
0049 isValid_(false),
0050 hasErrorPropagated_(false),
0051 status_(UNDEFINED) {}
0052 SteppingHelixStateInfo(const FreeTrajectoryState& fts);
0053
0054 TrajectoryStateOnSurface getStateOnSurface(const Surface& surf, bool returnTangentPlane = false) const;
0055
0056
0057 void getFreeState(FreeTrajectoryState& fts) const;
0058
0059 GlobalPoint position() const { return GlobalPoint(r3.x(), r3.y(), r3.z()); }
0060 GlobalVector momentum() const { return GlobalVector(p3.x(), p3.y(), p3.z()); }
0061 int charge() const { return q; }
0062 double path() const { return isValid_ ? path_ : 0; }
0063 double radPath() const { return isValid_ ? radPath_ : 0; }
0064
0065 bool isValid() const { return isValid_; }
0066 bool hasErrorPropagated() const { return hasErrorPropagated_; }
0067
0068 Result status() const { return status_; }
0069
0070 protected:
0071 struct VolumeBounds {
0072 VolumeBounds() : zMin(0), zMax(1e4), rMin(0), rMax(1e4), th1(0), th2(0) {}
0073 VolumeBounds(double r0, double r1, double z0, double z1) : zMin(z0), zMax(z1), rMin(r0), rMax(r1), th1(0), th2(0) {}
0074 VolumeBounds(double r0, double r1, double z0, double z1, double t1, double t2)
0075 : zMin(z0), zMax(z1), rMin(r0), rMax(r1), th1(t1), th2(t2) {}
0076 double zMin;
0077 double zMax;
0078 double rMin;
0079 double rMax;
0080 double th1;
0081 double th2;
0082 };
0083
0084 int q;
0085 Vector p3;
0086 Point r3;
0087 AlgebraicSymMatrix55 covCurv;
0088 AlgebraicSymMatrix55 matDCovCurv;
0089 double path_;
0090 double radPath_;
0091 double dir;
0092 Vector bf;
0093 Vector bfGradLoc;
0094 const MagVolume* magVol;
0095 bool isYokeVol;
0096 const MagneticField* field;
0097
0098 VolumeBounds rzLims;
0099 double dEdx;
0100 double dEdXPrime;
0101 double radX0;
0102
0103 bool isComplete;
0104 bool isValid_;
0105 bool hasErrorPropagated_;
0106
0107 Result status_;
0108 };
0109 #endif