source: GLBFrejus/HEAD/run/discoTheta13.C@ 689

Last change on this file since 689 was 154, checked in by campagne, 19 years ago

new version

File size: 4.3 KB
Line 
1{
2
3 Int_t nLogSin22q13 = 21;
4 Double_t logSin2Min = -4;
5 Double_t logSin2Max = -2;
6 Double_t logSin2BinWidth =
7 (logSin2Max - logSin2Min)/double(nLogSin22q13-1.);
8 Double_t logSin2EdgeMax = logSin2Max + logSin2BinWidth/2.;
9 Double_t logSin2EdgeMin = logSin2Min - logSin2BinWidth/2.;
10
11 Int_t nDeltaCP = 31;
12 Double_t deltaMin = 0.; //rad/pi
13 Double_t deltaMax = 2.;
14 Double_t deltaBinWidth = (deltaMax - deltaMin)/double(nDeltaCP-1.);
15 Double_t deltaEdgeMax = deltaMax + deltaBinWidth/2.;
16 Double_t deltaEdgeMin = deltaMin - deltaBinWidth/2.;
17
18 TLegend* leg = new TLegend(0.6,0.7,0.9,0.9);
19 leg->SetTextFont(gStyle->GetTextFont());
20 leg->SetTextSize(0.07);
21 leg->SetFillColor(10);
22
23
24 TCanvas* c1 = new TCanvas("c1","Contour",100,100,600,600);
25 // c1->SetGridx();
26 // c1->SetGridy();
27 c1->SetLogx();
28
29 // TH2D* hdum = new TH2D("hdum","3#sigma #theta_{13} discovery (#Delta #chi^{2}=9,1dof)",
30 TH2D* hdum = new TH2D("hdum","",
31 nLogSin22q13,TMath::Power(10.,logSin2Min),
32 TMath::Power(10.,logSin2Max),
33 nDeltaCP,deltaMin,deltaMax
34 );
35 hdum->SetYTitle("true #delta_{CP}/#pi");
36 hdum->SetXTitle("true sin^{2}(2#theta_{13})");
37 hdum->Draw();
38
39 TPad *overlay = new TPad("overlay","",
40 gStyle->GetPadLeftMargin(),
41 gStyle->GetPadBottomMargin(),
42 1-gStyle->GetPadRightMargin(),
43 1-gStyle->GetPadTopMargin());
44 overlay->SetFillStyle(4000);
45 overlay->Draw();
46 overlay->Range(logSin2Min,deltaMin,logSin2Max,deltaMax);
47
48
49 TFile f1("./SPLThetaDiscoTest-h0-o0.root");
50 TTree* tree1 = (TTree*)f1.Get("SplGlb");
51 TH2D* histo1 = new TH2D("histo1"," Theta vs Delta",
52 nLogSin22q13,logSin2EdgeMin,logSin2EdgeMax,
53 nDeltaCP,deltaEdgeMin,deltaEdgeMax
54 );
55
56 tree1->Project(histo1->GetName(),"deltaCP/pi:TMath::Log10(pow(sin(2*theta13),2))","chi2");
57
58 histo1->SetContour(1);
59 histo1->SetContourLevel(0,9); //Chi2 for 1 dof and 3sigma
60 histo1->SetLineColor(2); //red
61 overlay->cd();
62 histo1->Draw("CONT3 SAME");
63 // leg->AddEntry(histo1,"H^{tr} O^{tr}","l");
64 leg->AddEntry(histo1,"440kT","l");
65
66
67 TPaveLabel* text = new TPaveLabel(-3.7,1.,-2.7,1.1,"true sin^{2}(#theta_{23})=0.4");
68 text->SetBorderSize(0);
69 text->SetFillColor(10);
70 text->SetTextSize(1.0);
71 text->Draw("SAME");
72
73 TLatex* txt1 = new TLatex(-3.7,0.2,"3#sigma");
74 txt1->SetTextSize(0.1);
75 txt1->Draw();
76
77
78
79// TFile f2("./SPLThetaDiscovery-h1-o0.root");
80// TTree* tree2 = (TTree*)f2.Get("SplGlb");
81// TH2D* histo2 = new TH2D("histo2"," Theta vs Delta",
82// nLogSin22q13,logSin2EdgeMin,logSin2EdgeMax,
83// nDeltaCP,deltaEdgeMin,deltaEdgeMax
84// );
85// tree2->Project(histo2->GetName(),"deltaCP/pi:TMath::Log10(pow(sin(2*theta13),2))","chi2");
86
87// histo2->SetContour(1);
88// histo2->SetContourLevel(0,9); //Chi2 for 1 dof and 3sigma
89// histo2->SetLineStyle(2); //dashed
90// histo2->SetLineColor(4); //blue
91// overlay->cd();
92// histo2->Draw("CONT3 SAME");
93// leg->AddEntry(histo2,"H^{wr} O^{tr}","l");
94
95
96// TFile f3("./SPLThetaDiscovery220kT-h0-o0.root");
97// TTree* tree3 = (TTree*)f3.Get("SplGlb");
98// TH2D* histo3 = new TH2D("histo3"," Theta vs Delta",
99// nLogSin22q13,logSin2EdgeMin,logSin2EdgeMax,
100// nDeltaCP,deltaEdgeMin,deltaEdgeMax
101// );
102// tree3->Project(histo3->GetName(),"deltaCP/pi:TMath::Log10(pow(sin(2*theta13),2))","chi2");
103
104// histo3->SetContour(1);
105// histo3->SetContourLevel(0,9); //Chi2 for 1 dof and 3sigma
106// histo3->SetLineStyle(2); //dashed
107// histo3->SetLineColor(4); //blue
108// overlay->cd();
109// histo3->Draw("CONT3 SAME");
110// leg->AddEntry(histo3,"220kT","l");
111// // leg->AddEntry(histo3,"H^{tr} O^{wr}","l");
112
113
114// TFile f4("./SPLThetaDiscovery-h1-o1.root");
115// TTree* tree4 = (TTree*)f4.Get("SplGlb");
116// TH2D* histo4 = new TH2D("histo4"," Theta vs Delta",
117// nLogSin22q13,logSin2EdgeMin,logSin2EdgeMax,
118// nDeltaCP,deltaEdgeMin,deltaEdgeMax
119// );
120// tree4->Project(histo4->GetName(),"deltaCP/pi:TMath::Log10(pow(sin(2*theta13),2))","chi2");
121
122// histo4->SetContour(1);
123// histo4->SetContourLevel(0,9); //Chi2 for 1 dof and 3sigma
124// histo4->SetLineStyle(2); //dashed
125// histo4->SetLineColor(5); //yellow
126// overlay->cd();
127// histo4->Draw("CONT3 SAME");
128// leg->AddEntry(histo4,"H^{wr} O^{wr}","l");
129
130
131
132 leg->Draw("SAME");
133 overlay->Update();
134
135
136
137
138 // TCanvas c2;
139 //histo1->Draw("SURF");
140
141
142
143}
Note: See TracBrowser for help on using the repository browser.