Dear geant4 and physics experts,
Hello,
I am calculating the depth at which 95% of 100 keV photons are absorbed when they are incident on a silicon target.
In other words, I’m determining the Si target depth required for 95% containment using 100keV mono energy photon.
First, I calculated it by my hands using “Exponential Attenuation law” and “nist dataset”.
.
Compare to this simple caculation result, I made a Geant4 code.
My environment is like this.
[50,50,50]m huge Si target.
I fired 100keV mono energy photon at [0,0,-30]m to z position.
G4PhysListFactory physicsFactory;
G4VModularPhysicsList* physicsList = physicsFactory.GetReferencePhysList("FTFP_BERT_EMZ");
runManager->SetUserInitialization(physicsList);
‘’’
void SteppingAction::UserSteppingAction(const G4Step* step) {
auto preStepPoint = step->GetPreStepPoint();
auto postStepPoint = step->GetPostStepPoint();
// Get position information
G4ThreeVector prePosition = preStepPoint->GetPosition();
G4ThreeVector postPosition = postStepPoint->GetPosition();
// Get volume information
const G4VPhysicalVolume* preVolume = preStepPoint->GetTouchableHandle()->GetVolume();
const G4VPhysicalVolume* postVolume = postStepPoint->GetTouchableHandle()->GetVolume();
// Only consider primary particle (TrackID == 1)
if (step->GetTrack()->GetTrackID() == 1){
// Record the end step when particle is killed
if (step->GetTrack()->GetTrackStatus() == fStopAndKill) {
G4ThreeVector finalpostPosition = (postVolume && postVolume->GetName() == "Silicon") ? postPosition : G4ThreeVector(-999,-999,-9999);
// position, detectorID 저장 및 출력
fEventAction->RecordFinalStep(finalpostPosition);
}
}
I used this SteppingAction Code, and take final position of Z which absorbs in Si target.
I made 1000 runs , and in each run, I made 10000events.
So total 10,000,000 events.
About 20% goes outOfWorld so I rejected.
For each 1000 run, I calculated 95%containment depth using 10000events, and I calculated the average.
The result is like below.
I really wonder why the results are different.
Actually I tested another physicslists for low EM interaction, but the result was same.
I wish my method of making the code is wrong.
Thank you in advance for your help.
Best regards,
Hyeonseok