ECCE @ 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::EEMC_TOWER));
49  towerjetreco->add_input(new TowerJetInput(Jet::FEMC_TOWER));
50  towerjetreco->add_input(new TowerJetInput(Jet::FHCAL_TOWER));
51  towerjetreco->add_input(new TowerJetInput(Jet::CEMC_TOWER));
52  towerjetreco->add_input(new TowerJetInput(Jet::HCALIN_TOWER));
53  towerjetreco->add_input(new TowerJetInput(Jet::HCALOUT_TOWER));
54  towerjetreco->add_algo(new FastJetAlgo(Jet::ANTIKT, 0.5), "AntiKt_Tower_r05");
55  towerjetreco->add_algo(new FastJetAlgo(Jet::ANTIKT, 0.7), "AntiKt_Tower_r07");
56  towerjetreco->add_algo(new FastJetAlgo(Jet::ANTIKT, 1.0), "AntiKt_Tower_r10");
57  towerjetreco->set_algo_node("ANTIKT");
58  towerjetreco->set_input_node("TOWER");
59  towerjetreco->Verbosity(verbosity);
60  se->registerSubsystem(towerjetreco);
61 
62  // cluster jets
63  JetReco *clusterjetreco = new JetReco("CLUSTERJETRECO");
64  clusterjetreco->add_input(new ClusterJetInput(Jet::FEMC_CLUSTER));
65  clusterjetreco->add_input(new ClusterJetInput(Jet::EEMC_CLUSTER));
66  clusterjetreco->add_input(new ClusterJetInput(Jet::FHCAL_CLUSTER));
67  clusterjetreco->add_input(new ClusterJetInput(Jet::HCALOUT_CLUSTER));
68  clusterjetreco->add_input(new ClusterJetInput(Jet::CEMC_CLUSTER));
69  clusterjetreco->add_input(new ClusterJetInput(Jet::HCALIN_CLUSTER));
70  clusterjetreco->add_input(new ClusterJetInput(Jet::HCALOUT_CLUSTER));
71  clusterjetreco->add_algo(new FastJetAlgo(Jet::ANTIKT, 0.5), "AntiKt_Cluster_r05");
72  clusterjetreco->add_algo(new FastJetAlgo(Jet::ANTIKT, 0.7), "AntiKt_Cluster_r07");
73  clusterjetreco->add_algo(new FastJetAlgo(Jet::ANTIKT, 1.0), "AntiKt_Cluster_r10");
74  clusterjetreco->set_algo_node("ANTIKT");
75  clusterjetreco->set_input_node("CLUSTER");
76  clusterjetreco->Verbosity(verbosity);
77  se->registerSubsystem(clusterjetreco);
78 
79  // tower jets
80  JetReco *towerjetrecofwd = new JetReco("TOWERJETRECOFWD");
81  towerjetrecofwd->add_input(new TowerJetInput(Jet::FEMC_TOWER));
82  towerjetrecofwd->add_input(new TowerJetInput(Jet::FHCAL_TOWER));
83  towerjetrecofwd->add_algo(new FastJetAlgo(Jet::ANTIKT, 0.5), "AntiKt_TowerFwd_r05");
84  towerjetrecofwd->add_algo(new FastJetAlgo(Jet::ANTIKT, 0.7), "AntiKt_TowerFwd_r07");
85  towerjetrecofwd->add_algo(new FastJetAlgo(Jet::ANTIKT, 1.0), "AntiKt_TowerFwd_r10");
86  towerjetrecofwd->set_algo_node("ANTIKT");
87  towerjetrecofwd->set_input_node("TOWER");
88  towerjetrecofwd->Verbosity(verbosity);
89  se->registerSubsystem(towerjetrecofwd);
90 
91  // cluster jets
92  JetReco *clusterjetrecofwd = new JetReco("CLUSTERJETRECOFWD");
93  clusterjetrecofwd->add_input(new ClusterJetInput(Jet::FEMC_CLUSTER));
94  clusterjetrecofwd->add_input(new ClusterJetInput(Jet::FHCAL_CLUSTER));
95  clusterjetrecofwd->add_algo(new FastJetAlgo(Jet::ANTIKT, 0.5), "AntiKt_ClusterFwd_r05");
96  clusterjetrecofwd->add_algo(new FastJetAlgo(Jet::ANTIKT, 0.7), "AntiKt_ClusterFwd_r07");
97  clusterjetrecofwd->add_algo(new FastJetAlgo(Jet::ANTIKT, 1.0), "AntiKt_ClusterFwd_r10");
98  clusterjetrecofwd->set_algo_node("ANTIKT");
99  clusterjetrecofwd->set_input_node("CLUSTER");
100  clusterjetrecofwd->Verbosity(verbosity);
101  se->registerSubsystem(clusterjetrecofwd);
102 
103 
104  // // track jets
105  JetReco *trackjetreco = new JetReco("TRACKJETRECO");
107  trackjetreco->add_algo(new FastJetAlgo(Jet::ANTIKT, 0.5), "AntiKt_Track_r05");
108  trackjetreco->add_algo(new FastJetAlgo(Jet::ANTIKT, 0.7), "AntiKt_Track_r07");
109  trackjetreco->add_algo(new FastJetAlgo(Jet::ANTIKT, 1.0), "AntiKt_Track_r10");
110  trackjetreco->set_algo_node("ANTIKT");
111  trackjetreco->set_input_node("TRACK");
112  trackjetreco->Verbosity(verbosity);
113  se->registerSubsystem(trackjetreco);
114 
115  // // track jets
116  JetReco *fulljetreco = new JetReco("FULLJETRECO");
118  fulljetreco->add_input(new ClusterJetInput(Jet::FEMC_CLUSTER));
119  fulljetreco->add_algo(new FastJetAlgo(Jet::ANTIKT, 0.5), "AntiKt_Full_r05");
120  fulljetreco->add_algo(new FastJetAlgo(Jet::ANTIKT, 0.7), "AntiKt_Full_r07");
121  fulljetreco->add_algo(new FastJetAlgo(Jet::ANTIKT, 0.8), "AntiKt_Full_r08");
122  fulljetreco->set_algo_node("ANTIKT");
123  fulljetreco->set_input_node("FULL");
124  fulljetreco->Verbosity(verbosity);
125  se->registerSubsystem(fulljetreco);
126 
127 
128  return;
129 }
130 
131 void Jet_FwdEval(const std::string &outfilepath = ".", const std::string &prepend = "")
132 {
135 
136  JetEvaluator *evaltrk05 = new JetEvaluator("JETEVALUATORTRACK05","AntiKt_Track_r05",
137  "AntiKt_Truth_r05", outfilepath + "/" + prepend + "g4fwdjets_track_05_eval.root");
138  evaltrk05->Verbosity(verbosity);
139  se->registerSubsystem(evaltrk05);
140 
141  JetEvaluator *evalfull05 = new JetEvaluator("JETEVALUATORFULL05","AntiKt_Full_r05",
142  "AntiKt_Truth_r05", outfilepath + "/" + prepend + "g4fwdjets_full_05_eval.root");
143  evalfull05->Verbosity(verbosity);
144  se->registerSubsystem(evalfull05);
145 
146  JetEvaluator *evalt05 = new JetEvaluator("JETEVALUATORTOWER05","AntiKt_Tower_r05",
147  "AntiKt_Truth_r05", outfilepath + "/" + prepend + "g4fwdjets_tower_05_eval.root");
148  evalt05->Verbosity(verbosity);
149  se->registerSubsystem(evalt05);
150  JetEvaluator *evalt07 = new JetEvaluator("JETEVALUATORTOWER07","AntiKt_Tower_r07",
151  "AntiKt_Truth_r07", outfilepath + "/" + prepend + "g4fwdjets_tower_07_eval.root");
152  evalt07->Verbosity(verbosity);
153  se->registerSubsystem(evalt07);
154  JetEvaluator *evalt10 = new JetEvaluator("JETEVALUATORTOWER10","AntiKt_Tower_r10",
155  "AntiKt_Truth_r10", outfilepath + "/" + prepend + "g4fwdjets_tower_10_eval.root");
156  evalt10->Verbosity(verbosity);
157  se->registerSubsystem(evalt10);
158 
159  JetEvaluator *evalc05 = new JetEvaluator("JETEVALUATORCLUSTER05", "AntiKt_Cluster_r05",
160  "AntiKt_Truth_r05", outfilepath + "/" + prepend + "g4fwdjets_cluster_05_eval.root");
161  evalc05->Verbosity(verbosity);
162  se->registerSubsystem(evalc05);
163 
164  JetEvaluator *evalc07 = new JetEvaluator("JETEVALUATORCLUSTER07", "AntiKt_Cluster_r07",
165  "AntiKt_Truth_r07", outfilepath + "/" + prepend + "g4fwdjets_cluster_07_eval.root");
166  evalc07->Verbosity(verbosity);
167  se->registerSubsystem(evalc07);
168 
169  JetEvaluator *evalc10 = new JetEvaluator("JETEVALUATORCLUSTER10", "AntiKt_Cluster_r10",
170  "AntiKt_Truth_r10", outfilepath + "/" + prepend + "g4fwdjets_cluster_10_eval.root");
171  evalc10->Verbosity(verbosity);
172  se->registerSubsystem(evalc10);
173 
174 // JetEvaluator *evaltfwd05 = new JetEvaluator("JETEVALUATORFWDTOWER05","AntiKt_TowerFwd_r05",
175 // "AntiKt_Truth_r05", outfilepath + "/" + prepend + "g4fwdjets_TowerFwd_05_eval.root");
176 // evaltfwd05->Verbosity(verbosity);
177 // se->registerSubsystem(evaltfwd05);
178 // JetEvaluator *evaltfwd07 = new JetEvaluator("JETEVALUATORFWDTOWER07","AntiKt_TowerFwd_r07",
179 // "AntiKt_Truth_r07", outfilepath + "/" + prepend + "g4fwdjets_TowerFwd_07_eval.root");
180 // evaltfwd07->Verbosity(verbosity);
181 // se->registerSubsystem(evaltfwd07);
182 // JetEvaluator *evaltfwd10 = new JetEvaluator("JETEVALUATORFWDTOWER10","AntiKt_TowerFwd_r10",
183 // "AntiKt_Truth_r10", outfilepath + "/" + prepend + "g4fwdjets_TowerFwd_10_eval.root");
184 // evaltfwd10->Verbosity(verbosity);
185 // se->registerSubsystem(evaltfwd10);
186 //
187 // JetEvaluator *evalcfwd05 = new JetEvaluator("JETEVALUATORFWDCLUSTER05", "AntiKt_ClusterFwd_r05",
188 // "AntiKt_Truth_r05", outfilepath + "/" + prepend + "g4fwdjets_ClusterFwd_05_eval.root");
189 // evalcfwd05->Verbosity(verbosity);
190 // se->registerSubsystem(evalcfwd05);
191 //
192 // JetEvaluator *evalcfwd07 = new JetEvaluator("JETEVALUATORFWDCLUSTER07", "AntiKt_ClusterFwd_r07",
193 // "AntiKt_Truth_r07", outfilepath + "/" + prepend + "g4fwdjets_ClusterFwd_07_eval.root");
194 // evalcfwd07->Verbosity(verbosity);
195 // se->registerSubsystem(evalcfwd07);
196 //
197 // JetEvaluator *evalcfwd10 = new JetEvaluator("JETEVALUATORFWDCLUSTER10", "AntiKt_ClusterFwd_r10",
198 // "AntiKt_Truth_r10", outfilepath + "/" + prepend + "g4fwdjets_ClusterFwd_10_eval.root");
199 // evalcfwd10->Verbosity(verbosity);
200 // se->registerSubsystem(evalcfwd10);
201 
202  // JetEvaluator *eval3 = new JetEvaluator("JETEVALUATOR3",
203  // "AntiKt_Full_r07",
204  // "AntiKt_Truth_r07",
205  // "g4fwdjets_full_07_eval.root");
206  // eval3->Verbosity(verbosity);
207  // se->registerSubsystem(eval3);
208 
209  return;
210 }
211 #endif