File indexing completed on 2024-04-06 12:31:40
0001 #ifndef PerigeeTrajectoryParameters_H
0002 #define PerigeeTrajectoryParameters_H
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012 #include "DataFormats/TrajectoryState/interface/TrackCharge.h"
0013 #include "DataFormats/Math/interface/Vector.h"
0014 #include "DataFormats/Math/interface/AlgebraicROOTObjects.h"
0015
0016 class PerigeeTrajectoryParameters {
0017 public:
0018 PerigeeTrajectoryParameters() {}
0019
0020 explicit PerigeeTrajectoryParameters(const AlgebraicVector5 &aVector, bool charged = true) : theVector(aVector) {
0021 if (charged)
0022 theCharge = theVector[0] > 0 ? -1 : 1;
0023 else
0024 theCharge = 0;
0025 }
0026
0027 PerigeeTrajectoryParameters(double aCurv, double aTheta, double aPhi, double aTip, double aLip, bool charged = true) {
0028 theVector[0] = aCurv;
0029 theVector[1] = aTheta;
0030 theVector[2] = aPhi;
0031 theVector[3] = aTip;
0032 theVector[4] = aLip;
0033
0034 if (charged)
0035 theCharge = aCurv > 0 ? -1 : 1;
0036 else
0037 theCharge = 0;
0038 }
0039
0040
0041
0042
0043
0044 TrackCharge charge() const { return theCharge; }
0045
0046
0047
0048
0049
0050 double transverseCurvature() const { return ((charge() != 0) ? theVector[0] : 0.); }
0051
0052
0053
0054
0055
0056 double theta() const { return theVector[1]; }
0057
0058
0059
0060
0061
0062 double phi() const { return theVector[2]; }
0063
0064
0065
0066
0067
0068 double transverseImpactParameter() const { return theVector[3]; }
0069
0070
0071
0072
0073
0074 double longitudinalImpactParameter() const { return theVector[4]; }
0075
0076
0077
0078
0079
0080
0081
0082 const AlgebraicVector5 &vector() const { return theVector; }
0083
0084 private:
0085 AlgebraicVector5 theVector;
0086 TrackCharge theCharge;
0087 };
0088 #endif