From 74731034a8c6c207a7c313ae2cdc7513509ec2ca Mon Sep 17 00:00:00 2001 From: "theodore.efremov" <theodore.efremov@cea.fr> Date: Wed, 27 Nov 2024 09:41:54 +0100 Subject: [PATCH] reorganisation --- .../2024/macro/chio/CalibrationChio/DECorr.C | 10 ++++++--- .../CalibrationChio/{ => Legacy}/CutZ.cxx | 0 .../{ => Legacy}/DECorrParra.C | 0 .../chio/CalibrationChio/Legacy/PlotChio.C | 21 +++++++++++++++++++ .../chio/CalibrationChio/Legacy/PlotOnline.C | 15 +++++++++++++ .../2024/macro/chio/CalibrationChio/ReadMe.md | 10 ++++++--- 6 files changed, 50 insertions(+), 6 deletions(-) rename Projects/AlPhaPha/2024/macro/chio/CalibrationChio/{ => Legacy}/CutZ.cxx (100%) rename Projects/AlPhaPha/2024/macro/chio/CalibrationChio/{ => Legacy}/DECorrParra.C (100%) create mode 100644 Projects/AlPhaPha/2024/macro/chio/CalibrationChio/Legacy/PlotChio.C create mode 100644 Projects/AlPhaPha/2024/macro/chio/CalibrationChio/Legacy/PlotOnline.C diff --git a/Projects/AlPhaPha/2024/macro/chio/CalibrationChio/DECorr.C b/Projects/AlPhaPha/2024/macro/chio/CalibrationChio/DECorr.C index 2301a6381..766978d6e 100644 --- a/Projects/AlPhaPha/2024/macro/chio/CalibrationChio/DECorr.C +++ b/Projects/AlPhaPha/2024/macro/chio/CalibrationChio/DECorr.C @@ -190,7 +190,8 @@ void DECorr(bool cut = false, bool spline = false) { //DE_splined = 0.5*(ICcorr_Y[0]+ ICcorr_Y[1] +ICcorr_Y[2]+ICcorr_Y[3])+ICcorr_Y[4]; DE_splined = 0.5*( ICcorr_Y[1] +IC->fIC_raw[2]+IC->fIC_raw[3])+IC->fIC_raw[4]; - //bool CutV = FF_V13 > 4.2 && FF_V13 <=4.3; + bool CutV = FF_V13 > 4.2999 && FF_V13 <=4.3; + bool CutVbis = FF_V13 > 4.2999 && FF_V13 <=4.3; //bool CutV = true; //nocut if (FF_IC_Y >Ymin && FF_IC_Y <Ymax ){ //hDE_E->Fill(E,DE); @@ -220,8 +221,8 @@ void DECorr(bool cut = false, bool spline = false) { } //bool CutV = CutZ->IsInside(E,DE_splined); - bool CutV = CutZ->IsInside(E,DE_Y_Recur); - bool CutVbis = CutZbis->IsInside(E,DE_Bis); + //bool CutV = CutZ->IsInside(E,DE_Y_Recur); + //bool CutVbis = CutZbis->IsInside(E,DE_Bis); if (cut == true && CutV) { hDE_Y->Fill(FF_IC_Y,DE_splined); @@ -272,6 +273,9 @@ void DECorr(bool cut = false, bool spline = false) { hDE_Y_bis->ProfileX()->Draw(); + TCanvas *c1 = new TCanvas("c1","c1",1500,1000); + hDE_E->Draw(); + TCanvas* c2 = new TCanvas("c2","c2",1500,1000); c2->Divide(2 + 3*spline); c2->cd(1); diff --git a/Projects/AlPhaPha/2024/macro/chio/CalibrationChio/CutZ.cxx b/Projects/AlPhaPha/2024/macro/chio/CalibrationChio/Legacy/CutZ.cxx similarity index 100% rename from Projects/AlPhaPha/2024/macro/chio/CalibrationChio/CutZ.cxx rename to Projects/AlPhaPha/2024/macro/chio/CalibrationChio/Legacy/CutZ.cxx diff --git a/Projects/AlPhaPha/2024/macro/chio/CalibrationChio/DECorrParra.C b/Projects/AlPhaPha/2024/macro/chio/CalibrationChio/Legacy/DECorrParra.C similarity index 100% rename from Projects/AlPhaPha/2024/macro/chio/CalibrationChio/DECorrParra.C rename to Projects/AlPhaPha/2024/macro/chio/CalibrationChio/Legacy/DECorrParra.C diff --git a/Projects/AlPhaPha/2024/macro/chio/CalibrationChio/Legacy/PlotChio.C b/Projects/AlPhaPha/2024/macro/chio/CalibrationChio/Legacy/PlotChio.C new file mode 100644 index 000000000..c3b8424de --- /dev/null +++ b/Projects/AlPhaPha/2024/macro/chio/CalibrationChio/Legacy/PlotChio.C @@ -0,0 +1,21 @@ +#include <TCanvas.h> +#include <TFile.h> +#include <TGraph.h> +#include <TH2.h> +#include <TTree.h> + +void PlotChio(){ + + TFile *f = new TFile("../../../root/analysis/VamosCalib241.root"); + TTree *tree = (TTree*) f->Get("PhysicsTree"); + + + TCanvas *c1 = new TCanvas("c1","c1",1200,600); + + TH2F *h = new TH2F("h","h",1000,-800,800,1000,-160,160); + tree->Draw("FF_IC_Y:FF_IC_X>>h","","colz"); + h->GetXaxis()->SetTitle("X"); + h->GetYaxis()->SetTitle("Y"); + + +} diff --git a/Projects/AlPhaPha/2024/macro/chio/CalibrationChio/Legacy/PlotOnline.C b/Projects/AlPhaPha/2024/macro/chio/CalibrationChio/Legacy/PlotOnline.C new file mode 100644 index 000000000..113fa6f52 --- /dev/null +++ b/Projects/AlPhaPha/2024/macro/chio/CalibrationChio/Legacy/PlotOnline.C @@ -0,0 +1,15 @@ + +#include <TF1.h> +#include <TFile.h> +#include <TSpline.h> + +void PlotOnline(){ + + TF1 *f1 = new TF1("Fonction Online", "(1-0.000686068*x)*(1-4.88238e-05*x+7.40395e-06*x*x)", -100, 100); + + + TFile *fSplineIC = new TFile("Output/spline_P2P_2024.root","open"); + TSpline3 *spline_X = (TSpline3 *)fSplineIC->Get("fspline_IC1_Y"); + + f1->Draw(); +} diff --git a/Projects/AlPhaPha/2024/macro/chio/CalibrationChio/ReadMe.md b/Projects/AlPhaPha/2024/macro/chio/CalibrationChio/ReadMe.md index 1541c4dd5..10a6324c3 100644 --- a/Projects/AlPhaPha/2024/macro/chio/CalibrationChio/ReadMe.md +++ b/Projects/AlPhaPha/2024/macro/chio/CalibrationChio/ReadMe.md @@ -13,9 +13,13 @@ of the electron by the grid. ## The code -SplineXY.C serve the purpose of creating this spline and storing int a .root +SplineChioXY.C serve the purpose of creating this spline and storing int a .root file. -## Devel +SplineChioAllXY.C make the spline for all section of the chio -Apparently the main correction must come from the correction of the DE +SplineChioP2P scale the i section from the i-1 one + +DECorr.C plot the DE_E with several correction compared + +IC_Dampen_recombi try a expo fit -- GitLab