AliTRDdEdxParams bug fixed -- avoiding dividing nch=0
authorxlu <xianguo.lu@cern.ch>
Tue, 12 Aug 2014 11:06:56 +0000 (13:06 +0200)
committermorsch <andreas.morsch@cern.ch>
Tue, 30 Sep 2014 13:18:22 +0000 (15:18 +0200)
STEER/STEERBase/AliTRDPIDResponse.cxx
STEER/STEERBase/AliTRDdEdxParams.cxx

index 7994707..cd2b72b 100644 (file)
@@ -156,6 +156,11 @@ Double_t AliTRDPIDResponse::GetSignalDelta( const AliVTrack* track, AliPID::EPar
   //
 
   const Double_t badval = -9999;
+
+  if(!track){
+    return badval;
+  }
+
   Double_t pTRD = -999;
   for(Int_t ich=0; ich<6; ich++){
     pTRD = track->GetTRDmomentum(ich);
index e847d94..9ab3274 100644 (file)
@@ -44,7 +44,7 @@ Int_t AliTRDdEdxParams::GetIter(const Int_t itype, const Int_t nch, const Int_t
     itNch = 1;
   }
 
-  if(ncls/nch>=18){
+  if(nch!=0 && ncls/nch>=18){
     itNcls = 0;
   }
   else{