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

#include <G4ParameterisationPara.hh>

+ Inheritance 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=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 ()
 
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=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 115 of file G4ParameterisationPara.hh.

Constructor & Destructor Documentation

◆ G4ParameterisationParaY()

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

Definition at line 184 of file G4ParameterisationPara.cc.

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

◆ ~G4ParameterisationParaY()

G4ParameterisationParaY::~G4ParameterisationParaY ( )

Definition at line 215 of file G4ParameterisationPara.cc.

216{
217}

Member Function Documentation

◆ ComputeDimensions()

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

Reimplemented from G4VPVParameterisation.

Definition at line 256 of file G4ParameterisationPara.cc.

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

◆ ComputeTransformation()

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

Implements G4VDivisionParameterisation.

Definition at line 228 of file G4ParameterisationPara.cc.

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

◆ GetMaxParameter()

G4double G4ParameterisationParaY::GetMaxParameter ( ) const
virtual

Implements G4VDivisionParameterisation.

Definition at line 220 of file G4ParameterisationPara.cc.

221{
222 G4Para* msol = (G4Para*)(fmotherSolid);
223 return 2*msol->GetYHalfLength();
224}

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