Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Fun4All_RhoFluct.C
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file Fun4All_RhoFluct.C
1 #ifndef MACRO_FUN4ALLJETANA_C
2 #define MACRO_FUN4ALLJETANA_C
3 
7 #include <fun4all/SubsysReco.h>
9 #include <jetbase/FastJetAlgo.h>
10 #include <jetbase/JetReco.h>
11 #include <jetbase/TowerJetInput.h>
12 #include <g4jets/TruthJetInput.h>
13 /* #include <g4vertex/GlobalVertexReco.h> */
15 #include <fun4all/PHTFileServer.h>
17 #include <HIJetReco.C>
18 
19 // here you need your package name (set in configure.ac)
20 #include <fastjetmedianbkg/RhoFluct.h>
21 #include <fastjetmedianbkg/PrintTowers.h>
22 R__LOAD_LIBRARY(libfun4all.so)
23 R__LOAD_LIBRARY(libg4centrality.so)
24 R__LOAD_LIBRARY(libg4jets.so)
25 R__LOAD_LIBRARY(libjetbase.so)
26 R__LOAD_LIBRARY(libjetbackground.so)
27 R__LOAD_LIBRARY(libjetrhomedian.so)
28 R__LOAD_LIBRARY(libjetbackground.so)
29 /* R__LOAD_LIBRARY(libg4vertex.so) */
30 
32  const int nevnt = 10
33  , const float jet_R = 0.4
34  , const string& out_name = "test.root"
35  /* , const float min_lead_truth_pt = 30 */
36  , const string& list_calo_cluster=""
37  /* , const string& list_truth_jet="" */
38  , const string& list_bbc=""
39  , const string& list_global=""
40  /* , const string& list_truth_g4hit="" */
41  , const int verbosity=0
42  )
43 {
44  gSystem->Load("libjetrhomedian");
45  gSystem->Load("libg4dst");
46 
47  /* Enable::BBC = true; */
48 
50 
51  if (list_bbc!="") {
53  cent->Verbosity(0);
54  cent->GetCalibrationParameters().ReadFromFile("centrality", "xml", 0, 0, string(getenv("CALIBRATIONROOT")) + string("/Centrality/"));
55  se->registerSubsystem( cent );
56 
57  Fun4AllInputManager *inp_bbc = new Fun4AllDstInputManager("BBC_info");
58  inp_bbc->AddListFile(list_bbc);
59  se->registerInputManager(inp_bbc);
60  } else {
61  cout << " Fatal: missing bbc input file. Exiting." << endl;
62  gSystem->Exit(0);
63  }
64 
65  if (list_global!="") {
66  Fun4AllInputManager *inp_global = new Fun4AllDstInputManager("DSTglobal");
67  inp_global->AddListFile(list_global,1); // adding the option "1" confirms to use, even if file is large
68  se->registerInputManager(inp_global);
69  } else {
70  cout << " Fatal: missing global dst list file. Exiting." << endl;
71  gSystem->Exit(0);
72  }
73 
74  // add the CEMC retowering
75  RetowerCEMC *rcemc = new RetowerCEMC();
76  /* rcemc->Verbosity(verbosity); */
77  /* rcemc->set_towerinfo(true); */
78  se->registerSubsystem(rcemc);
79  //
80  // do the background subtraction
82  HIJetReco();
83 
84  RhoFluct *rhofluct = new RhoFluct(out_name, jet_R);
91  rhofluct->Verbosity(0);
92  se->registerSubsystem(rhofluct);
93 
94 
95  if (list_calo_cluster!="") {
96  Fun4AllInputManager *inp_calo_cluster = new Fun4AllDstInputManager("DSTcalocluster");
97  inp_calo_cluster->AddListFile(list_calo_cluster,1);
98  se->registerInputManager(inp_calo_cluster);
99  } else {
100  cout << " Fatal: missing calo cluster list file. Exiting." << endl;
101  gSystem->Exit(0);
102  }
103 
104  se->run(nevnt);
105  se->End();
106  delete se;
107  cout << " Done in Fun4All_RhoFluct.C " << endl;
108  gSystem->Exit(0);
109 
110 }
111 
112 #endif