File indexing completed on 2025-08-09 08:12:17
0001 #include "../PreparedNdEtaClusEach.h"
0002
0003 R__LOAD_LIBRARY(../libPreparedNdEtaClusEach.so)
0004
0005 void Run_PreparedNdEtaClusEach(
0006 int process_id = 1,
0007 int run_num = -1,
0008 string input_directory = "/sphenix/user/ChengWei/sPH_dNdeta/Run24AuAuMC/Sim_Ntuple_HIJING_ana443_20241102/Run24NewCode_ClusHist_noClusQA/completed",
0009 string input_filename = "MC_ClusHist_vtxZReweight_VtxZQA_SecondRun_merged_001.root",
0010 string output_directory = "/sphenix/user/ChengWei/sPH_dNdeta/Run24AuAuMC/Sim_Ntuple_HIJING_ana443_20241102/Run24NewCode_ClusHist_noClusQA/completed/dNdEtaClus",
0011
0012
0013 std::string output_file_name_suffix = "_SecondRun",
0014
0015 bool ApplyAlphaCorr = false,
0016 bool isTypeA = true,
0017 std::pair<double,double> cut_INTTvtxZ = {-5, 5},
0018 int SelectedMbin = 70
0019 )
0020 {
0021
0022 PreparedNdEtaClusEach * PNEE = new PreparedNdEtaClusEach(
0023 process_id,
0024 run_num,
0025 input_directory,
0026 input_filename,
0027 output_directory,
0028
0029 output_file_name_suffix,
0030
0031 ApplyAlphaCorr,
0032 isTypeA,
0033 cut_INTTvtxZ,
0034 SelectedMbin
0035 );
0036
0037
0038 std::string final_output_file_name = PNEE->GetOutputFileName();
0039 system(Form("if [ -f %s/completed/%s ]; then rm %s/completed/%s; fi;", output_directory.c_str(), final_output_file_name.c_str(), output_directory.c_str(), final_output_file_name.c_str()));
0040
0041
0042 PNEE -> PrepareStacks();
0043 std::cout<<111<<endl;
0044 PNEE -> PreparedNdEtaHist();
0045 std::cout<<222<<endl;
0046 PNEE -> DeriveAlphaCorrection();
0047 std::cout<<333<<endl;
0048 PNEE -> EndRun();
0049
0050 system(Form("mv %s/%s %s/completed", output_directory.c_str(), final_output_file_name.c_str(), output_directory.c_str()));
0051
0052 return;
0053 }