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

#include <G4ParameterisationPara.hh>

Inheritance diagram for G4ParameterisationParaX:
Collaboration diagram for G4ParameterisationParaX:

Public Member Functions

 G4ParameterisationParaX (EAxis axis, G4int nCopies, G4double offset, G4double step, G4VSolid *msolid, DivisionType divType)
 
 ~G4ParameterisationParaX ()
 
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 76 of file G4ParameterisationPara.hh.

Constructor & Destructor Documentation

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

Definition at line 88 of file G4ParameterisationPara.cc.

91  : G4VParameterisationPara( axis, nDiv, width, offset, msolid, divType )
92 {
94  SetType( "DivisionParaX" );
95 
96  G4Para* mpara = (G4Para*)(fmotherSolid);
97  if( divType == DivWIDTH )
98  {
99  fnDiv = CalculateNDiv( 2*mpara->GetXHalfLength(), width, offset );
100  }
101  else if( divType == DivNDIV )
102  {
103  fwidth = CalculateWidth( 2*mpara->GetXHalfLength(), nDiv, offset );
104  }
105 
106 #ifdef G4DIVDEBUG
107  if( verbose >= 1 )
108  {
109  G4cout << " G4ParameterisationParaX - # divisions " << fnDiv
110  << " = " << nDiv << G4endl
111  << " Offset " << foffset << " = " << offset << G4endl
112  << " Width " << fwidth << " = " << width << G4endl;
113  }
114 #endif
115 }
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
G4double GetXHalfLength() const
G4int CalculateNDiv(G4double motherDim, G4double width, G4double offset) const
#define G4endl
Definition: G4ios.hh:61

Here is the call graph for this function:

G4ParameterisationParaX::~G4ParameterisationParaX ( )

Definition at line 125 of file G4ParameterisationPara.cc.

126 {
127 }

Member Function Documentation

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

Reimplemented from G4VPVParameterisation.

Definition at line 158 of file G4ParameterisationPara.cc.

160 {
161  //---- The division along X of a Para will result a Para
162  G4Para* msol = (G4Para*)(fmotherSolid);
163 
164  //---- Get
165  G4double pDx = fwidth/2. - fhgap;
166  G4double pDy = msol->GetYHalfLength();
167  G4double pDz = msol->GetZHalfLength();
168  G4double pAlpha = std::atan(msol->GetTanAlpha());
169  G4double pTheta = msol->GetSymAxis().theta();
170  G4double pPhi = msol->GetSymAxis().phi();
171 
172  para.SetAllParameters ( pDx, pDy, pDz, pAlpha, pTheta, pPhi );
173 
174 #ifdef G4DIVDEBUG
175  if( verbose >= 1 )
176  {
177  G4cout << " G4ParameterisationParaX::ComputeDimensions()"
178  << " - Mother PARA " << G4endl;
179  msol->DumpInfo();
180  G4cout << " - Parameterised PARA: " << G4endl;
181  para.DumpInfo();
182  }
183 #endif
184 }
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
double theta() const
G4double GetTanAlpha() const
G4double GetZHalfLength() 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 G4ParameterisationParaX::ComputeTransformation ( const G4int  copyNo,
G4VPhysicalVolume physVol 
) const
virtual

Implements G4VDivisionParameterisation.

Definition at line 132 of file G4ParameterisationPara.cc.

133 {
134  G4Para* msol = (G4Para*)(fmotherSolid );
135  G4double mdx = msol->GetXHalfLength( );
136 
137  //----- translation
138  G4ThreeVector origin(0.,0.,0.);
139  G4double posi = -mdx + foffset+(copyNo+0.5)*fwidth;
140  origin.setX( posi );
141 
142 #ifdef G4DIVDEBUG
143  if( verbose >= 2 )
144  {
145  G4cout << std::setprecision(8) << " G4ParameterisationParaX "
146  << copyNo << G4endl
147  << " Position: " << origin << " - Axis: " << faxis << G4endl;
148  }
149 #endif
150 
151  //----- set translation
152  physVol->SetTranslation( origin );
153 }
Definition: G4Para.hh:77
G4GLOB_DLL std::ostream G4cout
void SetTranslation(const G4ThreeVector &v)
G4double GetXHalfLength() const
#define G4endl
Definition: G4ios.hh:61
double G4double
Definition: G4Types.hh:76

Here is the call graph for this function:

G4double G4ParameterisationParaX::GetMaxParameter ( ) const
virtual

Implements G4VDivisionParameterisation.

Definition at line 118 of file G4ParameterisationPara.cc.

119 {
120  G4Para* msol = (G4Para*)(fmotherSolid);
121  return 2*msol->GetXHalfLength();
122 }
Definition: G4Para.hh:77
G4double GetXHalfLength() const

Here is the call graph for this function:


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