Skip to content
Snippets Groups Projects
Commit 8cb5e419 authored by Pierre Morfouace's avatar Pierre Morfouace
Browse files

update on sofia macro

parent d5895564
No related branches found
No related tags found
No related merge requests found
TFile* file_197At;
TFile* file_199At;
TFile* file_207Fr;
TFile* file_204Fr;
TFile* file_175Pt;
TFile* file_184Hg;
TFile* file_182Hg;
TFile* file_180Hg;
TFile* file_187Pb;
TFile* file_189Pb;
TFile* file_216Th;
TFile* file_221Pa;
TH2F* h2_197At;
TH2F* h2_199At;
TH2F* h2_207Fr;
TH2F* h2_204Fr;
TH2F* h2_175Pt;
TH2F* h2_184Hg;
TH2F* h2_182Hg;
TH2F* h2_180Hg;
TH2F* h2_187Pb;
TH2F* h2_189Pb;
TH2F* h2_216Th;
TH2F* h2_221Pa;
void DrawID()
{
gROOT->SetStyle("pierre_style");
file_189Pb = new TFile("root/hBeamID_189Pb.root");
file_182Hg = new TFile("root/hBeamID_182Hg.root");
file_197At = new TFile("root/hBeamID_197At.root");
file_199At = new TFile("root/hBeamID_199At.root");
file_207Fr = new TFile("root/hBeamID_207Fr.root");
file_204Fr = new TFile("root/hBeamID_204Fr.root");
file_175Pt = new TFile("root/hBeamID_175Pt.root");
file_184Hg = new TFile("root/hBeamID_184Hg.root");
file_187Pb = new TFile("root/hBeamID_187Pb.root");
file_180Hg = new TFile("root/hBeamID_180Hg.root");
file_216Th = new TFile("root/hBeamID_216Th.root");
file_221Pa = new TFile("root/hBeamID_221Pa.root");
h2_189Pb = (TH2F*) file_189Pb->FindObjectAny("hbid");
h2_182Hg = (TH2F*) file_182Hg->FindObjectAny("hbid");
h2_197At = (TH2F*) file_197At->FindObjectAny("hbid");
h2_199At = (TH2F*) file_199At->FindObjectAny("hbid");
h2_207Fr = (TH2F*) file_207Fr->FindObjectAny("hbid");
h2_204Fr = (TH2F*) file_204Fr->FindObjectAny("hbid");
h2_175Pt = (TH2F*) file_175Pt->FindObjectAny("hbid");
h2_184Hg = (TH2F*) file_184Hg->FindObjectAny("hbid");
h2_187Pb = (TH2F*) file_187Pb->FindObjectAny("hbid");
h2_180Hg = (TH2F*) file_180Hg->FindObjectAny("hbid");
h2_216Th = (TH2F*) file_216Th->FindObjectAny("hbid");
h2_221Pa = (TH2F*) file_221Pa->FindObjectAny("hbid");
h2_189Pb->Add(h2_180Hg);
h2_189Pb->Add(h2_182Hg);
h2_189Pb->Add(h2_184Hg);
h2_189Pb->Add(h2_187Pb);
h2_189Pb->Add(h2_175Pt);
h2_189Pb->Add(h2_204Fr);
h2_189Pb->Add(h2_207Fr);
h2_189Pb->Add(h2_199At);
h2_189Pb->Add(h2_197At);
h2_189Pb->Add(h2_216Th);
h2_189Pb->Add(h2_221Pa);
TCanvas* c1 = new TCanvas("c1","c1",2000,1600);
c1->SetLogz();
c1->SetGridx();
c1->SetGridy();
h2_189Pb->SetMinimum(3);
h2_189Pb->GetXaxis()->SetTitle("Mass-to-charge ratio");
h2_189Pb->GetYaxis()->SetTitle("Proton number Z");
h2_189Pb->GetXaxis()->SetRangeUser(2.22,2.50);
h2_189Pb->GetYaxis()->SetRangeUser(76.5,91);
h2_189Pb->GetXaxis()->SetTitleSize(0.03);
h2_189Pb->GetXaxis()->SetLabelSize(0.03);
h2_189Pb->GetXaxis()->SetTitleOffset(1.2);
h2_189Pb->GetYaxis()->SetTitleSize(0.03);
h2_189Pb->GetYaxis()->SetLabelSize(0.03);
h2_189Pb->GetYaxis()->SetTitleOffset(1.2);
h2_189Pb->Draw("col");
// Draw cuts
TCutG* cut_beam[12];
double Q[12] = {78,80,80,80,82,82,85,85,87,87,90,91};
double A[12] = {175,180,182,184,187,189,197,199,204,207,216,221};
double AoQ[12];
for(int i=0; i<12; i++){
AoQ[i] = A[i]/Q[i];
cut_beam[i] = new TCutG(Form("cut_beam%i",i+1));
cut_beam[i]->SetName(Form("cut_beam%i",i+1));
cut_beam[i]->SetVarX("fBeam_AoQ");
cut_beam[i]->SetVarY("fBeam_Z");
}
double x, y;
double Rx = 0.005;
double Ry = 0.55;
for(int i=0; i<12; i++){
for(int j=0; j<360; j++){
x = AoQ[i] + Rx*cos(j*TMath::Pi()/180.);
y = Q[i] + Ry*sin(j*TMath::Pi()/180.);
cut_beam[i]->SetPoint(j,x,y);
}
cut_beam[i]->SetLineColor(2);
cut_beam[i]->SetLineWidth(2);
//cut_beam[i]->Draw("lsame");
}
TLatex t_elt;
t_elt.SetTextSize(0.032);
t_elt.DrawLatex(2.34,77-0.1,"^{172-175}Ir");
t_elt.DrawLatex(2.35,78-0.1,"^{174-178}Pt");
t_elt.DrawLatex(2.36,79-0.1,"^{176-182}Au");
t_elt.DrawLatex(2.38,80-0.1,"^{180-186}Hg");
t_elt.DrawLatex(2.39,81-0.1,"^{183-188}Tl");
t_elt.DrawLatex(2.39,82-0.1,"^{186-194}Pb");
t_elt.DrawLatex(2.40,83-0.1,"^{189-197}Bi");
t_elt.DrawLatex(2.41,84-0.1,"^{192-201}Po");
t_elt.DrawLatex(2.42,85-0.1,"^{196-203}At");
t_elt.DrawLatex(2.43,86-0.1,"^{200-206}Rn");
t_elt.DrawLatex(2.45,87-0.1,"^{203-211}Fr");
t_elt.DrawLatex(2.455,88-0.1,"^{209-214}Ra");
t_elt.DrawLatex(2.455,89-0.1,"^{212-218}Ac");
t_elt.DrawLatex(2.455,90-0.1,"^{216-220}Th");
}
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