How to calculate mass attenuation coefficient?

Hello

I am a physic student. I am interested in Geant4. I want to build a gamma transmission technique simulation. But i cannot count in specific gamma ray energies which i have written in B1PrimaryGeneratorAction.cc (fParticleGun->SetParticleEnergy(1.*MeV)). I want to count reached gamma rays to scoring volume. I tried several times in B1SteppingAction.cc, but i don’t achieve.

Who can help me? Thank you