Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Fun4All_JetVal.C
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file Fun4All_JetVal.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 
21 
22 
23 
30 #include </sphenix/u/damian0227/analysis/JS-Jet/JetAnalysis/src/JetKinematicCheck.h>
31 
32 R__LOAD_LIBRARY(libfun4all.so)
33 R__LOAD_LIBRARY(libg4jets.so)
34 R__LOAD_LIBRARY(libjetbackground.so)
35 R__LOAD_LIBRARY(libg4centrality.so)
36 R__LOAD_LIBRARY(libg4dst.so)
37 R__LOAD_LIBRARY(/sphenix/u/damian0227/install/lib/libJetKinematicCheck.so)
38 
39 namespace Enable
40 {
41  bool HIJETS = true;
42  int HIJETS_VERBOSITY = 1;
43 } // namespace Enable
44 
45 namespace G4HIJETS
46 {
47  bool do_flow = true;
48  bool do_CS = false;
49 } // namespace G4HIJETS
50 #endif
51 
52 
54  const char *filelistcalo = "/sphenix/u/damian0227/analysis/JS-Jet/JetAnalysis/macro/dst_calo_cluster.list",
55  const char *hits_mbd = "/sphenix/u/damian0227/analysis/JS-Jet/JetAnalysis/macro/dst_bbc_g4hit.list",
56  const char *outname = "output.root")
57 {
58 
59 
61  int verbosity = 0;
62 
63  se->Verbosity(verbosity);
65 
67  cent->Verbosity(0);
68  cent->GetCalibrationParameters().ReadFromFile("centrality", "xml", 0, 0, string(getenv("CALIBRATIONROOT")) + string("/Centrality/"));
69  se->registerSubsystem( cent );
70 
71  RetowerCEMC *rcemc = new RetowerCEMC();
72  rcemc->Verbosity(verbosity);
73  se->registerSubsystem(rcemc);
74 
75  JetReco *towerjetreco = new JetReco();
77  towerjetreco->add_input(new TowerJetInput(Jet::HCALIN_TOWER));
78  towerjetreco->add_input(new TowerJetInput(Jet::HCALOUT_TOWER));
79  towerjetreco->add_algo(new FastJetAlgo(Jet::ANTIKT, 0.2), "AntiKt_Tower_HIRecoSeedsRaw_r02");
80  towerjetreco->set_algo_node("ANTIKT");
81  towerjetreco->set_input_node("TOWER");
82  towerjetreco->Verbosity(verbosity);
83  se->registerSubsystem(towerjetreco);
84 
86  dtb->SetBackgroundOutputName("TowerBackground_Sub1");
88  dtb->SetSeedType(0);
89  dtb->SetSeedJetD(3);
90  dtb->Verbosity(verbosity);
91  se->registerSubsystem(dtb);
92 
95  casj->Verbosity(verbosity);
96  se->registerSubsystem(casj);
97 
99  dtb2->SetBackgroundOutputName("TowerBackground_Sub2");
100  dtb2->SetFlow(G4HIJETS::do_flow);
101  dtb2->SetSeedType(1);
102  dtb2->SetSeedJetPt(7);
103  dtb2->Verbosity(verbosity);
104  se->registerSubsystem(dtb2);
105 
106  SubtractTowers *st = new SubtractTowers();
108  st->Verbosity(verbosity);
109  se->registerSubsystem(st);
110 
111  towerjetreco = new JetReco();
112  towerjetreco->add_input(new TowerJetInput(Jet::CEMC_TOWER_SUB1));
113  towerjetreco->add_input(new TowerJetInput(Jet::HCALIN_TOWER_SUB1));
114  towerjetreco->add_input(new TowerJetInput(Jet::HCALOUT_TOWER_SUB1));
115  towerjetreco->add_algo(new FastJetAlgoSub(Jet::ANTIKT, 0.2, 1), "AntiKt_Tower_r02_Sub1");
116  towerjetreco->add_algo(new FastJetAlgoSub(Jet::ANTIKT, 0.3, 1), "AntiKt_Tower_r03_Sub1");
117  towerjetreco->add_algo(new FastJetAlgoSub(Jet::ANTIKT, 0.4, 1), "AntiKt_Tower_r04_Sub1");
118  towerjetreco->add_algo(new FastJetAlgoSub(Jet::ANTIKT, 0.5, 1), "AntiKt_Tower_r05_Sub1");
119  towerjetreco->set_algo_node("ANTIKT");
120  towerjetreco->set_input_node("TOWER");
121  towerjetreco->Verbosity(verbosity);
122  se->registerSubsystem(towerjetreco);
123 
124 
125  JetKinematicCheck *myJetKC = new JetKinematicCheck("AntiKt_Tower_r02_Sub1","AntiKt_Tower_r04_Sub1", outname);
126 
127  myJetKC->setPtRange(10, 100);
128  myJetKC->setEtaRange(-1.1, 1.1);
129  se->registerSubsystem(myJetKC);
130 
131  Fun4AllInputManager *intrue = new Fun4AllDstInputManager("DSTbbc");
132  intrue->AddListFile(hits_mbd,1);
133  se->registerInputManager(intrue);
134 
135  Fun4AllInputManager *in2 = new Fun4AllDstInputManager("DSTcalo");
136  in2->AddListFile(filelistcalo,1);
137  se->registerInputManager(in2);
138 
139 
140  se->run(-1);
141  se->End();
142 
143  gSystem->Exit(0);
144  return 0;
145 
146 }