File indexing completed on 2025-08-05 08:21:36
0001 #include <GlobalVariables.C>
0002 #include <Detinfo.h>
0003
0004 #include <ffamodules/CDBInterface.h>
0005
0006 #include <phool/recoConsts.h>
0007 #include <phool/PHRandomSeed.h>
0008
0009 #include <phparameter/PHParameterUtils.h>
0010
0011 #include <fun4all/InputFileHandler.h>
0012 #include <fun4all/Fun4AllDstInputManager.h>
0013 #include <fun4all/Fun4AllNoSyncDstInputManager.h>
0014 #include <fun4all/Fun4AllServer.h>
0015 #include <fun4all/Fun4AllUtils.h>
0016 #include <fun4all/Fun4AllSyncManager.h>
0017
0018 #include <caloreco/CaloTowerBuilder.h>
0019 #include <caloreco/CaloTowerCalib.h>
0020
0021 #include <epd/EpdReco.h>
0022 #include <mbd/MbdReco.h>
0023
0024 #include <centrality/CentralityReco.h>
0025 #include <g4centrality/PHG4CentralityReco.h>
0026
0027 #include <calotrigger/MinimumBiasClassifier.h>
0028
0029 #include <globalvertex/GlobalVertexReco.h>
0030
0031 #include <eventplaneinfo/Eventplaneinfo.h>
0032 #include <eventplaneinfo/EventPlaneReco.h>
0033
0034 #include <zdcinfo/ZdcReco.h>
0035
0036
0037 R__LOAD_LIBRARY( libfun4all.so )
0038 R__LOAD_LIBRARY( libffamodules.so )
0039 R__LOAD_LIBRARY( libmbd.so )
0040 R__LOAD_LIBRARY( libg4mbd.so )
0041 R__LOAD_LIBRARY(libepd.so)
0042 R__LOAD_LIBRARY( libcalotrigger.so )
0043 R__LOAD_LIBRARY( libg4centrality.so )
0044 R__LOAD_LIBRARY( libcentrality.so )
0045 R__LOAD_LIBRARY( libglobalvertex.so )
0046 R__LOAD_LIBRARY( libg4vertex.so )
0047 R__LOAD_LIBRARY( libzdcinfo.so )
0048 R__LOAD_LIBRARY(libeventplaneinfo.so)
0049 R__LOAD_LIBRARY(libDetinfo.so)
0050
0051
0052 void Fun4All_Global_2024(
0053 const std::string & prodTag = "2024p009",
0054 const int timeStamp = 54912,
0055 const int nEvents = 1000
0056 )
0057 {
0058
0059 Enable::VERBOSITY = 0;
0060
0061 CDB::global_tag = prodTag;
0062 CDB::timestamp = static_cast<uint64_t>( timeStamp );
0063
0064 auto se = Fun4AllServer::instance();
0065 se -> Verbosity( Enable::VERBOSITY );
0066
0067 auto rc = recoConsts::instance();
0068 CDBInterface::instance( ) -> Verbosity( 0 );
0069 rc -> set_StringFlag( "CDB_GLOBALTAG", CDB::global_tag );
0070 rc -> set_uint64Flag( "TIMESTAMP", CDB::timestamp );
0071
0072 Fun4AllInputManager *in = new Fun4AllDstInputManager("in1");
0073 std::string filein = "/sphenix/lustre01/sphnxpro/physics/run2auau/caloy2fitting/new_2024p007/run_00054900_00055000/DST_CALOFITTING_run2auau_new_2024p007-00054912-";
0074
0075 for (int i = 0; i < 490; i++)
0076 {
0077 std::string seg = "0000";
0078 if(i >= 10 && i<100) seg = "000";
0079 if(i >= 100 && i<1000) seg = "00";
0080 filein += seg;
0081 std::string str2 = std::to_string(i);
0082 filein += str2;
0083 filein += ".root";
0084 in->AddFile(filein);
0085 filein = "/sphenix/lustre01/sphnxpro/physics/run2auau/caloy2fitting/new_2024p007/run_00054900_00055000/DST_CALOFITTING_run2auau_new_2024p007-00054912-";
0086
0087 }
0088
0089 se->registerInputManager(in);
0090
0091
0092 EpdReco *epdreco = new EpdReco();
0093 se->registerSubsystem(epdreco);
0094
0095 auto mbdreco = new MbdReco();
0096 se->registerSubsystem( mbdreco );
0097
0098 auto gvertex = new GlobalVertexReco();
0099 se->registerSubsystem( gvertex );
0100
0101 CaloTowerCalib *calibZDC = new CaloTowerCalib("ZDC");
0102 calibZDC->set_detector_type(CaloTowerDefs::ZDC);
0103 se->registerSubsystem(calibZDC);
0104
0105 auto zdcreco = new ZdcReco();
0106 zdcreco->set_zdc1_cut(0.0);
0107 zdcreco->set_zdc2_cut(0.0);
0108 se->registerSubsystem( zdcreco );
0109
0110 auto mb = new MinimumBiasClassifier();
0111 mb->Verbosity( Enable::VERBOSITY );
0112 mb->setOverwriteScale("/sphenix/user/dlis/Projects/centrality/cdb/calibrations/scales/cdb_centrality_scale_54912.root");
0113 mb->setOverwriteVtx("/sphenix/user/dlis/Projects/centrality/cdb/calibrations/vertexscales/cdb_centrality_vertex_scale_54912.root");
0114 se->registerSubsystem( mb );
0115
0116 auto cent = new CentralityReco();
0117 cent->setOverwriteScale("/sphenix/user/dlis/Projects/centrality/cdb/calibrations/scales/cdb_centrality_scale_54912.root");
0118 cent->setOverwriteVtx("/sphenix/user/dlis/Projects/centrality/cdb/calibrations/vertexscales/cdb_centrality_vertex_scale_54912.root");
0119 cent->setOverwriteDivs("/sphenix/user/dlis/Projects/centrality/cdb/calibrations/divs/cdb_centrality_54912.root");
0120 se->registerSubsystem( cent );
0121
0122 EventPlaneReco *epreco = new EventPlaneReco();
0123 epreco->set_sepd_epreco(true);
0124 se->registerSubsystem(epreco);
0125
0126
0127 Detinfo *detana = new Detinfo();
0128 detana->set_filename("Global_reco.root");
0129 se->registerSubsystem(detana);
0130
0131 se -> run( nEvents );
0132 se -> End();
0133
0134 std::cout << "Done!" << std::endl;
0135 gSystem -> Exit( 0 );
0136 }