Fixes for coverity checks.
[u/mrichter/AliRoot.git] / PWG2 / FORWARD / analysis2 / AliFMDCorrELossFit.cxx
index 76117b4..872ee73 100644 (file)
@@ -203,6 +203,7 @@ AliFMDCorrELossFit::ELossFit::operator=(const ELossFit& o)
   // Return:
   //    Reference to this object 
   //
+  if (&o == this) return *this; 
   fN      = o.fN;
   fNu     = o.fNu;
   fChi2           = o.fChi2;
@@ -514,6 +515,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
 {
@@ -597,6 +607,7 @@ AliFMDCorrELossFit::operator=(const AliFMDCorrELossFit& o)
   // Return:
   //    Reference to this object 
   //
+  if (&o == this) return *this; 
   fRings = o.fRings;
   fLowCut = o.fLowCut;
   SetEtaAxis(o.fEtaAxis.GetNbins(), o.fEtaAxis.GetXmin(), o.fEtaAxis.GetXmax());
@@ -912,6 +923,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
 {