Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2025-08-09 08:12:16

0001 #include "../PreparedNdEta.h"
0002 
0003 R__LOAD_LIBRARY(../libPreparedNdEta.so)
0004 
0005 void Run_PreparedNdEta(
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_TrackHist/completed",
0009   string input_filename = "MC_TrackletHistogram_INTT_vtxZ_QA_test20241212_merged_half_001.root",
0010   string output_directory = "/sphenix/user/ChengWei/sPH_dNdeta/Run24AuAuMC/Sim_Ntuple_HIJING_ana443_20241102/Run24NewCode_dNdEta",
0011   
0012   // todo : modify here
0013   std::string output_file_name_suffix = "_test20241217WideEtaBin",
0014 
0015   bool ApplyAlphaCorr = false
0016 )
0017 {
0018 
0019   PreparedNdEta * PNE = new PreparedNdEta(
0020     process_id,
0021     run_num,
0022     input_directory,
0023     input_filename,
0024     output_directory,
0025 
0026     output_file_name_suffix,
0027 
0028     ApplyAlphaCorr
0029   );
0030   
0031 
0032   string final_output_file_name = PNE->GetOutputFileName();
0033   cout<<"final_output_file_name: "<<final_output_file_name<<endl;
0034   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()));  
0035 
0036   PNE -> PrepareStacks();
0037   std::cout<<111<<endl;
0038   PNE -> DoFittings();
0039   std::cout<<222<<endl;
0040   PNE -> PrepareMultiplicity();
0041   std::cout<<333<<endl;
0042   PNE -> PreparedNdEtaHist();
0043   std::cout<<444<<endl;
0044   PNE -> DeriveAlphaCorrection();
0045   std::cout<<555<<endl;
0046   PNE -> EndRun();
0047 
0048 
0049   system(Form("mv %s/%s %s/completed", output_directory.c_str(), final_output_file_name.c_str(), output_directory.c_str()));
0050 
0051   return;
0052 }