|Message: Tracking and Readout geometry cell number||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, dear colleagues
My geometry is pretty simple so far. There is a rectangular water phantom with thin cylindrical readout geometry sensitive volume in the center divided into even segments as the depth increases. A proton beam is of energy 160 MeV and incident perpendicular to the phantom surface, so that the cylindrical sensitive volume coincides with the beam in the water. The uppermost plane of the cylinder coincides with the phantom surface. The step limit is such, that one cell contains exactly one step. So PreStepPoint and PostStepPoint are on the boundaries of cells. In sensitive detector, in ProcessHits(...) I check the coordinates of PreStepPoint and PostStepPoint of G4Step and how they coincide with G4TouchableHistory.GetReplicaNumber().
So, here is the problem:
When the PreStepPoint is on the Phantom boundary and PostStepPoint is on the boundary of the next cell, G4TouchableHistory.GetReplicaNumber() returns 0 (so let's call this cell 0th). But for the next step(PreStepPoint in on the boundary between oth and 1st and PostStepPoint is on the boundary between 1st and 2nd) the G4TouchableHistory.GetReplicaNumber() also returns 0. For next step G4TouchableHistory.GetReplicaNumber() is 1 and for the one after that it's 2. But the 0 cell receives two steps. I use G4TouchableHistory.GetReplicaNumber() to accumulate EnergyDeposited by cell and this results in cell 0 getting twice the energy which is physically wrong.
Please, see code attached.
How can this problem be solved? I will greatly appreciate any help!
Sincerely yours, Anastasia
Attachment: http://hypernews.slac.stanford.edu/HyperNews/geant4/get/AUX/2013/11/19/09.42-13148-BWDetectorConstruction.cc http://hypernews.slac.stanford.edu/HyperNews/geant4/get/AUX/2013/11/19/09.42-14829-PBWDetectorROGeometry.cc http://hypernews.slac.stanford.edu/HyperNews/geant4/get/AUX/2013/11/19/09.42-12882-PBWDetectorSD.cc http://hypernews.slac.stanford.edu/HyperNews/geant4/get/AUX/2013/11/19/09.42-56495-BWDetectorConstruction.hh http://hypernews.slac.stanford.edu/HyperNews/geant4/get/AUX/2013/11/19/09.42-55082-PBWDetectorROGeometry.hh http://hypernews.slac.stanford.edu/HyperNews/geant4/get/AUX/2013/11/19/09.42-16417-PBWDetectorSD.hh
|Inline Depth:||Outline Depth:||Add message:|