Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Fun4All_HCalCalib_sim.C
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file Fun4All_HCalCalib_sim.C
1 #ifndef FUN4ALL_HCALCALIB_C
2 #define FUN4ALL_HCALCALIB_C
3 
4 #include <caloreco/CaloTowerBuilder.h>
5 #include <caloreco/CaloWaveformProcessing.h>
6 #include <caloreco/CaloGeomMapping.h>
7 
9 #include <ffamodules/HeadReco.h>
10 #include <ffamodules/SyncReco.h>
12 
14 
17 #include <fun4all/Fun4AllServer.h>
18 #include <fun4all/SubsysReco.h>
19 
20 #include <phool/recoConsts.h>
21 
22 #include <cosmictree/HCalCalibTree.h>
23 
24 R__LOAD_LIBRARY(libfun4all.so)
25 R__LOAD_LIBRARY(libfun4allraw.so)
26 R__LOAD_LIBRARY(libcalo_reco.so)
27 R__LOAD_LIBRARY(libffamodules.so)
28 R__LOAD_LIBRARY(libHCalCalibTree.so)
29 
30 void Fun4All_HCalCalib_sim(int nevents = 500, const char *filelist = "dst_calo_cluster.list") {
32  se->Verbosity(0);
34 
35  //===============
36  // conditions DB flags
37  //===============
38  rc->set_StringFlag("CDB_GLOBALTAG", "MDC2");
39  rc->set_uint64Flag("TIMESTAMP", 6);
40 
42  in->AddListFile(filelist,1);
43  se->registerInputManager(in);
44 
45  HCalCalibTree *wt2 = new HCalCalibTree("HCalCalib_TREE_2","ihcal_hist_sim.root", "TOWERINFO_SIM_");
46  wt2->Detector("HCALIN");
47  se->registerSubsystem(wt2);
48 
49  HCalCalibTree *wt3 = new HCalCalibTree("HCalCalib_TREE_3","ohcal_hist_sim.root", "TOWERINFO_SIM_");
50  wt3->Detector("HCALOUT");
51  se->registerSubsystem(wt3);
52 
53  se->run(nevents);
54  CDBInterface::instance()->Print(); // print used DB files
55  se->End();
56  se->PrintTimer();
57  gSystem->Exit(0);
58 }
59 
60 #endif