3 void MakeEfficiencyReport(const char* outputFile="JpsiEffReport.pdf",
4 const char* histos="jpsi_HistosSE.root",
5 const char* cf="jpsi_CF.root")
8 // Make a pdf file with the efficiency report
13 AliDielectronCFdraw d(cf);
14 d.SetRangeUser("PairType",1,1);
15 d.SetRangeUser("Y",-.89,.9,"0");
18 TFile f("jpsi_HistosSE.root");
20 AliDielectronHistos h;
21 TIter nextHists((TList*)f.Get("Dielectron_Histos"));
23 TPaveText pt(.02,.6,.98,.8);
24 TText *t1=pt.AddText("");
25 TText *t2=pt.AddText("");
27 TCanvas *c1=new TCanvas;
34 t1->SetTitle("Efficiency plots");
39 // d.DrawEfficiency("Pt","1;2;4;10;16;8",0);
40 d.DrawEfficiency("Pt","4;16;22",0);
45 // Efficiency as a function of the impact parameter
49 const Int_t impSteps=5;
50 Double_t impMax[impSteps]={.05,.04,.03,.02,.01};
51 TString title=d.GetCFContainer()->GetStepTitle(refStep);
52 // d.DrawEfficiency("Pt:Y","1;2;4;10;16;8",0);
53 d.DrawEfficiency("Pt",Form("%d",refStep),0,"sameleg2");
56 for (Int_t i=0; i<impSteps;++i){
57 d.SetRangeUser("Leg1_ImpactParXY",-1*impMax[i],impMax[i]);
58 d.SetRangeUser("Leg2_ImpactParXY",-1*impMax[i],impMax[i]);
59 d.GetCFContainer()->SetStepTitle(refStep, (title+Form(" |leg dXY|<%.2f",impMax[i])).Data());
60 d.DrawEfficiency("Pt",Form("%d",refStep),0,"same+leg2");
63 d.UnsetRangeUser("Leg1_ImpactParXY");
64 d.UnsetRangeUser("Leg2_ImpactParXY");
65 d.GetCFContainer()->SetStepTitle(refStep, title.Data());
66 ((TH1*)gPad->GetListOfPrimitives()->FindObject("eff_16/00"))->SetMaximum(1.);
72 d.SetRangeUser("Y",-.89,.9);
73 // d.DrawEfficiency("Pt:Y","1;2;4;10;16;8",0,"colz2");
74 d.DrawEfficiency("Pt:Y","4;16;22",0,"colz2");
81 // t1->SetTitle("Invariant Mass plots");
91 t1->SetTitle("QA summary plots for");
93 while ( (list=(THashList*)nextHists()) ){
94 h.SetHistogramList(*list);
95 t2->SetTitle(list->GetName());
107 const Int_t NCont=255;
109 TStyle *st = new TStyle("mystyle","mystyle");
110 gROOT->GetStyle("Plain")->Copy((*st));
116 st->SetNumberContours(NCont);
118 st->SetOptStat("erm");
120 st->SetGridColor(kGray+1);
121 st->SetPadGridX(kTRUE);
122 st->SetPadGridY(kTRUE);
123 st->SetPadTickX(kTRUE);
124 st->SetPadTickY(kTRUE);
127 const Int_t NRGBs = 5;
128 Double_t stops[NRGBs] = { 0.00, 0.34, 0.61, 0.84, 1.00 };
129 Double_t red[NRGBs] = { 0.00, 0.00, 0.87, 1.00, 0.51 };
130 Double_t green[NRGBs] = { 0.00, 0.81, 1.00, 0.20, 0.00 };
131 Double_t blue[NRGBs] = { 0.51, 1.00, 0.12, 0.00, 0.00 };
133 TColor::CreateGradientColorTable(NRGBs, stops, red, green, blue, NCont);