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_Ana.C
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file Fun4All_Ana.C
1
void
Fun4All_Ana
(
int
nEvents
= 1000,
2
char
*
input_file
=
"/gpfs02/phenix/prod/sPHENIX/sunyrefnewinnerhcal/fieldmap/G4Hits_sPHENIX_mu-_eta0.30_40GeV.root"
,
3
//char *input_file ="/sphenix/sim/sim01/cd1_review/single_particle/fieldmap/G4Hits_sPHENIX_e-_eta0.30_16GeV-0003.root",
4
const
char
*outFile =
"outfile.root"
)
5
{
6
gSystem->Load(
"libfun4all"
);
7
gSystem->Load(
"libphg4hit.so"
);
8
gSystem->Load(
"libg4detectors.so"
);
9
gSystem->Load(
"libg4picoDst.so"
);
//??
10
gSystem->Load(
"libg4decayer.so"
);
11
gSystem->Load(
"libg4eval.so"
);
12
gSystem->Load(
"libg4hough.so"
);
13
gSystem->Load(
"libPHAna.so"
);
//??
14
16
//
17
//- recoConsts setup
18
//
20
recoConsts
*rc =
recoConsts::instance
();
21
23
//
24
//- Make the Server
25
//
27
Fun4AllServer
*se =
Fun4AllServer::instance
();
28
se->
Verbosity
(0);
29
recoConsts
*rc =
recoConsts::instance
();
30
31
PHAna
*ana =
new
PHAna
();
32
//ana->set_flag( PHAna::TRUTH, true);
33
//ana->set_flag( PHAna::HIST, true);
34
//ana->set_flag( PHAna::SF, true);
35
ana->
set_flag
(
PHAna::ALL
,
true
);
36
ana->
set_filename
( outFile );
37
se->
registerSubsystem
( ana );
38
40
//
41
//- Analyze the Data.
42
//
44
45
Fun4AllInputManager
*hcal_dst =
new
Fun4AllDstInputManager
(
"HCAL"
,
"DST"
,
"TOP"
);
46
se->
registerInputManager
( hcal_dst );
47
se->
fileopen
( hcal_dst->
Name
(),
input_file
);
48
//you can put a list of files as well
49
//hcal_dst->AddListFile( input_file );
50
51
se->
run
(
nEvents
);
52
se->
End
();
53
delete
se;
54
}
analysis
blob
master
Ana
macros
Fun4All_Ana.C
Built by
Jin Huang
. updated:
Sat Feb 17 2024 22:17:46
using
1.8.2 with
sPHENIX GitHub integration