#include <G4ParameterisationTrd.hh>
|
| G4ParameterisationTrdX (EAxis axis, G4int nCopies, G4double width, G4double offset, G4VSolid *motherSolid, DivisionType divType) |
|
| ~G4ParameterisationTrdX () override |
|
G4double | GetMaxParameter () const override |
|
void | ComputeTransformation (const G4int copyNo, G4VPhysicalVolume *physVol) const override |
|
void | ComputeDimensions (G4Trd &trd, const G4int copyNo, const G4VPhysicalVolume *pv) const override |
|
void | ComputeDimensions (G4Trap &trd, const G4int copyNo, const G4VPhysicalVolume *pv) const override |
|
| G4VParameterisationTrd (EAxis axis, G4int nCopies, G4double offset, G4double step, G4VSolid *msolid, DivisionType divType) |
|
| ~G4VParameterisationTrd () override |
|
| G4VDivisionParameterisation (EAxis axis, G4int nDiv, G4double width, G4double offset, DivisionType divType, G4VSolid *motherSolid=nullptr) |
|
| ~G4VDivisionParameterisation () override |
|
G4VSolid * | ComputeSolid (const G4int, G4VPhysicalVolume *) 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) |
|
G4int | VolumeFirstCopyNo () const |
|
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 () |
|
Definition at line 75 of file G4ParameterisationTrd.hh.
◆ G4ParameterisationTrdX()
Definition at line 76 of file G4ParameterisationTrd.cc.
81{
84
87 {
89 width, offset );
90 }
92 {
94 nDiv, offset );
95 }
96
97#ifdef G4DIVDEBUG
99 {
100 G4cout <<
" G4ParameterisationTrdX - ## divisions " <<
fnDiv <<
" = "
104 }
105#endif
106
107 G4double mpDx1 = msol->GetXHalfLength1();
108 G4double mpDx2 = msol->GetXHalfLength2();
110 {
112 }
113}
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
G4VParameterisationTrd(EAxis axis, G4int nCopies, G4double offset, G4double step, G4VSolid *msolid, DivisionType divType)
◆ ~G4ParameterisationTrdX()
G4ParameterisationTrdX::~G4ParameterisationTrdX |
( |
| ) |
|
|
overridedefault |
◆ ComputeDimensions() [1/2]
Reimplemented from G4VPVParameterisation.
Definition at line 189 of file G4ParameterisationTrd.cc.
191{
193 G4double pDy1 = msol->GetYHalfLength1();
194 G4double pDy2 = msol->GetYHalfLength2();
195 G4double pDz = msol->GetZHalfLength();
196
197 G4double pDx1 = msol->GetXHalfLength1();
198 G4double pDx2 = msol->GetXHalfLength2();
199
200 G4double xChangeRatio = (pDx2-pDx1) / (pDx2+pDx1);
207 G4double cxy1 = -pDx1+fOffset1 + (copyNo+0.5)*fWid1;
208 G4double cxy2 = -pDx2+fOffset2 + (copyNo+0.5)*fWid2;
209 G4double alp = std::atan( (cxy2-cxy1)/(pDz*2.) );
210
211 pDx1 =
fwidth/2. - fWidChange/2.;
212 pDx2 =
fwidth/2. + fWidChange/2.;
213
214
215 trap.SetAllParameters ( pDz,
216 alp,
217 0.,
218 pDy1,
219 pDx1,
220 pDx1,
221 0.,
222 pDy2,
224 pDx2 -
fhgap * pDx2/pDx1,
225 0.);
226
227#ifdef G4DIVDEBUG
229 {
230 G4cout <<
" G4ParameterisationTrdX::ComputeDimensions():"
232 trap.DumpInfo();
233 }
234#endif
235}
◆ ComputeDimensions() [2/2]
Reimplemented from G4VPVParameterisation.
Definition at line 166 of file G4ParameterisationTrd.cc.
168{
170 G4double pDy1 = msol->GetYHalfLength1();
171 G4double pDy2 = msol->GetYHalfLength2();
172 G4double pDz = msol->GetZHalfLength();
174
176
177#ifdef G4DIVDEBUG
179 {
180 G4cout <<
" G4ParameterisationTrdX::ComputeDimensions():"
183 }
184#endif
185}
void SetAllParameters(G4double pdx1, G4double pdx2, G4double pdy1, G4double pdy2, G4double pdz)
◆ ComputeTransformation()
Implements G4VDivisionParameterisation.
Definition at line 128 of file G4ParameterisationTrd.cc.
131{
133 G4double mdx = ( msol->GetXHalfLength1() + msol->GetXHalfLength2() ) / 2.;
134
139 {
140 origin.setX( posi );
141 }
142 else
143 {
144 std::ostringstream message;
145 message <<
"Only axes along X are allowed ! Axis: " <<
faxis;
146 G4Exception(
"G4ParameterisationTrdX::ComputeTransformation()",
148 }
149
150#ifdef G4DIVDEBUG
152 {
153 G4cout << std::setprecision(8)
154 << " G4ParameterisationTrdX::ComputeTransformation() "
156 <<
" Position: " << origin <<
" - Axis: " <<
faxis <<
G4endl;
157 }
158#endif
159
160
162}
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
void SetTranslation(const G4ThreeVector &v)
◆ GetMaxParameter()
G4double G4ParameterisationTrdX::GetMaxParameter |
( |
| ) |
const |
|
overridevirtual |
The documentation for this class was generated from the following files: