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

Worked on the analysis of the chio

parent ae48b6a0
No related branches found
No related tags found
1 merge request!27Draft: [Epic] Preparation of the environement for the new GaseousDetectorScorers...
Pipeline #359778 passed
Showing
with 12990 additions and 7879 deletions
...@@ -480,6 +480,9 @@ void Analysis::VamosAnalysis(){ ...@@ -480,6 +480,9 @@ void Analysis::VamosAnalysis(){
FF_Y1 = FPMW->PositionY[0]; FF_Y1 = FPMW->PositionY[0];
FF_Y3 = FPMW->PositionY[2]; FF_Y3 = FPMW->PositionY[2];
FF_IC_Y = FPMW->Yf + (1442.6+6774.4-7600)*tan(FPMW->Phif/1000);
FF_IC_X = FPMW->Xf + (1442.6+6774.4-7600)*tan(FPMW->Thetaf/1000);
// T13 // // T13 //
double path1 = FPMW->GetDetectorPositionZ(0)/10./cos(FPMW->Theta_in)/cos(FPMW->Phi_in); double path1 = FPMW->GetDetectorPositionZ(0)/10./cos(FPMW->Theta_in)/cos(FPMW->Phi_in);
double path2 = (FPMW->GetDetectorPositionZ(2)-7600)/10./cos(FPMW->Thetaf); double path2 = (FPMW->GetDetectorPositionZ(2)-7600)/10./cos(FPMW->Thetaf);
...@@ -563,6 +566,8 @@ void Analysis::InitOutputBranch(){ ...@@ -563,6 +566,8 @@ void Analysis::InitOutputBranch(){
RootOutput::getInstance()->GetTree()->Branch("FF_Y1",&FF_Y1,"FF_Y1/D"); RootOutput::getInstance()->GetTree()->Branch("FF_Y1",&FF_Y1,"FF_Y1/D");
RootOutput::getInstance()->GetTree()->Branch("FF_Y3",&FF_Y3,"FF_Y3/D"); RootOutput::getInstance()->GetTree()->Branch("FF_Y3",&FF_Y3,"FF_Y3/D");
RootOutput::getInstance()->GetTree()->Branch("FF_IC_Y",&FF_IC_Y,"FF_IC_Y/D");
RootOutput::getInstance()->GetTree()->Branch("FF_IC_X",&FF_IC_X,"FF_IC_X/D");
RootOutput::getInstance()->GetTree()->Branch("FF_D13",&FF_D13,"FF_D13/D"); RootOutput::getInstance()->GetTree()->Branch("FF_D13",&FF_D13,"FF_D13/D");
RootOutput::getInstance()->GetTree()->Branch("FF_T13",&FF_T13,"FF_T13/D"); RootOutput::getInstance()->GetTree()->Branch("FF_T13",&FF_T13,"FF_T13/D");
RootOutput::getInstance()->GetTree()->Branch("FF_V13",&FF_V13,"FF_V13/D"); RootOutput::getInstance()->GetTree()->Branch("FF_V13",&FF_V13,"FF_V13/D");
...@@ -697,6 +702,8 @@ void Analysis::ReInitValue(){ ...@@ -697,6 +702,8 @@ void Analysis::ReInitValue(){
FF_Path = -1; FF_Path = -1;
FF_Y1 = -1000; FF_Y1 = -1000;
FF_Y3 = -1000; FF_Y3 = -1000;
FF_IC_X = -1000;
FF_IC_Y = -1000;
FF_D13 = -1; FF_D13 = -1;
FF_T13 = -1; FF_T13 = -1;
FF_V13 = -1; FF_V13 = -1;
......
...@@ -127,6 +127,8 @@ class Analysis: public NPL::VAnalysis{ ...@@ -127,6 +127,8 @@ class Analysis: public NPL::VAnalysis{
double FF_Y1; double FF_Y1;
double FF_Y3; double FF_Y3;
double FF_IC_X;
double FF_IC_Y;
double FF_D13; double FF_D13;
double FF_T13; double FF_T13;
double FF_V13; double FF_V13;
......
# Code cheat sheet # Code cheat sheet
## Root Prompt ## Root Prompt
'''
- Tree-\>Draw("Branch\>\>HistName(nBin,xmin,xmax)","Condition","Option") - Tree-\>Draw("Branch\>\>HistName(nBin,xmin,xmax)","Condition","Option")
'''
## YCM ## YCM
f to find source f to find source
...@@ -8,4 +10,9 @@ ctrl-O to go back ...@@ -8,4 +10,9 @@ ctrl-O to go back
ctrl-I to go forward ctrl-I to go forward
## Cmake Set-up for clangd ## Cmake Set-up for clangd
'''
cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=1 cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=1
'''
## Do not forget
In project config modifiy analysis output before doing a test analysis
Source diff could not be displayed: it is too large. Options to address this: view the blob.
...@@ -2,3 +2,5 @@ ...@@ -2,3 +2,5 @@
echo "- executing snakemake file for npanalysis..." echo "- executing snakemake file for npanalysis..."
snakemake --cores 8 --forceall --keep-incomplete --keep-going --rerun-incomplete snakemake --cores 8 --forceall --keep-incomplete --keep-going --rerun-incomplete
echo "- snakemake executed successfully!" echo "- snakemake executed successfully!"
echo "- Merging file..."
root -q '../DataMacro/Merger.C(16,"root/analysis","VamosCalib241","../DataMacro/output/analysis/run_raw_241_")'
File deleted
...@@ -17,8 +17,7 @@ int FPMW_Section; ...@@ -17,8 +17,7 @@ int FPMW_Section;
///////////////////////////////////////////////////////// /////////////////////////////////////////////////////////
void LoadRootFile(){ void LoadRootFile(){
chain = new TChain("PhysicsTree"); chain = new TChain("PhysicsTree");
//chain->Add("../../root/analysis/run_48.root"); chain->Add("../../root/analysis/CalibVamos241.root");
chain->Add("../../root/analysis/235_Calib.root");
} }
///////////////////////////////////////////////////////// /////////////////////////////////////////////////////////
...@@ -31,7 +30,7 @@ void FillCharge(){ ...@@ -31,7 +30,7 @@ void FillCharge(){
for(int i=0; i<20; i++){ for(int i=0; i<20; i++){
TString histo_name = Form("hQ_sec%d",i); TString histo_name = Form("hQ_sec%d",i);
hQ[i] = new TH1F(histo_name,histo_name,1000,1000,2000); hQ[i] = new TH1F(histo_name,histo_name,1000,0,80);
} }
chain->SetBranchStatus("FF_Q13","true"); chain->SetBranchStatus("FF_Q13","true");
......
...@@ -36,21 +36,21 @@ void Fit(TH1F* histo, int section){ ...@@ -36,21 +36,21 @@ void Fit(TH1F* histo, int section){
TGraphErrors* gerr = new TGraphErrors(); TGraphErrors* gerr = new TGraphErrors();
int NumberOfQ = 9; int NumberOfQ = 16;
TF1* g[NumberOfQ]; TF1* g[NumberOfQ];
Double_t para[3*NumberOfQ]; Double_t para[3*NumberOfQ];
double mean = 1435; double mean = 30;
for(int i=0; i<NumberOfQ; i++){ for(int i=0; i<NumberOfQ; i++){
g[i] = new TF1(Form("g%i",i),"gaus",mean-20,mean+20); g[i] = new TF1(Form("g%i",i),"gaus",mean-4,mean+4);
g[i]->SetParLimits(0,0.1,5000); g[i]->SetParLimits(0,0.1,50000);
g[i]->SetParLimits(1,mean-20,mean+20); g[i]->SetParLimits(1,mean-4,mean+4);
g[i]->SetParLimits(2,5,11); g[i]->SetParLimits(2,0,10);
histo->Fit(g[i],"qR"); histo->Fit(g[i],"qR");
g[i]->Draw("lsame"); g[i]->Draw("lsame");
g[i]->GetParameters(&para[3*i]); g[i]->GetParameters(&para[3*i]);
mean+=41; mean+=1;
} }
TString total_func = "gaus(0)"; TString total_func = "gaus(0)";
...@@ -58,7 +58,7 @@ void Fit(TH1F* histo, int section){ ...@@ -58,7 +58,7 @@ void Fit(TH1F* histo, int section){
TString gaus_func = Form("gaus(%i)",3*i); TString gaus_func = Form("gaus(%i)",3*i);
total_func += "+" + gaus_func; total_func += "+" + gaus_func;
} }
TF1* total = new TF1("total",total_func,1400,1800); TF1* total = new TF1("total",total_func,0,90);
total->SetParameters(para); total->SetParameters(para);
for(int i=0; i<NumberOfQ; i++){ for(int i=0; i<NumberOfQ; i++){
total->SetParLimits(3*i+2,5,11); total->SetParLimits(3*i+2,5,11);
......
SECTION0 1 1 SECTION0 33.1304 0.0633994
SECTION1 1 1 SECTION1 -49.7408 2.50615
SECTION2 1 1 SECTION2 -71.5871 3.08848
SECTION3 1 1 SECTION3 -96.83 3.72384
SECTION4 1 1 SECTION4 -484.374 13.8765
SECTION5 1 1 SECTION5 -453.309 12.9068
SECTION6 1 1 SECTION6 -324.181 9.46006
SECTION7 1 1 SECTION7 -430.419 12.3514
SECTION8 1 1 SECTION8 -738.019 20.1523
SECTION9 1 1 SECTION9 -396.849 11.2195
SECTION10 1 1 SECTION10 -104.782 3.76115
SECTION11 1 1 SECTION11 -71.3748 2.91986
SECTION12 1 1 SECTION12 -123.052 4.15403
SECTION13 1 1 SECTION13 -283.529 8.04431
SECTION14 1 1 SECTION14 -89.5304 3.20939
SECTION15 1 1 SECTION15 -198.02 5.91474
SECTION16 1 1 SECTION16 -96.4962 3.41316
SECTION17 1 1 SECTION17 -1.19513e+10 3.02766e+08
SECTION18 1 1 SECTION18 -1.24254e+10 2.87594e+08
SECTION19 1 1 SECTION19 -1.2523e+10 7.94456e+07
No preview for this file type
...@@ -10,7 +10,7 @@ double TransfoPos(double X, vector<double> &EdgeBin, ...@@ -10,7 +10,7 @@ double TransfoPos(double X, vector<double> &EdgeBin,
void readVectorsFromFile(vector<vector<vector<double>>>& vec1, vector<vector<vector<double>>>& vec2, const string& filename) ; void readVectorsFromFile(vector<vector<vector<double>>>& vec1, vector<vector<vector<double>>>& vec2, const string& filename) ;
void LinearisationTransfo(int RunStart, int RunStop) { void LinearisationTransfo(const char*InputFile) {
// ************************************************************************** // **************************************************************************
// This macro linearize the reconstructed position for each event on each FPMW // This macro linearize the reconstructed position for each event on each FPMW
// //
...@@ -37,9 +37,9 @@ void LinearisationTransfo(int RunStart, int RunStop) { ...@@ -37,9 +37,9 @@ void LinearisationTransfo(int RunStart, int RunStop) {
// Import the chain // Import the chain
TChain *ch = new TChain("PhysicsTree"); TChain *ch = new TChain("PhysicsTree");
for (int run = RunStart; run <= RunStop; run++) { //for (int run = RunStart; run <= RunStop; run++) {
ch->Add(Form("../../root/analysis/linea_%d.root", run)); ch->Add(Form("../../root/analysis/%s.root", InputFile));
} // End of run loop //} // End of run loop
// HERE PUT THE RIGHT BIN EDGES !!!! to automatize // HERE PUT THE RIGHT BIN EDGES !!!! to automatize
vector<TH1F *> VarBin, DetUnmod, DetLinea; vector<TH1F *> VarBin, DetUnmod, DetLinea;
......
Source diff could not be displayed: it is too large. Options to address this: view the blob.
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