fix proposed by Alex W
authorabercuci <abercuci@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 11 May 2010 13:12:40 +0000 (13:12 +0000)
committerabercuci <abercuci@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 11 May 2010 13:12:40 +0000 (13:12 +0000)
PWG1/TRD/AliTRDpidRefMaker.cxx

index c222bfb..633a1e0 100644 (file)
@@ -271,11 +271,8 @@ void AliTRDpidRefMaker::Fill()
 // Fill data tree
 
   if(!fPIDdataArray->fNtracklets) return;
-  const Float_t kAlmostZero(1.e-3);
-  Float_t unity(0.); for(Int_t is(AliPID::kSPECIES); is--;) unity+=fPID[is];
-  if(TMath::Abs(unity-1.)>kAlmostZero) return;
-
   fPIDbin = TMath::LocMax(AliPID::kSPECIES, fPID); // get particle type
+  if(fPIDbin == 0 && fPID[0]<1.e-5) return;
   // Fill data tree
   fData->Fill();