File indexing completed on 2025-08-09 08:12:08
0001 #include "../ClusHistogram.h"
0002
0003 R__LOAD_LIBRARY(../libClusHistogram.so)
0004
0005 void Run_PrepareHist(
0006 int process_id = 0,
0007 int run_num = 54280,
0008 int nevents = -1,
0009 string input_directory = "/sphenix/user/ChengWei/INTT/INTT/general_codes/CWShih/INTTBcoResolution/macro",
0010 string input_filename = "file_list_54280_intt.txt",
0011 string output_directory = "/sphenix/tg/tg01/commissioning/INTT/work/cwshih/seflgendata/run_54280/completed/BCO_check",
0012
0013
0014 std::string output_file_name_suffix = "",
0015 std::pair<double, double> vertexXYIncm = {-0.0232717, 0.223173},
0016
0017 std::pair<bool, TH1D*> vtxZReweight = {false, nullptr},
0018 bool BcoFullDiffCut = true,
0019 bool INTT_vtxZ_QA = true,
0020 std::pair<bool, std::pair<double, double>> isClusQA = {true, {35, 500}},
0021 bool HaveGeoOffsetTag = false,
0022 std::pair<bool, int> SetRandomHits = {false, 0},
0023 bool RandInttZ = false
0024 )
0025 {
0026
0027 ClusHistogram * CSH = new ClusHistogram(
0028 process_id,
0029 run_num,
0030 nevents,
0031 input_directory,
0032 input_filename,
0033 output_directory,
0034
0035 output_file_name_suffix,
0036 vertexXYIncm,
0037
0038 vtxZReweight,
0039 BcoFullDiffCut,
0040 INTT_vtxZ_QA,
0041 isClusQA,
0042 HaveGeoOffsetTag,
0043 SetRandomHits,
0044 RandInttZ
0045 );
0046
0047 string final_output_file_name = CSH->GetOutputFileName();
0048 cout<<"final_output_file_name: "<<final_output_file_name<<endl;
0049 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()));
0050
0051 CSH -> MainProcess();
0052 CSH -> EndRun();
0053
0054 system(Form("mv %s/%s %s/completed", output_directory.c_str(), final_output_file_name.c_str(), output_directory.c_str()));
0055
0056 return;
0057 }