thepeg
is hosted by
Hepforge
,
IPPP Durham
ThePEG
2.3.0
Vectors
LorentzVector.h
Go to the documentation of this file.
1
// -*- C++ -*-
2
//
3
// LorentzVector.h is a part of ThePEG - Toolkit for HEP Event Generation
4
// Copyright (C) 2006-2019 David Grellscheid, Leif Lonnblad
5
//
6
// ThePEG is licenced under version 3 of the GPL, see COPYING for details.
7
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
8
//
9
#ifndef ThePEG_LorentzVector_H
10
#define ThePEG_LorentzVector_H
11
19
#include "LorentzVector.fh"
20
#include "ThePEG/Utilities/Direction.h"
21
#include "ThePEG/Utilities/UnitIO.h"
22
#include "LorentzRotation.h"
23
#include "
ThreeVector.h
"
24
26
#ifdef NDEBUG
27
#define ERROR_IF(condition,message) if (false) {}
28
#else
29
#define ERROR_IF(condition,message) \
30
if ( condition ) throw ThePEG::Exception( (message) , ThePEG::Exception::eventerror)
31
#endif
32
33
namespace
ThePEG
{
34
35
template
<
typename
Value>
class
LorentzVector;
36
43
template
<
typename
Value>
class
LorentzVector
44
{
45
private
:
47
using
Value2
=
decltype
(
sqr
(std::declval<Value>()));
48
49
public
:
52
LorentzVector
()
53
: theX(), theY(), theZ(), theT() {}
54
55
LorentzVector
(Value x, Value y, Value z, Value t)
56
: theX(x), theY(y), theZ(z), theT(t) {}
57
58
LorentzVector(
const
ThreeVector<Value> & v, Value t)
59
: theX(v.x()), theY(v.y()), theZ(v.z()), theT(t) {}
60
61
template
<
typename
U>
62
LorentzVector(
const
LorentzVector<U> & v)
63
: theX(
v
.x()), theY(
v
.y()), theZ(
v
.z()), theT(
v
.t()) {}
65
67
template
<
typename
ValueB>
68
LorentzVector<Value>
&
operator=
(
const
LorentzVector<ValueB>
& b) {
69
setX(b.x());
70
setY(b.y());
71
setZ(b.z());
72
setT(b.t());
73
return
*
this
;
74
}
75
76
public
:
78
79
Value x()
const
{
return
theX; }
80
Value y()
const
{
return
theY; }
81
Value z()
const
{
return
theZ; }
82
Value t()
const
{
return
theT; }
83
Value e()
const
{
return
t(); }
85
87
88
void
setX(Value x) { theX = x; }
89
void
setY(Value y) { theY = y; }
90
void
setZ(Value z) { theZ = z; }
91
void
setT(Value t) { theT =
t
; }
92
void
setE(Value e) { setT(e); }
94
95
public
:
97
ThreeVector<Value>
vect
()
const
{
98
return
ThreeVector<Value>
(x(),y(),z());
99
}
100
102
operator
ThreeVector<Value>
()
const
{
return
vect
(); }
103
105
void
setVect
(
const
ThreeVector<Value>
& p) {
106
theX = p.x();
107
theY = p.y();
108
theZ = p.z();
109
}
110
111
public
:
113
LorentzVector<Value>
conjugate
()
const
114
{
115
return
LorentzVector<Value>
(conj(x()),conj(y()),conj(z()),conj(t()));
116
}
117
119
Value2
m2
()
const
120
{
121
return
(t()-z())*(t()+z()) -
sqr
(x()) -
sqr
(y());
122
}
123
125
Value2
m2
(
const
LorentzVector<Value>
& a)
const
{
126
Value tt(a.t()+t()),zz(a.z()+z());
127
return
(tt-zz)*(tt+zz)-
sqr
(a.x()+x())-
sqr
(a.y()+y());
128
}
129
131
Value
m
()
const
132
{
133
Value2
tmp =
m2
();
134
return
tmp <
Value2
() ? -Value(sqrt(-tmp)) : Value(sqrt(tmp));
135
}
136
138
Value2
mt2
()
const
{
return
(t()-z())*(t()+z()); }
139
141
Value
mt
()
const
142
{
143
Value2
tmp =
mt2
();
144
return
tmp <
Value2
() ? -Value(sqrt(-tmp)) : Value(sqrt(tmp));
145
}
146
148
Value2
perp2
()
const
{
return
sqr
(x()) +
sqr
(y()); }
149
151
Value
perp
()
const
{
return
sqrt(
perp2
()); }
152
157
template
<
typename
U>
158
Value2
perp2
(
const
ThreeVector<U>
& p)
const
159
{
160
return
vect
().perp2(p);
161
}
162
167
template
<
typename
U>
168
Value
perp
(
const
ThreeVector<U>
& p)
const
169
{
170
return
vect
().perp(p);
171
}
172
174
Value2
et2
()
const
175
{
176
Value2
pt2 =
vect
().perp2();
177
return
pt2 ==
Value2
() ?
Value2
() : e()*e() * pt2/(pt2+z()*z());
178
}
179
181
Value
et
()
const
182
{
183
Value2
etet =
et2
();
184
return
e() < Value() ? -sqrt(etet) : sqrt(etet);
185
}
186
188
Value2
et2
(
const
ThreeVector<double>
& v)
const
189
{
190
Value2
pt2 =
vect
().perp2(v);
191
Value pv =
vect
().dot(v.unit());
192
return
pt2 ==
Value2
() ?
Value2
() : e()*e() * pt2/(pt2+pv*pv);
193
}
194
196
Value
et
(
const
ThreeVector<double>
& v)
const
197
{
198
Value2
etet =
et2
(v);
199
return
e() < Value() ? -sqrt(etet) : sqrt(etet);
200
}
201
203
204
205
Value2
rho2
()
const
{
return
sqr
(x()) +
sqr
(y()) +
sqr
(z()); }
206
208
Value
rho
()
const
{
return
sqrt(
rho2
()); }
209
211
void
setRho
(Value newRho)
212
{
213
Value oldRho =
rho
();
214
if
(oldRho == Value())
215
return
;
216
double
factor = newRho / oldRho;
217
setX(x()*factor);
218
setY(y()*factor);
219
setZ(z()*factor);
220
}
221
223
double
theta
()
const
224
{
225
assert(!(x() == Value() && y() == Value() && z() == Value()));
226
return
atan2(
perp
(),z());
227
}
228
230
double
cosTheta
()
const
231
{
232
Value ptot =
rho
();
233
assert( ptot > Value() );
234
return
z() / ptot;
235
}
236
238
double
phi
()
const
{
239
return
atan2(y(),x()) ;
240
}
242
244
double
eta
()
const
{
245
Value
m
=
rho
();
246
if
(
m
== Value() )
return
0.0;
247
Value pt = max(
Constants::epsilon
*
m
,
perp
());
248
double
rap = log((
m
+ abs(z()))/pt);
249
return
z() >
ZERO
? rap: -rap;
250
}
251
253
double
angle
(
const
LorentzVector<Value>
& w)
const
254
{
255
return
vect
().angle(w.
vect
());
256
}
257
259
double
rapidity
()
const
{
260
if
( z() ==
ZERO
)
return
0.0;
261
ERROR_IF
(t() <=
ZERO
,
"Tried to take rapidity of negative-energy Lorentz vector"
);
262
Value pt = sqrt(max(
sqr
(t()*
Constants::epsilon
),
perp2
() +
m2
()));
263
double
rap = log((t() + abs(z()))/pt);
264
return
z() >
ZERO
? rap: -rap;
265
}
266
268
double
rapidity
(
const
Axis
& ref)
const
{
269
double
r = ref.
mag2
();
270
ERROR_IF
(r == 0,
"A zero vector used as reference to LorentzVector rapidity"
);
271
Value vdotu =
vect
().dot(ref)/sqrt(r);
272
if
( vdotu ==
ZERO
)
return
0.0;
273
ERROR_IF
(t() <=
ZERO
,
"Tried to take rapidity of negative-energy Lorentz vector"
);
274
Value pt = sqrt(max(
sqr
(t()*
Constants::epsilon
),
perp2
(ref) +
m2
()));
275
double
rap = log((t() + abs(z()))/pt);
276
return
z() >
ZERO
? rap: -rap;
277
}
278
283
Boost
boostVector
()
const
{
284
if
(t() == Value()) {
285
if
(
rho2
() ==
Value2
())
286
return
Boost
();
287
else
288
ERROR_IF
(
true
,
"boostVector computed for LorentzVector with t=0 -- infinite result"
);
289
}
290
// result will make analytic sense but is physically meaningless
291
ERROR_IF
(
m2
() <=
Value2
(),
"boostVector computed for a non-timelike LorentzVector"
);
292
return
vect
() * (1./t());
293
}
294
299
Boost
findBoostToCM
()
const
300
{
301
return
-
boostVector
();
302
}
303
305
Value
plus
()
const
{
return
t() + z(); }
307
Value
minus
()
const
{
return
t() - z(); }
308
310
bool
isNear
(
const
LorentzVector<Value>
& w,
double
epsilon)
const
311
{
312
Value2
limit = abs(
vect
().
dot
(w.
vect
()));
313
limit += 0.25 *
sqr
( t() + w.t() );
314
limit *=
sqr
(epsilon);
315
Value2
delta = (
vect
() - w.
vect
()).mag2();
316
delta +=
sqr
( t() - w.t() );
317
return
(delta <= limit);
318
}
319
321
LorentzVector<Value>
&
transform
(
const
SpinOneLorentzRotation
&
m
)
322
{
323
return
*
this
=
m
.operator*(*this);
324
}
325
327
LorentzVector<Value>
&
operator*=
(
const
SpinOneLorentzRotation
&
m
)
328
{
329
return
transform
(
m
);
330
}
331
333
template
<
typename
U>
334
auto
dot
(
const
LorentzVector<U>
& a)
const
->
decltype
(this->t() * a.t())
335
{
336
return
t() * a.t() - ( x() * a.x() + y() * a.y() + z() * a.z() );
337
}
338
339
340
public
:
341
353
LorentzVector<Value>
&
354
boost
(
double
bx,
double
by,
double
bz,
double
gamma=-1.)
355
{
356
const
double
b2 = bx*bx + by*by + bz*bz;
357
if
( b2 == 0.0 )
return
*
this
;
358
if
( gamma < 0.0 ) {
359
gamma = 1.0 / sqrt(1.0 - b2);
360
}
361
const
Value bp = bx*x() + by*y() + bz*z();
362
const
double
gamma2 = (gamma - 1.0)/b2;
363
364
setX(x() + gamma2*bp*bx + gamma*bx*t());
365
setY(y() + gamma2*bp*by + gamma*by*t());
366
setZ(z() + gamma2*bp*bz + gamma*bz*t());
367
setT(gamma*(t() + bp));
368
return
*
this
;
369
}
370
381
LorentzVector<Value>
&
boost
(
Boost
b,
double
gamma=-1.) {
382
return
boost
(b.x(), b.y(), b.z(),gamma);
383
}
384
390
LorentzVector<Value>
&
rotateX
(
double
phi
) {
391
double
sinphi = sin(
phi
);
392
double
cosphi = cos(
phi
);
393
Value ty = y() * cosphi - z() * sinphi;
394
theZ = z() * cosphi + y() * sinphi;
395
theY = ty;
396
return
*
this
;
397
}
398
404
LorentzVector<Value>
&
rotateY
(
double
phi
) {
405
double
sinphi = sin(
phi
);
406
double
cosphi = cos(
phi
);
407
Value tz = z() * cosphi - x() * sinphi;
408
theX = x() * cosphi + z() * sinphi;
409
theZ = tz;
410
return
*
this
;
411
}
412
418
LorentzVector<Value>
&
rotateZ
(
double
phi
) {
419
double
sinphi = sin(
phi
);
420
double
cosphi = cos(
phi
);
421
Value tx = x() * cosphi - y() * sinphi;
422
theY = y() * cosphi + x() * sinphi;
423
theX = tx;
424
return
*
this
;
425
}
426
430
LorentzVector<Value>
&
rotateUz
(
const
Axis
& axis) {
431
Axis
ax = axis.
unit
();
432
double
u1 = ax.x();
433
double
u2 = ax.y();
434
double
u3 = ax.z();
435
double
up = u1*u1 + u2*u2;
436
if
(up>0) {
437
up = sqrt(up);
438
Value px = x(), py = y(), pz = z();
439
setX( (u1*u3*px - u2*py)/up + u1*pz );
440
setY( (u2*u3*px + u1*py)/up + u2*pz );
441
setZ( -up*px + u3*pz );
442
}
443
else
if
(u3 < 0.) {
444
setX(-x());
445
setZ(-z());
446
}
447
return
*
this
;
448
}
449
455
template
<
typename
U>
456
LorentzVector<Value>
&
rotate
(
double
angle
,
const
ThreeVector<U>
& axis) {
457
if
(
angle
== 0.0)
458
return
*
this
;
459
const
U ll = axis.
mag
();
460
assert( ll > U() );
461
462
const
double
sa = sin(
angle
), ca = cos(
angle
);
463
const
double
dx = axis.x()/ll, dy = axis.y()/ll, dz = axis.z()/ll;
464
const
Value xx = x(), yy = y(), zz = z();
465
466
setX((ca+(1-ca)*dx*dx) * xx
467
+((1-ca)*dx*dy-sa*dz) * yy
468
+((1-ca)*dx*dz+sa*dy) * zz
469
);
470
setY(((1-ca)*dy*dx+sa*dz) * xx
471
+(ca+(1-ca)*dy*dy) * yy
472
+((1-ca)*dy*dz-sa*dx) * zz
473
);
474
setZ(((1-ca)*dz*dx-sa*dy) * xx
475
+((1-ca)*dz*dy+sa*dx) * yy
476
+(ca+(1-ca)*dz*dz) * zz
477
);
478
return
*
this
;
479
}
480
481
482
483
484
public
:
486
487
LorentzVector<Complex>
& operator+=(
const
LorentzVector
<complex<QtyDouble> > & a) {
488
theX += a.x();
489
theY += a.y();
490
theZ += a.z();
491
theT += a.t();
492
return
*
this
;
493
}
494
495
template
<
typename
ValueB>
496
LorentzVector<Value> & operator+=(
const
LorentzVector<ValueB> & a) {
497
theX += a.x();
498
theY += a.y();
499
theZ += a.z();
500
theT += a.t();
501
return
*
this
;
502
}
503
504
LorentzVector<Complex> & operator-=(
const
LorentzVector<complex<QtyDouble> > & a) {
505
theX -=
Complex
(a.x());
506
theY -=
Complex
(a.y());
507
theZ -=
Complex
(a.z());
508
theT -=
Complex
(a.t());
509
return
*
this
;
510
}
511
512
template
<
typename
ValueB>
513
LorentzVector<Value> & operator-=(
const
LorentzVector<ValueB> & a) {
514
theX -= a.x();
515
theY -= a.y();
516
theZ -= a.z();
517
theT -= a.t();
518
return
*
this
;
519
}
520
521
LorentzVector<Value> &
operator*=
(
double
a) {
522
theX *= a;
523
theY *= a;
524
theZ *= a;
525
theT *= a;
526
return
*
this
;
527
}
528
529
LorentzVector<Value> & operator/=(
double
a) {
530
theX /= a;
531
theY /= a;
532
theZ /= a;
533
theT /= a;
534
return
*
this
;
535
}
537
538
private
:
540
541
Value theX;
542
Value theY;
543
Value theZ;
544
Value theT;
546
};
547
549
550
template
<
typename
Value>
551
inline
LorentzVector<double>
552
operator/(
const
LorentzVector<Value> & v, Value a) {
553
return
LorentzVector<double>(
v
.x()/a,
v
.y()/a,
v
.z()/a,
v
.t()/a);
554
}
555
556
inline
LorentzVector<Complex>
557
operator/(
const
LorentzVector<Complex> & v,
Complex
a) {
558
return
LorentzVector<Complex>(
v
.x()/a,
v
.y()/a,
v
.z()/a,
v
.t()/a);
559
}
560
561
template
<
typename
Value>
562
inline
LorentzVector<Value> operator-(
const
LorentzVector<Value> & v) {
563
return
LorentzVector<Value>(-
v
.x(),-
v
.y(),-
v
.z(),-
v
.t());
564
}
565
566
template
<
typename
ValueA,
typename
ValueB>
567
inline
LorentzVector<ValueA>
568
operator+(LorentzVector<ValueA> a,
const
LorentzVector<ValueB> & b) {
569
return
a +=
b
;
570
}
571
572
template
<
typename
ValueA,
typename
ValueB>
573
inline
LorentzVector<ValueA>
574
operator-(LorentzVector<ValueA> a,
const
LorentzVector<ValueB> & b) {
575
return
a -=
b
;
576
}
577
578
template
<
typename
Value>
579
inline
LorentzVector<Value>
580
operator*(
const
LorentzVector<Value> & a,
double
b) {
581
return
LorentzVector<Value>(a.x()*b, a.y()*b, a.z()*b, a.t()*b);
582
}
583
584
template
<
typename
Value>
585
inline
LorentzVector<Value>
586
operator*(
double
b, LorentzVector<Value> a) {
587
return
a *=
b
;
588
}
589
590
template
<
typename
ValueA,
typename
ValueB>
591
inline
auto
operator*(ValueB a,
const
LorentzVector<ValueA> & v)
592
-> LorentzVector<
decltype
(a*
v
.x())>
593
{
594
return
{a*
v
.x(), a*
v
.y(), a*
v
.z(), a*
v
.t()};
595
}
596
597
template
<
typename
ValueA,
typename
ValueB>
598
inline
auto
operator*(
const
LorentzVector<ValueA> & v, ValueB b)
599
-> LorentzVector<
decltype
(
b
*
v
.x())>
600
{
601
return
b
*
v
;
602
}
603
604
template
<
typename
ValueA,
typename
ValueB>
605
inline
auto
operator/(
const
LorentzVector<ValueA> & v, ValueB b)
606
-> LorentzVector<
decltype
(
v
.x()/
b
)>
607
{
608
return
{
v
.x()/
b
,
v
.y()/
b
,
v
.z()/
b
,
v
.t()/
b
};
609
}
611
613
614
template
<
typename
ValueA,
typename
ValueB>
615
inline
auto
616
operator*(
const
LorentzVector<ValueA> & a,
const
LorentzVector<ValueB> & b)
617
->
decltype
(a.dot(b))
618
{
619
return
a.dot(b);
620
}
621
623
625
template
<
typename
Value>
626
inline
bool
627
operator==(
const
LorentzVector<Value>
& a,
const
LorentzVector<Value>
& b) {
628
return
a.x() == b.x() && a.y() == b.y() && a.z() == b.z() && a.t() == b.t();
629
}
630
632
inline
ostream &
operator<<
(ostream & os,
const
LorentzVector<double>
& v) {
633
return
os <<
"("
<< v.x() <<
","
<< v.y() <<
","
<< v.z()
634
<<
";"
<< v.t() <<
")"
;
635
}
636
639
template
<
typename
Value>
640
inline
Value
dirPlus
(
const
LorentzVector<Value>
& p) {
641
return
Direction<0>::pos
()? p.
plus
(): p.
minus
();
642
}
643
646
template
<
typename
Value>
647
inline
Value
dirMinus
(
const
LorentzVector<Value>
& p) {
648
return
Direction<0>::neg
()? p.
plus
(): p.
minus
();
649
}
650
653
template
<
typename
Value>
654
inline
Value
dirZ
(
const
LorentzVector<Value>
& p) {
655
return
Direction<0>::dir
()*p.z();
656
}
657
660
template
<
typename
Value>
661
inline
double
dirTheta
(
const
LorentzVector<Value>
& p) {
662
return
Direction<0>::pos
()? p.
theta
():
Constants::pi
- p.
theta
();
663
}
664
667
template
<
typename
Value>
668
inline
double
dirCosTheta
(
const
LorentzVector<Value>
& p) {
669
return
Direction<0>::pos
()? p.
cosTheta
(): -p.
cosTheta
();
670
}
671
674
template
<
typename
Value>
675
inline
ThreeVector<Value>
dirBoostVector
(
const
LorentzVector<Value>
& p) {
676
ThreeVector<Value>
b(p.
boostVector
());
677
if
(
Direction<0>::neg
() ) b.setZ(-b.z());
678
return
b;
679
}
680
683
template
<
typename
Value>
684
inline
LorentzVector<Value>
685
lightCone
(Value plus, Value minus, Value x, Value y) {
686
LorentzVector<Value>
r(x, y, 0.5*(plus-minus), 0.5*(plus+minus));
687
return
r;
688
}
689
691
template
<
typename
Value>
692
inline
LorentzVector<Value>
693
lightCone
(Value plus, Value minus) {
694
// g++-3.3 has a problem with using Value() directly
695
// gcc-bug c++/3650, fixed in 3.4
696
static
const
Value zero = Value();
697
LorentzVector<Value>
r(zero, zero,
698
0.5*(plus-minus), 0.5*(plus+minus));
699
return
r;
700
}
701
702
}
703
704
705
// delayed header inclusion to break inclusion loop:
706
// LorentzVec -> Transverse -> Lorentz5Vec -> LorentzVec
707
#include "Transverse.h"
708
709
710
711
namespace
ThePEG
{
712
715
template
<
typename
Value>
716
inline
LorentzVector<Value>
717
lightCone
(Value plus, Value minus,
Transverse<Value>
pt) {
718
LorentzVector<Value>
r(pt.
x
(), pt.
y
(), 0.5*(plus-minus), 0.5*(plus+minus));
719
return
r;
720
}
721
725
template
<
typename
Value>
726
inline
LorentzVector<Value>
727
lightConeDir
(Value plus, Value minus,
728
Value x = Value(), Value y = Value()) {
729
LorentzVector<Value>
r(x, y,
Direction<0>::dir
()*0.5*(plus - minus),
730
0.5*(plus + minus));
731
return
r;
732
}
733
737
template
<
typename
Value>
738
inline
LorentzVector<Value>
739
lightConeDir
(Value plus, Value minus,
Transverse<Value>
pt) {
740
LorentzVector<Value>
r(pt.
x
(), pt.
y
(),
Direction<0>::dir
()*0.5*(plus - minus),
741
0.5*(plus + minus));
742
return
r;
743
744
}
745
747
template
<
typename
OStream,
typename
UnitT,
typename
Value>
748
void
ounitstream
(OStream & os,
const
LorentzVector<Value>
& p, UnitT & u) {
749
os <<
ounit
(p.x(), u) <<
ounit
(p.y(), u) <<
ounit
(p.z(), u)
750
<<
ounit
(p.e(), u);
751
}
752
754
template
<
typename
IStream,
typename
UnitT,
typename
Value>
755
void
iunitstream
(IStream & is,
LorentzVector<Value>
& p, UnitT & u) {
756
Value x, y, z, e;
757
is >>
iunit
(x, u) >>
iunit
(y, u) >>
iunit
(z, u) >>
iunit
(e, u);
758
p =
LorentzVector<Value>
(x, y, z, e);
759
}
760
761
762
}
763
764
#undef ERROR_IF
765
#endif
/* ThePEG_LorentzVector_H */
ERROR_IF
#define ERROR_IF(condition, message)
Debug helper function.
Definition:
LorentzVector.h:29
ThreeVector.h
contains the ThreeVector class.
ThePEG::Direction
A Direction object can be used to specify that some following operations should be assumed to be perf...
Definition:
Direction.h:41
ThePEG::Direction::neg
static bool neg()
Return true if the direction is negative (reversed).
Definition:
Direction.h:120
ThePEG::Direction::dir
static Dir dir()
Return the direction.
Definition:
Direction.h:127
ThePEG::Direction::pos
static bool pos()
Return true if the direction is positive.
Definition:
Direction.h:113
ThePEG::LorentzVector
A 4-component Lorentz vector.
Definition:
LorentzVector.h:44
ThePEG::LorentzVector::perp2
Value2 perp2() const
Squared transverse component of the spatial vector .
Definition:
LorentzVector.h:148
ThePEG::LorentzVector::phi
double phi() const
Azimuthal angle.
Definition:
LorentzVector.h:238
ThePEG::LorentzVector::theta
double theta() const
Polar angle.
Definition:
LorentzVector.h:223
ThePEG::LorentzVector::perp
Value perp(const ThreeVector< U > &p) const
Transverse component of the spatial vector with respect to the given axis.
Definition:
LorentzVector.h:168
ThePEG::LorentzVector::conjugate
LorentzVector< Value > conjugate() const
The complex conjugate vector.
Definition:
LorentzVector.h:113
ThePEG::LorentzVector::Value2
decltype(sqr(std::declval< Value >())) Value2
Value squared.
Definition:
LorentzVector.h:47
ThePEG::LorentzVector::et
Value et() const
Transverse energy (signed).
Definition:
LorentzVector.h:181
ThePEG::LorentzVector::eta
double eta() const
Pseudorapidity of spatial part.
Definition:
LorentzVector.h:244
ThePEG::LorentzVector::rotateX
LorentzVector< Value > & rotateX(double phi)
Apply rotation around the x-axis.
Definition:
LorentzVector.h:390
ThePEG::LorentzVector::operator*=
LorentzVector< Value > & operator*=(const SpinOneLorentzRotation &m)
Rotate the vector. Resets .
Definition:
LorentzVector.h:327
ThePEG::LorentzVector::perp2
Value2 perp2(const ThreeVector< U > &p) const
Squared transverse component of the spatial vector with respect to the given axis.
Definition:
LorentzVector.h:158
ThePEG::LorentzVector::m
Value m() const
Magnitude (signed) .
Definition:
LorentzVector.h:131
ThePEG::LorentzVector::rho
Value rho() const
Radius.
Definition:
LorentzVector.h:208
ThePEG::LorentzVector::setVect
void setVect(const ThreeVector< Value > &p)
Set the 3-component part.
Definition:
LorentzVector.h:105
ThePEG::LorentzVector::vect
ThreeVector< Value > vect() const
Access to the 3-component part.
Definition:
LorentzVector.h:97
ThePEG::LorentzVector::rho2
Value2 rho2() const
Radius squared.
Definition:
LorentzVector.h:205
ThePEG::LorentzVector::operator=
LorentzVector< Value > & operator=(const LorentzVector< ValueB > &b)
Assignment operator.
Definition:
LorentzVector.h:68
ThePEG::LorentzVector::rapidity
double rapidity() const
Rapidity .
Definition:
LorentzVector.h:259
ThePEG::LorentzVector::boost
LorentzVector< Value > & boost(Boost b, double gamma=-1.)
Apply boost.
Definition:
LorentzVector.h:381
ThePEG::LorentzVector::rotateUz
LorentzVector< Value > & rotateUz(const Axis &axis)
Rotate the reference frame to a new z-axis.
Definition:
LorentzVector.h:430
ThePEG::LorentzVector::et2
Value2 et2() const
Transverse energy squared.
Definition:
LorentzVector.h:174
ThePEG::LorentzVector::isNear
bool isNear(const LorentzVector< Value > &w, double epsilon) const
Are two vectors nearby, using Euclidean measure ?
Definition:
LorentzVector.h:310
ThePEG::LorentzVector::m2
Value2 m2() const
Squared magnitude .
Definition:
LorentzVector.h:119
ThePEG::LorentzVector::plus
Value plus() const
Returns the positive light-cone component .
Definition:
LorentzVector.h:305
ThePEG::LorentzVector::rapidity
double rapidity(const Axis &ref) const
Rapidity with respect to another vector.
Definition:
LorentzVector.h:268
ThePEG::LorentzVector::mt
Value mt() const
Transverse mass (signed) .
Definition:
LorentzVector.h:141
ThePEG::LorentzVector::minus
Value minus() const
Returns the negative light-cone component .
Definition:
LorentzVector.h:307
ThePEG::LorentzVector::boost
LorentzVector< Value > & boost(double bx, double by, double bz, double gamma=-1.)
Apply boost.
Definition:
LorentzVector.h:354
ThePEG::LorentzVector::boostVector
Boost boostVector() const
Boost from reference frame into this vector's rest frame: .
Definition:
LorentzVector.h:283
ThePEG::LorentzVector::rotate
LorentzVector< Value > & rotate(double angle, const ThreeVector< U > &axis)
Apply a rotation.
Definition:
LorentzVector.h:456
ThePEG::LorentzVector::rotateY
LorentzVector< Value > & rotateY(double phi)
Apply rotation around the y-axis.
Definition:
LorentzVector.h:404
ThePEG::LorentzVector::transform
LorentzVector< Value > & transform(const SpinOneLorentzRotation &m)
Rotate the vector. Resets .
Definition:
LorentzVector.h:321
ThePEG::LorentzVector::rotateZ
LorentzVector< Value > & rotateZ(double phi)
Apply rotation around the z-axis.
Definition:
LorentzVector.h:418
ThePEG::LorentzVector::perp
Value perp() const
Transverse component of the spatial vector .
Definition:
LorentzVector.h:151
ThePEG::LorentzVector::angle
double angle(const LorentzVector< Value > &w) const
Spatial angle with another vector.
Definition:
LorentzVector.h:253
ThePEG::LorentzVector::et
Value et(const ThreeVector< double > &v) const
Transverse energy with respect to the given axis (signed).
Definition:
LorentzVector.h:196
ThePEG::LorentzVector::dot
auto dot(const LorentzVector< U > &a) const -> decltype(this->t() *a.t())
Dot product with metric .
Definition:
LorentzVector.h:334
ThePEG::LorentzVector::findBoostToCM
Boost findBoostToCM() const
Boost from reference frame into this vector's rest frame: .
Definition:
LorentzVector.h:299
ThePEG::LorentzVector::m2
Value2 m2(const LorentzVector< Value > &a) const
Squared magnitude with another vector.
Definition:
LorentzVector.h:125
ThePEG::LorentzVector::et2
Value2 et2(const ThreeVector< double > &v) const
Transverse energy squared with respect to the given axis.
Definition:
LorentzVector.h:188
ThePEG::LorentzVector::mt2
Value2 mt2() const
Transverse mass squared .
Definition:
LorentzVector.h:138
ThePEG::LorentzVector::setRho
void setRho(Value newRho)
Set new radius.
Definition:
LorentzVector.h:211
ThePEG::LorentzVector::cosTheta
double cosTheta() const
Cosine of the polar angle.
Definition:
LorentzVector.h:230
ThePEG::SpinOneLorentzRotation
The SpinOneLorentzRotation class is ...
Definition:
SpinOneLorentzRotation.h:25
ThePEG::ThreeVector
A 3-component vector.
Definition:
ThreeVector.h:35
ThePEG::ThreeVector::mag
Value mag() const
Magnitude .
Definition:
ThreeVector.h:74
ThePEG::ThreeVector::unit
ThreeVector< double > unit() const
Parallel vector with unit length.
Definition:
ThreeVector.h:139
ThePEG::ThreeVector::mag2
Value2 mag2() const
Squared magnitude .
Definition:
ThreeVector.h:71
ThePEG::Transverse
Transverse represents the transverse components of a LorentzVector.
Definition:
Transverse.h:30
ThePEG::Transverse::x
Value x() const
The x-component.
Definition:
Transverse.h:174
ThePEG::Transverse::y
Value y() const
The y-component.
Definition:
Transverse.h:179
ThePEG::Constants::pi
constexpr double pi
Good old .
Definition:
Constants.h:54
ThePEG::Constants::epsilon
constexpr double epsilon
The smallest non-zero double.
Definition:
Constants.h:63
ThePEG::Helicity::SpinorType::v
@ v
v spinor.
ThePEG::ParticleID::b
@ b
(b)
Definition:
EnumParticles.h:48
ThePEG::ParticleID::t
@ t
(t)
Definition:
EnumParticles.h:54
ThePEG::Units::Boost
ThreeVector< double > Boost
A three-dimensional boost vector.
Definition:
Unitsystem.h:139
ThePEG
This is the main namespace within which all identifiers in ThePEG are declared.
Definition:
FactoryBase.h:28
ThePEG::iunit
IUnit< T, UT > iunit(T &t, const UT &ut)
Helper function creating a IUnit object given an object and a unit.
Definition:
UnitIO.h:91
ThePEG::lightConeDir
LorentzVector< Value > lightConeDir(Value plus, Value minus, Value x=Value(), Value y=Value())
Create a LorentzVector giving its light-cone and transverse components.
Definition:
LorentzVector.h:727
ThePEG::Complex
std::complex< double > Complex
ThePEG code should use Complex for all complex scalars.
Definition:
Complex.h:23
ThePEG::dirPlus
Value dirPlus(const LorentzVector< Value > &p)
Return the positive light-cone component.
Definition:
LorentzVector.h:640
ThePEG::dirTheta
double dirTheta(const LorentzVector< Value > &p)
Return the polar angle wrt.
Definition:
LorentzVector.h:661
ThePEG::iunitstream
void iunitstream(IStream &is, vector< T, Alloc > &v, UT &u)
Input a vector of objects with the specified unit.
Definition:
Containers.h:289
ThePEG::operator<<
vector< T > & operator<<(vector< T > &tv, const U &u)
Overload the left shift operator for vector to push_back objects to a vector.
Definition:
Containers.h:179
ThePEG::ounitstream
void ounitstream(OStream &os, const vector< T, Alloc > &v, UT &u)
Ouput a vector of objects with the specified unit.
Definition:
Containers.h:275
ThePEG::dirBoostVector
ThreeVector< Value > dirBoostVector(const LorentzVector< Value > &p)
Get the boost vector for the LorentzVector.
Definition:
LorentzVector.h:675
ThePEG::dirCosTheta
double dirCosTheta(const LorentzVector< Value > &p)
Return the cosine of the polar angle wrt.
Definition:
LorentzVector.h:668
ThePEG::ZERO
constexpr ZeroUnit ZERO
ZERO can be used as zero for any unitful quantity.
Definition:
PhysicalQty.h:35
ThePEG::dirZ
Value dirZ(const LorentzVector< Value > &p)
Return the component along the positive z-axis.
Definition:
LorentzVector.h:654
ThePEG::dirMinus
Value dirMinus(const LorentzVector< Value > &p)
Return the negative light-cone component.
Definition:
LorentzVector.h:647
ThePEG::sqr
constexpr auto sqr(const T &x) -> decltype(x *x)
The square function should really have been included in the standard C++ library.
Definition:
ThePEG.h:117
ThePEG::ounit
OUnit< T, UT > ounit(const T &t, const UT &ut)
Helper function creating a OUnit object given an object and a unit.
Definition:
UnitIO.h:84
ThePEG::lightCone
LorentzVector< Value > lightCone(Value plus, Value minus, Value x, Value y)
Create a LorentzVector giving its light-cone and transverse components.
Definition:
LorentzVector.h:685
Generated on Thu Jun 20 2024 14:47:02 for ThePEG by
1.9.6