Skip to content

Commit 60d3422

Browse files
committed
Import Geant4 0.0.4 source tree
1 parent 66d60cf commit 60d3422

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+1629
-443
lines changed

source/geometry/management/include/G4AffineTransform.icc

+3-3
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
// based on the Program) you indicate your acceptance of this statement,
66
// and all its terms.
77
//
8-
// $Id: G4AffineTransform.icc,v 2.1 1998/11/11 11:34:07 japost Exp $
9-
// GEANT4 tag $Name: geant4-00 $
8+
// $Id: G4AffineTransform.icc,v 1.2 1999/03/18 18:31:39 japost Exp $
9+
// GEANT4 tag $Name: geommng-01-00-02 $
1010
//
1111
//
1212
// G4AffineTransformation Inline implementation
@@ -162,7 +162,7 @@ G4AffineTransform::InverseProduct( const G4AffineTransform& tf1,
162162
rzz=tf1.rzx*tf2.rzx+tf1.rzy*tf2.rzy+tf1.rzz*tf2.rzz;
163163

164164
tx=tf1.tx*tf2.rxx+tf1.ty*tf2.rxy+tf1.tz*tf2.rxz+itf2tx;
165-
ty=tf1.tx*tf2.ryx+tf1.ty*tf2.ryy+tf1.tz*tf2.rzy+itf2ty;
165+
ty=tf1.tx*tf2.ryx+tf1.ty*tf2.ryy+tf1.tz*tf2.ryz+itf2ty;
166166
tz=tf1.tx*tf2.rzx+tf1.ty*tf2.rzy+tf1.tz*tf2.rzz+itf2tz;
167167

168168
return *this;

source/geometry/management/include/G4LogicalVolume.hh

+14-2
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
// based on the Program) you indicate your acceptance of this statement,
66
// and all its terms.
77
//
8-
// $Id: G4LogicalVolume.hh,v 2.1 1998/11/11 11:20:28 japost Exp $
9-
// GEANT4 tag $Name: geant4-00 $
8+
// $Id: G4LogicalVolume.hh,v 1.2 1999/02/15 10:58:13 japost Exp $
9+
// GEANT4 tag $Name: geommng-01-00-02 $
1010
//
1111
//
1212
// class G4LogicalVolume
@@ -104,6 +104,11 @@
104104
// void SetVoxelHeader(G4VoxelHeader *pVoxel)
105105
// Sets VoxelHeader.
106106
//
107+
// G4double GetSmartless()
108+
// Gets user defined optimisation quality
109+
// void SetSmartless(G4double)
110+
// Sets user defined optimisation quality
111+
//
107112
// void BecomeEnvelopeForFastSimulation(G4FastSimulationManager* );
108113
// Makes this an Envelope for given FastSimulationManager.
109114
// Ensures that all its daughter volumes get it too - unless they
@@ -151,6 +156,8 @@
151156
// Pointer (possibly NULL) to user Step limit object for this node
152157
// G4VoxelHeader *fVoxel
153158
// Pointer (possibly NULL) to optimisation info objects
159+
// G4double smartless
160+
// Quality for optimisation, average number of voxels to be spent per content
154161
// G4FastSimulationManager *fFastSimulationManager
155162
// Pointer (possibly NULL) to G4FastSimulationManager object
156163
// G4bool fIsEnvelope
@@ -159,6 +166,7 @@
159166
// weight used in the event biasing technique
160167
//
161168
// History:
169+
// 12.02.99 S.Giani: Added user defined optimisation quality
162170
// 09.11.98 J. Apostolakis: Changed G4MagneticField to G4FieldManager
163171
// 09.11.98 M. Verderi & JA. : added BiasWeight member and Get/Set methods
164172
// 10.20.97 P. MoraDeFreitas : added pointer to a FastSimulation
@@ -223,6 +231,9 @@ public:
223231
G4SmartVoxelHeader* GetVoxelHeader() const;
224232
void SetVoxelHeader(G4SmartVoxelHeader *pVoxel);
225233

234+
G4double GetSmartless();
235+
void SetSmartless(G4double s);
236+
226237
G4bool operator == ( const G4LogicalVolume& lv) const;
227238

228239
const G4VisAttributes* GetVisAttributes () const;
@@ -252,6 +263,7 @@ private:
252263
G4VSolid *fSolid;
253264
G4UserLimits *fUserLimits;
254265
G4SmartVoxelHeader *fVoxel;
266+
G4double fSmartless;
255267
const G4VisAttributes* fVisAttributes;
256268
G4FastSimulationManager *fFastSimulationManager;
257269
G4bool fIsEnvelope;

source/geometry/management/include/G4LogicalVolume.icc

+13-2
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,16 @@
55
// based on the Program) you indicate your acceptance of this statement,
66
// and all its terms.
77
//
8-
// $Id: G4LogicalVolume.icc,v 2.1 1998/11/18 13:58:59 japost Exp $
9-
// GEANT4 tag $Name: geant4-00 $
8+
// $Id: G4LogicalVolume.icc,v 1.2 1999/02/15 10:58:13 japost Exp $
9+
// GEANT4 tag $Name: geommng-01-00-02 $
1010
//
1111
//
1212
// class G4LogicalVolume Inline Implementation file
1313
//
1414
// 10.20.97 - P. MoraDeFreitas : Added SetFastSimulation method.
1515
// 05.11.98 - M. Verderi: Add Get/Set methods for fBiasWeight
1616
// 09.11.98 - J. Apostolakis: Changed MagneticField to FieldManager
17+
// 12.02.99 - S.Giani: Added set/get methods for voxelization quality
1718

1819
inline G4String G4LogicalVolume::GetName() const
1920
{
@@ -149,6 +150,16 @@ inline void G4LogicalVolume::SetVoxelHeader(G4SmartVoxelHeader *pVoxel)
149150
{
150151
fVoxel=pVoxel;
151152
}
153+
154+
inline G4double G4LogicalVolume::GetSmartless()
155+
{
156+
return fSmartless;
157+
}
158+
159+
inline void G4LogicalVolume::SetSmartless(G4double s)
160+
{
161+
fSmartless=s;
162+
}
152163

153164
inline G4bool G4LogicalVolume::operator == ( const G4LogicalVolume& lv) const
154165
{

source/geometry/management/include/voxeldefs.hh

+4-3
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,15 @@
55
// based on the Program) you indicate your acceptance of this statement,
66
// and all its terms.
77
//
8-
// $Id: voxeldefs.hh,v 2.0 1998/07/02 16:57:19 gunter Exp $
9-
// GEANT4 tag $Name: geant4-00 $
8+
// $Id: voxeldefs.hh,v 1.2 1999/02/15 11:14:01 japost Exp $
9+
// GEANT4 tag $Name: geommng-01-00-02 $
1010
//
1111

1212
//
1313
// Voxel Optimisation Constants
1414
//
1515
// History:
16+
// 12.02.99 S.Giani made numerical values consistent with Geant3.21
1617
// 13.08.95 P.Kent Created separate file
1718

1819
#ifndef VOXELDEFS_HH
@@ -21,7 +22,7 @@
2122
#include "globals.hh"
2223

2324
// Hard limit on no. voxel nodes per given header
24-
const G4int kMaxVoxelNodes=2000;// Geant 3.21 uses 1000
25+
const G4int kMaxVoxelNodes=1000; // PK chose 2000, Geant 3.21 used 1000
2526

2627
const G4int kMinVoxelVolumesLevel1=2; // Only begin to make voxels if >=
2728
// this no of daughters

source/geometry/management/src/G4LogicalVolume.cc

+4-3
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,14 @@
55
// based on the Program) you indicate your acceptance of this statement,
66
// and all its terms.
77
//
8-
// $Id: G4LogicalVolume.cc,v 2.1 1998/11/11 11:38:21 japost Exp $
9-
// GEANT4 tag $Name: geant4-00 $
8+
// $Id: G4LogicalVolume.cc,v 1.2 1999/02/15 10:58:17 japost Exp $
9+
// GEANT4 tag $Name: geommng-01-00-02 $
1010
//
1111
//
1212
// class G4LogicalVolume Implementation
1313
//
1414
// History:
15+
// 12.02.99 S.Giani: Deafult initialization of voxelization quality.
1516
// 10.20.97 - P. MoraDeFreitas : "Fast" replaces "Parameterisation" in
1617
// class/method names. (release B.00 for parameterisation).
1718
// 04.08.97 P.MoraDeFreitas/J.A. Added methods for ParameterisedSimulation
@@ -28,7 +29,7 @@ G4LogicalVolume::G4LogicalVolume( G4VSolid *pSolid, G4Material *pMaterial,
2829
G4FieldManager *pFieldMgr,
2930
G4VSensitiveDetector *pSDetector,
3031
G4UserLimits *pULimits) :
31-
fDaughters(0), fVoxel(0), fVisAttributes (0) , fFastSimulationManager (0),
32+
fDaughters(0), fVoxel(0), fSmartless(2.), fVisAttributes (0) , fFastSimulationManager (0),
3233
fIsEnvelope(FALSE), fFieldManager(pFieldMgr)
3334
{
3435
SetSolid(pSolid);

source/geometry/management/src/G4SmartVoxelHeader.cc

+24-8
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
// based on the Program) you indicate your acceptance of this statement,
66
// and all its terms.
77
//
8-
// $Id: G4SmartVoxelHeader.cc,v 2.1 1998/11/11 11:38:22 japost Exp $
9-
// GEANT4 tag $Name: geant4-00 $
8+
// $Id: G4SmartVoxelHeader.cc,v 1.3 1999/02/15 10:54:22 japost Exp $
9+
// GEANT4 tag $Name: geommng-01-00-02 $
1010
//
1111
//
1212
// class G4SmartVoxelHeader
@@ -16,6 +16,8 @@
1616
// Define G4GEOMETRY_VOXELDEBUG for debugging information on G4cout
1717
//
1818
// History:
19+
// 12.02.99 Introduction of new quality/smartless: max for (slices/candid) S.G.
20+
// 11.02.99 Voxels at lower levels are now built for collapsed slices S.G.
1921
// 21.07.95 Full implementation, supporting non divided physical volumes
2022
// 14.07.95 Initial version - stubb definitions only
2123

@@ -409,7 +411,7 @@ void G4SmartVoxelHeader::BuildVoxelsWithinLimits(G4LogicalVolume* pVolume,
409411
BuildEquivalentSliceNos();
410412
CollectEquivalentNodes(); // Collect common nodes
411413
RefineNodes(pVolume,pLimits); // Refine nodes creating headers
412-
CollectEquivalentHeaders(); // Collect any common headers
414+
// No common headers can exist because collapsed by construction
413415
}
414416

415417
// Destructor - Delete all proxies and underlying objects
@@ -779,10 +781,23 @@ G4ProxyVector* G4SmartVoxelHeader::BuildNodes(G4LogicalVolume* pVolume,
779781
//
780782
// mother width/half min daughter width +1
781783
G4double noNodesExactD=((motherMaxExtent-motherMinExtent)*2.0/minWidth)+1.0;
782-
G4int noNodesExactI=G4int (noNodesExactD);
783784

784-
G4int noNodes=((noNodesExactD-noNodesExactI)>=0.5) ? noNodesExactI+1 : noNodesExactI;
785+
// Compare with "smartless quality", i.e. the average number of slices used per
786+
// contained volume:
785787

788+
G4double smartlessComputed = noNodesExactD / nCandidates;
789+
790+
G4double smartlessUser = pVolume->GetSmartless();
791+
792+
G4double smartless = (smartlessComputed <= smartlessUser) ?
793+
smartlessComputed : smartlessUser ;
794+
795+
G4double noNodesSmart = smartless * nCandidates;
796+
797+
G4int noNodesExactI = G4int(noNodesSmart);
798+
799+
G4int noNodes = ((noNodesSmart-noNodesExactI)>=0.5) ?
800+
noNodesExactI + 1 : noNodesExactI ;
786801
//
787802
//
788803

@@ -1043,10 +1058,8 @@ void G4SmartVoxelHeader::RefineNodes(G4LogicalVolume* pVolume,
10431058
delete targetNode;
10441059

10451060
// Create new headers + proxies and replace in fslices
1046-
for (replaceNo=minNo;replaceNo<=maxNo;replaceNo++)
1047-
{
10481061
newLimits=pLimits;
1049-
newLimits.AddLimit(faxis,fminExtent+sliceWidth*replaceNo,fminExtent+sliceWidth*(replaceNo+1));
1062+
newLimits.AddLimit(faxis,fminExtent+sliceWidth*minNo,fminExtent+sliceWidth*(maxNo+1));
10501063
replaceHeader=new G4SmartVoxelHeader(pVolume,newLimits,targetList,replaceNo);
10511064
if (!replaceHeader)
10521065
{
@@ -1059,6 +1072,9 @@ void G4SmartVoxelHeader::RefineNodes(G4LogicalVolume* pVolume,
10591072
{
10601073
G4Exception("G4SmartVoxelHeader::RefineNodes - Refined VoxelProxy new failed");
10611074
}
1075+
for (replaceNo=minNo;replaceNo<=maxNo;replaceNo++)
1076+
{
1077+
10621078
fslices(replaceNo)=replaceHeaderProxy;
10631079
}
10641080
// Finished replacing current `equivalent' group

source/geometry/solids/BREPS/include/G4BREPSolidPCone.hh

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
// and all its terms.
77
//
88
// $Id: G4BREPSolidPCone.hh,v 1.2 1999/01/27 16:15:08 broglia Exp $
9-
// GEANT4 tag $Name: breps-01-00-01 $
9+
// GEANT4 tag $Name: geomsolids-01-00-01 $
1010
//
1111
//
1212
// The polyconical solid G4BREPSolidPCone is a shape defined by a set of

source/geometry/solids/BREPS/include/G4BREPSolidPolyhedra.hh

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
// and all its terms.
77
//
88
// $Id: G4BREPSolidPolyhedra.hh,v 1.2 1999/01/27 16:15:08 broglia Exp $
9-
// GEANT4 tag $Name: breps-01-00-01 $
9+
// GEANT4 tag $Name: geomsolids-01-00-01 $
1010
//
1111
//
1212
// The polygonal solid G4BREPSolidPolyhedra is a shape defined by an inner

source/geometry/solids/BREPS/include/G4BSplineCurve.hh

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
// and all its terms.
77
//
88
// $Id: G4BSplineCurve.hh,v 1.3 1999/01/19 10:12:56 broglia Exp $
9-
// GEANT4 tag $Name: breps-01-00-01 $
9+
// GEANT4 tag $Name: geomsolids-01-00-01 $
1010
//
1111
#ifndef __BSPLINECURVE_H
1212
#define __BSPLINECURVE_H

source/geometry/solids/BREPS/include/G4CircularCurve.hh

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
// and all its terms.
77
//
88
// $Id: G4CircularCurve.hh,v 1.2 1999/01/14 15:59:57 broglia Exp $
9-
// GEANT4 tag $Name: breps-01-00-01 $
9+
// GEANT4 tag $Name: geomsolids-01-00-01 $
1010
//
1111
#ifndef __CIRCULARCURVE_H
1212
#define __CIRCULARCURVE_H

source/geometry/solids/BREPS/include/G4Curve.hh

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
// and all its terms.
77
//
88
// $Id: G4Curve.hh,v 1.2 1999/01/14 16:01:07 broglia Exp $
9-
// GEANT4 tag $Name: breps-01-00-01 $
9+
// GEANT4 tag $Name: geomsolids-01-00-01 $
1010
//
1111
#ifndef __CURVE_H
1212
#define __CURVE_H

source/geometry/solids/BREPS/include/G4Ellipse.hh

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
// and all its terms.
77
//
88
// $Id: G4Ellipse.hh,v 1.2 1999/01/14 16:01:08 broglia Exp $
9-
// GEANT4 tag $Name: breps-01-00-01 $
9+
// GEANT4 tag $Name: geomsolids-01-00-01 $
1010
//
1111
#ifndef __ELLIPTICCURVE_H
1212
#define __ELLIPTICCURVE_H

source/geometry/solids/BREPS/include/G4FConicalSurface.hh

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
// and all its terms.
77
//
88
// $Id: G4FConicalSurface.hh,v 1.2 1999/01/27 16:11:57 broglia Exp $
9-
// GEANT4 tag $Name: breps-01-00-01 $
9+
// GEANT4 tag $Name: geomsolids-01-00-01 $
1010
//
1111
#ifndef __FCONIC_H
1212
#define __FCONIC_H

source/geometry/solids/BREPS/include/G4FCylindricalSurface.hh

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
// and all its terms.
77
//
88
// $Id: G4FCylindricalSurface.hh,v 1.3 1999/01/27 16:11:58 broglia Exp $
9-
// GEANT4 tag $Name: breps-01-00-01 $
9+
// GEANT4 tag $Name: geomsolids-01-00-01 $
1010
//
1111
#ifndef __FCYLINDER_H
1212
#define __FCYLINDER_H

source/geometry/solids/BREPS/include/G4FPlane.hh

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
// and all its terms.
77
//
88
// $Id: G4FPlane.hh,v 1.3 1999/01/27 16:13:09 broglia Exp $
9-
// GEANT4 tag $Name: breps-01-00-01 $
9+
// GEANT4 tag $Name: geomsolids-01-00-01 $
1010
//
1111
// L. Broglia
1212
//

source/geometry/solids/BREPS/include/G4Hyperbola.hh

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
// and all its terms.
77
//
88
// $Id: G4Hyperbola.hh,v 1.2 1999/01/14 16:01:08 broglia Exp $
9-
// GEANT4 tag $Name: breps-01-00-01 $
9+
// GEANT4 tag $Name: geomsolids-01-00-01 $
1010
//
1111
#ifndef __HYPERBOLICCURVE_H
1212
#define __HYPERBOLICCURVE_H

source/geometry/solids/BREPS/include/G4Line.hh

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
// and all its terms.
77
//
88
// $Id: G4Line.hh,v 1.2 1999/01/14 16:05:26 broglia Exp $
9-
// GEANT4 tag $Name: breps-01-00-01 $
9+
// GEANT4 tag $Name: geomsolids-01-00-01 $
1010
//
1111
#ifndef __LINE_H
1212
#define __LINE_H

source/geometry/solids/BREPS/include/G4Parabola.hh

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
// and all its terms.
77
//
88
// $Id: G4Parabola.hh,v 1.2 1999/01/14 16:01:38 broglia Exp $
9-
// GEANT4 tag $Name: breps-01-00-01 $
9+
// GEANT4 tag $Name: geomsolids-01-00-01 $
1010
//
1111

1212
#ifndef __PARABOLICCURVE_H

0 commit comments

Comments
 (0)