particleDensityPiTh = gcPiTh.ParticleNumberDensity(fDatabase->GetPDGParticle(211));
}
- for(Int_t particleIndex = 0; particleIndex < TMath::Min(fDatabase->GetNParticles(), kNPartTypes); particleIndex++) {
+ for(Int_t particleIndex = 0; particleIndex < fDatabase->GetNParticles(); particleIndex++) {
+ if(particleIndex>=kNPartTypes) {
+ cout << "InitialStateHydjet::MultIni(): ERROR Particle definitions in the PDG database exceeds the hardcoded limit of " << kNPartTypes << endl;
+ cout << " There is either an error with reading the particles file or you might need to increase the maximum allowed definitions" << endl;
+ break;
+ }
ParticlePDG *currParticle = fDatabase->GetPDGParticleByIndex(particleIndex);
Int_t encoding = currParticle->GetPDG();
//strangeness supression