Import Geant4 6.2.0 source tree
This commit is contained in:
@@ -21,18 +21,20 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4VDivisionParameterisation.cc,v 1.8 2003/11/19 11:51:23 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-06-00-patch-01 $
|
||||
// $Id: G4VDivisionParameterisation.cc,v 1.10 2004/05/17 07:20:42 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-06-02 $
|
||||
//
|
||||
// class G4VDivisionParameterisation Implementation file
|
||||
//
|
||||
// 26.05.03 - P.Arce Initial version
|
||||
// ********************************************************************
|
||||
// 26.05.03 - P.Arce, Initial version
|
||||
// 08.04.04 - I.Hrivnacova, Implemented reflection
|
||||
// --------------------------------------------------------------------
|
||||
|
||||
#include "G4VDivisionParameterisation.hh"
|
||||
#include "G4VSolid.hh"
|
||||
#include "G4VPhysicalVolume.hh"
|
||||
#include "G4RotationMatrix.hh"
|
||||
#include "G4ReflectedSolid.hh"
|
||||
|
||||
G4int G4VDivisionParameterisation::verbose = 5;
|
||||
|
||||
@@ -41,8 +43,9 @@ G4VDivisionParameterisation::
|
||||
G4VDivisionParameterisation( EAxis axis, G4int nDiv,
|
||||
G4double step, G4double offset,
|
||||
DivisionType divType, G4VSolid* motherSolid )
|
||||
: faxis(axis), fnDiv( nDiv), fwidth(step),
|
||||
foffset(offset), fDivisionType(divType), fmotherSolid( motherSolid )
|
||||
: faxis(axis), fnDiv( nDiv), fwidth(step), foffset(offset),
|
||||
fDivisionType(divType), fmotherSolid( motherSolid ), fReflectedSolid(false),
|
||||
fDeleteSolid(false)
|
||||
{
|
||||
#ifdef G4DIVDEBUG
|
||||
if (verbose >= 1)
|
||||
@@ -60,8 +63,22 @@ G4VDivisionParameterisation( EAxis axis, G4int nDiv,
|
||||
//--------------------------------------------------------------------------
|
||||
G4VDivisionParameterisation::~G4VDivisionParameterisation()
|
||||
{
|
||||
if (fDeleteSolid) delete fmotherSolid;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
G4VSolid*
|
||||
G4VDivisionParameterisation::
|
||||
ComputeSolid( const G4int i, G4VPhysicalVolume* pv )
|
||||
{
|
||||
G4VSolid* solid = G4VPVParameterisation::ComputeSolid(i, pv);
|
||||
if (solid->GetEntityType() == "G4ReflectedSolid")
|
||||
{
|
||||
solid = ((G4ReflectedSolid*)solid)->GetConstituentMovedSolid();
|
||||
}
|
||||
return solid;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
void
|
||||
G4VDivisionParameterisation::
|
||||
@@ -149,3 +166,15 @@ void G4VDivisionParameterisation::CheckNDivAndWidth( G4double maxPar )
|
||||
"Not supported configuration.");
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
G4double G4VDivisionParameterisation::OffsetZ() const
|
||||
{
|
||||
// take into account reflection in the offset
|
||||
G4double offset = foffset;
|
||||
if (fReflectedSolid) offset = GetMaxParameter() - fwidth*fnDiv - foffset;
|
||||
|
||||
return offset;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user