G4ParameterisationConsRho represents the parameterised positioning equivalent to dividing a G4Cons along Rho axis.
More...
#include <G4ParameterisationCons.hh>
|
| | G4ParameterisationConsRho (EAxis axis, G4int nCopies, G4double offset, G4double step, G4VSolid *pSolid, DivisionType divType) |
| | ~G4ParameterisationConsRho () override |
| G4double | GetMaxParameter () const override |
| void | ComputeTransformation (const G4int copyNo, G4VPhysicalVolume *physVol) const override |
| void | ComputeDimensions (G4Cons &tubs, const G4int copyNo, const G4VPhysicalVolume *physVol) const override |
| | G4VParameterisationCons (EAxis axis, G4int nCopies, G4double offset, G4double step, G4VSolid *pSolid, DivisionType divType) |
| | ~G4VParameterisationCons () override |
| | G4VDivisionParameterisation (EAxis axis, G4int nDiv, G4double width, G4double offset, DivisionType divType, G4VSolid *motherSolid=nullptr) |
| | ~G4VDivisionParameterisation () override |
| G4VSolid * | ComputeSolid (const G4int, G4VPhysicalVolume *pv) override |
| const G4String & | GetType () const |
| EAxis | GetAxis () const |
| G4int | GetNoDiv () const |
| G4double | GetWidth () const |
| G4double | GetOffset () const |
| G4VSolid * | GetMotherSolid () const |
| void | SetType (const G4String &type) |
| void | SetHalfGap (G4double hg) |
| G4double | GetHalfGap () const |
| | G4VPVParameterisation ()=default |
| virtual | ~G4VPVParameterisation ()=default |
| virtual G4Material * | ComputeMaterial (const G4int repNo, G4VPhysicalVolume *currentVol, const G4VTouchable *parentTouch=nullptr) |
| virtual G4bool | IsNested () const |
| virtual G4VVolumeMaterialScanner * | GetMaterialScanner () |
G4ParameterisationConsRho represents the parameterised positioning equivalent to dividing a G4Cons along Rho axis.
Definition at line 94 of file G4ParameterisationCons.hh.
◆ G4ParameterisationConsRho()
Initialises a parameterised cons, along the Rho axis.
- Parameters
-
| [in] | axis | The axis along which apply the parameterisation. |
| [in] | nCopies | The total number of divided slices. |
| [in] | offset | Potential initial offset along the axis. |
| [in] | step | The width of the divided slice. |
| [in] | pSolid | Pointer to the original shape to parameterise. |
| [in] | divType | String identifier for the kind of division. |
Definition at line 76 of file G4ParameterisationCons.cc.
81{
84
86 if( msol->GetInnerRadiusPlusZ() == 0. )
87 {
88 std::ostringstream message;
89 message <<
"OuterRadiusMinusZ = 0" <<
G4endl
90 << "Width is calculated as that of OuterRadiusMinusZ !";
91 G4Exception(
"G4ParameterisationConsRho::G4ParameterisationConsRho()",
93 }
94
96 {
98 - msol->GetInnerRadiusMinusZ(), width,
offset );
99 }
101 {
102 auto mconsol = (G4Cons*)(msolid);
104 - mconsol->GetInnerRadiusMinusZ(), nDiv,
offset );
105 }
106
107#ifdef G4DIVDEBUG
109 {
110 G4cout <<
" G4ParameterisationConsRho - no divisions " <<
fnDiv <<
" = "
114 }
115#endif
116}
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
G4ThreadLocal T * G4GeomSplitter< T >::offset
G4GLOB_DLL std::ostream G4cout
virtual void CheckParametersValidity()
void SetType(const G4String &type)
G4double CalculateWidth(G4double motherDim, G4int nDiv, G4double offset) const
G4int CalculateNDiv(G4double motherDim, G4double width, G4double offset) const
static const G4int verbose
G4VParameterisationCons(EAxis axis, G4int nCopies, G4double offset, G4double step, G4VSolid *pSolid, DivisionType divType)
const axis_t axis_to_type< N >::axis
◆ ~G4ParameterisationConsRho()
| G4ParameterisationConsRho::~G4ParameterisationConsRho |
( |
| ) |
|
|
overridedefault |
◆ ComputeDimensions()
Reimplemented from G4VPVParameterisation.
Definition at line 163 of file G4ParameterisationCons.cc.
166{
168
171
172
173
174
175
178 G4double pRMin2 = msol->GetInnerRadiusPlusZ()
179 +
foffset + fwidthPlus * copyNo;
180 G4double pRMax2 = msol->GetInnerRadiusPlusZ()
181 +
foffset + fwidthPlus * (copyNo+1);
182 G4double pDz = msol->GetZHalfLength();
183
185
186 G4double pSPhi = msol->GetStartPhiAngle();
187 G4double pDPhi = msol->GetDeltaPhiAngle();;
188
189 cons.SetInnerRadiusMinusZ( pRMin1 +
fhgap );
190 cons.SetOuterRadiusMinusZ( pRMax1 -
fhgap );
191 cons.SetInnerRadiusPlusZ( pRMin2 + d_half_gap );
192 cons.SetOuterRadiusPlusZ( pRMax2 - d_half_gap );
193 cons.SetZHalfLength( pDz );
194 cons.SetStartPhiAngle( pSPhi, false );
195 cons.SetDeltaPhiAngle( pDPhi );
196
197#ifdef G4DIVDEBUG
199 {
200 G4cout <<
" G4ParameterisationConsRho::ComputeDimensions()" <<
G4endl
201 <<
" pRMin: " << pRMin1 <<
" - pRMax: " << pRMax1 <<
G4endl;
202 if(
verbose >= 4 ) cons.DumpInfo();
203 }
204#endif
205}
◆ ComputeTransformation()
| void G4ParameterisationConsRho::ComputeTransformation |
( |
const G4int | copyNo, |
|
|
G4VPhysicalVolume * | physVol ) const |
|
overridevirtual |
Concrete methods implementing the parameterisation.
Implements G4VDivisionParameterisation.
Definition at line 130 of file G4ParameterisationCons.cc.
132{
133
135
137
138
139
140#ifdef G4DIVDEBUG
142 {
146 }
147#endif
148
150
151#ifdef G4DIVDEBUG
153 {
154 G4cout << std::setprecision(8) <<
" G4ParameterisationConsRho" <<
G4endl
155 <<
" Position: " << origin <<
" - Width: " <<
fwidth
157 }
158#endif
159}
CLHEP::Hep3Vector G4ThreeVector
void ChangeRotMatrix(G4VPhysicalVolume *physVol, G4double rotZ=0.0) const
void SetTranslation(const G4ThreeVector &v)
◆ GetMaxParameter()
| G4double G4ParameterisationConsRho::GetMaxParameter |
( |
| ) |
const |
|
overridevirtual |
Returns the max width along Rho.
- Returns
- The maximum width of the solid to divide along the Rho axis.
Implements G4VDivisionParameterisation.
Definition at line 122 of file G4ParameterisationCons.cc.
123{
125 return msol->GetOuterRadiusMinusZ() - msol->GetInnerRadiusMinusZ();
126}
The documentation for this class was generated from the following files: