File indexing completed on 2025-08-03 08:20:28
0001 #ifndef FUN4ALL_JETSKIMMEDPRODUCTIONYEAR3_C
0002 #define FUN4ALL_JETSKIMMEDPRODUCTIONYEAR3_C
0003
0004 #include <QA.C>
0005 #include <Calo_Calib.C>
0006 #include <HIJetReco.C>
0007 #include <Jet_QA.C>
0008
0009 #include <G4_Global.C>
0010 #include <G4_Centrality.C>
0011
0012 #include <mbd/MbdReco.h>
0013
0014 #include <globalvertex/GlobalVertexReco.h>
0015
0016 #include <ffamodules/CDBInterface.h>
0017 #include <ffamodules/FlagHandler.h>
0018 #include <ffamodules/HeadReco.h>
0019 #include <ffamodules/SyncReco.h>
0020
0021 #include <fun4allraw/Fun4AllPrdfInputManager.h>
0022
0023 #include <fun4all/Fun4AllDstInputManager.h>
0024 #include <fun4all/Fun4AllDstOutputManager.h>
0025 #include <fun4all/Fun4AllInputManager.h>
0026 #include <fun4all/Fun4AllRunNodeInputManager.h>
0027 #include <fun4all/Fun4AllServer.h>
0028 #include <fun4all/Fun4AllUtils.h>
0029 #include <fun4all/SubsysReco.h>
0030
0031 #include <phool/recoConsts.h>
0032
0033 #include <centrality/CentralityReco.h>
0034 #include <calotrigger/MinimumBiasClassifier.h>
0035
0036 #include <calovalid/CaloValid.h>
0037
0038 #include <jetdstskimmer/JetDSTSkimmer.h>
0039
0040
0041 R__LOAD_LIBRARY(libfun4all.so)
0042 R__LOAD_LIBRARY(libfun4allraw.so)
0043 R__LOAD_LIBRARY(libcalo_reco.so)
0044 R__LOAD_LIBRARY(libcalotrigger.so)
0045 R__LOAD_LIBRARY(libcentrality.so)
0046 R__LOAD_LIBRARY(libffamodules.so)
0047 R__LOAD_LIBRARY(libmbd.so)
0048 R__LOAD_LIBRARY(libglobalvertex.so)
0049 R__LOAD_LIBRARY(libcalovalid.so)
0050 R__LOAD_LIBRARY(libJetDSTSkimmer.so)
0051
0052 void Fun4All_JetSkimmedProductionYear3(int nEvents=1000,
0053 const std::string &fname = "DST_CALOFITTING_run3auau_new_newcdbtag_v005-00067520-00000.root",
0054 const std::string& outfile_low= "DST_JETCALO-00000000-000000.root",
0055 const std::string& outfile_high= "DST_Jet-00000000-000000.root",
0056 const std::string& outfile_hist= "HIST_JETQA-00000000-000000.root",
0057 const std::string& dbtag= "ProdA_2024"
0058 )
0059 {
0060
0061 Fun4AllServer *se = Fun4AllServer::instance();
0062 se->Verbosity(0);
0063
0064 recoConsts *rc = recoConsts::instance();
0065
0066 pair<int, int> runseg = Fun4AllUtils::GetRunSegment(fname);
0067 int runnumber = runseg.first;
0068
0069
0070 rc->set_StringFlag("CDB_GLOBALTAG", dbtag);
0071 rc->set_uint64Flag("TIMESTAMP", runnumber);
0072 CDBInterface::instance()->Verbosity(1);
0073
0074 FlagHandler *flag = new FlagHandler();
0075 se->registerSubsystem(flag);
0076
0077
0078 MbdReco *mbdreco = new MbdReco();
0079 se->registerSubsystem(mbdreco);
0080
0081
0082 GlobalVertexReco *gvertex = new GlobalVertexReco();
0083 se->registerSubsystem(gvertex);
0084
0085
0086
0087 Process_Calo_Calib();
0088
0089
0090 Enable::QA = true;
0091
0092
0093 HIJETS::is_pp = false;
0094
0095
0096 JetQA::HasTracks = false;
0097 JetQA::DoInclusive = true;
0098 JetQA::DoTriggered = true;
0099 JetQA::RestrictPtToTrig = false;
0100 JetQA::RestrictEtaByR = true;
0101 JetQA::DoPP = HIJETS::is_pp;
0102 JetQA::UseBkgdSub = true;
0103 JetQA::HasCalos = true;
0104
0105 if (!HIJETS::is_pp)
0106 {
0107 Centrality();
0108 }
0109
0110
0111 HIJetReco();
0112
0113 JetDSTSkimmer *jetDSTSkimmer = new JetDSTSkimmer();
0114
0115 jetDSTSkimmer->SetMinJetPt(7);
0116 jetDSTSkimmer->SetMinClusterPt(5);
0117 jetDSTSkimmer->SetJetNodeName("AntiKt_Tower_r04_Sub1");
0118 jetDSTSkimmer->SetClusterNodeName("CLUSTERINFO_CEMC");
0119 se->registerSubsystem(jetDSTSkimmer);
0120
0121
0122 if (Enable::QA)
0123 {
0124 DoRhoCalculation();
0125 Jet_QA();
0126 }
0127
0128 Fun4AllInputManager *In = new Fun4AllDstInputManager("in");
0129 In->AddFile(fname);
0130 se->registerInputManager(In);
0131
0132 Fun4AllDstOutputManager *outlower = new Fun4AllDstOutputManager("DSTOUTLOW", outfile_low);
0133 outlower->AddNode("Sync");
0134 outlower->AddNode("EventHeader");
0135 outlower->AddNode("GL1Packet");
0136
0137 outlower->AddNode("TOWERS_HCALIN");
0138
0139 outlower->AddNode("TOWERS_HCALOUT");
0140
0141 outlower->AddNode("TOWERS_CEMC");
0142 outlower->AddNode("TOWERS_SEPD");
0143
0144 outlower->AddNode("TOWERS_ZDC");
0145 outlower->AddNode("MbdOut");
0146 outlower->AddNode("MbdPmtContainer");
0147 outlower->AddNode("MBDPackets");
0148 outlower->AddNode("TriggerRunInfo");
0149 se->registerOutputManager(outlower);
0150
0151 Fun4AllDstOutputManager *outhigher = new Fun4AllDstOutputManager("DSTOUTHIGH", outfile_high);
0152 outhigher->StripNode("TOWERINFO_CALIB_HCALIN");
0153 outhigher->StripNode("TOWERS_HCALIN");
0154 outhigher->StripNode("TOWERINFO_CALIB_HCALOUT");
0155 outhigher->StripNode("TOWERS_HCALOUT");
0156 outhigher->StripNode("TOWERINFO_CALIB_CEMC");
0157 outhigher->StripNode("TOWERS_CEMC");
0158 outhigher->StripNode("TOWERS_SEPD");
0159 outhigher->StripNode("TOWERINFO_CALIB_ZDC");
0160 outhigher->StripNode("TOWERS_ZDC");
0161 outhigher->StripNode("MBDPackets");
0162 outhigher->StripNode("MbdOut");
0163 outhigher->StripNode("MbdPmtContainer");
0164 se->registerOutputManager(outhigher);
0165
0166 se->run(nEvents);
0167 se->End();
0168
0169 if (Enable::QA)
0170 {
0171 QAHistManagerDef::saveQARootFile(outfile_hist);
0172 }
0173
0174 CDBInterface::instance()->Print();
0175 se->PrintTimer();
0176 delete se;
0177 std::cout << "All done!" << std::endl;
0178 gSystem->Exit(0);
0179 }
0180
0181 #endif