Message: Re: Can GEANT4 measure the volume of an object? Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

None Re: Can GEANT4 measure the volume of an object? 

Forum: Geometry
Re: Question Can GEANT4 measure the volume of an object? (Anuj Kapadia)
Date: 23 Jul, 2008
From: michel maire <michel maire>

On Tue, 22 Jul 2008 20:33:08 GMT, ajk17 wrote:
> Hello all. I need some help with volume measurement for a complex object
> in GEANT4. I have created a physical (and corresponding logical) volume
> by adding and subtracting several G4 spheres, cubes, etc. The resulting
> volume is a complex shape which is hard to measure. Is it possible to
> measure the actual volume (in cm3) of the complex object through GEANT4?
> G4 is able to keep track of an object's boundaries and identify the
> region within the world which is occupied by the object. Therefore, from
> this information, it should be able to determine the volume of the
> object and give the value to the user. Is this possible?
> The function GetVolume() has been mentioned in a few Geant4 course PPT
> files online, but I'm not yet clear if this is the way to go. Can
> someone help?

 In class G4LogicalVolume I found a function GetMass(), but not GetVolume()!

    G4double GetMass(G4bool forced=false, G4bool propagate=true,
                     G4Material* parMaterial=0);

      // Returns the mass of the logical volume tree computed from the
      // estimated geometrical volume of each solid and material associated
      // to the logical volume and (by default) to its daughters.
      // NOTE: the computation may require a considerable amount of time,
      //       depending from the complexity of the geometry tree.
      //       The returned value is cached and can be used for successive
      //       calls (default), unless recomputation is forced by providing
      //       'true' for the boolean argument in input. Computation should
      //       be forced if the geometry setup has changed after the previous
      //       call. By setting the 'propagate' boolean flag to 'false' the 
      //       method returns the mass of the present logical volume only 
      //       (subtracted for the volume occupied by the daughter volumes).
      //       An optional argument to specify a material is also provided. 

 Since there is an option to set a material, I guess that, giving a reference
 material (for example water), you can get the volume.

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

1 None: Re: Can GEANT4 measure the volume of an object?   (John Allison - 23 Jul, 2008)
 Add Message Add Message
to: "Re: Can GEANT4 measure the volume of an object?"

 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 ]