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

#include <G4ParameterisationCons.hh>

Inheritance diagram for G4ParameterisationConsZ:
Collaboration diagram for G4ParameterisationConsZ:

Public Member Functions

 G4ParameterisationConsZ (EAxis axis, G4int nCopies, G4double offset, G4double step, G4VSolid *motherSolid, DivisionType divType)
 
 ~G4ParameterisationConsZ ()
 
G4double GetMaxParameter () const
 
void ComputeTransformation (const G4int copyNo, G4VPhysicalVolume *physVol) const
 
void ComputeDimensions (G4Cons &tubs, const G4int copyNo, const G4VPhysicalVolume *physVol) const
 
- Public Member Functions inherited from G4VParameterisationCons
 G4VParameterisationCons (EAxis axis, G4int nCopies, G4double offset, G4double step, G4VSolid *msolid, DivisionType divType)
 
virtual ~G4VParameterisationCons ()
 
- Public Member Functions inherited from G4VDivisionParameterisation
 G4VDivisionParameterisation (EAxis axis, G4int nDiv, G4double width, G4double offset, DivisionType divType, G4VSolid *motherSolid=0)
 
virtual ~G4VDivisionParameterisation ()
 
virtual G4VSolidComputeSolid (const G4int, G4VPhysicalVolume *)
 
const G4StringGetType () const
 
EAxis GetAxis () const
 
G4int GetNoDiv () const
 
G4double GetWidth () const
 
G4double GetOffset () const
 
G4VSolidGetMotherSolid () const
 
void SetType (const G4String &type)
 
G4int VolumeFirstCopyNo () const
 
void SetHalfGap (G4double hg)
 
G4double GetHalfGap () const
 
- Public Member Functions inherited from G4VPVParameterisation
 G4VPVParameterisation ()
 
virtual ~G4VPVParameterisation ()
 
virtual G4MaterialComputeMaterial (const G4int repNo, G4VPhysicalVolume *currentVol, const G4VTouchable *parentTouch=0)
 
virtual G4bool IsNested () const
 
virtual G4VVolumeMaterialScannerGetMaterialScanner ()
 

Additional Inherited Members

- Protected Member Functions inherited from G4VDivisionParameterisation
void ChangeRotMatrix (G4VPhysicalVolume *physVol, G4double rotZ=0.) const
 
G4int CalculateNDiv (G4double motherDim, G4double width, G4double offset) const
 
G4double CalculateWidth (G4double motherDim, G4int nDiv, G4double offset) const
 
virtual void CheckParametersValidity ()
 
void CheckOffset (G4double maxPar)
 
void CheckNDivAndWidth (G4double maxPar)
 
G4double OffsetZ () const
 
- Protected Attributes inherited from G4VDivisionParameterisation
G4String ftype
 
EAxis faxis
 
G4int fnDiv
 
G4double fwidth
 
G4double foffset
 
DivisionType fDivisionType
 
G4VSolidfmotherSolid
 
G4bool fReflectedSolid
 
G4bool fDeleteSolid
 
G4int theVoluFirstCopyNo
 
G4double kCarTolerance
 
G4double fhgap
 
- Static Protected Attributes inherited from G4VDivisionParameterisation
static G4ThreadLocal
G4RotationMatrix
fRot = 0
 
static const G4int verbose = 5
 

Detailed Description

Definition at line 165 of file G4ParameterisationCons.hh.

Constructor & Destructor Documentation

G4ParameterisationConsZ::G4ParameterisationConsZ ( EAxis  axis,
G4int  nCopies,
G4double  offset,
G4double  step,
G4VSolid motherSolid,
DivisionType  divType 
)

Definition at line 322 of file G4ParameterisationCons.cc.

325  : G4VParameterisationCons( axis, nDiv, width, offset, msolid, divType )
326 {
328  SetType( "DivisionConsZ" );
329 
330  G4Cons* msol = (G4Cons*)(fmotherSolid);
331  if( divType == DivWIDTH )
332  {
333  fnDiv = CalculateNDiv( 2*msol->GetZHalfLength(), width, offset );
334  }
335  else if( divType == DivNDIV )
336  {
337  fwidth = CalculateWidth( 2*msol->GetZHalfLength(), nDiv, offset );
338  }
339 
340 #ifdef G4DIVDEBUG
341  if( verbose >= 1 )
342  {
343  G4cout << " G4ParameterisationConsZ: # divisions " << fnDiv << " = "
344  << nDiv << G4endl
345  << " Offset " << foffset << " = " << offset << G4endl
346  << " Width " << fwidth << " = " << width << G4endl
347  << " - Axis: " << faxis << G4endl;
348  }
349 #endif
350 }
void SetType(const G4String &type)
#define width
G4double CalculateWidth(G4double motherDim, G4int nDiv, G4double offset) const
G4GLOB_DLL std::ostream G4cout
Definition: G4Cons.hh:83
G4VParameterisationCons(EAxis axis, G4int nCopies, G4double offset, G4double step, G4VSolid *msolid, DivisionType divType)
G4int CalculateNDiv(G4double motherDim, G4double width, G4double offset) const
#define G4endl
Definition: G4ios.hh:61
G4double GetZHalfLength() const

Here is the call graph for this function:

G4ParameterisationConsZ::~G4ParameterisationConsZ ( )

Definition at line 353 of file G4ParameterisationCons.cc.

354 {
355 }

Member Function Documentation

void G4ParameterisationConsZ::ComputeDimensions ( G4Cons tubs,
const G4int  copyNo,
const G4VPhysicalVolume physVol 
) const
virtual

Reimplemented from G4VPVParameterisation.

Definition at line 395 of file G4ParameterisationCons.cc.

397 {
398  G4Cons* msol = (G4Cons*)(fmotherSolid);
399 
400  G4double mHalfLength = msol->GetZHalfLength() - fhgap;
401  G4double aRInner = (msol->GetInnerRadiusPlusZ()
402  - msol->GetInnerRadiusMinusZ()) / (2*mHalfLength);
403  G4double bRInner = (msol->GetInnerRadiusPlusZ()
404  + msol->GetInnerRadiusMinusZ()) / 2;
405  G4double aROuter = (msol->GetOuterRadiusPlusZ()
406  - msol->GetOuterRadiusMinusZ()) / (2*mHalfLength);
407  G4double bROuter = (msol->GetOuterRadiusPlusZ()
408  + msol->GetOuterRadiusMinusZ()) / 2;
409  G4double xMinusZ = -mHalfLength + OffsetZ() + fwidth*copyNo + fhgap;
410  G4double xPlusZ = -mHalfLength + OffsetZ() + fwidth*(copyNo+1) - fhgap;
411  cons.SetInnerRadiusMinusZ( aRInner * xMinusZ + bRInner );
412  cons.SetOuterRadiusMinusZ( aROuter * xMinusZ + bROuter );
413  cons.SetInnerRadiusPlusZ( aRInner * xPlusZ + bRInner );
414  cons.SetOuterRadiusPlusZ( aROuter * xPlusZ + bROuter );
415 
416  G4double pDz = fwidth / 2. - fhgap;
417  G4double pSPhi = msol->GetStartPhiAngle();
418  G4double pDPhi = msol->GetDeltaPhiAngle();
419 
420  cons.SetZHalfLength( pDz );
421  cons.SetStartPhiAngle( pSPhi, false );
422  cons.SetDeltaPhiAngle( pDPhi );
423 
424 #ifdef G4DIVDEBUG
425  if( verbose >= 2 )
426  {
427  G4cout << " G4ParameterisationConsZ::ComputeDimensions()" << G4endl
428  << " pDz: " << pDz << G4endl;
429  if( verbose >= 4 ) cons.DumpInfo();
430  }
431 #endif
432 
433 }
G4double GetOuterRadiusMinusZ() const
G4GLOB_DLL std::ostream G4cout
Definition: G4Cons.hh:83
G4double GetStartPhiAngle() const
G4double GetInnerRadiusPlusZ() const
#define G4endl
Definition: G4ios.hh:61
double G4double
Definition: G4Types.hh:76
G4double GetInnerRadiusMinusZ() const
G4double GetOuterRadiusPlusZ() const
G4double GetZHalfLength() const
G4double GetDeltaPhiAngle() const

Here is the call graph for this function:

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

Implements G4VDivisionParameterisation.

Definition at line 367 of file G4ParameterisationCons.cc.

368 {
369  //----- set translation: along Z axis
370  G4Cons* motherCons = (G4Cons*)(GetMotherSolid());
371  G4double posi = - motherCons->GetZHalfLength() + OffsetZ()
372  + fwidth/2 + copyNo*fwidth;
373  G4ThreeVector origin(0.,0.,posi);
374  physVol->SetTranslation( origin );
375 
376  //----- calculate rotation matrix: unit
377 
378 #ifdef G4DIVDEBUG
379  if( verbose >= 2 )
380  {
381  G4cout << " G4ParameterisationConsZ::ComputeTransformation()" << G4endl
382  << " Origin: " << origin << " - copyNo: " << copyNo << G4endl
383  << " foffset: " << foffset << " - fwidth: " << fwidth
384  << G4endl;
385  }
386 #endif
387 
388  ChangeRotMatrix( physVol );
389 }
G4GLOB_DLL std::ostream G4cout
void ChangeRotMatrix(G4VPhysicalVolume *physVol, G4double rotZ=0.) const
Definition: G4Cons.hh:83
void SetTranslation(const G4ThreeVector &v)
G4VSolid * GetMotherSolid() const
#define G4endl
Definition: G4ios.hh:61
double G4double
Definition: G4Types.hh:76
G4double GetZHalfLength() const

Here is the call graph for this function:

G4double G4ParameterisationConsZ::GetMaxParameter ( ) const
virtual

Implements G4VDivisionParameterisation.

Definition at line 358 of file G4ParameterisationCons.cc.

359 {
360  G4Cons* msol = (G4Cons*)(fmotherSolid);
361  return 2*msol->GetZHalfLength();
362 }
Definition: G4Cons.hh:83
G4double GetZHalfLength() const

Here is the call graph for this function:


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