]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - HBTAN/AliHBTReaderITSv2.cxx
PID code check
[u/mrichter/AliRoot.git] / HBTAN / AliHBTReaderITSv2.cxx
index 9ffa4530b3e63212dd7bf2ce32dc34efb9fb2370..fb0390b38d17127e3bdbe424609d8fea9ff9b676 100644 (file)
@@ -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