Import Geant4 9.5.0 source tree
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
#
|
||||
# Generated on : 24/9/2010
|
||||
#
|
||||
# $Id: CMakeLists.txt,v 1.1 2010/09/29 18:40:54 bmorgan Exp $
|
||||
# $Id: CMakeLists.txt,v 1.1 2010-09-29 18:40:54 bmorgan Exp $
|
||||
#
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# $Id: GNUmakefile,v 1.6 2010/10/27 07:34:32 gcosmo Exp $
|
||||
# $Id: GNUmakefile,v 1.6 2010-10-27 07:34:32 gcosmo Exp $
|
||||
# ----------------------------------------------------------------------
|
||||
# GNUmakefile for geometry/divisions library. Gabriele Cosmo, 16/06/03.
|
||||
# ----------------------------------------------------------------------
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
$Id: History,v 1.35 2010/11/10 09:16:33 gcosmo Exp $
|
||||
$Id: History,v 1.35 2010-11-10 09:16:33 gcosmo Exp $
|
||||
-------------------------------------------------------------------
|
||||
|
||||
=========================================================
|
||||
@@ -17,6 +17,22 @@ committal in the CVS repository !
|
||||
* Reverse chronological order (last date on top), please *
|
||||
----------------------------------------------------------
|
||||
|
||||
August, 11th, 2011 G.Cosmo (geomdiv-V09-04-04, geomdiv-V09-04-03)
|
||||
- Defined scheme for warnings/errors coding:
|
||||
+ 1xxx for warnings, 0xxx for errors.
|
||||
Code numbering:
|
||||
+ 0001: not supported or implemented features;
|
||||
+ 0002: invalid setup/construct;
|
||||
+ 0003: invalid run condition;
|
||||
+ 1001: incorrect setup; automatically adapted.
|
||||
+ 1002: notification.
|
||||
|
||||
August, 10th, 2011 G.Cosmo (geomdiv-V09-04-02, geomdiv-V09-04-01)
|
||||
- Migrated to new G4Exception scheme for warnings and errors.
|
||||
|
||||
July, 14th, 2011 G.Cosmo (geomdiv-V09-04-00)
|
||||
- Optimise initialization of phi angles in parameterisation for tubs and cons.
|
||||
|
||||
November, 9th, 2010 M.Asai (geomdiv-V09-03-02)
|
||||
- Introducing G4ReplicatedSlice, allowing for gaps in between divided daughter
|
||||
volumes.
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4PVDivision.hh,v 1.14 2008/12/03 16:41:45 arce Exp $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
// $Id: G4PVDivision.hh,v 1.14 2008-12-03 16:41:45 arce Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
//
|
||||
// class G4PVDivision
|
||||
//
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4PVDivisionFactory.hh,v 1.2 2006/06/29 18:18:09 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
// $Id: G4PVDivisionFactory.hh,v 1.2 2006-06-29 18:18:09 gunter Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
//
|
||||
//
|
||||
// class G4PVDivisionFactory
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4ParameterisationBox.hh,v 1.7 2010/07/02 10:46:27 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-09-04 $
|
||||
// $Id: G4ParameterisationBox.hh,v 1.7 2010-07-02 10:46:27 gcosmo Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
//
|
||||
// classes G4ParameterisationBoxX,
|
||||
// G4ParameterisationBoxY,
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4ParameterisationCons.hh,v 1.7 2010/07/02 10:46:27 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-09-04 $
|
||||
// $Id: G4ParameterisationCons.hh,v 1.7 2010-07-02 10:46:27 gcosmo Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
//
|
||||
// classes G4ParameterisationConsRho,
|
||||
// G4ParameterisationConsPhi,
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4ParameterisationPara.hh,v 1.8 2010/07/02 10:46:27 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-09-04 $
|
||||
// $Id: G4ParameterisationPara.hh,v 1.8 2010-07-02 10:46:27 gcosmo Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
//
|
||||
// classes G4ParameterisationParaX,
|
||||
// G4ParameterisationParaY,
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4ParameterisationPolycone.hh,v 1.9 2010/07/02 10:46:27 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-09-04 $
|
||||
// $Id: G4ParameterisationPolycone.hh,v 1.9 2010-07-02 10:46:27 gcosmo Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
//
|
||||
// classes G4ParameterisationPolyconeRho,
|
||||
// G4ParameterisationPolyconePhi,
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4ParameterisationPolyhedra.hh,v 1.10 2010/07/02 10:46:27 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-09-04 $
|
||||
// $Id: G4ParameterisationPolyhedra.hh,v 1.10 2010-07-02 10:46:27 gcosmo Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
//
|
||||
// classes G4ParameterisationPolyhedraRho,
|
||||
// G4ParameterisationPolyhedraPhi,
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4ParameterisationTrd.hh,v 1.9 2010/07/02 10:46:27 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-09-04 $
|
||||
// $Id: G4ParameterisationTrd.hh,v 1.9 2010-07-02 10:46:27 gcosmo Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
//
|
||||
// classes G4ParameterisationTrdX
|
||||
// G4ParameterisationTrdY
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4ParameterisationTubs.hh,v 1.7 2010/07/02 10:46:27 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-09-04 $
|
||||
// $Id: G4ParameterisationTubs.hh,v 1.7 2010-07-02 10:46:27 gcosmo Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
//
|
||||
// classes G4ParameterisationTubsRho
|
||||
// G4ParameterisationTubsPhi
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4ReplicatedSlice.hh,v 1.2 2010/11/10 09:15:40 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-09-04 $
|
||||
// $Id: G4ReplicatedSlice.hh,v 1.2 2010-11-10 09:15:40 gcosmo Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
//
|
||||
// class G4ReplicatedSlice
|
||||
//
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4VDivisionParameterisation.hh,v 1.13 2010/11/10 09:15:48 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-09-04 $
|
||||
// $Id: G4VDivisionParameterisation.hh,v 1.13 2010-11-10 09:15:48 gcosmo Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
//
|
||||
// class G4VDivisionParameterisation
|
||||
//
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4VDivisionParameterisation.icc,v 1.5 2010/11/10 09:15:55 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-09-04 $
|
||||
// $Id: G4VDivisionParameterisation.icc,v 1.5 2010-11-10 09:15:55 gcosmo Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
//
|
||||
// class G4VDivisionParameterisation Inline Implementation file
|
||||
//
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
#
|
||||
# Generated on : 24/9/2010
|
||||
#
|
||||
# $Id: sources.cmake,v 1.2 2010/11/10 11:27:53 gcosmo Exp $
|
||||
# $Id: sources.cmake,v 1.2 2010-11-10 11:27:53 gcosmo Exp $
|
||||
#
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4PVDivision.cc,v 1.24 2010/09/06 09:28:24 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-09-04 $
|
||||
// $Id: G4PVDivision.cc,v 1.24 2010-09-06 09:28:24 gcosmo Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
//
|
||||
// class G4PVDivision Implementation file
|
||||
//
|
||||
@@ -57,17 +57,20 @@ G4PVDivision::G4PVDivision(const G4String& pName,
|
||||
{
|
||||
if (!pMotherLogical)
|
||||
{
|
||||
G4String message_1 =
|
||||
"NULL pointer specified as mother,\n for volume: " + pName;
|
||||
G4Exception("G4PVDivision::G4PVDivision()", "InvalidSetup",
|
||||
FatalException, message_1);
|
||||
std::ostringstream message;
|
||||
message << "Invalid setup." << G4endl
|
||||
<< "NULL pointer specified as mother for volume: " << pName;
|
||||
G4Exception("G4PVDivision::G4PVDivision()", "GeomDiv0002",
|
||||
FatalException, message);
|
||||
return;
|
||||
}
|
||||
if (pLogical == pMotherLogical)
|
||||
{
|
||||
G4String message_2 = "Cannot place a volume inside itself! Volume: "+ pName;
|
||||
G4Exception("G4PVDivision::G4PVDivision()", "InvalidSetup",
|
||||
FatalException, message_2);
|
||||
std::ostringstream message;
|
||||
message << "Invalid setup." << G4endl
|
||||
<< "Cannot place a volume inside itself! Volume: " << pName;
|
||||
G4Exception("G4PVDivision::G4PVDivision()", "GeomDiv0002",
|
||||
FatalException, message);
|
||||
}
|
||||
pMotherLogical->AddDaughter(this);
|
||||
SetMotherLogical(pMotherLogical);
|
||||
@@ -89,16 +92,20 @@ G4PVDivision::G4PVDivision(const G4String& pName,
|
||||
{
|
||||
if (!pMotherLogical)
|
||||
{
|
||||
G4String message_1 = "NULL pointer specified as mother! Volume: " + pName;
|
||||
G4Exception("G4PVDivision::G4PVDivision()", "InvalidSetup",
|
||||
FatalException, message_1);
|
||||
std::ostringstream message;
|
||||
message << "Invalid setup." << G4endl
|
||||
<< "NULL pointer specified as mother! Volume: " << pName;
|
||||
G4Exception("G4PVDivision::G4PVDivision()", "GeomDiv0002",
|
||||
FatalException, message);
|
||||
return;
|
||||
}
|
||||
if (pLogical == pMotherLogical)
|
||||
{
|
||||
G4String message_2 = "Cannot place a volume inside itself! Volume: "+ pName;
|
||||
G4Exception("G4PVDivision::G4PVDivision()", "InvalidSetup",
|
||||
FatalException, message_2);
|
||||
std::ostringstream message;
|
||||
message << "Invalid setup." << G4endl
|
||||
<< "Cannot place a volume inside itself! Volume: " << pName;
|
||||
G4Exception("G4PVDivision::G4PVDivision()", "GeomDiv0002",
|
||||
FatalException, message);
|
||||
}
|
||||
pMotherLogical->AddDaughter(this);
|
||||
SetMotherLogical(pMotherLogical);
|
||||
@@ -118,16 +125,20 @@ G4PVDivision::G4PVDivision(const G4String& pName,
|
||||
{
|
||||
if (!pMotherLogical)
|
||||
{
|
||||
G4String message_1 = "NULL pointer specified as mother! Volume: " + pName;
|
||||
G4Exception("G4PVDivision::G4PVDivision()", "InvalidSetup",
|
||||
FatalException, message_1);
|
||||
std::ostringstream message;
|
||||
message << "Invalid setup." << G4endl
|
||||
<< "NULL pointer specified as mother! Volume: " + pName;
|
||||
G4Exception("G4PVDivision::G4PVDivision()", "GeomDiv0002",
|
||||
FatalException, message);
|
||||
return;
|
||||
}
|
||||
if (pLogical == pMotherLogical)
|
||||
{
|
||||
G4String message_2 = "Cannot place a volume inside itself! Volume: "+ pName;
|
||||
G4Exception("G4PVDivision::G4PVDivision()", "InvalidSetup",
|
||||
FatalException, message_2);
|
||||
std::ostringstream message;
|
||||
message << "Invalid setup." << G4endl
|
||||
<< "Cannot place a volume inside itself! Volume: "+ pName;
|
||||
G4Exception("G4PVDivision::G4PVDivision()", "GeomDiv0002",
|
||||
FatalException, message);
|
||||
}
|
||||
pMotherLogical->AddDaughter(this);
|
||||
SetMotherLogical(pMotherLogical);
|
||||
@@ -154,7 +165,7 @@ G4PVDivision::CheckAndSetParameters( const EAxis pAxis,
|
||||
}
|
||||
if (fnReplicas < 1 )
|
||||
{
|
||||
G4Exception("G4PVDivision::G4PVDivision()", "IllegalConstruct",
|
||||
G4Exception("G4PVDivision::CheckAndSetParameters()", "GeomDiv0002",
|
||||
FatalException, "Illegal number of replicas!");
|
||||
}
|
||||
|
||||
@@ -168,7 +179,7 @@ G4PVDivision::CheckAndSetParameters( const EAxis pAxis,
|
||||
}
|
||||
if( fwidth < 0 )
|
||||
{
|
||||
G4Exception("G4PVDivision::G4PVDivision()", "IllegalConstruct",
|
||||
G4Exception("G4PVDivision::CheckAndSetParameters()", "GeomDiv0002",
|
||||
FatalException, "Width must be positive!");
|
||||
}
|
||||
|
||||
@@ -203,7 +214,7 @@ G4PVDivision::CheckAndSetParameters( const EAxis pAxis,
|
||||
case kZAxis:
|
||||
break;
|
||||
default:
|
||||
G4Exception("G4PVDivision::G4PVDivision()", "IllegalConstruct",
|
||||
G4Exception("G4PVDivision::CheckAndSetParameters()", "GeomDiv0002",
|
||||
FatalException, "Unknown axis of replication.");
|
||||
break;
|
||||
}
|
||||
@@ -217,11 +228,13 @@ G4PVDivision::CheckAndSetParameters( const EAxis pAxis,
|
||||
G4String dsolType = GetLogicalVolume()->GetSolid()->GetEntityType();
|
||||
if( msolType != dsolType && ( msolType != "G4Trd" || dsolType != "G4Trap" ) )
|
||||
{
|
||||
G4String message =
|
||||
"Incorrect solid type for division of volume " + GetName()
|
||||
+ " It is: " + msolType + ", while it should be: " + dsolType;
|
||||
std::ostringstream message;
|
||||
message << "Incorrect solid type for division of volume "
|
||||
<< GetName() << "." << G4endl
|
||||
<< "It is: " << msolType
|
||||
<< ", while it should be: " << dsolType << "!";
|
||||
G4Exception("G4PVDivision::CheckAndSetParameters()",
|
||||
"IllegalConstruct", FatalException, message );
|
||||
"GeomDiv0002", FatalException, message );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -468,11 +481,10 @@ void G4PVDivision::SetParameterisation( G4LogicalVolume* motherLogical,
|
||||
}
|
||||
else
|
||||
{
|
||||
G4cerr << "ERROR - G4PVDivision::SetParameterisation()" << G4endl
|
||||
<< " Divisions for " << mSolidType
|
||||
<< " not implemented." << G4endl;
|
||||
G4String message = "Solid type not supported: " + mSolidType;
|
||||
G4Exception("G4PVDivision::SetParameterisation()", "IllegalConstruct",
|
||||
std::ostringstream message;
|
||||
message << "Solid type " << mSolidType << " not supported!" << G4endl
|
||||
<< "Divisions for " << mSolidType << " are not implemented.";
|
||||
G4Exception("G4PVDivision::SetParameterisation()", "GeomDiv0001",
|
||||
FatalException, message);
|
||||
}
|
||||
}
|
||||
@@ -505,7 +517,7 @@ void G4PVDivision::ErrorInAxis( EAxis axis, G4VSolid* solid )
|
||||
default:
|
||||
break;
|
||||
}
|
||||
G4Exception("G4PVDivision::ErrorInAxis()", "IllegalConstruct",
|
||||
G4Exception("G4PVDivision::ErrorInAxis()", "GeomDiv0002",
|
||||
FatalException, error);
|
||||
}
|
||||
// The next methods are for specialised repeated volumes
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4PVDivisionFactory.cc,v 1.3 2010/07/02 10:46:27 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-09-04 $
|
||||
// $Id: G4PVDivisionFactory.cc,v 1.3 2010-07-02 10:46:27 gcosmo Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
//
|
||||
// class G4PVDivisionFactory Implementation file
|
||||
//
|
||||
@@ -134,8 +134,8 @@ G4PVDivisionFactory::CreatePVDivision(const G4String& pName,
|
||||
if (!divParam)
|
||||
{
|
||||
G4Exception("G4PVDivisionFactory::CreatePVDivision()",
|
||||
"WrongType", FatalException,
|
||||
"Unexpected parameterisation type !");
|
||||
"GeomDiv0001", FatalException,
|
||||
"Unexpected parameterisation type!");
|
||||
return 0;
|
||||
}
|
||||
else
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4ParameterisationBox.cc,v 1.12 2010/11/10 09:15:56 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-09-04 $
|
||||
// $Id: G4ParameterisationBox.cc,v 1.12 2010-11-10 09:15:56 gcosmo Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
//
|
||||
// class G4ParameterisationBox Implementation file
|
||||
//
|
||||
@@ -129,7 +129,7 @@ ComputeTransformation( const G4int copyNo, G4VPhysicalVolume* physVol ) const
|
||||
else
|
||||
{
|
||||
G4Exception("G4ParameterisationBoxX::ComputeTransformation()",
|
||||
"IllegalConstruct", FatalException,
|
||||
"GeomDiv0002", FatalException,
|
||||
"Only axes along X are allowed ! Axis: "+faxis);
|
||||
}
|
||||
#ifdef G4DIVDEBUG
|
||||
@@ -230,7 +230,7 @@ ComputeTransformation( const G4int copyNo, G4VPhysicalVolume* physVol ) const
|
||||
else
|
||||
{
|
||||
G4Exception("G4ParameterisationBoxY::ComputeTransformation()",
|
||||
"IllegalConstruct", FatalException,
|
||||
"GeomDiv0002", FatalException,
|
||||
"Only axes along Y are allowed ! Axis: "+faxis);
|
||||
}
|
||||
#ifdef G4DIVDEBUG
|
||||
@@ -331,7 +331,7 @@ ComputeTransformation( const G4int copyNo, G4VPhysicalVolume *physVol ) const
|
||||
else
|
||||
{
|
||||
G4Exception("G4ParameterisationBoxZ::ComputeTransformation()",
|
||||
"IllegalConstruct", FatalException,
|
||||
"GeomDiv0002", FatalException,
|
||||
"Only axes along Z are allowed ! Axis: "+faxis);
|
||||
}
|
||||
#ifdef G4DIVDEBUG
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4ParameterisationCons.cc,v 1.11 2010/11/10 09:15:58 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-09-04 $
|
||||
// $Id: G4ParameterisationCons.cc,v 1.11 2010-11-10 09:15:58 gcosmo Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
//
|
||||
// class G4ParameterisationCons Implementation file
|
||||
//
|
||||
@@ -91,10 +91,11 @@ G4ParameterisationConsRho( EAxis axis, G4int nDiv,
|
||||
G4Cons* msol = (G4Cons*)(fmotherSolid);
|
||||
if( msol->GetInnerRadiusPlusZ() == 0. )
|
||||
{
|
||||
G4cerr << "WARNING - G4ParameterisationConsRho, OuterRadiusMinusZ = 0. "
|
||||
<< G4endl
|
||||
<< " Width is calculated as that of OuterRadiusMinusZ !"
|
||||
<< G4endl;
|
||||
std::ostringstream message;
|
||||
message << "OuterRadiusMinusZ = 0" << G4endl
|
||||
<< "Width is calculated as that of OuterRadiusMinusZ !";
|
||||
G4Exception("G4ParameterisationConsRho::G4ParameterisationConsRho()",
|
||||
"GeomDiv1001", JustWarning, message);
|
||||
}
|
||||
|
||||
if( divType == DivWIDTH )
|
||||
@@ -198,7 +199,7 @@ ComputeDimensions( G4Cons& cons, const G4int copyNo,
|
||||
cons.SetInnerRadiusPlusZ( pRMin2 + d_half_gap );
|
||||
cons.SetOuterRadiusPlusZ( pRMax2 - d_half_gap );
|
||||
cons.SetZHalfLength( pDz );
|
||||
cons.SetStartPhiAngle( pSPhi );
|
||||
cons.SetStartPhiAngle( pSPhi, false );
|
||||
cons.SetDeltaPhiAngle( pDPhi );
|
||||
|
||||
#ifdef G4DIVDEBUG
|
||||
@@ -304,7 +305,7 @@ ComputeDimensions( G4Cons& cons, const G4int,
|
||||
cons.SetInnerRadiusPlusZ( pRMin2 );
|
||||
cons.SetOuterRadiusPlusZ( pRMax2 );
|
||||
cons.SetZHalfLength( pDz );
|
||||
cons.SetStartPhiAngle( pSPhi );
|
||||
cons.SetStartPhiAngle( pSPhi, false );
|
||||
cons.SetDeltaPhiAngle( pDPhi );
|
||||
|
||||
#ifdef G4DIVDEBUG
|
||||
@@ -418,7 +419,7 @@ ComputeDimensions( G4Cons& cons, const G4int copyNo,
|
||||
G4double pDPhi = msol->GetDeltaPhiAngle();
|
||||
|
||||
cons.SetZHalfLength( pDz );
|
||||
cons.SetStartPhiAngle( pSPhi );
|
||||
cons.SetStartPhiAngle( pSPhi, false );
|
||||
cons.SetDeltaPhiAngle( pDPhi );
|
||||
|
||||
#ifdef G4DIVDEBUG
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4ParameterisationPara.cc,v 1.13 2010/11/10 09:16:03 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-09-04 $
|
||||
// $Id: G4ParameterisationPara.cc,v 1.13 2010-11-10 09:16:03 gcosmo Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
//
|
||||
// class G4ParameterisationPara Implementation file
|
||||
//
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4ParameterisationPolycone.cc,v 1.17 2009/05/18 19:30:29 ivana Exp $
|
||||
// GEANT4 tag $Name: geant4-09-03 $
|
||||
// $Id: G4ParameterisationPolycone.cc,v 1.17 2009-05-18 19:30:29 ivana Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
//
|
||||
// class G4ParameterisationPolycone Implementation file
|
||||
//
|
||||
@@ -52,11 +52,11 @@ G4VParameterisationPolycone( EAxis axis, G4int nDiv, G4double width,
|
||||
G4Polycone* msol = (G4Polycone*)(msolid);
|
||||
if ((msolid->GetEntityType() != "G4ReflectedSolid") && (msol->IsGeneric()))
|
||||
{
|
||||
G4String message =
|
||||
"Sorry, generic construct for G4Polycone NOT supported.\n Solid: "
|
||||
+ msol->GetName();
|
||||
std::ostringstream message;
|
||||
message << "Generic construct for G4Polycone NOT supported." << G4endl
|
||||
<< "Sorry! Solid: " << msol->GetName() << ".";
|
||||
G4Exception("G4VParameterisationPolycone::G4VParameterisationPolycone()",
|
||||
"NotSupported", FatalException, message);
|
||||
"GeomDiv0001", FatalException, message);
|
||||
}
|
||||
if (msolid->GetEntityType() == "G4ReflectedSolid")
|
||||
{
|
||||
@@ -144,25 +144,24 @@ void G4ParameterisationPolyconeRho::CheckParametersValidity()
|
||||
|
||||
if( fDivisionType == DivNDIVandWIDTH || fDivisionType == DivWIDTH )
|
||||
{
|
||||
G4cerr << "WARNING - "
|
||||
<< "G4ParameterisationPolyconeRho::CheckParametersValidity()"
|
||||
<< G4endl
|
||||
<< " Solid " << msol->GetName() << G4endl
|
||||
<< " Division along R will be done with a width "
|
||||
<< "different for each solid section." << G4endl
|
||||
<< " WIDTH will not be used !" << G4endl;
|
||||
std::ostringstream message;
|
||||
message << "In solid " << msol->GetName() << G4endl
|
||||
<< "Division along R will be done with a width "
|
||||
<< "different for each solid section." << G4endl
|
||||
<< "WIDTH will not be used !";
|
||||
G4Exception("G4VParameterisationPolycone::CheckParametersValidity()",
|
||||
"GeomDiv1001", JustWarning, message);
|
||||
}
|
||||
if( foffset != 0. )
|
||||
{
|
||||
G4cerr << "WARNING - "
|
||||
<< "G4ParameterisationPolyconeRho::CheckParametersValidity()"
|
||||
<< G4endl
|
||||
<< " Solid " << msol->GetName() << G4endl
|
||||
<< " Division along R will be done with a width "
|
||||
<< "different for each solid section." << G4endl
|
||||
<< " OFFSET will not be used !" << G4endl;
|
||||
std::ostringstream message;
|
||||
message << "In solid " << msol->GetName() << G4endl
|
||||
<< "Division along R will be done with a width "
|
||||
<< "different for each solid section." << G4endl
|
||||
<< "OFFSET will not be used !";
|
||||
G4Exception("G4VParameterisationPolycone::CheckParametersValidity()",
|
||||
"GeomDiv1001", JustWarning, message);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
@@ -443,18 +442,15 @@ void G4ParameterisationPolyconeZ::CheckParametersValidity()
|
||||
// Division will be following the mother polycone segments
|
||||
if( fDivisionType == DivNDIV ) {
|
||||
if( fnDiv > fOrigParamMother->Num_z_planes-1 ) {
|
||||
G4cerr << "ERROR - "
|
||||
<< "G4ParameterisationPolyconeZ::CheckParametersValidity()"
|
||||
std::ostringstream error;
|
||||
error << "Configuration not supported." << G4endl
|
||||
<< "Division along Z will be done by splitting in the defined"
|
||||
<< G4endl
|
||||
<< " Division along Z will be done splitting in the defined"
|
||||
<< G4endl
|
||||
<< " z_planes, i.e, the number of division would be :"
|
||||
<< " " << fOrigParamMother->Num_z_planes-1
|
||||
<< " instead of " << fnDiv << " !"
|
||||
<< G4endl;
|
||||
<< "Z planes, i.e, the number of division would be: "
|
||||
<< fOrigParamMother->Num_z_planes-1
|
||||
<< ", instead of: " << fnDiv << " !";
|
||||
G4Exception("G4ParameterisationPolyconeZ::CheckParametersValidity()",
|
||||
"IllegalConstruct", FatalException,
|
||||
"Not supported configuration.");
|
||||
"GeomDiv0001", FatalException, error);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -514,17 +510,13 @@ void G4ParameterisationPolyconeZ::CheckParametersValidity()
|
||||
|
||||
|
||||
if ( isegstart != isegend ) {
|
||||
G4cerr << "WARNING - "
|
||||
<< "G4ParameterisationPolyconeZ::CheckParametersValidity()"
|
||||
<< G4endl
|
||||
<< " Division with user defined width." << G4endl
|
||||
<< " Solid " << fmotherSolid->GetName() << G4endl
|
||||
<< " Divided region is not between two z planes."
|
||||
<< G4endl;
|
||||
|
||||
std::ostringstream message;
|
||||
message << "Condiguration not supported." << G4endl
|
||||
<< "Division with user defined width." << G4endl
|
||||
<< "Solid " << fmotherSolid->GetName() << G4endl
|
||||
<< "Divided region is not between two z planes.";
|
||||
G4Exception("G4ParameterisationPolyconeZ::CheckParametersValidity()",
|
||||
"IllegalConstruct", FatalException,
|
||||
"Not supported configuration.");
|
||||
"GeomDiv0001", FatalException, message);
|
||||
}
|
||||
|
||||
fNSegment = isegstart;
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4ParameterisationPolyhedra.cc,v 1.19 2009/05/20 08:35:52 ivana Exp $
|
||||
// GEANT4 tag $Name: geant4-09-03 $
|
||||
// $Id: G4ParameterisationPolyhedra.cc,v 1.19 2009-05-20 08:35:52 ivana Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
//
|
||||
// class G4ParameterisationPolyhedra Implementation file
|
||||
//
|
||||
@@ -54,11 +54,11 @@ G4VParameterisationPolyhedra( EAxis axis, G4int nDiv, G4double width,
|
||||
G4Polyhedra* msol = (G4Polyhedra*)(msolid);
|
||||
if ((msolid->GetEntityType() != "G4ReflectedSolid") && (msol->IsGeneric()))
|
||||
{
|
||||
G4String message =
|
||||
"Sorry, generic construct for G4Polyhedra NOT supported.\n Solid: "
|
||||
+ msol->GetName();
|
||||
std::ostringstream message;
|
||||
message << "Generic construct for G4Polyhedra NOT supported." << G4endl
|
||||
<< "Sorry! Solid: " << msol->GetName();
|
||||
G4Exception("G4VParameterisationPolyhedra::G4VParameterisationPolyhedra()",
|
||||
"NotSupported", FatalException, message);
|
||||
"GeomDiv0001", FatalException, message);
|
||||
}
|
||||
if (msolid->GetEntityType() == "G4ReflectedSolid")
|
||||
{
|
||||
@@ -174,23 +174,23 @@ void G4ParameterisationPolyhedraRho::CheckParametersValidity()
|
||||
|
||||
if( fDivisionType == DivNDIVandWIDTH || fDivisionType == DivWIDTH )
|
||||
{
|
||||
G4cerr << "WARNING - "
|
||||
<< "G4ParameterisationPolyhedraRho::CheckParametersValidity()"
|
||||
<< G4endl
|
||||
<< " Solid " << msol->GetName() << G4endl
|
||||
<< " Division along R will be done with a width "
|
||||
<< "different for each solid section." << G4endl
|
||||
<< " WIDTH will not be used !" << G4endl;
|
||||
std::ostringstream message;
|
||||
message << "In solid " << msol->GetName() << G4endl
|
||||
<< "Division along R will be done with a width "
|
||||
<< "different for each solid section." << G4endl
|
||||
<< "WIDTH will not be used !";
|
||||
G4Exception("G4ParameterisationPolyhedraRho::CheckParametersValidity()",
|
||||
"GeomDiv1001", JustWarning, message);
|
||||
}
|
||||
if( foffset != 0. )
|
||||
{
|
||||
G4cerr << "WARNING - "
|
||||
<< "G4ParameterisationPolyhedraRho::CheckParametersValidity()"
|
||||
<< G4endl
|
||||
<< " Solid " << msol->GetName() << G4endl
|
||||
<< " Division along R will be done with a width "
|
||||
<< "different for each solid section." << G4endl
|
||||
<< " OFFSET will not be used !" << G4endl;
|
||||
std::ostringstream message;
|
||||
message << "In solid " << msol->GetName() << G4endl
|
||||
<< "Division along R will be done with a width "
|
||||
<< "different for each solid section." << G4endl
|
||||
<< "OFFSET will not be used !";
|
||||
G4Exception("G4ParameterisationPolyhedraRho::CheckParametersValidity()",
|
||||
"GeomDiv1001", JustWarning, message);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -324,41 +324,37 @@ void G4ParameterisationPolyhedraPhi::CheckParametersValidity()
|
||||
|
||||
if( fDivisionType == DivNDIVandWIDTH || fDivisionType == DivWIDTH )
|
||||
{
|
||||
G4cerr << "WARNING - "
|
||||
<< "G4ParameterisationPolyhedraPhi::CheckParametersValidity()"
|
||||
<< G4endl
|
||||
<< " Solid " << msol->GetName() << G4endl
|
||||
<< " Division along PHI will be done splitting "
|
||||
<< "in the defined numSide." << G4endl
|
||||
<< " WIDTH will not be used !" << G4endl;
|
||||
std::ostringstream message;
|
||||
message << "In solid " << msol->GetName() << G4endl
|
||||
<< " Division along PHI will be done splitting "
|
||||
<< "in the defined numSide." << G4endl
|
||||
<< "WIDTH will not be used !";
|
||||
G4Exception("G4ParameterisationPolyhedraPhi::CheckParametersValidity()",
|
||||
"GeomDiv1001", JustWarning, message);
|
||||
}
|
||||
if( foffset != 0. )
|
||||
{
|
||||
G4cerr << "WARNING - "
|
||||
<< "G4ParameterisationPolyhedraPhi::CheckParametersValidity()"
|
||||
<< G4endl
|
||||
<< " Solid " << msol->GetName() << G4endl
|
||||
<< " Division along PHI will be done splitting "
|
||||
<< "in the defined numSide." << G4endl
|
||||
<< " OFFSET will not be used !" << G4endl;
|
||||
std::ostringstream message;
|
||||
message << "In solid " << msol->GetName() << G4endl
|
||||
<< "Division along PHI will be done splitting "
|
||||
<< "in the defined numSide." << G4endl
|
||||
<< "OFFSET will not be used !";
|
||||
G4Exception("G4ParameterisationPolyhedraPhi::CheckParametersValidity()",
|
||||
"GeomDiv1001", JustWarning, message);
|
||||
}
|
||||
|
||||
G4PolyhedraHistorical* origparamMother = msol->GetOriginalParameters();
|
||||
|
||||
if( origparamMother->numSide != fnDiv && fDivisionType != DivWIDTH)
|
||||
{
|
||||
G4cerr << "ERROR - "
|
||||
<< "G4ParameterisationPolyhedraPhi::CheckParametersValidity()"
|
||||
<< G4endl
|
||||
<< " Division along PHI will be done splitting in the defined"
|
||||
<< G4endl
|
||||
<< " numSide, i.e, the number of division would be :"
|
||||
<< " " << origparamMother->numSide
|
||||
<< " instead of " << fnDiv << " !"
|
||||
<< G4endl;
|
||||
std::ostringstream message;
|
||||
message << "Configuration not supported." << G4endl
|
||||
<< "Division along PHI will be done splitting in the defined"
|
||||
<< G4endl
|
||||
<< "numSide, i.e, the number of division would be :"
|
||||
<< origparamMother->numSide << " instead of " << fnDiv << " !";
|
||||
G4Exception("G4ParameterisationPolyhedraPhi::CheckParametersValidity()",
|
||||
"IllegalConstruct", FatalException,
|
||||
"Not supported configuration.");
|
||||
"GeomDiv0001", FatalException, message);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -518,18 +514,15 @@ void G4ParameterisationPolyhedraZ::CheckParametersValidity()
|
||||
// Division will be following the mother polyhedra segments
|
||||
if( fDivisionType == DivNDIV ) {
|
||||
if( fOrigParamMother->Num_z_planes-1 != fnDiv ) {
|
||||
G4cerr << "ERROR - "
|
||||
<< "G4ParameterisationPolyhedraZ::CheckParametersValidity()"
|
||||
<< G4endl
|
||||
<< " Division along Z will be done splitting in the defined"
|
||||
<< G4endl
|
||||
<< " z_planes, i.e, the number of division would be :"
|
||||
<< " " << fOrigParamMother->Num_z_planes-1
|
||||
<< " instead of " << fnDiv << " !"
|
||||
<< G4endl;
|
||||
std::ostringstream message;
|
||||
message << "Configuration not supported." << G4endl
|
||||
<< "Division along Z will be done splitting in the defined"
|
||||
<< G4endl
|
||||
<< "Z planes, i.e, the number of division would be :"
|
||||
<< fOrigParamMother->Num_z_planes-1 << " instead of "
|
||||
<< fnDiv << " !";
|
||||
G4Exception("G4ParameterisationPolyhedraZ::CheckParametersValidity()",
|
||||
"IllegalConstruct", FatalException,
|
||||
"Not supported configuration.");
|
||||
"GeomDiv0001", FatalException, message);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -588,17 +581,13 @@ void G4ParameterisationPolyhedraZ::CheckParametersValidity()
|
||||
}
|
||||
|
||||
if ( isegstart != isegend ) {
|
||||
G4cerr << "WARNING - "
|
||||
<< "G4ParameterisationPolyhedraZ::CheckParametersValidity()"
|
||||
<< G4endl
|
||||
<< " Division with user defined width." << G4endl
|
||||
<< " Solid " << fmotherSolid->GetName() << G4endl
|
||||
<< " Divided region is not between two z planes."
|
||||
<< G4endl;
|
||||
|
||||
std::ostringstream message;
|
||||
message << "Configuration not supported." << G4endl
|
||||
<< "Division with user defined width." << G4endl
|
||||
<< "Solid " << fmotherSolid->GetName() << G4endl
|
||||
<< "Divided region is not between two Z planes.";
|
||||
G4Exception("G4ParameterisationPolyhedraZ::CheckParametersValidity()",
|
||||
"IllegalConstruct", FatalException,
|
||||
"Not supported configuration.");
|
||||
"GeomDiv0001", FatalException, message);
|
||||
}
|
||||
|
||||
fNSegment = isegstart;
|
||||
@@ -739,4 +728,3 @@ ComputeDimensions( G4Polyhedra& phedra, const G4int copyNo,
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4ParameterisationTrd.cc,v 1.19 2010/11/10 09:16:08 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-09-04 $
|
||||
// $Id: G4ParameterisationTrd.cc,v 1.19 2010-11-10 09:16:08 gcosmo Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
//
|
||||
// class G4ParameterisationTrd Implementation file
|
||||
//
|
||||
@@ -97,7 +97,8 @@ G4ParameterisationTrdX( EAxis axis, G4int nDiv,
|
||||
}
|
||||
else if( divType == DivNDIV )
|
||||
{
|
||||
fwidth = CalculateWidth( msol->GetXHalfLength1()+msol->GetXHalfLength2(), nDiv, offset );
|
||||
fwidth = CalculateWidth( msol->GetXHalfLength1()+msol->GetXHalfLength2(),
|
||||
nDiv, offset );
|
||||
}
|
||||
|
||||
#ifdef G4DIVDEBUG
|
||||
@@ -158,14 +159,15 @@ ComputeTransformation( const G4int copyNo,
|
||||
else
|
||||
{
|
||||
G4Exception("G4ParameterisationTrdX::ComputeTransformation()",
|
||||
"IllegalConstruct", FatalException,
|
||||
"GeomDiv0002", FatalException,
|
||||
"Only axes along X are allowed, and axis is: "+faxis);
|
||||
}
|
||||
|
||||
#ifdef G4DIVDEBUG
|
||||
if( verbose >= 2 )
|
||||
{
|
||||
G4cout << std::setprecision(8) << " G4ParameterisationTrdX::ComputeTransformation "
|
||||
G4cout << std::setprecision(8)
|
||||
<< " G4ParameterisationTrdX::ComputeTransformation() "
|
||||
<< copyNo << G4endl
|
||||
<< " Position: " << origin << " - Axis: " << faxis << G4endl;
|
||||
}
|
||||
@@ -192,8 +194,9 @@ ComputeDimensions( G4Trd& trd, const G4int, const G4VPhysicalVolume* ) const
|
||||
#ifdef G4DIVDEBUG
|
||||
if( verbose >= 2 )
|
||||
{
|
||||
G4cout << " G4ParameterisationTrdX::ComputeDimensions():" << copyNo << G4endl;
|
||||
trd.DumpInfo();
|
||||
G4cout << " G4ParameterisationTrdX::ComputeDimensions():"
|
||||
<< copyNo << G4endl;
|
||||
trd.DumpInfo();
|
||||
}
|
||||
#endif
|
||||
}
|
||||
@@ -214,8 +217,8 @@ ComputeSolid(const G4int i, G4VPhysicalVolume * pv)
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
void
|
||||
G4ParameterisationTrdX::
|
||||
ComputeDimensions( G4Trap& trap, const G4int copyNo, const G4VPhysicalVolume* ) const
|
||||
G4ParameterisationTrdX::ComputeDimensions( G4Trap& trap, const G4int copyNo,
|
||||
const G4VPhysicalVolume* ) const
|
||||
{
|
||||
G4Trd* msol = (G4Trd*)(fmotherSolid);
|
||||
G4double pDy1 = msol->GetYHalfLength1();
|
||||
@@ -224,8 +227,10 @@ ComputeDimensions( G4Trap& trap, const G4int copyNo, const G4VPhysicalVolume* )
|
||||
G4double pDx1 = msol->GetXHalfLength1()/fnDiv;
|
||||
G4double pDx2 = msol->GetXHalfLength2()/fnDiv;
|
||||
|
||||
G4double cxy1 = -msol->GetXHalfLength1() + foffset + (copyNo+0.5)*pDx1*2;// centre of the side at y=-pDy1
|
||||
G4double cxy2 = -msol->GetXHalfLength2() + foffset + (copyNo+0.5)*pDx2*2;// centre of the side at y=+pDy1
|
||||
G4double cxy1 = -msol->GetXHalfLength1() + foffset
|
||||
+ (copyNo+0.5)*pDx1*2;// centre of the side at y=-pDy1
|
||||
G4double cxy2 = -msol->GetXHalfLength2() + foffset
|
||||
+ (copyNo+0.5)*pDx2*2;// centre of the side at y=+pDy1
|
||||
G4double alp = std::atan( (cxy2-cxy1)/pDz );
|
||||
|
||||
trap.SetAllParameters ( pDz,
|
||||
@@ -243,8 +248,9 @@ ComputeDimensions( G4Trap& trap, const G4int copyNo, const G4VPhysicalVolume* )
|
||||
#ifdef G4DIVDEBUG
|
||||
if( verbose >= 2 )
|
||||
{
|
||||
G4cout << " G4ParameterisationTrdX::ComputeDimensions():" << copyNo << G4endl;
|
||||
trap.DumpInfo();
|
||||
G4cout << " G4ParameterisationTrdX::ComputeDimensions():"
|
||||
<< copyNo << G4endl;
|
||||
trap.DumpInfo();
|
||||
}
|
||||
#endif
|
||||
}
|
||||
@@ -262,15 +268,14 @@ void G4ParameterisationTrdX::CheckParametersValidity()
|
||||
|
||||
if( std::fabs(mpDx1 - mpDx2) > kCarTolerance )
|
||||
{
|
||||
G4cerr << "ERROR - G4ParameterisationTrdX::CheckParametersValidity()"
|
||||
<< G4endl
|
||||
<< " Making a division of a TRD along axis X," << G4endl
|
||||
<< " while the X half lengths are not equal," << G4endl
|
||||
<< " is not (yet) supported. It will result" << G4endl
|
||||
<< " in non-equal division solids." << G4endl;
|
||||
std::ostringstream message;
|
||||
message << "Invalid solid specification. NOT supported." << G4endl
|
||||
<< "Making a division of a TRD along axis X," << G4endl
|
||||
<< "while the X half lengths are not equal," << G4endl
|
||||
<< "is not (yet) supported. It will result" << G4endl
|
||||
<< "in non-equal division solids.";
|
||||
G4Exception("G4ParameterisationTrdX::CheckParametersValidity()",
|
||||
"IllegalConstruct", FatalException,
|
||||
"Invalid solid specification. NOT supported.");
|
||||
"GeomDiv0001", FatalException, message);
|
||||
}
|
||||
*/
|
||||
}
|
||||
@@ -345,14 +350,15 @@ ComputeTransformation( const G4int copyNo, G4VPhysicalVolume* physVol ) const
|
||||
else
|
||||
{
|
||||
G4Exception("G4ParameterisationTrdY::ComputeTransformation()",
|
||||
"IllegalConstruct", FatalException,
|
||||
"GeomDiv0002", FatalException,
|
||||
"Only axes along Y are allowed !");
|
||||
}
|
||||
|
||||
#ifdef G4DIVDEBUG
|
||||
if( verbose >= 2 )
|
||||
{
|
||||
G4cout << std::setprecision(8) << " G4ParameterisationTrdY::ComputeTransformation " << copyNo
|
||||
G4cout << std::setprecision(8)
|
||||
<< " G4ParameterisationTrdY::ComputeTransformation " << copyNo
|
||||
<< " pos " << origin << " rot mat " << " axis " << faxis << G4endl;
|
||||
}
|
||||
#endif
|
||||
@@ -398,15 +404,14 @@ void G4ParameterisationTrdY::CheckParametersValidity()
|
||||
|
||||
if( std::fabs(mpDy1 - mpDy2) > kCarTolerance )
|
||||
{
|
||||
G4cerr << "ERROR - G4ParameterisationTrdY::CheckParametersValidity()"
|
||||
<< G4endl
|
||||
<< " Making a division of a TRD along axis Y while" << G4endl
|
||||
<< " the Y half lengths are not equal is not (yet)" << G4endl
|
||||
<< " supported. It will result in non-equal" << G4endl
|
||||
<< " division solids." << G4endl;
|
||||
std::ostringstream message;
|
||||
message << "Invalid solid specification. NOT supported." << G4endl
|
||||
<< "Making a division of a TRD along axis Y while" << G4endl
|
||||
<< "the Y half lengths are not equal is not (yet)" << G4endl
|
||||
<< "supported. It will result in non-equal" << G4endl
|
||||
<< "division solids.";
|
||||
G4Exception("G4ParameterisationTrdY::CheckParametersValidity()",
|
||||
"IllegalConstruct", FatalException,
|
||||
"Invalid solid specification. NOT supported.");
|
||||
"GeomDiv0001", FatalException, message);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -473,7 +478,7 @@ ComputeTransformation(const G4int copyNo, G4VPhysicalVolume *physVol) const
|
||||
else
|
||||
{
|
||||
G4Exception("G4ParameterisationTrdZ::ComputeTransformation()",
|
||||
"IllegalConstruct", FatalException,
|
||||
"GeomDiv0002", FatalException,
|
||||
"Only axes along Z are allowed !");
|
||||
}
|
||||
|
||||
@@ -510,7 +515,8 @@ ComputeDimensions(G4Trd& trd, const G4int copyNo,
|
||||
trd.SetAllParameters( pDx1+DDx*(OffsetZ()+copyNo*fwidth+fhgap)/zLength,
|
||||
pDx1+DDx*(OffsetZ()+(copyNo+1)*fwidth-fhgap)/zLength,
|
||||
pDy1+DDy*(OffsetZ()+copyNo*fwidth+fhgap)/zLength,
|
||||
pDy1+DDy*(OffsetZ()+(copyNo+1)*fwidth-fhgap)/zLength, pDz );
|
||||
pDy1+DDy*(OffsetZ()+(copyNo+1)*fwidth-fhgap)/zLength,
|
||||
pDz );
|
||||
|
||||
#ifdef G4DIVDEBUG
|
||||
if( verbose >= 1 )
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4ParameterisationTubs.cc,v 1.10 2010/11/10 09:16:13 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-09-04 $
|
||||
// $Id: G4ParameterisationTubs.cc,v 1.10 2010-11-10 09:16:13 gcosmo Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
//
|
||||
// class G4ParameterisationTubs Implementation file
|
||||
//
|
||||
@@ -166,7 +166,7 @@ ComputeDimensions( G4Tubs& tubs, const G4int copyNo,
|
||||
tubs.SetInnerRadius( pRMin );
|
||||
tubs.SetOuterRadius( pRMax );
|
||||
tubs.SetZHalfLength( pDz );
|
||||
tubs.SetStartPhiAngle( pSPhi );
|
||||
tubs.SetStartPhiAngle( pSPhi, false );
|
||||
tubs.SetDeltaPhiAngle( pDPhi );
|
||||
|
||||
#ifdef G4DIVDEBUG
|
||||
@@ -275,7 +275,7 @@ ComputeDimensions( G4Tubs& tubs, const G4int,
|
||||
tubs.SetInnerRadius( pRMin );
|
||||
tubs.SetOuterRadius( pRMax );
|
||||
tubs.SetZHalfLength( pDz );
|
||||
tubs.SetStartPhiAngle( pSPhi );
|
||||
tubs.SetStartPhiAngle( pSPhi, false );
|
||||
tubs.SetDeltaPhiAngle( pDPhi );
|
||||
|
||||
#ifdef G4DIVDEBUG
|
||||
@@ -386,7 +386,7 @@ ComputeDimensions( G4Tubs& tubs, const G4int,
|
||||
tubs.SetInnerRadius( pRMin );
|
||||
tubs.SetOuterRadius( pRMax );
|
||||
tubs.SetZHalfLength( pDz );
|
||||
tubs.SetStartPhiAngle( pSPhi );
|
||||
tubs.SetStartPhiAngle( pSPhi, false );
|
||||
tubs.SetDeltaPhiAngle( pDPhi );
|
||||
|
||||
#ifdef G4DIVDEBUG
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4ReplicatedSlice.cc,v 1.2 2010/11/10 09:16:18 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-09-04 $
|
||||
// $Id: G4ReplicatedSlice.cc,v 1.2 2010-11-10 09:16:18 gcosmo Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
//
|
||||
// --------------------------------------------------------------------
|
||||
|
||||
@@ -140,17 +140,19 @@ G4ReplicatedSlice::CheckAndSetParameters( const EAxis pAxis,
|
||||
{
|
||||
if(!pMotherLogical)
|
||||
{
|
||||
G4String message_1 = "NULL pointer specified as mother! Volume: "
|
||||
+ GetName();
|
||||
G4Exception("G4ReplicatedSlice::G4ReplicatedSlice()", "InvalidSetup",
|
||||
FatalException, message_1);
|
||||
std::ostringstream message;
|
||||
message << "Invalid setup." << G4endl
|
||||
<< "NULL pointer specified as mother! Volume: " << GetName();
|
||||
G4Exception("G4ReplicatedSlice::CheckAndSetParameters()", "GeomDiv0002",
|
||||
FatalException, message);
|
||||
}
|
||||
if(pLogical == pMotherLogical)
|
||||
{
|
||||
G4String message_2 = "Cannot place a volume inside itself! Volume: "
|
||||
+ GetName();
|
||||
G4Exception("G4ReplicatedSlice::G4ReplicatedSlice()", "InvalidSetup",
|
||||
FatalException, message_2);
|
||||
std::ostringstream message;
|
||||
message << "Invalid setup." << G4endl
|
||||
<< "Cannot place a volume inside itself! Volume: " << GetName();
|
||||
G4Exception("G4ReplicatedSlice::CheckAndSetParameters()", "GeomDiv0002",
|
||||
FatalException, message);
|
||||
}
|
||||
|
||||
//----- Check that mother solid is of the same type as
|
||||
@@ -161,11 +163,14 @@ G4ReplicatedSlice::CheckAndSetParameters( const EAxis pAxis,
|
||||
G4String dsolType = pLogical->GetSolid()->GetEntityType();
|
||||
if( msolType != dsolType && ( msolType != "G4Trd" || dsolType != "G4Trap" ) )
|
||||
{
|
||||
G4String message = "Incorrect solid type for division of volume "
|
||||
+ GetName() + " It is: " + msolType
|
||||
+ ", while it should be: " + dsolType;
|
||||
std::ostringstream message;
|
||||
message << "Invalid setup." << G4endl
|
||||
<< "Incorrect solid type for division of volume: "
|
||||
<< GetName() << G4endl
|
||||
<< " It is: " << msolType
|
||||
<< ", while it should be: " << dsolType;
|
||||
G4Exception("G4ReplicatedSlice::CheckAndSetParameters()",
|
||||
"IllegalConstruct", FatalException, message );
|
||||
"GeomDiv0002", FatalException, message);
|
||||
}
|
||||
|
||||
pMotherLogical->AddDaughter(this);
|
||||
@@ -183,7 +188,7 @@ G4ReplicatedSlice::CheckAndSetParameters( const EAxis pAxis,
|
||||
}
|
||||
if (fnReplicas < 1 )
|
||||
{
|
||||
G4Exception("G4ReplicatedSlice::G4ReplicatedSlice()", "IllegalConstruct",
|
||||
G4Exception("G4ReplicatedSlice::CheckAndSetParameters()", "GeomDiv0002",
|
||||
FatalException, "Illegal number of replicas!");
|
||||
}
|
||||
if( divType != DivNDIV)
|
||||
@@ -196,12 +201,12 @@ G4ReplicatedSlice::CheckAndSetParameters( const EAxis pAxis,
|
||||
}
|
||||
if( fwidth < 0 )
|
||||
{
|
||||
G4Exception("G4ReplicatedSlice::G4ReplicatedSlice()", "IllegalConstruct",
|
||||
G4Exception("G4ReplicatedSlice::CheckAndSetParameters()", "GeomDiv0002",
|
||||
FatalException, "Width must be positive!");
|
||||
}
|
||||
if( fwidth < 2.*half_gap )
|
||||
{
|
||||
G4Exception("G4ReplicatedSlice::G4ReplicatedSlice()", "IllegalConstruct",
|
||||
G4Exception("G4ReplicatedSlice::CheckAndSetParameters()", "GeomDiv0002",
|
||||
FatalException, "Half_gap is too large!");
|
||||
}
|
||||
|
||||
@@ -228,7 +233,7 @@ G4ReplicatedSlice::CheckAndSetParameters( const EAxis pAxis,
|
||||
case kZAxis:
|
||||
break;
|
||||
default:
|
||||
G4Exception("G4ReplicatedSlice::G4ReplicatedSlice()", "IllegalConstruct",
|
||||
G4Exception("G4ReplicatedSlice::CheckAndSetParameters()", "GeomDiv0002",
|
||||
FatalException, "Unknown axis of replication.");
|
||||
break;
|
||||
}
|
||||
@@ -479,11 +484,10 @@ void G4ReplicatedSlice::SetParameterisation( G4LogicalVolume* motherLogical,
|
||||
// }
|
||||
else
|
||||
{
|
||||
G4cerr << "ERROR - G4ReplicatedSlice::SetParameterisation()" << G4endl
|
||||
<< " Divisions for " << mSolidType
|
||||
<< " not implemented." << G4endl;
|
||||
G4String message = "Solid type not supported: " + mSolidType;
|
||||
G4Exception("G4ReplicatedSlice::SetParameterisation()", "IllegalConstruct",
|
||||
std::ostringstream message;
|
||||
message << "Solid type not supported: " << mSolidType << "." << G4endl
|
||||
<< "Divisions for " << mSolidType << " not implemented.";
|
||||
G4Exception("G4ReplicatedSlice::SetParameterisation()", "GeomDiv0001",
|
||||
FatalException, message);
|
||||
}
|
||||
|
||||
@@ -518,7 +522,7 @@ void G4ReplicatedSlice::ErrorInAxis( EAxis axis, G4VSolid* solid )
|
||||
default:
|
||||
break;
|
||||
}
|
||||
G4Exception("G4ReplicatedSlice::ErrorInAxis()", "IllegalConstruct",
|
||||
G4Exception("G4ReplicatedSlice::ErrorInAxis()", "GeomDiv0002",
|
||||
FatalException, error);
|
||||
}
|
||||
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4VDivisionParameterisation.cc,v 1.16 2010/11/10 09:16:18 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-09-04 $
|
||||
// $Id: G4VDivisionParameterisation.cc,v 1.16 2010-11-10 09:16:18 gcosmo Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
//
|
||||
// class G4VDivisionParameterisation Implementation file
|
||||
//
|
||||
@@ -140,13 +140,13 @@ void G4VDivisionParameterisation::CheckOffset( G4double maxPar )
|
||||
{
|
||||
if( foffset >= maxPar )
|
||||
{
|
||||
G4cerr << "ERROR - G4VDivisionParameterisation::CheckOffset()" << G4endl
|
||||
<< " Division of solid " << fmotherSolid->GetName()
|
||||
<< " has too big offset = " << G4endl
|
||||
<< " " << foffset << " > " << maxPar << " !" << G4endl;
|
||||
std::ostringstream message;
|
||||
message << "Configuration not supported." << G4endl
|
||||
<< "Division of solid " << fmotherSolid->GetName()
|
||||
<< " has too big offset = " << G4endl
|
||||
<< " " << foffset << " > " << maxPar << " !";
|
||||
G4Exception("G4VDivisionParameterisation::CheckOffset()",
|
||||
"IllegalConstruct", FatalException,
|
||||
"Not supported configuration.");
|
||||
"GeomDiv0001", FatalException, message);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -156,18 +156,16 @@ void G4VDivisionParameterisation::CheckNDivAndWidth( G4double maxPar )
|
||||
if( (fDivisionType == DivNDIVandWIDTH)
|
||||
&& (foffset + fwidth*fnDiv - maxPar > kCarTolerance ) )
|
||||
{
|
||||
G4cerr << "ERROR - G4VDivisionParameterisation::CheckNDivAndWidth()"
|
||||
<< G4endl
|
||||
<< " Division of solid " << fmotherSolid->GetName()
|
||||
std::ostringstream message;
|
||||
message << "Configuration not supported." << G4endl
|
||||
<< "Division of solid " << fmotherSolid->GetName()
|
||||
<< " has too big offset + width*nDiv = " << G4endl
|
||||
<< " " << foffset + fwidth*fnDiv << " > "
|
||||
<< foffset << ". Width = "
|
||||
<< G4endl
|
||||
<< " " << fwidth << ". nDiv = " << fnDiv << " !"
|
||||
<< G4endl;
|
||||
<< " " << fwidth << ". nDiv = " << fnDiv << " !";
|
||||
G4Exception("G4VDivisionParameterisation::CheckNDivAndWidth()",
|
||||
"IllegalConstruct", FatalException,
|
||||
"Not supported configuration.");
|
||||
"GeomDiv0001", FatalException, message);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user