Geant4.10
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions
ExN02ChamberParameterisation Class Reference

#include <ExN02ChamberParameterisation.hh>

Inheritance diagram for ExN02ChamberParameterisation:
G4VPVParameterisation

Public Member Functions

 ExN02ChamberParameterisation (G4int NoChambers, G4double startZ, G4double spacing, G4double widthChamber, G4double lengthInitial, G4double lengthFinal)
 
virtual ~ExN02ChamberParameterisation ()
 
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

Definition at line 65 of file ExN02ChamberParameterisation.hh.

Constructor & Destructor Documentation

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

Definition at line 43 of file ExN02ChamberParameterisation.cc.

References FatalException, and G4Exception().

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

Definition at line 70 of file ExN02ChamberParameterisation.cc.

71 {}

Member Function Documentation

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

Reimplemented from G4VPVParameterisation.

Definition at line 87 of file ExN02ChamberParameterisation.cc.

References G4Box::SetXHalfLength(), G4Box::SetYHalfLength(), and G4Box::SetZHalfLength().

88 {
89  G4double halfLength= fHalfLengthFirst + copyNo * fHalfLengthIncr;
90  trackerChamber.SetXHalfLength(halfLength);
91  trackerChamber.SetYHalfLength(halfLength);
92  trackerChamber.SetZHalfLength(fHalfWidth);
93 }
double G4double
Definition: G4Types.hh:76
void ExN02ChamberParameterisation::ComputeTransformation ( const G4int  copyNo,
G4VPhysicalVolume physVol 
) const
virtual

Implements G4VPVParameterisation.

Definition at line 76 of file ExN02ChamberParameterisation.cc.

References G4VPhysicalVolume::SetRotation(), and G4VPhysicalVolume::SetTranslation().

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

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