Main Page   Class Hierarchy   Compound List   File List   Compound Members   File Members  

Trap Class Reference

Trap is the same as the GEANT volume of the same name, but note that GEANT uses half-lengths as parameters, whereas we use full lengths.
A Trap is defined by the 6 planes which bound it. More...

#include <Trap.h>

Inheritance diagram for Trap:

Hexahedron Volume Shape SurfaceList GeomObject List of all members.

Public Methods

 Trap ( double h, double th, double w1, double bl1, double tl1, double th1, double w2, double bl2, double tl2 )
double height () const
double theta () const
double width1 () const
double lengthLow1 () const
double lengthHigh1 () const
double theta1 () const
double width2 () const
double lengthLow2 () const
double lengthHigh2 () const
virtual const char* nameOf () const
 makes name available to subclasses using the type info facility. More...

virtual void printOn ( std::ostream& os = std::cout ) const
 print info about this object. More...


Detailed Description

Trap is the same as the GEANT volume of the same name, but note that GEANT uses half-lengths as parameters, whereas we use full lengths.
A Trap is defined by the 6 planes which bound it.

It is a generalized trapezoidal volume. The GEANT specification for this shape takes 11 parameters as described below, but, as noted by the authors, only 9 of them are independent. Here, we use only the 9 independent parameters, eliminating the ones indicated below.
The 11 GEANT parameters are

  1. the full length in z
  2. the polar angle of the center of the -z face to the center of the +z face
  3. the azimuthal angle of the center of the -z face to the center of the +z face Since this parameter is not independent of overall rotations, THIS PARAMETER IS not used!
  4. the full length in y of the -z face
  5. the full length in x of the low y edge of the -z face
  6. the full length in x of the high y edge of the -z face
  7. the angle with respect to the y-axis from the center of the low y edge to the center of the high y edge of the -z face
  8. the full length in y of the +z face
  9. the full length in x of the low y edge of the +z face
  10. the full length in x of the high y edge of the +z face
  11. the angle with respect to the y-axis from the center of the low y edge to the center of the high y edge of the +z face Since this parameter must be equal to 7) in order for all faces to form planes, THIS PARAMETER IS not used!

Definition at line 46 of file Trap.h.


Constructor & Destructor Documentation

Trap::Trap ( double h,
double th,
double w1,
double bl1,
double tl1,
double th1,
double w2,
double bl2,
double tl2 )
 

Definition at line 15 of file Trap.cxx.


Member Function Documentation

double Trap::height ( ) const
 

Definition at line 70 of file Trap.cxx.

Referenced by printOn().

double Trap::lengthHigh1 ( ) const
 

Definition at line 74 of file Trap.cxx.

Referenced by printOn().

double Trap::lengthHigh2 ( ) const
 

Definition at line 78 of file Trap.cxx.

Referenced by printOn().

double Trap::lengthLow1 ( ) const
 

Definition at line 73 of file Trap.cxx.

Referenced by printOn().

double Trap::lengthLow2 ( ) const
 

Definition at line 77 of file Trap.cxx.

Referenced by printOn().

const char * Trap::nameOf ( ) const [inline, virtual]
 

makes name available to subclasses using the type info facility.

Reimplemented from GeomObject.

Definition at line 66 of file Trap.h.

void Trap::printOn ( std::ostream & os = std::cout ) const [virtual]
 

print info about this object.

Reimplemented from Volume.

Definition at line 80 of file Trap.cxx.

double Trap::theta ( ) const
 

Definition at line 71 of file Trap.cxx.

Referenced by printOn().

double Trap::theta1 ( ) const
 

Definition at line 75 of file Trap.cxx.

Referenced by printOn().

double Trap::width1 ( ) const
 

Definition at line 72 of file Trap.cxx.

Referenced by printOn().

double Trap::width2 ( ) const
 

Definition at line 76 of file Trap.cxx.

Referenced by printOn().


The documentation for this class was generated from the following files:
Generated at Mon Nov 26 18:18:25 2001 by doxygen1.2.3 written by Dimitri van Heesch, © 1997-2000