Message: Re: physvol name in gdml Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

None Re: physvol name in gdml 

Forum: Geometry
Re: Question physvol name in gdml (Jing Liu)
Re: Feedback Re: physvol name in gdml (Zoltan)
Date: 13 Feb, 2008
From: <jingliu@mppmu.mpg.de>

Dear Zoltan,

Thank you very much for your reply!

On Feb 13, 2008 10:04 AM, Zoltan <zoltan.torzsok@cern.ch> wrote:
> According to the schema, you can not assign a name to a physical volume
> in the GDML file, so that it has to be generated somehow.

Will this feature be added into the schema in the future?

> In the current release an empty string is attached to the instantiated
> physvol class,

Really? According to my experience, the logical volume name is
attached to the physvol. Below is part of the "ATree" output of a
simple geometry constructed in a gdml file. One can see that the
physical volume names are not empty but the same as their logical
volume names.

#  Now printing with verbosity 1
#  Format is: PV:n / LV (SD,RO)
#  Abbreviations: PV = Physical Volume,     LV = Logical Volume,
#                 SD = Sensitive Detector,  RO = Read Out Geometry.
  "CoolingLiquid":0 / "CoolingLiquid"
    "sensitive_Siegfried":0-2 / "sensitive_Siegfried"
    "TubularIRsheild":3 / "TubularIRsheild"
    "PlatelikeIRsheild":4 / "PlatelikeIRsheild"
    "SmallIRsheildHolder":5 / "SmallIRsheildHolder"
    "SmallIRsheild":6 / "SmallIRsheild"
    "DetectorHoldingRail":7 / "DetectorHoldingRail"
    "SiegfriedSupporter":8-10 / "SiegfriedSupporter"
    "SiegfriedHolder":11-13 / "SiegfriedHolder"
G4ASCIITreeSceneHandler::EndModeling
Graphics systems deleted.
Visualization Manager deleting...

And the following code also works for me:

G4String volumeName = step->GetPreStepPoint()->GetPhysicalVolume()->GetName();

I can use it to get the physical volume name, which is the same as the
logical volume name.

I also noticed that an empty string is attached to the physvol only if
the physvol is constructed like this:

     <physvol>
        <file name="Child.gdml"/>
     </physvol>

The "ATree" output will look like:

 "":0 / "Child"

> but it is subject to change. I am considering including
> both the mother volume name and the referenced voulme name into the
> name:
>
>    <volume name="Mother">
>       <solidref .../>
>       <materialref .../>
>       <physvol>
>          <volumeref ref="Child"/>
>       </physvol>
>    </volume>
>
> In this case the physvol's name will be: "Child_in_Mother".
>
> What dou you think abaout this idea?

I personally prefer the idea that users can have the possibility to
assign an unique name to a physical volume by themselves just as they
do in Geant4.

I myself use the physical volume name to pass information between
geometry class and output class. For example, if a physical volume
name contains string "sensitive" the hits inside it will be recorded
by the output class. Image, if you have two physical volumes coming
from the same logical volume, and you want to record the hits only in
one of them, then you need different names for them. One is
"sensitive_LogVolName", the other is simply "LogVolName".

Sorry for my strange request:-p

Cheers, Jing

Inline Depth:
 1 1
 All All
Outline Depth:
 1 1
 2 2
 All All
Add message: (add)

 Add Message Add Message
to: "Re: physvol name in gdml"

 Subscribe Subscribe

This site runs SLAC HyperNews version 1.11-slac-98, derived from the original HyperNews


[ Geant 4 Home | Geant 4 HyperNews | Search | Request New Forum | Feedback ]