Hi all,
I have a simulation comprising two Hpge detectors placed opposite to each other.
Source: Th-232 (I am interested in simulating the full chain)
I want to find only the energy deposited in them only due to the gamma photons.
My try to this is to modify exampleB1 stepping.cc class,
const G4DynamicParticle* theParticle = track->GetDynamicParticle();
const G4ParticleDefinition* particleDef = theParticle->GetParticleDefinition();
G4String name = particleDef->GetParticleName()
if((volume == fScoringVolume) & name == "Gamma"){
G4double edepStep = step -> GetTotalEnergyDeposit()
fEventAction->AddEdep(edepStep);
Is this the right way to go about it or are there better approaches to score energy deposited by a specific particle in a sensitive volume?
Thanks a lot !