Ignore:
Timestamp:
May 30, 2006, 11:32:37 AM (18 years ago)
Author:
campagne
Message:

new version

File:
1 edited

Legend:

Unmodified
Added
Removed
  • GLBFrejus/HEAD/run/sensi.C

    r2 r154  
    11{
    22
    3   gROOT->LoadMacro("TDSyst.C++");
     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 = -180.; //degree
     13  Double_t deltaMax =  180.;
     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
    424  TCanvas* c1 = new TCanvas("c1","Contour",100,100,600,600);
    5   c1->SetGridx();
    6   c1->SetGridy();
     25  //  c1->SetGridx();
     26  // c1->SetGridy();
    727  c1->SetLogy();
    828
    9   TH2D* hdum = new TH2D("hdum","Theta vs Delta",41,-180,180,31,1e-4,1e-1);
    10   hdum->SetXTitle("#delta_{CP} (deg)");
     29  TH2D* hdum = new TH2D("hdum","",
     30                        nDeltaCP,deltaMin,deltaMax,
     31                        nLogSin22q13,TMath::Power(10.,logSin2Min),
     32                        TMath::Power(10.,logSin2Max)
     33                        );
     34  hdum->SetXTitle("#delta_{CP} (deg.)");
    1135  hdum->SetYTitle("sin^{2}(2#theta_{13})");
    1236  hdum->Draw();
     
    1943  overlay->SetFillStyle(4000);
    2044  overlay->Draw();
    21   overlay->Range(-180.,-4,180.,-1);
     45  overlay->Range(deltaMin,logSin2Min,deltaMax,logSin2Max);
    2246
    23   //Original
    24   TFile* file1 = new TFile("./SPLDeltaTheta2+8OldFluxCorr.root");
    25   TTree* tree1 = (TTree*)file1->Get("SplGlb");
    26   TDSyst* comp1 = new TDSyst(tree1,"h1");
    27   comp1->Loop();
     47  TFile f1("./SPLSensi440kT.root");
     48  TTree* tree1 = (TTree*)f1.Get("SplGlb");
     49  TH2D* histo1 = new TH2D("histo1"," Theta vs Delta",
     50                          nDeltaCP,deltaEdgeMin,deltaEdgeMax,
     51                          nLogSin22q13,logSin2EdgeMin,logSin2EdgeMax
     52                          );
    2853
    29   TH2D* h1 = comp1->GetHisto();
    30   h1->SetContour(1);
    31   h1->SetContourLevel(0,4.605); //Chi2 for 2 dof and 90% CL
    32   //  h1->SetLineStyle(2);
    33   h1->SetLineColor(4); //blue
     54  tree1->Project(histo1->GetName(),"TMath::Log10(pow(sin(2*theta13),2)):deltaCP/pi*180.","chi2");
     55  histo1->SetContour(1);
     56  histo1->SetContourLevel(0,4.605); //Chi2 for 2 dof and 90% CL
     57  histo1->SetLineColor(2); //red
    3458  overlay->cd();
    35   h1->Draw("CONT3 SAME");
    36   overlay->Update();
     59  histo1->Draw("CONT3 SAME");
     60  leg->AddEntry(histo1,"440kT","l");
    3761
    38   //Comp
    39   TFile* file2 = new TFile("./OptiFlux/SPLDeltaThetaSens.root");
    40   TTree* tree2 = (TTree*)file2->Get("SplGlb");
    41   TDSyst* comp2 = new TDSyst(tree2,"h2");
    42   comp2->Loop();
    4362
    44   TH2D* h2 = comp2->GetHisto();
    45   h2->SetContour(1);
    46   h2->SetContourLevel(0,4.605); //Chi2 for 2 dof and 90% CL
    47   h2->SetLineColor(2); //red
     63  TFile f2("./SPLSensi330kT.root");
     64  TTree* tree2 = (TTree*)f2.Get("SplGlb");
     65  TH2D* histo2 = new TH2D("histo2"," Theta vs Delta",
     66                          nDeltaCP,deltaEdgeMin,deltaEdgeMax,
     67                          nLogSin22q13,logSin2EdgeMin,logSin2EdgeMax
     68                          );
     69
     70  tree2->Project(histo2->GetName(),"TMath::Log10(pow(sin(2*theta13),2)):deltaCP/pi*180.","chi2");
     71  histo2->SetContour(1);
     72  histo2->SetContourLevel(0,4.605); //Chi2 for 2 dof and 90% CL
     73  histo2->SetLineStyle(2); //dashed
     74  histo2->SetLineColor(2); //red
    4875  overlay->cd();
    49   h2->Draw("CONT3 SAME");
    50   overlay->Update();
     76  histo2->Draw("CONT3 SAME");
     77  leg->AddEntry(histo2,"330kT","l");
    5178
    52   //Comp
    53   TFile* file3 = new TFile("./OptiFlux/SPLDeltaThetaRateCorr.root");
    54   TTree* tree3 = (TTree*)file3->Get("SplGlb");
    55   TDSyst* comp3 = new TDSyst(tree3,"h3");
    56   comp3->Loop();
    5779
    58   TH2D* h3 = comp3->GetHisto();
    59   h3->SetContour(1);
    60   h3->SetContourLevel(0,4.605); //Chi2 for 2 dof and 90% CL
    61   h3->SetLineColor(6); //blue
     80  TFile f3("./SPLSensi220kT.root");
     81  TTree* tree3 = (TTree*)f3.Get("SplGlb");
     82  TH2D* histo3 = new TH2D("histo3"," Theta vs Delta",
     83                          nDeltaCP,deltaEdgeMin,deltaEdgeMax,
     84                          nLogSin22q13,logSin2EdgeMin,logSin2EdgeMax
     85                          );
     86
     87  tree3->Project(histo3->GetName(),"TMath::Log10(pow(sin(2*theta13),2)):deltaCP/pi*180.","chi2");
     88  histo3->SetContour(1);
     89  histo3->SetContourLevel(0,4.605); //Chi2 for 2 dof and 90% CL
     90  histo3->SetLineStyle(3); //dotted
     91  histo3->SetLineColor(2); //red
    6292  overlay->cd();
    63   h3->Draw("CONT3 SAME");
     93  histo3->Draw("CONT3 SAME");
     94  leg->AddEntry(histo3,"220kT","l");
     95
     96
     97
     98
     99
     100  //Add text
     101
     102  TLatex* txt1 = new TLatex(-150,-3.7,"90% CL");
     103  txt1->SetTextSize(0.07);
     104  txt1->Draw();
     105
     106  TLatex* txt2 = new TLatex(-150,-2.3,"2y(+) & 8y(-)");
     107  txt2->SetTextSize(0.07);
     108  txt2->Draw();
     109
     110
     111  TLatex* txt3 = new TLatex(60,-3.7,"#delta^{tr}_{CP}=#theta^{tr}_{13}=0");
     112  txt3->SetTextSize(0.07);
     113  txt3->Draw();
     114
     115
     116
     117  leg->Draw("SAME");
    64118  overlay->Update();
    65119
Note: See TracChangeset for help on using the changeset viewer.