|Message: Total energy deposited by each gamma ray||Not Logged In (login)|
Click on the Forum title, e.g. on the "Forums by Category" page, to read a sequence of postings to the Forum and its threads all in one page. If you are only interested in one thread or the thread following a specific posting, click the thread or the posting, which takes you to a smaller page, which contains only the part you are interested in and may be easier to navigate.
Messages are "chained" if there are only replies at the first level, i.e. 1/1.html, 1/1/1.html etc. In case of "chained" messages the message number is replaced by the icon and there is no indentation.
Inline: Display the subject line only or also the text of the posting(s); for the choice "All" the "Outline" choices are switched off.
|1||0||1||no text / full text of posting|
|2||1||All||text for level 1 only / text for All postings|
Outline: Choose the depth of the posting thread, successive toggle controls provide increasing detail.
|1||2||1||2 levels / 1 level (original posting)|
|2||3||2||3 levels / 2 levels|
|3||3||All||3 levels / all levels (all postings)|
Hello, I am trying to plot a histogram (using AIDA) of energy deposited by each incident gamma ray in a detector. So I want something like: 100 gamma rays deposited 500 keV of energy, 200 gamma rays deposited 300 keV of energy etc. I have a physics list like below:
// Gamma G4ParticleDefinition* gammaParticle = G4Gamma::GammaDefinition(); G4ProcessManager* pManager = gammaParticle->GetProcessManager();
// Register processes to gamma’s process manager pManager->AddDiscreteProcess(&thePhotoElectricEffect); pManager->AddDiscreteProcess(&theComptonScattering); pManager->AddDiscreteProcess(&theGammaConversion);
pManager->AddDiscreteProcess(&theLowEnPhoto); pManager->AddDiscreteProcess(&theLowEnCompton); pManager->AddDiscreteProcess(&theLowEnPair); pManager->AddDiscreteProcess(&theLowEnRayleigh);
// Electron G4ParticleDefinition* electronParticle = G4Electron::ElectronDefinition(); pManager = electronParticle->GetProcessManager();
// Register processes to electron’s process manager pManager->AddDiscreteProcess(&theElectronBremsStrahlung); pManager->AddProcess(&theElectronIonisation, ordInActive, 2, 2);
pManager->AddDiscreteProcess(&theLowEnBremss); pManager->AddProcess(&theLowEnIon, ordInActive, 2, 2);
pManager->AddProcess(&theElectronMultipleScattering); pManager->SetProcessOrdering(&theElectronMultipleScattering, idxAlongStep, 1); pManager->SetProcessOrdering(&theElectronMultipleScattering, idxPostStep, 1);
How do I get the required information? Which function should I use ? How should I add up energies deposited in the detector. I check in my stepping action if the track volume is my detector but I am still confused. Sometimes the energy adds up to more than the energy of the incident gamma ray (how is that possible). Eg. if I use a 500 keV gamma, and add up all the deposited energy [ step->GetTotalEnergyDeposit() ] it comes out to be more than 500 keV. So, how do I add up the energy deposited by various processes (compton, photoelectric etc.) I just want the total energy deposited by each gamma ray .. does not matter by compton or photoelectric etc. If the gamma delects out of the detector, I want only the energy deposited before it left the detector.
Thank you for your help, KB
|Inline Depth:||Outline Depth:||Add message:|