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_HIJetReco.C
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file G4_HIJetReco.C
1
#ifndef MACRO_G4HIJETRECO_C
2
#define MACRO_G4HIJETRECO_C
3
4
#include <
GlobalVariables.C
>
5
6
#include <
jetbase/FastJetAlgo.h
>
7
#include <
jetbase/JetReco.h
>
8
#include <
jetbase/TowerJetInput.h
>
9
#include <
g4jets/TruthJetInput.h
>
10
11
#include <
jetbackground/CopyAndSubtractJets.h
>
12
#include <
jetbackground/DetermineTowerBackground.h
>
13
#include <
jetbackground/FastJetAlgoSub.h
>
14
#include <
jetbackground/RetowerCEMC.h
>
15
#include <
jetbackground/SubtractTowers.h
>
16
#include <
jetbackground/SubtractTowersCS.h
>
17
18
#include <
fun4all/Fun4AllServer.h
>
19
20
R__LOAD_LIBRARY(libjetbase.so)
21
R__LOAD_LIBRARY(libg4jets.so)
22
R__LOAD_LIBRARY(libjetbackground.so)
23
24
namespace Enable
25
{
26
bool
HIJETS
=
false
;
27
int
HIJETS_VERBOSITY
= 0;
28
}
// namespace Enable
29
30
namespace
G4HIJETS
31
{
32
bool
do_flow
=
false
;
33
bool
do_CS
=
false
;
34
}
// namespace G4HIJETS
35
36
void
HIJetReco
()
37
{
38
39
int
verbosity
= std::max(
Enable::VERBOSITY
,
Enable::HIJETS_VERBOSITY
);
40
41
//---------------
42
// Fun4All server
43
//---------------
44
45
Fun4AllServer
*se =
Fun4AllServer::instance
();
46
47
JetReco
*truthjetreco =
new
JetReco
();
48
TruthJetInput
*tji =
new
TruthJetInput
(
Jet::PARTICLE
);
49
tji->
add_embedding_flag
(0);
// changes depending on signal vs. embedded
50
truthjetreco->
add_input
(tji);
51
truthjetreco->
add_algo
(
new
FastJetAlgo
(
Jet::ANTIKT
, 0.2),
"AntiKt_Truth_r02"
);
52
truthjetreco->
add_algo
(
new
FastJetAlgo
(
Jet::ANTIKT
, 0.3),
"AntiKt_Truth_r03"
);
53
truthjetreco->
add_algo
(
new
FastJetAlgo
(
Jet::ANTIKT
, 0.4),
"AntiKt_Truth_r04"
);
54
truthjetreco->
add_algo
(
new
FastJetAlgo
(
Jet::ANTIKT
, 0.5),
"AntiKt_Truth_r05"
);
55
truthjetreco->
set_algo_node
(
"ANTIKT"
);
56
truthjetreco->
set_input_node
(
"TRUTH"
);
57
truthjetreco->
Verbosity
(verbosity);
58
se->
registerSubsystem
(truthjetreco);
59
60
61
62
RetowerCEMC
*rcemc =
new
RetowerCEMC
();
63
rcemc->
Verbosity
(verbosity);
64
rcemc->
set_towerinfo
(
true
);
65
se->
registerSubsystem
(rcemc);
66
67
JetReco
*towerjetreco =
new
JetReco
();
68
towerjetreco->
add_input
(
new
TowerJetInput
(
Jet::CEMC_TOWERINFO_RETOWER
));
69
towerjetreco->
add_input
(
new
TowerJetInput
(
Jet::HCALIN_TOWERINFO
));
70
towerjetreco->
add_input
(
new
TowerJetInput
(
Jet::HCALOUT_TOWERINFO
));
71
towerjetreco->
add_algo
(
new
FastJetAlgo
(
Jet::ANTIKT
, 0.2),
"AntiKt_TowerInfo_HIRecoSeedsRaw_r02"
);
72
towerjetreco->
set_algo_node
(
"ANTIKT"
);
73
towerjetreco->
set_input_node
(
"TOWER"
);
74
towerjetreco->
Verbosity
(verbosity);
75
se->
registerSubsystem
(towerjetreco);
76
77
DetermineTowerBackground
*dtb =
new
DetermineTowerBackground
();
78
dtb->
SetBackgroundOutputName
(
"TowerInfoBackground_Sub1"
);
79
dtb->
SetFlow
(
G4HIJETS::do_flow
);
80
dtb->
SetSeedType
(0);
81
dtb->
SetSeedJetD
(3);
82
dtb->
set_towerinfo
(
true
);
83
dtb->
Verbosity
(verbosity);
84
se->
registerSubsystem
(dtb);
85
86
87
CopyAndSubtractJets
*casj =
new
CopyAndSubtractJets
();
88
casj->
SetFlowModulation
(
G4HIJETS::do_flow
);
89
casj->
Verbosity
(verbosity);
90
casj->
set_towerinfo
(
true
);
91
se->
registerSubsystem
(casj);
92
93
94
DetermineTowerBackground
*dtb2 =
new
DetermineTowerBackground
();
95
dtb2->
SetBackgroundOutputName
(
"TowerInfoBackground_Sub2"
);
96
dtb2->
SetFlow
(
G4HIJETS::do_flow
);
97
dtb2->
SetSeedType
(1);
98
dtb2->
SetSeedJetPt
(7);
99
dtb2->
Verbosity
(verbosity);
100
dtb2->
set_towerinfo
(
true
);
101
se->
registerSubsystem
(dtb2);
102
103
104
SubtractTowers
*st =
new
SubtractTowers
();
105
st->
SetFlowModulation
(
G4HIJETS::do_flow
);
106
st->
Verbosity
(verbosity);
107
st->
set_towerinfo
(
true
);
108
se->
registerSubsystem
(st);
109
110
towerjetreco =
new
JetReco
();
111
towerjetreco->
add_input
(
new
TowerJetInput
(
Jet::CEMC_TOWERINFO_SUB1
));
112
towerjetreco->
add_input
(
new
TowerJetInput
(
Jet::HCALIN_TOWERINFO_SUB1
));
113
towerjetreco->
add_input
(
new
TowerJetInput
(
Jet::HCALOUT_TOWERINFO_SUB1
));
114
towerjetreco->
add_algo
(
new
FastJetAlgoSub
(
Jet::ANTIKT
, 0.2, verbosity),
"AntiKt_Tower_r02_Sub1"
);
115
towerjetreco->
add_algo
(
new
FastJetAlgoSub
(
Jet::ANTIKT
, 0.3, verbosity),
"AntiKt_Tower_r03_Sub1"
);
116
towerjetreco->
add_algo
(
new
FastJetAlgoSub
(
Jet::ANTIKT
, 0.4, verbosity),
"AntiKt_Tower_r04_Sub1"
);
117
towerjetreco->
add_algo
(
new
FastJetAlgoSub
(
Jet::ANTIKT
, 0.5, verbosity),
"AntiKt_Tower_r05_Sub1"
);
118
towerjetreco->
set_algo_node
(
"ANTIKT"
);
119
towerjetreco->
set_input_node
(
"TOWER"
);
120
towerjetreco->
Verbosity
(verbosity);
121
se->
registerSubsystem
(towerjetreco);
122
123
if
(
G4HIJETS::do_CS
)
124
{
125
SubtractTowersCS
*stCS =
new
SubtractTowersCS
();
126
stCS->
SetFlowModulation
(
G4HIJETS::do_flow
);
127
stCS->
SetAlpha
(1);
128
stCS->
SetDeltaRmax
(0.3);
129
stCS->
Verbosity
(verbosity);
130
se->
registerSubsystem
(stCS);
131
132
JetReco
*towerjetrecoCS =
new
JetReco
();
133
towerjetrecoCS->
add_input
(
new
TowerJetInput
(
Jet::CEMC_TOWER_SUB1CS
));
134
towerjetrecoCS->
add_input
(
new
TowerJetInput
(
Jet::HCALIN_TOWER_SUB1CS
));
135
towerjetrecoCS->
add_input
(
new
TowerJetInput
(
Jet::HCALOUT_TOWER_SUB1CS
));
136
// note that CS can use the regular FastJetAlgo without extra modifications for negative-E inputs
137
towerjetrecoCS->
add_algo
(
new
FastJetAlgo
(
Jet::ANTIKT
, 0.2, verbosity),
"AntiKt_Tower_r02_Sub1CS"
);
138
towerjetrecoCS->
add_algo
(
new
FastJetAlgo
(
Jet::ANTIKT
, 0.3, verbosity),
"AntiKt_Tower_r03_Sub1CS"
);
139
towerjetrecoCS->
add_algo
(
new
FastJetAlgo
(
Jet::ANTIKT
, 0.4, verbosity),
"AntiKt_Tower_r04_Sub1CS"
);
140
towerjetrecoCS->
add_algo
(
new
FastJetAlgo
(
Jet::ANTIKT
, 0.5, verbosity),
"AntiKt_Tower_r05_Sub1CS"
);
141
towerjetrecoCS->
set_algo_node
(
"ANTIKT"
);
142
towerjetrecoCS->
set_input_node
(
"TOWER"
);
143
towerjetrecoCS->
Verbosity
(verbosity);
144
se->
registerSubsystem
(towerjetrecoCS);
145
}
146
147
return
;
148
}
149
#endif
macros
blob
master
common
G4_HIJetReco.C
Built by
Jin Huang
. updated:
Sat Feb 17 2024 22:17:48
using
1.8.2 with
sPHENIX GitHub integration