Problem in FindTemp fixed
authoramastros <amastros@f7af4fe6-9843-0410-8265-dc069ae4e863>
Sun, 31 Aug 2008 18:15:40 +0000 (18:15 +0000)
committeramastros <amastros@f7af4fe6-9843-0410-8265-dc069ae4e863>
Sun, 31 Aug 2008 18:15:40 +0000 (18:15 +0000)
HMPID/AliHMPIDParam.h

index 262c6b7..a911eb8 100644 (file)
@@ -245,7 +245,8 @@ Double_t AliHMPIDParam::FindTemp(Double_t tLow,Double_t tHigh,Double_t y)
 //  return gradT*y+t1;
   Double_t halfPadSize = 0.5*SizePadY();
   Double_t gradT = (TMath::Log(SizePcY()) - TMath::Log(halfPadSize))/(TMath::Log(tHigh)-TMath::Log(tLow));
-  return tLow*TMath::Power(y/halfPadSize,1./gradT);  
+  if(y<0) y = 0;
+  return tLow + TMath::Power(y/halfPadSize,1./gradT);  
 }
 //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 #endif