Skip to content
Snippets Groups Projects
Commit 3191752a authored by Theodore Efremov's avatar Theodore Efremov :hibiscus:
Browse files

[AlPhaPha] Putting the project up to date

parent 75567f75
No related branches found
No related tags found
No related merge requests found
Pipeline #385652 passed
......@@ -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;
......
......@@ -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
......
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
No preview for this file type
......@@ -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:
......
ConfigFPMW
LINEA_PATH ./configs/Linearisation.txt
LINEA_PATH ./Calibration/VAMOS/FPMW/Linearisation.txt
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
#!/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}_\""
......
......@@ -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");
}
......
......@@ -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);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment