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

#include <B2bChamberParameterisation.hh>

Inheritance diagram for B2bChamberParameterisation:
G4VPVParameterisation G4VPVParameterisation

Public Member Functions

 B2bChamberParameterisation (G4int noChambers, G4double startZ, G4double spacing, G4double widthChamber, G4double lengthInitial, G4double lengthFinal)
 
virtual ~B2bChamberParameterisation ()
 
void ComputeTransformation (const G4int copyNo, G4VPhysicalVolume *physVol) const
 
void ComputeDimensions (G4Tubs &trackerLayer, const G4int copyNo, const G4VPhysicalVolume *physVol) const
 
 B2bChamberParameterisation (G4int noChambers, G4double startZ, G4double spacing, G4double widthChamber, G4double lengthInitial, G4double lengthFinal)
 
virtual ~B2bChamberParameterisation ()
 
void ComputeTransformation (const G4int copyNo, G4VPhysicalVolume *physVol) const
 
void ComputeDimensions (G4Tubs &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

A parameterisation that describes a series of boxes along Z.

The boxes have equal width, & their lengths are a linear equation. They are spaced an equal distance apart, starting from given location.

Definition at line 59 of file basic/B2/B2b/include/B2bChamberParameterisation.hh.

Constructor & Destructor Documentation

B2bChamberParameterisation::B2bChamberParameterisation ( G4int  noChambers,
G4double  startZ,
G4double  spacing,
G4double  widthChamber,
G4double  lengthInitial,
G4double  lengthFinal 
)

Definition at line 40 of file basic/B2/B2b/src/B2bChamberParameterisation.cc.

References FatalException, and G4Exception().

48 {
49  fNoChambers = noChambers;
50  fStartZ = startZ;
51  fHalfWidth = 0.5*widthChamber;
52  fSpacing = spacingZ;
53  fRmaxFirst = 0.5 * lengthInitial;
54  if( noChambers > 0 ){
55  fRmaxIncr = 0.5 * (lengthFinal-lengthInitial)/(noChambers-1);
56  if (spacingZ < widthChamber) {
57  G4Exception("B2bChamberParameterisation::B2bChamberParameterisation()",
58  "InvalidSetup", FatalException,
59  "Width>Spacing");
60  }
61  }
62 }
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
Definition: G4Exception.cc:41
B2bChamberParameterisation::~B2bChamberParameterisation ( )
virtual

Definition at line 66 of file basic/B2/B2b/src/B2bChamberParameterisation.cc.

67 { }
B2bChamberParameterisation::B2bChamberParameterisation ( G4int  noChambers,
G4double  startZ,
G4double  spacing,
G4double  widthChamber,
G4double  lengthInitial,
G4double  lengthFinal 
)
virtual B2bChamberParameterisation::~B2bChamberParameterisation ( )
virtual

Member Function Documentation

void B2bChamberParameterisation::ComputeDimensions ( G4Tubs trackerLayer,
const G4int  copyNo,
const G4VPhysicalVolume physVol 
) const
virtual

Reimplemented from G4VPVParameterisation.

Definition at line 84 of file basic/B2/B2b/src/B2bChamberParameterisation.cc.

References python.hepunit::deg, G4Tubs::SetDeltaPhiAngle(), G4Tubs::SetInnerRadius(), G4Tubs::SetOuterRadius(), G4Tubs::SetStartPhiAngle(), and G4Tubs::SetZHalfLength().

85 {
86  // Note: copyNo will start with zero!
87  G4double rmax = fRmaxFirst + copyNo * fRmaxIncr;
88  trackerChamber.SetInnerRadius(0);
89  trackerChamber.SetOuterRadius(rmax);
90  trackerChamber.SetZHalfLength(fHalfWidth);
91  trackerChamber.SetStartPhiAngle(0.*deg);
92  trackerChamber.SetDeltaPhiAngle(360.*deg);
93 }
double G4double
Definition: G4Types.hh:76
void B2bChamberParameterisation::ComputeDimensions ( G4Tubs trackerLayer,
const G4int  copyNo,
const G4VPhysicalVolume physVol 
) const
virtual

Reimplemented from G4VPVParameterisation.

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

Implements G4VPVParameterisation.

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

Implements G4VPVParameterisation.

Definition at line 72 of file basic/B2/B2b/src/B2bChamberParameterisation.cc.

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

73 {
74  // Note: copyNo will start with zero!
75  G4double Zposition = fStartZ + copyNo * fSpacing;
76  G4ThreeVector origin(0,0,Zposition);
77  physVol->SetTranslation(origin);
78  physVol->SetRotation(0);
79 }
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: