|Message: Identify volume in GDML||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)|
At first, i was making hard-coded geometry in C++.
Then I've decided to use GDML. But it ends up with one problem:
For example: i have several sensitive detectors (the same shape and size, but different positions).
in c++ geometry i can identify current volume by its copyNum value. i create one G4Box and one LogicalVolume attached to it, then make this LogicalVolume to be as SensitiveDetector. In the end i use G4PVPlacement in loop with different copyNum in DetectorConstruction::Construct(). And in my SensitiveDetector class i just check copyNum (preStepPoint->GetTouchableHandle()->GetCopyNumber()) to identify current detector witch was hit by particle.
so I was thinking about the same way in GDML.
if i have, for example, 20 small detectors i'm expecting something like:
<!---- logical volume ----> <volume name="Detector"> <materialref ref="SomeMaterial"/> <solidref ref="DetectorSolid"/> </volume> ... <loop for="di" to="20" step="1"> <physvol> <volumeref ref="Detector"/> <position unit="cm" x="DetPos[di,1]" y="DetPos[di,2]" z="DetPos[di,3]"/> </physvol> </loop> Where: di - just a variable, DetPos - matrix of detectors positions.
But in program all detectors have the same names (for Logical and Physical volumes) and their copyNums don't change either.
So is there any way to identify them in SensetiveDetector class, like i did in hard-coded geometry, except the volume's name?
or the only way is to declare all detectors by hand (without using loops) with different volume names?