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
RunGenFitTrackProp.C
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file RunGenFitTrackProp.C
1
7
void
RunGenFitTrackProp
(
8
const
char
*
input
=
"SvtxClusters.root"
,
9
const
int
pid_guess = 321,
//pi: 211, mu: 13, e: 11, Kaon: 321, proton: 2212
10
const
int
nevents
= 0,
11
const
bool
use_kalman_pat_rec =
true
,
12
const
char
*
output
=
"GenFitTrackProp.root"
) {
13
14
gSystem->Load(
"libphool.so"
);
15
gSystem->Load(
"libfun4all.so"
);
16
gSystem->Load(
"libg4dst.so"
);
17
gSystem->Load(
"libg4hough.so"
);
18
19
Fun4AllServer
*se =
Fun4AllServer::instance
();
20
21
if
(use_kalman_pat_rec) {
22
//---------------------
23
// PHG4KalmanPatRec
24
//---------------------
25
26
PHG4KalmanPatRec* kalman_pat_rec =
new
PHG4KalmanPatRec(
"PHG4KalmanPatRec"
, 3, 4, 40);
27
//kalman_pat_rec->set_primary_pid_guess(pid_guess);
28
//kalman_pat_rec->Verbosity(100);
29
30
se->
registerSubsystem
(kalman_pat_rec);
31
32
}
else
{
33
//---------------------
34
// Truth Pattern Recognition
35
//---------------------
36
PHG4TruthPatRec* pat_rec =
new
PHG4TruthPatRec();
37
se->
registerSubsystem
(pat_rec);
38
39
}
40
41
//---------------------
42
// Kalman Filter
43
//---------------------
44
PHG4TrackKalmanFitter* kalman =
new
PHG4TrackKalmanFitter();
45
//kalman->set_primary_pid_guess(pid_guess);
46
//kalman->set_fit_primary_tracks(true);
47
//kalman->set_use_truth_vertex(true);
48
//kalman->Verbosity(100);
49
//kalman->set_do_evt_display(true);
50
//kalman->set_track_fitting_alg_name("DafRef");
51
//kalman->set_over_write_svtxtrackmap(true);
52
//kalman->set_over_write_svtxvertexmap(true);
53
//kalman->set_do_eval(true);
54
//kalman->set_eval_filename("PHG4TrackKalmanFitter_eval.root");
55
56
se->
registerSubsystem
(kalman);
57
58
//---------------
59
// Load libraries
60
//---------------
61
62
gSystem->Load(
"libfun4all.so"
);
63
gSystem->Load(
"libGenFitTrackProp.so"
);
64
65
Fun4AllServer
*se =
Fun4AllServer::instance
();
66
//se->Verbosity(10);
67
68
//----------------
69
// GenFitTrackProp
70
//----------------
71
72
GenFitTrackProp
*genfit_prop =
new
GenFitTrackProp
(
"GenFitTrackProp"
,pid_guess);
73
genfit_prop->
Verbosity
(100);
74
se->
registerSubsystem
(genfit_prop);
75
76
Fun4AllInputManager
*
in
=
new
Fun4AllDstInputManager
(
"DSTin"
);
77
78
TString tstr_input(
input
);
79
if
(tstr_input.EndsWith(
".root"
))
80
in->
AddFile
(
input
);
81
else
82
in->
AddListFile
(
input
);
83
se->
registerInputManager
(in);
84
85
se->
run
(
nevents
);
86
87
se->
End
();
88
89
std::cout <<
" Success!! "
<< std::endl;
90
}
analysis
blob
master
Tracking
GenFitTrackProp
macros
RunGenFitTrackProp.C
Built by
Jin Huang
. updated:
Sat Feb 17 2024 22:17:58
using
1.8.2 with
sPHENIX GitHub integration