From f1e2da22269eb53956e9cb7a9358b284e99dc581 Mon Sep 17 00:00:00 2001 From: skowron Date: Tue, 9 Apr 2002 15:04:27 +0000 Subject: [PATCH] PID code check --- HBTAN/AliHBTReaderITSv2.cxx | 3 +++ HBTAN/AliHBTReaderTPC.cxx | 3 +++ 2 files changed, 6 insertions(+) diff --git a/HBTAN/AliHBTReaderITSv2.cxx b/HBTAN/AliHBTReaderITSv2.cxx index 9ffa4530b3e..fb0390b38d1 100644 --- a/HBTAN/AliHBTReaderITSv2.cxx +++ b/HBTAN/AliHBTReaderITSv2.cxx @@ -246,6 +246,9 @@ Int_t AliHBTReaderITSv2::Read(AliHBTRun* particles, AliHBTRun *tracks) } TParticle *p = (TParticle*)gAlice->Particle(label); + if(p == 0x0) continue; //if returned pointer is NULL + if(p->GetPDG() == 0x0) continue; //if particle has crezy PDG code (not known to our database) + if(Pass(p->GetPdgCode())) continue; //check if we are intersted with particles of this type //if not take next partilce diff --git a/HBTAN/AliHBTReaderTPC.cxx b/HBTAN/AliHBTReaderTPC.cxx index 57e44590c38..39421c892a1 100644 --- a/HBTAN/AliHBTReaderTPC.cxx +++ b/HBTAN/AliHBTReaderTPC.cxx @@ -279,6 +279,9 @@ Int_t AliHBTReaderTPC::Read(AliHBTRun* particles, AliHBTRun *tracks) TParticle *p = (TParticle*)gAlice->Particle(label); + if(p == 0x0) continue; //if returned pointer is NULL + if(p->GetPDG() == 0x0) continue; //if particle has crezy PDG code (not known to our database) + if(Pass(p->GetPdgCode())) continue; //check if we are intersted with particles of this type //if not take next partilce -- 2.43.0