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
G4_Jets.C
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file G4_Jets.C
1
#ifndef MACRO_G4JETS_C
2
#define MACRO_G4JETS_C
3
4
#include <
GlobalVariables.C
>
5
#include <
QA.C
>
6
7
#include <
jetbase/ClusterJetInput.h
>
8
#include <
jetbase/FastJetAlgo.h
>
9
#include <
jetbase/JetReco.h
>
10
#include <
jetbase/TowerJetInput.h
>
11
#include <
jetbase/TrackJetInput.h
>
12
#include <
g4jets/TruthJetInput.h
>
13
14
#include <
g4eval/JetEvaluator.h
>
15
#include <qa_modules/QAG4SimulationJet.h>
16
17
#include <
fun4all/Fun4AllServer.h
>
18
19
R__LOAD_LIBRARY(libjetbase.so)
20
R__LOAD_LIBRARY(libg4jets.so)
21
R__LOAD_LIBRARY(libg4eval.so)
22
R__LOAD_LIBRARY(libqa_modules.so)
23
24
namespace Enable
25
{
26
bool
JETS
=
false
;
27
bool
JETS_EVAL
=
false
;
28
bool
JETS_QA
=
false
;
29
int
JETS_VERBOSITY
= 0;
30
}
// namespace Enable
31
32
void
JetInit
() {}
33
34
void
Jet_Reco
()
35
{
36
int
verbosity
= std::max(
Enable::VERBOSITY
,
Enable::JETS_VERBOSITY
);
37
38
Fun4AllServer
*se =
Fun4AllServer::instance
();
39
40
// truth particle level jets
41
JetReco
*truthjetreco =
new
JetReco
(
"TRUTHJETRECO"
);
42
truthjetreco->
add_input
(
new
TruthJetInput
(
Jet::PARTICLE
));
43
truthjetreco->
add_algo
(
new
FastJetAlgo
(
Jet::ANTIKT
, 0.2),
"AntiKt_Truth_r02"
);
44
truthjetreco->
add_algo
(
new
FastJetAlgo
(
Jet::ANTIKT
, 0.3),
"AntiKt_Truth_r03"
);
45
truthjetreco->
add_algo
(
new
FastJetAlgo
(
Jet::ANTIKT
, 0.4),
"AntiKt_Truth_r04"
);
46
truthjetreco->
add_algo
(
new
FastJetAlgo
(
Jet::ANTIKT
, 0.5),
"AntiKt_Truth_r05"
);
47
truthjetreco->
add_algo
(
new
FastJetAlgo
(
Jet::ANTIKT
, 0.6),
"AntiKt_Truth_r06"
);
48
truthjetreco->
add_algo
(
new
FastJetAlgo
(
Jet::ANTIKT
, 0.7),
"AntiKt_Truth_r07"
);
49
truthjetreco->
add_algo
(
new
FastJetAlgo
(
Jet::ANTIKT
, 0.8),
"AntiKt_Truth_r08"
);
50
truthjetreco->
set_algo_node
(
"ANTIKT"
);
51
truthjetreco->
set_input_node
(
"TRUTH"
);
52
truthjetreco->
Verbosity
(verbosity);
53
se->
registerSubsystem
(truthjetreco);
54
55
// tower jets
56
JetReco
*towerjetreco =
new
JetReco
(
"TOWERJETRECO"
);
57
towerjetreco->
add_input
(
new
TowerJetInput
(
Jet::CEMC_TOWER
));
58
towerjetreco->
add_input
(
new
TowerJetInput
(
Jet::HCALIN_TOWER
));
59
towerjetreco->
add_input
(
new
TowerJetInput
(
Jet::HCALOUT_TOWER
));
60
towerjetreco->
add_algo
(
new
FastJetAlgo
(
Jet::ANTIKT
, 0.2),
"AntiKt_Tower_r02"
);
61
towerjetreco->
add_algo
(
new
FastJetAlgo
(
Jet::ANTIKT
, 0.3),
"AntiKt_Tower_r03"
);
62
towerjetreco->
add_algo
(
new
FastJetAlgo
(
Jet::ANTIKT
, 0.4),
"AntiKt_Tower_r04"
);
63
towerjetreco->
add_algo
(
new
FastJetAlgo
(
Jet::ANTIKT
, 0.5),
"AntiKt_Tower_r05"
);
64
towerjetreco->
add_algo
(
new
FastJetAlgo
(
Jet::ANTIKT
, 0.6),
"AntiKt_Tower_r06"
);
65
towerjetreco->
add_algo
(
new
FastJetAlgo
(
Jet::ANTIKT
, 0.7),
"AntiKt_Tower_r07"
);
66
towerjetreco->
add_algo
(
new
FastJetAlgo
(
Jet::ANTIKT
, 0.8),
"AntiKt_Tower_r08"
);
67
towerjetreco->
set_algo_node
(
"ANTIKT"
);
68
towerjetreco->
set_input_node
(
"TOWER"
);
69
towerjetreco->
Verbosity
(verbosity);
70
se->
registerSubsystem
(towerjetreco);
71
72
// cluster jets
73
JetReco
*clusterjetreco =
new
JetReco
(
"CLUSTERJETRECO"
);
74
clusterjetreco->
add_input
(
new
ClusterJetInput
(
Jet::CEMC_CLUSTER
));
75
clusterjetreco->
add_input
(
new
ClusterJetInput
(
Jet::HCALIN_CLUSTER
));
76
clusterjetreco->
add_input
(
new
ClusterJetInput
(
Jet::HCALOUT_CLUSTER
));
77
clusterjetreco->
add_algo
(
new
FastJetAlgo
(
Jet::ANTIKT
, 0.2),
"AntiKt_Cluster_r02"
);
78
clusterjetreco->
add_algo
(
new
FastJetAlgo
(
Jet::ANTIKT
, 0.3),
"AntiKt_Cluster_r03"
);
79
clusterjetreco->
add_algo
(
new
FastJetAlgo
(
Jet::ANTIKT
, 0.4),
"AntiKt_Cluster_r04"
);
80
clusterjetreco->
add_algo
(
new
FastJetAlgo
(
Jet::ANTIKT
, 0.5),
"AntiKt_Cluster_r05"
);
81
clusterjetreco->
add_algo
(
new
FastJetAlgo
(
Jet::ANTIKT
, 0.6),
"AntiKt_Cluster_r06"
);
82
clusterjetreco->
add_algo
(
new
FastJetAlgo
(
Jet::ANTIKT
, 0.7),
"AntiKt_Cluster_r07"
);
83
clusterjetreco->
add_algo
(
new
FastJetAlgo
(
Jet::ANTIKT
, 0.8),
"AntiKt_Cluster_r08"
);
84
clusterjetreco->
set_algo_node
(
"ANTIKT"
);
85
clusterjetreco->
set_input_node
(
"CLUSTER"
);
86
clusterjetreco->
Verbosity
(verbosity);
87
se->
registerSubsystem
(clusterjetreco);
88
89
// track jets
90
JetReco
*trackjetreco =
new
JetReco
(
"TRACKJETRECO"
);
91
trackjetreco->
add_input
(
new
TrackJetInput
(
Jet::TRACK
,
TRACKING::TrackNodeName
));
92
trackjetreco->
add_algo
(
new
FastJetAlgo
(
Jet::ANTIKT
, 0.2),
"AntiKt_Track_r02"
);
93
trackjetreco->
add_algo
(
new
FastJetAlgo
(
Jet::ANTIKT
, 0.3),
"AntiKt_Track_r03"
);
94
trackjetreco->
add_algo
(
new
FastJetAlgo
(
Jet::ANTIKT
, 0.4),
"AntiKt_Track_r04"
);
95
trackjetreco->
add_algo
(
new
FastJetAlgo
(
Jet::ANTIKT
, 0.5),
"AntiKt_Track_r05"
);
96
trackjetreco->
add_algo
(
new
FastJetAlgo
(
Jet::ANTIKT
, 0.6),
"AntiKt_Track_r06"
);
97
trackjetreco->
add_algo
(
new
FastJetAlgo
(
Jet::ANTIKT
, 0.7),
"AntiKt_Track_r07"
);
98
trackjetreco->
add_algo
(
new
FastJetAlgo
(
Jet::ANTIKT
, 0.8),
"AntiKt_Track_r08"
);
99
trackjetreco->
set_algo_node
(
"ANTIKT"
);
100
trackjetreco->
set_input_node
(
"TRACK"
);
101
trackjetreco->
Verbosity
(verbosity);
102
se->
registerSubsystem
(trackjetreco);
103
104
return
;
105
}
106
107
void
Jet_Eval
(
const
std::string
&outfilename =
"g4jets_eval.root"
)
108
{
109
int
verbosity
= std::max(
Enable::VERBOSITY
,
Enable::JETS_VERBOSITY
);
110
111
Fun4AllServer
*se =
Fun4AllServer::instance
();
112
113
JetEvaluator
*eval =
new
JetEvaluator
(
"JETEVALUATOR"
,
114
"AntiKt_Tower_r03"
,
115
"AntiKt_Truth_r03"
,
116
outfilename);
117
eval->
Verbosity
(verbosity);
118
se->
registerSubsystem
(eval);
119
120
return
;
121
}
122
123
124
void
Jet_QA
()
125
{
126
int
verbosity
= std::max(
Enable::QA_VERBOSITY
,
Enable::JETS_VERBOSITY
);
127
128
Fun4AllServer
*se =
Fun4AllServer::instance
();
129
130
QAG4SimulationJet
*calo_jet7 =
new
QAG4SimulationJet
(
131
"AntiKt_Truth_r07"
);
132
calo_jet7->
add_reco_jet
(
"AntiKt_Tower_r07"
);
133
calo_jet7->
add_reco_jet
(
"AntiKt_Cluster_r07"
);
134
calo_jet7->
add_reco_jet
(
"AntiKt_Track_r07"
);
135
calo_jet7->
Verbosity
(verbosity);
136
se->
registerSubsystem
(calo_jet7);
137
138
QAG4SimulationJet
*calo_jet4 =
new
QAG4SimulationJet
(
139
"AntiKt_Truth_r04"
);
140
calo_jet4->
add_reco_jet
(
"AntiKt_Tower_r04"
);
141
calo_jet4->
add_reco_jet
(
"AntiKt_Cluster_r04"
);
142
calo_jet4->
add_reco_jet
(
"AntiKt_Track_r04"
);
143
calo_jet4->
Verbosity
(verbosity);
144
se->
registerSubsystem
(calo_jet4);
145
146
QAG4SimulationJet
*calo_jet2 =
new
QAG4SimulationJet
(
147
"AntiKt_Truth_r02"
);
148
calo_jet2->
add_reco_jet
(
"AntiKt_Tower_r02"
);
149
calo_jet2->
add_reco_jet
(
"AntiKt_Cluster_r02"
);
150
calo_jet2->
add_reco_jet
(
"AntiKt_Track_r02"
);
151
calo_jet2->
Verbosity
(verbosity);
152
se->
registerSubsystem
(calo_jet2);
153
154
return
;
155
}
156
157
158
#endif
macros
blob
master
common
G4_Jets.C
Built by
Jin Huang
. updated:
Sat Feb 17 2024 22:17:49
using
1.8.2 with
sPHENIX GitHub integration