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
TreeMaker.C
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file TreeMaker.C
1
#include <iostream>
2
3
// --- header for this clase
4
#include <
TreeMaker.h
>
5
6
// --- basic sPhenix environment stuff
7
#include <
fun4all/Fun4AllServer.h
>
8
#include <
phool/getClass.h
>
9
#include <
phool/PHCompositeNode.h
>
10
11
using
std::cout;
12
using
std::endl;
13
14
15
16
TreeMaker::TreeMaker
(
const
std::string
&
name
) :
SubsysReco
(
"TREEMAKER"
)
17
{
18
cout <<
"TreeMaker::TreeMaker called"
<< endl;
19
foutname
=
name
;
20
}
21
22
23
TreeMaker::~TreeMaker
()
24
{
25
cout <<
"TreeMaker::~TreeMaker called"
<< endl;
26
}
27
28
29
int
TreeMaker::Init
(
PHCompositeNode
*topNode)
30
{
31
cout <<
"TreeMaker::Init called"
<< endl;
32
outfile
= TFile::Open(
foutname
.c_str(),
"RECREATE"
);
33
InitializeTree
();
34
return
0;
35
}
36
37
38
int
TreeMaker::InitRun
(
PHCompositeNode
*topNode)
39
{
40
cout <<
"TreeMaker::InitRun called"
<< endl;
41
int
cn_status =
CreateNode
(topNode);
42
cout <<
"TreeMaker::InitRun : CreateNode returned "
<< cn_status << endl;
43
return
0;
44
}
45
46
47
48
int
TreeMaker::process_event
(
PHCompositeNode
*topNode)
49
{
50
51
// --- initialize the counters
52
InitializeCounters
();
53
54
// --- copy the old jets/clusters and make a new container for modified jets/clusters
55
CopyAndMakeJets
(topNode);
56
CopyAndMakeClusters
(topNode);
57
58
// --- get the jets and set the tree variables
59
GetTruthJets
(topNode);
60
GetRecoJets
(topNode);
61
62
// --- get the clusters and do some analysis
63
GetClusters
(topNode);
64
65
// --- do some stuff with fast jet
66
UseFastJet
(topNode);
67
68
// --- fill the tree
69
tree
->Fill();
70
71
// --- all done!
72
return
0;
73
74
}
75
76
77
78
int
TreeMaker::End
(
PHCompositeNode
*topNode)
79
{
80
cout <<
"TreeMaker::End called"
<< endl;
81
outfile
->Write();
82
outfile
->Close();
83
cout <<
"All done! Have a nice day!"
<< endl;
84
return
0;
85
}
86
analysis
blob
master
TreeMaker
TreeMaker.C
Built by
Jin Huang
. updated:
Sat Feb 17 2024 22:17:58
using
1.8.2 with
sPHENIX GitHub integration