StRoot
1
Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Groups
Pages
StJetFinder
AbstractFourVec.h
1
// -*- mode: c++;-*-
2
// $Id: AbstractFourVec.h,v 1.3 2008/04/23 19:24:09 tai Exp $
3
#ifndef ABSTRACTFOURVEC_H
4
#define ABSTRACTFOURVEC_H
5
6
#include <iostream>
7
#include <cmath>
8
15
class
AbstractFourVec
{
16
17
public
:
18
AbstractFourVec
() {};
19
virtual
~
AbstractFourVec
() {};
20
21
//access
22
23
//momenta
24
virtual
double
px()
const
= 0;
25
virtual
double
py()
const
= 0;
26
virtual
double
pz()
const
= 0;
27
28
//angles
29
virtual
double
phi()
const
= 0;
30
virtual
double
eta()
const
= 0;
31
32
//4-th component
33
virtual
double
eT()
const
= 0;
34
virtual
double
e()
const
= 0;
35
virtual
double
mass()
const
= 0;
36
37
//charge
38
virtual
double
charge()
const
= 0;
39
40
private
:
41
42
};
43
44
45
inline
std::ostream& operator<<(std::ostream& os,
const
AbstractFourVec
& v)
46
{
47
return
os <<
"et: "
<<v.eT()<<
"\tphi: "
<<v.phi()<<
"\teta: "
<<v.eta()<<
"\tmass: "
<<v.mass()
48
<<
"\tcharge: "
<<v.charge();
49
}
50
51
struct
StreamFourVec
52
{
53
void
operator()(
AbstractFourVec
* v) {
54
std::cout << *v << std::endl;
55
}
56
};
57
58
59
#endif // ABSTRACTFOURVEC_H
StreamFourVec
Definition:
AbstractFourVec.h:51
AbstractFourVec
Definition:
AbstractFourVec.h:15
Generated by
1.8.5