Import Geant4 6.2.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-09 10:56:29 +02:00
parent 1d812b78b1
commit e083ffb441
1415 changed files with 111223 additions and 21207 deletions
@@ -21,13 +21,14 @@
// ********************************************************************
//
//
// $Id: G4ParameterisationBox.cc,v 1.5 2003/11/19 11:51:23 gcosmo Exp $
// GEANT4 tag $Name: geant4-06-00-patch-01 $
// $Id: G4ParameterisationBox.cc,v 1.7 2004/05/17 07:20:40 gcosmo Exp $
// GEANT4 tag $Name: geant4-06-02 $
//
// class G4ParameterisationBox Implementation file
//
// 26.05.03 - P.Arce Initial version
// ********************************************************************
// 26.05.03 - P.Arce, Initial version
// 08.04.04 - I.Hrivnacova, Implemented reflection
// --------------------------------------------------------------------
#include "G4ParameterisationBox.hh"
@@ -36,26 +37,50 @@
#include "G4Transform3D.hh"
#include "G4RotationMatrix.hh"
#include "G4VPhysicalVolume.hh"
#include "G4ReflectedSolid.hh"
#include "G4Box.hh"
//--------------------------------------------------------------------------
G4VParameterisationBox::
G4VParameterisationBox( EAxis axis, G4int nDiv, G4double width,
G4double offset, G4VSolid* msolid,
DivisionType divType )
: G4VDivisionParameterisation( axis, nDiv, width, offset, divType, msolid )
{
G4Box* msol = (G4Box*)(msolid);
if (msolid->GetEntityType() == "G4ReflectedSolid")
{
// Get constituent solid
G4VSolid* mConstituentSolid
= ((G4ReflectedSolid*)msolid)->GetConstituentMovedSolid();
msol = (G4Box*)(mConstituentSolid);
fmotherSolid = msol;
fReflectedSolid = true;
}
}
//--------------------------------------------------------------------------
G4VParameterisationBox::~G4VParameterisationBox()
{
}
//--------------------------------------------------------------------------
G4ParameterisationBoxX::
G4ParameterisationBoxX( EAxis axis, G4int nDiv, G4double width,
G4double offset, G4VSolid* msolid,
DivisionType divType )
: G4VDivisionParameterisation( axis, nDiv, width, offset, divType, msolid )
: G4VParameterisationBox( axis, nDiv, width, offset, msolid, divType )
{
CheckParametersValidity();
SetType( "DivisionBoxX" );
G4Box* mbox = (G4Box*)(fmotherSolid);
if( divType == DivWIDTH )
{
G4Box* mbox = (G4Box*)(msolid);
fnDiv = CalculateNDiv( 2*mbox->GetXHalfLength(), width, offset );
}
else if( divType == DivNDIV )
{
G4Box* mbox = (G4Box*)(msolid);
fwidth = CalculateWidth( 2*mbox->GetXHalfLength(), nDiv, offset );
}
#ifdef G4DIVDEBUG
@@ -149,19 +174,18 @@ G4ParameterisationBoxY::
G4ParameterisationBoxY( EAxis axis, G4int nDiv, G4double width,
G4double offset, G4VSolid* msolid,
DivisionType divType)
: G4VDivisionParameterisation( axis, nDiv, width, offset, divType, msolid )
: G4VParameterisationBox( axis, nDiv, width, offset, msolid, divType )
{
CheckParametersValidity();
SetType( "DivisionBoxY" );
G4Box* mbox = (G4Box*)(fmotherSolid);
if( divType == DivWIDTH )
{
G4Box* mbox = (G4Box*)(msolid);
fnDiv = CalculateNDiv( 2*mbox->GetYHalfLength(), width, offset );
}
else if( divType == DivNDIV )
{
G4Box* mbox = (G4Box*)(msolid);
fwidth = CalculateWidth( 2*mbox->GetYHalfLength(), nDiv, offset );
}
@@ -254,19 +278,18 @@ G4ParameterisationBoxZ::
G4ParameterisationBoxZ( EAxis axis, G4int nDiv, G4double width,
G4double offset, G4VSolid* msolid,
DivisionType divType )
: G4VDivisionParameterisation( axis, nDiv, width, offset, divType, msolid )
: G4VParameterisationBox( axis, nDiv, width, offset, msolid, divType )
{
CheckParametersValidity();
SetType( "DivisionBoxZ" );
G4Box* mbox = (G4Box*)(fmotherSolid);
if( divType == DivWIDTH )
{
G4Box* mbox = (G4Box*)(msolid);
fnDiv = CalculateNDiv( 2*mbox->GetZHalfLength(), width, offset );
}
else if ( divType == DivNDIV )
{
G4Box* mbox = (G4Box*)(msolid);
fwidth = CalculateWidth( 2*mbox->GetZHalfLength(), nDiv, offset );
}
#ifdef G4DIVDEBUG
@@ -301,7 +324,8 @@ ComputeTransformation( const G4int copyNo, G4VPhysicalVolume *physVol ) const
//----- translation
G4ThreeVector origin(0.,0.,0.);
G4double posi = -mdz + foffset + (copyNo+0.5)*fwidth;
G4double posi = -mdz + OffsetZ() + (copyNo+0.5)*fwidth;
if( faxis == kZAxis )
{
origin.setZ( posi );