Skip to content
Snippets Groups Projects
Commit 9497e176 authored by Adrien Matta's avatar Adrien Matta :skull_crossbones:
Browse files

Merge branch 'NPTool.2.dev' of gitlab.in2p3.fr:np/nptool into NPTool.2.dev

parents f007e8a8 24c0b61f
No related branches found
No related tags found
1 merge request!27Draft: [Epic] Preparation of the environement for the new GaseousDetectorScorers...
Pipeline #346659 failed
Showing
with 351 additions and 18 deletions
TGraphErrors* GetGoodenYield(int A);
TGraphErrors* GetGoodenYield(int A, int year, double scale);
//////////////////////////////////////////////////
void PlotYieldEvolution(int A_asked=132){
void PlotYieldEvolution(int A_asked=99, double scale=1.2){
gROOT->SetStyle("pierre_style");
int Energy[11] = {6,7,8,9,10,11,12,13,14,15,16};
TGraphErrors* gevol = new TGraphErrors();
TGraphErrors* g_relative = new TGraphErrors();
......@@ -17,7 +18,7 @@ void PlotYieldEvolution(int A_asked=132){
double Sn = 6.534;
while(ifile>>A>>yield>>yield_err){
if(A==A_asked){
gevol->SetPoint(i,Energy[i]-Sn,1.*yield);
gevol->SetPoint(i,Energy[i]-Sn,scale*yield);
gevol->SetPointError(i,0,yield_err);
g_relative->SetPoint(i,Energy[i]-5.5,yield_err/yield);
......@@ -25,19 +26,33 @@ void PlotYieldEvolution(int A_asked=132){
}
}
TH2F* h2 = new TH2F("h2","h2",100,-1,10,100,1,10);
TCanvas* c1 = new TCanvas("c1","c1",800,1600);
c1->Divide(1,2);
c1->cd(1);
TH2F* h2 = new TH2F("h2","h2",100,-1,11.5,100,1,11.5);
TCanvas* c1 = new TCanvas("c1","c1",800,800);
c1->cd();
gevol->SetMarkerStyle(8);
gevol->SetMarkerSize(1);
gevol->SetMarkerSize(1.5);
h2->Draw();
gevol->Draw("psame");
if(A_asked==140 || A_asked==97 || A_asked==99 || A_asked==147 || A_asked==132 || A_asked==143){
TGraphErrors* ggooden = GetGoodenYield(A_asked);
ggooden->Draw("psame");
TGraphErrors* ggooden2016 = GetGoodenYield(A_asked,2016,1);
ggooden2016->SetMarkerStyle(22);
ggooden2016->SetMarkerColor(2);
ggooden2016->SetLineColor(2);
ggooden2016->SetMarkerSize(1.5);
ggooden2016->Draw("psame");
TGraphErrors* ggooden2024 = GetGoodenYield(A_asked,2024,1);
ggooden2024->SetMarkerStyle(23);
ggooden2024->SetMarkerColor(4);
ggooden2024->SetLineColor(4);
ggooden2024->SetMarkerSize(1.5);
ggooden2024->Draw("psame");
}
c1->cd(2);
gevol->Draw("psame");
TCanvas* c2 = new TCanvas("c2","c2",800,800);
c2->cd();
g_relative->SetMarkerStyle(8);
g_relative->Draw("ap");
......@@ -46,8 +61,8 @@ void PlotYieldEvolution(int A_asked=132){
//////////////////////////////////////////////////
TGraphErrors* GetGoodenYield(int A){
string filename = "gooden/mass_" + to_string(A) + ".dat";
TGraphErrors* GetGoodenYield(int A, int year, double scale=1){
string filename = "gooden/" + to_string(year) + "/mass_" + to_string(A) + ".dat";
ifstream ifile;
ifile.open(filename.c_str());
......@@ -57,12 +72,10 @@ TGraphErrors* GetGoodenYield(int A){
TGraphErrors* gerr = new TGraphErrors();
for(int i=0; i<8; i++){
ifile>>En>>Y>>Yerr;
gerr->SetPoint(i,En,Y);
gerr->SetPoint(i,En,scale*Y);
gerr->SetPointError(i,0,Yerr);
}
gerr->SetMarkerStyle(22);
gerr->SetMarkerColor(2);
return gerr;
return gerr;
}
0.58 5.11 0.26
1.37 5.41 0.27
2.37 5.48 0.28
3.60 5.42 0.27
4.49 5.23 0.27
5.50 4.90 0.23
8.90 4.17 0.32
14.8 3.95 0.17
0.58 5.49 0.20
1.37 5.38 0.17
2.37 5.52 0.18
3.60 5.52 0.16
4.49 5.23 0.19
5.50 5.07 0.15
8.90 4.79 0.32
14.8 3.95 0.17
0.58 4.38 0.16
1.37 4.46 0.16
2.37 4.48 0.17
3.60 4.58 0.18
4.49 4.34 0.22
5.50 4.06 0.15
8.90 3.78 0.24
14.8 2.90 0.14
0.58 2.01 0.08
1.37 2.13 0.03
2.37 2.29 0.11
3.60 2.39 0.10
4.49 2.34 0.1
5.50 2.34 0.11
8.90 2.01 0.22
14.8 1.67 0.08
0.58 5.47 0.17
1.37 5.56 0.17
2.37 5.93 0.18
3.60 5.90 0.15
4.49 5.77 0.18
5.50 5.83 0.17
8.90 5.36 0.34
14.8 4.74 0.17
0.58 6.79 0.31
1.37 6.95 0.32
2.37 7.11 0.33
3.60 6.87 0.33
4.49 6.73 0.29
5.50 6.63 0.29
8.90 5.90 0.39
14.8 5.42 0.26
5.5 4.04 0.20
6.5 3.84 0.14
7.5 3.80 0.15
9.0 3.54 0.14
11.0 3.54 0.15
5.5 4.99 0.09
6.5 4.84 0.08
7.5 4.79 0.10
9.0 4.64 0.09
11.0 4.34 0.11
5.5 3.50 0.07
6.5 3.41 0.07
7.5 3.48 0.07
9.0 3.31 0.07
11.0 2.84 0.09
5.5 2.43 0.05
6.5 1.97 0.04
7.5 1.86 0.04
9.0 1.72 0.04
11.0 1.64 0.06
5.5 5.96 0.10
6.5 5.79 0.08
7.5 5.73 0.09
9.0 5.57 0.09
11.0 5.63 0.12
5.5 5.98 0.14
6.5 6.24 0.12
7.5 6.23 0.13
9.0 5.96 0.13
11.0 5.64 0.16
int GetZHighestYield(string);
TGraph* g_light;
TGraph* g_heavy;
TGraphErrors* g_sym;
TGraph* g_light2;
TGraph* g_heavy2;
TGraph* g_light3;
TGraph* g_heavy3;
////////////////////////////////////////////
void HighestYield()
{
gROOT->SetStyle("pierre_style");
string filename = "asymmetry_file.dat";
//string filename = "list_asy.dat";
//string filename = "list_all.dat";
//string filename = "list_s455.dat";
ifstream ifile;
ifile.open(filename.c_str());
g_light = new TGraph();
g_light2 = new TGraph();
g_light3 = new TGraph();
g_heavy = new TGraph();
g_heavy2 = new TGraph();
g_heavy3 = new TGraph();
g_sym = new TGraphErrors();
int Z;
int A;
int N;
int i=0;
NPL::Particle* iso;
double asy;
while(ifile>>Z>>N>>asy){
A = Z+N;
//ifile >> Z >> A;
iso = new NPL::Particle(Z,A);
string isoname = iso->GetName();
double fissility = Z*Z/pow(A,1./3.);
//double fissility = (double)Z*(double)Z/(double)A;
if(Z==92)
isoname.resize(4);
else
isoname.resize(5);
string yield_filename = "dat/yield_" + isoname + ".dat";
int z_light = GetZHighestYield(yield_filename);
int z_heavy = Z - z_light;
double z_sym = (double)Z/2.;
if((Z<83 || Z>88) && asy>10 && z_light>33){
//if(asy>0 && z_light>33){
g_light->SetPoint(i,fissility,z_light);
g_light2->SetPoint(i,Z,z_light);
g_light3->SetPoint(i,N,z_light);
g_heavy->SetPoint(i,fissility,z_heavy);
g_heavy2->SetPoint(i,Z,z_heavy);
g_heavy3->SetPoint(i,N,z_heavy);
//g_sym->SetPoint(i,fissility,z_sym);
//g_sym->SetPointError(i,0.2,0.2);
cout << Z << " " << A << " / " << z_light << " - " << z_heavy << endl;
i++;
}
}
g_sym->SetPoint(0,77*77./pow(174,1./3.),38.5);
g_sym->SetPointError(0,0.,0.1);
g_sym->SetPoint(1,93*93./pow(237,1./3.),46.5);
g_sym->SetPointError(1,0.,0.1);
// *************************************************** //
TH2F* h2 = new TH2F("h2","h2",100,1060,1410,100,33,56);
//TH2F* h2 = new TH2F("h2","h2",100,0,100,100,30,60);
h2->GetXaxis()->SetTitle("Z^{2}_{CN}/A^{1/3}");
h2->GetYaxis()->SetTitle("Z_{FF}");
h2->GetXaxis()->CenterTitle();
h2->GetYaxis()->CenterTitle();
h2->GetXaxis()->SetLabelSize(0.04);
h2->GetXaxis()->SetTitleSize(0.04);
h2->GetXaxis()->SetTitleOffset(1.3);
h2->GetYaxis()->SetLabelSize(0.04);
h2->GetYaxis()->SetTitleSize(0.04);
h2->GetYaxis()->SetTitleOffset(1.3);
h2->GetXaxis()->SetNdivisions(505);
h2->GetYaxis()->SetNdivisions(505);
g_light->SetMarkerStyle(8);
g_light->SetMarkerColor(2);
g_light->SetMarkerSize(2);
g_heavy->SetMarkerStyle(33);
g_heavy->SetMarkerColor(4);
g_heavy->SetMarkerSize(2);
g_sym->SetMarkerColor(1);
g_sym->SetMarkerStyle(21);
TCanvas* c1 = new TCanvas("c1","c1",800,800);
c1->cd();
h2->Draw();
g_light->Draw("psame");
g_heavy->Draw("psame");
TLatex* t36 = new TLatex(1010, 35.5,"Z_{L}#approx36");
TLatex* t54 = new TLatex(1410, 53.5,"Z_{H}#approx54");
t36->SetTextColor(2);
t54->SetTextColor(4);
t36->SetTextSize(0.03);
t54->SetTextSize(0.03);
//t36->Draw("same");
//t54->Draw("same");
g_sym->SetFillColor(1);
g_sym->Draw("3same");
// *************************************************** //
TH2F* h3 = new TH2F("h3","h3",100,76,94,100,33,56);
h3->GetXaxis()->SetTitle("Z_{CN}");
h3->GetYaxis()->SetTitle("Z_{FF}");
h3->GetXaxis()->CenterTitle();
h3->GetYaxis()->CenterTitle();
g_light2->SetMarkerStyle(8);
g_light2->SetMarkerColor(2);
g_light2->SetMarkerSize(2);
g_heavy2->SetMarkerStyle(33);
g_heavy2->SetMarkerColor(4);
g_heavy2->SetMarkerSize(2);
/*TCanvas* c2 = new TCanvas("c2","c2",800,800);
c2->cd();
h3->Draw();
g_heavy2->Draw("psame");
g_light2->Draw("psame");*/
// *************************************************** //
TH2F* h4 = new TH2F("h4","h4",100,90,150,100,33,56);
h4->GetXaxis()->SetTitle("N_{CN}");
h4->GetYaxis()->SetTitle("Z_{FF}");
h4->GetXaxis()->CenterTitle();
h4->GetYaxis()->CenterTitle();
g_light3->SetMarkerStyle(8);
g_light3->SetMarkerColor(2);
g_light3->SetMarkerSize(2);
g_heavy3->SetMarkerStyle(33);
g_heavy3->SetMarkerColor(4);
g_heavy3->SetMarkerSize(2);
/*TCanvas* c3 = new TCanvas("c3","c3",800,800);
c3->cd();
h4->Draw();
g_heavy3->Draw("psame");
g_light3->Draw("psame");*/
// Theory results //
TGraph* gZL = new TGraph();
TGraph* gZH = new TGraph();
string filename_th = "Theory/Z_FF_Bernard.dat";
ifstream ifile_th;
ifile_th.open(filename_th.c_str());
int Z_CN;
int A_CN;
int Z_L;
int Z_H;
int i_th=0;
while(ifile_th>>Z_CN>>A_CN>>Z_L>>Z_H){
i_th++;
gZL->SetPoint(i_th,pow(Z_CN,2)/pow(A_CN,1./3.),Z_L);
gZH->SetPoint(i_th,pow(Z_CN,2)/pow(A_CN,1./3.),Z_H);
}
gZL->SetMarkerStyle(22);
gZH->SetMarkerStyle(23);
//gZL->SetMarkerColor(8);
gZL->SetMarkerColor(1);
//gZH->SetMarkerColor(kGray+1);
gZH->SetMarkerColor(1);
gZL->SetMarkerSize(1.3);
gZH->SetMarkerSize(1.3);
gZL->SetLineWidth(4);
gZH->SetLineWidth(4);
c1->cd();
//gZL->Draw("psame");
//gZH->Draw("psame");
}
////////////////////////////////////////////
int GetZHighestYield(string filename)
{
ifstream ifile;
cout << "*** opening " << filename << endl;
ifile.open(filename.c_str());
vector<int> v_Z;
vector<double> v_yield;
vector<double> v_yield_err;
int Z;
double yield;
double yield_err;
double yield_max=0;
int i=0;
int imax=0;
while(ifile >> Z >> yield >> yield_err){
v_Z.push_back(Z);
v_yield.push_back(yield);
if(yield>yield_max){
yield_max = yield;
imax=i;
}
i++;
}
ifile.close();
int z_max = v_Z[imax];
return z_max;
}
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