Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
BoostY.h
Go to the documentation of this file.
1// @(#)root/mathcore:$Id$
2// Authors: W. Brown, M. Fischler, L. Moneta 2005
3
4/**********************************************************************
5 * *
6 * Copyright (c) 2005 ROOT FNAL MathLib Team *
7 * *
8 * *
9 **********************************************************************/
10
11// Header file for BoostY
12//
13// Created by: Mark Fischler Mon Nov 1 2005
14//
15// Last update: $Id$
16//
17#ifndef ROOT_MathX_GenVectorX_BoostY
18#define ROOT_MathX_GenVectorX_BoostY 1
19
24
26
27using namespace ROOT::ROOT_MATH_ARCH;
28
29namespace ROOT {
30
31namespace ROOT_MATH_ARCH {
32
33//__________________________________________________________________________________________
34/**
35 Class representing a Lorentz Boost along the Y axis, by beta.
36 For efficiency, gamma is held as well.
37
38 @ingroup GenVectorX
39
40 @see GenVectorX
41*/
42
43class BoostY {
44
45public:
46 typedef double Scalar;
47
49 kLXX = 0,
50 kLXY = 1,
51 kLXZ = 2,
52 kLXT = 3,
53 kLYX = 4,
54 kLYY = 5,
55 kLYZ = 6,
56 kLYT = 7,
57 kLZX = 8,
58 kLZY = 9,
59 kLZZ = 10,
60 kLZT = 11,
61 kLTX = 12,
62 kLTY = 13,
63 kLTZ = 14,
64 kLTT = 15
65 };
66
68 kXX = 0,
69 kXY = 1,
70 kXZ = 2,
71 kXT = 3,
72 kYY = 4,
73 kYZ = 5,
74 kYT = 6,
75 kZZ = 7,
76 kZT = 8,
77 kTT = 9
78 };
79
80 // ========== Constructors and Assignment =====================
81
82 /**
83 Default constructor (identity transformation)
84 */
85 BoostY();
86
87 /**
88 Construct given a Scalar beta_y
89 */
91
92 // The compiler-generated copy ctor, copy assignment, and dtor are OK.
93
94 /**
95 Re-adjust components to eliminate small deviations from a perfect
96 orthosyplectic matrix.
97 */
98 void Rectify();
99
100 // ======== Components ==============
101
102 /**
103 Set components from a Scalar beta_y
104 */
106
107 /**
108 Get components into a Scalar beta_y
109 */
110 void GetComponents(Scalar &beta_y) const;
111
112 /**
113 Retrieve the beta of the Boost
114 */
115 Scalar Beta() const { return fBeta; }
116
117 /**
118 Retrieve the gamma of the Boost
119 */
120 Scalar Gamma() const { return fGamma; }
121
122 /**
123 Set the given beta of the Boost
124 */
125 void SetBeta(Scalar beta) { SetComponents(beta); }
126
127 /**
128 The beta vector for this boost
129 */
131 XYZVector BetaVector() const;
132
133 /**
134 Get elements of internal 4x4 symmetric representation, into a data
135 array suitable for direct use as the components of a LorentzRotation
136 Note -- 16 Scalars will be written into the array; if the array is not
137 that large, then this will lead to undefined behavior.
138 */
139 void GetLorentzRotation(Scalar r[]) const;
140
141 // =========== operations ==============
142
143 /**
144 Lorentz transformation operation on a Minkowski ('Cartesian')
145 LorentzVector
146 */
148
149 /**
150 Lorentz transformation operation on a LorentzVector in any
151 coordinate system
152 */
153 template <class CoordSystem>
160
161 /**
162 Lorentz transformation operation on an arbitrary 4-vector v.
163 Preconditions: v must implement methods x(), y(), z(), and t()
164 and the arbitrary vector type must have a constructor taking (x,y,z,t)
165 */
166 template <class Foreign4Vector>
173
174 /**
175 Overload operator * for rotation on a vector
176 */
177 template <class A4Vector>
178 inline A4Vector operator*(const A4Vector &v) const
179 {
180 return operator()(v);
181 }
182
183 /**
184 Invert a BoostY in place
185 */
186 void Invert();
187
188 /**
189 Return inverse of a rotation
190 */
191 BoostY Inverse() const;
192
193 /**
194 Equality/inequality operators
195 */
196 bool operator==(const BoostY &rhs) const
197 {
198 if (fBeta != rhs.fBeta)
199 return false;
200 if (fGamma != rhs.fGamma)
201 return false;
202 return true;
203 }
204 bool operator!=(const BoostY &rhs) const { return !operator==(rhs); }
205
206private:
207 Scalar fBeta; // beta Y of the Boost
208 Scalar fGamma; // gamma of the Boost
209
210}; // BoostY
211
212// ============ Class BoostY ends here ============
213
214/**
215 Stream Output and Input
216*/
217// TODO - I/O should be put in the manipulator form
218#if !defined(ROOT_MATH_SYCL) && !defined(ROOT_MATH_CUDA)
219std::ostream &operator<<(std::ostream &os, const BoostY &b);
220#endif
221
222} // namespace ROOT_MATH_ARCH
223} // namespace ROOT
224
225#endif /* ROOT_MathX_GenVectorX_BoostY */
#define b(i)
Definition RSha256.hxx:100
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t r
Class representing a Lorentz Boost along the Y axis, by beta.
Definition BoostY.h:43
void SetBeta(Scalar beta)
Set the given beta of the Boost.
Definition BoostY.h:125
BoostY()
Default constructor (identity transformation)
Definition BoostY.cxx:34
void GetLorentzRotation(Scalar r[]) const
Get elements of internal 4x4 symmetric representation, into a data array suitable for direct use as t...
Definition BoostY.cxx:62
BoostY Inverse() const
Return inverse of a rotation.
Definition BoostY.cxx:118
Scalar Beta() const
Retrieve the beta of the Boost.
Definition BoostY.h:115
DisplacementVector3D< Cartesian3D< double >, DefaultCoordinateSystemTag > XYZVector
The beta vector for this boost.
Definition BoostY.h:130
void GetComponents(Scalar &beta_y) const
Get components into a Scalar beta_y.
Definition BoostY.cxx:50
void Invert()
Invert a BoostY in place.
Definition BoostY.cxx:112
A4Vector operator*(const A4Vector &v) const
Overload operator * for rotation on a vector.
Definition BoostY.h:178
LorentzVector< PxPyPzE4D< double > > operator()(const LorentzVector< PxPyPzE4D< double > > &v) const
Lorentz transformation operation on a Minkowski ('Cartesian') LorentzVector.
Definition BoostY.cxx:103
bool operator==(const BoostY &rhs) const
Equality/inequality operators.
Definition BoostY.h:196
Scalar Gamma() const
Retrieve the gamma of the Boost.
Definition BoostY.h:120
void SetComponents(Scalar beta_y)
Set components from a Scalar beta_y.
Definition BoostY.cxx:36
void Rectify()
Re-adjust components to eliminate small deviations from a perfect orthosyplectic matrix.
Definition BoostY.cxx:83
BoostY(Scalar beta_y)
Construct given a Scalar beta_y.
Definition BoostY.h:90
LorentzVector< CoordSystem > operator()(const LorentzVector< CoordSystem > &v) const
Lorentz transformation operation on a LorentzVector in any coordinate system.
Definition BoostY.h:154
XYZVector BetaVector() const
Definition BoostY.cxx:56
bool operator!=(const BoostY &rhs) const
Definition BoostY.h:204
Foreign4Vector operator()(const Foreign4Vector &v) const
Lorentz transformation operation on an arbitrary 4-vector v.
Definition BoostY.h:167
DefaultCoordinateSystemTag Default tag for identifying any coordinate system.
Class describing a generic LorentzVector in the 4D space-time, using the specified coordinate system ...
std::ostream & operator<<(std::ostream &os, const AxisAngle &a)
Stream Output and Input.
Definition AxisAngle.cxx:98