#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 ¶, const G4int copyNo, const G4VPhysicalVolume *pv) const |
Definition at line 119 of file G4ParameterisationPara.hh.
G4ParameterisationParaY::G4ParameterisationParaY | ( | EAxis | axis, | |
G4int | nCopies, | |||
G4double | offset, | |||
G4double | step, | |||
G4VSolid * | msolid, | |||
DivisionType | divType | |||
) |
Definition at line 188 of file G4ParameterisationPara.cc.
References G4VDivisionParameterisation::CalculateNDiv(), G4VDivisionParameterisation::CalculateWidth(), G4VDivisionParameterisation::CheckParametersValidity(), DivNDIV, DivWIDTH, G4VDivisionParameterisation::fmotherSolid, G4VDivisionParameterisation::fnDiv, G4VDivisionParameterisation::foffset, G4VDivisionParameterisation::fwidth, G4cout, G4endl, G4Para::GetYHalfLength(), G4VDivisionParameterisation::SetType(), and G4VDivisionParameterisation::verbose.
00191 : G4VParameterisationPara( axis, nDiv, width, offset, msolid, divType ) 00192 { 00193 CheckParametersValidity(); 00194 SetType( "DivisionParaY" ); 00195 00196 G4Para* mpara = (G4Para*)(fmotherSolid); 00197 if( divType == DivWIDTH ) 00198 { 00199 fnDiv = CalculateNDiv( 2*mpara->GetYHalfLength(), width, offset ); 00200 } 00201 else if( divType == DivNDIV ) 00202 { 00203 fwidth = CalculateWidth( 2*mpara->GetYHalfLength(), nDiv, offset ); 00204 } 00205 00206 #ifdef G4DIVDEBUG 00207 if( verbose >= 1 ) 00208 { 00209 G4cout << " G4ParameterisationParaY - # divisions " << fnDiv 00210 << " = " << nDiv << G4endl 00211 << " Offset " << foffset << " = " << offset << G4endl 00212 << " Width " << fwidth << " = " << width << G4endl; 00213 } 00214 #endif 00215 }
G4ParameterisationParaY::~G4ParameterisationParaY | ( | ) |
void G4ParameterisationParaY::ComputeDimensions | ( | G4Para & | para, | |
const G4int | copyNo, | |||
const G4VPhysicalVolume * | pv | |||
) | const [virtual] |
Reimplemented from G4VPVParameterisation.
Definition at line 260 of file G4ParameterisationPara.cc.
References G4VSolid::DumpInfo(), G4VDivisionParameterisation::fhgap, G4VDivisionParameterisation::fmotherSolid, G4VDivisionParameterisation::fwidth, G4cout, G4endl, G4Para::GetSymAxis(), G4Para::GetTanAlpha(), G4Para::GetXHalfLength(), G4Para::GetZHalfLength(), G4Para::SetAllParameters(), and G4VDivisionParameterisation::verbose.
00262 { 00263 //---- The division along Y of a Para will result a Para 00264 G4Para* msol = (G4Para*)(fmotherSolid); 00265 00266 //---- Get 00267 G4double pDx = msol->GetXHalfLength(); 00268 G4double pDy = fwidth/2. - fhgap; 00269 G4double pDz = msol->GetZHalfLength(); 00270 G4double pAlpha = std::atan(msol->GetTanAlpha()); 00271 G4double pTheta = msol->GetSymAxis().theta(); 00272 G4double pPhi = msol->GetSymAxis().phi(); 00273 00274 para.SetAllParameters ( pDx, pDy, pDz, pAlpha, pTheta, pPhi ); 00275 00276 #ifdef G4DIVDEBUG 00277 if( verbose >= -1 ) 00278 { 00279 G4cout << " G4ParameterisationParaY::ComputeDimensions()" 00280 << " - Mother PARA " << G4endl; 00281 msol->DumpInfo(); 00282 G4cout << " - Parameterised PARA: " << G4endl; 00283 para.DumpInfo(); 00284 } 00285 #endif 00286 }
void G4ParameterisationParaY::ComputeTransformation | ( | const G4int | copyNo, | |
G4VPhysicalVolume * | physVol | |||
) | const [virtual] |
Implements G4VDivisionParameterisation.
Definition at line 232 of file G4ParameterisationPara.cc.
References G4VDivisionParameterisation::faxis, G4VDivisionParameterisation::fmotherSolid, G4VDivisionParameterisation::foffset, G4VDivisionParameterisation::fwidth, G4cout, G4endl, G4Para::GetTanAlpha(), G4Para::GetYHalfLength(), G4VPhysicalVolume::SetTranslation(), and G4VDivisionParameterisation::verbose.
00233 { 00234 G4Para* msol = (G4Para*)(fmotherSolid ); 00235 G4double mdy = msol->GetYHalfLength( ); 00236 00237 //----- translation 00238 G4ThreeVector origin(0.,0.,0.); 00239 G4double posiY = -mdy + foffset+(copyNo+0.5)*fwidth; 00240 origin.setY( posiY ); 00241 G4double posiX = posiY * msol->GetTanAlpha(); 00242 origin.setX( posiX ); 00243 00244 #ifdef G4DIVDEBUG 00245 if( verbose >= 2 ) 00246 { 00247 G4cout << std::setprecision(8) << " G4ParameterisationParaY " 00248 << copyNo << G4endl 00249 << " Position: " << origin << " - Axis: " << faxis << G4endl; 00250 } 00251 #endif 00252 00253 //----- set translation 00254 physVol->SetTranslation( origin ); 00255 }
G4double G4ParameterisationParaY::GetMaxParameter | ( | ) | const [virtual] |
Implements G4VDivisionParameterisation.
Definition at line 223 of file G4ParameterisationPara.cc.
References G4VDivisionParameterisation::fmotherSolid, and G4Para::GetYHalfLength().
00224 { 00225 G4Para* msol = (G4Para*)(fmotherSolid); 00226 return 2*msol->GetYHalfLength(); 00227 }