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 76117b4..0c2d89c 100644 (file)
@@ -514,6 +514,15 @@ AliFMDCorrELossFit::ELossFit::Draw(Option_t* option)
 
 //____________________________________________________________________
 Double_t
+AliFMDCorrELossFit::ELossFit::GetLowerBound(Double_t f) const
+{
+  // 
+  // Return 
+  //    Delta * f
+  return f * fDelta;
+}
+//____________________________________________________________________
+Double_t
 AliFMDCorrELossFit::ELossFit::GetLowerBound(Double_t f, 
                                            Bool_t includeSigma) const
 {
@@ -912,6 +921,24 @@ AliFMDCorrELossFit::GetOrMakeRingArray(UShort_t d, Char_t r)
 //____________________________________________________________________
 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,
                                  Double_t f, Bool_t showErrors, 
                                  Bool_t includeSigma) const
 {
index 8eb83c5..acf7115 100644 (file)
@@ -341,6 +341,14 @@ public:
      */
     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 
      */
     void CalculateQuality(Double_t maxChi2nu=fgMaxChi2nu, 
@@ -545,6 +553,30 @@ public:
    * @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
+   * 
+   * @param d            Detector
+   * @param r            Ring
+   * @param etaBin       Eta bin (1-based)
    * @param f            Factor on xi (and sigma)
    * @param showErrors   Show errors
    * @param includeSigma Whether to include sigma 
@@ -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;
 
   
   /**