Import Geant4 11.2.0.beta source tree
This commit is contained in:
@@ -148,7 +148,7 @@ G4PVDivision::G4PVDivision(const G4String& pName,
|
||||
const G4double width,
|
||||
const G4double offset )
|
||||
: G4PVReplica(pName, nDivs, pAxis, pLogical,
|
||||
pMotherPhysical ? pMotherPhysical->GetLogicalVolume() : nullptr)
|
||||
pMotherPhysical != nullptr ? pMotherPhysical->GetLogicalVolume() : nullptr)
|
||||
{
|
||||
if (pMotherPhysical == nullptr)
|
||||
{
|
||||
@@ -231,7 +231,7 @@ G4PVDivision::CheckAndSetParameters( const EAxis pAxis,
|
||||
// in G4VPVParameterisation::ComputeTransformation, for others
|
||||
// it will stay the unity
|
||||
//
|
||||
G4RotationMatrix* pRMat = new G4RotationMatrix();
|
||||
auto pRMat = new G4RotationMatrix();
|
||||
SetRotation(pRMat);
|
||||
|
||||
switch (faxis)
|
||||
@@ -269,9 +269,7 @@ G4PVDivision::CheckAndSetParameters( const EAxis pAxis,
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
G4PVDivision::~G4PVDivision()
|
||||
{
|
||||
}
|
||||
G4PVDivision::~G4PVDivision() = default;
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
EAxis G4PVDivision::GetDivisionAxis() const
|
||||
|
||||
@@ -34,8 +34,7 @@
|
||||
|
||||
//_____________________________________________________________________________
|
||||
|
||||
G4PVDivisionFactory::G4PVDivisionFactory()
|
||||
: G4VPVDivisionFactory()
|
||||
G4PVDivisionFactory::G4PVDivisionFactory()
|
||||
{
|
||||
// Protected singleton constructor.
|
||||
// ---
|
||||
@@ -43,9 +42,7 @@ G4PVDivisionFactory::G4PVDivisionFactory()
|
||||
|
||||
//_____________________________________________________________________________
|
||||
|
||||
G4PVDivisionFactory::~G4PVDivisionFactory()
|
||||
{
|
||||
}
|
||||
G4PVDivisionFactory::~G4PVDivisionFactory() = default;
|
||||
|
||||
//_____________________________________________________________________________
|
||||
|
||||
@@ -123,8 +120,7 @@ G4PVDivisionFactory::CreatePVDivision(const G4String& pName,
|
||||
|
||||
// Get parameterisation data
|
||||
//
|
||||
const G4VDivisionParameterisation* divParam
|
||||
= dynamic_cast<const G4VDivisionParameterisation*>(param);
|
||||
const auto divParam = dynamic_cast<const G4VDivisionParameterisation*>(param);
|
||||
|
||||
if (divParam == nullptr)
|
||||
{
|
||||
@@ -152,6 +148,6 @@ G4bool G4PVDivisionFactory::IsPVDivision(const G4VPhysicalVolume* pv) const
|
||||
// Returns true if pv is division
|
||||
// ---
|
||||
|
||||
return (dynamic_cast<const G4PVDivision*>(pv) != nullptr) ? true : false;
|
||||
return dynamic_cast<const G4PVDivision*>(pv) != nullptr;
|
||||
}
|
||||
|
||||
|
||||
@@ -47,7 +47,7 @@ G4VParameterisationBox( EAxis axis, G4int nDiv, G4double width,
|
||||
DivisionType divType )
|
||||
: G4VDivisionParameterisation( axis, nDiv, width, offset, divType, msolid )
|
||||
{
|
||||
G4Box* msol = (G4Box*)(msolid);
|
||||
auto msol = (G4Box*)(msolid);
|
||||
if (msolid->GetEntityType() == "G4ReflectedSolid")
|
||||
{
|
||||
// Get constituent solid
|
||||
@@ -60,9 +60,7 @@ G4VParameterisationBox( EAxis axis, G4int nDiv, G4double width,
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
G4VParameterisationBox::~G4VParameterisationBox()
|
||||
{
|
||||
}
|
||||
G4VParameterisationBox::~G4VParameterisationBox() = default;
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
G4ParameterisationBoxX::
|
||||
@@ -74,7 +72,7 @@ G4ParameterisationBoxX( EAxis axis, G4int nDiv, G4double width,
|
||||
CheckParametersValidity();
|
||||
SetType( "DivisionBoxX" );
|
||||
|
||||
G4Box* mbox = (G4Box*)(fmotherSolid);
|
||||
auto mbox = (G4Box*)(fmotherSolid);
|
||||
if( divType == DivWIDTH )
|
||||
{
|
||||
fnDiv = CalculateNDiv( 2*mbox->GetXHalfLength(), width, offset );
|
||||
@@ -95,14 +93,12 @@ G4ParameterisationBoxX( EAxis axis, G4int nDiv, G4double width,
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
G4ParameterisationBoxX::~G4ParameterisationBoxX()
|
||||
{
|
||||
}
|
||||
G4ParameterisationBoxX::~G4ParameterisationBoxX() = default;
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
G4double G4ParameterisationBoxX::GetMaxParameter() const
|
||||
{
|
||||
G4Box* msol = (G4Box*)(fmotherSolid);
|
||||
auto msol = (G4Box*)(fmotherSolid);
|
||||
return 2*msol->GetXHalfLength();
|
||||
}
|
||||
|
||||
@@ -111,7 +107,7 @@ void
|
||||
G4ParameterisationBoxX::
|
||||
ComputeTransformation( const G4int copyNo, G4VPhysicalVolume* physVol ) const
|
||||
{
|
||||
G4Box* msol = (G4Box*)(fmotherSolid );
|
||||
auto msol = (G4Box*)(fmotherSolid );
|
||||
G4double mdx = msol->GetXHalfLength( );
|
||||
|
||||
//----- translation
|
||||
@@ -147,7 +143,7 @@ G4ParameterisationBoxX::
|
||||
ComputeDimensions( G4Box& box, const G4int,
|
||||
const G4VPhysicalVolume* ) const
|
||||
{
|
||||
G4Box* msol = (G4Box*)(fmotherSolid);
|
||||
auto msol = (G4Box*)(fmotherSolid);
|
||||
|
||||
G4double pDx = fwidth/2. - fhgap;
|
||||
G4double pDy = msol->GetYHalfLength();
|
||||
@@ -177,7 +173,7 @@ G4ParameterisationBoxY( EAxis axis, G4int nDiv, G4double width,
|
||||
CheckParametersValidity();
|
||||
SetType( "DivisionBoxY" );
|
||||
|
||||
G4Box* mbox = (G4Box*)(fmotherSolid);
|
||||
auto mbox = (G4Box*)(fmotherSolid);
|
||||
if( divType == DivWIDTH )
|
||||
{
|
||||
fnDiv = CalculateNDiv( 2*mbox->GetYHalfLength(), width, offset );
|
||||
@@ -198,14 +194,12 @@ G4ParameterisationBoxY( EAxis axis, G4int nDiv, G4double width,
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
G4ParameterisationBoxY::~G4ParameterisationBoxY()
|
||||
{
|
||||
}
|
||||
G4ParameterisationBoxY::~G4ParameterisationBoxY() = default;
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
G4double G4ParameterisationBoxY::GetMaxParameter() const
|
||||
{
|
||||
G4Box* msol = (G4Box*)(fmotherSolid);
|
||||
auto msol = (G4Box*)(fmotherSolid);
|
||||
return 2*msol->GetYHalfLength();
|
||||
}
|
||||
|
||||
@@ -214,7 +208,7 @@ void
|
||||
G4ParameterisationBoxY::
|
||||
ComputeTransformation( const G4int copyNo, G4VPhysicalVolume* physVol ) const
|
||||
{
|
||||
G4Box* msol = (G4Box*)(fmotherSolid);
|
||||
auto msol = (G4Box*)(fmotherSolid);
|
||||
G4double mdy = msol->GetYHalfLength();
|
||||
|
||||
//----- translation
|
||||
@@ -249,7 +243,7 @@ G4ParameterisationBoxY::
|
||||
ComputeDimensions( G4Box& box, const G4int,
|
||||
const G4VPhysicalVolume* ) const
|
||||
{
|
||||
G4Box* msol = (G4Box*)(fmotherSolid);
|
||||
auto msol = (G4Box*)(fmotherSolid);
|
||||
|
||||
G4double pDx = msol->GetXHalfLength();
|
||||
G4double pDy = fwidth/2. - fhgap;
|
||||
@@ -279,7 +273,7 @@ G4ParameterisationBoxZ( EAxis axis, G4int nDiv, G4double width,
|
||||
CheckParametersValidity();
|
||||
SetType( "DivisionBoxZ" );
|
||||
|
||||
G4Box* mbox = (G4Box*)(fmotherSolid);
|
||||
auto mbox = (G4Box*)(fmotherSolid);
|
||||
if( divType == DivWIDTH )
|
||||
{
|
||||
fnDiv = CalculateNDiv( 2*mbox->GetZHalfLength(), width, offset );
|
||||
@@ -299,14 +293,12 @@ G4ParameterisationBoxZ( EAxis axis, G4int nDiv, G4double width,
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
G4ParameterisationBoxZ::~G4ParameterisationBoxZ()
|
||||
{
|
||||
}
|
||||
G4ParameterisationBoxZ::~G4ParameterisationBoxZ() = default;
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
G4double G4ParameterisationBoxZ::GetMaxParameter() const
|
||||
{
|
||||
G4Box* msol = (G4Box*)(fmotherSolid);
|
||||
auto msol = (G4Box*)(fmotherSolid);
|
||||
return 2*msol->GetZHalfLength();
|
||||
}
|
||||
|
||||
@@ -315,7 +307,7 @@ void
|
||||
G4ParameterisationBoxZ::
|
||||
ComputeTransformation( const G4int copyNo, G4VPhysicalVolume *physVol ) const
|
||||
{
|
||||
G4Box* msol = (G4Box*)(fmotherSolid );
|
||||
auto msol = (G4Box*)(fmotherSolid );
|
||||
G4double mdz = msol->GetZHalfLength();
|
||||
|
||||
//----- translation
|
||||
@@ -351,7 +343,7 @@ G4ParameterisationBoxZ::
|
||||
ComputeDimensions( G4Box& box, const G4int,
|
||||
const G4VPhysicalVolume* ) const
|
||||
{
|
||||
G4Box* msol = (G4Box*)(fmotherSolid);
|
||||
auto msol = (G4Box*)(fmotherSolid);
|
||||
|
||||
G4double pDx = msol->GetXHalfLength();
|
||||
G4double pDy = msol->GetYHalfLength();
|
||||
@@ -370,4 +362,3 @@ ComputeDimensions( G4Box& box, const G4int,
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@@ -47,7 +47,7 @@ G4VParameterisationCons( EAxis axis, G4int nDiv, G4double width,
|
||||
DivisionType divType )
|
||||
: G4VDivisionParameterisation( axis, nDiv, width, offset, divType, msolid )
|
||||
{
|
||||
G4Cons* msol = (G4Cons*)(msolid);
|
||||
auto msol = (G4Cons*)(msolid);
|
||||
if (msolid->GetEntityType() == "G4ReflectedSolid")
|
||||
{
|
||||
// Get constituent solid
|
||||
@@ -56,7 +56,7 @@ G4VParameterisationCons( EAxis axis, G4int nDiv, G4double width,
|
||||
msol = (G4Cons*)(mConstituentSolid);
|
||||
|
||||
// Create a new solid with inversed parameters
|
||||
G4Cons* newSolid
|
||||
auto newSolid
|
||||
= new G4Cons(msol->GetName(),
|
||||
msol->GetInnerRadiusPlusZ(), msol->GetOuterRadiusPlusZ(),
|
||||
msol->GetInnerRadiusMinusZ(), msol->GetOuterRadiusMinusZ(),
|
||||
@@ -70,9 +70,7 @@ G4VParameterisationCons( EAxis axis, G4int nDiv, G4double width,
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
G4VParameterisationCons::~G4VParameterisationCons()
|
||||
{
|
||||
}
|
||||
G4VParameterisationCons::~G4VParameterisationCons() = default;
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
G4ParameterisationConsRho::
|
||||
@@ -84,7 +82,7 @@ G4ParameterisationConsRho( EAxis axis, G4int nDiv,
|
||||
CheckParametersValidity();
|
||||
SetType( "DivisionConsRho" );
|
||||
|
||||
G4Cons* msol = (G4Cons*)(fmotherSolid);
|
||||
auto msol = (G4Cons*)(fmotherSolid);
|
||||
if( msol->GetInnerRadiusPlusZ() == 0. )
|
||||
{
|
||||
std::ostringstream message;
|
||||
@@ -101,7 +99,7 @@ G4ParameterisationConsRho( EAxis axis, G4int nDiv,
|
||||
}
|
||||
else if( divType == DivNDIV )
|
||||
{
|
||||
G4Cons* mconsol = (G4Cons*)(msolid);
|
||||
auto mconsol = (G4Cons*)(msolid);
|
||||
fwidth = CalculateWidth( mconsol->GetOuterRadiusMinusZ()
|
||||
- mconsol->GetInnerRadiusMinusZ(), nDiv, offset );
|
||||
}
|
||||
@@ -118,14 +116,12 @@ G4ParameterisationConsRho( EAxis axis, G4int nDiv,
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
G4ParameterisationConsRho::~G4ParameterisationConsRho()
|
||||
{
|
||||
}
|
||||
G4ParameterisationConsRho::~G4ParameterisationConsRho() = default;
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
G4double G4ParameterisationConsRho::GetMaxParameter() const
|
||||
{
|
||||
G4Cons* msol = (G4Cons*)(fmotherSolid);
|
||||
auto msol = (G4Cons*)(fmotherSolid);
|
||||
return msol->GetOuterRadiusMinusZ() - msol->GetInnerRadiusMinusZ();
|
||||
}
|
||||
|
||||
@@ -168,7 +164,7 @@ G4ParameterisationConsRho::
|
||||
ComputeDimensions( G4Cons& cons, const G4int copyNo,
|
||||
const G4VPhysicalVolume* ) const
|
||||
{
|
||||
G4Cons* msol = (G4Cons*)(fmotherSolid);
|
||||
auto msol = (G4Cons*)(fmotherSolid);
|
||||
|
||||
G4double pRMin1 = msol->GetInnerRadiusMinusZ() + foffset + fwidth*copyNo;
|
||||
G4double pRMax1 = msol->GetInnerRadiusMinusZ() + foffset + fwidth*(copyNo+1);
|
||||
@@ -218,7 +214,7 @@ G4ParameterisationConsPhi( EAxis axis, G4int nDiv,
|
||||
CheckParametersValidity();
|
||||
SetType( "DivisionConsPhi" );
|
||||
|
||||
G4Cons* msol = (G4Cons*)(fmotherSolid);
|
||||
auto msol = (G4Cons*)(fmotherSolid);
|
||||
if( divType == DivWIDTH )
|
||||
{
|
||||
fnDiv = CalculateNDiv( msol->GetDeltaPhiAngle(), width, offset );
|
||||
@@ -240,14 +236,12 @@ G4ParameterisationConsPhi( EAxis axis, G4int nDiv,
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
G4ParameterisationConsPhi::~G4ParameterisationConsPhi()
|
||||
{
|
||||
}
|
||||
G4ParameterisationConsPhi::~G4ParameterisationConsPhi() = default;
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
G4double G4ParameterisationConsPhi::GetMaxParameter() const
|
||||
{
|
||||
G4Cons* msol = (G4Cons*)(fmotherSolid);
|
||||
auto msol = (G4Cons*)(fmotherSolid);
|
||||
return msol->GetDeltaPhiAngle();
|
||||
}
|
||||
|
||||
@@ -284,7 +278,7 @@ G4ParameterisationConsPhi::
|
||||
ComputeDimensions( G4Cons& cons, const G4int,
|
||||
const G4VPhysicalVolume* ) const
|
||||
{
|
||||
G4Cons* msol = (G4Cons*)(fmotherSolid);
|
||||
auto msol = (G4Cons*)(fmotherSolid);
|
||||
|
||||
G4double pRMin1 = msol->GetInnerRadiusMinusZ();
|
||||
G4double pRMax1 = msol->GetOuterRadiusMinusZ();
|
||||
@@ -324,7 +318,7 @@ G4ParameterisationConsZ( EAxis axis, G4int nDiv,
|
||||
CheckParametersValidity();
|
||||
SetType( "DivisionConsZ" );
|
||||
|
||||
G4Cons* msol = (G4Cons*)(fmotherSolid);
|
||||
auto msol = (G4Cons*)(fmotherSolid);
|
||||
if( divType == DivWIDTH )
|
||||
{
|
||||
fnDiv = CalculateNDiv( 2*msol->GetZHalfLength(), width, offset );
|
||||
@@ -347,14 +341,12 @@ G4ParameterisationConsZ( EAxis axis, G4int nDiv,
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
G4ParameterisationConsZ::~G4ParameterisationConsZ()
|
||||
{
|
||||
}
|
||||
G4ParameterisationConsZ::~G4ParameterisationConsZ() = default;
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
G4double G4ParameterisationConsZ::GetMaxParameter() const
|
||||
{
|
||||
G4Cons* msol = (G4Cons*)(fmotherSolid);
|
||||
auto msol = (G4Cons*)(fmotherSolid);
|
||||
return 2*msol->GetZHalfLength();
|
||||
}
|
||||
|
||||
@@ -364,7 +356,7 @@ G4ParameterisationConsZ::
|
||||
ComputeTransformation( const G4int copyNo, G4VPhysicalVolume* physVol ) const
|
||||
{
|
||||
//----- set translation: along Z axis
|
||||
G4Cons* motherCons = (G4Cons*)(GetMotherSolid());
|
||||
auto motherCons = (G4Cons*)(GetMotherSolid());
|
||||
G4double posi = - motherCons->GetZHalfLength() + OffsetZ()
|
||||
+ fwidth/2 + copyNo*fwidth;
|
||||
G4ThreeVector origin(0.,0.,posi);
|
||||
@@ -392,7 +384,7 @@ G4ParameterisationConsZ::
|
||||
ComputeDimensions( G4Cons& cons, const G4int copyNo,
|
||||
const G4VPhysicalVolume* ) const
|
||||
{
|
||||
G4Cons* msol = (G4Cons*)(fmotherSolid);
|
||||
auto msol = (G4Cons*)(fmotherSolid);
|
||||
|
||||
G4double mHalfLength = msol->GetZHalfLength() - fhgap;
|
||||
G4double aRInner = (msol->GetInnerRadiusPlusZ()
|
||||
|
||||
@@ -49,7 +49,7 @@ G4VParameterisationPara( EAxis axis, G4int nDiv, G4double width,
|
||||
DivisionType divType )
|
||||
: G4VDivisionParameterisation( axis, nDiv, width, offset, divType, msolid )
|
||||
{
|
||||
G4Para* msol = (G4Para*)(msolid);
|
||||
auto msol = (G4Para*)(msolid);
|
||||
if (msolid->GetEntityType() == "G4ReflectedSolid")
|
||||
{
|
||||
// Get constituent solid
|
||||
@@ -59,7 +59,7 @@ G4VParameterisationPara( EAxis axis, G4int nDiv, G4double width,
|
||||
fmotherSolid = msol;
|
||||
|
||||
// Create a new solid with inversed parameters
|
||||
G4Para* newSolid
|
||||
auto newSolid
|
||||
= new G4Para(msol->GetName(),
|
||||
msol->GetXHalfLength(),
|
||||
msol->GetYHalfLength(),
|
||||
@@ -76,9 +76,7 @@ G4VParameterisationPara( EAxis axis, G4int nDiv, G4double width,
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
G4VParameterisationPara::~G4VParameterisationPara()
|
||||
{
|
||||
}
|
||||
G4VParameterisationPara::~G4VParameterisationPara() = default;
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
G4ParameterisationParaX::
|
||||
@@ -90,7 +88,7 @@ G4ParameterisationParaX( EAxis axis, G4int nDiv,
|
||||
CheckParametersValidity();
|
||||
SetType( "DivisionParaX" );
|
||||
|
||||
G4Para* mpara = (G4Para*)(fmotherSolid);
|
||||
auto mpara = (G4Para*)(fmotherSolid);
|
||||
if( divType == DivWIDTH )
|
||||
{
|
||||
fnDiv = CalculateNDiv( 2*mpara->GetXHalfLength(), width, offset );
|
||||
@@ -114,21 +112,19 @@ G4ParameterisationParaX( EAxis axis, G4int nDiv,
|
||||
//------------------------------------------------------------------------
|
||||
G4double G4ParameterisationParaX::GetMaxParameter() const
|
||||
{
|
||||
G4Para* msol = (G4Para*)(fmotherSolid);
|
||||
auto msol = (G4Para*)(fmotherSolid);
|
||||
return 2*msol->GetXHalfLength();
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
G4ParameterisationParaX::~G4ParameterisationParaX()
|
||||
{
|
||||
}
|
||||
G4ParameterisationParaX::~G4ParameterisationParaX() = default;
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
void
|
||||
G4ParameterisationParaX::
|
||||
ComputeTransformation( const G4int copyNo, G4VPhysicalVolume *physVol ) const
|
||||
{
|
||||
G4Para* msol = (G4Para*)(fmotherSolid );
|
||||
auto msol = (G4Para*)(fmotherSolid );
|
||||
G4double mdx = msol->GetXHalfLength( );
|
||||
|
||||
//----- translation
|
||||
@@ -156,7 +152,7 @@ ComputeDimensions(G4Para& para, const G4int,
|
||||
const G4VPhysicalVolume*) const
|
||||
{
|
||||
//---- The division along X of a Para will result a Para
|
||||
G4Para* msol = (G4Para*)(fmotherSolid);
|
||||
auto msol = (G4Para*)(fmotherSolid);
|
||||
|
||||
//---- Get
|
||||
G4double pDx = fwidth/2. - fhgap;
|
||||
@@ -190,7 +186,7 @@ G4ParameterisationParaY( EAxis axis, G4int nDiv,
|
||||
CheckParametersValidity();
|
||||
SetType( "DivisionParaY" );
|
||||
|
||||
G4Para* mpara = (G4Para*)(fmotherSolid);
|
||||
auto mpara = (G4Para*)(fmotherSolid);
|
||||
if( divType == DivWIDTH )
|
||||
{
|
||||
fnDiv = CalculateNDiv( 2*mpara->GetYHalfLength(), width, offset );
|
||||
@@ -212,14 +208,12 @@ G4ParameterisationParaY( EAxis axis, G4int nDiv,
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
G4ParameterisationParaY::~G4ParameterisationParaY()
|
||||
{
|
||||
}
|
||||
G4ParameterisationParaY::~G4ParameterisationParaY() = default;
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
G4double G4ParameterisationParaY::GetMaxParameter() const
|
||||
{
|
||||
G4Para* msol = (G4Para*)(fmotherSolid);
|
||||
auto msol = (G4Para*)(fmotherSolid);
|
||||
return 2*msol->GetYHalfLength();
|
||||
}
|
||||
|
||||
@@ -228,7 +222,7 @@ void
|
||||
G4ParameterisationParaY::
|
||||
ComputeTransformation( const G4int copyNo, G4VPhysicalVolume *physVol ) const
|
||||
{
|
||||
G4Para* msol = (G4Para*)(fmotherSolid );
|
||||
auto msol = (G4Para*)(fmotherSolid );
|
||||
G4double mdy = msol->GetYHalfLength( );
|
||||
|
||||
//----- translation
|
||||
@@ -258,7 +252,7 @@ ComputeDimensions(G4Para& para, const G4int,
|
||||
const G4VPhysicalVolume*) const
|
||||
{
|
||||
//---- The division along Y of a Para will result a Para
|
||||
G4Para* msol = (G4Para*)(fmotherSolid);
|
||||
auto msol = (G4Para*)(fmotherSolid);
|
||||
|
||||
//---- Get
|
||||
G4double pDx = msol->GetXHalfLength();
|
||||
@@ -292,7 +286,7 @@ G4ParameterisationParaZ( EAxis axis, G4int nDiv,
|
||||
CheckParametersValidity();
|
||||
SetType( "DivisionParaZ" );
|
||||
|
||||
G4Para* mpara = (G4Para*)(fmotherSolid);
|
||||
auto mpara = (G4Para*)(fmotherSolid);
|
||||
if( divType == DivWIDTH )
|
||||
{
|
||||
fnDiv = CalculateNDiv( 2*mpara->GetZHalfLength(), width, offset );
|
||||
@@ -314,14 +308,12 @@ G4ParameterisationParaZ( EAxis axis, G4int nDiv,
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
G4ParameterisationParaZ::~G4ParameterisationParaZ()
|
||||
{
|
||||
}
|
||||
G4ParameterisationParaZ::~G4ParameterisationParaZ() = default;
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
G4double G4ParameterisationParaZ::GetMaxParameter() const
|
||||
{
|
||||
G4Para* msol = (G4Para*)(fmotherSolid);
|
||||
auto msol = (G4Para*)(fmotherSolid);
|
||||
return 2*msol->GetZHalfLength();
|
||||
}
|
||||
|
||||
@@ -330,7 +322,7 @@ void
|
||||
G4ParameterisationParaZ::
|
||||
ComputeTransformation( const G4int copyNo, G4VPhysicalVolume *physVol ) const
|
||||
{
|
||||
G4Para* msol = (G4Para*)(fmotherSolid );
|
||||
auto msol = (G4Para*)(fmotherSolid );
|
||||
G4double mdz = msol->GetZHalfLength( );
|
||||
|
||||
//----- translation
|
||||
@@ -358,7 +350,7 @@ ComputeDimensions(G4Para& para, const G4int,
|
||||
const G4VPhysicalVolume*) const
|
||||
{
|
||||
//---- The division along Z of a Para will result a Para
|
||||
G4Para* msol = (G4Para*)(fmotherSolid);
|
||||
auto msol = (G4Para*)(fmotherSolid);
|
||||
|
||||
//---- Get
|
||||
G4double pDx = msol->GetXHalfLength();
|
||||
|
||||
@@ -53,7 +53,7 @@ G4VParameterisationPolycone( EAxis axis, G4int nDiv, G4double width,
|
||||
G4Exception("G4VParameterisationPolycone::G4VParameterisationPolycone()",
|
||||
"GeomDiv0001", FatalException, message);
|
||||
#endif */
|
||||
G4Polycone* msol = (G4Polycone*)(msolid);
|
||||
auto msol = (G4Polycone*)(msolid);
|
||||
if (msolid->GetEntityType() == "G4ReflectedSolid")
|
||||
{
|
||||
// Get constituent solid
|
||||
@@ -71,10 +71,10 @@ G4VParameterisationPolycone( EAxis axis, G4int nDiv, G4double width,
|
||||
|
||||
// Invert z values
|
||||
//
|
||||
G4double* zValuesRefl = new G4double[nofZplanes];
|
||||
auto zValuesRefl = new G4double[nofZplanes];
|
||||
for (G4int i=0; i<nofZplanes; ++i) { zValuesRefl[i] = - zValues[i]; }
|
||||
|
||||
G4Polycone* newSolid
|
||||
auto newSolid
|
||||
= new G4Polycone(msol->GetName(),
|
||||
msol->GetStartPhi(),
|
||||
msol->GetEndPhi() - msol->GetStartPhi(),
|
||||
@@ -90,9 +90,7 @@ G4VParameterisationPolycone( EAxis axis, G4int nDiv, G4double width,
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------
|
||||
G4VParameterisationPolycone::~G4VParameterisationPolycone()
|
||||
{
|
||||
}
|
||||
G4VParameterisationPolycone::~G4VParameterisationPolycone() = default;
|
||||
|
||||
//---------------------------------------------------------------------
|
||||
G4ParameterisationPolyconeRho::
|
||||
@@ -104,7 +102,7 @@ G4ParameterisationPolyconeRho( EAxis axis, G4int nDiv,
|
||||
CheckParametersValidity();
|
||||
SetType( "DivisionPolyconeRho" );
|
||||
|
||||
G4Polycone* msol = (G4Polycone*)(fmotherSolid);
|
||||
auto msol = (G4Polycone*)(fmotherSolid);
|
||||
G4PolyconeHistorical* origparamMother = msol->GetOriginalParameters();
|
||||
|
||||
if( divType == DivWIDTH )
|
||||
@@ -130,16 +128,14 @@ G4ParameterisationPolyconeRho( EAxis axis, G4int nDiv,
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------
|
||||
G4ParameterisationPolyconeRho::~G4ParameterisationPolyconeRho()
|
||||
{
|
||||
}
|
||||
G4ParameterisationPolyconeRho::~G4ParameterisationPolyconeRho() = default;
|
||||
|
||||
//---------------------------------------------------------------------
|
||||
void G4ParameterisationPolyconeRho::CheckParametersValidity()
|
||||
{
|
||||
G4VDivisionParameterisation::CheckParametersValidity();
|
||||
|
||||
G4Polycone* msol = (G4Polycone*)(fmotherSolid);
|
||||
auto msol = (G4Polycone*)(fmotherSolid);
|
||||
|
||||
if( fDivisionType == DivNDIVandWIDTH || fDivisionType == DivWIDTH )
|
||||
{
|
||||
@@ -166,7 +162,7 @@ void G4ParameterisationPolyconeRho::CheckParametersValidity()
|
||||
//------------------------------------------------------------------------
|
||||
G4double G4ParameterisationPolyconeRho::GetMaxParameter() const
|
||||
{
|
||||
G4Polycone* msol = (G4Polycone*)(fmotherSolid);
|
||||
auto msol = (G4Polycone*)(fmotherSolid);
|
||||
G4PolyconeHistorical* original_pars = msol->GetOriginalParameters();
|
||||
return original_pars->Rmax[0] - original_pars->Rmin[0];
|
||||
}
|
||||
@@ -213,7 +209,7 @@ G4ParameterisationPolyconeRho::
|
||||
ComputeDimensions( G4Polycone& pcone, const G4int copyNo,
|
||||
const G4VPhysicalVolume* ) const
|
||||
{
|
||||
G4Polycone* msol = (G4Polycone*)(fmotherSolid);
|
||||
auto msol = (G4Polycone*)(fmotherSolid);
|
||||
|
||||
G4PolyconeHistorical* origparamMother = msol->GetOriginalParameters();
|
||||
G4PolyconeHistorical origparam( *origparamMother );
|
||||
@@ -251,7 +247,7 @@ G4ParameterisationPolyconePhi( EAxis axis, G4int nDiv,
|
||||
CheckParametersValidity();
|
||||
SetType( "DivisionPolyconePhi" );
|
||||
|
||||
G4Polycone* msol = (G4Polycone*)(fmotherSolid);
|
||||
auto msol = (G4Polycone*)(fmotherSolid);
|
||||
G4double deltaPhi = msol->GetEndPhi() - msol->GetStartPhi();
|
||||
|
||||
if( divType == DivWIDTH )
|
||||
@@ -275,14 +271,12 @@ G4ParameterisationPolyconePhi( EAxis axis, G4int nDiv,
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------
|
||||
G4ParameterisationPolyconePhi::~G4ParameterisationPolyconePhi()
|
||||
{
|
||||
}
|
||||
G4ParameterisationPolyconePhi::~G4ParameterisationPolyconePhi() = default;
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
G4double G4ParameterisationPolyconePhi::GetMaxParameter() const
|
||||
{
|
||||
G4Polycone* msol = (G4Polycone*)(fmotherSolid);
|
||||
auto msol = (G4Polycone*)(fmotherSolid);
|
||||
return msol->GetEndPhi() - msol->GetStartPhi();
|
||||
}
|
||||
|
||||
@@ -328,7 +322,7 @@ G4ParameterisationPolyconePhi::
|
||||
ComputeDimensions( G4Polycone& pcone, const G4int,
|
||||
const G4VPhysicalVolume* ) const
|
||||
{
|
||||
G4Polycone* msol = (G4Polycone*)(fmotherSolid);
|
||||
auto msol = (G4Polycone*)(fmotherSolid);
|
||||
|
||||
G4PolyconeHistorical* origparamMother = msol->GetOriginalParameters();
|
||||
G4PolyconeHistorical origparam( *origparamMother );
|
||||
@@ -384,9 +378,7 @@ G4ParameterisationPolyconeZ( EAxis axis, G4int nDiv,
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------
|
||||
G4ParameterisationPolyconeZ::~G4ParameterisationPolyconeZ()
|
||||
{
|
||||
}
|
||||
G4ParameterisationPolyconeZ::~G4ParameterisationPolyconeZ() = default;
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
G4double G4ParameterisationPolyconeZ::GetR(G4double z,
|
||||
|
||||
@@ -57,7 +57,7 @@ G4VParameterisationPolyhedra( EAxis axis, G4int nDiv, G4double width,
|
||||
"GeomDiv0001", FatalException, message);
|
||||
#endif */
|
||||
|
||||
G4Polyhedra* msol = (G4Polyhedra*)(msolid);
|
||||
auto msol = (G4Polyhedra*)(msolid);
|
||||
if ((msolid->GetEntityType() != "G4ReflectedSolid") && (msol->IsGeneric()))
|
||||
{
|
||||
message << "Generic construct for G4Polyhedra NOT supported." << G4endl
|
||||
@@ -83,9 +83,9 @@ G4VParameterisationPolyhedra( EAxis axis, G4int nDiv, G4double width,
|
||||
|
||||
// Invert z values, convert radius parameters
|
||||
//
|
||||
G4double* rminValues2 = new G4double[nofZplanes];
|
||||
G4double* rmaxValues2 = new G4double[nofZplanes];
|
||||
G4double* zValuesRefl = new G4double[nofZplanes];
|
||||
auto rminValues2 = new G4double[nofZplanes];
|
||||
auto rmaxValues2 = new G4double[nofZplanes];
|
||||
auto zValuesRefl = new G4double[nofZplanes];
|
||||
for (G4int i=0; i<nofZplanes; ++i)
|
||||
{
|
||||
rminValues2[i] = rminValues[i] * ConvertRadiusFactor(*msol);
|
||||
@@ -93,7 +93,7 @@ G4VParameterisationPolyhedra( EAxis axis, G4int nDiv, G4double width,
|
||||
zValuesRefl[i] = - zValues[i];
|
||||
}
|
||||
|
||||
G4Polyhedra* newSolid
|
||||
auto newSolid
|
||||
= new G4Polyhedra(msol->GetName(),
|
||||
msol->GetStartPhi(),
|
||||
msol->GetEndPhi() - msol->GetStartPhi(),
|
||||
@@ -112,9 +112,7 @@ G4VParameterisationPolyhedra( EAxis axis, G4int nDiv, G4double width,
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
G4VParameterisationPolyhedra::~G4VParameterisationPolyhedra()
|
||||
{
|
||||
}
|
||||
G4VParameterisationPolyhedra::~G4VParameterisationPolyhedra() = default;
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
G4double
|
||||
@@ -142,7 +140,7 @@ G4ParameterisationPolyhedraRho( EAxis axis, G4int nDiv,
|
||||
CheckParametersValidity();
|
||||
SetType( "DivisionPolyhedraRho" );
|
||||
|
||||
G4Polyhedra* msol = (G4Polyhedra*)(fmotherSolid);
|
||||
auto msol = (G4Polyhedra*)(fmotherSolid);
|
||||
G4PolyhedraHistorical* original_pars = msol->GetOriginalParameters();
|
||||
|
||||
if( divType == DivWIDTH )
|
||||
@@ -168,16 +166,14 @@ G4ParameterisationPolyhedraRho( EAxis axis, G4int nDiv,
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
G4ParameterisationPolyhedraRho::~G4ParameterisationPolyhedraRho()
|
||||
{
|
||||
}
|
||||
G4ParameterisationPolyhedraRho::~G4ParameterisationPolyhedraRho() = default;
|
||||
|
||||
//---------------------------------------------------------------------
|
||||
void G4ParameterisationPolyhedraRho::CheckParametersValidity()
|
||||
{
|
||||
G4VDivisionParameterisation::CheckParametersValidity();
|
||||
|
||||
G4Polyhedra* msol = (G4Polyhedra*)(fmotherSolid);
|
||||
auto msol = (G4Polyhedra*)(fmotherSolid);
|
||||
|
||||
if( fDivisionType == DivNDIVandWIDTH || fDivisionType == DivWIDTH )
|
||||
{
|
||||
@@ -204,7 +200,7 @@ void G4ParameterisationPolyhedraRho::CheckParametersValidity()
|
||||
//------------------------------------------------------------------------
|
||||
G4double G4ParameterisationPolyhedraRho::GetMaxParameter() const
|
||||
{
|
||||
G4Polyhedra* msol = (G4Polyhedra*)(fmotherSolid);
|
||||
auto msol = (G4Polyhedra*)(fmotherSolid);
|
||||
G4PolyhedraHistorical* original_pars = msol->GetOriginalParameters();
|
||||
return original_pars->Rmax[0] - original_pars->Rmin[0];
|
||||
}
|
||||
@@ -251,7 +247,7 @@ G4ParameterisationPolyhedraRho::
|
||||
ComputeDimensions( G4Polyhedra& phedra, const G4int copyNo,
|
||||
const G4VPhysicalVolume* ) const
|
||||
{
|
||||
G4Polyhedra* msol = (G4Polyhedra*)(fmotherSolid);
|
||||
auto msol = (G4Polyhedra*)(fmotherSolid);
|
||||
|
||||
G4PolyhedraHistorical* origparamMother = msol->GetOriginalParameters();
|
||||
G4PolyhedraHistorical origparam( *origparamMother );
|
||||
@@ -289,7 +285,7 @@ G4ParameterisationPolyhedraPhi( EAxis axis, G4int nDiv,
|
||||
CheckParametersValidity();
|
||||
SetType( "DivisionPolyhedraPhi" );
|
||||
|
||||
G4Polyhedra* msol = (G4Polyhedra*)(fmotherSolid);
|
||||
auto msol = (G4Polyhedra*)(fmotherSolid);
|
||||
G4double deltaPhi = msol->GetEndPhi() - msol->GetStartPhi();
|
||||
|
||||
if( divType == DivWIDTH )
|
||||
@@ -311,14 +307,12 @@ G4ParameterisationPolyhedraPhi( EAxis axis, G4int nDiv,
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
G4ParameterisationPolyhedraPhi::~G4ParameterisationPolyhedraPhi()
|
||||
{
|
||||
}
|
||||
G4ParameterisationPolyhedraPhi::~G4ParameterisationPolyhedraPhi() = default;
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
G4double G4ParameterisationPolyhedraPhi::GetMaxParameter() const
|
||||
{
|
||||
G4Polyhedra* msol = (G4Polyhedra*)(fmotherSolid);
|
||||
auto msol = (G4Polyhedra*)(fmotherSolid);
|
||||
return msol->GetEndPhi() - msol->GetStartPhi();
|
||||
}
|
||||
|
||||
@@ -327,7 +321,7 @@ void G4ParameterisationPolyhedraPhi::CheckParametersValidity()
|
||||
{
|
||||
G4VDivisionParameterisation::CheckParametersValidity();
|
||||
|
||||
G4Polyhedra* msol = (G4Polyhedra*)(fmotherSolid);
|
||||
auto msol = (G4Polyhedra*)(fmotherSolid);
|
||||
|
||||
if( fDivisionType == DivNDIVandWIDTH || fDivisionType == DivWIDTH )
|
||||
{
|
||||
@@ -407,7 +401,7 @@ G4ParameterisationPolyhedraPhi::
|
||||
ComputeDimensions( G4Polyhedra& phedra, const G4int,
|
||||
const G4VPhysicalVolume* ) const
|
||||
{
|
||||
G4Polyhedra* msol = (G4Polyhedra*)(fmotherSolid);
|
||||
auto msol = (G4Polyhedra*)(fmotherSolid);
|
||||
|
||||
G4PolyhedraHistorical* origparamMother = msol->GetOriginalParameters();
|
||||
G4PolyhedraHistorical origparam( *origparamMother );
|
||||
@@ -464,9 +458,7 @@ G4ParameterisationPolyhedraZ( EAxis axis, G4int nDiv,
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------
|
||||
G4ParameterisationPolyhedraZ::~G4ParameterisationPolyhedraZ()
|
||||
{
|
||||
}
|
||||
G4ParameterisationPolyhedraZ::~G4ParameterisationPolyhedraZ() = default;
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
G4double G4ParameterisationPolyhedraZ::GetR(G4double z,
|
||||
|
||||
@@ -48,7 +48,7 @@ G4VParameterisationTrd( EAxis axis, G4int nDiv, G4double width,
|
||||
DivisionType divType )
|
||||
: G4VDivisionParameterisation( axis, nDiv, width, offset, divType, msolid )
|
||||
{
|
||||
G4Trd* msol = (G4Trd*)(msolid);
|
||||
auto msol = (G4Trd*)(msolid);
|
||||
if (msolid->GetEntityType() == "G4ReflectedSolid")
|
||||
{
|
||||
// Get constituent solid
|
||||
@@ -57,7 +57,7 @@ G4VParameterisationTrd( EAxis axis, G4int nDiv, G4double width,
|
||||
msol = (G4Trd*)(mConstituentSolid);
|
||||
|
||||
// Create a new solid with inversed parameters
|
||||
G4Trd* newSolid
|
||||
auto newSolid
|
||||
= new G4Trd(msol->GetName(),
|
||||
msol->GetXHalfLength2(), msol->GetXHalfLength1(),
|
||||
msol->GetYHalfLength2(), msol->GetYHalfLength1(),
|
||||
@@ -70,9 +70,7 @@ G4VParameterisationTrd( EAxis axis, G4int nDiv, G4double width,
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
G4VParameterisationTrd::~G4VParameterisationTrd()
|
||||
{
|
||||
}
|
||||
G4VParameterisationTrd::~G4VParameterisationTrd() = default;
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
G4ParameterisationTrdX::
|
||||
@@ -84,7 +82,7 @@ G4ParameterisationTrdX( EAxis axis, G4int nDiv,
|
||||
CheckParametersValidity();
|
||||
SetType( "DivisionTrdX" );
|
||||
|
||||
G4Trd* msol = (G4Trd*)(fmotherSolid);
|
||||
auto msol = (G4Trd*)(fmotherSolid);
|
||||
if( divType == DivWIDTH )
|
||||
{
|
||||
fnDiv = CalculateNDiv( msol->GetXHalfLength1()+msol->GetXHalfLength2(),
|
||||
@@ -116,13 +114,12 @@ G4ParameterisationTrdX( EAxis axis, G4int nDiv,
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
G4ParameterisationTrdX::~G4ParameterisationTrdX()
|
||||
{
|
||||
}
|
||||
= default;
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
G4double G4ParameterisationTrdX::GetMaxParameter() const
|
||||
{
|
||||
G4Trd* msol = (G4Trd*)(fmotherSolid);
|
||||
auto msol = (G4Trd*)(fmotherSolid);
|
||||
return (msol->GetXHalfLength1()+msol->GetXHalfLength2());
|
||||
}
|
||||
|
||||
@@ -132,7 +129,7 @@ G4ParameterisationTrdX::
|
||||
ComputeTransformation( const G4int copyNo,
|
||||
G4VPhysicalVolume *physVol ) const
|
||||
{
|
||||
G4Trd* msol = (G4Trd*)(fmotherSolid );
|
||||
auto msol = (G4Trd*)(fmotherSolid );
|
||||
G4double mdx = ( msol->GetXHalfLength1() + msol->GetXHalfLength2() ) / 2.;
|
||||
//----- translation
|
||||
G4ThreeVector origin(0.,0.,0.);
|
||||
@@ -169,7 +166,7 @@ void
|
||||
G4ParameterisationTrdX::
|
||||
ComputeDimensions( G4Trd& trd, [[maybe_unused]] const G4int copyNo, const G4VPhysicalVolume* ) const
|
||||
{
|
||||
G4Trd* msol = (G4Trd*)(fmotherSolid);
|
||||
auto msol = (G4Trd*)(fmotherSolid);
|
||||
G4double pDy1 = msol->GetYHalfLength1();
|
||||
G4double pDy2 = msol->GetYHalfLength2();
|
||||
G4double pDz = msol->GetZHalfLength();
|
||||
@@ -192,7 +189,7 @@ void
|
||||
G4ParameterisationTrdX::ComputeDimensions( G4Trap& trap, const G4int copyNo,
|
||||
const G4VPhysicalVolume* ) const
|
||||
{
|
||||
G4Trd* msol = (G4Trd*)(fmotherSolid);
|
||||
auto msol = (G4Trd*)(fmotherSolid);
|
||||
G4double pDy1 = msol->GetYHalfLength1();
|
||||
G4double pDy2 = msol->GetYHalfLength2();
|
||||
G4double pDz = msol->GetZHalfLength();
|
||||
@@ -248,7 +245,7 @@ G4ParameterisationTrdY( EAxis axis, G4int nDiv,
|
||||
CheckParametersValidity();
|
||||
SetType( "DivisionTrdY" );
|
||||
|
||||
G4Trd* msol = (G4Trd*)(fmotherSolid);
|
||||
auto msol = (G4Trd*)(fmotherSolid);
|
||||
if( divType == DivWIDTH )
|
||||
{
|
||||
fnDiv = CalculateNDiv( 2*msol->GetYHalfLength1(),
|
||||
@@ -272,14 +269,12 @@ G4ParameterisationTrdY( EAxis axis, G4int nDiv,
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
G4ParameterisationTrdY::~G4ParameterisationTrdY()
|
||||
{
|
||||
}
|
||||
G4ParameterisationTrdY::~G4ParameterisationTrdY() = default;
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
G4double G4ParameterisationTrdY::GetMaxParameter() const
|
||||
{
|
||||
G4Trd* msol = (G4Trd*)(fmotherSolid);
|
||||
auto msol = (G4Trd*)(fmotherSolid);
|
||||
return (msol->GetYHalfLength1()+msol->GetYHalfLength2());
|
||||
}
|
||||
|
||||
@@ -288,7 +283,7 @@ void
|
||||
G4ParameterisationTrdY::
|
||||
ComputeTransformation( const G4int copyNo, G4VPhysicalVolume* physVol ) const
|
||||
{
|
||||
G4Trd* msol = (G4Trd*)(fmotherSolid );
|
||||
auto msol = (G4Trd*)(fmotherSolid );
|
||||
G4double mdy = ( msol->GetYHalfLength1() + msol->GetYHalfLength2() ) / 2.;
|
||||
|
||||
//----- translation
|
||||
@@ -327,7 +322,7 @@ ComputeDimensions(G4Trd& trd, const G4int, const G4VPhysicalVolume*) const
|
||||
{
|
||||
//---- The division along Y of a Trd will result a Trd, only
|
||||
//--- if Y at -Z and +Z are equal, else use the G4Trap version
|
||||
G4Trd* msol = (G4Trd*)(fmotherSolid);
|
||||
auto msol = (G4Trd*)(fmotherSolid);
|
||||
|
||||
G4double pDx1 = msol->GetXHalfLength1();
|
||||
G4double pDx2 = msol->GetXHalfLength2();
|
||||
@@ -350,7 +345,7 @@ void
|
||||
G4ParameterisationTrdY::ComputeDimensions( G4Trap& trap, const G4int copyNo,
|
||||
const G4VPhysicalVolume* ) const
|
||||
{
|
||||
G4Trd* msol = (G4Trd*)(fmotherSolid);
|
||||
auto msol = (G4Trd*)(fmotherSolid);
|
||||
G4double pDx1 = msol->GetXHalfLength1();
|
||||
G4double pDx2 = msol->GetXHalfLength2();
|
||||
G4double pDz = msol->GetZHalfLength();
|
||||
@@ -405,7 +400,7 @@ G4ParameterisationTrdZ( EAxis axis, G4int nDiv,
|
||||
CheckParametersValidity();
|
||||
SetType( "DivTrdZ" );
|
||||
|
||||
G4Trd* msol = (G4Trd*)(fmotherSolid);
|
||||
auto msol = (G4Trd*)(fmotherSolid);
|
||||
if( divType == DivWIDTH )
|
||||
{
|
||||
fnDiv = CalculateNDiv( 2*msol->GetZHalfLength(),
|
||||
@@ -429,14 +424,12 @@ G4ParameterisationTrdZ( EAxis axis, G4int nDiv,
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
G4ParameterisationTrdZ::~G4ParameterisationTrdZ()
|
||||
{
|
||||
}
|
||||
G4ParameterisationTrdZ::~G4ParameterisationTrdZ() = default;
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
G4double G4ParameterisationTrdZ::GetMaxParameter() const
|
||||
{
|
||||
G4Trd* msol = (G4Trd*)(fmotherSolid);
|
||||
auto msol = (G4Trd*)(fmotherSolid);
|
||||
return 2*msol->GetZHalfLength();
|
||||
}
|
||||
|
||||
@@ -445,7 +438,7 @@ void
|
||||
G4ParameterisationTrdZ::
|
||||
ComputeTransformation(const G4int copyNo, G4VPhysicalVolume *physVol) const
|
||||
{
|
||||
G4Trd* msol = (G4Trd*)(fmotherSolid );
|
||||
auto msol = (G4Trd*)(fmotherSolid );
|
||||
G4double mdz = msol->GetZHalfLength();
|
||||
|
||||
//----- translation
|
||||
@@ -484,7 +477,7 @@ ComputeDimensions(G4Trd& trd, const G4int copyNo,
|
||||
const G4VPhysicalVolume*) const
|
||||
{
|
||||
//---- The division along Z of a Trd will result a Trd
|
||||
G4Trd* msol = (G4Trd*)(fmotherSolid);
|
||||
auto msol = (G4Trd*)(fmotherSolid);
|
||||
|
||||
G4double pDx1 = msol->GetXHalfLength1();
|
||||
G4double DDx = (msol->GetXHalfLength2() - msol->GetXHalfLength1() );
|
||||
|
||||
@@ -47,7 +47,7 @@ G4VParameterisationTubs( EAxis axis, G4int nDiv, G4double width,
|
||||
DivisionType divType )
|
||||
: G4VDivisionParameterisation( axis, nDiv, width, offset, divType, msolid )
|
||||
{
|
||||
G4Tubs* msol = (G4Tubs*)(msolid);
|
||||
auto msol = (G4Tubs*)(msolid);
|
||||
if (msolid->GetEntityType() == "G4ReflectedSolid")
|
||||
{
|
||||
//----- get constituent solid
|
||||
@@ -60,9 +60,7 @@ G4VParameterisationTubs( EAxis axis, G4int nDiv, G4double width,
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
G4VParameterisationTubs::~G4VParameterisationTubs()
|
||||
{
|
||||
}
|
||||
G4VParameterisationTubs::~G4VParameterisationTubs() = default;
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
G4ParameterisationTubsRho::
|
||||
@@ -74,7 +72,7 @@ G4ParameterisationTubsRho( EAxis axis, G4int nDiv,
|
||||
CheckParametersValidity();
|
||||
SetType( "DivisionTubsRho" );
|
||||
|
||||
G4Tubs* msol = (G4Tubs*)(fmotherSolid);
|
||||
auto msol = (G4Tubs*)(fmotherSolid);
|
||||
if( divType == DivWIDTH )
|
||||
{
|
||||
fnDiv = CalculateNDiv( msol->GetOuterRadius() - msol->GetInnerRadius(),
|
||||
@@ -99,14 +97,12 @@ G4ParameterisationTubsRho( EAxis axis, G4int nDiv,
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
G4ParameterisationTubsRho::~G4ParameterisationTubsRho()
|
||||
{
|
||||
}
|
||||
G4ParameterisationTubsRho::~G4ParameterisationTubsRho() = default;
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
G4double G4ParameterisationTubsRho::GetMaxParameter() const
|
||||
{
|
||||
G4Tubs* msol = (G4Tubs*)(fmotherSolid);
|
||||
auto msol = (G4Tubs*)(fmotherSolid);
|
||||
return msol->GetOuterRadius() - msol->GetInnerRadius();
|
||||
}
|
||||
|
||||
@@ -150,7 +146,7 @@ G4ParameterisationTubsRho::
|
||||
ComputeDimensions( G4Tubs& tubs, const G4int copyNo,
|
||||
const G4VPhysicalVolume* ) const
|
||||
{
|
||||
G4Tubs* msol = (G4Tubs*)(fmotherSolid);
|
||||
auto msol = (G4Tubs*)(fmotherSolid);
|
||||
|
||||
G4double pRMin = msol->GetInnerRadius() + foffset + fwidth*copyNo + fhgap;
|
||||
G4double pRMax = msol->GetInnerRadius() + foffset + fwidth*(copyNo+1) - fhgap;
|
||||
@@ -185,7 +181,7 @@ G4ParameterisationTubsPhi( EAxis axis, G4int nDiv,
|
||||
CheckParametersValidity();
|
||||
SetType( "DivisionTubsPhi" );
|
||||
|
||||
G4Tubs* msol = (G4Tubs*)(fmotherSolid);
|
||||
auto msol = (G4Tubs*)(fmotherSolid);
|
||||
if( divType == DivWIDTH )
|
||||
{
|
||||
fnDiv = CalculateNDiv( msol->GetDeltaPhiAngle(), width, offset );
|
||||
@@ -207,14 +203,12 @@ G4ParameterisationTubsPhi( EAxis axis, G4int nDiv,
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
G4ParameterisationTubsPhi::~G4ParameterisationTubsPhi()
|
||||
{
|
||||
}
|
||||
G4ParameterisationTubsPhi::~G4ParameterisationTubsPhi() = default;
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
G4double G4ParameterisationTubsPhi::GetMaxParameter() const
|
||||
{
|
||||
G4Tubs* msol = (G4Tubs*)(fmotherSolid);
|
||||
auto msol = (G4Tubs*)(fmotherSolid);
|
||||
return msol->GetDeltaPhiAngle();
|
||||
}
|
||||
|
||||
@@ -259,7 +253,7 @@ G4ParameterisationTubsPhi::
|
||||
ComputeDimensions( G4Tubs& tubs, const G4int,
|
||||
const G4VPhysicalVolume* ) const
|
||||
{
|
||||
G4Tubs* msol = (G4Tubs*)(fmotherSolid);
|
||||
auto msol = (G4Tubs*)(fmotherSolid);
|
||||
|
||||
G4double pRMin = msol->GetInnerRadius();
|
||||
G4double pRMax = msol->GetOuterRadius();
|
||||
@@ -294,7 +288,7 @@ G4ParameterisationTubsZ( EAxis axis, G4int nDiv,
|
||||
CheckParametersValidity();
|
||||
SetType( "DivisionTubsZ" );
|
||||
|
||||
G4Tubs* msol = (G4Tubs*)(fmotherSolid);
|
||||
auto msol = (G4Tubs*)(fmotherSolid);
|
||||
if( divType == DivWIDTH )
|
||||
{
|
||||
fnDiv = CalculateNDiv( 2*msol->GetZHalfLength(), width, offset );
|
||||
@@ -316,14 +310,12 @@ G4ParameterisationTubsZ( EAxis axis, G4int nDiv,
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
G4ParameterisationTubsZ::~G4ParameterisationTubsZ()
|
||||
{
|
||||
}
|
||||
G4ParameterisationTubsZ::~G4ParameterisationTubsZ() = default;
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
G4double G4ParameterisationTubsZ::GetMaxParameter() const
|
||||
{
|
||||
G4Tubs* msol = (G4Tubs*)(fmotherSolid);
|
||||
auto msol = (G4Tubs*)(fmotherSolid);
|
||||
return 2*msol->GetZHalfLength();
|
||||
}
|
||||
|
||||
@@ -333,7 +325,7 @@ G4ParameterisationTubsZ::
|
||||
ComputeTransformation(const G4int copyNo, G4VPhysicalVolume *physVol) const
|
||||
{
|
||||
//----- set translation: along Z axis
|
||||
G4Tubs* motherTubs = (G4Tubs*)(fmotherSolid);
|
||||
auto motherTubs = (G4Tubs*)(fmotherSolid);
|
||||
G4double posi = - motherTubs->GetZHalfLength() + OffsetZ()
|
||||
+ fwidth/2 + copyNo*fwidth;
|
||||
G4ThreeVector origin(0.,0.,posi);
|
||||
@@ -370,7 +362,7 @@ G4ParameterisationTubsZ::
|
||||
ComputeDimensions( G4Tubs& tubs, const G4int,
|
||||
const G4VPhysicalVolume* ) const
|
||||
{
|
||||
G4Tubs* msol = (G4Tubs*)(fmotherSolid);
|
||||
auto msol = (G4Tubs*)(fmotherSolid);
|
||||
|
||||
G4double pRMin = msol->GetInnerRadius();
|
||||
G4double pRMax = msol->GetOuterRadius();
|
||||
|
||||
@@ -93,7 +93,7 @@ G4ReplicatedSlice::G4ReplicatedSlice(const G4String& pName,
|
||||
const G4double half_gap,
|
||||
const G4double offset )
|
||||
: G4PVReplica(pName, nDivs, pAxis, pLogical,
|
||||
pMotherPhysical ? pMotherPhysical->GetLogicalVolume() : nullptr)
|
||||
pMotherPhysical != nullptr ? pMotherPhysical->GetLogicalVolume() : nullptr)
|
||||
{
|
||||
if (pMotherPhysical == nullptr)
|
||||
{
|
||||
@@ -117,7 +117,7 @@ G4ReplicatedSlice::G4ReplicatedSlice(const G4String& pName,
|
||||
const G4double half_gap,
|
||||
const G4double offset )
|
||||
: G4PVReplica(pName, nDivs, pAxis, pLogical,
|
||||
pMotherPhysical ? pMotherPhysical->GetLogicalVolume() : nullptr)
|
||||
pMotherPhysical != nullptr ? pMotherPhysical->GetLogicalVolume() : nullptr)
|
||||
{
|
||||
if (pMotherPhysical == nullptr)
|
||||
{
|
||||
@@ -141,7 +141,7 @@ G4ReplicatedSlice::G4ReplicatedSlice(const G4String& pName,
|
||||
const G4double half_gap,
|
||||
const G4double offset )
|
||||
: G4PVReplica(pName, 0, pAxis, pLogical,
|
||||
pMotherPhysical ? pMotherPhysical->GetLogicalVolume() : nullptr)
|
||||
pMotherPhysical != nullptr ? pMotherPhysical->GetLogicalVolume() : nullptr)
|
||||
{
|
||||
if (pMotherPhysical == nullptr)
|
||||
{
|
||||
@@ -271,7 +271,7 @@ G4ReplicatedSlice::CheckAndSetParameters( const EAxis pAxis,
|
||||
// in G4VPVParameterisation::ComputeTransformation, for others
|
||||
// it will stay the unity
|
||||
//
|
||||
G4RotationMatrix* pRMat = new G4RotationMatrix();
|
||||
auto pRMat = new G4RotationMatrix();
|
||||
SetRotation(pRMat);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user