Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Fun4All_CaloProduction.C
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file Fun4All_CaloProduction.C
1 #ifndef FUN4ALL_CALOPRODUCTION_C
2 #define FUN4ALL_CALOPRODUCTION_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 
21 #include <phool/recoConsts.h>
22 
23 
24 
25 R__LOAD_LIBRARY(libfun4all.so)
26 R__LOAD_LIBRARY(libfun4allraw.so)
27 R__LOAD_LIBRARY(libcalo_reco.so)
28 R__LOAD_LIBRARY(libffamodules.so)
29 
30 void Fun4All_CaloProduction(const std::string &fname = "/sphenix/user/trinn/combined_event_prdfs/calib-00007377-0000.prdf", const std::string &outfile = "testfile.root", int nskip = 0, int nevents = 0)
31 {
33  se->Verbosity(0);
35 
36  //===============
37  // conditions DB flags
38  //===============
39  rc->set_StringFlag("CDB_GLOBALTAG","MDC2");
40  rc->set_uint64Flag("TIMESTAMP",6);
41 
44  ca->set_nsamples(31);
46  se->registerSubsystem(ca);
47 
50  ca1->set_nsamples(31);
52  se->registerSubsystem(ca1);
53 
56  ca2->set_nsamples(31);
58  se->registerSubsystem(ca2);
59 
60  //default is FAST
63  ca3->set_nsamples(31);
64  se->registerSubsystem(ca3);
65 
66  CaloGeomMapping *cgm = new CaloGeomMapping();
67  cgm->set_detector_name("CEMC");
68  se->registerSubsystem(cgm);
69 
70  CaloGeomMapping *cgm1 = new CaloGeomMapping();
71  cgm1->set_detector_name("HCALIN");
72  se->registerSubsystem(cgm1);
73 
74  CaloGeomMapping *cgm2 = new CaloGeomMapping();
75  cgm2->set_detector_name("HCALOUT");
76  se->registerSubsystem(cgm2);
77 
79  in->fileopen(fname);
80  se->registerInputManager(in);
81 
83  se->registerOutputManager(out);
84 
85 
86  se->skip(nskip);
87  se->run(nevents);
88  CDBInterface::instance()->Print(); // print used DB files
89  se->End();
90  se->PrintTimer();
91  gSystem->Exit(0);
92 }
93 
94 #endif