Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Fun4All_HCalCalib.C
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file Fun4All_HCalCalib.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(int nevents = 0, const std::string &fname = "/sphenix/user/hanpuj/HCalCosmicCalib/prdf_file/cosmics-00028508-0000.prdf") {
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->fileopen(fname);
43  se->registerInputManager(in);
44 
47  ca2->set_nsamples(12);
50  ca2->set_outputNodePrefix("TOWERSV2_");
51  ca2->set_softwarezerosuppression(true, 200);
52  se->registerSubsystem(ca2);
53 
56  ca3->set_nsamples(12);
59  ca3->set_outputNodePrefix("TOWERSV2_");
60  ca3->set_softwarezerosuppression(true, 200);
61  se->registerSubsystem(ca3);
62 
63  HCalCalibTree *wt2 = new HCalCalibTree("HCalCalib_TREE_2","ihcal_hist.root", "TOWERSV2_");
64  wt2->Detector("HCALIN");
65  se->registerSubsystem(wt2);
66 
67  HCalCalibTree *wt3 = new HCalCalibTree("HCalCalib_TREE_3","ohcal_hist.root", "TOWERSV2_");
68  wt3->Detector("HCALOUT");
69  se->registerSubsystem(wt3);
70 
71  se->run(nevents);
72  CDBInterface::instance()->Print(); // print used DB files
73  se->End();
74  se->PrintTimer();
75  gSystem->Exit(0);
76 }
77 
78 #endif