Geant4 9.6.0
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=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 75 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 87 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}
#define G4endl
Definition: G4ios.hh:52
G4DLLIMPORT std::ostream G4cout
Definition: G4Para.hh:77
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 125 of file G4ParameterisationPara.cc.

126{
127}

Member Function Documentation

◆ ComputeDimensions()

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

Reimplemented from G4VPVParameterisation.

Definition at line 157 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}
double G4double
Definition: G4Types.hh:64
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:73
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 131 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}
void SetTranslation(const G4ThreeVector &v)

◆ GetMaxParameter()

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}

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