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

#include <G4ParameterisationPara.hh>

+ Inheritance 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=nullptr)
 
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 ()=default
 
virtual ~G4VPVParameterisation ()=default
 
virtual void ComputeTransformation (const G4int, G4VPhysicalVolume *) const =0
 
virtual G4VSolidComputeSolid (const G4int, G4VPhysicalVolume *)
 
virtual G4MaterialComputeMaterial (const G4int repNo, G4VPhysicalVolume *currentVol, const G4VTouchable *parentTouch=nullptr)
 
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 (G4Ellipsoid &, 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.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 = 0
 
G4double fwidth = 0.0
 
G4double foffset = 0.0
 
DivisionType fDivisionType
 
G4VSolidfmotherSolid = nullptr
 
G4bool fReflectedSolid = false
 
G4bool fDeleteSolid = false
 
G4int theVoluFirstCopyNo = 1
 
G4double kCarTolerance
 
G4double fhgap = 0.0
 
- Static Protected Attributes inherited from G4VDivisionParameterisation
static G4ThreadLocal G4RotationMatrixfRot = nullptr
 
static const G4int verbose = 5
 

Detailed Description

Definition at line 69 of file G4ParameterisationPara.hh.

Constructor & Destructor Documentation

◆ G4ParameterisationParaX()

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

Definition at line 84 of file G4ParameterisationPara.cc.

88 : G4VParameterisationPara( axis, nDiv, width, offset, msolid, divType )
89{
91 SetType( "DivisionParaX" );
92
93 G4Para* mpara = (G4Para*)(fmotherSolid);
94 if( divType == DivWIDTH )
95 {
96 fnDiv = CalculateNDiv( 2*mpara->GetXHalfLength(), width, offset );
97 }
98 else if( divType == DivNDIV )
99 {
100 fwidth = CalculateWidth( 2*mpara->GetXHalfLength(), nDiv, offset );
101 }
102
103#ifdef G4DIVDEBUG
104 if( verbose >= 1 )
105 {
106 G4cout << " G4ParameterisationParaX - # divisions " << fnDiv
107 << " = " << nDiv << G4endl
108 << " Offset " << foffset << " = " << offset << G4endl
109 << " Width " << fwidth << " = " << width << G4endl;
110 }
111#endif
112}
#define G4endl
Definition: G4ios.hh:57
G4GLOB_DLL std::ostream G4cout
Definition: G4Para.hh:79
G4double GetXHalfLength() const
void SetType(const G4String &type)
G4double CalculateWidth(G4double motherDim, G4int nDiv, G4double offset) const
G4int CalculateNDiv(G4double motherDim, G4double width, G4double offset) const

◆ ~G4ParameterisationParaX()

G4ParameterisationParaX::~G4ParameterisationParaX ( )

Definition at line 122 of file G4ParameterisationPara.cc.

123{
124}

Member Function Documentation

◆ ComputeDimensions()

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

Reimplemented from G4VPVParameterisation.

Definition at line 154 of file G4ParameterisationPara.cc.

157{
158 //---- The division along X of a Para will result a Para
159 G4Para* msol = (G4Para*)(fmotherSolid);
160
161 //---- Get
162 G4double pDx = fwidth/2. - fhgap;
163 G4double pDy = msol->GetYHalfLength();
164 G4double pDz = msol->GetZHalfLength();
165 G4double pAlpha = std::atan(msol->GetTanAlpha());
166 G4double pTheta = msol->GetSymAxis().theta();
167 G4double pPhi = msol->GetSymAxis().phi();
168
169 para.SetAllParameters ( pDx, pDy, pDz, pAlpha, pTheta, pPhi );
170
171#ifdef G4DIVDEBUG
172 if( verbose >= 1 )
173 {
174 G4cout << " G4ParameterisationParaX::ComputeDimensions()"
175 << " - Mother PARA " << G4endl;
176 msol->DumpInfo();
177 G4cout << " - Parameterised PARA: " << G4endl;
178 para.DumpInfo();
179 }
180#endif
181}
double G4double
Definition: G4Types.hh:83
double phi() const
double theta() const
G4double GetTanAlpha() const
G4ThreeVector GetSymAxis() const
void SetAllParameters(G4double pDx, G4double pDy, G4double pDz, G4double pAlpha, G4double pTheta, G4double pPhi)
Definition: G4Para.cc:185
G4double GetYHalfLength() const
G4double GetZHalfLength() const
void DumpInfo() const

◆ ComputeTransformation()

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

Implements G4VDivisionParameterisation.

Definition at line 128 of file G4ParameterisationPara.cc.

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

◆ GetMaxParameter()

G4double G4ParameterisationParaX::GetMaxParameter ( ) const
virtual

Implements G4VDivisionParameterisation.

Definition at line 115 of file G4ParameterisationPara.cc.

116{
117 G4Para* msol = (G4Para*)(fmotherSolid);
118 return 2*msol->GetXHalfLength();
119}

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