Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Fun4All_testEtIso_Hijing.C
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file Fun4All_testEtIso_Hijing.C
1 #pragma once
2 #if ROOT_VERSION_CODE >= ROOT_VERSION(6,00,0)
3 #include <fun4all/SubsysReco.h>
7 
10 #include <fun4all/Fun4AllServer.h>
11 
12 #include <phool/PHRandomSeed.h>
13 #include <phool/recoConsts.h>
14 
15 #include <g4jets/FastJetAlgo.h>
16 #include <g4jets/JetReco.h>
17 #include <g4jets/TowerJetInput.h>
18 #include <g4jets/TruthJetInput.h>
19 
26 
27 #include <ClusterIso.h>
28 
29 #include <isocluster/isoCluster.h>
30 
31 R__LOAD_LIBRARY(libfun4all.so)
32 R__LOAD_LIBRARY(libisoCluster.so)
33 R__LOAD_LIBRARY(libg4jets.so)
34 R__LOAD_LIBRARY(libjetbackground.so)
35 R__LOAD_LIBRARY(libclusteriso.so)
36 
37 namespace Enable
38 {
39  bool HIJETS = false;
40  int HIJETS_VERBOSITY = 1;
41 } // namespace Enable
42 
43 namespace G4HIJETS
44 {
45  bool do_flow = true;
46  bool do_CS = false;
47 } // namespace G4HIJETS
48 #endif
49 
50 
52  int nEvents = 1,
53  const char *filelist1 = "dst_calo_cluster_run62_10GeVpythia.list",
54  const char *filelist2 = "dst_truth_run62_10GeVpythia.list",
55  const string outname = "test.root")
56 {
57 
58 
59 
61  int verbosity = 0;
62 
63  se->Verbosity(verbosity);
65  //rc->set_IntFlag("RUNNUMBER",62);
66 
67 
68  RetowerCEMC *rcemc = new RetowerCEMC();
69  //rcemc->SetEnergyDistribution(1);
70  se->registerSubsystem(rcemc);
71 
72  //seeds
73  JetReco *towerjetreco = new JetReco();
75  towerjetreco->add_input(new TowerJetInput(Jet::HCALIN_TOWER));
76  towerjetreco->add_input(new TowerJetInput(Jet::HCALOUT_TOWER));
77  towerjetreco->add_algo(new FastJetAlgo(Jet::ANTIKT, 0.2), "AntiKt_Tower_HIRecoSeedsRaw_r02");
78  towerjetreco->set_algo_node("ANTIKT");
79  towerjetreco->set_input_node("TOWER");
80 
81  se->registerSubsystem(towerjetreco);
82 
83  //first UE subtraction pass
85  dtb->SetBackgroundOutputName("TowerBackground_Sub1");
87  dtb->SetSeedType(0);
88  dtb->SetSeedJetD(3);
89 
90  se->registerSubsystem(dtb);
91 
94  casj->Verbosity(verbosity);
95  se->registerSubsystem(casj);
96 
98  dtb2->SetBackgroundOutputName("TowerBackground_Sub2");
100  dtb2->SetSeedType(1);
101  dtb2->SetSeedJetPt(7);
102  dtb2->Verbosity(verbosity);
103  se->registerSubsystem(dtb2);
104 
105  //subtract UE from towers
106  SubtractTowers *st = new SubtractTowers();
108  st->Verbosity(verbosity);
109  se->registerSubsystem(st);
110 
111  //I think this goes here?
112  ClusterIso *makeClusterEt = new ClusterIso("isoCluster",0,3,1,1);
114 
115  //substract UE from jets
116  /*CopyAndSubtractJets *casj = new CopyAndSubtractJets();
117  casj->SetFlowModulation(G4HIJETS::do_flow);
118 
119  se->registerSubsystem(casj);
120 
121  //second pass of UE subtraction
122  DetermineTowerBackground *dtb2 = new DetermineTowerBackground();
123  dtb2->SetBackgroundOutputName("TowerBackground_Sub2");
124  dtb2->SetFlow(G4HIJETS::do_flow);
125  dtb2->SetSeedType(1);
126  dtb2->SetSeedJetPt(7);
127 
128  se->registerSubsystem(dtb2);*/
129 
130  //now we build our regular jets. Not used for eT analysis right now
131  //but could add in function easily.
132  /*towerjetreco = new JetReco();
133  towerjetreco->add_input(new TowerJetInput(Jet::CEMC_TOWER_SUB1));
134  towerjetreco->add_input(new TowerJetInput(Jet::HCALIN_TOWER_SUB1));
135  towerjetreco->add_input(new TowerJetInput(Jet::HCALOUT_TOWER_SUB1));
136  towerjetreco->add_algo(new FastJetAlgoSub(Jet::ANTIKT, 0.2, 1), "AntiKt_Tower_r02_Sub1");
137  towerjetreco->add_algo(new FastJetAlgoSub(Jet::ANTIKT, 0.3, 1), "AntiKt_Tower_r03_Sub1");
138  towerjetreco->add_algo(new FastJetAlgoSub(Jet::ANTIKT, 0.4, 1), "AntiKt_Tower_r04_Sub1");
139  towerjetreco->add_algo(new FastJetAlgoSub(Jet::ANTIKT, 0.5, 1), "AntiKt_Tower_r05_Sub1");
140  towerjetreco->set_algo_node("ANTIKT");
141  towerjetreco->set_input_node("TOWER");
142  towerjetreco->Verbosity(verbosity);
143  se->registerSubsystem(towerjetreco);*/
144 
145 
146 
148  in->AddListFile(filelist1,1);
149  se->registerInputManager(in);
150 
151  Fun4AllInputManager *in2 = new Fun4AllDstInputManager("DSTTruth");
152  in2 -> AddListFile(filelist2,1);
153  se -> registerInputManager(in2);
154 
155  isoCluster *eval = new isoCluster(outname.c_str());
156  eval -> setGenEvent(0);
157  se -> registerSubsystem(eval);
158 
159  se -> run(nEvents);
160  se -> End();
161 
162 
163 
164 
165 
166 
167 }