SLAC PEP-II
BABAR
SLAC<->RAL
Babar logo
HEPIC E,S & H Databases PDG HEP preprints
Organization Detector Computing Physics Documentation
Personnel Glossary Sitemap Search Hypernews
Unwrap page!
Search
Who's who?
Meetings
FAQ
Images
Archive
Operations
Sub-systems
Drift chamber
DCH Simulation
  Help needed
News
  Discussions
  Meetings
  Releases
bbsim code
  DchSimGeom
  DchSimGeom guide
Digitization code
  DchSim
De/dx code
  dE/dx in the simulation
Dch Database
  Conditions db
Geant4 framework codes
  BgsDchSim
  DchBgsModules
Check this page for HTML 4.01 Transitional compliance with the
W3C Validator
(More checks...)

G4Hype CSG Volume

Ernesto Lamanna and Francesco Safai Tehrani
Universita' di Roma "La Sapienza" and INFN

We have decided to switch to the implementation of a CSG-style volume due to the problems we encountered with BREPs, and on recommendation of other people working on Bogus as well on Geant4 (G. Cosmo and B. Lockman).


Technicalia

The CSG implementation is quite different from the viewpoint of OOP since it is more Fortran-like, so it required quite a bit of reprogramming and reimplementation of functions.
As usual, since there exists little or no documentations about Geant4 internals, most things were discovered (and then learned) from direct code inspection of the already existing CSG solids.
The full CSG solid is implemented as a single class inheriting from G4VSOLID, and the implementation requires the following member functions:
  • The constructor
  • The destructor
  • CalculateExtent
  • Inside
  • SurfaceNormal
  • DistanceToIn(point)
  • DistanceToIn(point, direction)
  • DistanceToOut(point)
  • DistanceToOut(point, direction, other params)
  • Various service functions to check and change data member
  • Some protected functions for internal use

User interface

Six parameters are requested from the G4Hype interface:
 
The solid name  G4String
The inner surface radius  G4double
The outer surface radius G4double
The inner surface stereo angle [in radians]  G4double
The outer surface stereo angle [in radians]  G4double
The volume half length along the Z axis  G4double

 
Since an hyperbolical surface with stereo angle equal to zero is a cylindrical surface, the solids which can be represented via the G4Hype class are the following:

  • A tube with inner and outer hyperbolical surface
  • A full tube with external hyperbolical surface (no inner surface)
  • A full tube with external cylindrical surface
  • A tube with inner hyperbolical and outer cylindrical surface
  • A tube with inner cylindrical and outer hyperbolical surface
  • A tube with inner and outer cylindrical surfaces (same as G4Tubs)

  • Current status

    The code is fully implemented, and undergoing extended debugging and optimization, to make this volume implementation as fast and reliable as possible.
    The Geant4 examples, found under the /run/example?? are used as testbed for the implementation as well for performance benchmark.
     


    For questions/comments please contact:  Ernesto Lamanna  or  Francesco Safai Tehrani
    Last modified: Wed Apr 29 15:23:49 METDST