Message: Re: GPS confine and GDML Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

None Re: GPS confine and GDML 

Forum: Geometry
Re: Question GPS confine and GDML (bilal)
Re: None Re: GPS confine and GDML (Witek Pokorski)
Re: Idea Re: GPS confine and GDML (Michael H. Kelsey)
Date: 07 Mar, 2013
From: Witek Pokorski <Witek Pokorski>

> names aren't necessarily constant. Specifically, when you export GDML,
> the volume names generated start with the user's assigned names, but
> also have the hexadecimal pointer address appended!

By default yes, but you can switch it off.

> If this user wrote their GPS macros without those (run dependent)
> pointers as part of the name strings, then their macro won't work. IMHO,
> the exported GDML ought to match the original GEANT4.

If it can... but the problem is that in C++ object the names (strings) do not need to be unique. You can have several volumes with the name 'MyVolume' and there is not problem as far as G4 geometry is concerned. This does not work, however, in GDML, because the names MUST be unique. The name is the only way 'objets' are identified within the GDML description.

That's why we came up with that idea of appending the hexadecimal pointer (guaranteed to be unique). Very ugly, I agree, but 100% safe and efficient.

But, yes, it can be switched of during the writing, see the third parameter:

   inline void Write(const G4String& filename,
                     const G4VPhysicalVolume* pvol = 0,
                           G4bool storeReferences = true,
                     const G4String& SchemaLocation = G4GDML_DEFAULT_SCHEMALOCATION);
     //
     // Exports on a GDML file, specified by 'filename' a geometry tree
     // starting from 'pvol' as top volume. Uniqueness of stored entities
     // is guaranteed by storing pointer-references by default.
     // Alternative path for the schema location can be specified; by default
     // the URL to the GDML web site is used.

Cheers, Witek

> 
>   -- Mike
> 

 Add Message Add Message
to: "Re: GPS confine and 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 ]