Back to home page

sPhenix code displayed by LXR

 
 

    


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

0001 #include "../GetFinalResult.h"
0002 
0003 R__LOAD_LIBRARY(../libGetFinalResult.so)
0004 
0005 int Run_54280(int condor_index)
0006 {   
0007     std::vector<int> run_centrality_array = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 70}; // note : 16 jobs in total
0008 
0009     int SelectedMbin = run_centrality_array[condor_index];
0010 
0011     int runnumber = 54280;
0012     // int SelectedMbin = 3; // note : 0, 1, ---- 10, 70, 100 
0013     std::pair<double,double> vtxZ_range = {-10,10}; // note : cm
0014     bool isTypeA = false;
0015     bool ApplyGeoAccCorr = false;
0016     std::pair<bool, std::pair<double,double>> cut_EtaRange = {true, {-1.5, 1.5}}; // note : not used
0017 
0018     std::string output_file_name_suffix = "";
0019 
0020     std::string output_directory = "/sphenix/user/ChengWei/sPH_dNdeta/Run24AuAuMC/Sim_HIJING_MDC2_ana472_20250307/Run7/EvtVtxZ/FinalResult_10cm_Pol2BkgFit_DeltaPhi0p026";
0021 
0022     GetFinalResult * GFR = new GetFinalResult(
0023         runnumber,
0024         SelectedMbin,
0025         vtxZ_range,
0026         isTypeA,
0027         ApplyGeoAccCorr,
0028         cut_EtaRange,
0029 
0030         output_file_name_suffix,
0031 
0032         output_directory
0033     );
0034 
0035     GFR -> SetBaseLineDeltaPhiCut({-0.026,0.026}); // todo : change here
0036 
0037     std::string data_input_directory = "/sphenix/tg/tg01/commissioning/INTT/work/cwshih/seflgendata/run_54280_HR_Feb102025/Run6_EvtZFitWidthChange/EvtVtxZ";
0038     std::string MC_input_directory = "/sphenix/user/ChengWei/sPH_dNdeta/Run24AuAuMC/Sim_HIJING_MDC2_ana472_20250307/Run7/EvtVtxZ";
0039 
0040     std::string SetResultRangeFolderName = GFR -> GetSetResultRangeFolderName();
0041 
0042     system(Form("if [ -d %s/completed/%s ]; then rm -r %s/completed/%s; fi;", output_directory.c_str(), SetResultRangeFolderName.c_str(), output_directory.c_str(), SetResultRangeFolderName.c_str()));
0043 
0044     std::string baseline_subfolder = "TrackHist/baseline/completed";
0045     std::string baseline_subfolder_MC_001 = "TrackHist_001/baseline/completed"; // note : for the first half of data
0046     std::string baseline_subfolder_MC_002 = "TrackHist_002/baseline/completed"; // note : for the second half of data 
0047     // note : here are for preparing the reco. dNdEta
0048     GFR -> PrepareBaseLine(
0049         data_input_directory + "/" + baseline_subfolder,
0050         "Data_TrackHist_BcoFullDiffCut_VtxZQA_ClusQAAdc35PhiSize40_ColMulMask_00054280_merged_merged_001.root",
0051         
0052         MC_input_directory + "/" + baseline_subfolder_MC_001,
0053         "MC_TrackHist_vtxZReweight_VtxZQA_ClusQAAdc35PhiSize40_ColMulMask_merged_001.root", // note : derive the alpha correction
0054         "MC_TrackHist_vtxZReweight_VtxZQA_ClusQAAdc35PhiSize40_ColMulMask_merged_002.root"  // note : closure test
0055     );
0056 
0057 
0058     std::string runseg_subfolder = ""; 
0059     GFR -> PrepareRunSegment(
0060         // data_input_directory + "/" + baseline_subfolder + "/" + runseg_subfolder,
0061         data_input_directory + "/" + baseline_subfolder,
0062         {
0063             "Data_TrackHist_BcoFullDiffCut_VtxZQA_ClusQAAdc35PhiSize40_ColMulMask_00054280_merged_merged_002.root"
0064             // "Data_TrackHist_BcoFullDiffCut_VtxZQA_ClusQAAdc35PhiSize40_ColMulMask_00054280_merged_002.root"
0065         },
0066         
0067         MC_input_directory + "/" + baseline_subfolder_MC_002,
0068         "MC_TrackHist_vtxZReweight_VtxZQA_ClusQAAdc35PhiSize40_ColMulMask_merged_001.root", // note : derive the alpha correction,
0069         "MC_TrackHist_vtxZReweight_VtxZQA_ClusQAAdc35PhiSize40_ColMulMask_merged_002.root"  // note : closure test
0070     ); // note : two times
0071 
0072 
0073     GFR -> PrepareDeltaPhiCut(
0074         {0.021, 0.031},    
0075         data_input_directory + "/" + baseline_subfolder,
0076         "Data_TrackHist_BcoFullDiffCut_VtxZQA_ClusQAAdc35PhiSize40_ColMulMask_00054280_merged_merged_001.root",
0077         
0078         MC_input_directory + "/" + baseline_subfolder_MC_001,
0079         "MC_TrackHist_vtxZReweight_VtxZQA_ClusQAAdc35PhiSize40_ColMulMask_merged_001.root", // note : derive the alpha correction,
0080         "MC_TrackHist_vtxZReweight_VtxZQA_ClusQAAdc35PhiSize40_ColMulMask_merged_002.root"  // note : closure test
0081     ); // note : two times 
0082 
0083 
0084     // std::string ClusAdcCut_subfolder = "TrackHist_noAdcCut/completed";
0085     // GFR -> PrepareClusAdcCut(
0086     //     data_input_directory + "/" + ClusAdcCut_subfolder,
0087     //     {
0088     //         "Data_TrackHist_BcoFullDiffCut_VtxZQA_ClusQAAdc0PhiSize39_ColMulMask_00054280_merged.root"
0089     //     },
0090 
0091     //     MC_input_directory + "/" + ClusAdcCut_subfolder,
0092     //     "MC_TrackHist_vtxZReweight_VtxZQA_ClusQAAdc0PhiSize39_ColMulMask_merged_001.root",
0093     //     "MC_TrackHist_vtxZReweight_VtxZQA_ClusQAAdc0PhiSize39_ColMulMask_merged_002.root"
0094     // );
0095 
0096 
0097     std::string NoClusAdcCut_subfolder = "TrackHist/noAdcCut/completed";
0098     std::string NoClusAdcCut_subfolder_MC_001 = "TrackHist_001/noAdcCut/completed";
0099     GFR -> PrepareClusAdcCut(
0100         0,
0101         data_input_directory + "/" + NoClusAdcCut_subfolder,
0102         "Data_TrackHist_BcoFullDiffCut_VtxZQA_ClusQAAdc0PhiSize40_ColMulMask_00054280_merged_merged_001.root",
0103 
0104         MC_input_directory + "/" + NoClusAdcCut_subfolder_MC_001,
0105         "MC_TrackHist_vtxZReweight_VtxZQA_ClusQAAdc0PhiSize40_ColMulMask_merged_001.root", // note : derive the alpha correction,
0106         "MC_TrackHist_vtxZReweight_VtxZQA_ClusQAAdc0PhiSize40_ColMulMask_merged_002.root"  // note : closure test
0107     ); 
0108     std::string ClusAdcCut50_subfolder = "TrackHist/50AdcCut/completed";
0109     std::string ClusAdcCut50_subfolder_MC_001 = "TrackHist_001/50AdcCut/completed";
0110     GFR -> PrepareClusAdcCut(
0111         1,
0112         data_input_directory + "/" + ClusAdcCut50_subfolder,
0113         "Data_TrackHist_BcoFullDiffCut_VtxZQA_ClusQAAdc50PhiSize40_ColMulMask_00054280_merged_merged_001.root",
0114 
0115         MC_input_directory + "/" + ClusAdcCut50_subfolder_MC_001,
0116         "MC_TrackHist_vtxZReweight_VtxZQA_ClusQAAdc50PhiSize40_ColMulMask_merged_001.root", // note : derive the alpha correction,
0117         "MC_TrackHist_vtxZReweight_VtxZQA_ClusQAAdc50PhiSize40_ColMulMask_merged_002.root"  // note : closure test
0118     ); 
0119 
0120     
0121 
0122     std::string ClusPhiCut_subfolder = "TrackHist/noPhiCut/completed";
0123     std::string ClusPhiCut_subfolder_MC_001 = "TrackHist_001/noPhiCut/completed";
0124     GFR -> PrepareClusPhiCut(
0125         data_input_directory + "/" + ClusPhiCut_subfolder,
0126         {
0127             "Data_TrackHist_BcoFullDiffCut_VtxZQA_ClusQAAdc35PhiSize350_ColMulMask_00054280_merged_merged_001.root"
0128         },
0129 
0130         MC_input_directory + "/" + ClusPhiCut_subfolder_MC_001,
0131         "MC_TrackHist_vtxZReweight_VtxZQA_ClusQAAdc35PhiSize350_ColMulMask_merged_001.root", // note : derive the alpha correction,
0132         "MC_TrackHist_vtxZReweight_VtxZQA_ClusQAAdc35PhiSize350_ColMulMask_merged_002.root"  // note : closure test
0133     ); 
0134 
0135     system(Form("mv %s/%s %s/completed", output_directory.c_str(), SetResultRangeFolderName.c_str(), output_directory.c_str()));
0136 
0137     return 777;
0138 }