]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
fix broken compilation
authorabercuci <abercuci@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 16 Feb 2009 09:47:26 +0000 (09:47 +0000)
committerabercuci <abercuci@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 16 Feb 2009 09:47:26 +0000 (09:47 +0000)
TRD/qaRec/AliTRDpidChecker.cxx

index 3e49ca49b1dfe14ac508e0ad034de0acb0074fdd..b6de1a3ed5af8bc7b17def44c5bd39052b554351 100644 (file)
@@ -649,14 +649,13 @@ Bool_t AliTRDpidChecker::GetRefFigure(Int_t ifig)
   TH1 *h1 = 0x0, *h=0x0;
   TH2 *h2 = 0x0;
   TList *content = 0x0;
+  TLegend *leg = new TLegend(.7, .7, .98, .98); leg->SetBorderSize(1);
   switch(ifig){
   case kEfficiency:
-    TLegend *legEff = new TLegend(.7, .7, .98, .98);
-    legEff->SetBorderSize(1);
     content = (TList *)fGraph->FindObject("Efficiencies");
     if(!(g = (TGraphErrors*)content->At(AliTRDpidUtil::kLQ))) break;
     if(!g->GetN()) break;
-    legEff->SetHeader("PID Method");
+    leg->SetHeader("PID Method");
     g->Draw("apl");
     ax = g->GetHistogram()->GetXaxis();
     ax->SetTitle("p (GeV/c)");
@@ -665,14 +664,14 @@ Bool_t AliTRDpidChecker::GetRefFigure(Int_t ifig)
     ax = g->GetHistogram()->GetYaxis();
     ax->SetTitle("#epsilon_{#pi}");
     ax->SetRangeUser(1.e-3, 1.e-1);
-    legEff->AddEntry(g, "2D LQ", "pl");
+    leg->AddEntry(g, "2D LQ", "pl");
     if(! (g = (TGraphErrors*)content->At(AliTRDpidUtil::kNN))) break;
     g->Draw("pl");
-    legEff->AddEntry(g, "NN", "pl");
+    leg->AddEntry(g, "NN", "pl");
     if(! (g = (TGraphErrors*)content->At(AliTRDpidUtil::kESD))) break;
     g->Draw("p");
-    legEff->AddEntry(g, "ESD", "pl");
-    legEff->Draw();
+    leg->AddEntry(g, "ESD", "pl");
+    leg->Draw();
     gPad->SetLogy();
     gPad->SetLogx();
     gPad->SetGridy();
@@ -680,11 +679,9 @@ Bool_t AliTRDpidChecker::GetRefFigure(Int_t ifig)
     return kTRUE;
   case kdEdx:
     // save 2.0 GeV projection as reference
-    TLegend *legdEdx = new TLegend(.7, .7, .98, .98);
-    legdEdx->SetBorderSize(1);
     FIRST = kTRUE;
     if(!(h2 = (TH2F*)(fContainer->At(kdEdx)))) break;
-    legdEdx->SetHeader("Particle Species");
+    leg->SetHeader("Particle Species");
     for(Int_t is = AliPID::kSPECIES-1; is>=0; is--){
       Int_t bin = FindBin(is, 2.);
       h1 = h2->ProjectionY("px", bin, bin);
@@ -696,11 +693,11 @@ Bool_t AliTRDpidChecker::GetRefFigure(Int_t ifig)
         h1->GetYaxis()->SetTitle("<Entries>");
       }
       h = (TH1F*)h1->DrawClone(FIRST ? "c" : "samec");
-      legdEdx->AddEntry(h, Form("%s", AliTRDCalPID::GetPartName(is)), "l");
+      leg->AddEntry(h, Form("%s", AliTRDCalPID::GetPartName(is)), "l");
       FIRST = kFALSE;
     }
     if(FIRST) break;
-    legdEdx->Draw();
+    leg->Draw();
     gPad->SetLogy();
     gPad->SetLogx(0);
     gPad->SetGridy();
@@ -710,11 +707,9 @@ Bool_t AliTRDpidChecker::GetRefFigure(Int_t ifig)
     break;
   case kPH:
     // save 2.0 GeV projection as reference
-    TLegend *legPH = new TLegend(.4, .7, .68, .98);
-    legPH->SetBorderSize(1);
     FIRST = kTRUE;
     if(!(h2 = (TH2F*)(fContainer->At(kPH)))) break;;
-    legPH->SetHeader("Particle Species");
+    leg->SetHeader("Particle Species");
     for(Int_t is=0; is<AliPID::kSPECIES; is++){
       Int_t bin = FindBin(is, 2.);
       h1 = h2->ProjectionY("py", bin, bin);
@@ -727,11 +722,11 @@ Bool_t AliTRDpidChecker::GetRefFigure(Int_t ifig)
         h1->GetYaxis()->SetTitle("<PH> (a.u.)");
       }
       h = (TH1F*)h1->DrawClone(FIRST ? "c" : "samec");
-      legPH->AddEntry(h, Form("%s", AliTRDCalPID::GetPartName(is)), "pl");
+      leg->AddEntry(h, Form("%s", AliTRDCalPID::GetPartName(is)), "pl");
       FIRST = kFALSE;
     }
     if(FIRST) break;
-    legPH->Draw();
+    leg->Draw();
     gPad->SetLogy(0);
     gPad->SetLogx(0);
     gPad->SetGridy();
@@ -739,11 +734,9 @@ Bool_t AliTRDpidChecker::GetRefFigure(Int_t ifig)
     return kTRUE;
   case kNClus:
     // save 2.0 GeV projection as reference
-    TLegend *legNClus = new TLegend(.4, .7, .68, .98);
-    legNClus->SetBorderSize(1);
     FIRST = kTRUE;
     if(!(h2 = (TH2F*)(fContainer->At(kNClus)))) break;
-    legNClus->SetHeader("Particle Species");
+    leg->SetHeader("Particle Species");
     for(Int_t is=0; is<AliPID::kSPECIES; is++){
       Int_t bin = FindBin(is, 2.);
       h1 = h2->ProjectionY("py", bin, bin);
@@ -755,11 +748,11 @@ Bool_t AliTRDpidChecker::GetRefFigure(Int_t ifig)
       if(FIRST) h1->GetXaxis()->SetTitle("N^{cl}/tracklet");
       if(FIRST) h1->GetYaxis()->SetTitle("<Entries>");
       h = (TH1F*)h1->DrawClone(FIRST ? "c" : "samec");
-      legNClus->AddEntry(h, Form("%s", AliTRDCalPID::GetPartName(is)), "l");
+      leg->AddEntry(h, Form("%s", AliTRDCalPID::GetPartName(is)), "l");
       FIRST = kFALSE;
     }
     if(FIRST) break;
-    legNClus->Draw();
+    leg->Draw();
     gPad->SetLogy();
     gPad->SetLogx(0);
     gPad->SetGridy();
@@ -769,12 +762,10 @@ Bool_t AliTRDpidChecker::GetRefFigure(Int_t ifig)
   case kMomentumBin:
     break; 
   case kThresh:
-    TLegend *legThre = new TLegend(.7, .3, .98, .58);
-    legThre->SetBorderSize(1);
     content = (TList *)fGraph->FindObject("Thresholds");
     if(!(g = (TGraphErrors*)content->At(AliTRDpidUtil::kLQ))) break;
     if(!g->GetN()) break;
-    legThre->SetHeader("PID Method");
+    leg->SetHeader("PID Method");
     g->Draw("apl");
     ax = g->GetHistogram()->GetXaxis();
     ax->SetTitle("p (GeV/c)");
@@ -783,14 +774,14 @@ Bool_t AliTRDpidChecker::GetRefFigure(Int_t ifig)
     ax = g->GetHistogram()->GetYaxis();
     ax->SetTitle("threshold (%)");
     ax->SetRangeUser(5.e-2, 1.);
-    legThre->AddEntry(g, "2D LQ", "pl");
+    leg->AddEntry(g, "2D LQ", "pl");
     if(!(g = (TGraphErrors*)content->At(AliTRDpidUtil::kNN))) break;
     g->Draw("pl");
-    legThre->AddEntry(g, "NN", "pl");
+    leg->AddEntry(g, "NN", "pl");
     if(!(g = (TGraphErrors*)content->At(AliTRDpidUtil::kESD))) break;
     g->Draw("p");
-    legThre->AddEntry(g, "ESD", "pl");
-    legThre->Draw();
+    leg->AddEntry(g, "ESD", "pl");
+    leg->Draw();
     gPad->SetLogx();
     gPad->SetGridy();
     gPad->SetGridx();