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

#include <G4ParameterisationPara.hh>

Inheritance diagram for G4ParameterisationParaY:
Collaboration diagram for G4ParameterisationParaY:

Public Member Functions

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

Constructor & Destructor Documentation

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

Definition at line 188 of file G4ParameterisationPara.cc.

191  : G4VParameterisationPara( axis, nDiv, width, offset, msolid, divType )
192 {
194  SetType( "DivisionParaY" );
195 
196  G4Para* mpara = (G4Para*)(fmotherSolid);
197  if( divType == DivWIDTH )
198  {
199  fnDiv = CalculateNDiv( 2*mpara->GetYHalfLength(), width, offset );
200  }
201  else if( divType == DivNDIV )
202  {
203  fwidth = CalculateWidth( 2*mpara->GetYHalfLength(), nDiv, offset );
204  }
205 
206 #ifdef G4DIVDEBUG
207  if( verbose >= 1 )
208  {
209  G4cout << " G4ParameterisationParaY - # divisions " << fnDiv
210  << " = " << nDiv << G4endl
211  << " Offset " << foffset << " = " << offset << G4endl
212  << " Width " << fwidth << " = " << width << G4endl;
213  }
214 #endif
215 }
Definition: G4Para.hh:77
void SetType(const G4String &type)
G4VParameterisationPara(EAxis axis, G4int nCopies, G4double offset, G4double step, G4VSolid *msolid, DivisionType divType)
#define width
G4double CalculateWidth(G4double motherDim, G4int nDiv, G4double offset) const
G4GLOB_DLL std::ostream G4cout
G4int CalculateNDiv(G4double motherDim, G4double width, G4double offset) const
#define G4endl
Definition: G4ios.hh:61
G4double GetYHalfLength() const

Here is the call graph for this function:

G4ParameterisationParaY::~G4ParameterisationParaY ( )

Definition at line 218 of file G4ParameterisationPara.cc.

219 {
220 }

Member Function Documentation

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

Reimplemented from G4VPVParameterisation.

Definition at line 260 of file G4ParameterisationPara.cc.

262 {
263  //---- The division along Y of a Para will result a Para
264  G4Para* msol = (G4Para*)(fmotherSolid);
265 
266  //---- Get
267  G4double pDx = msol->GetXHalfLength();
268  G4double pDy = fwidth/2. - fhgap;
269  G4double pDz = msol->GetZHalfLength();
270  G4double pAlpha = std::atan(msol->GetTanAlpha());
271  G4double pTheta = msol->GetSymAxis().theta();
272  G4double pPhi = msol->GetSymAxis().phi();
273 
274  para.SetAllParameters ( pDx, pDy, pDz, pAlpha, pTheta, pPhi );
275 
276 #ifdef G4DIVDEBUG
277  if( verbose >= -1 )
278  {
279  G4cout << " G4ParameterisationParaY::ComputeDimensions()"
280  << " - Mother PARA " << G4endl;
281  msol->DumpInfo();
282  G4cout << " - Parameterised PARA: " << G4endl;
283  para.DumpInfo();
284  }
285 #endif
286 }
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
G4double GetZHalfLength() const
#define G4endl
Definition: G4ios.hh:61
double G4double
Definition: G4Types.hh:76

Here is the call graph for this function:

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

Implements G4VDivisionParameterisation.

Definition at line 232 of file G4ParameterisationPara.cc.

233 {
234  G4Para* msol = (G4Para*)(fmotherSolid );
235  G4double mdy = msol->GetYHalfLength( );
236 
237  //----- translation
238  G4ThreeVector origin(0.,0.,0.);
239  G4double posiY = -mdy + foffset+(copyNo+0.5)*fwidth;
240  origin.setY( posiY );
241  G4double posiX = posiY * msol->GetTanAlpha();
242  origin.setX( posiX );
243 
244 #ifdef G4DIVDEBUG
245  if( verbose >= 2 )
246  {
247  G4cout << std::setprecision(8) << " G4ParameterisationParaY "
248  << copyNo << G4endl
249  << " Position: " << origin << " - Axis: " << faxis << G4endl;
250  }
251 #endif
252 
253  //----- set translation
254  physVol->SetTranslation( origin );
255 }
Definition: G4Para.hh:77
G4GLOB_DLL std::ostream G4cout
void SetTranslation(const G4ThreeVector &v)
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:

G4double G4ParameterisationParaY::GetMaxParameter ( ) const
virtual

Implements G4VDivisionParameterisation.

Definition at line 223 of file G4ParameterisationPara.cc.

224 {
225  G4Para* msol = (G4Para*)(fmotherSolid);
226  return 2*msol->GetYHalfLength();
227 }
Definition: G4Para.hh:77
G4double GetYHalfLength() const

Here is the call graph for this function:


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