Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2026-04-04 08:12:08

0001 #include <string>
0002 #include <iostream>
0003 #include <format>
0004 
0005 #include <fun4all/Fun4AllBase.h>
0006 #include <fun4all/Fun4AllUtils.h>
0007 #include <fun4all/Fun4AllServer.h>
0008 #include <fun4all/Fun4AllInputManager.h>
0009 #include <fun4all/Fun4AllDstInputManager.h>
0010 #include <fun4all/SubsysReco.h>
0011 #include <ffamodules/CDBInterface.h>
0012 #include <Calo_Calib.C>
0013 
0014 #include <wholeeventeecs/wholeEventEECs.h>
0015 #include <jetbackground/RetowerCEMC.h>
0016 
0017 R__LOAD_LIBRARY(libfun4all.so)
0018 R__LOAD_LIBRARY(libcalo_io.so)
0019 R__LOAD_LIBRARY(libffamodules.so)
0020 R__LOAD_LIBRARY(libwholeEventEECs.so)
0021 R__LOAD_LIBRARY(libjetbase.so)
0022 R__LOAD_LIBRARY(libjetbackground.so)
0023 
0024 void Fun4All_wholeEventEECs(const std::string caloDST = "/sphenix/lustre01/sphnxpro/production2/run2pp/physics/jetskimmer/ana509_2024p022_v001/run_00047200_00047300/DST_JETCALO_run2pp_ana509_2024p022_v001-00047289-00000.root", const std::string jetDST = "/sphenix/lustre01/sphnxpro/production2/run2pp/physics/jetskimmer/ana509_2024p022_v001/run_00047200_00047300/DST_Jet_run2pp_ana509_2024p022_v001-00047289-00000.root", const std::string outDir = "/sphenix/tg/tg01/jets/bkimelman/wEEC/")
0025 {
0026   Fun4AllServer* se=Fun4AllServer::instance();
0027   se->Verbosity(0);
0028 
0029   std::pair<int,int> runseg = Fun4AllUtils::GetRunSegment(caloDST);
0030   int runnumber = runseg.first;
0031   int segment = runseg.second;
0032 
0033   Fun4AllInputManager *inCalo = new Fun4AllDstInputManager("InputManagerCalo");
0034   inCalo->AddFile(caloDST);
0035   se->registerInputManager(inCalo);
0036   
0037   Fun4AllInputManager *inJet = new Fun4AllDstInputManager("InputManagerJet");
0038   inJet->AddFile(jetDST);
0039   se->registerInputManager(inJet);
0040   
0041   auto rc = recoConsts::instance();
0042   rc->set_StringFlag("CDB_GLOBALTAG", "ProdA_2024");
0043   rc->set_uint64Flag("TIMESTAMP", runnumber);
0044   CDBInterface::instance() -> Verbosity(0);
0045   Process_Calo_Calib();
0046 
0047   /*
0048   RetowerCEMC* rtcemc=new RetowerCEMC("RetowerCEMC");
0049   rtcemc->Verbosity(0);
0050   rtcemc->set_towerinfo(true);
0051   rtcemc->set_frac_cut(0.5);
0052   se->registerSubsystem(rtcemc);
0053   */
0054 
0055   wholeEventEECs *wEEC = new wholeEventEECs("wholeEventEECs");
0056   wEEC->set_outputName(std::format("{}/wholeEventEECs_run2pp_ana509_2024p022_v001-{}-{}.root",outDir, runnumber, segment).c_str());
0057   se->registerSubsystem(wEEC);
0058 
0059   se->run(-1);
0060   se->End();
0061   se->PrintTimer();
0062 
0063   delete se;
0064   gSystem->Exit(0);
0065 }