new convention for drawing QA results.
authorabercuci <abercuci@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 13 Oct 2008 14:37:58 +0000 (14:37 +0000)
committerabercuci <abercuci@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 13 Oct 2008 14:37:58 +0000 (14:37 +0000)
13 files changed:
TRD/qaRec/AliTRDcheckDetector.cxx
TRD/qaRec/AliTRDcheckDetector.h
TRD/qaRec/AliTRDpidChecker.cxx
TRD/qaRec/AliTRDpidChecker.h
TRD/qaRec/AliTRDpidRefMaker.cxx
TRD/qaRec/AliTRDpidRefMaker.h
TRD/qaRec/AliTRDrecoTask.cxx
TRD/qaRec/AliTRDrecoTask.h
TRD/qaRec/AliTRDtrackingEfficiency.cxx
TRD/qaRec/AliTRDtrackingEfficiency.h
TRD/qaRec/AliTRDtrackingResolution.cxx
TRD/qaRec/AliTRDtrackingResolution.h
TRD/qaRec/makeResults.C

index 620bb56..a6fa4f0 100644 (file)
@@ -59,11 +59,11 @@ AliTRDcheckDetector::~AliTRDcheckDetector(){
 
 //_______________________________________________________
 void AliTRDcheckDetector::ConnectInputData(Option_t *opt){
-       //
-       // Connect the Input data with the task
-       //
-       AliTRDrecoTask::ConnectInputData(opt);
-       fEventInfo = dynamic_cast<AliTRDeventInfo *>(GetInputData(1));
+  //
+  // Connect the Input data with the task
+  //
+  AliTRDrecoTask::ConnectInputData(opt);
+  fEventInfo = dynamic_cast<AliTRDeventInfo *>(GetInputData(1));
 }
 
 //_______________________________________________________
@@ -81,7 +81,7 @@ void AliTRDcheckDetector::CreateOutputObjects(){
   fContainer->Add(new TH1F("hChi2", "Chi2", 200, 0, 20));
   fContainer->Add(new TH1F("hChi2n", "Norm. Chi2 (tracklets)", 50, 0, 5));
   fContainer->Add(new TH1F("hSM", "Track Counts in Supermodule", 18, -0.5, 17.5));
-       // Detector signal on Detector-by-Detector basis
+  // Detector signal on Detector-by-Detector basis
   fContainer->Add(new TProfile("hPHdetector", "Average PH", 31, -0.5, 30.5));
   fContainer->Add(new TH1F("hQclDetector", "Cluster charge", 200, 0, 1200));
   fContainer->Add(new TH1F("hQTdetector", "Total Charge Deposit", 6000, 0, 6000));
@@ -138,21 +138,21 @@ void AliTRDcheckDetector::Exec(Option_t *){
             dynamic_cast<TProfile *>(fContainer->UncheckedAt(kPulseHeight))->Fill(localtime, absolute_charge);
             dynamic_cast<TH1F *>(fContainer->UncheckedAt(kClusterCharge))->Fill(absolute_charge);
             if(fDebugLevel > 2){
-               (*fDebugStream) << "PulseHeight"
-                       << "Detector="  << detector
-                       << "Sector="            << sector
-                       << "Timebin="           << localtime
-                       << "Charge="            << absolute_charge
-                       << "\n";
+              (*fDebugStream) << "PulseHeight"
+                << "Detector=" << detector
+                << "Sector="           << sector
+                << "Timebin="          << localtime
+                << "Charge="           << absolute_charge
+                << "\n";
             }
           }
           dynamic_cast<TH1F *>(fContainer->UncheckedAt(kChargeDeposit))->Fill(Qtot);
           if(fDebugLevel > 3){
-               (*fDebugStream) << "ChargeDeposit"
-                       << "Detector="  << detector
-                       << "Sector="            << sector
-                       << "QT="                                << Qtot
-                       << "\n";
+            (*fDebugStream) << "ChargeDeposit"
+              << "Detector="   << detector
+              << "Sector="             << sector
+              << "QT="                         << Qtot
+              << "\n";
           }
         }
       }
@@ -161,8 +161,8 @@ void AliTRDcheckDetector::Exec(Option_t *){
     nTracks++;
   }
   if(nTracks){
-       dynamic_cast<TH1F *>(fContainer->UncheckedAt(kNEventsTriggerTracks))->Fill(triggermask);
-       dynamic_cast<TH1F *>(fContainer->UncheckedAt(kNTracksEventHist))->Fill(nTracks);
+    dynamic_cast<TH1F *>(fContainer->UncheckedAt(kNEventsTriggerTracks))->Fill(triggermask);
+    dynamic_cast<TH1F *>(fContainer->UncheckedAt(kNTracksEventHist))->Fill(nTracks);
   }
   if(triggermask <= 20 && !fTriggerNames->FindObject(Form("%d", triggermask))){
     fTriggerNames->Add(new TObjString(Form("%d", triggermask)), new TObjString(triggername));
@@ -184,98 +184,127 @@ void AliTRDcheckDetector::Terminate(Option_t *){
 
 //_______________________________________________________
 Bool_t AliTRDcheckDetector::PostProcess(){
-       //
-       // Do Postprocessing (for the moment set the number of Reference histograms)
-       //
-       
-       TH1 * histo = 0x0;
-       histo = dynamic_cast<TH1F *>(fContainer->UncheckedAt(kNTracksEventHist));
-       histo->GetXaxis()->SetTitle("Number of Tracks");
-       histo->GetYaxis()->SetTitle("Events");
-       histo = dynamic_cast<TH1F *>(fContainer->UncheckedAt(kNclustersHist));
-       histo->GetXaxis()->SetTitle("Number of Clusters");
-       histo->GetYaxis()->SetTitle("Entries");
-       histo = dynamic_cast<TH1F *>(fContainer->UncheckedAt(kNtrackletsHist));
-       histo->GetXaxis()->SetTitle("Number of Tracklets");
-       histo->GetYaxis()->SetTitle("Entries");
-       histo = dynamic_cast<TH1F *>(fContainer->UncheckedAt(kNclusterTrackletHist));
-       histo->GetXaxis()->SetTitle("Number of Clusters");
-       histo->GetYaxis()->SetTitle("Entries");
-       histo = dynamic_cast<TH1F *>(fContainer->UncheckedAt(kChi2));
-       histo->GetXaxis()->SetTitle("#chi^2");
-       histo->GetYaxis()->SetTitle("Entries");
-       histo = dynamic_cast<TH1F *>(fContainer->UncheckedAt(kNTracksSectorHist));
-       histo->GetXaxis()->SetTitle("Sector");
-       histo->GetYaxis()->SetTitle("Number of Tracks");
-       histo = dynamic_cast<TProfile *>(fContainer->UncheckedAt(kPulseHeight));
-       histo->GetXaxis()->SetTitle("Time / 100ns");
-       histo->GetYaxis()->SetTitle("Average Pulse Height (a. u.)");
-       histo = dynamic_cast<TH1F *>(fContainer->UncheckedAt(kClusterCharge));
-       histo->GetXaxis()->SetTitle("Cluster Charge (a.u.)");
-       histo->GetYaxis()->SetTitle("Entries");
-       histo = dynamic_cast<TH1F *>(fContainer->UncheckedAt(kChargeDeposit));
-       histo->GetXaxis()->SetTitle("Charge Deposit (a.u.)");
-       histo->GetYaxis()->SetTitle("Entries");
-       
-       // Calculate the purity of the trigger clusters
-       histo = dynamic_cast<TH1F *>(fContainer->UncheckedAt(kNEventsTrigger));
-       TH1F *histoTracks = dynamic_cast<TH1F *>(fContainer->UncheckedAt(kNEventsTriggerTracks));
-       histoTracks->Divide(histo);
-       Float_t purities[20], val = 0;
-       TString triggernames[20];
-       Int_t nTriggerClasses = 0;
-       for(Int_t ibin = 1; ibin <= histo->GetNbinsX(); ibin++){
-               if((val = histoTracks->GetBinContent(ibin))){
-                       purities[nTriggerClasses] = val;
-                       triggernames[nTriggerClasses] = histoTracks->GetXaxis()->GetBinLabel(ibin);
-                       nTriggerClasses++;
-               }
-       }
-       TH1F *hTriggerInf = new TH1F("fTriggerInf", "Trigger Information", TMath::Max(nTriggerClasses, 1), 0, TMath::Max(nTriggerClasses, 1));
-       for(Int_t ibin = 1; ibin <= nTriggerClasses; ibin++){
-               hTriggerInf->SetBinContent(ibin, purities[ibin-1]);
-               hTriggerInf->GetXaxis()->SetBinLabel(ibin, triggernames[ibin-1].Data());
-       }
-       hTriggerInf->GetXaxis()->SetTitle("Trigger Cluster");
-       hTriggerInf->GetYaxis()->SetTitle("Ratio");
-       hTriggerInf->GetYaxis()->SetRangeUser(0,1);
+  //
+  // Do Postprocessing (for the moment set the number of Reference histograms)
+  //
+  
+  TH1 * histo = 0x0;
+  histo = dynamic_cast<TH1F *>(fContainer->UncheckedAt(kNTracksEventHist));
+  histo->GetXaxis()->SetTitle("Number of Tracks");
+  histo->GetYaxis()->SetTitle("Events");
+  histo = dynamic_cast<TH1F *>(fContainer->UncheckedAt(kNclustersHist));
+  histo->GetXaxis()->SetTitle("Number of Clusters");
+  histo->GetYaxis()->SetTitle("Entries");
+  histo = dynamic_cast<TH1F *>(fContainer->UncheckedAt(kNtrackletsHist));
+  histo->GetXaxis()->SetTitle("Number of Tracklets");
+  histo->GetYaxis()->SetTitle("Entries");
+  histo = dynamic_cast<TH1F *>(fContainer->UncheckedAt(kNclusterTrackletHist));
+  histo->GetXaxis()->SetTitle("Number of Clusters");
+  histo->GetYaxis()->SetTitle("Entries");
+  histo = dynamic_cast<TH1F *>(fContainer->UncheckedAt(kChi2));
+  histo->GetXaxis()->SetTitle("#chi^2");
+  histo->GetYaxis()->SetTitle("Entries");
+  histo = dynamic_cast<TH1F *>(fContainer->UncheckedAt(kNTracksSectorHist));
+  histo->GetXaxis()->SetTitle("Sector");
+  histo->GetYaxis()->SetTitle("Number of Tracks");
+  histo = dynamic_cast<TProfile *>(fContainer->UncheckedAt(kPulseHeight));
+  histo->GetXaxis()->SetTitle("Time / 100ns");
+  histo->GetYaxis()->SetTitle("Average Pulse Height (a. u.)");
+  histo = dynamic_cast<TH1F *>(fContainer->UncheckedAt(kClusterCharge));
+  histo->GetXaxis()->SetTitle("Cluster Charge (a.u.)");
+  histo->GetYaxis()->SetTitle("Entries");
+  histo = dynamic_cast<TH1F *>(fContainer->UncheckedAt(kChargeDeposit));
+  histo->GetXaxis()->SetTitle("Charge Deposit (a.u.)");
+  histo->GetYaxis()->SetTitle("Entries");
+  
+  // Calculate the purity of the trigger clusters
+  histo = dynamic_cast<TH1F *>(fContainer->UncheckedAt(kNEventsTrigger));
+  TH1F *histoTracks = dynamic_cast<TH1F *>(fContainer->UncheckedAt(kNEventsTriggerTracks));
+  histoTracks->Divide(histo);
+  Float_t purities[20], val = 0;
+  TString triggernames[20];
+  Int_t nTriggerClasses = 0;
+  for(Int_t ibin = 1; ibin <= histo->GetNbinsX(); ibin++){
+    if((val = histoTracks->GetBinContent(ibin))){
+      purities[nTriggerClasses] = val;
+      triggernames[nTriggerClasses] = histoTracks->GetXaxis()->GetBinLabel(ibin);
+      nTriggerClasses++;
+    }
+  }
+  TH1F *hTriggerInf = new TH1F("fTriggerInf", "Trigger Information", TMath::Max(nTriggerClasses, 1), 0, TMath::Max(nTriggerClasses, 1));
+  for(Int_t ibin = 1; ibin <= nTriggerClasses; ibin++){
+    hTriggerInf->SetBinContent(ibin, purities[ibin-1]);
+    hTriggerInf->GetXaxis()->SetBinLabel(ibin, triggernames[ibin-1].Data());
+  }
+  hTriggerInf->GetXaxis()->SetTitle("Trigger Cluster");
+  hTriggerInf->GetYaxis()->SetTitle("Ratio");
+  hTriggerInf->GetYaxis()->SetRangeUser(0,1);
 //     hTriggerInf->SetMarkerColor(kBlue);
 //     hTriggerInf->SetMarkerStyle(22);
-       fContainer->Add(hTriggerInf);
-       fNRefFigures = 10;
-       return kTRUE;
+  fContainer->Add(hTriggerInf);
+  fNRefFigures = 10;
+  return kTRUE;
 }
 
 //_______________________________________________________
-void AliTRDcheckDetector::GetRefFigure(Int_t ifig, Int_t &first, Int_t &last, Option_t *opt){
-       //
-       // Setting Reference Figures
-       //
-       opt = "pl";
-       switch(ifig){
-               case 0: first = last = kNTracksEventHist;
-                                               break;
-               case 1: first = last = kNclustersHist;
-                                               break;
-               case 2: first = last = kNtrackletsHist;
-                                               break;
-               case 3: first = last = kNclusterTrackletHist;
-                                               break;
-               case 4: first = last = kChi2;
-                                               break;
-               case 5: first = last = kNTracksSectorHist;
-                                               break;
-               case 6: first = last = kPulseHeight;
-                                               break;
-               case 7: first = last = kClusterCharge;
-                                               break;
-               case 8: first = last = kChargeDeposit;
-                                               break;
-               case 9: first = last = kPurity;
-                                               opt="bar";
-                                               break;
-               default: first = last = kNTracksEventHist;
-                                               break;
-       };
+void AliTRDcheckDetector::GetRefFigure(Int_t ifig){
+  //
+  // Setting Reference Figures
+  //
+  TH1 *h = 0x0;
+  switch(ifig){
+  case 0:      
+    ((TH1F*)fContainer->At(kNTracksEventHist))->Draw("pl");
+    break;
+  case 1:
+    ((TH1F*)fContainer->At(kNclustersHist))->Draw("pl");
+    break;
+  case 2:
+    h = (TH1F*)fContainer->At(kNtrackletsHist);
+    if(!h->GetEntries()) break;
+    h->Scale(100./h->Integral());
+    h->GetXaxis()->SetRangeUser(.5, 6.5);
+    h->SetFillColor(kGreen);
+    h->SetBarOffset(.2);
+    h->SetBarWidth(.6);
+    h->Draw("bar1");
+    break;
+  case 3:
+    ((TH1F*)fContainer->At(kNclusterTrackletHist))->Draw("pc");
+    break;
+  case 4:
+    ((TH1F*)fContainer->At(kChi2))->Draw("");
+    break;
+  case 5:
+    h = (TH1F*)fContainer->At(kNTracksSectorHist);
+    if(!h->GetEntries()) break;
+    h->Scale(100./h->Integral());
+    h->SetFillColor(kGreen);
+    h->SetBarOffset(.2);
+    h->SetBarWidth(.6);
+    h->Draw("bar1");
+    break;
+  case 6:
+    h = (TH1F*)fContainer->At(kPulseHeight);
+    h->SetMarkerStyle(24);
+    h->Draw("e1");
+    break;
+  case 7:
+    ((TH1F*)fContainer->At(kClusterCharge))->Draw("c");
+    break;
+  case 8:
+    ((TH1F*)fContainer->At(kChargeDeposit))->Draw("c");
+    break;
+  case 9: 
+    h=(TH1F*)fContainer->At(kPurity);
+    h->SetBarOffset(.2);
+    h->SetBarWidth(.6);
+    h->SetFillColor(kGreen);
+    h->Draw("bar1");
+    break;
+  default:
+    ((TH1F*)fContainer->At(kNTracksEventHist))->Draw("pl");
+    break;
+  }
 }
 
index 664801d..82906b8 100644 (file)
@@ -43,7 +43,7 @@ public:
   virtual void Terminate(Option_t *);
   
   virtual Bool_t PostProcess();
-  virtual void  GetRefFigure(Int_t ifig, Int_t &first, Int_t &last, Option_t *opt = "lp");
+  virtual void  GetRefFigure(Int_t ifig);
   
 private:
   AliTRDcheckDetector(const AliTRDcheckDetector &);
index ac4e2a5..136f65b 100644 (file)
@@ -1,4 +1,5 @@
 #include "TPDGCode.h"
+#include "TCanvas.h"
 #include "TF1.h"
 #include "TH1F.h"
 #include "TH1D.h"
@@ -344,21 +345,53 @@ void AliTRDpidChecker::Exec(Option_t *)
   PostData(0, fContainer);
 }
 
+
 //________________________________________________________
-void AliTRDpidChecker::GetRefFigure(Int_t ifig, Int_t &first, Int_t &last, Option_t *opt)
+void AliTRDpidChecker::GetRefFigure(Int_t ifig)
 {
-  opt = "pl";
+  Bool_t FIRST = kTRUE;
+  TH1 *h1 = 0x0;
+  TH2 *h2 = 0x0;
   switch(ifig){
   case 0:
-    first = (Int_t)kGraphStart; last = first+2;
+    ((TGraphErrors*)fContainer->At(kGraphStart))->Draw("apl");
+    ((TGraphErrors*)fContainer->At(kGraphStart+1))->Draw("pl");
+    gPad->SetLogy();
     break;
-  default:
-    first = (Int_t)kGraphStart; last = first+2;
+  case 1:
+    // save 2.0 GeV projection as reference
+    FIRST = kTRUE;
+    h2 = (TH2F*)(fContainer->At(kdEdx));
+    for(Int_t is = AliPID::kSPECIES-1; is>=0; is--){
+      Int_t bin = is*AliTRDCalPID::kNMom+4;
+      h1 = h2->ProjectionY("px", bin, bin);
+      if(!h1->GetEntries()) continue;
+      h1->Scale(1./h1->Integral());
+      h1->SetLineColor(AliTRDCalPID::GetPartColor(is));
+      h1->DrawClone(FIRST ? "c" : "samec");
+      FIRST = kFALSE;
+    }
+    gPad->SetLogy();
+    break;
+  case 2:
+    // save 2.0 GeV projection as reference
+    FIRST = kTRUE;
+    h2 = (TH2F*)(fContainer->At(kPH));
+    for(Int_t is=0; is<AliPID::kSPECIES; is++){
+      Int_t bin = is*AliTRDCalPID::kNMom+4;
+      h1 = h2->ProjectionY("py", bin, bin);
+      if(!h1->GetEntries()) continue;
+      h1->SetMarkerStyle(24);
+      h1->SetMarkerColor(AliTRDCalPID::GetPartColor(is));
+      h1->SetLineColor(AliTRDCalPID::GetPartColor(is));
+      h1->DrawClone(FIRST ? "e2" : "same e2");
+      FIRST = kFALSE;
+    }
+    gPad->SetLogy(0);
     break;
   }
 }
 
-
 //________________________________________________________________________
 Bool_t AliTRDpidChecker::PostProcess()
 {
@@ -452,7 +485,7 @@ Bool_t AliTRDpidChecker::PostProcess()
   }
 
 
-  fNRefFigures = 1;
+  fNRefFigures = 3/*1*/;
   return kTRUE; // testing protection
 }
 
index 57826b0..eda97de 100644 (file)
@@ -46,6 +46,7 @@ public:
   void    CreateOutputObjects();
   void    Exec(Option_t *option);
   void    GetRefFigure(Int_t ifig, Int_t &first, Int_t &last, Option_t *opt);  
+  void    GetRefFigure(Int_t ifig);
   Bool_t  PostProcess();
   void    Terminate(Option_t *);
 
index 253d7ce..36efe49 100644 (file)
@@ -241,7 +241,7 @@ void AliTRDpidRefMaker::Exec(Option_t *)
 
 
 //________________________________________________________
-void AliTRDpidRefMaker::GetRefFigure(Int_t /*ifig*/, Int_t &/*first*/, Int_t &/*last*/, Option_t */*opt*/)
+void AliTRDpidRefMaker::GetRefFigure(Int_t /*ifig*/)
 {
   
 }
@@ -613,15 +613,15 @@ void AliTRDpidRefMaker::MonitorTraining(Int_t mombin)
 
   // implement variables for likelihoods
   Float_t Like[AliPID::kSPECIES][AliTRDgeometry::kNlayer];
-  memset(Like, 0., AliPID::kSPECIES*AliTRDgeometry::kNlayer*sizeof(Float_t));
+  memset(Like, 0, AliPID::kSPECIES*AliTRDgeometry::kNlayer*sizeof(Float_t));
   Float_t LikeAll[AliPID::kSPECIES], TotProb;
 
   Double_t PionEffiTrain[kMoniTrain], PionEffiErrTrain[kMoniTrain];
   Double_t PionEffiTest[kMoniTrain], PionEffiErrTest[kMoniTrain];
-  memset(PionEffiTrain, 0., kMoniTrain*sizeof(Double_t));
-  memset(PionEffiErrTrain, 0., kMoniTrain*sizeof(Double_t));
-  memset(PionEffiTest, 0., kMoniTrain*sizeof(Double_t));
-  memset(PionEffiErrTest, 0., kMoniTrain*sizeof(Double_t));
+  memset(PionEffiTrain, 0, kMoniTrain*sizeof(Double_t));
+  memset(PionEffiErrTrain, 0, kMoniTrain*sizeof(Double_t));
+  memset(PionEffiTest, 0, kMoniTrain*sizeof(Double_t));
+  memset(PionEffiErrTest, 0, kMoniTrain*sizeof(Double_t));
 
   // init histos
   const Float_t epsilon = 1/(2*(AliTRDpidUtil::kBins-1));     // get nice histos with bin center at 0 and 1
index 08f55ae..a632fa6 100644 (file)
@@ -64,7 +64,7 @@ public:
   
   void    CreateOutputObjects();
   void    Exec(Option_t *option);
-  void    GetRefFigure(Int_t ifig, Int_t &first, Int_t &last, Option_t *opt);  
+  void    GetRefFigure(Int_t ifig);  
   Int_t   GetEpochs() {return fEpochs;};
   Int_t   GetMinTrain() {return fMinTrain;};
   Int_t   GetTrainMomBin() {return fTrainMomBin;};
index 4a5440d..29f364f 100644 (file)
@@ -50,10 +50,9 @@ void AliTRDrecoTask::ConnectInputData(Option_t *)
 
 
 //_______________________________________________________
-void AliTRDrecoTask::GetRefFigure(Int_t /*ifig*/, Int_t &first, Int_t &last, Option_t */*opt*/)
+void AliTRDrecoTask::GetRefFigure(Int_t /*ifig*/)
 {
   AliWarning("Retrieving reference figures not implemented.");
-  first = 0; last = 0;
 }
 
 //_______________________________________________________
index 70ef1c1..e29edd1 100644 (file)
@@ -23,13 +23,12 @@ public:
   
   
   void           ConnectInputData(Option_t *);
-  TObjArray*     Container() const {return fContainer;}
   virtual void   CreateOutputObjects() = 0;
   virtual void   Exec(Option_t *) = 0;
 
   Int_t          GetDebugLevel() const { return fDebugLevel;}
   Int_t          GetNRefFigures() const { return fNRefFigures; } 
-  virtual void   GetRefFigure(Int_t ifig, Int_t &first, Int_t &last, Option_t *opt="lp");
+  virtual void   GetRefFigure(Int_t ifig);
 
   Bool_t         HasFriends() const {return TestBit(kFriends);};
   Bool_t         HasMCdata() const {return TestBit(kMCdata);};
index c048ad9..9bbd44f 100644 (file)
@@ -276,14 +276,31 @@ void AliTRDtrackingEfficiency::Terminate(Option_t *)
 
 
 //____________________________________________________________________
-void AliTRDtrackingEfficiency::GetRefFigure(Int_t ifig, Int_t &first, Int_t &last, Option_t *opt)
+void AliTRDtrackingEfficiency::GetRefFigure(Int_t ifig)
 {
+  Bool_t FIRST = kTRUE;
+  TProfile *h = 0x0;
   switch(ifig){
   case 0:
-    first = 5; last = 6; opt="e2"; 
+    h = (TProfile*)fContainer->At(AliPID::kSPECIES);
+    for(Int_t is=0; is<AliPID::kSPECIES; is++){
+      h->Add((TProfile*)fContainer->At(is));
+    }
+    h->SetMarkerColor(kBlack);
+    h->SetLineColor(kBlack);
+    h->GetXaxis()->SetTitle("p [GeV/c]");
+    h->Draw("e1");
     break;
   case 1:
-    first = 0; last = 5; opt="e2"; 
+    FIRST = kTRUE;
+    for(Int_t is=0; is<AliPID::kSPECIES; is++){
+      if(!(h = (TProfile*)fContainer->At(is))) continue;
+      if(FIRST){
+        h->Draw("e1");
+        h->GetXaxis()->SetTitle("p [GeV/c]");
+      } else h->Draw("same e1");
+      FIRST = kFALSE;
+    }
     break;
   }
 }
@@ -292,10 +309,6 @@ void AliTRDtrackingEfficiency::GetRefFigure(Int_t ifig, Int_t &first, Int_t &las
 //____________________________________________________________________
 Bool_t AliTRDtrackingEfficiency::PostProcess()
 {
-  TProfile *h = (TProfile*)fContainer->At(AliPID::kSPECIES);
-  for(Int_t is=0; is<AliPID::kSPECIES; is++){
-    h->Add((TProfile*)fContainer->At(is));
-  }
   fNRefFigures = HasMCdata() ? 2 : 1; 
   return kTRUE;
 }
index 8858a5d..6fce4ba 100644 (file)
@@ -26,7 +26,7 @@ public:
   virtual ~AliTRDtrackingEfficiency();
   void    CreateOutputObjects();
   void    Exec(Option_t *);
-  void    GetRefFigure(Int_t ifig, Int_t &first, Int_t &last, Option_t *opt);
+  void    GetRefFigure(Int_t ifig);
   Bool_t  PostProcess();
   void    Terminate(Option_t *);
 
index a30987d..262f794 100644 (file)
@@ -372,21 +372,40 @@ void AliTRDtrackingResolution::Exec(Option_t *)
 }
 
 //________________________________________________________
-void AliTRDtrackingResolution::GetRefFigure(Int_t ifig, Int_t &first, Int_t &last, Option_t *opt)
+void AliTRDtrackingResolution::GetRefFigure(Int_t ifig)
 {
-  //sprintf(opt, "pl");
+  TAxis *ax = 0x0;
+  TGraphErrors *g = 0x0;
   switch(ifig){
   case 0:
-    first = (Int_t)kGraphStart; last = first+3;
+    g = (TGraphErrors*)fContainer->At(kGraphStart+1);
+    g->Draw("apl");
+    ax = g->GetHistogram()->GetYaxis();
+    ax->SetRangeUser(-.1, 1.);
+    ax->SetTitle("Clusters Y Residuals #sigma/#mu [mm]");
+    ax = g->GetHistogram()->GetXaxis();
+    ax->SetTitle("#phi [deg]");
+    ((TGraphErrors*)fContainer->At(kGraphStart+2))->Draw("pl");
     break;
   case 1:
-    first = (Int_t)kGraphStart+3; last = first+3;
+    g = (TGraphErrors*)fContainer->At(kGraphStart+4);
+    ax = g->GetHistogram()->GetYaxis();
+    ax->SetRangeUser(-.1, 1.);
+    ax->SetTitle("Tracklet Y Resolution #sigma/#mu [mm]");
+    ax = g->GetHistogram()->GetXaxis();
+    ax->SetTitle("#phi [deg]");
+    g->Draw("apl");
+    ((TGraphErrors*)fContainer->At(kGraphStart+5))->Draw("pl");
     break;
   case 2:
-    first = (Int_t)kGraphStart+6; last = first+3;
-    break;
-  default:
-    first = (Int_t)kGraphStart; last = first;
+    g = (TGraphErrors*)fContainer->At(kGraphStart+7);
+    ax = g->GetHistogram()->GetYaxis();
+    ax->SetRangeUser(-.1, 1.);
+    ax->SetTitle("Tracklet Angular Resolution #sigma/#mu [deg]");
+    ax = g->GetHistogram()->GetXaxis();
+    ax->SetTitle("#phi [deg]");
+    g->Draw("apl");
+    ((TGraphErrors*)fContainer->At(kGraphStart+8))->Draw("pl");
     break;
   }
 }
index 95b19de..8cf64e3 100644 (file)
@@ -47,7 +47,7 @@ public:
   
   void    CreateOutputObjects();
   void    Exec(Option_t *);
-  void    GetRefFigure(Int_t ifig, Int_t &first, Int_t &last, Option_t *opt);  
+  void    GetRefFigure(Int_t ifig);
   void    SetRecoParam(AliTRDrecoParam *r);
   Bool_t  PostProcess();
   void    Terminate(Option_t *);
index 6562f5a..ea29706 100644 (file)
@@ -132,45 +132,14 @@ void makeResults(Char_t *args = "ALL")
       task->Load(Form("%s/merge/TRD.Task%s.root", gSystem->ExpandPathName("$PWD"), task->GetName()));
     } else task->Load((dynamic_cast<TObjString *>(filenames->UncheckedAt(0)))->String().Data());
 
-    if(!(fContainer = task->Container())) {
-      delete task;
-      delete ctask;
-      continue;
-    } 
-    
     task->PostProcess();
+    TCanvas *c=new TCanvas();
     for(Int_t ipic=0; ipic<task->GetNRefFigures(); ipic++){
-      TCanvas *c = new TCanvas("c", "", 500, 500);
-      Int_t ifirst, ilast; Option_t *opt;
-      TH1 *h = 0x0; TGraph *g = 0x0;
-      task->GetRefFigure(ipic, ifirst, ilast, opt);
-      if(!(o = fContainer->At(ifirst))) continue;
-      
-      if(o->InheritsFrom("TH1")){ 
-        h = dynamic_cast<TH1*>(o);
-        h->Draw(opt);
-      } else if(o->InheritsFrom("TGraph")){ 
-        g = dynamic_cast<TGraph*>(o);
-        g->Draw(Form("a%s", opt));
-      } else{
-        printf("No idea how to plot object of type %s.\n", o->IsA()->GetName());
-        printf("Please teach me.\n");
-        continue;
-      }
-
-      for(Int_t ig=ifirst+1; ig<ilast; ig++){
-        if(!(o = fContainer->At(ig))) continue;
-        if(o->InheritsFrom("TH1")){
-          h = dynamic_cast<TH1*>(o);
-          h->Draw(Form("%ssame", opt));
-        } else if(o->InheritsFrom("TGraph")){
-          g = dynamic_cast<TGraph*>(o);
-          g->Draw(opt);
-        }
-      }
+      task->GetRefFigure(ipic);
       c->SaveAs(Form("%s_fig%d.gif", task->GetName(), ipic));
-      delete c;
+      c->Clear();
     }
+    delete c;
     delete task;
     delete ctask;
   }