|Message: Not having a good understanding of Tracking to split primary and scattered particles from each other.||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)|
Dears GEANT4 Users and Developers|
Excuse me to raise my problems in the forum of "Event and Track Management". I think that I have not a good understanding of "Tracking" in GEANT4. I do not know how I split primary and scattered particles from each other. My problem is related to the root output of the GATE Monte Carlo code.
I hope that I have chosen this forum correctly to discuss my problems and guide me to solve my problem.
I raised my question about "recording EPID responses (imaging system in radiotherapy) to the primary and scattered radiation" in mailing-list of GATE in 26 December 2018, but unfortunately I do not get anything. Also I asked it in ROOT forum titled “How to split primary particles and scattered particles” in 29 December 2018, unfortunately I did not get a good guide.
I will briefly explain what I want to do.
I have a phase space in the root format. This file contains particles in the form of a pencil beam (x- and y- components of position and momentum are equal to 0 and z- components of position and momentum are equal to 990.0 mm and 1.0, respectively).
In the first step, this beam hits directly on the EPID in radiotherapy linac (Electronic Portal Imaging Device). I must mention that I can record the flux of particles in EPID in root format (using data avilable at Hits, the root tree for hits) and then create ASCII files from these particles and finally create images from theses particles in MATLAB.
My purpose in this step is to create separate images of primary and scattered particles created in EPID. In other words, I want to record the EPID responses to the primary and scattered radiation separately as images. Obviously, scattered beams are produced by the components of EPID. By obtaining these images, I want to create different kernels for primary and scattered particles.
I realized that to do so I need to use specifications of particles recorded in root file (branches) such as TrackID and ParentID in the form of conditional statements, for example something like the following conditions (these are likely to be wrong):
For primary particles: ParentID == 0 AND TrackID == 0
For first order scattering particles: ParentID == 0 AND TrackID ==1
For second order scattering particles: ParentID == 0 AND TrackID ==2
For third order scattering particles (third time): ParentID == 0 AND TrackID ==3
How do you split primary and scattered particles (and other order) from each other?
I have access to information about particle recorded in root file with the following commands in root.
root  TFile *f = Tfile::Open("opticalPhotonesCreatedByPrimary00cm.root");
root  f->ls()
TFile** opticalPhotonesCreatedByPrimary00cm.root ROOT file with histograms
TFile* opticalPhotonesCreatedByPrimary00cm.root ROOT file with histograms
KEY: TTree Hits;-32768 The root tree for hits
KEY: TTree Hits;32767 The root tree for hits
KEY: TTree Singles;32767 The root tree for singles
KEY: TTree Singles;-32768 The root tree for singles
KEY: TTree OpticalData;2 OpticalData
KEY: TTree OpticalData;1 OpticalData
KEY: TH1D latest_event_ID;1 latest_event_ID(#)
KEY: TH1D total_nb_primaries;1 total_nb_primaries(#)
root  Hits->Show(0)
PDGEncoding = 11
trackID = 2
parentID = 1
trackLocalTime = 4.93825e-12
time = 5.25887e-09
edep = 0.143433
stepLength = 0.254025
trackLength = 1.46422
posX = 0.433647
posY = 0.233214
posZ = 1576.46
localPosX = 0.433647
localPosY = 0.233214
localPosZ = 0.118
momDirX = 0.336407
momDirY = 0.153993
momDirZ = 0.929041
baseID = 0
level1ID = 0
level2ID = 0
level3ID = 0
level4ID = 0
layerID = 0
photonID = -1
nPhantomCompton = -1
nCrystalCompton = -1
nPhantomRayleigh = -1
nCrystalRayleigh = -1
primaryID = -1
sourcePosX = -1
sourcePosY = -1
sourcePosZ = -1
sourceID = 0
eventID = 45
runID = 0
axialPos = 1576.57
rotationAngle = 0
volumeID = 0,
0, 1, 1, -1, -1, -1, -1, -1, -1
processName = Transportation
comptVolName = NULL
RayleighVolName = NULL
Note: Unfortunately I do not know the exact concepts of parameters and their application such as PDGEncoding, trackID, parentID, baseID, level1ID, level2ID, level3ID, level4ID, layerID, photonID,nPhantomCompton, nCrystalCompton, primaryID, eventID, runID, volumeID, …. Which IDs are useful for separating primary particles from scattered particles and then other order scattered particles? I did not find the text that explains these parameters.
In second step, I want define a water phantom on the front of EPID and repeat the steps mentioned above to get the above results (images of primary and scatterd radiations from EPID) and also image of scattered photons from phantom.
For recording scattered photons from phantom, what is conditional statements with using the branches of root tree for Hits such as TrackID and ParentID?
Finally, I want to record absorbed dose distribution in the phosphor section of EPID due to primary and scattered radiation separately. I must mention that I can get hdr/img absorbed dose images using DoseActor from all particles detected by EPID AND NOT from primary and scattered particles separately. How can I do it?
How can I do it?
Please guide me.