Import Geant4 1.1.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-08 15:34:16 +02:00
parent ca1c8cb059
commit 103bda00c8
2654 changed files with 29719 additions and 20203 deletions
+2 -2
View File
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4Circle.cc,v 1.1.8.1 1999/12/07 20:48:53 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
// $Id: G4Circle.cc,v 1.2 1999/12/15 14:50:35 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
//
//
+3 -3
View File
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4Colour.cc,v 1.2.8.1 1999/12/07 20:48:53 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
// $Id: G4Colour.cc,v 1.3 1999/12/15 14:50:35 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
//
//
// John Allison 20th October 1996
@@ -14,7 +14,7 @@
#include "G4Colour.hh"
#include "G4ios.hh"
ostream& operator << (ostream& os, const G4Colour& c) {
G4std::ostream& operator << (G4std::ostream& os, const G4Colour& c) {
return os << '(' << c.red << ',' << c.green << ',' << c.blue
<< ',' << c.alpha << ')';
}
+20 -20
View File
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4NURBS.cc,v 1.2.8.1 1999/12/07 20:48:53 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
// $Id: G4NURBS.cc,v 1.3 1999/12/15 14:50:35 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
//
//
// Olivier Crumeyrolle 12 September 1996
@@ -40,7 +40,7 @@ G4VVisPrim & G4NURBS::operator = (const G4VVisPrim &right) {
return G4VVisPrim::operator = (right);
}
ostream & operator << (ostream & inout_outStream, const G4NURBS & in_kNurb)
G4std::ostream & operator << (G4std::ostream & inout_outStream, const G4NURBS & in_kNurb)
{
inout_outStream
// the magic could be changed for good reasons only
@@ -90,7 +90,7 @@ ostream & operator << (ostream & inout_outStream, const G4NURBS & in_kNurb)
}
while (otherCPs);
} // end of control point iteration
inout_outStream << "\n# That's all!" << endl; // endl do an \n and a flush
inout_outStream << "\n# That's all!" << G4endl; // endl do an \n and a flush
return inout_outStream;
}
@@ -106,7 +106,7 @@ G4float G4NURBS::GetfloatKnot(t_direction in_dir, t_indKnot in_index) const
{
G4cerr << "\nERROR: G4NURBS::GetfloatKnot: index out of range\n"
<< "\n\t in_dir : " << in_dir << ", in_index : " << in_index
<< "m[in_dir].nbrKnots : " << m[in_dir].nbrKnots << endl;
<< "m[in_dir].nbrKnots : " << m[in_dir].nbrKnots << G4endl;
return ((G4float)m[in_dir].pKnots[m[in_dir].nbrKnots-1]);
};
}
@@ -120,7 +120,7 @@ G4double G4NURBS::GetdoubleKnot(t_direction in_dir, t_indKnot in_index) const
{
G4cerr << "\nERROR: G4NURBS::GetdoubleKnot: index out of range"
<< "\n\t in_dir : " << in_dir << ", in_index : " << in_index
<< "m[in_dir].nbrKnots : " << m[in_dir].nbrKnots << endl;
<< "m[in_dir].nbrKnots : " << m[in_dir].nbrKnots << G4endl;
return (G4double)(m[in_dir].pKnots[m[in_dir].nbrKnots-1]);
};
}
@@ -133,7 +133,7 @@ G4NURBS::t_floatCtrlPt* G4NURBS::GetfloatCtrlPt(t_indCtrlPt in_onedimindex) cons
{
G4cerr << "\nERROR: G4NURBS::GetfloatCtrlPt: index out of range"
<< "\n\t in_onedimindex : " << in_onedimindex
<< " , mtotnbrCtrlPts : " << mtotnbrCtrlPts << endl;
<< " , mtotnbrCtrlPts : " << mtotnbrCtrlPts << G4endl;
return TofloatCtrlPt(mpCtrlPts[mtotnbrCtrlPts-1]);
};
}
@@ -151,7 +151,7 @@ G4NURBS::t_floatCtrlPt* G4NURBS::GetfloatCtrlPt(t_inddCtrlPt in_Uindex, t_inddCt
<< "\n\t in_Uindex : " << in_Uindex
<< " , in_Vindex : " << in_Vindex
<< " , UnbrCtrlPts : " << m[U].nbrCtrlPts
<< " , VnbrCtrlPts : " << m[V].nbrCtrlPts << endl;
<< " , VnbrCtrlPts : " << m[V].nbrCtrlPts << G4endl;
return TofloatCtrlPt(mpCtrlPts[mtotnbrCtrlPts-1]);
};
}
@@ -164,7 +164,7 @@ G4NURBS::t_doubleCtrlPt* G4NURBS::GetdoubleCtrlPt(t_indCtrlPt in_onedimindex) co
{
G4cerr << "\nERROR: G4NURBS::getdoubleCtrlPts: index out of range"
<< "\n\t in_onedimindex : " << in_onedimindex
<< " , mtotnbrCtrlPts : " << mtotnbrCtrlPts << endl;
<< " , mtotnbrCtrlPts : " << mtotnbrCtrlPts << G4endl;
return TodoubleCtrlPt(mpCtrlPts[mtotnbrCtrlPts-1]);
};
}
@@ -182,7 +182,7 @@ G4NURBS::t_doubleCtrlPt* G4NURBS::GetdoubleCtrlPt(t_inddCtrlPt in_Uindex, t_indd
<< "\n\t in_Uindex : " << in_Uindex
<< " , in_Vindex : " << in_Vindex
<< " , UnbrCtrlPts : " << m[U].nbrCtrlPts
<< " , VnbrCtrlPts : " << m[V].nbrCtrlPts << endl;
<< " , VnbrCtrlPts : " << m[V].nbrCtrlPts << G4endl;
return TodoubleCtrlPt(mpCtrlPts[mtotnbrCtrlPts-1]);
};
}
@@ -241,7 +241,7 @@ G4double * G4NURBS::GetdoubleAllCtrlPts() const
<< "\n\tin_startIndex : " << in_startIndex
<< ", nbr of knots : " << in_rNurb.m[kmdir].nbrKnots
<< "\n\t mp set to NULL, calls to picking functions will fail"
<< endl;
<< G4endl;
mp = NULL;
};
}
@@ -271,7 +271,7 @@ G4bool G4NURBS::KnotsIterator::pick(G4float * inout_pFlt)
<< "\n\tin_startCtrlPtIndex : " << in_startCtrlPtIndex
<< ", nbr of CtrlPts : " << in_rNurb.mtotnbrCtrlPts
<< "\n\t mp set to NULL, calls to picking functions will fail"
<< endl;
<< G4endl;
mp = NULL;
};
}
@@ -299,7 +299,7 @@ G4bool G4NURBS::CtrlPtsCoordsIterator::pick(G4float * inout_pFlt)
<< "\n\tin_startIndex : " << in_startIndex
<< ", nbr of CtrlPts : " << in_rNurb.mtotnbrCtrlPts
<< "\n\t mp set to NULL, calls to picking functions will fail"
<< endl;
<< G4endl;
mp = NULL;
};
}
@@ -361,7 +361,7 @@ G4bool G4NURBS::MakeKnotVector(t_Dir & io_d, t_KnotVectorGenFlag in_KVGFlag)
}
ostream & operator << (ostream & io_ostr, G4NURBS::t_KnotVectorGenFlag in_f)
G4std::ostream & operator << (G4std::ostream & io_ostr, G4NURBS::t_KnotVectorGenFlag in_f)
{
switch (in_f)
{
@@ -388,14 +388,14 @@ void G4NURBS::Conscheck() const
{
G4cerr << "\nFATAL ERROR: G4NURBS::G4NURBS: The order in the "
<< G4NURBS::Tochar(dir)
<< " direction must be >= 1" << endl;
<< " direction must be >= 1" << G4endl;
exit(-1);
};
if (m[dir].nbrCtrlPts<=0)
{
G4cerr << "\nFATAL ERROR: G4NURBS::G4NURBS: The number of control points "
<< G4NURBS::Tochar(dir)
<< " direction must be >= 1" << endl;
<< " direction must be >= 1" << G4endl;
exit(-1);
};
}; // end of dummy
@@ -425,7 +425,7 @@ void G4NURBS::Conscheck() const
if (! (mpCtrlPts = in_pCtrlPts) )
{
G4cerr << "\nFATAL ERROR: G4NURBS::G4NURBS: A NURBS MUST HAVE CONTROL POINTS!\n\teven if they are defined later, the array must be allocated."
<< "\n\tgood bye. Have a nice debuging." << endl;
<< "\n\tgood bye. Have a nice debuging." << G4endl;
exit(-1);
};
//mnbralias = 0;
@@ -443,7 +443,7 @@ void G4NURBS::Conscheck() const
<< G4NURBS::Tochar(dir)
<< " direction."
<< "\n\tgood bye. Have a nice debuging."
<< endl;
<< G4endl;
exit(-1);
};
@@ -495,7 +495,7 @@ void G4NURBS::Conscheck() const
<< flag
<< " knots vector)"
<< "\n\tgood bye. Have a nice debuging."
<< endl;
<< G4endl;
exit(-1);
};
//m[dir].nbralias = 0;
@@ -541,7 +541,7 @@ void G4NURBS::Conscheck() const
// and as it's very strange to copy a nurbs in G4
// we issue a warning :
G4cerr << "\nWARNING: G4NURBS::G4NURBS(const G4NURBS &) used" << endl;
G4cerr << "\nWARNING: G4NURBS::G4NURBS(const G4NURBS &) used" << G4endl;
} // end of G4NURBS::G4NURBS(const G4NURBS &)
+2 -2
View File
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4NURBSbox.cc,v 1.2.8.1 1999/12/07 20:48:54 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
// $Id: G4NURBSbox.cc,v 1.3 1999/12/15 14:50:35 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
//
//
// Olivier Crumeyrolle 12 September 1996
+2 -2
View File
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4NURBScylinder.cc,v 1.2.8.1 1999/12/07 20:48:54 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
// $Id: G4NURBScylinder.cc,v 1.3 1999/12/15 14:50:35 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
//
//
// Olivier Crumeyrolle 12 September 1996
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4NURBShexahedron.cc,v 1.2.8.1 1999/12/07 20:48:55 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
// $Id: G4NURBShexahedron.cc,v 1.3 1999/12/15 14:50:36 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
//
// hexahedron implementation
// OC 17 9 96
+2 -2
View File
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4NURBStube.cc,v 1.2.8.1 1999/12/07 20:48:55 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
// $Id: G4NURBStube.cc,v 1.3 1999/12/15 14:50:36 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
//
//
// Olivier Crumeyrolle 12 September 1996
+10 -14
View File
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4NURBStubesector.cc,v 1.3.8.1 1999/12/07 20:48:55 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
// $Id: G4NURBStubesector.cc,v 1.4 1999/12/15 14:50:36 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
//
//
// Olivier Crumeyrolle 12 September 1996
@@ -20,12 +20,8 @@
//#include <math.h>
// cf cylinder
// for ostrstream
#ifdef WIN32
# include <Strstrea.h>
#else
# include <strstream.h>
#endif
// for G4std::ostrstream
#include "g4std/strstream"
G4NURBStubesector::G4NURBStubesector(G4double r, G4double R, G4double DZ, G4double PHI1, G4double PHI2)
@@ -162,7 +158,7 @@
<< "\nERROR: G4NURBStubesector::G4NURBStubesector: wrong index,"
<< i << " instead of " << (mtotnbrCtrlPts - 10)
<< "\n\tIt sounds very strange. The tubesector won't be correct. Have a nice debuging!"
<< endl;
<< G4endl;
};
CP(mpCtrlPts[i++] , cp2*mr, sp2*mr, 0, 1);
@@ -182,7 +178,7 @@
// creating the nurbs identity
mpwhoami = new char [200];
ostrstream tmpstr(mpwhoami, 200);
G4std::ostrstream tmpstr(mpwhoami, 200);
tmpstr << "Tubs" << " \tPHI1=" << PHI1 << " ; PHI2=" << PHI2 << '\0';
// could be more sophisticated, reallocating
// mpwhoami to the exact length
@@ -216,10 +212,10 @@ G4NURBStubesector::t_inddCtrlPt G4NURBStubesector::DecideNbrCtrlPts(G4double PHI
while (deltaPHI <= 0) { PHI2 += 2*M_PI; deltaPHI += 2*M_PI; };
G4double k = deltaPHI / (M_PI_2);
// G4cerr << " k " << k << endl;
// G4cerr << " fk " << floor(k) << endl;
// G4cerr << " ifk " << ((int)(floor(k))) << endl;
// G4cerr << " n " << (2*((int)(floor(k))) + 7) << endl;
// G4cerr << " k " << k << G4endl;
// G4cerr << " fk " << floor(k) << G4endl;
// G4cerr << " ifk " << ((int)(floor(k))) << G4endl;
// G4cerr << " n " << (2*((int)(floor(k))) + 7) << G4endl;
return ( 2*((int)(floor(k))) + 7 );
}
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4PlacedPolyhedron.cc,v 1.1.6.1 1999/12/07 20:48:55 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
// $Id: G4PlacedPolyhedron.cc,v 1.2 1999/12/15 14:50:36 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
#include "G4PlacedPolyhedron.hh"
+3 -3
View File
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4Point3DList.cc,v 1.2.8.1 1999/12/07 20:48:55 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
// $Id: G4Point3DList.cc,v 1.3 1999/12/15 14:50:36 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
//
//
// John Allison July 1995
@@ -17,7 +17,7 @@
G4Point3DList::~G4Point3DList () {}
ostream& operator << (ostream& os, const G4Point3DList& points)
G4std::ostream& operator << (G4std::ostream& os, const G4Point3DList& points)
{
os << "G4Point3DList[" << points.entries() << "]: ";
for (int i = 0; i < points.entries(); i++) os << points(i);
+81 -29
View File
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4Polyhedron.cc,v 1.4.6.1 1999/12/07 20:48:55 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
// $Id: G4Polyhedron.cc,v 1.7 2000/01/11 17:35:09 johna Exp $
// GEANT4 tag $Name: geant4-01-01 $
//
//
//
@@ -37,24 +37,24 @@
* Function: Print contents of G4 polyhedron *
* *
***********************************************************************/
ostream& operator<<(ostream &ostr, const G4Facet &facet) {
G4std::ostream& operator<<(G4std::ostream &ostr, const G4Facet &facet) {
for (G4int k=0; k<4; k++) {
ostr << " " << facet.edge[k].v << "/" << facet.edge[k].f;
}
return ostr;
}
ostream& operator<<(ostream &ostr, const G4Polyhedron &ph) {
G4std::ostream& operator<<(G4std::ostream &ostr, const G4Polyhedron &ph) {
G4int i;
ostr << endl;
ostr << "Nverteces=" << ph.nvert << ", Nfacets=" << ph.nface << endl;
ostr << G4endl;
ostr << "Nverteces=" << ph.nvert << ", Nfacets=" << ph.nface << G4endl;
for (i=1; i<=ph.nvert; i++) {
ostr << "xyz(" << i << ")=" <<
ph.pV[i].x() << ' ' << ph.pV[i].y() << ' ' << ph.pV[i].z() << endl;
ph.pV[i].x() << ' ' << ph.pV[i].y() << ' ' << ph.pV[i].z() << G4endl;
}
for (i=1; i<=ph.nface; i++) {
ostr << "face(" << i << ")=" << ph.pF[i] << endl;
ostr << "face(" << i << ")=" << ph.pF[i] << G4endl;
}
return ostr;
}
@@ -235,7 +235,7 @@ void G4Polyhedron::SetNumberOfRotationSteps(G4int n)
if (n < nMin) {
n = nMin;
G4cout << "G4Polyhedron::SetNumberOfRotationSteps: attempt to set the"
"\nnumber of steps per circle < " << nMin << "; forced to " << n << endl;
"\nnumber of steps per circle < " << nMin << "; forced to " << n << G4endl;
}
fNumberOfRotationSteps = n;
}
@@ -649,7 +649,7 @@ void G4Polyhedron::RotateAroundZ(G4int nstep, G4double phi, G4double dphi,
if (k-1 != nface) {
G4cerr << "Polyhedron::RotateAroundZ: number of generated faces ("
<< k-1 << ") is not equal to the number of allocated faces ("
<< nface << ")" << endl;
<< nface << ")" << G4endl;
}
}
@@ -700,8 +700,8 @@ void G4Polyhedron::SetReferences()
i2 = (iedge < nedge-1) ? iedge+1 : 0;
i1 = abs(pF[iface].edge[i1].v);
i2 = abs(pF[iface].edge[i2].v);
k1 = min(i1,i2);
k2 = max(i1,i2);
k1 = G4std::min(i1,i2);
k2 = G4std::max(i1,i2);
// check head of the List corresponding to k1
cur = headList[k1];
@@ -729,7 +729,7 @@ void G4Polyhedron::SetReferences()
<< iface << "/" << iedge << "/"
<< pF[iface].edge[iedge].v << " and "
<< cur->iface << "/" << cur->iedge << "/"
<< pF[cur->iface].edge[cur->iedge].v << endl;
<< pF[cur->iface].edge[cur->iedge].v << G4endl;
}
continue;
}
@@ -762,7 +762,7 @@ void G4Polyhedron::SetReferences()
<< iface << "/" << iedge << "/"
<< pF[iface].edge[iedge].v << " and "
<< cur->iface << "/" << cur->iedge << "/"
<< pF[cur->iface].edge[cur->iedge].v << endl;
<< pF[cur->iface].edge[cur->iedge].v << G4endl;
}
break;
}
@@ -775,7 +775,7 @@ void G4Polyhedron::SetReferences()
for (i=0; i<nvert; i++) {
if (headList[i] != 0) {
G4cerr << "Polyhedron::SetReferences: List " << i << " is not empty"
<< endl;
<< G4endl;
}
}
@@ -785,6 +785,57 @@ void G4Polyhedron::SetReferences()
delete [] headList;
}
void G4Polyhedron::InvertFacets()
/***********************************************************************
* *
* Name: G4Polyhedron::InvertFacets Date: 01.12.99 *
* Author: E.Chernyaev Revised: *
* *
* Function: Invert the order of the nodes in the facets *
* *
***********************************************************************/
{
if (nface <= 0) return;
G4int i, k, nnode, v[4],f[4];
for (i=1; i<=nface; i++) {
nnode = (pF[i].edge[3].v == 0) ? 3 : 4;
for (k=0; k<nnode; k++) {
v[k] = (k+1 == nnode) ? pF[i].edge[0].v : pF[i].edge[k+1].v;
if (v[k] * pF[i].edge[k].v < 0) v[k] = -v[k];
f[k] = pF[i].edge[k].f;
}
for (k=0; k<nnode; k++) {
pF[i].edge[nnode-1-k].v = v[k];
pF[i].edge[nnode-1-k].f = f[k];
}
}
}
G4Polyhedron & G4Polyhedron::Transform(const G4Transform3D &t)
/***********************************************************************
* *
* Name: G4Polyhedron::Transform Date: 01.12.99 *
* Author: E.Chernyaev Revised: *
* *
* Function: Make transformation of the polyhedron *
* *
***********************************************************************/
{
if (nvert > 0) {
for (G4int i=1; i<=nvert; i++) { pV[i] = t * pV[i]; }
// C H E C K D E T E R M I N A N T A N D
// I N V E R T F A C E T S I F I T I S N E G A T I V E
G4Vector3D d = t * G4Vector3D(0,0,0);
G4Vector3D x = t * G4Vector3D(1,0,0) - d;
G4Vector3D y = t * G4Vector3D(0,1,0) - d;
G4Vector3D z = t * G4Vector3D(0,0,1) - d;
if ((x.cross(y))*z < 0) InvertFacets();
}
return *this;
}
G4bool G4Polyhedron::GetNextVertexIndex(G4int &index, G4int &edgeFlag) const
/***********************************************************************
* *
@@ -824,7 +875,7 @@ G4Point3D G4Polyhedron::GetVertex(G4int index) const
***********************************************************************/
{
if (index <= 0 || index > nvert){
G4cerr << "Error: irrelevant vertex label " << index << endl;
G4cerr << "Error: irrelevant vertex label " << index << G4endl;
return G4Point3D();
}
return pV[index];
@@ -1088,10 +1139,10 @@ G4PolyhedronCons::G4PolyhedronCons(G4double Rmn1, G4double Rmx1,
if ((k & 1) != 0) G4cerr << " (radiuses)";
if ((k & 2) != 0) G4cerr << " (half-length)";
if ((k & 4) != 0) G4cerr << " (angles)";
G4cerr << endl;
G4cerr << G4endl;
G4cerr << " Rmn1=" << Rmn1 << " Rmx1=" << Rmx1;
G4cerr << " Rmn2=" << Rmn2 << " Rmx2=" << Rmx2;
G4cerr << " Dz=" << Dz << " Phi1=" << Phi1 << " Dphi=" << Dphi << endl;
G4cerr << " Dz=" << Dz << " Phi1=" << Phi1 << " Dphi=" << Dphi << G4endl;
return;
}
@@ -1140,19 +1191,19 @@ G4PolyhedronPgon::G4PolyhedronPgon(G4double phi,
// C H E C K I N P U T P A R A M E T E R S
if (dphi <= 0. || dphi > 2*M_PI) {
G4cerr << "G4PolyhedronPgon/Pcon: wrong delta phi = " << dphi << endl;
G4cerr << "G4PolyhedronPgon/Pcon: wrong delta phi = " << dphi << G4endl;
return;
}
if (nz < 2) {
G4cerr << "G4PolyhedronPgon/Pcon: number of z-planes less than two = " << nz
<< endl;
<< G4endl;
return;
}
if (npdv < 0) {
G4cerr << "G4PolyhedronPgon/Pcon: error in number of phi-steps =" << npdv
<< endl;
<< G4endl;
return;
}
@@ -1160,7 +1211,7 @@ G4PolyhedronPgon::G4PolyhedronPgon(G4double phi,
for (i=0; i<nz; i++) {
if (rmin[i] < 0. || rmax[i] < 0. || rmin[i] > rmax[i]) {
G4cerr << "G4PolyhedronPgon: error in radiuses rmin[" << i << "]="
<< rmin[i] << " rmax[" << i << "]=" << rmax[i] << endl;
<< rmin[i] << " rmax[" << i << "]=" << rmax[i] << G4endl;
return;
}
}
@@ -1218,29 +1269,29 @@ G4PolyhedronSphere::G4PolyhedronSphere(G4double rmin, G4double rmax,
// C H E C K I N P U T P A R A M E T E R S
if (dphi <= 0. || dphi > 2*M_PI) {
G4cerr << "G4PolyhedronSphere: wrong delta phi = " << dphi << endl;
G4cerr << "G4PolyhedronSphere: wrong delta phi = " << dphi << G4endl;
return;
}
if (the < 0. || the > M_PI) {
G4cerr << "G4PolyhedronSphere: wrong theta = " << the << endl;
G4cerr << "G4PolyhedronSphere: wrong theta = " << the << G4endl;
return;
}
if (dthe <= 0. || dthe > M_PI) {
G4cerr << "G4PolyhedronSphere: wrong delta theta = " << dthe << endl;
G4cerr << "G4PolyhedronSphere: wrong delta theta = " << dthe << G4endl;
return;
}
if (the+dthe > M_PI) {
G4cerr << "G4PolyhedronSphere: wrong theta + delta theta = "
<< the << " " << dthe << endl;
<< the << " " << dthe << G4endl;
return;
}
if (rmin < 0. || rmin >= rmax) {
G4cerr << "G4PolyhedronSphere: error in radiuses"
<< " rmin=" << rmin << " rmax=" << rmax << endl;
<< " rmin=" << rmin << " rmax=" << rmax << G4endl;
return;
}
@@ -1248,6 +1299,7 @@ G4PolyhedronSphere::G4PolyhedronSphere(G4double rmin, G4double rmax,
G4int ns = (GetNumberOfRotationSteps() + 1) / 2;
G4int np1 = G4int(dthe*ns/M_PI+.5) + 1;
if (np1 <= 1) np1 = 2;
G4int np2 = rmin < perMillion ? 1 : np1;
G4double *zz, *rr;
@@ -1301,14 +1353,14 @@ G4PolyhedronTorus::G4PolyhedronTorus(G4double rmin, G4double rmax,
// C H E C K I N P U T P A R A M E T E R S
if (dphi <= 0. || dphi > 2*M_PI) {
G4cerr << "G4PolyhedronTorus: wrong delta phi = " << dphi << endl;
G4cerr << "G4PolyhedronTorus: wrong delta phi = " << dphi << G4endl;
return;
}
if (rmin < 0. || rmin >= rmax || rmax >= rtor) {
G4cerr << "G4PolyhedronTorus: error in radiuses"
<< " rmin=" << rmin << " rmax=" << rmax
<< " rtorus=" << rtor << endl;
<< " rtorus=" << rtor << G4endl;
return;
}
+3 -3
View File
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4Polyline.cc,v 1.3.8.1 1999/12/07 20:48:55 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
// $Id: G4Polyline.cc,v 1.4 1999/12/15 14:50:36 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
//
//
// John Allison July 1995
@@ -31,7 +31,7 @@ G4Polyline & G4Polyline::operator = (const G4Polyline &right) {
return *this;
}
ostream& operator << (ostream& os, const G4Polyline& line) {
G4std::ostream& operator << (G4std::ostream& os, const G4Polyline& line) {
os << "G4Polyline: ";
os << '\n' << (G4VVisPrim) line;
os << '\n' << (G4Point3DList) line;
+3 -3
View File
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4Polymarker.cc,v 1.4.8.1 1999/12/07 20:48:55 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
// $Id: G4Polymarker.cc,v 1.5 1999/12/15 14:50:36 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
//
//
// John Allison November 1996
@@ -36,7 +36,7 @@ G4Polymarker & G4Polymarker::operator = (const G4Polymarker &right) {
return *this;
}
ostream& operator << (ostream& os, const G4Polymarker& marker) {
G4std::ostream& operator << (G4std::ostream& os, const G4Polymarker& marker) {
os << "G4Polymarker: type: ";
switch (marker.fMarkerType) {
case G4Polymarker::line:
+2 -2
View File
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4Square.cc,v 1.1.8.1 1999/12/07 20:48:56 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
// $Id: G4Square.cc,v 1.2 1999/12/15 14:50:36 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
//
//
+2 -2
View File
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4Text.cc,v 1.3.8.1 1999/12/07 20:48:56 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
// $Id: G4Text.cc,v 1.4 1999/12/15 14:50:36 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
//
//
// John Allison 17/11/96.
+3 -3
View File
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4VMarker.cc,v 1.4.8.1 1999/12/07 20:48:56 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
// $Id: G4VMarker.cc,v 1.5 1999/12/15 14:50:36 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
//
//
@@ -35,7 +35,7 @@ G4VMarker& G4VMarker::operator = (const G4VMarker& right) {
return *this;
}
ostream& operator << (ostream& os, const G4VMarker& marker) {
G4std::ostream& operator << (G4std::ostream& os, const G4VMarker& marker) {
os << "G4VMarker: position: " << marker.fPosition
<< ", world size: " << marker.fWorldSize
<< ", screen size: " << marker.fScreenSize << '\n'
+3 -3
View File
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4VVisPrim.cc,v 1.4.8.1 1999/12/07 20:48:56 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
// $Id: G4VVisPrim.cc,v 1.5 1999/12/15 14:50:36 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
//
//
// John Allison August 1995
@@ -35,6 +35,6 @@ G4bool G4VVisPrim::operator == (const G4VVisPrim& right) const{
return G4Visible::operator == (right);
}
ostream& operator << (ostream& os, const G4VVisPrim& prim) {
G4std::ostream& operator << (G4std::ostream& os, const G4VVisPrim& prim) {
return os << (G4Visible) prim;
}
+3 -3
View File
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4VisAttributes.cc,v 1.4.8.1 1999/12/07 20:48:56 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
// $Id: G4VisAttributes.cc,v 1.5 1999/12/15 14:50:37 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
//
//
// John Allison 23rd October 1996
@@ -52,7 +52,7 @@ fForceDrawingStyle (false)
const G4VisAttributes G4VisAttributes::Invisible = G4VisAttributes (false);
ostream& operator << (ostream& os, const G4VisAttributes& a) {
G4std::ostream& operator << (G4std::ostream& os, const G4VisAttributes& a) {
os << "G4VisAttributes: ";
if (&a){
+3 -3
View File
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4VisExtent.cc,v 1.3.8.1 1999/12/07 20:48:56 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
// $Id: G4VisExtent.cc,v 1.4 1999/12/15 14:50:37 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
//
//
// A.Walkden 28/11/95
@@ -50,7 +50,7 @@ G4double G4VisExtent::GetExtentRadius () const {
((fZmax - fZmin) * (fZmax - fZmin))) / 2.;
}
ostream& operator << (ostream& os, const G4VisExtent& e) {
G4std::ostream& operator << (G4std::ostream& os, const G4VisExtent& e) {
os << "G4VisExtent (bounding box):";
os << "\n X limits: " << e.fXmin << ' ' << e.fXmax;
os << "\n Y limits: " << e.fYmin << ' ' << e.fYmax;
+3 -3
View File
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4Visible.cc,v 1.2.8.1 1999/12/07 20:48:56 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
// $Id: G4Visible.cc,v 1.3 1999/12/15 14:50:37 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
//
//
// John Allison 30th October 1996
@@ -28,7 +28,7 @@ G4bool G4Visible::operator == (const G4Visible& right) const{
return fpVisAttributes == right.fpVisAttributes;
}
ostream& operator << (ostream& os, const G4Visible& v) {
G4std::ostream& operator << (G4std::ostream& os, const G4Visible& v) {
if (v.fpVisAttributes) return os << *(v.fpVisAttributes);
else return os << "No Visualization Attributes";
}