EIC Software
Reference for
EIC
simulation and reconstruction software on GitHub
Home page
Related Pages
Modules
Namespaces
Classes
Files
External Links
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
PndTrack.h
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file PndTrack.h
1
/*
2
* PndTrack.h
3
*
4
* Created on: 05.03.2009
5
* Author: everybody
6
*/
7
8
#ifndef PNDTRACK_H_
9
#define PNDTRACK_H_
10
11
#include "TObject.h"
12
#include "
PndTrackCand.h
"
13
#include "
FairTrackParP.h
"
14
#include "
PndDetectorList.h
"
15
#include "
FairTimeStamp.h
"
16
#include "TRef.h"
17
18
class
NaiveTrackParameterization
:
public
TObject
19
{
20
public
:
21
NaiveTrackParameterization
(
bool
valid
=
false
):
mValid
(
valid
) {};
22
~NaiveTrackParameterization
() {};
23
24
bool
IsValid
(
void
)
const
{
return
mValid
; };
25
TVector3
GetMoCaPosition
(
void
)
const
{
return
mMoCaPosition
; };
26
TVector3
GetMoCaMomentum
(
void
)
const
{
return
mMoCaMomentum
; };
27
TVector3
GetRecoPosition
(
void
)
const
{
return
mRecoPosition
; };
28
TVector3
GetRecoMomentum
(
void
)
const
{
return
mRecoMomentum
; };
29
30
double
DistanceToPlane
(
const
TVector3 &x0,
const
TVector3 &n0)
const
{
31
// Use MC position here;
32
return
fabs((x0 -
mMoCaPosition
).Dot(n0.Unit()));
33
};
34
35
void
SetValid
(
void
) {
mValid
=
true
; };
36
void
SetMoCaPosition
(
const
TVector3 &
position
) {
mMoCaPosition
=
position
; };
37
void
SetMoCaMomentum
(
const
TVector3 &
momentum
) {
mMoCaMomentum
=
momentum
; };
38
void
SetRecoPosition
(
const
TVector3 &
position
) {
mRecoPosition
=
position
; };
39
void
SetRecoMomentum
(
const
TVector3 &
momentum
) {
mRecoMomentum
=
momentum
; };
40
41
private
:
42
bool
mValid
;
43
44
// Simulated and reconstructed 3D positions and momenta at this hit location;
45
TVector3
mMoCaPosition
,
mMoCaMomentum
,
mRecoPosition
,
mRecoMomentum
;
46
47
ClassDef
(
NaiveTrackParameterization
, 1);
48
};
49
50
class
PndTrack
:
public
FairTimeStamp
{
51
public
:
52
PndTrack
();
53
PndTrack
(
const
FairTrackParP
& first,
const
FairTrackParP
& last,
const
PndTrackCand
& cand,
54
Int_t flag = 0, Double_t chi2 = -1., Int_t ndf = 0, Int_t
pid
= 0, Int_t
id
= -1, Int_t type = -1);
55
56
void
Print
();
57
58
59
Int_t
GetPidHypo
()
const
{
return
fPidHypo
; }
60
Int_t
GetFlag
()
const
{
return
fFlag
; }
//Quality flag
61
Double_t
GetChi2
()
const
{
return
fChi2
; }
62
Int_t
GetNDF
()
const
{
return
fNDF
; }
63
Int_t
GetRefIndex
()
const
{
return
fRefIndex
; }
64
void
SetPidHypo
(Int_t i) {
fPidHypo
=i; }
65
void
SetFlag
(Int_t i) {
fFlag
=i; }
66
void
SetChi2
(Double_t
d
) {
fChi2
=
d
; }
67
void
SetChiSquareCCDF
(Double_t
d
){
fChiSquareCCDF
=
d
; }
68
void
SetNDF
(Int_t i) {
fNDF
=i; }
69
void
SetRefIndex
(TString branch, Int_t i) {
fRefIndex
=i;
SetLink
(
FairLink
(branch, i)); }
70
void
SetRefIndex
(Int_t i){
fRefIndex
= i;}
71
void
SetTrackCand
(
const
PndTrackCand
& cand) {
fTrackCand
= cand; };
72
void
SetTrackCandRef
(
PndTrackCand
* candPointer){
fRefToPndTrackCand
= candPointer; }
73
PndTrackCand
*
GetPndTrackCandViaRef
(){
return
(
PndTrackCand
*)
fRefToPndTrackCand
.GetObject();}
74
75
PndTrackCand
GetTrackCand
() {
return
fTrackCand
; }
76
PndTrackCand
*
GetTrackCandPtr
() {
return
&
fTrackCand
; }
77
FairTrackParP
GetParamFirst
() {
return
fTrackParamFirst
; }
78
FairTrackParP
GetParamLast
() {
return
fTrackParamLast
; }
79
80
private
:
81
FairTrackParP
fTrackParamFirst
;
82
FairTrackParP
fTrackParamLast
;
83
84
PndTrackCand
fTrackCand
;
85
TRef
fRefToPndTrackCand
;
86
87
Int_t
fPidHypo
;
88
Int_t
fFlag
;
89
Double_t
fChi2
;
90
// Well, it is convenient to have this value handy in ROOT macros
91
// (even that it is redundant, clear);
92
Double_t
fChiSquareCCDF
;
93
Int_t
fNDF
;
94
Int_t
fRefIndex
;
95
96
public
:
97
// Parameterizations at the hit locations;
98
std::vector<NaiveTrackParameterization>
mParameterizations
;
99
100
ClassDef
(
PndTrack
,6)
101
102
};
103
104
#endif
/* PNDTRACK_H_ */
EicRoot
blob
master
pnddata
TrackData
PndTrack.h
Built by
Jin Huang
. updated:
Mon Jan 22 2024 12:43:37
using
1.8.2 with
EIC GitHub integration