EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
G4_FwdJets.C
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file G4_FwdJets.C
1 #ifndef MACRO_G4FWDJETS_C
2 #define MACRO_G4FWDJETS_C
3 
4 // #include <GlobalVariables.C>
5 
7 #include <g4jets/FastJetAlgo.h>
8 #include <g4jets/JetReco.h>
9 #include <g4jets/TowerJetInput.h>
10 #include <g4jets/TruthJetInput.h>
11 #include <g4jets/TrackJetInput.h>
12 
13 #include <g4eval/JetEvaluator.h>
14 
15 #include <fun4all/Fun4AllServer.h>
16 
17 R__LOAD_LIBRARY(libg4jets.so)
18 R__LOAD_LIBRARY(libg4eval.so)
19 
20 namespace Enable
21 {
22  bool FWDJETS = false;
23  bool FWDJETS_EVAL = false;
25 } // namespace Enable
26 
27 void Jet_FwdRecoInit() {}
28 
30 {
32 
34 
35  // truth particle level jets
36  JetReco *truthjetreco = new JetReco("TRUTHJETRECO");
37  truthjetreco->add_input(new TruthJetInput(Jet::PARTICLE));
38  truthjetreco->add_algo(new FastJetAlgo(Jet::ANTIKT, 0.5), "AntiKt_Truth_r05");
39  truthjetreco->add_algo(new FastJetAlgo(Jet::ANTIKT, 0.7), "AntiKt_Truth_r07");
40  truthjetreco->add_algo(new FastJetAlgo(Jet::ANTIKT, 1.0), "AntiKt_Truth_r10");
41  truthjetreco->set_algo_node("ANTIKT");
42  truthjetreco->set_input_node("TRUTH");
43  truthjetreco->Verbosity(verbosity);
44  se->registerSubsystem(truthjetreco);
45 
46  // tower jets
47  JetReco *towerjetreco = new JetReco("TOWERJETRECO");
48  towerjetreco->add_input(new TowerJetInput(Jet::FEMC_TOWER));
49  towerjetreco->add_input(new TowerJetInput(Jet::FHCAL_TOWER));
50  towerjetreco->add_input(new TowerJetInput(Jet::CEMC_TOWER));
51  towerjetreco->add_input(new TowerJetInput(Jet::HCALIN_TOWER));
52  towerjetreco->add_input(new TowerJetInput(Jet::HCALOUT_TOWER));
53  towerjetreco->add_algo(new FastJetAlgo(Jet::ANTIKT, 0.5), "AntiKt_Tower_r05");
54  towerjetreco->add_algo(new FastJetAlgo(Jet::ANTIKT, 0.7), "AntiKt_Tower_r07");
55  towerjetreco->add_algo(new FastJetAlgo(Jet::ANTIKT, 1.0), "AntiKt_Tower_r10");
56  towerjetreco->set_algo_node("ANTIKT");
57  towerjetreco->set_input_node("TOWER");
58  towerjetreco->Verbosity(verbosity);
59  se->registerSubsystem(towerjetreco);
60 
61  // cluster jets
62  JetReco *clusterjetreco = new JetReco("CLUSTERJETRECO");
63  clusterjetreco->add_input(new ClusterJetInput(Jet::FEMC_CLUSTER));
64  clusterjetreco->add_input(new ClusterJetInput(Jet::FHCAL_CLUSTER));
65  clusterjetreco->add_input(new ClusterJetInput(Jet::HCALOUT_CLUSTER));
66  clusterjetreco->add_input(new ClusterJetInput(Jet::CEMC_CLUSTER));
67  clusterjetreco->add_input(new ClusterJetInput(Jet::HCALIN_CLUSTER));
68  clusterjetreco->add_input(new ClusterJetInput(Jet::HCALOUT_CLUSTER));
69  clusterjetreco->add_algo(new FastJetAlgo(Jet::ANTIKT, 0.5), "AntiKt_Cluster_r05");
70  clusterjetreco->add_algo(new FastJetAlgo(Jet::ANTIKT, 0.7), "AntiKt_Cluster_r07");
71  clusterjetreco->add_algo(new FastJetAlgo(Jet::ANTIKT, 1.0), "AntiKt_Cluster_r10");
72  clusterjetreco->set_algo_node("ANTIKT");
73  clusterjetreco->set_input_node("CLUSTER");
74  clusterjetreco->Verbosity(verbosity);
75  se->registerSubsystem(clusterjetreco);
76 
77  // tower jets
78  JetReco *towerjetrecofwd = new JetReco("TOWERJETRECOFWD");
79  towerjetrecofwd->add_input(new TowerJetInput(Jet::FEMC_TOWER));
80  towerjetrecofwd->add_input(new TowerJetInput(Jet::FHCAL_TOWER));
81  towerjetrecofwd->add_algo(new FastJetAlgo(Jet::ANTIKT, 0.5), "AntiKt_TowerFwd_r05");
82  towerjetrecofwd->add_algo(new FastJetAlgo(Jet::ANTIKT, 0.7), "AntiKt_TowerFwd_r07");
83  towerjetrecofwd->add_algo(new FastJetAlgo(Jet::ANTIKT, 1.0), "AntiKt_TowerFwd_r10");
84  towerjetrecofwd->set_algo_node("ANTIKT");
85  towerjetrecofwd->set_input_node("TOWER");
86  towerjetrecofwd->Verbosity(verbosity);
87  se->registerSubsystem(towerjetrecofwd);
88 
89  // cluster jets
90  JetReco *clusterjetrecofwd = new JetReco("CLUSTERJETRECOFWD");
91  clusterjetrecofwd->add_input(new ClusterJetInput(Jet::FEMC_CLUSTER));
92  clusterjetrecofwd->add_input(new ClusterJetInput(Jet::FHCAL_CLUSTER));
93  clusterjetrecofwd->add_algo(new FastJetAlgo(Jet::ANTIKT, 0.5), "AntiKt_ClusterFwd_r05");
94  clusterjetrecofwd->add_algo(new FastJetAlgo(Jet::ANTIKT, 0.7), "AntiKt_ClusterFwd_r07");
95  clusterjetrecofwd->add_algo(new FastJetAlgo(Jet::ANTIKT, 1.0), "AntiKt_ClusterFwd_r10");
96  clusterjetrecofwd->set_algo_node("ANTIKT");
97  clusterjetrecofwd->set_input_node("CLUSTER");
98  clusterjetrecofwd->Verbosity(verbosity);
99  se->registerSubsystem(clusterjetrecofwd);
100 
101 
102  // // track jets
103  JetReco *trackjetreco = new JetReco("TRACKJETRECO");
105  trackjetreco->add_algo(new FastJetAlgo(Jet::ANTIKT, 0.5), "AntiKt_Track_r05");
106  trackjetreco->add_algo(new FastJetAlgo(Jet::ANTIKT, 0.7), "AntiKt_Track_r07");
107  trackjetreco->add_algo(new FastJetAlgo(Jet::ANTIKT, 1.0), "AntiKt_Track_r10");
108  trackjetreco->set_algo_node("ANTIKT");
109  trackjetreco->set_input_node("TRACK");
110  trackjetreco->Verbosity(verbosity);
111  se->registerSubsystem(trackjetreco);
112 
113  // // track jets
114  JetReco *fulljetreco = new JetReco("FULLJETRECO");
116  fulljetreco->add_input(new ClusterJetInput(Jet::FEMC_CLUSTER));
117  fulljetreco->add_algo(new FastJetAlgo(Jet::ANTIKT, 0.5), "AntiKt_Full_r05");
118  fulljetreco->add_algo(new FastJetAlgo(Jet::ANTIKT, 0.7), "AntiKt_Full_r07");
119  fulljetreco->add_algo(new FastJetAlgo(Jet::ANTIKT, 0.8), "AntiKt_Full_r08");
120  fulljetreco->set_algo_node("ANTIKT");
121  fulljetreco->set_input_node("FULL");
122  fulljetreco->Verbosity(verbosity);
123  se->registerSubsystem(fulljetreco);
124 
125 
126  return;
127 }
128 
129 void Jet_FwdEval(const std::string &outfilename = "g4fwdjets_eval.root")
130 {
133 
134  JetEvaluator *evaltrk05 = new JetEvaluator("JETEVALUATORTRACK05","AntiKt_Track_r05",
135  "AntiKt_Truth_r05", "g4fwdjets_track_05_eval.root");
136  evaltrk05->Verbosity(verbosity);
137  se->registerSubsystem(evaltrk05);
138 
139  JetEvaluator *evalfull05 = new JetEvaluator("JETEVALUATORFULL05","AntiKt_Full_r05",
140  "AntiKt_Truth_r05", "g4fwdjets_full_05_eval.root");
141  evalfull05->Verbosity(verbosity);
142  se->registerSubsystem(evalfull05);
143 
144  JetEvaluator *evalt05 = new JetEvaluator("JETEVALUATORTOWER05","AntiKt_Tower_r05",
145  "AntiKt_Truth_r05", "g4fwdjets_tower_05_eval.root");
146  evalt05->Verbosity(verbosity);
147  se->registerSubsystem(evalt05);
148  JetEvaluator *evalt07 = new JetEvaluator("JETEVALUATORTOWER07","AntiKt_Tower_r07",
149  "AntiKt_Truth_r07", "g4fwdjets_tower_07_eval.root");
150  evalt07->Verbosity(verbosity);
151  se->registerSubsystem(evalt07);
152  JetEvaluator *evalt10 = new JetEvaluator("JETEVALUATORTOWER10","AntiKt_Tower_r10",
153  "AntiKt_Truth_r10", "g4fwdjets_tower_10_eval.root");
154  evalt10->Verbosity(verbosity);
155  se->registerSubsystem(evalt10);
156 
157  JetEvaluator *evalc05 = new JetEvaluator("JETEVALUATORCLUSTER05", "AntiKt_Cluster_r05",
158  "AntiKt_Truth_r05", "g4fwdjets_cluster_05_eval.root");
159  evalc05->Verbosity(verbosity);
160  se->registerSubsystem(evalc05);
161 
162  JetEvaluator *evalc07 = new JetEvaluator("JETEVALUATORCLUSTER07", "AntiKt_Cluster_r07",
163  "AntiKt_Truth_r07", "g4fwdjets_cluster_07_eval.root");
164  evalc07->Verbosity(verbosity);
165  se->registerSubsystem(evalc07);
166 
167  JetEvaluator *evalc10 = new JetEvaluator("JETEVALUATORCLUSTER10", "AntiKt_Cluster_r10",
168  "AntiKt_Truth_r10", "g4fwdjets_cluster_10_eval.root");
169  evalc10->Verbosity(verbosity);
170  se->registerSubsystem(evalc10);
171 
172  JetEvaluator *evaltfwd05 = new JetEvaluator("JETEVALUATORFWDTOWER05","AntiKt_TowerFwd_r05",
173  "AntiKt_Truth_r05", "g4fwdjets_TowerFwd_05_eval.root");
174  evaltfwd05->Verbosity(verbosity);
175  se->registerSubsystem(evaltfwd05);
176  JetEvaluator *evaltfwd07 = new JetEvaluator("JETEVALUATORFWDTOWER07","AntiKt_TowerFwd_r07",
177  "AntiKt_Truth_r07", "g4fwdjets_TowerFwd_07_eval.root");
178  evaltfwd07->Verbosity(verbosity);
179  se->registerSubsystem(evaltfwd07);
180  JetEvaluator *evaltfwd10 = new JetEvaluator("JETEVALUATORFWDTOWER10","AntiKt_TowerFwd_r10",
181  "AntiKt_Truth_r10", "g4fwdjets_TowerFwd_10_eval.root");
182  evaltfwd10->Verbosity(verbosity);
183  se->registerSubsystem(evaltfwd10);
184 
185  JetEvaluator *evalcfwd05 = new JetEvaluator("JETEVALUATORFWDCLUSTER05", "AntiKt_ClusterFwd_r05",
186  "AntiKt_Truth_r05", "g4fwdjets_ClusterFwd_05_eval.root");
187  evalcfwd05->Verbosity(verbosity);
188  se->registerSubsystem(evalcfwd05);
189 
190  JetEvaluator *evalcfwd07 = new JetEvaluator("JETEVALUATORFWDCLUSTER07", "AntiKt_ClusterFwd_r07",
191  "AntiKt_Truth_r07", "g4fwdjets_ClusterFwd_07_eval.root");
192  evalcfwd07->Verbosity(verbosity);
193  se->registerSubsystem(evalcfwd07);
194 
195  JetEvaluator *evalcfwd10 = new JetEvaluator("JETEVALUATORFWDCLUSTER10", "AntiKt_ClusterFwd_r10",
196  "AntiKt_Truth_r10", "g4fwdjets_ClusterFwd_10_eval.root");
197  evalcfwd10->Verbosity(verbosity);
198  se->registerSubsystem(evalcfwd10);
199 
200  // JetEvaluator *eval3 = new JetEvaluator("JETEVALUATOR3",
201  // "AntiKt_Full_r07",
202  // "AntiKt_Truth_r07",
203  // "g4fwdjets_full_07_eval.root");
204  // eval3->Verbosity(verbosity);
205  // se->registerSubsystem(eval3);
206 
207  return;
208 }
209 #endif