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
Fun4All_RICHReco.C
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file Fun4All_RICHReco.C
1
2
int
Fun4All_RICHReco
(
3
const
int
nEvents
= 1,
4
const
char
* inputFile =
"G4EICDetector.root"
,
5
const
char
* evalFile =
"eval_RICH.root"
6
)
7
{
8
9
bool
readdst =
true
;
10
11
/* switch: do_fastpid = 'true' uses FastPid module based on parametrization of RICH response; if
12
set to 'false', use full reconstructed based on detected photon hits. */
13
bool
do_fastpid =
false
;
14
15
//---------------
16
// Load libraries
17
//---------------
18
19
gSystem->Load(
"librichana.so"
);
20
gSystem->Load(
"libfun4all.so"
);
21
gSystem->Load(
"libg4detectors.so"
);
22
23
//---------------
24
// Fun4All server
25
//---------------
26
27
Fun4AllServer
*se =
Fun4AllServer::instance
();
28
se->
Verbosity
(0);
29
// just if we set some flags somewhere in this macro
30
recoConsts
*rc =
recoConsts::instance
();
31
32
//--------------
33
// Analysis modules
34
//--------------
35
36
/* Adding RICH analysis modules */
37
if
( do_fastpid )
38
{
39
FastPid_RICH
*fastpid_rich =
new
FastPid_RICH
(
"SvtxTrackMap"
,
"RICH"
);
40
se->
registerSubsystem
(fastpid_rich);
41
}
42
else
43
{
44
RICHParticleID
*richpid =
new
RICHParticleID
(
"SvtxTrackMap"
,
"RICH"
);
45
richpid->
set_refractive_index
(1.000526);
46
se->
registerSubsystem
(richpid);
47
48
RICHEvaluator
*richeval =
new
RICHEvaluator
(
"SvtxTrackMap"
,
"RICH"
, evalFile);
49
richeval->
set_refractive_index
(1.000526);
50
se->
registerSubsystem
(richeval);
51
}
52
53
//--------------
54
// IO management
55
//--------------
56
57
/* Read DST Files */
58
if
( readdst )
59
{
60
Fun4AllInputManager
*hitsin =
new
Fun4AllDstInputManager
(
"DSTin"
);
61
hitsin->
fileopen
(inputFile);
62
se->
registerInputManager
(hitsin);
63
}
64
65
//-----------------
66
// Event processing
67
//-----------------
68
if
(
nEvents
< 0)
69
{
70
return
;
71
}
72
// if we run the particle generator and use 0 it'll run forever
73
if
(
nEvents
== 0 && !readdst && !readhepmc)
74
{
75
cout <<
"using 0 for number of events is a bad idea when using particle generators"
<< endl;
76
cout <<
"it will run forever, so I just return without running anything"
<< endl;
77
return
;
78
}
79
80
se->
run
(
nEvents
);
81
82
//-----
83
// Exit
84
//-----
85
86
se->
End
();
87
std::cout <<
"All done"
<< std::endl;
88
delete
se;
89
gSystem->Exit(0);
90
}
analysis
blob
master
ParticleID
RICHAnalysis_macros
macros_fun4all
Fun4All_RICHReco.C
Built by
Jin Huang
. updated:
Sat Feb 17 2024 22:17:54
using
1.8.2 with
sPHENIX GitHub integration