
The Hype Volume
A Geant4 volume for the Drift Chamber in BaBar
by Ernesto Lamanna & Francesco Safai Tehrani
Dip.to di Fisica, Univ. di Roma "La Sapienza" & INFN
Why the Hype Volume:
Layers and stereo superlayers of the Drift Chamber must be described through hyperbolic coaxial surfaces, with appropriate thickness and other geometrical parameters.
The Hype solid:
To realize the Hype solid we use a Boundary Representation (BREP) defining the boundary surfaces:
- the plane surface object used for the endcaps already exists and is a G4PlaneSurface object
- the hyperbolic surface is represented via a class called G4FHype inheriting from G4Hype
Two plane surfaces and two hyperbolic surfaces are joined with the correct geometrical parameter to describe the Hype volume:
In this way we create an object called G4BREPSolidThickHype offering the standard BREP solid interface, and using the following parameters:
-
| a name for the volume |
G4String |
| the volume origin |
G4ThreeVector |
| the volume simmetry axis |
G4ThreeVector |
| the volume direction |
G4ThreeVector |
| the volume inner radius |
double |
| the volume outer radius |
double |
| the theta stereo straw angle |
double |
| the half length along the simmetry axis |
double |
while the member functions are:
| Inside |
returns a bool flag true when the point passed as argument is inside the volume
|
| SurfaceNormal |
returns the normal unit vector
|
| DistanceToIn |
distance to enter the surface
* along the surface normal
* along a certain direction
|
| DistanceToOut |
distance to exit the surface
* along the surface normal
* along a certain direction
|
The G4Hype and G4FHype as mathematical objects:
The G4FHype class used as boundary is defined as a derived class from G4Hype, who, in turn, is derived from the generic G4Surface of Geant4.
The G4Hype object represents the surface generated by the rotation of a hyperbola around a simmetry axis whose equation in cartesian coordinates is:
with the special assumptions that a=b (circular section) and in cylindrical coordinates the equation is:
while the G4FHype is simply a G4Hype of finite length.
The G4Hype class inherits from the G4Surface class, adding or overloading the following functions:
| nameOf |
function to return the Surface name |
| printOn |
function to print the current parameter |
| == operator |
equality operator between surfaces |
| howNear |
returns the distance of a point from the surface |
| inside |
decide if the point is inside the surface |
| withinBoundary |
tests if the point belongs to the surface |
| scale |
used for scale invariant tests of the surface |
| rotate |
rotates the surface |
| normal |
calculates the normal versor to the surface |
| set<param> |
functions to set the surface parameters |
| get<param> |
functions to return the surface parameters |
where the surface parameters are:
| Origin |
G4ThreeVector |
the Hype origin |
| Axis |
G4ThreeVector |
the Hype simmetry axis |
| Radius |
double |
the radius of the Hype |
| ThetaStraw |
double |
the q straw stereo angle |
So the function to change the Hype axis is setAxis(G4ThreeVec) and the one to return the Radius is getRadius().
The G4FHype class inherits from the G4Hype class, adding the length parameter and overloading some functions
(the ones with a *):
| nameOf |
* |
function to return the Surface name |
| printOn |
*
|
function to print the current parameter |
| == operator |
*
|
equality operator between surfaces |
| howNear |
*
|
returns the distance of a point from the surface |
| inside |
|
decide if the point is inside the surface |
| withinBoundary |
|
tests if the point belongs to the surface |
| scale |
*
|
used for scale invariant tests of the surface |
| rotate |
|
rotates the surface |
| normal |
|
calculates the normal versor to the surface |
| set<param> |
|
functions to set the surface parameters |
| get<param> |
|
functions to return the surface parameters |
where the surface parameters are:
| Origin |
G4ThreeVector |
the Hype origin |
| Axis |
G4ThreeVector |
the Hype simmetry axis |
| Radius |
double |
the radius of the Hype |
| ThetaStraw |
double |
the q straw stereo angle |
| HalfLenZ |
double |
the half length along the z axis |
Some details about the implementation of two important functions of G4Hype, which are inherited by G4FHype, and used by G4BREPSolidThickHype:
This is the flow diagram for normal:
and this is the one for howNear:
The UML representation of the Hype class hierarchy is:
For more informations and/or comments you can contact: Ernesto Lamanna and Francesco Safai Tehrani
|