https://savannah.cern.ch/bugs/index.php?98544
authormorsch <morsch@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 1 Nov 2012 11:48:15 +0000 (11:48 +0000)
committermorsch <morsch@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 1 Nov 2012 11:48:15 +0000 (11:48 +0000)
Pietro Antonioli

STEER/AOD/AliAODpidUtil.cxx
STEER/ESD/AliESDpid.cxx

index 03885f2..d313247 100644 (file)
@@ -117,7 +117,7 @@ Float_t AliAODpidUtil::NumberOfSigmasTOF(const AliVParticle *vtrack, AliPID::EPa
   if (track->GetDetectorPID()){
     return track->GetDetectorPID()->GetNumberOfSigmas(kTOF, type);
   }  
-  
+  if ( !(track->GetStatus() & AliVTrack::kTOFout) || !(track->GetStatus() & AliVTrack::kTIME) ) return -999.;
   Bool_t oldAod=kTRUE;
   Double_t sigTOF;
   AliAODPid *pidObj = track->GetDetPid();
index 4c027b8..52316f6 100644 (file)
@@ -419,7 +419,7 @@ Float_t AliESDpid::NumberOfSigmasTOF(const AliVParticle *track, AliPID::EParticl
   if (vtrack->GetDetectorPID()){
     return vtrack->GetDetectorPID()->GetNumberOfSigmas(kTOF, type);
   }
-  
+  if ( !(vtrack->GetStatus() & AliVTrack::kTOFout) || !(vtrack->GetStatus() & AliVTrack::kTIME) ) return -999.;
   Double_t expTime = fTOFResponse.GetExpectedSignal(vtrack,type);
   return (vtrack->GetTOFsignal() - fTOFResponse.GetStartTime(vtrack->P()) - expTime)/fTOFResponse.GetExpectedSigma(vtrack->P(),expTime,AliPID::ParticleMassZ(type));
 }