Renames and new scripts
authorcholm <cholm@f7af4fe6-9843-0410-8265-dc069ae4e863>
Sat, 29 Jan 2011 12:09:30 +0000 (12:09 +0000)
committercholm <cholm@f7af4fe6-9843-0410-8265-dc069ae4e863>
Sat, 29 Jan 2011 12:09:30 +0000 (12:09 +0000)
PWG2/FORWARD/analysis2/MakeAOD.C
PWG2/FORWARD/analysis2/MakeELossFits.C
PWG2/FORWARD/analysis2/scripts/CompareCorrs.C [new file with mode: 0644]
PWG2/FORWARD/analysis2/scripts/CompareSecMaps.C
PWG2/FORWARD/analysis2/scripts/CompareVtxBias.C [new file with mode: 0644]
PWG2/FORWARD/analysis2/scripts/DrawAnaELoss.C [moved from PWG2/FORWARD/analysis2/scripts/DrawFits.C with 98% similarity]
PWG2/FORWARD/analysis2/scripts/DrawCorrELoss.C [moved from PWG2/FORWARD/analysis2/scripts/DrawELossFits.C with 97% similarity]
PWG2/FORWARD/analysis2/scripts/ExtractELoss.C
PWG2/FORWARD/analysis2/scripts/TestFitELoss.C [moved from PWG2/FORWARD/analysis2/scripts/FitELoss.C with 99% similarity]
PWG2/FORWARD/analysis2/scripts/TestMakeELossFits.C [moved from PWG2/FORWARD/analysis2/scripts/MakeELossFit.C with 99% similarity]
PWG2/FORWARD/analysis2/scripts/TestRunMakeELossFit.C [moved from PWG2/FORWARD/analysis2/scripts/RunMakeELossFit.C with 74% similarity]

index 13cf83df410d91b01e86611ecb80ef947a6da49e..ad5f428be731cc936cd28e12c45ca905338247ca 100644 (file)
@@ -41,8 +41,9 @@ void MakeAOD(const char* esddir,
   if (nEvents <= 0) nEvents = chain->GetEntries();
 
   // --- Creating the manager and handlers ---------------------------
-  AliAnalysisManager *mgr  = new AliAnalysisManager("Analysis Train", 
-                                                   "FMD analysis train");
+  AliAnalysisManager *mgr  = new AliAnalysisManager("Forward Train", 
+                                                   "Forward multiplicity");
+  AliAnalysisManager::SetCommonFileName("forward.root");
 
   // --- ESD input handler -------------------------------------------
   AliESDInputHandler *esdHandler = new AliESDInputHandler();
index 640cf012566c22d84d02a7afe1de06a729881060..3d8978aefb8bed73f98ce5c978ec75ba3e59a343 100644 (file)
@@ -31,8 +31,9 @@ void MakeELossFits(const char* esddir,
   Info("MakeELossFits", "Will analyse %d events", nEvents);
 
   // --- Creating the manager and handlers ---------------------------
-  AliAnalysisManager *mgr  = new AliAnalysisManager("Analysis Train", 
-                                                   "FMD analysis train");
+  AliAnalysisManager *mgr  = new AliAnalysisManager("Forward ELoss Train", 
+                                                   "Forward energy loss");
+  AliAnalysisManager::SetCommonFileName("forward_eloss.root");
 
   AliESDInputHandler *esdHandler = new AliESDInputHandler();
   esdHandler->SetInactiveBranches("AliESDACORDE "
@@ -61,7 +62,7 @@ void MakeELossFits(const char* esddir,
   mgr->AddTask(task);
 
   // --- Make the output container and connect it --------------------
-  TString outputfile = "energyFits.root";
+  TString outputfile = AliAnalysisManager::GetCommonFileName();
   AliAnalysisDataContainer* histOut = 
     mgr->CreateContainer("Forward", TList::Class(), 
                         AliAnalysisManager::kOutputContainer,outputfile);
diff --git a/PWG2/FORWARD/analysis2/scripts/CompareCorrs.C b/PWG2/FORWARD/analysis2/scripts/CompareCorrs.C
new file mode 100644 (file)
index 0000000..c87d172
--- /dev/null
@@ -0,0 +1,143 @@
+/**
+ * @file   CompareCorrs.C
+ * @author Christian Holm Christensen <cholm@dalsgaard.hehi.nbi.dk>
+ * @date   Fri Jan 28 23:01:59 2011
+ * 
+ * @brief  Utilities for comparing correction objects 
+ * 
+ * 
+ */
+#ifndef __CINT__
+#include <TCanvas.h>
+#include <TFile.h>
+#include <TLatex.h>
+#include <TStyle.h>
+#include <TMath.h>
+#include "AliForwardCorrectionManager.h"
+#endif
+
+
+//======================================================================
+struct Canvas 
+{
+  //____________________________________________________________________
+  Canvas(const char* name, const char* title,
+        const char* n1,   const char* n2)
+    : fName(name),
+      fTitle(title),
+      fN1(n1), 
+      fN2(n2),
+      fCanvas(0),
+      fBody(0)
+  {
+    gStyle->SetPalette(1);
+    gStyle->SetTitleX(.10);
+    gStyle->SetTitleY(.99);
+    gStyle->SetTitleW(.85);
+    gStyle->SetTitleH(.085);
+    gStyle->SetTitleFillColor(0);
+    gStyle->SetTitleBorderSize(0);
+  }
+  //____________________________________________________________________
+  void Open() 
+  {
+    fCanvas = new TCanvas(fName, fTitle, 800, TMath::Sqrt(2)*800);
+    fCanvas->SetFillColor(0);
+  
+    fCanvas->Print("comparison.pdf[", "pdf");
+  }
+  //____________________________________________________________________
+  TPad* 
+  Clear(UShort_t nPad, UShort_t d, Char_t r)
+  {
+    fCanvas->Clear();
+    TPad* top = new TPad("top", "Top", 0, .95, 1, 1, 0, 0);
+    top->Draw();
+    top->cd();
+
+    TLatex* l = new TLatex(.5, .5, Form("%s for FMD%d%c (%s / %s)", 
+                                       fTitle, d, r, fN1, fN2));
+    l->SetNDC();
+    l->SetTextAlign(22);
+    l->SetTextSize(0.3);
+    l->Draw();
+  
+    fCanvas->cd();
+    fBody = new TPad("body", "Body", 0, 0, 1, .95, 0, 0);
+    fBody->SetTopMargin(0.05);
+    fBody->SetRightMargin(0.05);
+    fBody->Divide(2, (nPad+1)/2, 0.001, 0.001);
+    fBody->Draw();
+    
+    return fBody;
+  }  
+  //____________________________________________________________________
+  TVirtualPad* cd(Int_t i) 
+  {
+    if (!fBody) return 0;
+    
+    return fBody->cd(i);
+  }
+  //____________________________________________________________________
+  void Print(UShort_t d, Char_t r, const char* extra="")
+  {
+    fCanvas->Print("comparison.pdf", 
+                  Form("Title:FMD%d%c %s", d, r, extra));
+  }
+  //____________________________________________________________________
+  void Close()
+  {
+    fCanvas->Print("comparison.pdf]", "pdf");
+  }    
+  //____________________________________________________________________
+  const char* fName;
+  const char* fTitle;
+  const char* fN1;
+  const char* fN2;
+  TCanvas*    fCanvas;
+  TPad*       fBody;
+};
+
+//======================================================================
+void
+GetObjects(UShort_t    what, 
+          const char* fn1, const char* fn2, 
+          TObject*&   o1,  TObject*&   o2)
+{
+  // --- Open files --------------------------------------------------
+  TFile* file1 = TFile::Open(fn1, "READ");
+  TFile* file2 = TFile::Open(fn2, "READ");
+
+  if (!file1) { 
+    Error("CompareSecMaps", "File %s cannot be opened", fn1);
+    return;
+  }
+
+  if (!file2) { 
+    Error("CompareSecMaps", "File %s cannot be opened", fn2);
+    return;
+  }
+  
+  // --- Find Objects ------------------------------------------------
+  AliForwardCorrectionManager::ECorrection ewhat = what;
+  // (AliForwardCorrectionManager::ECorrection)what;
+  const char* objName = 
+    AliForwardCorrectionManager::Instance().GetObjectName(ewhat);
+  
+  o1 = file1->Get(objName);
+  o2 = file2->Get(objName);
+  
+  if (!o1) {
+    Error("CompareSecMaps", "File %s does not contain an object named %s", 
+         fn1, objName);
+    return;
+  }
+  if (!o2) {
+    Error("CompareSecMaps", "File %s does not contain an object named %s", 
+         fn2, objName);
+    return;
+  }
+};
+
+
+
index 82fbe2a6aaf029cd2daf340398c0db59558e8631..c362b007e527e84f164c2de6c01c4db6e58f4be0 100644 (file)
  * 
  * @return Ratio of the two, or null
  */
-TH2*
-Compare2Maps(UShort_t d, Char_t r, UShort_t v, 
-            const AliFMDCorrSecondaryMap& first, 
-            const AliFMDCorrSecondaryMap& second)
-{
-  TH2* h1 = first.GetCorrection(d, r, v);
-  TH2* h2 = second.GetCorrection(d, r, v);
-  
-  if (!h1) { 
-    Error("Compare2Maps", "Map for FMD%d%c, vtxbin %3d not found in first", 
-         d, r, v);
-    return 0;
-  }
-  if (!h1) { 
-    Error("Compare2Maps", "Map for FMD%d%c, vtxbin %3d not found in second", 
-         d, r, v);
-    return 0;
-  }
-  
-  Double_t vl    = first.GetVertexAxis().GetBinLowEdge(v);
-  Double_t vh    = first.GetVertexAxis().GetBinUpEdge(v);
-  TH2*     ratio = static_cast<TH2*>(h1->Clone(Form("tmpFMD%d%c_%3d",d,r,v)));
-  ratio->SetName(Form("FMD%d%c_vtx%03d_ratio", d, r, v));
-  ratio->SetTitle(Form("%+5.1f<v_{z}<%-+5.1f", vl, vh));
-  ratio->Divide(h2);
-  ratio->SetStats(0);
-  ratio->SetDirectory(0);
-  ratio->SetZTitle("ratio");
-  // ratio->SetMinimum(0.9);
-  // ratio->SetMaximum(1.5);
-
-  return ratio;
-}
-
-//____________________________________________________________________
-TPad* 
-ClearCanvas(TCanvas* c, UShort_t nVtx, UShort_t d, Char_t r, 
-           const char* n1, const char* n2)
-{
-  c->Clear();
-  TPad* p1 = new TPad("top", "Top", 0, .95, 1, 1, 0, 0);
-  p1->Draw();
-  p1->cd();
-
-  TLatex* l = new TLatex(.5, .5, Form("Ratio of secondary maps for "
-                                      "FMD%d%c (%s / %s)", d, r, n1, n2));
-  l->SetNDC();
-  l->SetTextAlign(22);
-  l->SetTextSize(0.3);
-  l->Draw();
-  
-  c->cd();
-  TPad* body = new TPad("body", "Body", 0, 0, 1, .95, 0, 0);
-  body->SetTopMargin(0.05);
-  body->SetRightMargin(0.05);
-  body->Divide(2, (nVtx+1)/2, 0.001, 0.001);
-  body->Draw();
-
-  return body;
-}
 
 //____________________________________________________________________
 void
 CompareSecMaps(const char* fn1,   const char* fn2, 
-              const char* n1=0,  const char* n2=0)
+              const char* n1=0,  const char* n2=0,
+              bool load=true)
 {
 
-  // --- Load libraries ----------------------------------------------
-  // gROOT->Macro("$ALICE_ROOT/PWG2/FORWARD/analysis2/scripts/LoadLibs.C");
-  
-  // --- Open files --------------------------------------------------
-  const char* nam1 = n1;
-  const char* nam2 = n2;
-  if (!n1) nam1 = fn1;                         
-  if (!n2) nam2 = fn2;
-
-  TFile* file1 = TFile::Open(fn1, "READ");
-  TFile* file2 = TFile::Open(fn2, "READ");
-
-  if (!file1) { 
-    Error("CompareSecMaps", "File %s cannot be opened for %s", fn1, n1);
-    return;
+  // --- Load Utilities ----------------------------------------------
+  if (load) {
+    gROOT->Macro("$ALICE_ROOT/PWG2/FORWARD/analysis2/scripts/LoadLibs.C");
+    gROOT->LoadMacro("$ALICE_ROOT/PWG2/FORWARD/analysis2/scripts/CompareCorrs.C");
   }
 
-  if (!file2) { 
-    Error("CompareSecMaps", "File %s cannot be opened for %s", fn2, n2);
-    return;
-  }
-  
-  // --- Find Objects ------------------------------------------------
-  const char* objName = AliForwardCorrectionManager::Instance()
-    .GetObjectName(AliForwardCorrectionManager::kSecondaryMap);
-  
-  AliFMDCorrSecondaryMap* obj1 = 
-    static_cast<AliFMDCorrSecondaryMap*>(file1->Get(objName));
-  AliFMDCorrSecondaryMap* obj2 = 
-    static_cast<AliFMDCorrSecondaryMap*>(file2->Get(objName));
-  
-  if (!obj1) {
-    Error("CompareSecMaps", "File %s does not contain an object named %s", 
-         fn1, objName);
-    return;
-  }
-  if (!obj2) {
-    Error("CompareSecMaps", "File %s does not contain an object named %s", 
-         fn2, objName);
-    return;
-  }
+  // --- Get Objects -------------------------------------------------
+  TObject* o1 = 0;
+  TObject* o2 = 0;
+  GetObjects(AliForwardCorrectionManager::kSecondaryMap, fn1, fn2, o1, o2);
+  if (!o1 || !o2) return; 
+  AliFMDCorrSecondaryMap* obj1 = static_cast<AliFMDCorrSecondaryMap*>(o1);
+  AliFMDCorrSecondaryMap* obj2 = static_cast<AliFMDCorrSecondaryMap*>(o2);
   UShort_t nVtx = obj1->GetVertexAxis().GetNbins();
 
   // --- Make canvas -------------------------------------------------
-  const char* pdfName = "secMapComparison.pdf";
-  gStyle->SetPalette(1);
-  gStyle->SetTitleX(.10);
-  gStyle->SetTitleY(.99);
-  gStyle->SetTitleW(.85);
-  gStyle->SetTitleH(.085);
-  gStyle->SetTitleFillColor(0);
-  gStyle->SetTitleBorderSize(0);
-
-  TCanvas* c = new TCanvas("c", "c", 800, TMath::Sqrt(2)*800);
-  c->SetFillColor(0);
-  
-  c->Print(Form("%s[", pdfName), "pdf");
+  Canvas* c = new Canvas("secMapComparison", "Ratio of secondary maps", n1, n2);
+  c->Open();
 
+  // --- Loop over the data ------------------------------------------
   for (UShort_t d = 1; d <= 3; d++) { 
     UShort_t nR = (d == 1 ? 1 : 2);
     for (UShort_t q = 0; q < nR; q++) { 
       Char_t   r  = (q == 0 ? 'I' : 'O');
       UShort_t nS = (q == 0 ?  20 :  40);
 
-      TPad* body = ClearCanvas(c, nVtx, d, r, nam1, nam2);
+      // --- Make 2D ratios ------------------------------------------
+      c->Clear(nVtx, d, r);
       TList hists;
       for (UShort_t v=1; v <= nVtx; v++) { 
-       TVirtualPad* p = body->cd(v);
-       // p->SetTopMargin(0.1);
-       // p->SetBottomMargin(0.05);
-       // p->SetRightMargin(0.05);
+       TVirtualPad* p = c->cd(v);
        
-       TH2* ratio = Compare2Maps(d, r, v, *obj1, *obj2);
+       TH2* h1 = obj1->GetCorrection(d, r, v);
+       TH2* h2 = obj1->GetCorrection(d, r, v);
+  
+       if (!h1) { 
+         Error("CompareSecMaps", 
+               "Map for FMD%d%c, vtxbin %3d not found in first", 
+               d, r, v);
+         continue;
+       }
+       if (!h2) { 
+         Error("CompareSecMaps", 
+               "Map for FMD%d%c, vtxbin %3d not found in second", 
+               d, r, v);
+         continue;
+       }
+  
+       Double_t vl    = obj1->GetVertexAxis().GetBinLowEdge(v);
+       Double_t vh    = obj1->GetVertexAxis().GetBinUpEdge(v);
+       TH2*     ratio = 
+         static_cast<TH2*>(h1->Clone(Form("tmpFMD%d%c_%3d",d,r,v)));
+       ratio->SetName(Form("FMD%d%c_vtx%03d_ratio", d, r, v));
+       ratio->SetTitle(Form("%+5.1f<v_{z}<%-+5.1f", vl, vh));
+       ratio->Divide(h2);
+       ratio->SetStats(0);
+       ratio->SetDirectory(0);
+       ratio->SetZTitle("ratio");
+
        if (ratio->GetMaximum()-ratio->GetMinimum() > 10) 
          p->SetLogz();
 
        ratio->Draw("colz");
        hists.AddAt(ratio, v-1);
       }
-      c->Print(pdfName, Form("Title:FMD%d%c", d, r));
+      c->Print(d, r);
       
-      body = ClearCanvas(c, nVtx, d, r, nam1, nam2);
-
+      // --- Make 1D profiles ----------------------------------------
+      c->Clear(nVtx, d, r);
       for (UShort_t v=1; v <= nVtx; v++) { 
-       TVirtualPad* p    = body->cd(v);
-       TH2*         hist = static_cast<TH2*>(hists.At(v-1));
-       TH1*         prof = hist->ProjectionX();
+       c->cd(v);
+       TH2* hist = static_cast<TH2*>(hists.At(v-1));
+       TH1* prof = hist->ProjectionX();
        prof->Scale(1. / nS);
        prof->SetStats(0);
        prof->SetMinimum(0.8);
        prof->SetMaximum(1.2);
 
-       // prof->Draw("hist");
-       // prof->DrawCopy("e same");
        prof->Draw();
        prof->Fit("pol0","Q");
 
@@ -196,13 +121,18 @@ CompareSecMaps(const char* fn1,   const char* fn2,
        l1->Draw();
       }
 
-      c->Print(pdfName, Form("Title:FMD%d%c profiles", d, r));
+      c->Print(d, r, "profiles");
     }
   }
 
-  c->Print(Form("%s]", pdfName), "pdf");
-  file1->Close();
-  file2->Close();
+  // --- Close stuff -------------------------------------------------
+  c->Close();
+  // file1->Close();
+  // file2->Close();
 }
 
   
+//____________________________________________________________________
+//
+// EOF
+// 
diff --git a/PWG2/FORWARD/analysis2/scripts/CompareVtxBias.C b/PWG2/FORWARD/analysis2/scripts/CompareVtxBias.C
new file mode 100644 (file)
index 0000000..b65c060
--- /dev/null
@@ -0,0 +1,138 @@
+/** 
+ * Make ratio of two specific maps 
+ * 
+ * @param d        Detector
+ * @param r        Ring
+ * @param v        Vertex bin (1 based)
+ * @param first    First correction
+ * @param second   Second correction
+ * 
+ * @return Ratio of the two, or null
+ */
+
+//____________________________________________________________________
+void
+CompareVtxBias(const char* fn1,   const char* fn2, 
+              const char* n1=0,  const char* n2=0,
+              bool load=true)
+{
+
+  // --- Load Utilities ----------------------------------------------
+  if (load) {
+    gROOT->Macro("$ALICE_ROOT/PWG2/FORWARD/analysis2/scripts/LoadLibs.C");
+    gROOT->LoadMacro("$ALICE_ROOT/PWG2/FORWARD/analysis2/scripts/CompareCorrs.C");
+  }
+
+  // --- Get Objects -------------------------------------------------
+  TObject* o1 = 0;
+  TObject* o2 = 0;
+  GetObjects(AliForwardCorrectionManager::kVertexBias, fn1, fn2, o1, o2);
+  if (!o1 || !o2) return; 
+  AliFMDCorrVertexBias* obj1 = static_cast<AliFMDCorrVertexBias*>(o1);
+  AliFMDCorrVertexBias* obj2 = static_cast<AliFMDCorrVertexBias*>(o2);
+  UShort_t nVtx = obj1->GetVertexAxis().GetNbins();
+
+  // --- Make canvas -------------------------------------------------
+  Canvas* c = new Canvas("vtxBiasComparison", "Ratio of vertex bias", n1, n2);
+  c->Open();
+
+  // --- Loop over the data ------------------------------------------
+  UShort_t d  = 0;
+  UShort_t nR = 2;
+  for (UShort_t q = 0; q < nR; q++) { 
+    Char_t   r  = (q == 0 ? 'I' : 'O');
+    UShort_t nS = (q == 0 ?  20 :  40);
+    
+    // --- Make 2D ratios ------------------------------------------
+    c->Clear(nVtx, d, r);
+    TList hists;
+    for (UShort_t v=1; v <= nVtx; v++) { 
+      TVirtualPad* p = c->cd(v);
+      
+      TH2* h1 = obj1->GetCorrection(r, v);
+      TH2* h2 = obj2->GetCorrection(r, v);
+      
+      if (!h1) { 
+       Error("CompareVtxBias", 
+             "Bias for FMD%d%c, vtxbin %3d not found in first", 
+             d, r, v);
+       continue;
+      }
+      if (!h2) { 
+       Error("CompareVtxBias", 
+             "Bias for FMD%d%c, vtxbin %3d not found in second", 
+             d, r, v);
+       continue;
+      }
+  
+      Double_t vl    = obj1->GetVertexAxis().GetBinLowEdge(v);
+      Double_t vh    = obj1->GetVertexAxis().GetBinUpEdge(v);
+      TH2*     ratio = 
+       static_cast<TH2*>(h1->Clone(Form("tmpFMD%d%c_%3d",d,r,v)));
+      ratio->SetName(Form("FMD%d%c_vtx%03d_ratio", d, r, v));
+      ratio->SetTitle(Form("%+5.1f<v_{z}<%-+5.1f", vl, vh));
+      ratio->Divide(h2);
+      ratio->SetStats(0);
+      ratio->SetDirectory(0);
+      ratio->SetZTitle("ratio");
+      
+      if (ratio->GetMaximum()-ratio->GetMinimum() > 10) 
+       p->SetLogz();
+      
+      ratio->Draw("colz");
+      // h2->Draw("colz");
+      hists.AddAt(ratio, v-1);
+    }
+    c->Print(d, r);
+      
+    // --- Make 1D profiles ----------------------------------------
+    c->Clear(nVtx, d, r);
+    for (UShort_t v=1; v <= nVtx; v++) { 
+      c->cd(v);
+      TH2* hist = static_cast<TH2*>(hists.At(v-1));
+      TH1* prof = hist->ProjectionX();
+      prof->Scale(1. / nS);
+      prof->SetStats(0);
+      prof->SetMinimum(0.8);
+      prof->SetMaximum(1.2);
+      
+      prof->Draw();
+      prof->Fit("pol0","Q");
+      
+      TF1* f = prof->GetFunction("pol0");
+      
+      TLatex* l = new TLatex(0.5, 0.4, Form("A = %f #pm %f", 
+                                           f->GetParameter(0), 
+                                             f->GetParError(0)));
+      l->SetTextAlign(22);
+      l->SetNDC();
+      l->Draw();
+      l->DrawLatex(0.5, 0.3, Form("#chi^2/NDF = %f / %d = %f", 
+                                 f->GetChisquare(), 
+                                 f->GetNDF(), 
+                                 f->GetChisquare() / f->GetNDF()));
+      Double_t dist = TMath::Abs(1 - f->GetParameter(0));
+      l->DrawLatex(0.5, 0.35, Form("|1 - A| = %f %s #deltaA", 
+                                  dist, dist <= f->GetParError(0) ? 
+                                  "#leq" : ">")); 
+
+      TLine* l1 = new TLine(-4, 1, 6, 1);
+      l1->SetLineColor(kRed);
+      l1->SetLineStyle(2);
+      l1->Draw();
+    }
+
+    c->Print(d, r, "profiles");
+  }
+
+  // --- Close stuff -------------------------------------------------
+  c->Close();
+  // file1->Close();
+  // file2->Close();
+}
+
+  
+//____________________________________________________________________
+//
+// EOF
+// 
similarity index 98%
rename from PWG2/FORWARD/analysis2/scripts/DrawFits.C
rename to PWG2/FORWARD/analysis2/scripts/DrawAnaELoss.C
index 55d242e3935759cd82c9a88a75f42a64d006f1a8..e1563095fe0ad2f199f68a140176cd3b92a45847 100644 (file)
@@ -137,7 +137,7 @@ TCanvas* CheckCanvas()
  * 
  * @ingroup pwg2_forward_analysis_scripts
  */
-void DrawSummary(const char* fname="AnalysisResults.root")
+void DrawSummary(const char* fname="forward_eloss.root")
 {
   if (!CheckFitter(fname)) {
     Error("DrawFits", "File not opened");
@@ -395,7 +395,7 @@ void DrawEtaBins(const char* fname="AnalysisResults.root")
  * @ingroup pwg2_forward_analysis_scripts
  */
 void
-DrawFits(const char* fname="AnalysisResults.root")
+DrawAnaFits(const char* fname="forward_eloss.root")
 {
   if (!CheckCanvas()) {
     Error("DrawFits", "No canvas");
similarity index 97%
rename from PWG2/FORWARD/analysis2/scripts/DrawELossFits.C
rename to PWG2/FORWARD/analysis2/scripts/DrawCorrELoss.C
index 401bd90a755511be969e04dbdd2d058041508f84..f86bee1ca7cdfd8aecf865c71f12928234118ebc 100644 (file)
@@ -27,7 +27,7 @@ ClearCanvas(TCanvas* c)
  *
  * @par Input: 
  * The input file is expected to contain a AliFMDCorrELossFit object
- * named @i elossfits in the top level directory
+ * named @i elossfits in the top level directory.
  * 
  * @para Output: 
  * A multi-page PDF.  Note, that the PDF generated by ROOT in this way
@@ -40,7 +40,7 @@ ClearCanvas(TCanvas* c)
  * @ingroup pwg2_forward_analysis_scripts
  */
 void
-DrawELossFits(const char* fname, const char* option="err")
+DrawCorrELoss(const char* fname, const char* option="err")
 {
   //__________________________________________________________________
   // Load libraries and object 
index 1459232e48690c62e6330da7f44c419d41c49372..794dcf57d36af666f5ca39f6a64528c90956a568 100644 (file)
@@ -25,7 +25,7 @@
  * @ingroup pwg2_forward_analysis_scripts
  */
 void
-ExtractELoss(const char* fname="energyFits.root", 
+ExtractELoss(const char* fname="forward_eloss.root", 
             UShort_t sys=1, UShort_t sNN=900, Short_t field=5, Bool_t mc=false)
 {
 #ifdef __CINT__
similarity index 99%
rename from PWG2/FORWARD/analysis2/scripts/FitELoss.C
rename to PWG2/FORWARD/analysis2/scripts/TestFitELoss.C
index b30f384a261513085eabe41d0d74492355f0945c..ae5a975f69dd8957a61cd74f1b82076d8d578eaf 100644 (file)
@@ -253,7 +253,7 @@ void PrintFit(TF1* f)
  *
  * @ingroup pwg2_forward_analysis_scripts
  */
-void FitELoss(Int_t n, UShort_t d, Char_t r, Float_t eta)
+void TestFitELoss(Int_t n, UShort_t d, Char_t r, Float_t eta)
 {
   TList* ef1 = CheckEF();
   TCanvas* c1 = CheckC();
similarity index 99%
rename from PWG2/FORWARD/analysis2/scripts/MakeELossFit.C
rename to PWG2/FORWARD/analysis2/scripts/TestMakeELossFits.C
index 719d2254ade18d3b5464a6d04dc9669bb78f685d..16f47f52d0233c800feada6d8723078fb6c50b49 100644 (file)
@@ -69,7 +69,7 @@ public:
               UShort_t    cms, 
               Short_t     field, 
               Bool_t      mc, 
-              const char* filename="AnalysisResults.root") 
+              const char* filename="forward_eloss.root") 
     : fFitter(0), 
       fAxis(0),
       fFits("AliFMDCorrELossFit::ELossFit"),
similarity index 74%
rename from PWG2/FORWARD/analysis2/scripts/RunMakeELossFit.C
rename to PWG2/FORWARD/analysis2/scripts/TestRunMakeELossFit.C
index 8054c2d3d7245ba6ef14f3095780227120f6e528..d32dce32d23fa16a37770dac5af3c133e2f17954 100644 (file)
  *
  */
 void
-RunMakeELossFit(UShort_t    sys, 
-               UShort_t    cms, 
-               Short_t     field, 
-               Bool_t      mc=false,
-               const char* filename="AnalysisResults.root")
+TestRunMakeELossFit(UShort_t    sys, 
+                   UShort_t    cms, 
+                   Short_t     field, 
+                   Bool_t      mc=false,
+                   const char* filename="forward_eloss.root")
 {
   std::cout << "Loading libraries ..." << std::endl;
   gROOT->Macro("$ALICE_ROOT/PWG2/FORWARD/analysis2/scripts/LoadLibs.C");
@@ -28,14 +28,14 @@ RunMakeELossFit(UShort_t    sys,
   gROOT->LoadMacro("$ALICE_ROOT/PWG2/FORWARD/analysis2/scripts/Compile.C");
  
   std::cout << "Compiling MakeELossFit.C script ..." << std::endl;
-  Compile("$ALICE_ROOT/PWG2/FORWARD/analysis2/scripts/MakeELossFit.C"); 
+  Compile("$ALICE_ROOT/PWG2/FORWARD/analysis2/scripts/TestMakeELossFit.C"); 
 
   std::cout << "Making MakeELossFit object (sys=" << sys 
            << ", cms=" << cms << ", field=" << field << ", mc=" << mc 
            << ")" << std::endl;
-  MakeELossFit mef(sys, cms, field, mc, "AnalysisResults.root"); 
+  MakeELossFit mef(sys, cms, field, mc, filename); 
 
-  std::cout << "Runing maker ..." << std::endl;
+  std::cout << "Running maker ..." << std::endl;
   mef.Run();
 }
 //