Added new methods to get lower bound as a fraction of the MPV
authorhdalsgaa <hdalsgaa@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 8 Jun 2011 14:38:26 +0000 (14:38 +0000)
committerhdalsgaa <hdalsgaa@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 8 Jun 2011 14:38:26 +0000 (14:38 +0000)
PWG2/FORWARD/analysis2/AliFMDCorrELossFit.cxx
PWG2/FORWARD/analysis2/AliFMDCorrELossFit.h

index 76117b4e3ede3722bc12a742d48c65c3dc59786d..0c2d89c2dd6d427350d65956217b9aa1172dc1bc 100644 (file)
@@ -512,6 +512,15 @@ AliFMDCorrELossFit::ELossFit::Draw(Option_t* option)
 //____________________________________________________________________
 #define CHECKPAR(V,E,T) ((V > 0) && (E / V < T))
 
+//____________________________________________________________________
+Double_t
+AliFMDCorrELossFit::ELossFit::GetLowerBound(Double_t f) const
+{
+  // 
+  // Return 
+  //    Delta * f
+  return f * fDelta;
+}
 //____________________________________________________________________
 Double_t
 AliFMDCorrELossFit::ELossFit::GetLowerBound(Double_t f, 
@@ -909,6 +918,24 @@ AliFMDCorrELossFit::GetOrMakeRingArray(UShort_t d, Char_t r)
   return static_cast<TObjArray*>(fRings.At(idx));
 }
 
+//____________________________________________________________________
+Double_t
+AliFMDCorrELossFit::GetLowerBound(UShort_t  d, Char_t r, Int_t etabin,
+                                 Double_t f) const
+{
+  ELossFit* fit = GetFit(d, r, etabin);
+  if (!fit) return -1024;
+  return fit->GetLowerBound(f);
+}
+//____________________________________________________________________
+Double_t
+AliFMDCorrELossFit::GetLowerBound(UShort_t  d, Char_t r, Double_t eta,
+                                 Double_t f) const
+{
+  Int_t bin = FindEtaBin(eta);
+  if (bin <= 0) return -1024;
+  return GetLowerBound(d, r, Int_t(bin), f);
+}
 //____________________________________________________________________
 Double_t
 AliFMDCorrELossFit::GetLowerBound(UShort_t  d, Char_t r, Int_t etabin,
index 8eb83c5eea3d539f83e3b9e7226b22d621f4496a..acf7115881cb704c807acccac23175c824ba3898 100644 (file)
@@ -340,6 +340,14 @@ public:
      * @return @f$ \Delta - f (\xi + \sigma)@f$
      */
     Double_t GetLowerBound(Double_t f, Bool_t includeSigma) const;
+    /** 
+     * Calculate the lower bound 
+     * 
+     * @param f             fraction of @f$\Delta@f$
+     * 
+     * @return @f$ f\Delta@f$
+     */
+    Double_t GetLowerBound(Double_t f) const;
     /** 
      * Calculate the quality 
      */
@@ -539,6 +547,30 @@ public:
    * @{ 
    * @name Lower bounds on fits 
    */
+  /** 
+   * Get the lower validity bound of the fit
+   * 
+   * @param d            Detector
+   * @param r            Ring
+   * @param etaBin       Eta bin (1-based)
+   * @param f            Fraction of @f$\Delta_{mp}@f$
+   * 
+   * @return @f$ f\Delta_{mp}@f$ 
+   */
+  Double_t GetLowerBound(UShort_t d, Char_t r, Int_t etaBin, 
+                        Double_t f) const;
+  /** 
+   * Get the lower validity bound of the fit
+   * 
+   * @param d            Detector
+   * @param r            Ring
+   * @param eta          Eta value
+   * @param f            Fraction of @f$\Delta_{mp}@f$
+   * 
+   * @return @f$ f\Delta_{mp}@f$ 
+   */
+  Double_t GetLowerBound(UShort_t d, Char_t r, Double_t eta, 
+                        Double_t f) const;
   /** 
    * Get the lower validity bound of the fit
    * 
@@ -552,8 +584,8 @@ public:
    * @return @f$ \Delta_{mp} - f(\xi+\sigma)@f$ 
    */
   Double_t GetLowerBound(UShort_t d, Char_t r, Int_t etaBin, 
-                        Double_t f, Bool_t showErrors=true,
-                        Bool_t includeSigma=true) const;
+                        Double_t f, Bool_t showErrors,
+                        Bool_t includeSigma) const;
   /** 
    * Get the lower validity bound of the fit
    * 
@@ -567,8 +599,8 @@ public:
    * @return @f$ \Delta_{mp} - f(\xi+\sigma)@f$ 
    */
   Double_t GetLowerBound(UShort_t d, Char_t r, Double_t eta, 
-                        Double_t f, Bool_t showErrors=true,
-                        Bool_t includeSigma=true) const;
+                        Double_t f, Bool_t showErrors,
+                        Bool_t includeSigma) const;
 
   
   /**