Please fill out the following information to help in answering your question, and also see tips for posting code snippets. If you don’t provide this information it will take more time to help with your problem!
_Geant4 Version: 11.1.0
_Operating System: Windows 10
_Compiler/Version: Visual Studio 17.9
_CMake Version: 3.25.1
Hello everybody,
I am simulating the mass attenuation coefficient for different compounds using gamma radiation at various energy ranges.
Which physics lists should I use to ensure accurate results?
To calculate mass attenuation coefficient you must calculate as a counter of the gammas with and without target.
I = no of gammas after target
I0 = no. of gammas hitting target
You can use #include “Shielding.hh”
as it already includes “G4EmStandardPhysics_option4.hh” or else you can choose only
G4EmStandardPhysics_option4
Do you mean I need to count number of photons reach the detector with and without the target? For example if I start with 100000 primaries this will be Io and I will be the number of gamma reaches the detector. Is that correct?
Second thing, is “Shielding.hh” is enough for low gamma energy such as 0.511 MeV?
I just want to confirm if all I need is to record the “number” of photons with and without a shielding material. Is that correct or should I record something else?
Hi again
I shoot 1000 gamma photons with 0.511 MeV to the NaI detector. The target is to count how many photons reach the detector. Every time I get 6644577 photons reach the detector.
I am attaching some of my files: main.cc (1.8 KB) SteppingAction.cc (706 Bytes) PrimaryGeneratorAction.cc (974 Bytes) DetectorConstruction.cc (1.9 KB)
If you check example B1 then you can have an idea how you can have integrated counts in a scoring volume [detector/target/both].
Score at the end of event or at end of run via PostUserTrackingAction.
Since you are not doing any Physics for creating secondaries therefore you may opt em_op1.
PhysicsList = new G4EmStandardPhysics_option1();
Scoring …
EA->AddCount(1);
or
RA->AddCount(1);
In generating particles you can restrict it to 1 in PGA [better choice];
fParticleGun = new G4ParticleGun(1);
Add eventID when scoring.
Please look testem0 and em1 example for further understanding
I am a newcomer and would like to understand how to count the number of particles based on recorded energy deposition. Could you please explain the underlying logic?
I did not mean to hijack. I already post my own questions but still could not figure this. Since my question is related I wanted to ask also here. Maybe this can also help to question owner too I believe.