File indexing completed on 2025-08-05 08:12:41
0001 #ifndef FUN4ALL_HCALCALIB_C
0002 #define FUN4ALL_HCALCALIB_C
0003
0004 #include <caloreco/CaloTowerBuilder.h>
0005 #include <caloreco/CaloWaveformProcessing.h>
0006 #include <caloreco/CaloGeomMapping.h>
0007
0008 #include <ffamodules/FlagHandler.h>
0009 #include <ffamodules/HeadReco.h>
0010 #include <ffamodules/SyncReco.h>
0011 #include <ffamodules/CDBInterface.h>
0012
0013 #include <fun4all/Fun4AllDstInputManager.h>
0014
0015 #include <fun4all/Fun4AllDstOutputManager.h>
0016 #include <fun4all/Fun4AllInputManager.h>
0017 #include <fun4all/Fun4AllServer.h>
0018 #include <fun4all/SubsysReco.h>
0019
0020 #include <phool/recoConsts.h>
0021
0022 #include <cosmictree/HCalCalibTree.h>
0023
0024 R__LOAD_LIBRARY(libfun4all.so)
0025 R__LOAD_LIBRARY(libfun4allraw.so)
0026 R__LOAD_LIBRARY(libcalo_reco.so)
0027 R__LOAD_LIBRARY(libffamodules.so)
0028 R__LOAD_LIBRARY(libHCalCalibTree.so)
0029
0030 void Fun4All_HCalCalib_sim(int nevents = 500, const char *filelist = "dst_calo_cluster.list") {
0031 Fun4AllServer *se = Fun4AllServer::instance();
0032 se->Verbosity(0);
0033 recoConsts *rc = recoConsts::instance();
0034
0035
0036
0037
0038 rc->set_StringFlag("CDB_GLOBALTAG", "MDC2");
0039 rc->set_uint64Flag("TIMESTAMP", 6);
0040
0041 Fun4AllInputManager *in = new Fun4AllDstInputManager("in");
0042 in->AddListFile(filelist,1);
0043 se->registerInputManager(in);
0044
0045 HCalCalibTree *wt2 = new HCalCalibTree("HCalCalib_TREE_2","ihcal_hist_sim.root", "TOWERINFO_SIM_");
0046 wt2->Detector("HCALIN");
0047 se->registerSubsystem(wt2);
0048
0049 HCalCalibTree *wt3 = new HCalCalibTree("HCalCalib_TREE_3","ohcal_hist_sim.root", "TOWERINFO_SIM_");
0050 wt3->Detector("HCALOUT");
0051 se->registerSubsystem(wt3);
0052
0053 se->run(nevents);
0054 CDBInterface::instance()->Print();
0055 se->End();
0056 se->PrintTimer();
0057 gSystem->Exit(0);
0058 }
0059
0060 #endif