Geant4.10
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions
G4ParameterisationPolyconePhi Class Reference

#include <G4ParameterisationPolycone.hh>

Inheritance diagram for G4ParameterisationPolyconePhi:
G4VParameterisationPolycone G4VDivisionParameterisation G4VPVParameterisation

Public Member Functions

 G4ParameterisationPolyconePhi (EAxis axis, G4int nCopies, G4double offset, G4double step, G4VSolid *motherSolid, DivisionType divType)
 
 ~G4ParameterisationPolyconePhi ()
 
G4double GetMaxParameter () const
 
void ComputeTransformation (const G4int copyNo, G4VPhysicalVolume *physVol) const
 
void ComputeDimensions (G4Polycone &pcone, const G4int copyNo, const G4VPhysicalVolume *physVol) const
 
- Public Member Functions inherited from G4VParameterisationPolycone
 G4VParameterisationPolycone (EAxis axis, G4int nCopies, G4double offset, G4double step, G4VSolid *msolid, DivisionType divType)
 
virtual ~G4VParameterisationPolycone ()
 
- 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 *)
 
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 G4MaterialComputeMaterial (const G4int repNo, G4VPhysicalVolume *currentVol, const G4VTouchable *parentTouch=0)
 
virtual G4bool IsNested () const
 
virtual G4VVolumeMaterialScannerGetMaterialScanner ()
 

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)
 
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 G4ThreadLocal G4int verbose = 5
 

Detailed Description

Definition at line 131 of file G4ParameterisationPolycone.hh.

Constructor & Destructor Documentation

G4ParameterisationPolyconePhi::G4ParameterisationPolyconePhi ( EAxis  axis,
G4int  nCopies,
G4double  offset,
G4double  step,
G4VSolid motherSolid,
DivisionType  divType 
)

Definition at line 238 of file G4ParameterisationPolycone.cc.

References G4VDivisionParameterisation::CalculateNDiv(), G4VDivisionParameterisation::CalculateWidth(), G4VDivisionParameterisation::CheckParametersValidity(), python.hepunit::deg, DivNDIV, DivWIDTH, G4VDivisionParameterisation::fmotherSolid, G4VDivisionParameterisation::fnDiv, G4VDivisionParameterisation::foffset, G4VDivisionParameterisation::fwidth, G4cout, G4endl, G4Polycone::GetEndPhi(), G4Polycone::GetStartPhi(), G4VDivisionParameterisation::SetType(), and G4VDivisionParameterisation::verbose.

241  : G4VParameterisationPolycone( axis, nDiv, width, offset, msolid, divType )
242 {
244  SetType( "DivisionPolyconePhi" );
245 
246  G4Polycone* msol = (G4Polycone*)(fmotherSolid);
247  G4double deltaPhi = msol->GetEndPhi() - msol->GetStartPhi();
248 
249  if( divType == DivWIDTH )
250  {
251  fnDiv = CalculateNDiv( deltaPhi, width, offset );
252  }
253  else if( divType == DivNDIV )
254  {
255  fwidth = CalculateWidth( deltaPhi, nDiv, offset );
256  }
257 
258 #ifdef G4DIVDEBUG
259  if( verbose >= 1 )
260  {
261  G4cout << " G4ParameterisationPolyconePhi - # divisions " << fnDiv
262  << " = " << nDiv << G4endl
263  << " Offset " << foffset/deg << " = " << offset/deg << G4endl
264  << " Width " << fwidth/deg << " = " << width/deg << G4endl;
265  }
266 #endif
267 }
void SetType(const G4String &type)
#define width
G4double CalculateWidth(G4double motherDim, G4int nDiv, G4double offset) const
G4double GetEndPhi() const
G4GLOB_DLL std::ostream G4cout
G4VParameterisationPolycone(EAxis axis, G4int nCopies, G4double offset, G4double step, G4VSolid *msolid, DivisionType divType)
G4double GetStartPhi() const
G4int CalculateNDiv(G4double motherDim, G4double width, G4double offset) const
#define G4endl
Definition: G4ios.hh:61
double G4double
Definition: G4Types.hh:76
G4ParameterisationPolyconePhi::~G4ParameterisationPolyconePhi ( )

Definition at line 270 of file G4ParameterisationPolycone.cc.

271 {
272 }

Member Function Documentation

void G4ParameterisationPolyconePhi::ComputeDimensions ( G4Polycone pcone,
const G4int  copyNo,
const G4VPhysicalVolume physVol 
) const
virtual

Reimplemented from G4VPVParameterisation.

Definition at line 320 of file G4ParameterisationPolycone.cc.

References G4VSolid::DumpInfo(), G4VDivisionParameterisation::fmotherSolid, G4VDivisionParameterisation::fwidth, G4cout, G4endl, G4Polycone::GetOriginalParameters(), G4PolyconeHistorical::Opening_angle, G4Polycone::Reset(), G4Polycone::SetOriginalParameters(), G4PolyconeHistorical::Start_angle, and G4VDivisionParameterisation::verbose.

322 {
323  G4Polycone* msol = (G4Polycone*)(fmotherSolid);
324 
325  G4PolyconeHistorical* origparamMother = msol->GetOriginalParameters();
326  G4PolyconeHistorical origparam( *origparamMother );
327  origparam.Start_angle = origparamMother->Start_angle;
328  origparam.Opening_angle = fwidth;
329 
330  pcone.SetOriginalParameters(&origparam); // copy values & transfer pointers
331  pcone.Reset(); // reset to new solid parameters
332 
333 #ifdef G4DIVDEBUG
334  if( verbose >= 2 )
335  {
336  G4cout << "G4ParameterisationPolyconePhi::ComputeDimensions():" << G4endl;
337  pcone.DumpInfo();
338  }
339 #endif
340 }
void DumpInfo() const
G4GLOB_DLL std::ostream G4cout
void SetOriginalParameters(G4PolyconeHistorical *pars)
G4PolyconeHistorical * GetOriginalParameters() const
G4bool Reset()
Definition: G4Polycone.cc:437
#define G4endl
Definition: G4ios.hh:61
void G4ParameterisationPolyconePhi::ComputeTransformation ( const G4int  copyNo,
G4VPhysicalVolume physVol 
) const
virtual

Implements G4VDivisionParameterisation.

Definition at line 284 of file G4ParameterisationPolycone.cc.

References G4VDivisionParameterisation::ChangeRotMatrix(), python.hepunit::deg, G4VDivisionParameterisation::faxis, G4VDivisionParameterisation::foffset, G4VDivisionParameterisation::fwidth, G4cout, G4endl, G4VPhysicalVolume::SetTranslation(), and G4VDivisionParameterisation::verbose.

285 {
286  //----- translation
287  G4ThreeVector origin(0.,0.,0.);
288  //----- set translation
289  physVol->SetTranslation( origin );
290 
291  //----- calculate rotation matrix (so that all volumes point to the centre)
292  G4double posi = foffset + copyNo*fwidth;
293 
294 #ifdef G4DIVDEBUG
295  if( verbose >= 2 )
296  {
297  G4cout << " G4ParameterisationPolyconePhi - position: " << posi/deg
298  << G4endl
299  << " copyNo: " << copyNo << " - foffset: " << foffset/deg
300  << " - fwidth: " << fwidth/deg << G4endl;
301  }
302 #endif
303 
304  ChangeRotMatrix( physVol, -posi );
305 
306 #ifdef G4DIVDEBUG
307  if( verbose >= 2 )
308  {
309  G4cout << std::setprecision(8) << " G4ParameterisationPolyconePhi "
310  << copyNo << G4endl
311  << " Position: " << origin << " - Width: " << fwidth
312  << " - Axis: " << faxis << G4endl;
313  }
314 #endif
315 }
G4GLOB_DLL std::ostream G4cout
void ChangeRotMatrix(G4VPhysicalVolume *physVol, G4double rotZ=0.) const
void SetTranslation(const G4ThreeVector &v)
#define G4endl
Definition: G4ios.hh:61
double G4double
Definition: G4Types.hh:76
G4double G4ParameterisationPolyconePhi::GetMaxParameter ( ) const
virtual

Implements G4VDivisionParameterisation.

Definition at line 275 of file G4ParameterisationPolycone.cc.

References G4VDivisionParameterisation::fmotherSolid, G4Polycone::GetEndPhi(), and G4Polycone::GetStartPhi().

276 {
277  G4Polycone* msol = (G4Polycone*)(fmotherSolid);
278  return msol->GetEndPhi() - msol->GetStartPhi();
279 }
G4double GetEndPhi() const
G4double GetStartPhi() const

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