File indexing completed on 2025-08-09 08:12:18
0001 #include "../SemiChipClustering.h"
0002
0003 R__LOAD_LIBRARY(../libSemiChipClustering.so)
0004
0005 void Run_SemiChipClustering(
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
0016 bool BcoFullDiffCut = true,
0017 bool INTT_vtxZ_QA = true,
0018
0019 std::pair<bool, std::string> BadChMask = {true, "/cvmfs/sphenix.sdcc.bnl.gov/calibrations/sphnxpro/cdb/INTT_HotMap/ad/cf/adcf08dc730a3fac2e2db7a4d66370f3_hotmap_cdb_54280_100000_DST_1114.root"},
0020 bool ApplyHitQA = true,
0021 bool clone_hit_remove_BCO_tag = true,
0022 std::pair<bool, int> cut_HitBcoDiff = {true, 55},
0023 std::vector<int> adc_conversion_vec = {35, 45, 60, 90, 120, 150, 180, 210}
0024 )
0025 {
0026
0027 SemiChipClustering * SCC = new SemiChipClustering(
0028 process_id,
0029 run_num,
0030 nevents,
0031 input_directory,
0032 input_filename,
0033 output_directory,
0034
0035 output_file_name_suffix,
0036
0037 BcoFullDiffCut,
0038 INTT_vtxZ_QA,
0039
0040 BadChMask,
0041 ApplyHitQA,
0042 clone_hit_remove_BCO_tag,
0043 cut_HitBcoDiff,
0044 adc_conversion_vec
0045 );
0046
0047 string final_output_file_name = SCC->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 SCC -> MainProcess();
0052 SCC -> 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 }