|Message: Re: Detection of optical photons||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)|
> I am confused about how to detect optical photons in Geant4. I have a > detector physical volume with a refractive index attached to it. I > define a Logical border surface of type dielectric_metal between the > detector physical volume and the world physical volume, and attach an > efficiency (1.0) and reflectivity(0.0) to it. By my understanding, I > should see no photons "go through" this surface, since all of them would > be either reflected or absorbed/detected.
I agree. I suggest you try and follow, if you are not already, the exact code in the /examples/extended/optical/LXe:
> However, I see nearly all of > my photons go right through this border surface, into the detector
A border-surface is an 'ordered surface' so the order of the two physical volumes in the definition matters. If you only provide one of the two possible sequences then the surface for the reverse direction is not defined, hence photons can go in.
> volume and out again to the world volume.
Now, they shouldn't be going out if you did your definition correctly.
> Also, is my approach to detect optical photons correct?
I think you are following the LXe example, and if you make no mistakes then your approach of 'detecting' optical photons is correct.
> My goal is to count how many photons hit the detector and get the energy > they deposit (according to my detector efficiency).
No, the only measure of energy deposition in your detector (by the primary ionizing particle) is the number of photons you count. Their sum energy has nothing to do with the original energy deposition. The documentation is very adamant about that and explains why, so are several posts on this forum.
> So my intention is > to use the referred dielectric_metal surface and define my detector as a > sensitive volume so that I can go into the G4SteppingAction and call > ProcessHits in case the boundary status is "Detection" and manually > generate a hit. Is this the simplest approach, or am I > over-complicating?
Yes, this is the recommended way. Optical photons are not like other particles that actually leave energy inside a sensitive volume. Therefore the usual way of tallying 'hits' in G4 does not work for them.
> (side question: why can't photons "go through" the > sensitive detector like other massive particles (as stated in the LXe > example)?).
Yes, they "go through" but in most cases they are tracked with a single step and they do not deposit energy. To think of it, you could probably write a SD class that ProcessHits based on the PreStepPoint being in the volume of interest - but that assumes that optical photons in fact do only a single step in the volume. It is best to follow the LXe example.
I am confident that you'll sort out where your code still differs from the LXe example.