Geant4  10.03.p03
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
G02ChamberParameterisation Class Reference

Chamber parametrisation used in the GDML read/write example. More...

#include <G02ChamberParameterisation.hh>

Inheritance diagram for G02ChamberParameterisation:
Collaboration diagram for G02ChamberParameterisation:

Public Member Functions

 G02ChamberParameterisation (G4int NoChambers, G4double startZ, G4double spacing, G4double widthChamber, G4double lengthInitial, G4double lengthFinal)
 
 ~G02ChamberParameterisation ()
 
void ComputeTransformation (const G4int copyNo, G4VPhysicalVolume *physVol) const
 
void ComputeDimensions (G4Box &trackerLayer, const G4int copyNo, const G4VPhysicalVolume *physVol) const
 
- Public Member Functions inherited from G4VPVParameterisation
 G4VPVParameterisation ()
 
virtual ~G4VPVParameterisation ()
 
virtual G4VSolidComputeSolid (const G4int, G4VPhysicalVolume *)
 
virtual G4MaterialComputeMaterial (const G4int repNo, G4VPhysicalVolume *currentVol, const G4VTouchable *parentTouch=0)
 
virtual G4bool IsNested () const
 
virtual G4VVolumeMaterialScannerGetMaterialScanner ()
 

Detailed Description

Chamber parametrisation used in the GDML read/write example.

Definition at line 68 of file G02ChamberParameterisation.hh.

Constructor & Destructor Documentation

G02ChamberParameterisation::G02ChamberParameterisation ( G4int  NoChambers,
G4double  startZ,
G4double  spacing,
G4double  widthChamber,
G4double  lengthInitial,
G4double  lengthFinal 
)

Definition at line 45 of file G02ChamberParameterisation.cc.

52 {
53  fNoChambers = NoChambers;
54  fStartZ = startZ;
55  fHalfWidth = widthChamber*0.5;
56  fSpacing = spacingZ;
57  fHalfLengthFirst = 0.5 * lengthInitial;
58 
59  if( NoChambers > 0 )
60  {
61  fHalfLengthIncr = 0.5 * (lengthFinal-lengthInitial)/NoChambers;
62  if (spacingZ < widthChamber)
63  {
64  G4Exception("ExN02G02ChamberParameterisation::G02ChamberParameterisation()",
65  "InvalidSetup", FatalException,
66  "Invalid construction: Width>Spacing");
67  }
68  }
69 }
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
Definition: G4Exception.cc:41

Here is the call graph for this function:

G02ChamberParameterisation::~G02ChamberParameterisation ( )

Definition at line 73 of file G02ChamberParameterisation.cc.

74 {}

Member Function Documentation

void G02ChamberParameterisation::ComputeDimensions ( G4Box trackerLayer,
const G4int  copyNo,
const G4VPhysicalVolume physVol 
) const
virtual

Reimplemented from G4VPVParameterisation.

Definition at line 90 of file G02ChamberParameterisation.cc.

92 {
93  G4double halfLength = fHalfLengthFirst + copyNo * fHalfLengthIncr;
94  trackerChamber.SetXHalfLength(halfLength);
95  trackerChamber.SetYHalfLength(halfLength);
96  trackerChamber.SetZHalfLength(fHalfWidth);
97 }
double G4double
Definition: G4Types.hh:76

Here is the call graph for this function:

void G02ChamberParameterisation::ComputeTransformation ( const G4int  copyNo,
G4VPhysicalVolume physVol 
) const
virtual

Implements G4VPVParameterisation.

Definition at line 79 of file G02ChamberParameterisation.cc.

80 {
81  G4double Zposition = fStartZ + (copyNo+1) * fSpacing;
82  G4ThreeVector origin(0.,0.,Zposition);
83  physVol->SetTranslation(origin);
84  physVol->SetRotation(0);
85 }
void SetRotation(G4RotationMatrix *)
void SetTranslation(const G4ThreeVector &v)
double G4double
Definition: G4Types.hh:76

Here is the call graph for this function:


The documentation for this class was generated from the following files: