Geant4  10.03.p01
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
G4ParameterisationParaZ Class Reference

#include <G4ParameterisationPara.hh>

Inheritance diagram for G4ParameterisationParaZ:
Collaboration diagram for G4ParameterisationParaZ:

Public Member Functions

 G4ParameterisationParaZ (EAxis axis, G4int nCopies, G4double offset, G4double step, G4VSolid *msolid, DivisionType divType)
 
 ~G4ParameterisationParaZ ()
 
G4double GetMaxParameter () const
 
void ComputeTransformation (const G4int copyNo, G4VPhysicalVolume *physVol) const
 
void ComputeDimensions (G4Para &para, const G4int copyNo, const G4VPhysicalVolume *pv) const
 
- Public Member Functions inherited from G4VParameterisationPara
 G4VParameterisationPara (EAxis axis, G4int nCopies, G4double offset, G4double step, G4VSolid *msolid, DivisionType divType)
 
virtual ~G4VParameterisationPara ()
 
- 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 168 of file G4ParameterisationPara.hh.

Constructor & Destructor Documentation

G4ParameterisationParaZ::G4ParameterisationParaZ ( EAxis  axis,
G4int  nCopies,
G4double  offset,
G4double  step,
G4VSolid msolid,
DivisionType  divType 
)

Definition at line 290 of file G4ParameterisationPara.cc.

293  : G4VParameterisationPara( axis, nDiv, width, offset, msolid, divType )
294 {
296  SetType( "DivisionParaZ" );
297 
298  G4Para* mpara = (G4Para*)(fmotherSolid);
299  if( divType == DivWIDTH )
300  {
301  fnDiv = CalculateNDiv( 2*mpara->GetZHalfLength(), width, offset );
302  }
303  else if( divType == DivNDIV )
304  {
305  fwidth = CalculateWidth( 2*mpara->GetZHalfLength(), nDiv, offset );
306  }
307 
308 #ifdef G4DIVDEBUG
309  if( verbose >= -1 )
310  {
311  G4cout << " G4ParameterisationParaZ - # divisions " << fnDiv
312  << " = " << nDiv << G4endl
313  << " Offset " << foffset << " = " << offset << G4endl
314  << " Width " << fwidth << " = " << width << G4endl;
315  }
316 #endif
317 }
Definition: G4Para.hh:77
void SetType(const G4String &type)
G4VParameterisationPara(EAxis axis, G4int nCopies, G4double offset, G4double step, G4VSolid *msolid, DivisionType divType)
G4double CalculateWidth(G4double motherDim, G4int nDiv, G4double offset) const
G4GLOB_DLL std::ostream G4cout
G4int CalculateNDiv(G4double motherDim, G4double width, G4double offset) const
G4double GetZHalfLength() const
#define G4endl
Definition: G4ios.hh:61

Here is the call graph for this function:

G4ParameterisationParaZ::~G4ParameterisationParaZ ( )

Definition at line 320 of file G4ParameterisationPara.cc.

321 {
322 }

Member Function Documentation

void G4ParameterisationParaZ::ComputeDimensions ( G4Para para,
const G4int  copyNo,
const G4VPhysicalVolume pv 
) const
virtual

Reimplemented from G4VPVParameterisation.

Definition at line 360 of file G4ParameterisationPara.cc.

362 {
363  //---- The division along Z of a Para will result a Para
364  G4Para* msol = (G4Para*)(fmotherSolid);
365 
366  //---- Get
367  G4double pDx = msol->GetXHalfLength();
368  G4double pDy = msol->GetYHalfLength();
369  G4double pDz = fwidth/2. - fhgap;
370  G4double pAlpha = std::atan(msol->GetTanAlpha());
371  G4double pTheta = msol->GetSymAxis().theta();
372  G4double pPhi = msol->GetSymAxis().phi();
373 
374  para.SetAllParameters ( pDx, pDy, pDz, pAlpha, pTheta, pPhi );
375 
376 #ifdef G4DIVDEBUG
377  if( verbose >= -1 )
378  {
379  G4cout << " G4ParameterisationParaZ::ComputeDimensions()"
380  << " - Mother PARA " << G4endl;
381  msol->DumpInfo();
382  G4cout << " - Parameterised PARA: " << G4endl;
383  para.DumpInfo();
384  }
385 #endif
386 }
G4ThreeVector GetSymAxis() const
Definition: G4Para.hh:77
void SetAllParameters(G4double pDx, G4double pDy, G4double pDz, G4double pAlpha, G4double pTheta, G4double pPhi)
Definition: G4Para.cc:74
void DumpInfo() const
G4GLOB_DLL std::ostream G4cout
double phi() const
G4double GetXHalfLength() const
double theta() const
G4double GetTanAlpha() const
#define G4endl
Definition: G4ios.hh:61
double G4double
Definition: G4Types.hh:76
G4double GetYHalfLength() const

Here is the call graph for this function:

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

Implements G4VDivisionParameterisation.

Definition at line 334 of file G4ParameterisationPara.cc.

335 {
336  G4Para* msol = (G4Para*)(fmotherSolid );
337  G4double mdz = msol->GetZHalfLength( );
338 
339  //----- translation
340  G4double posi = -mdz + OffsetZ() + (copyNo+0.5)*fwidth;
341  G4ThreeVector symAxis = msol->GetSymAxis();
342  G4ThreeVector origin( symAxis * posi / symAxis.z() );
343 
344 #ifdef G4DIVDEBUG
345  if( verbose >= 2 )
346  {
347  G4cout << std::setprecision(8) << " G4ParameterisationParaZ "
348  << copyNo << G4endl
349  << " Position: " << origin << " - Axis: " << faxis << G4endl;
350  }
351 #endif
352 
353  //----- set translation
354  physVol->SetTranslation( origin );
355 }
G4ThreeVector GetSymAxis() const
Definition: G4Para.hh:77
double z() const
G4GLOB_DLL std::ostream G4cout
void SetTranslation(const G4ThreeVector &v)
G4double GetZHalfLength() const
#define G4endl
Definition: G4ios.hh:61
double G4double
Definition: G4Types.hh:76

Here is the call graph for this function:

G4double G4ParameterisationParaZ::GetMaxParameter ( ) const
virtual

Implements G4VDivisionParameterisation.

Definition at line 325 of file G4ParameterisationPara.cc.

326 {
327  G4Para* msol = (G4Para*)(fmotherSolid);
328  return 2*msol->GetZHalfLength();
329 }
Definition: G4Para.hh:77
G4double GetZHalfLength() const

Here is the call graph for this function:


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