File indexing completed on 2025-01-18 10:10:09
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017 #ifndef ROOT_Math_GenVector_BoostY
0018 #define ROOT_Math_GenVector_BoostY 1
0019
0020 #include "Math/GenVector/LorentzVector.h"
0021 #include "Math/GenVector/PxPyPzE4D.h"
0022 #include "Math/GenVector/DisplacementVector3D.h"
0023 #include "Math/GenVector/Cartesian3D.h"
0024
0025 namespace ROOT {
0026
0027 namespace Math {
0028
0029
0030
0031
0032
0033
0034
0035
0036
0037
0038
0039 class BoostY {
0040
0041 public:
0042
0043 typedef double Scalar;
0044
0045 enum ELorentzRotationMatrixIndex {
0046 kLXX = 0, kLXY = 1, kLXZ = 2, kLXT = 3
0047 , kLYX = 4, kLYY = 5, kLYZ = 6, kLYT = 7
0048 , kLZX = 8, kLZY = 9, kLZZ = 10, kLZT = 11
0049 , kLTX = 12, kLTY = 13, kLTZ = 14, kLTT = 15
0050 };
0051
0052 enum EBoostMatrixIndex {
0053 kXX = 0, kXY = 1, kXZ = 2, kXT = 3
0054 , kYY = 4, kYZ = 5, kYT = 6
0055 , kZZ = 7, kZT = 8
0056 , kTT = 9
0057 };
0058
0059
0060
0061
0062
0063
0064 BoostY();
0065
0066
0067
0068
0069 explicit BoostY(Scalar beta_y) { SetComponents(beta_y); }
0070
0071
0072
0073
0074
0075
0076
0077
0078 void Rectify();
0079
0080
0081
0082
0083
0084
0085 void
0086 SetComponents (Scalar beta_y);
0087
0088
0089
0090
0091 void
0092 GetComponents (Scalar& beta_y) const;
0093
0094
0095
0096
0097
0098 Scalar Beta() const { return fBeta; }
0099
0100
0101
0102
0103 Scalar Gamma() const { return fGamma; }
0104
0105
0106
0107
0108 void SetBeta(Scalar beta) { SetComponents(beta); }
0109
0110
0111
0112
0113 typedef DisplacementVector3D<Cartesian3D<double>, DefaultCoordinateSystemTag > XYZVector;
0114 XYZVector BetaVector() const;
0115
0116
0117
0118
0119
0120
0121
0122 void
0123 GetLorentzRotation (Scalar r[]) const;
0124
0125
0126
0127
0128
0129
0130
0131 LorentzVector< ROOT::Math::PxPyPzE4D<double> >
0132 operator() (const LorentzVector< ROOT::Math::PxPyPzE4D<double> > & v) const;
0133
0134
0135
0136
0137
0138 template <class CoordSystem>
0139 LorentzVector<CoordSystem>
0140 operator() (const LorentzVector<CoordSystem> & v) const {
0141 LorentzVector< PxPyPzE4D<double> > xyzt(v);
0142 LorentzVector< PxPyPzE4D<double> > r_xyzt = operator()(xyzt);
0143 return LorentzVector<CoordSystem> ( r_xyzt );
0144 }
0145
0146
0147
0148
0149
0150
0151 template <class Foreign4Vector>
0152 Foreign4Vector
0153 operator() (const Foreign4Vector & v) const {
0154 LorentzVector< PxPyPzE4D<double> > xyzt(v);
0155 LorentzVector< PxPyPzE4D<double> > r_xyzt = operator()(xyzt);
0156 return Foreign4Vector ( r_xyzt.X(), r_xyzt.Y(), r_xyzt.Z(), r_xyzt.T() );
0157 }
0158
0159
0160
0161
0162 template <class A4Vector>
0163 inline
0164 A4Vector operator* (const A4Vector & v) const
0165 {
0166 return operator()(v);
0167 }
0168
0169
0170
0171
0172 void Invert();
0173
0174
0175
0176
0177 BoostY Inverse() const;
0178
0179
0180
0181
0182 bool operator == (const BoostY & rhs) const {
0183 if( fBeta != rhs.fBeta ) return false;
0184 if( fGamma != rhs.fGamma ) return false;
0185 return true;
0186 }
0187 bool operator != (const BoostY & rhs) const {
0188 return ! operator==(rhs);
0189 }
0190
0191 private:
0192
0193 Scalar fBeta;
0194 Scalar fGamma;
0195
0196 };
0197
0198
0199
0200
0201
0202
0203
0204
0205 std::ostream & operator<< (std::ostream & os, const BoostY & b);
0206
0207
0208 }
0209 }
0210
0211
0212
0213
0214
0215
0216
0217 #endif