diff --git a/Projects/AlPhaPha/2024/Analysis.cxx b/Projects/AlPhaPha/2024/Analysis.cxx index e3120a941be4299a3701e405a48b859bc11c60f6..e4442435bfaf5e12f9b227c48cdade4b8b027cfb 100644 --- a/Projects/AlPhaPha/2024/Analysis.cxx +++ b/Projects/AlPhaPha/2024/Analysis.cxx @@ -469,10 +469,10 @@ void Analysis::VamosAnalysis(){ //Toff vector<double> Toff13 , Toff14, Toff23, Toff24; - const char* Path13 = "macro/mwpc/Toff/output/Toff13.txt"; - const char* Path14 = "macro/mwpc/Toff/output/Toff14.txt"; - const char* Path23 = "macro/mwpc/Toff/output/Toff23.txt"; - const char* Path24 = "macro/mwpc/Toff/output/Toff24.txt"; + const char* Path13 = "./Calibration/VAMOS/FPMW/Toff/Toff13.txt"; + const char* Path14 = "./Calibration/VAMOS/FPMW/Toff/Toff14.txt"; + const char* Path23 = "./Calibration/VAMOS/FPMW/Toff/Toff23.txt"; + const char* Path24 = "./Calibration/VAMOS/FPMW/Toff/Toff24.txt"; Toff13 = TxtToVector(Path13); Toff14 = TxtToVector(Path14); @@ -563,7 +563,7 @@ vector<double> Analysis::TxtToVector(const char *Path){ } file.close(); } else { - std::cerr << "Error opening file.\n"; + std::cerr << "Error opening ToffTXT file.\n"; } return values; diff --git a/Projects/AlPhaPha/2024/Calibration.txt b/Projects/AlPhaPha/2024/Calibration.txt index ed13a8ecf5de0f545d26e1efd99cb3e3044893bb..9482014240fd7134e66aae9e8ea8e6d3b9e951ae 100644 --- a/Projects/AlPhaPha/2024/Calibration.txt +++ b/Projects/AlPhaPha/2024/Calibration.txt @@ -18,6 +18,7 @@ CalibrationFilePath ./Calibration/Energy/PISTA_BACK_DE.cal ./Calibration/Energy/PISTA_BACK_E_min.cal + ./Calibration/VAMOS/CHIO/Chio_Z_Calibration.cal ./Calibration/VAMOS/CHIO/Chio_E_sec5.cal ./Calibration/VAMOS/CHIO/Chio_E_sec6.cal ./Calibration/VAMOS/CHIO/Chio_E_sec7.cal diff --git a/Projects/AlPhaPha/2024/Calibration/VAMOS/CHIO/Chio_Z_Calibration.cal b/Projects/AlPhaPha/2024/Calibration/VAMOS/CHIO/Chio_Z_Calibration.cal index 88b652ee2bb38bd16544e3e8bfee9b22b7354796..d1e6d52bcf6ef4c414ffb70580310fae394e9920 100644 --- a/Projects/AlPhaPha/2024/Calibration/VAMOS/CHIO/Chio_Z_Calibration.cal +++ b/Projects/AlPhaPha/2024/Calibration/VAMOS/CHIO/Chio_Z_Calibration.cal @@ -1 +1 @@ -IC_Z_CALIBRATION 84.055 -0.0196758 2.59494e-06 -1.50991e-10 4.36153e-15 -4.99792e-20 +IC_Z_CALIBRATION -8.06274 0.00930079 -8.74778e-07 4.91672e-11 -1.24593e-15 1.10243e-20 \ No newline at end of file diff --git a/Projects/AlPhaPha/2024/Calibration/VAMOS/CHIO/Z_spline.root b/Projects/AlPhaPha/2024/Calibration/VAMOS/CHIO/Z_spline.root index be9c0fc9e1c2366a155c94a7ea1fb9a10bf62fe0..de8f9034b29ee7d36cb2289c30245aeff3c173f0 100644 Binary files a/Projects/AlPhaPha/2024/Calibration/VAMOS/CHIO/Z_spline.root and b/Projects/AlPhaPha/2024/Calibration/VAMOS/CHIO/Z_spline.root differ diff --git a/Projects/AlPhaPha/2024/Snakefile b/Projects/AlPhaPha/2024/Snakefile index 6146edc8fefe5bc9fa4e482df0901725fe3ca33b..c2b42c1666d746178afc26f844ea7121daa18566 100644 --- a/Projects/AlPhaPha/2024/Snakefile +++ b/Projects/AlPhaPha/2024/Snakefile @@ -3,7 +3,7 @@ import subprocess # Lire le répertoire d'entrée depuis les arguments de configuration #input_directory = config["folder"] -input_directory = os.getcwd() + "/../DataMacro/output/run_248" +input_directory = os.getcwd() + "/../DataMacro/output/run_247" origin = [] # Iterate over files in input_directory for filename in os.listdir(input_directory): @@ -12,14 +12,14 @@ for filename in os.listdir(input_directory): origin.append(filename) # Définir le répertoire de sortie pour les fichiers convertis -phy_directory = os.getcwd() + "/../DataMacro/output/analysis/run_248" +phy_directory = os.getcwd() + "/../DataMacro/output/analysis/run_247" #phy_directory = "./" # define target files directory analysedfile = [] for inputfile in origin: #analysedfile.append("/home/morfouacep/Physics/NPTool/nptool/Projects/ana_e850/root/analysis/"+inputfile.replace("_raw_","_")) - analysedfile.append( os.getcwd() + "/../DataMacro/output/analysis/run_248/"+inputfile) + analysedfile.append( os.getcwd() + "/../DataMacro/output/analysis/run_247/"+inputfile) ## batch rules rule all: diff --git a/Projects/AlPhaPha/2024/configs/ConfigFPMW.dat b/Projects/AlPhaPha/2024/configs/ConfigFPMW.dat index ca33e19a33032d30f3deed9f5861f65402851ef2..22bfd54c11e32918e9e142582d448e84d923dc0b 100644 --- a/Projects/AlPhaPha/2024/configs/ConfigFPMW.dat +++ b/Projects/AlPhaPha/2024/configs/ConfigFPMW.dat @@ -1,2 +1,2 @@ ConfigFPMW -LINEA_PATH ./configs/Linearisation.txt +LINEA_PATH ./Calibration/VAMOS/FPMW/Linearisation.txt diff --git a/Projects/AlPhaPha/2024/configs/ConfigIC.dat b/Projects/AlPhaPha/2024/configs/ConfigIC.dat index c8b2ded39f487f32dd86573a8596ddb5104d221a..c07810759210e260a7cb4c7f82a2bf6c22499e0f 100644 --- a/Projects/AlPhaPha/2024/configs/ConfigIC.dat +++ b/Projects/AlPhaPha/2024/configs/ConfigIC.dat @@ -1,6 +1,7 @@ ConfigIC - %LOAD_Z_SPLINE ./Calibration/VAMOS/CHIO/Z_spline.root DATA_YEAR 2024 + LOAD_Z_SPLINE ./Calibration/VAMOS/CHIO/Z_spline.root + LOAD_Z_SPLINE_EVAL ./Calibration/VAMOS/CHIO/Chio_Z_Spline_Eval.txt LOAD_DE_SPLINE ./Calibration/VAMOS/CHIO/Spline_DE.root LOAD_Y_SPLINE ./Calibration/VAMOS/CHIO/Spline_Y.root LOAD_XY0_PROFILE ./Calibration/VAMOS/CHIO/ICXY_Profile.root diff --git a/Projects/AlPhaPha/2024/convert_snakemake_generic.sh b/Projects/AlPhaPha/2024/convert_snakemake_generic.sh index 354e11b5761d2323f353fca7cde853728273ec28..352444b7dd95ed9aeffc48e11c29e62ecc74d455 100755 --- a/Projects/AlPhaPha/2024/convert_snakemake_generic.sh +++ b/Projects/AlPhaPha/2024/convert_snakemake_generic.sh @@ -1,7 +1,7 @@ #!/bin/bash #Declare run number -RUN_NUMBER="248" +RUN_NUMBER="247" # Check if Snakefile exists if [[ ! -f "Snakefile" ]]; then @@ -14,12 +14,12 @@ sed -i "s/run_[a-zA-Z0-9]\{3\}/run_${RUN_NUMBER}/g" Snakefile echo "All occurrences of 'run_*' have been replaced with 'run_${RUN_NUMBER}' in Snakefile." echo "- executing snakemake file for npanalysis..." -snakemake --cores 30 --forceall --keep-incomplete --keep-going --rerun-incomplete +snakemake --cores 30 --forceall --keep-incomplete --keep-going --rerun-incomplete --restart-times 3 echo "- snakemake executed successfully!" echo "- Merging file..." -OName="\"Run${RUN_NUMBER}\"" +OName="\"Run${RUN_NUMBER}ZSpline\"" OPATH="\"root/analysis\"" Path="\"../DataMacro/output/analysis/run_${RUN_NUMBER}/run_raw_${RUN_NUMBER}_\"" diff --git a/Projects/AlPhaPha/2024/macro/chio/DE_E_Spline/SplineChio.C b/Projects/AlPhaPha/2024/macro/chio/DE_E_Spline/SplineChio.C index 0fc833b1dd4f474186d1841d526474c0048d145f..d26bfbab0d687314ab91af7fc733f84b9042e2ac 100644 --- a/Projects/AlPhaPha/2024/macro/chio/DE_E_Spline/SplineChio.C +++ b/Projects/AlPhaPha/2024/macro/chio/DE_E_Spline/SplineChio.C @@ -14,8 +14,8 @@ using namespace std; const int CutNumberLoader(); const int Ncuts = CutNumberLoader(); const int NSegment=11; -const int Nrun=1; -int RunNumber[Nrun]={247}; +const int Nrun=3; +int RunNumber[Nrun]={246,247,248}; void MakeSpline(); void ApplySpline_perTCutG(); @@ -107,6 +107,7 @@ void MakeSpline(){ // ********************** Load prev histo**************************** TFile *inFile=new TFile("histo/SingleZ_ChioDE_E.root"); + int Z59POS = 32; vector<TSpline3*> gspline(Ncuts); vector<TH2F*> h2 (Ncuts); vector<TH1F*> hProfile(Ncuts); @@ -221,7 +222,7 @@ void MakeSpline(){ cout << h2[i]->GetMean(2) << ", " << endl; ofile_par << h2[i]->GetMean(2) << ", " << endl; //gr->SetPoint(i,sqrt(h2[i]->GetMean(2)),i+31); - gr->SetPoint(i,gspline[i]->Eval(8500),i+31); + gr->SetPoint(i,gspline[i]->Eval(8500),i+Z59POS); //hProfile[i]->Draw("same"); pfx[i]->Draw("same"); gspline[i]->SetLineColor(kBlue); @@ -233,7 +234,7 @@ void MakeSpline(){ cangr->cd(); gr->SetMarkerStyle(20); gr->Draw("AP"); - gr->Fit("pol2"); + gr->Fit("pol5"); } diff --git a/Projects/AlPhaPha/2024/macro/chio/XYCalibration/CutAutoDEE.C b/Projects/AlPhaPha/2024/macro/chio/XYCalibration/CutAutoDEE.C index dcc3c68990a3365895f68954008e20b065bc4ef1..795505861616ccd806ab15f8ada8c373d270e72a 100644 --- a/Projects/AlPhaPha/2024/macro/chio/XYCalibration/CutAutoDEE.C +++ b/Projects/AlPhaPha/2024/macro/chio/XYCalibration/CutAutoDEE.C @@ -6,7 +6,7 @@ // Important variable #define STEP 2; // Step to parse through the histogram in X -#define BINSIZE 15; // Size of the bin in X on which to projectY the plot +#define BINSIZE 25; // Size of the bin in X on which to projectY the plot //Main @@ -33,8 +33,8 @@ void CutAutoDEE(){ // Tspectrum used to find the peak : If you have problem with peak finding // adjust the setting in this function // Step and Binsize are used in this function - Double_t sigma = 2; - Double_t threshold = 0.02; + Double_t sigma = 4; + Double_t threshold = 0.05; PeakFinder(vPeakFinder,vPeaks,hDE_E,LinePos,sigma,threshold); @@ -111,7 +111,7 @@ void PeakFinder(vector<TSpectrum*> *sPeak , vector<int> *vPeak, TH2F *h, vector< for(int peaks = 0 ; peaks < nPeaks ; peaks++){ vector<Double_t> Position(2); - Position.at(0) = (double(i) - double(SizeBin)/2.0) * h->GetXaxis()->GetBinWidth(4) ; //Retrieve E position as the center + Position.at(0) = (double(i) + double(SizeBin)/2.0) * h->GetXaxis()->GetBinWidth(4) ; //Retrieve E position as the center //of the bin Position.at(1) = PeakFinder->GetPositionX()[peaks]; // Position in DE LinePos->push_back(Position);