- if(fSelector->PassDistanceToBadChannelCut(*caloCluster))//&&fSelector->CutGeometricalAcceptance(*(stack->Particle(primIdx))))
- {
-// std::cout << "Gamma primary: " << primIdx << std::endl;
-// foundGammas.push_back(primIdx);
- foundGammas.push_back(pIdx);
- }
+ if((stack->Particle(pIdx)->GetPdgCode() == fgGammaCode))
+ {
+ if(fSelector->PassDistanceToBadChannelCut(*caloCluster))//&&fSelector->CutGeometricalAcceptance(*(stack->Particle(primIdx))))
+ {
+ // std::cout << "Gamma primary: " << primIdx << std::endl;
+ foundGammas.push_back(pIdx);
+ }
+ }