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

Just uploading local change

parent 1e727c33
No related branches found
No related tags found
1 merge request!27Draft: [Epic] Preparation of the environement for the new GaseousDetectorScorers...
Pipeline #381908 passed
......@@ -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_247"
input_directory = os.getcwd() + "/../DataMacro/output/run_246"
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_247"
phy_directory = os.getcwd() + "/../DataMacro/output/analysis/run_246"
#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_247/"+inputfile)
analysedfile.append( os.getcwd() + "/../DataMacro/output/analysis/run_246/"+inputfile)
## batch rules
rule all:
......
......@@ -3,4 +3,4 @@ echo "- executing snakemake file for npanalysis..."
snakemake --cores 30 --forceall --keep-incomplete --keep-going --rerun-incomplete
echo "- snakemake executed successfully!"
echo "- Merging file..."
root -q '../DataMacro/Merger.C(30,"root/analysis","VamosCalib247","../DataMacro/output/analysis/run_247/run_raw_247_")'
root -q '../DataMacro/Merger.C(30,"root/analysis","Run246","../DataMacro/output/analysis/run_246/run_raw_246_")'
......@@ -6,7 +6,7 @@
void PlotPres26JUIN(){
TFile *f = new TFile("../../root/analysis/Exc240Linea.root");
TFile *f = new TFile("../../root/analysis/VamosCalib247.root");
TFile *cutfile = TFile::Open("cut12C.root");
TCut *C12 =(TCut*)cutfile->Get("C12");
......
......@@ -5,8 +5,8 @@
#include <unordered_map>
// Important variable
#define STEP 3; // Step to parse through the histogram in X
#define BINSIZE 10; // Size of the bin in X on which to projectY the plot
#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
//Main
......@@ -59,7 +59,13 @@ void CutAutoDEE(){
for (auto cut : CutLine){
cut->Draw("SAME");
}
//Save the cut !
TFile *ofile = new TFile("Output/CutAutoZ.root","RECREATE");
for (auto cut : CutLine){
cut->Write();
}
ofile->Close();
}
/**
......
......@@ -27,6 +27,7 @@ void DECorr(bool cut = false, bool spline = false) {
//===========================================================================================================
TChain* chain = new TChain("PhysicsTree");
chain->Add("../../../root/analysis/VamosCalib247.root");
chain->Add("../../../root/analysis/Run246.root");
TICPhysics* IC = new TICPhysics() ;
TTimeData *Time = new TTimeData() ;
......@@ -440,13 +441,62 @@ void DECorr(bool cut = false, bool spline = false) {
//===========================================================================================================
gStyle->SetPalette(kRainBow);
// =========== Poster plot=============================
TCanvas* c8 = new TCanvas("DE Before correction","DE Before correction",4000,4000);
hDE_E->GetXaxis()->SetTitle("E (A.U)");
hDE_E->GetXaxis()->SetRangeUser(3000,35000);
hDE_E->GetXaxis()->CenterTitle();
hDE_E->GetYaxis()->SetTitle("#Delta E (A.U)");
hDE_E->GetYaxis()->SetRangeUser(6000,26000);
hDE_E->GetYaxis()->CenterTitle();
hDE_E->GetZaxis()->SetRangeUser(0,140);
hDE_E->GetZaxis()->SetTitle("Number of events");
hDE_E->GetZaxis()->CenterTitle();
hDE_E->SetTitle("PID VAMOS before correction");
hDE_E->SetStats(0);
hDE_E->Draw("COLZ");
c8->SetCanvasSize(4000,3000);
c8->SaveAs("~/These/Plot/Poster/VamosPIDBeforeCorr.png");
c8->SaveAs("~/These/Plot/Poster/VamosPIDBeforeCorr.pdf");
c8->SaveAs("~/These/Plot/Poster/VamosPIDBeforeCorr.jpg");
TCanvas* c9 = new TCanvas("DE after correction","DE after correction",1000,1000);
hDE0234_E_corr->GetXaxis()->SetTitle("E (A.U)");
hDE0234_E_corr->GetXaxis()->SetRangeUser(3000,35000);
hDE0234_E_corr->GetXaxis()->CenterTitle();
hDE0234_E_corr->GetYaxis()->SetTitle("#Delta E (A.U)");
hDE0234_E_corr->GetYaxis()->SetRangeUser(6000,26000);
hDE0234_E_corr->GetYaxis()->CenterTitle();
hDE0234_E_corr->GetZaxis()->SetRangeUser(0,140);
hDE0234_E_corr->GetZaxis()->SetTitle("Number of events");
hDE0234_E_corr->GetZaxis()->CenterTitle();
hDE0234_E_corr->SetTitle("PID VAMOS after correction");
hDE0234_E_corr->SetStats(0);
hDE0234_E_corr->Draw("COLZ");
c9->SetCanvasSize(4000,3000);
c9->SaveAs("~/These/Plot/Poster/VamosPIDAfterCorr.png");
c9->SaveAs("~/These/Plot/Poster/VamosPIDAfterCorr.pdf");
c9->SaveAs("~/These/Plot/Poster/VamosPIDAfterCorr.jpg");
//gStyle->SetOptStat(1);
// =========== Poster plot=============================
TCanvas* c7 = new TCanvas("correction succesive","correction succesive",1500,1000);
c7->Divide(6);
c7->cd(1);
hDE_E->GetXaxis()->SetTitle("E");
hDE_E->GetYaxis()->SetTitle("DE");
hDE_E->Draw();
c7->cd(2);
......@@ -466,7 +516,7 @@ void DECorr(bool cut = false, bool spline = false) {
c7->cd(5);
hDE_E0234->GetXaxis()->SetTitle("E");
hDE_E0234->GetYaxis()->SetTitle("DE");
//hDE_E0234->GetYaxis()->SetTitle("DE");
hDE_E0234->Draw();
c7->cd(6);
......@@ -548,8 +598,6 @@ void DECorr(bool cut = false, bool spline = false) {
gPad->Modified();
gPad->Update();
hDE0234_E_corr->Draw("colz");
hDE0234_E_corr->GetXaxis()->SetTitle("E");
hDE0234_E_corr->GetYaxis()->SetTitle("DE");
c2->cd(6);
hDE_Ebis->SetTitle("online");
......@@ -565,7 +613,6 @@ void DECorr(bool cut = false, bool spline = false) {
//===========================================================================================================
TFile *oSaved = new TFile("Output/DE_E.root","recreate");
hDE0234_E_corr->GetXaxis()->SetRangeUser(2000,34000);
hDE0234_E_corr->Write();
TH2toCSV(hDE0234_E_corr,"Output/DE_E.csv");
......
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