|Message: Getting local coordinates||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 have a problem with reading out the coordinates of a hit within my sensitive detector and I cannot figure out how to solve it.
My Geometry consists of a central scintillation cube made fo LYSO:Ce and on every side of this cube, I have placed a DPC tile with the following substructure:
1 detector tile contains 4x4 dies
1 die contains 2x2 pixels
1 pixel contains 2x2 subpixels
1 subpixel contains 32x25 SPADs (Single Photon Avalanche Diodes)
If I made my SPADs sensitive, that would be 204k volumes as sensitive detectors per tile, and I have 6 tiles. I also need to define optical surfaces for all of them because the are silicon detectors and I need to take reflection into account.
That's why I chose a different way: I place all detector elements explicitly into my geometry except the SPADs. I make the subpixels sensitive detectors, which brings the number of sensitive volumes down to at least ~1.5k. Since the SubPixel, just like the SPADs, is completely filled with silicon, all the hits must be registered on the surface, the local x-y-coordinates of a subpixel should let me determine which SPAD would have been hit.
Then I get the replica number from the subpixel, pixel, die and tile and I have all the data I need.
What I tried within my SubPixelHit class:
G4ThreeVector hitpos = step -> GetPostStepPoint() -> GetPosition();
...gives me the global position of the hit and
G4ThreeVector rel_pos[n] = step -> GetPostStepPoint() -> GetTouchableHandle() -> GetVolume(n) -> GetObjectTranslation();
...gives me the the translation of any of the mother volumes of my subpixel with reference to the world.
I tried adding up all the translations of my mothervolumes and substracting the total vector from the global hit position which would give a vector within my Subpixel volume, but I get wrong results (the coordinates of these results leave the geometry, probably because the tiles are rotated to fit to the scintillation cube).
I played around with trying to rotate the frames of the tiles back to match the global frame and add the vectors then, but the problem is, that GetObjectRotation from G4VPhysicalVolume returns a G4RotationMatrix and rotate() from G4ThreeVector takes only HepRotation types. Funny enough, they seem to be the same in the documentation, but geant4 throws an error if I try to use it...
Is there a way to get these local coordinates or maybe a different solution all together?
Here's a link to a few pictures of my geometry:
PS: I found a few entries in the forum with similar questions about local coordinates, but they all were about getting them after a run, I try to get them during a hit, so I thought there might be a simpler solution.