134 ClassImp(TLorentzRotation);
136 TLorentzRotation::TLorentzRotation()
137 : fxx(1.0), fxy(0.0), fxz(0.0), fxt(0.0),
138 fyx(0.0), fyy(1.0), fyz(0.0), fyt(0.0),
139 fzx(0.0), fzy(0.0), fzz(1.0), fzt(0.0),
140 ftx(0.0), fty(0.0), ftz(0.0), ftt(1.0) {}
142 TLorentzRotation::TLorentzRotation(
const TRotation & r)
143 : fxx(r.XX()), fxy(r.XY()), fxz(r.XZ()), fxt(0.0),
144 fyx(r.YX()), fyy(r.YY()), fyz(r.YZ()), fyt(0.0),
145 fzx(r.ZX()), fzy(r.ZY()), fzz(r.ZZ()), fzt(0.0),
146 ftx(0.0), fty(0.0), ftz(0.0), ftt(1.0) {}
148 TLorentzRotation::TLorentzRotation(
const TLorentzRotation & r) : TObject(r),
149 fxx(r.fxx), fxy(r.fxy), fxz(r.fxz), fxt(r.fxt),
150 fyx(r.fyx), fyy(r.fyy), fyz(r.fyz), fyt(r.fyt),
151 fzx(r.fzx), fzy(r.fzy), fzz(r.fzz), fzt(r.fzt),
152 ftx(r.ftx), fty(r.fty), ftz(r.ftz), ftt(r.ftt) {}
154 TLorentzRotation::TLorentzRotation(
155 Double_t rxx, Double_t rxy, Double_t rxz, Double_t rxt,
156 Double_t ryx, Double_t ryy, Double_t ryz, Double_t ryt,
157 Double_t rzx, Double_t rzy, Double_t rzz, Double_t rzt,
158 Double_t rtx, Double_t rty, Double_t rtz, Double_t rtt)
159 : fxx(rxx), fxy(rxy), fxz(rxz), fxt(rxt),
160 fyx(ryx), fyy(ryy), fyz(ryz), fyt(ryt),
161 fzx(rzx), fzy(rzy), fzz(rzz), fzt(rzt),
162 ftx(rtx), fty(rty), ftz(rtz), ftt(rtt) {}
164 TLorentzRotation::TLorentzRotation(Double_t bx,
169 SetBoost(bx, by, bz);
172 TLorentzRotation::TLorentzRotation(
const TVector3 & p) {
174 SetBoost(p.X(), p.Y(), p.Z());
177 Double_t TLorentzRotation::operator () (
int i,
int j)
const {
180 if (j == 0) {
return fxx; }
181 if (j == 1) {
return fxy; }
182 if (j == 2) {
return fxz; }
183 if (j == 3) {
return fxt; }
185 if (j == 0) {
return fyx; }
186 if (j == 1) {
return fyy; }
187 if (j == 2) {
return fyz; }
188 if (j == 3) {
return fyt; }
190 if (j == 0) {
return fzx; }
191 if (j == 1) {
return fzy; }
192 if (j == 2) {
return fzz; }
193 if (j == 3) {
return fzt; }
195 if (j == 0) {
return ftx; }
196 if (j == 1) {
return fty; }
197 if (j == 2) {
return ftz; }
198 if (j == 3) {
return ftt; }
200 Warning(
"operator()(i,j)",
"subscripting: bad indices(%d,%d)",i,j);
204 void TLorentzRotation::SetBoost(Double_t bx, Double_t by, Double_t bz) {
206 Double_t bp2 = bx*bx + by*by + bz*bz;
207 Double_t gamma = 1.0 / TMath::Sqrt(1.0 - bp2);
208 Double_t bgamma = gamma * gamma / (1.0 + gamma);
209 fxx = 1.0 + bgamma * bx * bx;
210 fyy = 1.0 + bgamma * by * by;
211 fzz = 1.0 + bgamma * bz * bz;
212 fxy = fyx = bgamma * bx * by;
213 fxz = fzx = bgamma * bx * bz;
214 fyz = fzy = bgamma * by * bz;
215 fxt = ftx = gamma * bx;
216 fyt = fty = gamma * by;
217 fzt = ftz = gamma * bz;
221 TLorentzRotation TLorentzRotation::MatrixMultiplication(
const TLorentzRotation & b)
const {
223 return TLorentzRotation(
224 fxx*b.fxx + fxy*b.fyx + fxz*b.fzx + fxt*b.ftx,
225 fxx*b.fxy + fxy*b.fyy + fxz*b.fzy + fxt*b.fty,
226 fxx*b.fxz + fxy*b.fyz + fxz*b.fzz + fxt*b.ftz,
227 fxx*b.fxt + fxy*b.fyt + fxz*b.fzt + fxt*b.ftt,
228 fyx*b.fxx + fyy*b.fyx + fyz*b.fzx + fyt*b.ftx,
229 fyx*b.fxy + fyy*b.fyy + fyz*b.fzy + fyt*b.fty,
230 fyx*b.fxz + fyy*b.fyz + fyz*b.fzz + fyt*b.ftz,
231 fyx*b.fxt + fyy*b.fyt + fyz*b.fzt + fyt*b.ftt,
232 fzx*b.fxx + fzy*b.fyx + fzz*b.fzx + fzt*b.ftx,
233 fzx*b.fxy + fzy*b.fyy + fzz*b.fzy + fzt*b.fty,
234 fzx*b.fxz + fzy*b.fyz + fzz*b.fzz + fzt*b.ftz,
235 fzx*b.fxt + fzy*b.fyt + fzz*b.fzt + fzt*b.ftt,
236 ftx*b.fxx + fty*b.fyx + ftz*b.fzx + ftt*b.ftx,
237 ftx*b.fxy + fty*b.fyy + ftz*b.fzy + ftt*b.fty,
238 ftx*b.fxz + fty*b.fyz + ftz*b.fzz + ftt*b.ftz,
239 ftx*b.fxt + fty*b.fyt + ftz*b.fzt + ftt*b.ftt);