]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Before extracting fit code to utils
authorcholm <cholm@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 29 Nov 2010 17:56:23 +0000 (17:56 +0000)
committercholm <cholm@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 29 Nov 2010 17:56:23 +0000 (17:56 +0000)
PWG2/FORWARD/analysis2/AliFMDEnergyFitter.cxx
PWG2/FORWARD/analysis2/AliFMDEnergyFitter.h

index fc42b0cceb409399ce9f459cf8f1ea375e468cd8..34464d80aecc8863a4675862edfb2e05909be8fb 100644 (file)
@@ -410,8 +410,8 @@ AliFMDEnergyFitter::RingHistos::Fill(Bool_t empty, Int_t ieta, Double_t mult)
 
 //__________________________________________________________________
 TArrayD
-AliFMDEnergyFitter::RingHistos::::MakeIncreasingAxis(Int_t n, Double_t min, 
-                                                    Double_t max) 
+AliFMDEnergyFitter::RingHistos::MakeIncreasingAxis(Int_t n, Double_t min, 
+                                                  Double_t max) const
 {
   // Service function to define a logarithmic axis. 
   // Parameters: 
@@ -424,7 +424,7 @@ AliFMDEnergyFitter::RingHistos::::MakeIncreasingAxis(Int_t n, Double_t min,
   Int_t    i  = 1;
   for (i = 1; i < n+1; i++) {
     Double_t dI   = float(i)/n;
-    Double_t next = bins[i-1] + dX1 + dI * dI * dX1;
+    Double_t next = bins[i-1] + dx + dI * dI * dx;
     bins[i]       = next;
     if (next > max) break;
   }
@@ -557,7 +557,7 @@ AliFMDEnergyFitter::RingHistos::Fit(TList* dir, const TAxis& eta,
   TH1* hC    = 0;
   TH1* hMpv  = 0;
   TH1* hW    = 0;
-  TH1* nS    = 0;
+  TH1* hS    = 0;
   TH1* hN    = 0;
   TH1* hA[nLandau-1];
   pars->Add(hChi2 = MakePar("chi2", "#chi^{2}/#nu", eta));
index 526e223b66d0cd0834f0254e22eb9014b87dca4a..cbb98b66b09697f2830fe277d4e46aabafaf651a 100644 (file)
@@ -168,7 +168,10 @@ protected:
      * 
      * @param eAxis 
      */
-    void Init(const TAxis& eAxis);
+    void Init(const TAxis& eAxis, 
+             Double_t maxDE=10, 
+             Int_t nDEbins=300, 
+             Bool_t useIncrBin=true);
     /** 
      * Fill histogram 
      * 
@@ -244,8 +247,7 @@ protected:
      * @return true if fit is good. 
      */
     Bool_t CheckResult(TFitResult& r) const;
-
-    TArrayD MakeLogAxis(Int_t n, Double_t min, Double_t max) const
+    TArrayD MakeIncreasingAxis(Int_t n, Double_t min, Double_t max) const;
     /** 
      * Make E/E_mip histogram 
      * 
@@ -253,7 +255,8 @@ protected:
      * @param eMin   Least signal
      * @param eMax   Largest signal 
      */
-    void Make(Int_t ieta, Double_t eMin, Double_t eMax);
+    void Make(Int_t ieta, Double_t eMin, Double_t eMax, 
+             Double_t deMax=12, Int_t nDeBins=300, Bool_t incr=true);
     /** 
      * Make a parameter histogram
      *