Analysis Software
Documentation for
sPHENIX
simulation software
Home page
Related Pages
Modules
Namespaces
Classes
Files
Examples
External Links
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
MbdVertexv2.cc
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file MbdVertexv2.cc
1
#include "
MbdVertexv2.h
"
2
3
#include <cmath>
4
5
using namespace
std;
6
7
MbdVertexv2::MbdVertexv2
()
8
: _id(0xFFFFFFFF)
9
, _bco(std::numeric_limits<unsigned int>::max())
10
, _t(NAN)
11
, _t_err(NAN)
12
, _z(NAN)
13
, _z_err(NAN)
14
{
15
}
16
17
MbdVertexv2::~MbdVertexv2
() =
default
;
18
19
void
MbdVertexv2::identify
(ostream&
os
)
const
20
{
21
os <<
"---MbdVertexv2--------------------------------"
<< endl;
22
os <<
"vertexid: "
<<
get_id
() << endl;
23
os <<
" t = "
<<
get_t
() <<
" +/- "
<<
get_t_err
() << endl;
24
os <<
" z = "
<<
get_z
() <<
" +/- "
<<
get_z_err
() << endl;
25
os <<
"-----------------------------------------------"
<< endl;
26
27
return
;
28
}
29
30
int
MbdVertexv2::isValid
()
const
31
{
32
if
(
_id
== 0xFFFFFFFF)
33
{
34
return
0;
35
}
36
if
(isnan(
_t
))
37
{
38
return
0;
39
}
40
if
(isnan(
_t_err
))
41
{
42
return
0;
43
}
44
if
(isnan(
_z
))
45
{
46
return
0;
47
}
48
if
(isnan(
_z_err
))
49
{
50
return
0;
51
}
52
53
return
1;
54
}
55
56
float
MbdVertexv2::get_position
(
unsigned
int
coor)
const
57
{
58
if
(coor == 0)
return
get_x
();
59
else
if
(coor == 1)
return
get_y
();
60
else
if
(coor == 2)
return
get_z
();
61
else
return
NAN;
62
}
coresoftware
blob
master
offline
packages
globalvertex
MbdVertexv2.cc
Built by
Jin Huang
. updated:
Sat Feb 17 2024 22:18:06
using
1.8.2 with
sPHENIX GitHub integration