Geant4 9.6.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4ParameterisationTubsPhi Class Reference

#include <G4ParameterisationTubs.hh>

+ Inheritance diagram for G4ParameterisationTubsPhi:

Public Member Functions

 G4ParameterisationTubsPhi (EAxis axis, G4int nCopies, G4double offset, G4double step, G4VSolid *motherSolid, DivisionType divType)
 
 ~G4ParameterisationTubsPhi ()
 
G4double GetMaxParameter () const
 
void ComputeTransformation (const G4int copyNo, G4VPhysicalVolume *physVol) const
 
void ComputeDimensions (G4Tubs &tubs, const G4int copyNo, const G4VPhysicalVolume *physVol) const
 
- Public Member Functions inherited from G4VParameterisationTubs
 G4VParameterisationTubs (EAxis axis, G4int nCopies, G4double offset, G4double step, G4VSolid *msolid, DivisionType divType)
 
virtual ~G4VParameterisationTubs ()
 
- 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 *)
 
virtual void ComputeTransformation (const G4int copyNo, G4VPhysicalVolume *physVol) const =0
 
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 void ComputeTransformation (const G4int, G4VPhysicalVolume *) const =0
 
virtual G4VSolidComputeSolid (const G4int, G4VPhysicalVolume *)
 
virtual G4MaterialComputeMaterial (const G4int repNo, G4VPhysicalVolume *currentVol, const G4VTouchable *parentTouch=0)
 
virtual G4bool IsNested () const
 
virtual G4VVolumeMaterialScannerGetMaterialScanner ()
 
virtual void ComputeDimensions (G4Box &, const G4int, const G4VPhysicalVolume *) const
 
virtual void ComputeDimensions (G4Tubs &, const G4int, const G4VPhysicalVolume *) const
 
virtual void ComputeDimensions (G4Trd &, const G4int, const G4VPhysicalVolume *) const
 
virtual void ComputeDimensions (G4Trap &, const G4int, const G4VPhysicalVolume *) const
 
virtual void ComputeDimensions (G4Cons &, const G4int, const G4VPhysicalVolume *) const
 
virtual void ComputeDimensions (G4Sphere &, const G4int, const G4VPhysicalVolume *) const
 
virtual void ComputeDimensions (G4Orb &, const G4int, const G4VPhysicalVolume *) const
 
virtual void ComputeDimensions (G4Torus &, const G4int, const G4VPhysicalVolume *) const
 
virtual void ComputeDimensions (G4Para &, const G4int, const G4VPhysicalVolume *) const
 
virtual void ComputeDimensions (G4Polycone &, const G4int, const G4VPhysicalVolume *) const
 
virtual void ComputeDimensions (G4Polyhedra &, const G4int, const G4VPhysicalVolume *) const
 
virtual void ComputeDimensions (G4Hype &, const G4int, const G4VPhysicalVolume *) const
 

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)
 
virtual G4double GetMaxParameter () const =0
 
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 G4int verbose = 5
 

Detailed Description

Definition at line 117 of file G4ParameterisationTubs.hh.

Constructor & Destructor Documentation

◆ G4ParameterisationTubsPhi()

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

Definition at line 182 of file G4ParameterisationTubs.cc.

186 : G4VParameterisationTubs( axis, nDiv, width, offset, msolid, divType )
187{
189 SetType( "DivisionTubsPhi" );
190
191 G4Tubs* msol = (G4Tubs*)(fmotherSolid);
192 if( divType == DivWIDTH )
193 {
194 fnDiv = CalculateNDiv( msol->GetDeltaPhiAngle(), width, offset );
195 }
196 else if( divType == DivNDIV )
197 {
198 fwidth = CalculateWidth( msol->GetDeltaPhiAngle(), nDiv, offset );
199 }
200
201#ifdef G4DIVDEBUG
202 if( verbose >= 1 )
203 {
204 G4cout << " G4ParameterisationTubsPhi no divisions " << fnDiv << " = "
205 << nDiv << G4endl
206 << " Offset " << foffset << " = " << offset << G4endl
207 << " Width " << fwidth << " = " << width << G4endl;
208 }
209#endif
210}
#define G4endl
Definition: G4ios.hh:52
G4DLLIMPORT std::ostream G4cout
Definition: G4Tubs.hh:77
G4double GetDeltaPhiAngle() const
void SetType(const G4String &type)
G4double CalculateWidth(G4double motherDim, G4int nDiv, G4double offset) const
G4int CalculateNDiv(G4double motherDim, G4double width, G4double offset) const

◆ ~G4ParameterisationTubsPhi()

G4ParameterisationTubsPhi::~G4ParameterisationTubsPhi ( )

Definition at line 213 of file G4ParameterisationTubs.cc.

214{
215}

Member Function Documentation

◆ ComputeDimensions()

void G4ParameterisationTubsPhi::ComputeDimensions ( G4Tubs tubs,
const G4int  copyNo,
const G4VPhysicalVolume physVol 
) const
virtual

Reimplemented from G4VPVParameterisation.

Definition at line 261 of file G4ParameterisationTubs.cc.

264{
265 G4Tubs* msol = (G4Tubs*)(fmotherSolid);
266
267 G4double pRMin = msol->GetInnerRadius();
268 G4double pRMax = msol->GetOuterRadius();
269 G4double pDz = msol->GetZHalfLength();
270 //----- already rotated in 'ComputeTransformation'
271 G4double pSPhi = msol->GetStartPhiAngle() + fhgap;
272 G4double pDPhi = fwidth - 2.*fhgap;
273
274 tubs.SetInnerRadius( pRMin );
275 tubs.SetOuterRadius( pRMax );
276 tubs.SetZHalfLength( pDz );
277 tubs.SetStartPhiAngle( pSPhi, false );
278 tubs.SetDeltaPhiAngle( pDPhi );
279
280#ifdef G4DIVDEBUG
281 if( verbose >= 2 )
282 {
283 G4cout << " G4ParameterisationTubsPhi::ComputeDimensions" << G4endl
284 << " pSPhi: " << pSPhi << " - pDPhi: " << pDPhi << G4endl;
285 tubs.DumpInfo();
286 }
287#endif
288}
double G4double
Definition: G4Types.hh:64
G4double GetZHalfLength() const
void SetDeltaPhiAngle(G4double newDPhi)
void SetStartPhiAngle(G4double newSPhi, G4bool trig=true)
G4double GetInnerRadius() const
G4double GetOuterRadius() const
G4double GetStartPhiAngle() const
void SetInnerRadius(G4double newRMin)
void SetOuterRadius(G4double newRMax)
void SetZHalfLength(G4double newDz)
void DumpInfo() const

◆ ComputeTransformation()

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

Implements G4VDivisionParameterisation.

Definition at line 226 of file G4ParameterisationTubs.cc.

228{
229 //----- translation
230 G4ThreeVector origin(0.,0.,0.);
231 //----- set translation
232 physVol->SetTranslation( origin );
233
234 //----- calculate rotation matrix (so that all volumes point to the centre)
235 G4double posi = foffset + copyNo*fwidth;
236
237#ifdef G4DIVDEBUG
238 if( verbose >= 2 )
239 {
240 G4cout << " G4ParameterisationTubsPhi - position: " << posi/deg << G4endl
241 << " copyNo: " << copyNo << " - foffset: " << foffset/deg
242 << " - fwidth: " << fwidth/deg << G4endl;
243 }
244#endif
245
246 ChangeRotMatrix( physVol, -posi );
247
248#ifdef G4DIVDEBUG
249 if( verbose >= 2 )
250 {
251 G4cout << std::setprecision(8) << " G4ParameterisationTubsPhi " << copyNo
252 << G4endl
253 << " Position: " << origin << " - Width: " << fwidth
254 << " - Axis: " << faxis << G4endl;
255 }
256#endif
257}
void ChangeRotMatrix(G4VPhysicalVolume *physVol, G4double rotZ=0.) const
void SetTranslation(const G4ThreeVector &v)

◆ GetMaxParameter()

G4double G4ParameterisationTubsPhi::GetMaxParameter ( ) const
virtual

Implements G4VDivisionParameterisation.

Definition at line 218 of file G4ParameterisationTubs.cc.

219{
220 G4Tubs* msol = (G4Tubs*)(fmotherSolid);
221 return msol->GetDeltaPhiAngle();
222}

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