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
SvtxTrackState_v2.h
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file SvtxTrackState_v2.h
1
#ifndef TRACKBASEHISTORIC_SVTXTRACKSTATEV2_H
2
#define TRACKBASEHISTORIC_SVTXTRACKSTATEV2_H
3
4
#include "
SvtxTrackState.h
"
5
6
#include <cmath>
7
#include <iostream>
8
#include <string>
// for string, basic_string
9
10
class
PHObject
;
11
12
class
SvtxTrackState_v2
:
public
SvtxTrackState
13
{
14
public
:
15
SvtxTrackState_v2
(
float
pathlength = 0.0);
16
~SvtxTrackState_v2
()
override
{}
17
18
// The "standard PHObject response" functions...
19
void
identify
(std::ostream &
os
= std::cout)
const override
;
20
void
Reset
()
override
{ *
this
=
SvtxTrackState_v2
(0.0); }
21
int
isValid
()
const override
{
return
1; }
22
PHObject
*
CloneMe
()
const override
{
return
new
SvtxTrackState_v2
(*
this
); }
23
24
float
get_pathlength
()
const override
{
return
_pathlength
; }
25
26
float
get_x
()
const override
{
return
_pos
[0]; }
27
void
set_x
(
float
x
)
override
{
_pos
[0] =
x
; }
28
29
float
get_y
()
const override
{
return
_pos
[1]; }
30
void
set_y
(
float
y
)
override
{
_pos
[1] =
y
; }
31
32
float
get_z
()
const override
{
return
_pos
[2]; }
33
void
set_z
(
float
z
)
override
{
_pos
[2] =
z
; }
34
35
float
get_pos
(
unsigned
int
i
)
const override
{
return
_pos
[
i
]; }
36
37
float
get_px
()
const override
{
return
_mom
[0]; }
38
void
set_px
(
float
px)
override
{
_mom
[0] = px; }
39
40
float
get_py
()
const override
{
return
_mom
[1]; }
41
void
set_py
(
float
py)
override
{
_mom
[1] = py; }
42
43
float
get_pz
()
const override
{
return
_mom
[2]; }
44
void
set_pz
(
float
pz)
override
{
_mom
[2] = pz; }
45
46
float
get_mom
(
unsigned
int
i
)
const override
{
return
_mom
[
i
]; }
47
48
float
get_p
()
const override
{
return
sqrt(pow(
get_px
(), 2) + pow(
get_py
(), 2) + pow(
get_pz
(), 2)); }
49
float
get_pt
()
const override
{
return
sqrt(pow(
get_px
(), 2) + pow(
get_py
(), 2)); }
50
float
get_eta
()
const override
{
return
asinh(
get_pz
() /
get_pt
()); }
51
float
get_phi
()
const override
{
return
atan2(
get_py
(),
get_px
()); }
52
53
float
get_error
(
unsigned
int
i
,
unsigned
int
j
)
const override
;
54
// cppcheck-suppress virtualCallInConstructor
55
void
set_error
(
unsigned
int
i
,
unsigned
int
j
,
float
value
)
override
;
56
57
TrkrDefs::cluskey
get_cluskey
()
const override
{
return
_ckey
; }
58
void
set_cluskey
(
TrkrDefs::cluskey
ckey)
override
{
_ckey
= ckey; }
59
60
std::string
get_name
()
const override
{
return
state_name
; }
61
void
set_name
(
const
std::string
&
name
)
override
{
state_name
=
name
; }
62
63
float
get_rphi_error
()
const override
;
64
float
get_phi_error
()
const override
;
65
float
get_z_error
()
const override
;
66
68
69
private
:
70
float
_pathlength
;
71
float
_pos
[3];
72
float
_mom
[3];
73
float
_covar
[21];
// 6x6 triangular packed storage
74
TrkrDefs::cluskey
_ckey
;
// clusterkey that is associated with this state
75
std::string
state_name
;
76
77
ClassDefOverride
(
SvtxTrackState_v2
, 1)
78
};
79
80
#endif
coresoftware
blob
master
offline
packages
trackbase_historic
SvtxTrackState_v2.h
Built by
Jin Huang
. updated:
Sat Feb 17 2024 22:18:09
using
1.8.2 with
sPHENIX GitHub integration