Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
srcs
sbnanaobj
sbnanaobj
StandardRecord
SRLorentzVector.h
Go to the documentation of this file.
1
////////////////////////////////////////////////////////////////////////
2
// \file SRLorentzVector.h
3
// \author Christopher Backhouse - bckhouse@caltech.edu
4
////////////////////////////////////////////////////////////////////////
5
6
#ifndef SRLORENTZVECTOR_H
7
#define SRLORENTZVECTOR_H
8
9
#ifndef __castxml__
10
#include "TLorentzVector.h"
11
#include "TVector3.h"
12
#endif
13
14
namespace
caf
15
{
16
/// 4-vector with more efficient storage than TLorentzVector
17
class
SRLorentzVector
18
{
19
public
:
20
SRLorentzVector
();
21
virtual
~SRLorentzVector
();
22
23
#ifndef __castxml__
24
SRLorentzVector
(
const
TLorentzVector& v);
25
26
/// Recommend users convert back to TLorentzVector for boosts etc
27
operator
TLorentzVector()
const
;
28
29
// For access as a position vector. For momentum use the member variables
30
// directly.
31
float
T
()
const
{
return
E
;}
32
float
X
()
const
{
return
px
;}
33
float
Y
()
const
{
return
py
;}
34
float
Z
()
const
{
return
pz
;}
35
float
Mag
()
const
{
return
TMath::Sqrt
(
px
*
px
+
py
*
py
+
pz
*
pz
);}
36
float
Beta
()
const
{
return
Mag
()/
E
;}
37
float
Gamma
()
const
{
return
1.0/
TMath::Sqrt
(1-
Beta
()*
Beta
());}
38
39
TVector3
Vect
()
const
{
return
TVector3(
px
,
py
,
pz
);}
40
#endif
41
42
float
E
;
43
float
px
;
44
float
py
;
45
float
pz
;
46
};
47
48
}
// end namespace
49
50
#endif // SRLORENTZVECTOR_H
51
//////////////////////////////////////////////////////////////////////////////
caf::SRLorentzVector::E
float E
Definition:
SRLorentzVector.h:42
caf::SRLorentzVector::Vect
TVector3 Vect() const
Definition:
SRLorentzVector.h:39
caf::SRLorentzVector::px
float px
Definition:
SRLorentzVector.h:43
caf::SRLorentzVector::Gamma
float Gamma() const
Definition:
SRLorentzVector.h:37
caf::SRLorentzVector::Mag
float Mag() const
Definition:
SRLorentzVector.h:35
caf::SRLorentzVector
4-vector with more efficient storage than TLorentzVector
Definition:
SRLorentzVector.h:17
ana::Sqrt
Var Sqrt(const Var &v)
Use to take sqrt of a var.
Definition:
Var.cxx:172
caf::SRLorentzVector::Y
float Y() const
Definition:
SRLorentzVector.h:33
caf::SRLorentzVector::Z
float Z() const
Definition:
SRLorentzVector.h:34
caf::SRLorentzVector::X
float X() const
Definition:
SRLorentzVector.h:32
caf::SRLorentzVector::~SRLorentzVector
virtual ~SRLorentzVector()
Definition:
SRLorentzVector.cxx:23
caf::SRLorentzVector::SRLorentzVector
SRLorentzVector()
Definition:
SRLorentzVector.cxx:10
caf::SRLorentzVector::T
float T() const
Definition:
SRLorentzVector.h:31
caf::SRLorentzVector::pz
float pz
Definition:
SRLorentzVector.h:45
caf::SRLorentzVector::Beta
float Beta() const
Definition:
SRLorentzVector.h:36
caf::SRLorentzVector::py
float py
Definition:
SRLorentzVector.h:44
Generated by
1.8.5