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
MyHitTTree.C
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file MyHitTTree.C
1
#ifndef MACRO_MYHITTTREE_C
2
#define MACRO_MYHITTTREE_C
3
4
#include <
fun4all/SubsysReco.h
>
5
#include <
fun4all/Fun4AllServer.h
>
6
#include <
fun4all/Fun4AllInputManager.h
>
7
#include <
fun4all/Fun4AllDstInputManager.h
>
8
#include <
fun4all/Fun4AllOutputManager.h
>
9
#include <
fun4all/Fun4AllDstOutputManager.h
>
10
#include <
g4histos/G4HitTTree.h
>
11
12
R__LOAD_LIBRARY(libg4histos.so)
13
14
void
MyHitTTree
(const
char
*
fname
, const
int
nevnt = 0, const
char
*
outfile
="hits.
root
")
15
{
16
gSystem->Load(
"libg4dst.so"
);
17
Fun4AllServer
*se =
Fun4AllServer::instance
();
18
char
detector
[100];
19
char
outnode[100];
20
sprintf(detector,
"%s"
,
"SVTX"
);
21
sprintf(outnode,
"G4RootHit_%s"
,detector);
22
// se->Verbosity(10);
23
G4HitTTree
*tt =
new
G4HitTTree
();
24
tt->
Detector
(detector);
25
se->
registerSubsystem
(tt);
26
27
Fun4AllInputManager
*
in
=
new
Fun4AllDstInputManager
(
"DSTin"
);
28
in->
fileopen
(fname);
29
se->
registerInputManager
(in);
30
Fun4AllOutputManager
*
out
=
new
Fun4AllDstOutputManager
(
"DSTout"
,
outfile
);
31
out->
AddNode
(outnode);
32
se->
registerOutputManager
(out);
33
34
se->
run
(nevnt);
35
se->
End
();
36
delete
se;
37
}
38
39
#endif
tutorials
blob
master
cylinder
MyHitTTree.C
Built by
Jin Huang
. updated:
Sat Feb 17 2024 22:18:49
using
1.8.2 with
sPHENIX GitHub integration