ECCE @ EIC Software
Reference for
ECCE @ 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
G4TTree.C
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file G4TTree.C
1
#pragma once
2
#if ROOT_VERSION_CODE >= ROOT_VERSION(6,00,0)
3
#include <
fun4all/SubsysReco.h
>
4
#include <
fun4all/Fun4AllServer.h
>
5
#include <
fun4all/Fun4AllInputManager.h
>
6
#include <
fun4all/Fun4AllDstInputManager.h
>
7
#include <
fun4all/Fun4AllOutputManager.h
>
8
#include <
fun4all/Fun4AllDstOutputManager.h
>
9
10
#include <
g4histos/G4HitTTree.h
>
11
#include <
g4histos/G4RawTowerTTree.h
>
12
R__LOAD_LIBRARY
(libfun4all.so)
13
R__LOAD_LIBRARY
(libg4histos.so)
14
#endif
15
16
void
G4TTree
(
17
const
char
*
fname
=
"/sphenix/sim/sim01/tutorials/clusters/G4sPHENIX_Pythia8.root"
,
18
const
int
nevnt = 0,
19
const
char
*outfile=
"towers.root"
)
20
{
21
gSystem->Load(
"libg4histos"
);
22
gSystem->Load(
"libg4dst.so"
);
23
Fun4AllServer
*se =
Fun4AllServer::instance
();
24
char
detector[100];
25
char
outnode[100];
26
sprintf(detector,
"%s"
,
"CEMC"
);
27
// se->Verbosity(10);
28
G4HitTTree
*tt =
new
G4HitTTree
();
29
tt->
Detector
(detector);
30
se->
registerSubsystem
(tt);
31
32
G4RawTowerTTree
*rt =
new
G4RawTowerTTree
();
33
rt->
Detector
(detector);
34
se->
registerSubsystem
(rt);
35
Fun4AllInputManager
*
in
=
new
Fun4AllDstInputManager
(
"DSTin"
);
36
in->
fileopen
(
fname
);
37
se->
registerInputManager
(in);
38
Fun4AllOutputManager
*out =
new
Fun4AllDstOutputManager
(
"DSTout"
,outfile);
39
sprintf(outnode,
"G4RootHit_%s"
,detector);
40
out->
AddNode
(outnode);
41
sprintf(outnode,
"G4RootRawTower_%s"
,detector);
42
out->
AddNode
(outnode);
43
se->
registerOutputManager
(out);
44
45
se->
run
(nevnt);
46
se->
End
();
47
delete
se;
48
}
tutorials
blob
master
clusters
G4TTree.C
Built by
Jin Huang
. updated:
Wed Jun 29 2022 17:26:00
using
1.8.2 with
ECCE GitHub integration