- Timestamp:
- Feb 16, 2009, 10:14:30 AM (17 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 1 deleted
- 365 edited
-
Configure (modified) (16 diffs)
-
Doxyfile (modified) (2 diffs)
-
config/G4VIS_USE.gmk (modified) (2 diffs)
-
config/History (modified) (2 diffs)
-
config/binmake.gmk (modified) (4 diffs)
-
config/sys/Darwin-g++.gmk (modified) (4 diffs)
-
config/sys/Linux-g++.gmk (modified) (4 diffs)
-
config/sys/WIN32-VC.gmk (modified) (2 diffs)
-
documents/UserDoc/DocBookUsersGuides/ChangesHistory/ChangesHistory.html (modified) (1 diff)
-
documents/UserDoc/DocBookUsersGuides/FAQ/xml/BookFAQ.xml (modified) (1 diff)
-
documents/UserDoc/DocBookUsersGuides/FAQ/xml/XSLCustomizationLayer/G4XSLCustomFO.xsl (modified) (1 diff)
-
documents/UserDoc/DocBookUsersGuides/FAQ/xml/XSLCustomizationLayer/G4XSLCustomHTML.xsl (modified) (1 diff)
-
documents/UserDoc/DocBookUsersGuides/ForApplicationDeveloper/output.html (modified) (226 diffs)
-
documents/UserDoc/DocBookUsersGuides/ForApplicationDeveloper/xml/Appendix/Appendix.xml (modified) (1 diff)
-
documents/UserDoc/DocBookUsersGuides/ForApplicationDeveloper/xml/Appendix/AppendixEntityDef.dtd (modified) (1 diff)
-
documents/UserDoc/DocBookUsersGuides/ForApplicationDeveloper/xml/BookForAppliDev.xml (modified) (2 diffs)
-
documents/UserDoc/DocBookUsersGuides/ForApplicationDeveloper/xml/Fundamentals/biasing.xml (modified) (1 diff)
-
documents/UserDoc/DocBookUsersGuides/ForApplicationDeveloper/xml/Fundamentals/classCategory.xml (modified) (1 diff)
-
documents/UserDoc/DocBookUsersGuides/ForApplicationDeveloper/xml/GettingStarted/graphicalUserInterface.xml (modified) (19 diffs)
-
documents/UserDoc/DocBookUsersGuides/ForApplicationDeveloper/xml/GettingStarted/visualization.xml (modified) (2 diffs)
-
documents/UserDoc/DocBookUsersGuides/ForApplicationDeveloper/xml/TrackingAndPhysics/physicsProcess.xml (modified) (21 diffs)
-
documents/UserDoc/DocBookUsersGuides/ForApplicationDeveloper/xml/TrackingAndPhysics/physicsTable.xml (modified) (3 diffs)
-
documents/UserDoc/DocBookUsersGuides/ForApplicationDeveloper/xml/Visualization/commandcontrol.xml (modified) (5 diffs)
-
documents/UserDoc/DocBookUsersGuides/ForApplicationDeveloper/xml/Visualization/introduction.xml (modified) (11 diffs)
-
documents/UserDoc/DocBookUsersGuides/ForApplicationDeveloper/xml/Visualization/makingamovie.xml (modified) (4 diffs)
-
documents/UserDoc/DocBookUsersGuides/ForApplicationDeveloper/xml/Visualization/visdrivers.xml (modified) (19 diffs)
-
documents/UserDoc/DocBookUsersGuides/ForApplicationDeveloper/xml/Visualization/visexecutable.xml (modified) (1 diff)
-
documents/UserDoc/DocBookUsersGuides/ForApplicationDeveloper/xml/XSLCustomizationLayer/G4XSLCustomFO.xsl (modified) (1 diff)
-
documents/UserDoc/DocBookUsersGuides/ForApplicationDeveloper/xml/XSLCustomizationLayer/G4XSLCustomHTML.xsl (modified) (1 diff)
-
documents/UserDoc/DocBookUsersGuides/ForToolkitDeveloper/xml/BookForToolDev.xml (modified) (1 diff)
-
documents/UserDoc/DocBookUsersGuides/ForToolkitDeveloper/xml/GuideToExtendFunctionality/HadronicPhysics/hadronics.xml (modified) (8 diffs)
-
documents/UserDoc/DocBookUsersGuides/ForToolkitDeveloper/xml/GuideToExtendFunctionality/Particles/particles.xml (modified) (2 diffs)
-
documents/UserDoc/DocBookUsersGuides/ForToolkitDeveloper/xml/GuideToExtendFunctionality/Visualization/visualization.xml (modified) (1 diff)
-
documents/UserDoc/DocBookUsersGuides/ForToolkitDeveloper/xml/OOAnalysisDesign/ChapDsgnFunc.xml (modified) (1 diff)
-
documents/UserDoc/DocBookUsersGuides/ForToolkitDeveloper/xml/OOAnalysisDesign/ElectromagneticField/electroMagneticField.xml (modified) (1 diff)
-
documents/UserDoc/DocBookUsersGuides/ForToolkitDeveloper/xml/OOAnalysisDesign/Event/event.xml (modified) (2 diffs)
-
documents/UserDoc/DocBookUsersGuides/ForToolkitDeveloper/xml/OOAnalysisDesign/Geometry/geometry.xml (modified) (3 diffs)
-
documents/UserDoc/DocBookUsersGuides/ForToolkitDeveloper/xml/OOAnalysisDesign/GlobalUsage/globalUsage.xml (modified) (4 diffs)
-
documents/UserDoc/DocBookUsersGuides/ForToolkitDeveloper/xml/OOAnalysisDesign/Hit/hit.xml (modified) (3 diffs)
-
documents/UserDoc/DocBookUsersGuides/ForToolkitDeveloper/xml/OOAnalysisDesign/Materials/materials.xml (modified) (1 diff)
-
documents/UserDoc/DocBookUsersGuides/ForToolkitDeveloper/xml/OOAnalysisDesign/Particles/particles.xml (modified) (3 diffs)
-
documents/UserDoc/DocBookUsersGuides/ForToolkitDeveloper/xml/OOAnalysisDesign/PhysicsProcesses/physicsProcesses.xml (modified) (2 diffs)
-
documents/UserDoc/DocBookUsersGuides/ForToolkitDeveloper/xml/OOAnalysisDesign/Tracking/tracking.xml (modified) (1 diff)
-
documents/UserDoc/DocBookUsersGuides/ForToolkitDeveloper/xml/OOAnalysisDesign/UserInterface/userInterface.xml (modified) (1 diff)
-
documents/UserDoc/DocBookUsersGuides/ForToolkitDeveloper/xml/XSLCustomizationLayer/G4XSLCustomFO.xsl (modified) (1 diff)
-
documents/UserDoc/DocBookUsersGuides/ForToolkitDeveloper/xml/XSLCustomizationLayer/G4XSLCustomHTML.xsl (modified) (1 diff)
-
documents/UserDoc/DocBookUsersGuides/InstallationGuide/xml/BookInstalGuide.xml (modified) (1 diff)
-
documents/UserDoc/DocBookUsersGuides/InstallationGuide/xml/Introduction/introduction.xml (modified) (1 diff)
-
documents/UserDoc/DocBookUsersGuides/InstallationGuide/xml/XSLCustomizationLayer/G4XSLCustomFO.xsl (modified) (1 diff)
-
documents/UserDoc/DocBookUsersGuides/InstallationGuide/xml/XSLCustomizationLayer/G4XSLCustomHTML.xsl (modified) (1 diff)
-
documents/UserDoc/DocBookUsersGuides/IntroductionToGeant4/xml/BookIntroToGeant4.xml (modified) (1 diff)
-
documents/UserDoc/DocBookUsersGuides/IntroductionToGeant4/xml/XSLCustomizationLayer/G4XSLCustomFO.xsl (modified) (1 diff)
-
documents/UserDoc/DocBookUsersGuides/IntroductionToGeant4/xml/XSLCustomizationLayer/G4XSLCustomHTML.xsl (modified) (1 diff)
-
examples/novice/N02/vis.mac (modified) (1 diff)
-
examples/novice/N03/G4History.macro (modified) (2 diffs)
-
examples/novice/N03/vis.mac (modified) (1 diff)
-
examples/novice/N03/visTutor/exN03Vis10.mac (modified) (1 diff)
-
examples/novice/N03/visTutor/exN03Vis11.mac (modified) (1 diff)
-
examples/novice/N03/visTutor/exN03Vis12.mac (modified) (1 diff)
-
examples/novice/N03/visTutor/exN03Vis13.mac (modified) (1 diff)
-
examples/novice/N03/visTutor/exN03Vis14.mac~ (modified) (1 diff)
-
examples/novice/N03/visTutor/exN03Vis15.mac (modified) (3 diffs)
-
examples/novice/N03/visTutor/exN03Vis15.mac~ (modified) (3 diffs)
-
examples/novice/N03/visTutor/exN03Vis5.mac (modified) (2 diffs)
-
examples/novice/N03/visTutor/exN03Vis6.mac (modified) (1 diff)
-
examples/novice/N03/visTutor/exN03Vis7.mac (modified) (1 diff)
-
examples/novice/N03/visTutor/exN03Vis8.mac (modified) (1 diff)
-
source/digits_hits/History (modified) (2 diffs)
-
source/geometry/magneticfield/History (modified) (2 diffs)
-
source/geometry/magneticfield/include/G4CashKarpRKF45.hh (modified) (1 diff)
-
source/geometry/magneticfield/include/G4ChordFinder.hh (modified) (7 diffs)
-
source/geometry/magneticfield/include/G4ChordFinder.icc (modified) (2 diffs)
-
source/geometry/magneticfield/include/G4ChordFinderSaf.hh (modified) (2 diffs)
-
source/geometry/magneticfield/include/G4ClassicalRK4.hh (modified) (1 diff)
-
source/geometry/magneticfield/include/G4DELPHIMagField.hh (modified) (1 diff)
-
source/geometry/magneticfield/include/G4ElectricField.hh (modified) (1 diff)
-
source/geometry/magneticfield/include/G4ElectroMagneticField.hh (modified) (1 diff)
-
source/geometry/magneticfield/include/G4EqEMFieldWithSpin.hh (modified) (5 diffs)
-
source/geometry/magneticfield/include/G4EqMagElectricField.hh (modified) (1 diff)
-
source/geometry/magneticfield/include/G4EquationOfMotion.hh (modified) (1 diff)
-
source/geometry/magneticfield/include/G4EquationOfMotion.icc (modified) (1 diff)
-
source/geometry/magneticfield/include/G4ErrorMag_UsualEqRhs.hh (modified) (1 diff)
-
source/geometry/magneticfield/include/G4ExactHelixStepper.hh (modified) (1 diff)
-
source/geometry/magneticfield/include/G4ExplicitEuler.hh (modified) (1 diff)
-
source/geometry/magneticfield/include/G4Field.hh (modified) (1 diff)
-
source/geometry/magneticfield/include/G4FieldManager.hh (modified) (1 diff)
-
source/geometry/magneticfield/include/G4FieldManager.icc (modified) (1 diff)
-
source/geometry/magneticfield/include/G4FieldManagerStore.hh (modified) (1 diff)
-
source/geometry/magneticfield/include/G4FieldTrack.hh (modified) (1 diff)
-
source/geometry/magneticfield/include/G4FieldTrack.icc (modified) (1 diff)
-
source/geometry/magneticfield/include/G4HarmonicPolMagField.hh (modified) (1 diff)
-
source/geometry/magneticfield/include/G4HelixExplicitEuler.hh (modified) (1 diff)
-
source/geometry/magneticfield/include/G4HelixHeum.hh (modified) (1 diff)
-
source/geometry/magneticfield/include/G4HelixImplicitEuler.hh (modified) (1 diff)
-
source/geometry/magneticfield/include/G4HelixSimpleRunge.hh (modified) (1 diff)
-
source/geometry/magneticfield/include/G4ImplicitEuler.hh (modified) (1 diff)
-
source/geometry/magneticfield/include/G4LineCurrentMagField.hh (modified) (1 diff)
-
source/geometry/magneticfield/include/G4LineSection.hh (modified) (1 diff)
-
source/geometry/magneticfield/include/G4MagErrorStepper.hh (modified) (1 diff)
-
source/geometry/magneticfield/include/G4MagErrorStepper.icc (modified) (1 diff)
-
source/geometry/magneticfield/include/G4MagHelicalStepper.hh (modified) (1 diff)
-
source/geometry/magneticfield/include/G4MagHelicalStepper.icc (modified) (1 diff)
-
source/geometry/magneticfield/include/G4MagIntegratorDriver.hh (modified) (1 diff)
-
source/geometry/magneticfield/include/G4MagIntegratorDriver.icc (modified) (1 diff)
-
source/geometry/magneticfield/include/G4MagIntegratorStepper.hh (modified) (1 diff)
-
source/geometry/magneticfield/include/G4MagIntegratorStepper.icc (modified) (1 diff)
-
source/geometry/magneticfield/include/G4Mag_EqRhs.hh (modified) (1 diff)
-
source/geometry/magneticfield/include/G4Mag_SpinEqRhs.hh (modified) (1 diff)
-
source/geometry/magneticfield/include/G4Mag_UsualEqRhs.hh (modified) (1 diff)
-
source/geometry/magneticfield/include/G4MagneticField.hh (modified) (1 diff)
-
source/geometry/magneticfield/include/G4QuadrupoleMagField.hh (modified) (1 diff)
-
source/geometry/magneticfield/include/G4RKG3_Stepper.hh (modified) (1 diff)
-
source/geometry/magneticfield/include/G4SimpleHeum.hh (modified) (1 diff)
-
source/geometry/magneticfield/include/G4SimpleRunge.hh (modified) (1 diff)
-
source/geometry/magneticfield/include/G4UniformElectricField.hh (modified) (1 diff)
-
source/geometry/magneticfield/include/G4UniformMagField.hh (modified) (1 diff)
-
source/geometry/magneticfield/src/G4CashKarpRKF45.cc (modified) (1 diff)
-
source/geometry/magneticfield/src/G4ChordFinder.cc (modified) (9 diffs)
-
source/geometry/magneticfield/src/G4ChordFinderSaf.cc (modified) (1 diff)
-
source/geometry/magneticfield/src/G4ClassicalRK4.cc (modified) (1 diff)
-
source/geometry/magneticfield/src/G4DELPHIMagField.cc (modified) (1 diff)
-
source/geometry/magneticfield/src/G4ElectricField.cc (modified) (1 diff)
-
source/geometry/magneticfield/src/G4ElectroMagneticField.cc (modified) (1 diff)
-
source/geometry/magneticfield/src/G4EqEMFieldWithSpin.cc (modified) (4 diffs)
-
source/geometry/magneticfield/src/G4EqMagElectricField.cc (modified) (1 diff)
-
source/geometry/magneticfield/src/G4EquationOfMotion.cc (modified) (1 diff)
-
source/geometry/magneticfield/src/G4ErrorMag_UsualEqRhs.cc (modified) (1 diff)
-
source/geometry/magneticfield/src/G4ExactHelixStepper.cc (modified) (2 diffs)
-
source/geometry/magneticfield/src/G4ExplicitEuler.cc (modified) (1 diff)
-
source/geometry/magneticfield/src/G4FieldManager.cc (modified) (1 diff)
-
source/geometry/magneticfield/src/G4FieldManagerStore.cc (modified) (1 diff)
-
source/geometry/magneticfield/src/G4FieldTrack.cc (modified) (1 diff)
-
source/geometry/magneticfield/src/G4HarmonicPolMagField.cc (modified) (1 diff)
-
source/geometry/magneticfield/src/G4HelixExplicitEuler.cc (modified) (1 diff)
-
source/geometry/magneticfield/src/G4HelixHeum.cc (modified) (1 diff)
-
source/geometry/magneticfield/src/G4HelixImplicitEuler.cc (modified) (1 diff)
-
source/geometry/magneticfield/src/G4HelixSimpleRunge.cc (modified) (1 diff)
-
source/geometry/magneticfield/src/G4ImplicitEuler.cc (modified) (1 diff)
-
source/geometry/magneticfield/src/G4LineCurrentMagField.cc (modified) (1 diff)
-
source/geometry/magneticfield/src/G4LineSection.cc (modified) (1 diff)
-
source/geometry/magneticfield/src/G4MagErrorStepper.cc (modified) (1 diff)
-
source/geometry/magneticfield/src/G4MagHelicalStepper.cc (modified) (1 diff)
-
source/geometry/magneticfield/src/G4MagIntegratorDriver.cc (modified) (1 diff)
-
source/geometry/magneticfield/src/G4MagIntegratorStepper.cc (modified) (1 diff)
-
source/geometry/magneticfield/src/G4Mag_EqRhs.cc (modified) (1 diff)
-
source/geometry/magneticfield/src/G4Mag_SpinEqRhs.cc (modified) (4 diffs)
-
source/geometry/magneticfield/src/G4Mag_UsualEqRhs.cc (modified) (1 diff)
-
source/geometry/magneticfield/src/G4MagneticField.cc (modified) (1 diff)
-
source/geometry/magneticfield/src/G4QuadrupoleMagField.cc (modified) (1 diff)
-
source/geometry/magneticfield/src/G4RKG3_Stepper.cc (modified) (1 diff)
-
source/geometry/magneticfield/src/G4SimpleHeum.cc (modified) (1 diff)
-
source/geometry/magneticfield/src/G4SimpleRunge.cc (modified) (1 diff)
-
source/geometry/magneticfield/src/G4UniformElectricField.cc (modified) (1 diff)
-
source/geometry/magneticfield/src/G4UniformMagField.cc (modified) (1 diff)
-
source/geometry/management/History (modified) (2 diffs)
-
source/geometry/management/include/G4VSolid.hh (modified) (3 diffs)
-
source/geometry/management/src/G4VSolid.cc (modified) (4 diffs)
-
source/geometry/navigation/History (modified) (2 diffs)
-
source/geometry/navigation/include/G4AuxiliaryNavServices.hh (modified) (1 diff)
-
source/geometry/navigation/include/G4AuxiliaryNavServices.icc (modified) (1 diff)
-
source/geometry/navigation/include/G4DrawVoxels.hh (modified) (1 diff)
-
source/geometry/navigation/include/G4ErrorPropagationNavigator.hh (modified) (2 diffs)
-
source/geometry/navigation/include/G4GeomTestErrorList.hh (modified) (1 diff)
-
source/geometry/navigation/include/G4GeomTestLogger.hh (modified) (1 diff)
-
source/geometry/navigation/include/G4GeomTestOverlapList.hh (modified) (1 diff)
-
source/geometry/navigation/include/G4GeomTestOvershootList.hh (modified) (1 diff)
-
source/geometry/navigation/include/G4GeomTestPoint.hh (modified) (1 diff)
-
source/geometry/navigation/include/G4GeomTestSegment.hh (modified) (1 diff)
-
source/geometry/navigation/include/G4GeomTestStreamLogger.hh (modified) (1 diff)
-
source/geometry/navigation/include/G4GeomTestVolPoint.hh (modified) (1 diff)
-
source/geometry/navigation/include/G4GeomTestVolume.hh (modified) (1 diff)
-
source/geometry/navigation/include/G4GeometryMessenger.hh (modified) (1 diff)
-
source/geometry/navigation/include/G4MultiNavigator.hh (modified) (2 diffs)
-
source/geometry/navigation/include/G4Navigator.hh (modified) (2 diffs)
-
source/geometry/navigation/include/G4Navigator.icc (modified) (1 diff)
-
source/geometry/navigation/include/G4NormalNavigation.hh (modified) (1 diff)
-
source/geometry/navigation/include/G4NormalNavigation.icc (modified) (1 diff)
-
source/geometry/navigation/include/G4ParameterisedNavigation.hh (modified) (1 diff)
-
source/geometry/navigation/include/G4ParameterisedNavigation.icc (modified) (1 diff)
-
source/geometry/navigation/include/G4PathFinder.hh (modified) (1 diff)
-
source/geometry/navigation/include/G4PhantomParameterisation.hh (modified) (1 diff)
-
source/geometry/navigation/include/G4PhantomParameterisation.icc (modified) (1 diff)
-
source/geometry/navigation/include/G4PropagatorInField.hh (modified) (10 diffs)
-
source/geometry/navigation/include/G4PropagatorInField.icc (modified) (2 diffs)
-
source/geometry/navigation/include/G4RegularNavigation.hh (modified) (1 diff)
-
source/geometry/navigation/include/G4ReplicaNavigation.hh (modified) (1 diff)
-
source/geometry/navigation/include/G4ReplicaNavigation.icc (modified) (1 diff)
-
source/geometry/navigation/include/G4SafetyHelper.hh (modified) (1 diff)
-
source/geometry/navigation/include/G4TransportationManager.hh (modified) (1 diff)
-
source/geometry/navigation/include/G4TransportationManager.icc (modified) (1 diff)
-
source/geometry/navigation/include/G4VoxelNavigation.hh (modified) (1 diff)
-
source/geometry/navigation/include/G4VoxelNavigation.icc (modified) (1 diff)
-
source/geometry/navigation/src/G4AuxiliaryNavServices.cc (modified) (1 diff)
-
source/geometry/navigation/src/G4DrawVoxels.cc (modified) (1 diff)
-
source/geometry/navigation/src/G4ErrorPropagationNavigator.cc (modified) (2 diffs)
-
source/geometry/navigation/src/G4GeomTestErrorList.cc (modified) (1 diff)
-
source/geometry/navigation/src/G4GeomTestOverlapList.cc (modified) (1 diff)
-
source/geometry/navigation/src/G4GeomTestOvershootList.cc (modified) (1 diff)
-
source/geometry/navigation/src/G4GeomTestPoint.cc (modified) (1 diff)
-
source/geometry/navigation/src/G4GeomTestSegment.cc (modified) (1 diff)
-
source/geometry/navigation/src/G4GeomTestStreamLogger.cc (modified) (1 diff)
-
source/geometry/navigation/src/G4GeomTestVolPoint.cc (modified) (1 diff)
-
source/geometry/navigation/src/G4GeomTestVolume.cc (modified) (1 diff)
-
source/geometry/navigation/src/G4GeometryMessenger.cc (modified) (1 diff)
-
source/geometry/navigation/src/G4MultiNavigator.cc (modified) (3 diffs)
-
source/geometry/navigation/src/G4Navigator.cc (modified) (4 diffs)
-
source/geometry/navigation/src/G4NormalNavigation.cc (modified) (1 diff)
-
source/geometry/navigation/src/G4ParameterisedNavigation.cc (modified) (1 diff)
-
source/geometry/navigation/src/G4PathFinder.cc (modified) (4 diffs)
-
source/geometry/navigation/src/G4PropagatorInField.cc (modified) (8 diffs)
-
source/geometry/navigation/src/G4ReplicaNavigation.cc (modified) (1 diff)
-
source/geometry/navigation/src/G4SafetyHelper.cc (modified) (2 diffs)
-
source/geometry/navigation/src/G4TransportationManager.cc (modified) (1 diff)
-
source/geometry/navigation/src/G4VoxelNavigation.cc (modified) (4 diffs)
-
source/geometry/solids/CSG/History (modified) (2 diffs)
-
source/geometry/solids/CSG/include/G4Cons.hh (modified) (3 diffs)
-
source/geometry/solids/CSG/include/G4Cons.icc (modified) (8 diffs)
-
source/geometry/solids/CSG/include/G4Sphere.hh (modified) (4 diffs)
-
source/geometry/solids/CSG/include/G4Sphere.icc (modified) (3 diffs)
-
source/geometry/solids/CSG/include/G4Tubs.hh (modified) (8 diffs)
-
source/geometry/solids/CSG/include/G4Tubs.icc (modified) (7 diffs)
-
source/geometry/solids/CSG/src/G4Cons.cc (modified) (107 diffs)
-
source/geometry/solids/CSG/src/G4Tubs.cc (modified) (78 diffs)
-
source/geometry/solids/specific/History (modified) (2 diffs)
-
source/geometry/solids/specific/include/G4EllipticalCone.hh (modified) (2 diffs)
-
source/geometry/solids/specific/include/G4EllipticalCone.icc (modified) (2 diffs)
-
source/geometry/solids/specific/src/G4ExtrudedSolid.cc (modified) (2 diffs)
-
source/geometry/solids/specific/src/G4TriangularFacet.cc (modified) (3 diffs)
-
source/geometry/solids/specific/src/G4VFacet.cc (modified) (3 diffs)
-
source/geometry/volumes/History (modified) (2 diffs)
-
source/geometry/volumes/include/G4ReflectionFactory.hh (modified) (2 diffs)
-
source/geometry/volumes/src/G4ReflectionFactory.cc (modified) (4 diffs)
-
source/global/History (modified) (2 diffs)
-
source/global/management/include/G4LPhysicsFreeVector.hh (modified) (2 diffs)
-
source/global/management/include/G4LPhysicsFreeVector.icc (modified) (3 diffs)
-
source/global/management/include/G4PhysicsFreeVector.hh (modified) (1 diff)
-
source/global/management/include/G4PhysicsLinearVector.hh (modified) (2 diffs)
-
source/global/management/include/G4PhysicsLnVector.hh (modified) (2 diffs)
-
source/global/management/include/G4PhysicsLogVector.hh (modified) (2 diffs)
-
source/global/management/include/G4PhysicsOrderedFreeVector.hh (modified) (1 diff)
-
source/global/management/include/G4PhysicsVector.hh (modified) (2 diffs)
-
source/global/management/include/G4PhysicsVector.icc (modified) (4 diffs)
-
source/global/management/include/G4Version.hh (modified) (3 diffs)
-
source/global/management/src/G4LPhysicsFreeVector.cc (modified) (5 diffs)
-
source/global/management/src/G4PhysicsFreeVector.cc (modified) (4 diffs)
-
source/global/management/src/G4PhysicsLinearVector.cc (modified) (7 diffs)
-
source/global/management/src/G4PhysicsLnVector.cc (modified) (8 diffs)
-
source/global/management/src/G4PhysicsLogVector.cc (modified) (5 diffs)
-
source/global/management/src/G4PhysicsOrderedFreeVector.cc (modified) (3 diffs)
-
source/global/management/src/G4PhysicsVector.cc (modified) (7 diffs)
-
source/graphics_reps/History (modified) (2 diffs)
-
source/graphics_reps/src/HepPolyhedron.cc (modified) (4 diffs)
-
source/interfaces/common/src/G4VBasicShell.cc (modified) (3 diffs)
-
source/materials/History (modified) (2 diffs)
-
source/materials/include/G4Element.hh (modified) (7 diffs)
-
source/materials/include/G4Isotope.hh (modified) (5 diffs)
-
source/materials/include/G4Material.hh (modified) (7 diffs)
-
source/particles/GNUmakefile (modified) (2 diffs)
-
source/particles/History (modified) (2 diffs)
-
source/particles/hadrons/barions/src/G4AntiLambda.cc (modified) (2 diffs)
-
source/particles/hadrons/barions/src/G4AntiLambdacPlus.cc (modified) (2 diffs)
-
source/particles/hadrons/barions/src/G4AntiNeutron.cc (modified) (2 diffs)
-
source/particles/hadrons/barions/src/G4AntiOmegaMinus.cc (modified) (2 diffs)
-
source/particles/hadrons/barions/src/G4AntiSigmaMinus.cc (modified) (2 diffs)
-
source/particles/hadrons/barions/src/G4AntiSigmaPlus.cc (modified) (2 diffs)
-
source/particles/hadrons/barions/src/G4AntiSigmaZero.cc (modified) (2 diffs)
-
source/particles/hadrons/barions/src/G4AntiXiMinus.cc (modified) (2 diffs)
-
source/particles/hadrons/barions/src/G4AntiXiZero.cc (modified) (2 diffs)
-
source/particles/hadrons/barions/src/G4AntiXicPlus.cc (modified) (2 diffs)
-
source/particles/hadrons/barions/src/G4AntiXicZero.cc (modified) (2 diffs)
-
source/particles/hadrons/barions/src/G4Lambda.cc (modified) (2 diffs)
-
source/particles/hadrons/barions/src/G4LambdacPlus.cc (modified) (2 diffs)
-
source/particles/hadrons/barions/src/G4Neutron.cc (modified) (2 diffs)
-
source/particles/hadrons/barions/src/G4OmegaMinus.cc (modified) (2 diffs)
-
source/particles/hadrons/barions/src/G4SigmaMinus.cc (modified) (2 diffs)
-
source/particles/hadrons/barions/src/G4SigmaPlus.cc (modified) (2 diffs)
-
source/particles/hadrons/barions/src/G4SigmaZero.cc (modified) (2 diffs)
-
source/particles/hadrons/barions/src/G4XiMinus.cc (modified) (2 diffs)
-
source/particles/hadrons/barions/src/G4XiZero.cc (modified) (2 diffs)
-
source/particles/hadrons/barions/src/G4XicPlus.cc (modified) (2 diffs)
-
source/particles/hadrons/mesons/src/G4AntiBMesonZero.cc (modified) (2 diffs)
-
source/particles/hadrons/mesons/src/G4AntiBsMesonZero.cc (modified) (2 diffs)
-
source/particles/hadrons/mesons/src/G4AntiDMesonZero.cc (modified) (2 diffs)
-
source/particles/hadrons/mesons/src/G4AntiKaonZero.cc (modified) (2 diffs)
-
source/particles/hadrons/mesons/src/G4BMesonMinus.cc (modified) (2 diffs)
-
source/particles/hadrons/mesons/src/G4BMesonPlus.cc (modified) (2 diffs)
-
source/particles/hadrons/mesons/src/G4BMesonZero.cc (modified) (2 diffs)
-
source/particles/hadrons/mesons/src/G4BsMesonZero.cc (modified) (2 diffs)
-
source/particles/hadrons/mesons/src/G4DMesonMinus.cc (modified) (2 diffs)
-
source/particles/hadrons/mesons/src/G4DMesonPlus.cc (modified) (2 diffs)
-
source/particles/hadrons/mesons/src/G4DMesonZero.cc (modified) (2 diffs)
-
source/particles/hadrons/mesons/src/G4DsMesonMinus.cc (modified) (2 diffs)
-
source/particles/hadrons/mesons/src/G4DsMesonPlus.cc (modified) (2 diffs)
-
source/particles/hadrons/mesons/src/G4Eta.cc (modified) (2 diffs)
-
source/particles/hadrons/mesons/src/G4EtaPrime.cc (modified) (2 diffs)
-
source/particles/hadrons/mesons/src/G4JPsi.cc (modified) (2 diffs)
-
source/particles/hadrons/mesons/src/G4KaonMinus.cc (modified) (2 diffs)
-
source/particles/hadrons/mesons/src/G4KaonPlus.cc (modified) (2 diffs)
-
source/particles/hadrons/mesons/src/G4KaonZero.cc (modified) (2 diffs)
-
source/particles/hadrons/mesons/src/G4KaonZeroLong.cc (modified) (2 diffs)
-
source/particles/hadrons/mesons/src/G4KaonZeroShort.cc (modified) (2 diffs)
-
source/particles/hadrons/mesons/src/G4PionMinus.cc (modified) (2 diffs)
-
source/particles/hadrons/mesons/src/G4PionPlus.cc (modified) (2 diffs)
-
source/particles/hadrons/mesons/src/G4PionZero.cc (modified) (2 diffs)
-
source/particles/leptons/src/G4Electron.cc (modified) (2 diffs)
-
source/particles/leptons/src/G4MuonMinus.cc (modified) (3 diffs)
-
source/particles/leptons/src/G4MuonPlus.cc (modified) (3 diffs)
-
source/particles/leptons/src/G4Positron.cc (modified) (2 diffs)
-
source/particles/leptons/src/G4TauMinus.cc (modified) (3 diffs)
-
source/particles/leptons/src/G4TauPlus.cc (modified) (3 diffs)
-
source/particles/management/include/G4ParticleDefinition.hh (modified) (2 diffs)
-
source/particles/management/include/G4ParticleDefinition.icc (modified) (2 diffs)
-
source/particles/shortlived/src/G4ExcitedDeltaConstructor.cc (modified) (2 diffs)
-
source/particles/shortlived/src/G4ExcitedLambdaConstructor.cc (modified) (2 diffs)
-
source/particles/shortlived/src/G4ExcitedMesonConstructor.cc (modified) (3 diffs)
-
source/particles/shortlived/src/G4ExcitedXiConstructor.cc (modified) (2 diffs)
-
source/particles/shortlived/src/G4ShortLivedConstructor.cc (modified) (32 diffs)
-
source/persistency/GNUmakefile (modified) (2 diffs)
-
source/persistency/History (modified) (1 diff)
-
source/persistency/gdml/History (modified) (2 diffs)
-
source/persistency/gdml/include/G4GDMLParser.hh (modified) (5 diffs)
-
source/persistency/gdml/src/G4GDMLParser.cc (modified) (1 diff)
-
source/physics_lists/History (modified) (2 diffs)
-
source/physics_lists/builders/GNUmakefile (modified) (2 diffs)
-
source/physics_lists/builders/include/G4NeutronTrackingCut.hh (modified) (3 diffs)
-
source/physics_lists/builders/src/G4EmStandardPhysics.cc (modified) (8 diffs)
-
source/physics_lists/builders/src/G4EmStandardPhysics_option1.cc (modified) (10 diffs)
-
source/physics_lists/builders/src/G4EmStandardPhysics_option2.cc (modified) (6 diffs)
-
source/physics_lists/builders/src/G4FTFBinaryNeutronBuilder.cc (modified) (1 diff)
-
source/physics_lists/builders/src/G4FTFBinaryPiKBuilder.cc (modified) (1 diff)
-
source/physics_lists/builders/src/G4FTFBinaryProtonBuilder.cc (modified) (1 diff)
-
source/physics_lists/builders/src/G4FTFPNeutronBuilder.cc (modified) (1 diff)
-
source/physics_lists/builders/src/G4FTFPPiKBuilder.cc (modified) (1 diff)
-
source/physics_lists/builders/src/G4FTFPProtonBuilder.cc (modified) (1 diff)
-
source/physics_lists/builders/src/G4HadronElasticPhysics.cc (modified) (8 diffs)
-
source/physics_lists/builders/src/G4NeutronTrackingCut.cc (modified) (5 diffs)
-
source/physics_lists/builders/src/G4QGSBinaryNeutronBuilder.cc (modified) (1 diff)
-
source/physics_lists/builders/src/G4QGSBinaryPiKBuilder.cc (modified) (1 diff)
-
source/physics_lists/builders/src/G4QGSBinaryProtonBuilder.cc (modified) (1 diff)
-
source/physics_lists/builders/src/G4QGSCEflowNeutronBuilder.cc (modified) (1 diff)
-
source/physics_lists/builders/src/G4QGSCEflowPiKBuilder.cc (modified) (1 diff)
-
source/physics_lists/builders/src/G4QGSCEflowProtonBuilder.cc (modified) (1 diff)
-
source/physics_lists/builders/src/G4QGSCNeutronBuilder.cc (modified) (1 diff)
-
source/physics_lists/builders/src/G4QGSCPiKBuilder.cc (modified) (1 diff)
-
source/physics_lists/builders/src/G4QGSCProtonBuilder.cc (modified) (1 diff)
-
source/physics_lists/builders/src/G4QGSPNeutronBuilder.cc (modified) (1 diff)
-
source/physics_lists/builders/src/G4QGSPPiKBuilder.cc (modified) (1 diff)
-
source/physics_lists/builders/src/G4QGSPProtonBuilder.cc (modified) (1 diff)
-
source/physics_lists/lists/include/G4HadronInelasticQBBC.hh (modified) (2 diffs)
-
source/physics_lists/lists/include/QBBC.icc (modified) (4 diffs)
-
source/physics_lists/lists/src/G4HadronInelasticQBBC.cc (modified) (12 diffs)
-
source/track/History (modified) (2 diffs)
-
source/track/include/G4StepPoint.hh (modified) (3 diffs)
-
source/track/include/G4StepPoint.icc (modified) (2 diffs)
-
source/track/include/G4Track.hh (modified) (3 diffs)
-
source/track/include/G4Track.icc (modified) (3 diffs)
-
source/tracking/History (modified) (2 diffs)
-
source/visualization/GNUmakefile (modified) (1 diff)
-
source/visualization/OpenGL/GNUmakefile (modified) (2 diffs)
-
source/visualization/OpenGL/include/G4OpenGLViewer.hh (modified) (2 diffs)
-
source/visualization/OpenGL/src/G4OpenGLViewer.cc (modified) (4 diffs)
-
source/visualization/OpenInventor/GNUmakefile (modified) (2 diffs)
-
source/visualization/OpenInventor/include/HEPVis/actions/SoGL2PSAction.h (modified) (2 diffs)
-
source/visualization/OpenInventor/src/G4OpenInventorViewer.cc (modified) (2 diffs)
-
source/visualization/OpenInventor/src/SoGL2PSAction.cc (modified) (5 diffs)
-
source/visualization/externals/gl2ps/GNUMakefile (deleted)
-
source/visualization/externals/gl2ps/GNUmakefile (added)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Configure
r884 r921 19 19 # 20 20 21 # $Id: Configure,v 1.1 07 2008/11/14 15:14:46bmorgan Exp $22 # 23 # Generated on Fri Nov 14 15:14:32GMT 2008 [metaconfig 3.0 PL70]21 # $Id: Configure,v 1.110 2008/12/03 15:34:57 bmorgan Exp $ 22 # 23 # Generated on Wed Dec 3 15:33:49 GMT 2008 [metaconfig 3.0 PL70] 24 24 25 25 cat >/tmp/c1$$ <<EOF … … 1144 1144 awk 1145 1145 cat 1146 echo 1146 1147 expr 1147 1148 grep … … 2303 2304 \`ls -dr /System/Library/Frameworks/QtCore.framework/Headers 2>/dev/null\` 2304 2305 /usr/include/QtCore 2305 \`ls -dr /usr/include/qt*/QtCore 2>/dev/null\` 2306 \`ls -dr /usr/include/qt*/QtCore 2>/dev/null\` 2307 \`ls -dr /usr/local/include/QtCore 2>/dev/null\` 2308 \`ls -dr /usr/local/include/qt*/QtCore 2>/dev/null\` 2309 \`ls -dr /usr/local/qt*/include/QtCore 2>/dev/null\` 2306 2310 \`ls -dr /opt/qt*/include/QtCore 2>/dev/null\` 2307 2311 \`ls -dr /usr/qt*/include/QtCore 2>/dev/null\` … … 2313 2317 /usr/include 2314 2318 \`ls -dr /usr/include/qt* 2>/dev/null\` 2319 \`ls -dr /usr/local/include 2>/dev/null\` 2320 \`ls -dr /usr/local/include/qt* 2>/dev/null\` 2321 \`ls -dr /usr/local/qt*/include 2>/dev/null\` 2315 2322 \`ls -dr /opt/qt*/include 2>/dev/null\` 2316 2323 \`ls -dr /usr/qt*/include 2>/dev/null\` … … 2321 2328 \`ls -dr /sw/qt/*/include 2>/dev/null\` 2322 2329 /usr/include/Qt 2323 \`ls -dr /usr/include/qt*/Qt 2>/dev/null\` 2330 \`ls -dr /usr/include/qt*/Qt 2>/dev/null\` 2331 \`ls -dr /usr/local/include/Qt 2>/dev/null\` 2332 \`ls -dr /usr/local/include/qt*/Qt 2>/dev/null\` 2324 2333 \`ls -dr /opt/qt*/include/Qt 2>/dev/null\` 2325 2334 \`ls -dr /usr/qt*/include/Qt 2>/dev/null\` … … 2592 2601 fi #END TEST "x\$g4_qt_is_configured" = "x" 2593 2602 2594 2595 echo ""2596 echo "DEBUG#####"2597 echo "g4_qt_cxxflags = \$g4_qt_cxxflags"2598 echo "g4_qt_gl_cxxflags = \$g4_qt_gl_cxxflags"2599 echo "g4_qt_libs = \$g4_qt_libs"2600 echo "g4_qt_gl_libs = \$g4_qt_gl_libs"2601 echo "g4_qt_moc = \$g4_qt_moc"2602 echo "..."2603 echo "g4_havegoodqt = \$g4_havegoodqt"2604 echo "g4_qt_is_configured = \$g4_qt_is_configured"2605 echo "##########"2606 2603 EOSC 2607 2604 : decide how portable to be … … 3120 3117 done 3121 3118 3119 g4data_photonevaporation_version='PhotonEvaporation2.0' 3120 g4data_radioactivedecay_version='RadioactiveDecay3.2' 3121 g4data_g4emlow_version='G4EMLOW6.2' 3122 g4data_g4ndl_version='G4NDL3.13' 3123 g4data_g4abla_version='G4ABLA3.0' 3124 #END GEANT4 DATA OPTIONS 3122 3125 echo " " 3123 3126 3127 3128 # 3129 # Set defaults for data paths - here, because we depend on g4install 3130 # 3124 3131 case "$g4data" in 3125 3132 '') … … 3130 3137 case "$g4levelgammadata" in 3131 3138 '') 3132 g4levelgammadata=$g4data/ PhotonEvaporation2.03139 g4levelgammadata=$g4data/$g4data_photonevaporation_version 3133 3140 ;; 3134 3141 esac … … 3136 3143 case "$g4radioactivedata" in 3137 3144 '') 3138 g4radioactivedata=$g4data/ RadioactiveDecay3.23145 g4radioactivedata=$g4data/$g4data_radioactivedecay_version 3139 3146 ;; 3140 3147 esac … … 3142 3149 case "$g4ledata" in 3143 3150 '') 3144 g4ledata=$g4data/ G4EMLOW6.13151 g4ledata=$g4data/$g4data_g4emlow_version 3145 3152 ;; 3146 3153 esac … … 3148 3155 case "$g4neutronhpcrosssections" in 3149 3156 '') 3150 g4neutronhpcrosssections=$g4data/ G4NDL3.123157 g4neutronhpcrosssections=$g4data/$g4data_g4ndl_version 3151 3158 ;; 3152 3159 esac … … 3154 3161 case "$g4abladata" in 3155 3162 '') 3156 g4abladata=$g4data/G4ABLA3.0 3157 ;; 3158 esac 3159 3160 3161 #case "$g4elasticdata" in 3162 #'') 3163 # g4elasticdata=$g4data/G4ELASTIC1.1 3164 # ;; 3165 #esac 3166 3167 ######################################################################### 3168 3169 # while test 1 = 1 ; do 3170 3171 g4message=`cat << EOM 3172 3173 Please, specify default directory where ALL the Geant4 data is installed: 3174 3175 G4LEVELGAMMADATA: $g4levelgammadata 3176 3177 G4RADIOACTIVEDATA: $g4radioactivedata 3178 3179 G4LEDATA: $g4ledata 3180 3181 G4NEUTRONHPDATA: $g4neutronhpcrosssections 3182 3183 G4ABLADATA: $g4abladata 3184 3185 You will be asked about customizing these next. 3186 3187 EOM` 3188 3189 #dflt="NO DEFAULT ANSWER" 3163 g4abladata=$g4data/$g4data_g4abla_version 3164 ;; 3165 esac 3166 3167 3168 # 3169 # Now we have defaults, prompt user to see if this is where they want to use 3170 # 3171 g4data_alllibs="$g4data_photonevaporation_version $g4data_radioactivedecay_version $g4data_g4emlow_version $g4data_g4ndl_version $g4data_g4abla_version" 3172 3173 g4message=`cat <<EOM 3174 Specify the path where are the Geant4 data libraries 3175 3176 $g4data_alllibs 3177 3178 are installed. For now, a flat directory structure is assumed, and this can 3179 be customized at the next step if needed. 3180 EOM` 3181 3190 3182 dflt=$g4data 3191 #fn='d~'3192 rp=$g4message3193 #. ./myread3194 gans=$ans3195 3196 dflt=$g4data3197 fn='d~'3198 . ./getfile3199 3200 if [ X$g4data != X$ans ] ; then3201 g4data=$ans3202 3203 g4levelgammadata=$g4data/PhotonEvaporation2.03204 g4radioactivedata=$g4data/RadioactiveDecay3.23205 g4ledata=$g4data/G4EMLOW6.13206 g4neutronhpcrosssections=$g4data/G4NDL3.123207 g4abladata=$g4data/G4ABLA3.03208 # g4elasticdata=$g4data/G4ELASTIC1.13209 fi3210 # done3211 3212 ###################################################################3213 3214 while test 1 = 1 ; do3215 3216 g4message=`cat << EOM3217 3218 Please, specify default directory where the Geant4 data is installed:3219 3220 1) G4LEVELGAMMADATA: $g4levelgammadata3221 3222 2) G4RADIOACTIVEDATA: $g4radioactivedata3223 3224 3) G4LEDATA: $g4ledata3225 3226 4) G4NEUTRONHPDATA: $g4neutronhpcrosssections3227 3228 5) G4ABLADATA: $g4abladata3229 3230 To modify default settings, select number above (e.g. 2)3231 EOM`3232 3233 #dflt="NO DEFAULT ANSWER"3234 dflt="Press [Enter] for default settings"3235 #fn='d~'3236 3183 rp=$g4message 3237 3184 . ./myread 3238 gans=$ans 3239 3185 g4data=$ans 3186 3187 # 3188 # Using this, we can now check that the libs exist, but only on a directory 3189 # level 3190 # 3191 g4data_foundall='yes' 3192 promptend="no" 3193 g4data_customize="no" 3194 3195 while test "x$promptend" = "xno" ; do 3196 ### PhotonEvaporation 3197 $echo $n "checking for $g4data_photonevaporation_version... $c" 3198 if test -d "$g4data/$g4data_photonevaporation_version" ; then 3199 $echo "yes" 3200 g4levelgammadata=$g4data/$g4data_photonevaporation_version 3201 else 3202 $echo "no" 3203 g4data_foundall="no" 3204 fi 3205 3206 ### RadioactiveDecay 3207 $echo $n "checking for $g4data_radioactivedecay_version... $c" 3208 if test -d "$g4data/$g4data_radioactivedecay_version" ; then 3209 $echo "yes" 3210 g4radioactivedata=$g4data/$g4data_radioactivedecay_version 3211 else 3212 $echo "no" 3213 g4data_foundall="no" 3214 fi 3215 3216 ### G4EMLOW 3217 $echo $n "checking for $g4data_g4emlow_version... $c" 3218 if test -d "$g4data/$g4data_g4emlow_version" ; then 3219 $echo "yes" 3220 g4ledata=$g4data/$g4data_emlow_version 3221 else 3222 $echo "no" 3223 g4data_foundall="no" 3224 fi 3225 3226 ### G4NDL 3227 $echo $n "checking for $g4data_g4ndl_version... $c" 3228 if test -d "$g4data/$g4data_g4ndl_version" ; then 3229 $echo "yes" 3230 g4neutronhpcrosssections=$g4data/$g4data_g4ndl_version 3231 else 3232 $echo "no" 3233 g4data_foundall="no" 3234 fi 3235 3236 ### G4ABLA 3237 $echo $n "checking for $g4data_g4abla_version... $c" 3238 if test -d "$g4data/$g4data_g4abla_version" ; then 3239 $echo "yes" 3240 g4levelgammadata=$g4data/$g4data_g4abla_version 3241 else 3242 $echo "no" 3243 g4data_foundall="no" 3244 fi 3245 3246 # 3247 # If we haven't found all the data, query the user as to whether they 3248 # want to 3249 # 1) try again with a different path 3250 # 2) use the path they input 3251 # 3) customize paths 3252 # 3253 if test "x$g4data_foundall" = "xyes" ; then 3254 promptend=yes 3255 else 3256 g4message=`cat << EOM 3257 3258 Failed to locate one or more of the Geant4 data libraries in 3259 3260 $g4data 3261 3262 Please enter 3263 1) Another path to search in 3264 2) 'f' to force the use of the path you entered previously (the data libraries 3265 are not needed to build Geant4, but are needed to run applications later). 3266 3) 'c' to customize the data paths, e.g. if you have the data libraries 3267 installed in different locations. 3268 EOM` 3269 dflt="f" 3270 rp=$g4message 3271 . ./myread 3272 gans=$ans 3273 3274 if test "x$gans" = "xf" ; then 3275 # Force paths 3276 promptend="yes" 3277 g4levelgammadata="$g4data/$g4data_photonevaporation_version" 3278 g4radioactivedata="$g4data/$g4data_radioactivedecay_version" 3279 g4ledata="$g4data/$g4data_g4emlow_version" 3280 g4neutronhpcrosssections="$g4data/$g4data_g4ndl_version" 3281 g4abladata="$g4data/$g4data_g4abla_version" 3282 3283 3284 elif test "x$gans" = "xc" ; then 3285 # enable customization - we use input g4data to set 3286 # defaults 3287 promptend="yes" 3288 g4data_customize="yes" 3289 3290 g4levelgammadata="$g4data/$g4data_photonevaporation_version" 3291 g4radioactivedata="$g4data/$g4data_radioactivedecay_version" 3292 g4ledata="$g4data/$g4data_g4emlow_version" 3293 g4neutronhpcrosssections="$g4data/$g4data_g4ndl_version" 3294 g4abladata="$g4data/$g4data_g4abla_version" 3295 3296 3297 else 3298 #try again 3299 g4data=$gans 3300 fi 3301 fi 3302 done 3303 3304 3305 # 3306 # Now customize paths if required 3307 # 3308 if test "x$g4data_customize" = "xyes" ; then 3309 while test "x" = "x" ; do 3310 3311 g4message=`cat <<EOM 3312 3313 You have chosen to customize the Geant4 data library paths. 3314 3315 1) $g4data_photonevaporation_version: 3316 $g4levelgammadata 3317 2) $g4data_radioactivedecay_version: 3318 $g4radioactivedata 3319 3) $g4data_g4emlow_version: 3320 $g4ledata 3321 4) $g4data_g4ndl_version: 3322 $g4neutronhpcrosssections 3323 5) $g4data_g4abla_version: 3324 $g4abladata 3325 3326 Choose a number from the list above to customize that path (e.g. 2) 3327 EOM` 3328 3329 dflt="Press [Enter] to exit customization with paths as above" 3330 rp=$g4message 3331 . ./myread 3332 gans=$ans 3240 3333 3241 3334 case $gans in 3242 3335 3243 1)3336 "1") 3244 3337 dflt=$g4levelgammadata 3245 3338 fn='d~' 3246 rp=" Where is Geant4 PhotonEvaporation2.0 data installed?"3339 rp="Custom path to $g4data_photonevaporation_version?" 3247 3340 . ./getfile 3248 3341 g4levelgammadata=$ans 3249 3342 ;; 3250 2) 3343 3344 "2") 3251 3345 dflt=$g4radioactivedata 3252 3346 fn='d~' 3253 rp=" Where is Geant4 RadioactiveDecay3.2 data installed?"3347 rp="Custom path to $g4data_radioactivedecay_version?" 3254 3348 . ./getfile 3255 3349 g4radioactivedata=$ans 3256 3350 ;; 3257 3) 3351 3352 "3") 3258 3353 dflt=$g4ledata 3259 3354 fn='d~' 3260 rp=" Where is G4EMLOW6.1 data installed?"3355 rp="Custom path to $g4data_g4emlow_version?" 3261 3356 . ./getfile 3262 3357 g4ledata=$ans 3263 3358 ;; 3264 4) 3359 3360 "4") 3265 3361 dflt=$g4neutronhpcrosssections 3266 3362 fn='d~' 3267 rp=" Where is G4NDL3.12 data installed?"3363 rp="Custom path to $g4data_g4ndl_version?" 3268 3364 . ./getfile 3269 3365 g4neutronhpcrosssections=$ans 3270 3366 ;; 3271 3367 3272 5)3368 "5") 3273 3369 dflt=$g4abladata 3274 3370 fn='d~' 3275 rp=" Where is G4ABLA3.0 data installed?"3371 rp="Custom path to $g4data_g4abla_version?" 3276 3372 . ./getfile 3277 3373 g4abladata=$ans 3278 3374 ;; 3279 3375 3280 # 5) 3281 # dflt=$g4elasticdata 3282 # fn='d~' 3283 # rp="Where is G4ELASTIC1.1 data installed?" 3284 # . ./getfile 3285 # g4elasticdata=$ans 3286 # ;; 3287 3288 # [eE]) 3289 # break 3290 # ;; 3291 *) 3376 *) 3292 3377 break 3293 # echo " " 3294 ;; 3378 ;; 3379 3295 3380 esac 3381 3296 3382 done 3383 fi 3384 3385 3386 3297 3387 3298 3388 … … 4355 4445 4356 4446 if test "X$g4osname" = "XLinux" ; then 4357 g4ui_xawflags=" -I$g4ui_xawhome/include " 4358 if test "X$g4ui_xawhome" = "X/usr/X11R6" ; then 4447 if test "X$g4ui_xawhome" = "X" ; then 4448 g4ui_xawflags="" 4449 else 4450 g4ui_xawflags=" -I$g4ui_xawhome/include " 4451 fi 4452 4453 if test "X$g4ui_xawhome" = "X/usr/X11R6" -o "X$g4ui_xawhome" = "X" ; then 4359 4454 g4ui_xawlibs=" -lXaw " 4360 4455 else 4361 g4ui_xawlibs=" -L$g4ui_xawhome/lib -lXaw " 4456 if test -d "$g4ui_xawhome/lib64" ; then 4457 g4ui_xawlibs=" -L$g4ui_xawhome/lib64 -lXaw " 4458 else 4459 g4ui_xawlibs=" -L$g4ui_xawhome/lib -lXaw " 4460 fi 4362 4461 fi 4363 4462 fi … … 4558 4657 4559 4658 if test "X$g4osname" = "XLinux"; then 4560 4561 if test "X$g4vis_xmhome" = "X/usr" -o "X$g4vis_xmhome" = "X/usr/local" ; then 4562 g4vis_xmhome="" 4563 fi 4659 if test "X$g4vis_xmhome" = "X/usr" -o "X$g4vis_xmhome" = "X/usr/local" ; then 4660 g4vis_xmhome="" 4661 fi 4564 4662 fi 4565 4663 fi # g4vis_build_opheglxm_driver … … 4577 4675 4578 4676 if test "X$g4osname" = "XLinux" ; then 4579 g4vis_xmflags=" -I$g4vis_xmhome/include " 4580 if test "X$g4vis_xmhome" = "X/usr/X11R6" ; then 4677 if test "X$g4vis_xmhome" = "X" ; then 4678 g4vis_xmflags="" 4679 else 4680 g4vis_xmflags=" -I$g4vis_xmhome/include " 4681 fi 4682 4683 if test "X$g4vis_xmhome" = "X/usr/X11R6" -o "X$g4vis_xmhome" = "X" ; then 4581 4684 g4vis_xmlibs=" -lXm -lXpm " 4582 4685 else 4583 g4vis_xmlibs=" -L$g4vis_xmhome/lib -lXm -lXpm " 4686 if test -d "$g4vis_xmhome/lib64" ; then 4687 g4vis_xmlibs=" -L$g4vis_xmhome/lib64 -lXm -lXpm " 4688 else 4689 g4vis_xmlibs=" -L$g4vis_xmhome/lib -lXm -lXpm " 4690 fi 4584 4691 fi 4585 4692 fi … … 5180 5287 5181 5288 if test "X$g4osname" = "XLinux" ; then 5182 g4vis_xmflags=" -I$g4vis_xmhome/include " 5183 if test "X$g4vis_xmhome" = "X/usr/X11R6" ; then 5289 if test "X$g4vis_xmhome" = "X" ; then 5290 g4vis_xmflags="" 5291 else 5292 g4vis_xmflags=" -I$g4vis_xmhome/include " 5293 fi 5294 5295 if test "X$g4vis_xmhome" = "X/usr/X11R6" -o "X$g4vis_xmhome" = "X" ; then 5184 5296 g4vis_xmlibs=" -lXm -lXpm " 5185 5297 else 5186 g4vis_xmlibs=" -L$g4vis_xmhome/lib -lXm -lXpm " 5298 if test -d "$g4vis_xmhome/lib64" ; then 5299 g4vis_xmlibs=" -L$g4vis_xmhome/lib64 -lXm -lXpm " 5300 else 5301 g4vis_xmlibs=" -L$g4vis_xmhome/lib -lXm -lXpm " 5302 fi 5187 5303 fi 5188 5304 fi -
trunk/Doxyfile
r885 r921 52 52 #--------------------------------------------------------------------------- 53 53 EXTRACT_ALL = YES 54 EXTRACT_PRIVATE = YES54 EXTRACT_PRIVATE = NO 55 55 EXTRACT_STATIC = YES 56 56 EXTRACT_LOCAL_CLASSES = YES … … 95 95 # configuration options related to the input files 96 96 #--------------------------------------------------------------------------- 97 INPUT = /Users/garnier/Work/Geant4-QtDriver/trunk/source/ visualization97 INPUT = /Users/garnier/Work/Geant4-QtDriver/trunk/source/interfaces 98 98 INPUT_ENCODING = UTF-8 99 99 FILE_PATTERNS = *.c \ -
trunk/config/G4VIS_USE.gmk
r790 r921 77 77 INC_GL = 1 78 78 LOAD_GL = 1 79 LOAD_GL2PS= 1 79 80 endif 80 81 … … 103 104 INC_IV = 1 104 105 LOAD_IV = 1 106 LOAD_GL2PS= 1 105 107 endif 106 108 -
trunk/config/History
r893 r921 1 $Id: History,v 1.3 36 2008/11/26 16:48:14 gcosmoExp $1 $Id: History,v 1.340 2008/12/04 14:59:44 lgarnier Exp $ 2 2 ------------------------------------------------------------------- 3 3 … … 16 16 * Reverse chronological order (last date on top), please * 17 17 ---------------------------------------------------------- 18 4th December 2008 : Laurent Garnier 19 - Darwin.gmk: Fix a mistake in GLlibs for Leopard. 20 21 4th December 2008 Gabriele Cosmo, Ben Morgan (config-V09-01-14) 22 - Linux-g++.gmk: implemented temporary workaround to allow for automatic 23 detection of location in non-POSIX paths for X11 and GL libraries depending 24 on 32/64 bits architectures. 25 26 3rd December 2008 Gabriele Cosmo (config-V09-01-13) 27 - Define $FIND, $SORT, $TOUCH variables to be customised with absolute 28 path in WIN32-VC in order to pick up correct Cygwin toolset. 29 30 1st December 2008 Ben Morgan (config-V09-01-12) 31 - Darwin-g++.gmk, Linux-g++.gmk: corrected definition of temporary QT3_MT 32 by adding missing protection. 18 33 19 34 24th November 2008 Laurent Garnier (config-V09-01-11) -
trunk/config/binmake.gmk
r886 r921 34 34 # Verify the existance of granular shared libraries (Unix) or global DLLs (Windows) 35 35 # 36 ifndef SHAREDLIBS37 SHAREDLIBS := $(shell test -f $(G4LIB)/$(G4SYSTEM)/libG4globman.$(SHEXT) && echo yes)38 endif39 36 ifneq (,$(findstring WIN32-VC,$(G4SYSTEM))) 40 37 SHAREDLIBS := $(shell test -f $(G4LIB)/$(G4SYSTEM)/G4global.$(SHEXT) && echo yes) … … 276 273 # (why?) the user is not supposed to be able to define... 277 274 # 278 LDLIBS 4+= $(LOADLIBS)275 LDLIBS5 += $(LOADLIBS) 279 276 280 277 # Finally assemble libraries... … … 285 282 else 286 283 # Again, do not use := or +=. See note on LDLIBS2 above. 287 LDLIBS_PREFINAL = $(LDLIBS1) $(LDLIBS2) $(LDLIBS2EXTRA) $(LDLIBS3) 284 LDLIBS_PREFINAL = $(LDLIBS1) $(LDLIBS2) $(LDLIBS2EXTRA) $(LDLIBS3) $(LDLIBS4) 288 285 # Version leaving out EXTRALIBS 289 LDLIBS_KERNEL = $(LDLIBS2) $(LDLIBS2EXTRA) $(LDLIBS3) 290 endif 291 LDLIBS_PREFINAL += $(LDLIBS 4)292 LDLIBS_KERNEL += $(LDLIBS 4)286 LDLIBS_KERNEL = $(LDLIBS2) $(LDLIBS2EXTRA) $(LDLIBS3) $(LDLIBS4) 287 endif 288 LDLIBS_PREFINAL += $(LDLIBS5) 289 LDLIBS_KERNEL += $(LDLIBS5) 293 290 294 291 ifneq (,$(findstring WIN32-VC,$(G4SYSTEM))) … … 354 351 ifdef CPPVERBOSE 355 352 $(CXX) $(CXXFLAGS) $(CPPFLAGS) \ 356 $(OUT)$(G4BINDIR)/$(G4TARGET) $(objects) $(LDFLAGS) \353 $(OUT)$(G4BINDIR)/$(G4TARGET) $(objects) $(LDFLAGS) \ 357 354 $(LDLIBS) 358 355 else 359 356 @echo Linking $(G4TARGET) ... 360 357 @$(CXX) $(CXXFLAGS) $(CPPFLAGS) \ 361 $(OUT)$(G4BINDIR)/$(G4TARGET) $(objects) $(LDFLAGS) \358 $(OUT)$(G4BINDIR)/$(G4TARGET) $(objects) $(LDFLAGS)\ 362 359 $(LDLIBS) 363 360 @if [ \( -f $(G4BINDIR)/$(G4TARGET) \) ]; then \ -
trunk/config/sys/Darwin-g++.gmk
r893 r921 66 66 ifeq ($(shell uname -r | sed 's/\([0-9]*\).[0-9]*.[0-9]*/\1/'),9) 67 67 # the following lines are for building on MacOSX 10.5 "Leopard" 68 OGLLIBS := $(shell test -f /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib && echo " -Wl,-dylib_file,/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib:/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib")68 OGLLIBS := $(shell test -f /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib && echo "-L/usr/X11R6/lib -lGLU -lGL -Wl,-dylib_file,/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib:/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib") 69 69 else 70 70 OGLLIBS := -L$(OGLHOME)/lib -lGLU -lGL … … 105 105 ifeq ($(QT_VERSION),3) 106 106 QTLIBS := -L$(QTHOME)$(QTLIBPATH) 107 QT3_MT := $(shell ls $(QTHOME)$(QTLIBPATH)/libqt-mt.* | wc -l )107 QT3_MT := $(shell ls $(QTHOME)$(QTLIBPATH)/libqt-mt.* 2>/dev/null | wc -l ) 108 108 ifneq ($(QT3_MT),0) 109 109 QTLIBS += -lqt-mt … … 128 128 129 129 define build-granular-shared-lib 130 @libdir=`(cd $(@D);/bin/pwd)`; \130 libdir=`(cd $(@D);/bin/pwd)`; \ 131 131 cd $(G4TMPDIR); \ 132 $(CXX) -dynamiclib -single_module -undefined dynamic_lookup \132 $(CXX) -dynamiclib -single_module -lgcov -undefined dynamic_lookup \ 133 133 -o $$libdir/$(@F) $(INTYLIBS) *.o 134 134 endef … … 136 136 @libdir=`(cd $(@D);/bin/pwd)`; \ 137 137 cd $(G4TMP)/$(G4SYSTEM); \ 138 $(CXX) -dynamiclib -single_module -undefined dynamic_lookup \138 $(CXX) -dynamiclib -single_module -lgcov -undefined dynamic_lookup \ 139 139 -o $$libdir/$(@F) $(INTYLIBS) $(foreach dir,$(SUBLIBS),$(dir)/*.o); 140 140 endef -
trunk/config/sys/Linux-g++.gmk
r893 r921 46 46 FCFLAGS += -fno-automatic -fno-backslash -fno-second-underscore 47 47 FCLIBS := -lg2c -lnsl 48 ECHO := /bin/echo -e 49 SHEXT := so 48 ECHO := /bin/echo -e 49 SHEXT := so 50 ARCH := $(shell uname -m | cut -s -d "_" -f 2) 51 50 52 ifndef X11FLAGS 51 53 X11FLAGS := -I/usr/include/X11/extensions -I/usr/include/X11 52 54 endif 53 55 ifndef X11LIBS 54 X11LIBS := -L/usr/X11R6/lib -lXmu -lXt -lXext -lX11 -lSM -lICE56 X11LIBS := -L/usr/X11R6/lib$(ARCH) -lXmu -lXt -lXext -lX11 -lSM -lICE 55 57 endif 56 58 ifndef XMFLAGS … … 59 61 ifndef XMLIBS 60 62 XMLIBS := -lXm -lXpm 63 endif 64 ifndef XAWFLAGS 65 XAWFLAGS := -I/usr/X11R6/include 66 endif 67 ifndef XAWLIBS 68 XAWLIBS := -lXaw 69 endif 70 DLDLIBS := -ldl 71 ifndef OGLFLAGS 72 OGLFLAGS := -I$(OGLHOME)/include 73 endif 74 ifndef OGLLIBS 75 OGLLIBS := -L$(OGLHOME)/lib$(ARCH) -lGLU -lGL 61 76 endif 62 77 … … 95 110 QTLIBS := -L$(QTHOME)$(QTLIBPATH) 96 111 ifeq ($(QT_VERSION),3) 97 QT3_MT := $(shell ls $(QTHOME)$(QTLIBPATH)/libqt-mt.* | wc -l )112 QT3_MT := $(shell ls $(QTHOME)$(QTLIBPATH)/libqt-mt.* 2>/dev/null | wc -l ) 98 113 ifneq ($(QT3_MT),0) 99 114 QTLIBS += -lqt-mt … … 116 131 #---------------------------------------------------------------------------- 117 132 118 ifndef XAWFLAGS119 XAWFLAGS := -I/usr/X11R6/include120 endif121 ifndef XAWLIBS122 XAWLIBS := -lXaw123 endif124 DLDLIBS := -ldl125 ifndef OGLFLAGS126 OGLFLAGS := -I$(OGLHOME)/include127 endif128 ifndef OGLLIBS129 OGLLIBS := -L$(OGLHOME)/lib -lGLU -lGL130 endif131 133 define build-granular-shared-lib 132 134 @libdir=`(cd $(@D);/bin/pwd)`; \ -
trunk/config/sys/WIN32-VC.gmk
r893 r921 14 14 CXXFLAGS += -D_CONSOLE -D_WIN32 -DOS 15 15 CPPFLAGS += -DWIN32 -DXPNET -D_CRT_SECURE_NO_DEPRECATE 16 LDFLAGS += -FORCE /NODEFAULTLIB:MSVCRT.dll 16 LDFLAGS += -FORCE /NODEFAULTLIB:MSVCRT.dll /VERBOSE:lib 17 17 18 18 SHEXT := dll 19 19 AR := LIB 20 20 ECHO := /usr/bin/echo -e 21 FIND := /usr/bin/find 22 SORT := /usr/bin/sort 21 23 GREP := /usr/bin/grep 22 24 SED := /usr/bin/sed 23 25 CAT := /usr/bin/cat 24 26 CUT := /usr/bin/cut 27 TOUCH := /usr/bin/touch 25 28 26 29 FC := g77 … … 56 59 ifndef GLQTLIBS 57 60 ifeq ($(QT_VERSION),QT3) 58 QTLIBS := -L$(QTHOME)/lib -lqt-mt61 GLQTLIBS := -L$(QTHOME)/lib -lqt-mt 59 62 else 60 QTLIBS := -L$(QTHOME)/lib QtCore4.lib QtGui4.lib QtOpenGL4.lib63 GLQTLIBS := -L$(QTHOME)/lib QtCore4.lib QtGui4.lib QtOpenGL4.lib 61 64 endif 62 65 endif -
trunk/documents/UserDoc/DocBookUsersGuides/ChangesHistory/ChangesHistory.html
r904 r921 15 15 16 16 <br /><br /><br /><br /> 17 18 <!-- ============================================== Section --> 19 <HR ALIGN="Center"> 20 <font COLOR="#238E23"> 21 <h2>Version: Geant4 9.2 (December 2008) </h2> 22 </font> 23 <HR ALIGN="Center"> 24 <br /> 25 26 <p> 27 <b><u>User's Guide: For Application Developers</u></b> 28 </p> 29 <ul> 30 <b>- Newly Added Chapters/Sections</b> 31 <ul> 32 <li>4.1.14. Importing ASCII Text Models 33 <li>Appendix Python Interface 34 </ul> 35 <br /> 36 37 <b>- Modified Chapters/Sections</b> 38 <ul> 39 <li>2.1. How to Define the main() Program 40 <li>2.4. How to Specify Particles 41 <li>2.10. How to Visualize the Detector and Events 42 <li>2.8. How to Set Up an Interactive Session 43 <li>3.1. Class Categories and Domains 44 <li>4.1.2. Solids 45 <li>4.1.3. Logical Volumes 46 <li>4.1.6. Creating an Assembly of Volumes 47 <li>4.1.8. The Geometry Navigator 48 <li>4.1.9. A Simple Geometry Editor 49 <li>4.1.10. Converting Geometries from Geant3.21 50 <li>4.1.13. Importing XML Models Using GDML 51 <li>4.7. Parallel Geometries 52 <li>4.6. Object Persistency 53 <li>5.2. Physics Processes 54 <li>5.3.2 Definition of a particle 55 <li>5.6. Physics Table 56 <li>8.1. Introduction to Visualization 57 <li>8.2. Adding Visualization to Your Executable 58 <li>8.4. Controlling Visualization from Commands 59 <li>8.10. Making a Movie 60 <li>9.3. Advanced Examples 61 <li>Appendix CLHEP Foundation Library 62 <li>Appendix Development and debug tools 63 <li>Appendix Makefiles and Environment Variables 64 <li>Appendix Tips for Program Compilation 65 </ul> 66 </ul> 67 68 <p> 69 <b><u>User's Guide: For Toolkit Developers</u></b> 70 </p> 71 <ul> 72 <b>- Newly Added Chapters/Sections</b> 73 <ul> 74 <li>3.3. Particles 75 </ul> 76 </ul> 77 78 <p> 79 <b><u>Installation Guide</u></b> 80 </p> 81 <ul> 82 <b>- Modified Chapters/Sections</b> 83 <ul> 84 <li>1. Installation Introduction 85 <li>2. Installation Procedures 86 </ul> 87 </ul> 88 89 <p> 90 <b><u>Physics Reference Manual</u></b> 91 </p> 92 93 <ul> 94 <b>- Modified Chapters/Sections</b> 95 <ul> 96 <li>5.1 The Interaction Length or Mean Free Path 97 <li>6.1 Introduction 98 <li>7.2 Energy loss fluctuations 99 <li>7.4 Conversion from range cut to kinetic energy cut 100 <li>7.5 Multiple Scattering 101 <li>8.1 Ionization 102 103 </ul> 104 </ul> 105 17 106 18 107 <!-- ============================================== Section --> -
trunk/documents/UserDoc/DocBookUsersGuides/FAQ/xml/BookFAQ.xml
r904 r921 31 31 </authorgroup> 32 32 33 <pubdate>1 4 December, 2007</pubdate>34 <releaseinfo>Version: geant4 9. 1</releaseinfo>33 <pubdate>19 December, 2008</pubdate> 34 <releaseinfo>Version: geant4 9.2</releaseinfo> 35 35 36 36 </bookinfo> -
trunk/documents/UserDoc/DocBookUsersGuides/FAQ/xml/XSLCustomizationLayer/G4XSLCustomFO.xsl
r904 r921 10 10 <!-- Import the FO stylesheet --> 11 11 <!-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> 12 <xsl:import href="/usr/share/xml/docbook/stylesheet/nwalsh/ current/fo/docbook.xsl"/>12 <xsl:import href="/usr/share/xml/docbook/stylesheet/nwalsh/fo/docbook.xsl" /> 13 13 14 14 <!-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> -
trunk/documents/UserDoc/DocBookUsersGuides/FAQ/xml/XSLCustomizationLayer/G4XSLCustomHTML.xsl
r904 r921 9 9 <!-- Import the stylesheet to chunk the html output --> 10 10 <!-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> 11 <xsl:import href="/usr/share/xml/docbook/stylesheet/nwalsh/ current/html/chunk.xsl" />11 <xsl:import href="/usr/share/xml/docbook/stylesheet/nwalsh/html/chunk.xsl" /> 12 12 13 13 <!-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> -
trunk/documents/UserDoc/DocBookUsersGuides/ForApplicationDeveloper/output.html
r904 r921 433 433 </a></span></dt><dt><span class="sect2"><a href="#sect.VisDrv.OpenGL"> 434 434 OpenGL 435 </a></span></dt><dt><span class="sect2"><a href="#sect.VisDrv.Qt"> 436 Qt 435 437 </a></span></dt><dt><span class="sect2"><a href="#sect.VisDrv.OpenInv"> 436 438 OpenInventor … … 559 561 </a></span></dt><dd><dl><dt><span class="sect2"><a href="#sect.MkMovie.OGLX"> 560 562 OGLX 563 </a></span></dt><dt><span class="sect2"><a href="#sect.MkMovie.Qt"> 564 Qt 561 565 </a></span></dt><dt><span class="sect2"><a href="#sect.MkMovie.DAWNFILE"> 562 566 DAWNFILE … … 711 715 </a></dt><dt>9.3. <a href="#table.ExmpNvc_3"> 712 716 The ``item chart'' for novice level example N07. 713 </a></dt><dt>9.4. <a href="#id62 6437">717 </a></dt><dt>9.4. <a href="#id627358"> 714 718 TestEm by theme 715 719 </a></dt></dl></div><div class="list-of-examples"><p><b>List of Examples</b></p><dl><dt>2.1. <a href="#programlist_HowToDefMain_1"> … … 818 822 </a></dt><dt>4.16. <a href="#programlist_Hits_3"> 819 823 An example of accessing to G4THitsMap objects. 820 </a></dt><dt>4.17. <a href="#id50933 2">824 </a></dt><dt>4.17. <a href="#id509333"> 821 825 An example header file of a concrete user parallel world class. 822 826 </a></dt><dt>4.18. <a href="#id509408"> … … 825 829 Typical implementation in the main() to define a parallel 826 830 world. 827 </a></dt><dt>4.20. <a href="#id50958 1">831 </a></dt><dt>4.20. <a href="#id509582"> 828 832 Define G4ParallelWorldScoringProcess. 829 </a></dt><dt>4.21. <a href="#id51022 1">833 </a></dt><dt>4.21. <a href="#id510222"> 830 834 A user main() to use the command-based scoring 831 </a></dt><dt>4.22. <a href="#id51034 6">835 </a></dt><dt>4.22. <a href="#id510347"> 832 836 UI commands to define a scoring mesh and scorers 833 837 </a></dt><dt>5.1. <a href="#programlist_PhysProc_1"> … … 3236 3240 supports a diverse family of graphics systems. Some of these 3237 3241 graphics systems use a graphics library compiled with Geant4, such 3238 as OpenGL, while others involve a separate application, such as3242 as OpenGL, Qt or OpenInventor, while others involve a separate application, such as 3239 3243 WIRED or DAWN. 3240 3244 </p><p> … … 3389 3393 without an argument, and then execute the commands below in the 3390 3394 "Idle>" state. Explanation of each command will be described 3391 later. (Note that the OpenGL-Xlib driver and the DAWNFILE driver3395 later. (Note that the OpenGL-Xlib driver, Qt driver and the DAWNFILE driver 3392 3396 are incorporated into the executable, and that Fukui Renderer DAWN 3393 3397 is installed in your machine. ) … … 3753 3757 graphics functionality had been implemented already by the 3754 3758 alpha-release. The OO design of the visualization component allowed 3755 us to develop several drivers independently, such as for OpenGL and3759 us to develop several drivers independently, such as for OpenGL, Qt and 3756 3760 OpenInventor (for X11 and Windows), DAWN, Postscript (via DAWN) and 3757 3761 VRML. … … 5884 5888 time. Weight roulette is applied in order to solve this 5885 5889 problem. 5886 </p><h4><a name="id44710 8"></a>5890 </p><h4><a name="id447109"></a> 5887 5891 The weight roulette concept 5888 5892 </h4><p> … … 6262 6266 and their sections, Cones and their sections, Spheres, Wedges, and 6263 6267 Toruses. 6264 </p><h4><a name="id45692 4"></a>6268 </p><h4><a name="id456925"></a> 6265 6269 Box: 6266 6270 </h4><p> … … 6300 6304 G4Box* aBox = new G4Box("BoxA", 1.0*cm, 3.0*cm, 5.0*cm); 6301 6305 </pre></div><p> 6302 </p><h4><a name="id4571 59"></a>6306 </p><h4><a name="id457160"></a> 6303 6307 Cylindrical Section or Tube: 6304 6308 </h4><p> … … 6368 6372 the angle of the segment in radians 6369 6373 </td><td class="auto-generated"> </td><td class="auto-generated"> </td></tr></tbody></table></div><p> 6370 </p><h4><a name="id45763 2"></a>6374 </p><h4><a name="id457633"></a> 6371 6375 Parallelepiped: 6372 6376 </h4><p> … … 6402 6406 -dz and +dz in z 6403 6407 </td></tr></tbody></table></div><p> 6404 </p><h4><a name="id45783 5"></a>6408 </p><h4><a name="id457836"></a> 6405 6409 Trapezoid: 6406 6410 </h4><p> … … 6507 6511 two angles have to be the 6508 6512 same due to the planarity condition. 6509 </p><h4><a name="id45850 2"></a>6513 </p><h4><a name="id458503"></a> 6510 6514 Sphere or Spherical Shell Section: 6511 6515 </h4><p> … … 6583 6587 Outer radius 6584 6588 </td></tr></tbody></table></div><p> 6585 </p><h4><a name="id45887 7"></a>6589 </p><h4><a name="id458878"></a> 6586 6590 Torus: 6587 6591 </h4><p> … … 6632 6636 documentation contains a detailed EXPRESS description of each CSG 6633 6637 solid. 6634 </p><h3><a name="id45908 0"></a>6638 </p><h3><a name="id459081"></a> 6635 6639 Specific CSG Solids 6636 6640 </h3><h4><a name="id459089"></a> … … 6704 6708 z coordinate of corners 6705 6709 </td></tr></tbody></table></div><p> 6706 </p><h4><a name="id4593 19"></a>6710 </p><h4><a name="id459320"></a> 6707 6711 Polyhedra (PGON): 6708 6712 </h4><p> … … 6764 6768 z coordinate of corners 6765 6769 </td></tr></tbody></table></div><p> 6766 </p><h4><a name="id45960 1"></a>6770 </p><h4><a name="id459602"></a> 6767 6771 Tube with an elliptical cross section: 6768 6772 </h4><p> … … 6797 6801 Half length Z 6798 6802 </td></tr></tbody></table></div><p> 6799 </p><h4><a name="id45976 7"></a>6803 </p><h4><a name="id459768"></a> 6800 6804 General Ellipsoid: 6801 6805 </h4><p> … … 6846 6850 upper cut plane level, z 6847 6851 </td></tr></tbody></table></div><p> 6848 </p><h4><a name="id45997 0"></a>6852 </p><h4><a name="id459971"></a> 6849 6853 Cone with Elliptical Cross Section: 6850 6854 </h4><p> … … 6899 6903 <tt class="literal">u</tt> between <tt class="literal">0</tt> and 6900 6904 <tt class="literal">h</tt> respectively. 6901 </p><h4><a name="id46020 7"></a>6905 </p><h4><a name="id460208"></a> 6902 6906 Paraboloid, a solid with parabolic profile: 6903 6907 </h4><p> … … 6938 6942 Radius at +Dz greater than R1 6939 6943 </td></tr></tbody></table></div><p> 6940 </p><h4><a name="id46038 3"></a>6944 </p><h4><a name="id460384"></a> 6941 6945 Tube with Hyperbolic Profile: 6942 6946 </h4><p> … … 6984 6988 Half length in Z 6985 6989 </td></tr></tbody></table></div><p> 6986 </p><h4><a name="id4606 29"></a>6990 </p><h4><a name="id460630"></a> 6987 6991 Tetrahedra: 6988 6992 </h4><p> … … 7022 7026 Flag indicating degeneracy of points 7023 7027 </td></tr><tr><td> </td><td> </td></tr></tbody></table></div><p> 7024 </p><h4><a name="id46084 1"></a>7028 </p><h4><a name="id460842"></a> 7025 7029 Extruded Polygon: 7026 7030 </h4><p> … … 7064 7068 Scale of the side in -hz and +hz respectively 7065 7069 </td></tr></tbody></table></div><p> 7066 </p><h4><a name="id46106 8"></a>7070 </p><h4><a name="id461069"></a> 7067 7071 Box Twisted: 7068 7072 </h4><p> … … 7095 7099 Half z length 7096 7100 </td></tr></tbody></table></div><p> 7097 </p><h4><a name="id46126 4"></a>7101 </p><h4><a name="id461265"></a> 7098 7102 Trapezoid Twisted along One Axis: 7099 7103 </h4><p> … … 7169 7173 Angle with respect to the y axis from the centre of the side 7170 7174 </td></tr></tbody></table></div><p> 7171 </p><h4><a name="id46162 0"></a>7175 </p><h4><a name="id461621"></a> 7172 7176 Twisted Trapezoid with <tt class="literal">x</tt> and <tt class="literal">y</tt> dimensions 7173 7177 varying along <tt class="literal">z</tt>: … … 7412 7416 7413 7417 7414 </p><h4><a name="id46240 5"></a>7418 </p><h4><a name="id462406"></a> 7415 7419 Specific BREP Solids: 7416 7420 </h4><p> … … 7645 7649 outside. 7646 7650 </td></tr></tbody></table></div><p> 7647 </p><h4><a name="id46318 2"></a>7651 </p><h4><a name="id463183"></a> 7648 7652 Importing CAD models as tessellated shapes 7649 7653 </h4><p> … … 7954 7958 cylindrical coordinate. The Repeated Volumes technique is available 7955 7959 for volumes described by CSG solids. 7956 </p><h4><a name="id4713 09"></a>7960 </p><h4><a name="id471310"></a> 7957 7961 Replicas: 7958 7962 </h4><p> … … 8339 8343 8340 8344 8341 </p><h4><a name="id47245 8"></a>8345 </p><h4><a name="id472459"></a> 8342 8346 Advanced parameterisations for 'nested' parameterised volumes 8343 8347 </h4><p> … … 9328 9332 alternative <tt class="literal">G4Navigator</tt> object (which can then be assigned 9329 9333 to the world-volume), or access the information through the step. 9330 </p><h4><a name="id47874 4"></a>9334 </p><h4><a name="id478745"></a> 9331 9335 Using the 'step' to retrieve geometrical information 9332 9336 </h4><p> … … 9360 9364 GetTopTransform().TransformPoint(worldPosition); 9361 9365 </pre></div><p> 9362 </p><h4><a name="id4787 89"></a>9366 </p><h4><a name="id478790"></a> 9363 9367 Using an alternative navigator to locate points 9364 9368 </h4><p> … … 9463 9467 be inside one of the voxels and it will be only necessary to calculate 9464 9468 the distance to the walls of the current voxel. 9465 </p><h4><a name="id47903 8"></a>9469 </p><h4><a name="id479039"></a> 9466 9470 Skipping borders of voxels with same material 9467 9471 </h4><p> … … 9478 9482 G4RegularParameterisation::SetSkipEqualMaterials( G4bool skip ); 9479 9483 </pre></div><p> 9480 </p><h4><a name="id47906 6"></a>9484 </p><h4><a name="id479067"></a> 9481 9485 Example 9482 9486 </h4><p> … … 11336 11340 11337 11341 or any combination of the above. 11338 </p><h4><a name="id50332 2"></a>11342 </p><h4><a name="id503323"></a> 11339 11343 G4VHit 11340 11344 </h4><p> … … 11352 11356 Polylines, Markers and Text 11353 11357 ”</a>. 11354 </p><h4><a name="id5033 69"></a>11358 </p><h4><a name="id503370"></a> 11355 11359 G4THitsCollection 11356 11360 </h4><p> … … 11373 11377 object, that is a container class of collections of hits. Hit collections are 11374 11378 stored by their pointers, whose type is that of the base class. 11375 </p><h4><a name="id50343 0"></a>11379 </p><h4><a name="id503431"></a> 11376 11380 An example of a concrete hit class 11377 11381 </h4><p> … … 11463 11467 base class for a customized trajectory class, since 11464 11468 <span class="emphasis"><em>G4Trajectory</em></span> uses <span class="emphasis"><em>G4Allocator</em></span>. 11465 </p><h4><a name="id50352 7"></a>11469 </p><h4><a name="id503528"></a> 11466 11470 G4THitsMap 11467 11471 </h4><p> … … 11497 11501 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="sect.Hits.SensDet"></a> 11498 11502 Sensitive detector 11499 </h3></div></div><div></div></div><h4><a name="id50361 8"></a>11503 </h3></div></div><div></div></div><h4><a name="id503619"></a> 11500 11504 G4VSensitiveDetector 11501 11505 </h4><p> … … 11622 11626 sensitive detector object, it is perfectly possible to have several 11623 11627 Readout geometries in parallel. 11624 </p><h4><a name="id50399 4"></a>11628 </p><h4><a name="id503995"></a> 11625 11629 Definition of a virtual geometry setup 11626 11630 </h4><p> … … 11699 11703 <span class="emphasis"><em>G4SDManager</em></span> is the singleton manager class for sensitive 11700 11704 detectors. 11701 </p><h4><a name="id50422 8"></a>11705 </p><h4><a name="id504229"></a> 11702 11706 Activation/inactivation of sensitive detectors 11703 11707 </h4><p> … … 11723 11727 will inactivate all detectors belonging to the <tt class="literal">myCal</tt> 11724 11728 category. 11725 </p><h4><a name="id50429 1"></a>11729 </p><h4><a name="id504292"></a> 11726 11730 Access to the hit collections 11727 11731 </h4><p>Hit collections are accessed for various cases. … … 12001 12005 <span class="emphasis"><em>Weighted()</em></span> method of this class object is invoked. 12002 12006 </p></dd></dl></div><p> 12003 </p><h4><a name="id50473 1"></a>12007 </p><h4><a name="id504732"></a> 12004 12008 <span class="bold"><b>Deposited energy scorers</b></span> 12005 12009 </h4><p> … … 12022 12026 weight is multiplied at each step. 12023 12027 </p></dd></dl></div><p> 12024 </p><h4><a name="id50479 2"></a>12028 </p><h4><a name="id504793"></a> 12025 12029 <span class="bold"><b>Current and flux scorers</b></span> 12026 12030 </h4><p> … … 12091 12095 calculation. 12092 12096 </p></dd></dl></div><p> 12093 </p><h4><a name="id50492 7"></a>12097 </p><h4><a name="id504928"></a> 12094 12098 <span class="bold"><b>Other scorers</b></span> 12095 12099 </h4><p> … … 12275 12279 simulate pile up 12276 12280 </p></li></ul></div><p> 12277 </p><h4><a name="id50787 3"></a>12281 </p><h4><a name="id507874"></a> 12278 12282 G4VDigi 12279 12283 </h4><p> … … 12283 12287 class should be defined by yourself. <span class="emphasis"><em>G4VDigi</em></span> has two virtual 12284 12288 methods, <tt class="literal">Draw()</tt> and <tt class="literal">Print()</tt>. 12285 </p><h4><a name="id50790 8"></a>12289 </p><h4><a name="id507909"></a> 12286 12290 G4TDigiCollection 12287 12291 </h4><p> … … 12312 12316 collection(s) should be associated with the <span class="emphasis"><em>G4DCofThisEvent</em></span> 12313 12317 object. 12314 </p><h4><a name="id50802 4"></a>12318 </p><h4><a name="id508025"></a> 12315 12319 G4DigiManager 12316 12320 </h4><p> … … 12341 12345 MyDigitizer * myDM = fDM->Digitize( "/myDet/myCal/myEMdigiMod" ); 12342 12346 </pre></div><p> 12343 </p><h4><a name="id508 099"></a>12347 </p><h4><a name="id508100"></a> 12344 12348 How to get hitsCollection and/or digiCollection 12345 12349 </h4><p> … … 12496 12500 class <span class="emphasis"><em>G4VUserParallelWorld</em></span>. 12497 12501 12498 </p><div class="example"><a name="id50933 2"></a><p class="title"><b>Example 4.17.12502 </p><div class="example"><a name="id509333"></a><p class="title"><b>Example 4.17. 12499 12503 An example header file of a concrete user parallel world class. 12500 12504 </b></p><pre class="programlisting"> … … 12617 12621 respectively and registered to the particles. 12618 12622 12619 </p><div class="example"><a name="id50958 1"></a><p class="title"><b>Example 4.20.12623 </p><div class="example"><a name="id509582"></a><p class="title"><b>Example 4.20. 12620 12624 Define <tt class="literal">G4ParallelWorldScoringProcess</tt>. 12621 12625 </b></p><pre class="programlisting"> … … 12678 12682 the instantiation of <tt class="literal">G4RunManager</tt>. 12679 12683 12680 </p><div class="example"><a name="id51022 1"></a><p class="title"><b>Example 4.21.12684 </p><div class="example"><a name="id510222"></a><p class="title"><b>Example 4.21. 12681 12685 A user <tt class="literal">main()</tt> to use the command-based scoring 12682 12686 </b></p><pre class="programlisting"> … … 12723 12727 size of which is 2 m * 2 m * 2 m, and sliced into 30 cells along each axes. For each cell energy deposition, 12724 12728 number of steps of gamma, number of steps of electron and number of steps of positron are scored. 12725 </p><div class="example"><a name="id51034 6"></a><p class="title"><b>Example 4.22.12729 </p><div class="example"><a name="id510347"></a><p class="title"><b>Example 4.22. 12726 12730 UI commands to define a scoring mesh and scorers 12727 12731 </b></p><pre class="programlisting"> … … 12871 12875 </h2></div></div><div></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="sect.Track.Basic"></a> 12872 12876 Basic Concepts 12873 </h3></div></div><div></div></div><h4><a name="id53145 7"></a>12877 </h3></div></div><div></div></div><h4><a name="id531458"></a> 12874 12878 Philosophy of Tracking 12875 12879 </h4><p> … … 12971 12975 One step completed. 12972 12976 </p></li></ol></div><p> 12973 </p><h4><a name="id53170 4"></a>12977 </p><h4><a name="id531705"></a> 12974 12978 What is a Step? 12975 12979 </h4><p> … … 12981 12985 properties, such as energy and momentum, are updated as the various 12982 12986 active processes are invoked. 12983 </p><h4><a name="id53174 0"></a>12987 </p><h4><a name="id531741"></a> 12984 12988 What is a Track? 12985 12989 </h4><p> … … 13213 13217 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="sect.Track.Traj"></a> 13214 13218 Trajectory and Trajectory Point 13215 </h3></div></div><div></div></div><h4><a name="id53249 7"></a>13219 </h3></div></div><div></div></div><h4><a name="id532498"></a> 13216 13220 G4Trajectory and G4TrajectoryPoint 13217 13221 </h4><p> … … 13275 13279 cross a geometrical boundary. Thus a drawn trajectory may not be 13276 13280 circular. 13277 </p></div><h4><a name="id53270 0"></a>13281 </p></div><h4><a name="id532701"></a> 13278 13282 Customizing trajectory and trajectory point 13279 13283 </h4><p> … … 13390 13394 <a href="#brhead.PhysProc.PrtChng"> 13391 13395 Particle Change</a>). 13392 </p><h4><a name="id53449 0"></a>13396 </p><h4><a name="id534491"></a> 13393 13397 G4VProcess 13394 13398 </h4><p> … … 13498 13502 </p><p> 13499 13503 </p></li></ul></div><p> 13500 </p><h4><a name="id5348 09"></a>13504 </p><h4><a name="id534810"></a> 13501 13505 Other base classes for processes 13502 13506 </h4><p> … … 14183 14187 These processes apply to electrons, protons, hydrogen, alpha particles and 14184 14188 their charge states. 14185 </p><h4><a name="id53654 0"></a>14189 </p><h4><a name="id536541"></a> 14186 14190 Electron processes 14187 14191 </h4><p> … … 14210 14214 </p></li></ul></div><p> 14211 14215 </p></li></ul></div><p> 14212 </p><h4><a name="id53662 6"></a>14216 </p><h4><a name="id536627"></a> 14213 14217 Proton processes 14214 14218 </h4><p> … … 14261 14265 </p></li></ul></div><p> 14262 14266 </p></li></ul></div><p> 14263 </p><h4><a name="id53679 3"></a>14267 </p><h4><a name="id536794"></a> 14264 14268 Helium (neutral) processes 14265 14269 </h4><p> … … 14286 14290 </p></li></ul></div><p> 14287 14291 </p></li></ul></div><p> 14288 </p><h4><a name="id53687 6"></a>14292 </p><h4><a name="id536877"></a> 14289 14293 Helium+ (ionized once) processes 14290 14294 </h4><p> … … 14318 14322 </p></li></ul></div><p> 14319 14323 </p></li></ul></div><p> 14320 </p><h4><a name="id53698 0"></a>14324 </p><h4><a name="id536981"></a> 14321 14325 Helium++ (ionised twice) processes 14322 14326 </h4><p> … … 14495 14499 </p><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="sect.PhysProc.Had.TreatCross"></a> 14496 14500 Treatment of Cross Sections 14497 </h4></div></div><div></div></div><h4><a name="id53715 1"></a>14501 </h4></div></div><div></div></div><h4><a name="id537152"></a> 14498 14502 Cross section data sets 14499 14503 </h4><p> … … 14541 14545 internal database and/or other state information, for the given 14542 14546 particle type, to the standard output stream. 14543 </p><h4><a name="id53726 8"></a>14547 </p><h4><a name="id537269"></a> 14544 14548 Cross section data store 14545 14549 </h4><p> … … 14609 14613 This method may be used to request the data store to invoke the 14610 14614 <tt class="literal">DumpPhysicsTable</tt> method of each of its data sets. 14611 </p><h4><a name="id53743 8"></a>14615 </p><h4><a name="id537439"></a> 14612 14616 Default cross sections 14613 14617 </h4><p> … … 14676 14680 of the respective mean free paths of a given particle in a given 14677 14681 material. 14678 </p><h4><a name="id53758 3"></a>14682 </p><h4><a name="id537584"></a> 14679 14683 Cross-sections for low energy neutron transport 14680 14684 </h4><p> … … 14704 14708 </p></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="sect.PhysProc.Had.AtRest"></a> 14705 14709 Hadrons at Rest 14706 </h4></div></div><div></div></div><h4><a name="id53765 3"></a>14710 </h4></div></div><div></div></div><h4><a name="id537654"></a> 14707 14711 List of implemented "Hadron at Rest" processes 14708 14712 </h4><p> … … 14775 14779 </p><p> 14776 14780 </p></li></ul></div><p> 14777 </p><h4><a name="id53784 2"></a>14781 </p><h4><a name="id537843"></a> 14778 14782 Example of how to use a hadron at rest process 14779 14783 </h4><p> … … 14839 14843 n, n-bar 14840 14844 </td></tr></tbody></table></div><p> 14841 </p><h4><a name="id53809 8"></a>14845 </p><h4><a name="id538099"></a> 14842 14846 How to register Models 14843 14847 </h4><p> … … 14971 14975 void SetMaxEnergy( const G4double anEnergy ) 14972 14976 </pre></div><p> 14973 </p><h4><a name="id53837 3"></a>14977 </p><h4><a name="id538374"></a> 14974 14978 Which models are there, and what are the defaults 14975 14979 </h4><p> … … 15539 15543 </p></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="sect.PhysProc.Photo.Track"></a> 15540 15544 Tracking of Photons in <tt class="literal">processes/optical</tt> 15541 </h4></div></div><div></div></div><h4><a name="id53960 3"></a>15545 </h4></div></div><div></div></div><h4><a name="id539604"></a> 15542 15546 Absorption 15543 15547 </h4><p> … … 15551 15555 the medium; i.e. it is the mean free path returned by the 15552 15556 <tt class="literal">GetMeanFreePath</tt> method. 15553 </p><h4><a name="id53965 1"></a>15557 </p><h4><a name="id539652"></a> 15554 15558 Rayleigh Scattering 15555 15559 </h4><p> … … 15595 15599 <tt class="literal">RayleighAttenuationLengthGenerator</tt> 15596 15600 which calculates it for 10 degrees Celsius liquid water. 15597 </p><h4><a name="id53978 2"></a>15601 </p><h4><a name="id539783"></a> 15598 15602 Boundary Process 15599 15603 </h4><p> … … 15924 15928 </p></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="sect.PhysProc.Param.FastSimModel"></a> 15925 15929 The <tt class="literal">G4VFastSimulationModel</tt> Abstract Class 15926 </h4></div></div><div></div></div><h4><a name="id54046 1"></a>15930 </h4></div></div><div></div></div><h4><a name="id540462"></a> 15927 15931 Constructors: 15928 15932 </h4><p> … … 15949 15953 placed, you can set the boolean value to "true". 15950 15954 </p></dd></dl></div><p> 15951 </p><h4><a name="id5405 49"></a>15955 </p><h4><a name="id540550"></a> 15952 15956 Virtual methods: 15953 15957 </h4><p> … … 16030 16034 Parameterisation Using Ghost Geometries 16031 16035 ”</a>. 16032 </p><h4><a name="id54075 6"></a>16036 </p><h4><a name="id540757"></a> 16033 16037 Constructor: 16034 16038 </h4><p> … … 16049 16053 G4Region* and G4bool values of the model constructor. 16050 16054 </p></dd></dl></div><p> 16051 </p><h4><a name="id54079 8"></a>16055 </p><h4><a name="id540799"></a> 16052 16056 G4VFastSimulationModel object management: 16053 16057 </h4><p> … … 16062 16066 G4VFastSimulationModel*)</b></span></tt> 16063 16067 </p></li></ul></div><p> 16064 </p><h4><a name="id54085 0"></a>16068 </p><h4><a name="id540851"></a> 16065 16069 Interface with the G4FastSimulationManagerProcess: 16066 16070 </h4><p> … … 16467 16471 same as those in your Geant4 application (as far as you do not 16468 16472 change source codes). 16469 </p><h4><a name="id54926 8"></a>16473 </p><h4><a name="id549269"></a> 16470 16474 Categories 16471 16475 </h4><p> … … 17612 17616 to define the detector, specify the physics to be used, and 17613 17617 describe how initial particles are to be generated. 17614 </p><h4><a name="id57104 5"></a>17618 </p><h4><a name="id571046"></a> 17615 17619 <tt class="literal">G4VUserDetectorConstruction</tt> 17616 17620 </h4><p> … … 17628 17632 }; 17629 17633 </pre></div><p> 17630 </p><h4><a name="id57108 8"></a>17634 </p><h4><a name="id571089"></a> 17631 17635 <tt class="literal">G4VUserPhysicsList</tt> 17632 17636 </h4><p> … … 17856 17860 methods. Objects of user action classes must be registered with 17857 17861 <tt class="literal">G4RunManager</tt>. 17858 </p><h4><a name="id57168 4"></a>17862 </p><h4><a name="id571685"></a> 17859 17863 <tt class="literal">G4UserRunAction</tt> 17860 17864 </h4><p> … … 17902 17906 }; 17903 17907 </pre></div><p> 17904 </p><h4><a name="id5718 29"></a>17908 </p><h4><a name="id571830"></a> 17905 17909 <tt class="literal">G4UserEventAction</tt> 17906 17910 </h4><p> … … 17943 17947 }; 17944 17948 </pre></div><p> 17945 </p><h4><a name="id57195 0"></a>17949 </p><h4><a name="id571951"></a> 17946 17950 <tt class="literal">G4UserStackingAction</tt> 17947 17951 </h4><p> … … 18052 18056 }; 18053 18057 </pre></div><p> 18054 </p><h4><a name="id57228 3"></a>18058 </p><h4><a name="id572284"></a> 18055 18059 <tt class="literal">G4UserTrackingAction</tt> 18056 18060 </h4><p> … … 18428 18432 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="sect.UIDefNew.DervCls"></a> 18429 18433 G4UIcommand and its derived classes 18430 </h3></div></div><div></div></div><h4><a name="id5757 29"></a>18434 </h3></div></div><div></div></div><h4><a name="id575730"></a> 18431 18435 Methods available for all derived classes 18432 18436 </h4><p> … … 18462 18466 </p><p> 18463 18467 </p></li></ul></div><p> 18464 </p><h4><a name="id57584 8"></a>18468 </p><h4><a name="id575849"></a> 18465 18469 G4UIdirectory 18466 18470 </h4><p> … … 18475 18479 </p><p> 18476 18480 </p></li></ul></div><p> 18477 </p><h4><a name="id57589 1"></a>18481 </p><h4><a name="id575892"></a> 18478 18482 G4UIcmdWithoutParameter 18479 18483 </h4><p> … … 18489 18493 </p><p> 18490 18494 </p></li></ul></div><p> 18491 </p><h4><a name="id5759 29"></a>18495 </p><h4><a name="id575930"></a> 18492 18496 G4UIcmdWithABool 18493 18497 </h4><p> … … 18569 18573 </p><p> 18570 18574 </p></li></ul></div><p> 18571 </p><h4><a name="id57616 8"></a>18575 </p><h4><a name="id576169"></a> 18572 18576 G4UIcmdWithADouble 18573 18577 </h4><p> … … 18608 18612 </p><p> 18609 18613 </p></li></ul></div><p> 18610 </p><h4><a name="id57628 7"></a>18614 </p><h4><a name="id576288"></a> 18611 18615 G4UIcmdWithAString 18612 18616 </h4><p> … … 18643 18647 </p><p> 18644 18648 </p></li></ul></div><p> 18645 </p><h4><a name="id57637 4"></a>18649 </p><h4><a name="id576375"></a> 18646 18650 G4UIcmdWith3Vector 18647 18651 </h4><p> … … 18684 18688 </p><p> 18685 18689 </p></li></ul></div><p> 18686 </p><h4><a name="id57677 0"></a>18690 </p><h4><a name="id576771"></a> 18687 18691 G4UIcmdWithADoubleAndUnit 18688 18692 </h4><p> … … 18751 18755 </p><p> 18752 18756 </p></li></ul></div><p> 18753 </p><h4><a name="id57698 0"></a>18757 </p><h4><a name="id576981"></a> 18754 18758 G4UIcmdWith3VectorAndUnit 18755 18759 </h4><p> … … 18819 18823 </p><p> 18820 18824 </p></li></ul></div><p> 18821 </p><h4><a name="id57719 5"></a>18825 </p><h4><a name="id577196"></a> 18822 18826 Additional comments on the <tt class="literal">SetParameterName()</tt> method 18823 18827 </h4><p> … … 19163 19167 </a></span></dt><dt><span class="sect2"><a href="#sect.VisDrv.OpenGL"> 19164 19168 OpenGL 19169 </a></span></dt><dt><span class="sect2"><a href="#sect.VisDrv.Qt"> 19170 Qt 19165 19171 </a></span></dt><dt><span class="sect2"><a href="#sect.VisDrv.OpenInv"> 19166 19172 OpenInventor … … 19289 19295 </a></span></dt><dd><dl><dt><span class="sect2"><a href="#sect.MkMovie.OGLX"> 19290 19296 OGLX 19297 </a></span></dt><dt><span class="sect2"><a href="#sect.MkMovie.Qt"> 19298 Qt 19291 19299 </a></span></dt><dt><span class="sect2"><a href="#sect.MkMovie.DAWNFILE"> 19292 19300 DAWNFILE … … 19317 19325 supports a diverse family of graphics systems. Some of these 19318 19326 graphics systems use a graphics library compiled with Geant4, such 19319 as OpenGL, while others involve a separate application, such as19327 as OpenGL, Qt, while others involve a separate application, such as 19320 19328 WIRED or DAWN. 19321 19329 </p><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="sect.VisIntro.What"></a> … … 19372 19380 </p></li><li><p> 19373 19381 Limited printing ability (pixel graphics, not vector graphics) 19382 </p></li></ul></div><p> 19383 </p></li><li><p> 19384 Qt 19385 </p><div class="itemizedlist"><ul type="circle" compact><li><p> 19386 View directly from Geant4 19387 </p></li><li><p> 19388 Uses Qt and GL libraries that are already included on most Linux 19389 systems (plus some Windows availability) 19390 </p></li><li><p> 19391 Rendered, photorealistic image 19392 </p></li><li><p> 19393 Many interactive features 19394 </p></li><li><p> 19395 zoom, rotate, translate 19396 </p></li><li><p> 19397 Fast response (can usually exploit full potential of graphics 19398 hardware) 19399 </p></li><li><p> 19400 Expanded printing ability (vector and pixel graphics) 19401 </p></li><li><p> 19402 Make movies interactively 19374 19403 </p></li></ul></div><p> 19375 19404 </p></li><li><p> … … 19492 19521 </p></li></ul></div><p> 19493 19522 </p></li><li><p> 19523 If you want GUI control, very responsive photorealistic graphics plus more 19524 interactivity (and have the Qt libraries installed). 19525 </p><div class="itemizedlist"><ul type="circle" compact><li><p> 19526 Qt is a good solution 19527 </p></li></ul></div><p> 19528 </p></li><li><p> 19494 19529 If you want GUI control, want to be able to pick on items to 19495 19530 inquire about them (identity, momentum, etc.), perhaps want to … … 19548 19583 </p><div class="itemizedlist"><ul type="circle" compact><li><p> 19549 19584 OpenGL 19585 </p></li><li><p> 19586 Qt 19550 19587 </p></li><li><p> 19551 19588 OpenInventor … … 19694 19731 GAGTree. 19695 19732 </p><p> 19696 The OpenGL, OpenInventor and RayTracerX drivers are not19733 The OpenGL, Qt, OpenInventor and RayTracerX drivers are not 19697 19734 incorporated by default. Nor are the DAWN-Network and VRML-Network 19698 19735 drivers, because they require the network setting of the installed … … 19704 19741 setenv G4VIS_BUILD_OPENGLX_DRIVER 1 # OpenGL-Xlib driver 19705 19742 setenv G4VIS_BUILD_OPENGLXM_DRIVER 1 # OpenGL-Motif driver 19743 setenv G4VIS_BUILD_OPENGLQT_DRIVER 1 # Qt driver 19706 19744 setenv G4VIS_BUILD_OIX_DRIVER 1 # OpenInventor-Xlib driver 19707 19745 setenv G4VIS_BUILD_RAYTRACERX_DRIVER 1 # RayTracer-XLib driver … … 19758 19796 By default, you get the DAWNFILE, HepRepFile, RayTracer, 19759 19797 VRML1FILE, VRML2FILE, ATree and GAGTree drivers. Additionally, you 19760 may choose from the OpenGL-Xlib, OpenGL-Motif, OpenInventor,19798 may choose from the OpenGL-Xlib, OpenGL-Motif, Qt, OpenInventor, 19761 19799 RayTracerX, DAWN-Network and VRML-Network drivers, each of which 19762 19800 can be selected by setting the proper environment variable: … … 19765 19803 setenv G4VIS_USE_OPENGLX 1 19766 19804 setenv G4VIS_USE_OPENGLXM 1 19805 setenv G4VIS_USE_OPENGLQT 1 19767 19806 setenv G4VIS_USE_OIX 1 19768 19807 setenv G4VIS_USE_RAYTRACERX 1 … … 20037 20076 ”</a> 20038 20077 OpenGL 20078 </p></li><li><p> 20079 <a href="#sect.VisDrv.Qt" title=" 20080 Qt 20081 ">the section called “ 20082 Qt 20083 ”</a> 20084 Qt 20039 20085 </p></li><li><p> 20040 20086 <a href="#sect.VisDrv.OpenInv" title=" … … 20137 20183 </td><td> 20138 20184 Windows 20185 </td></tr><tr><td> 20186 Qt 20187 </td><td> 20188 Qt, OpenGL 20189 </td><td> 20190 Linux, Unix, Mac, Windows 20139 20191 </td></tr><tr><td> 20140 20192 OpenInventor-X … … 20258 20310 using the OpenGL Graphics System 20259 20311 </p></li></ul></div><p> 20312 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="sect.VisDrv.Qt"></a> 20313 Qt 20314 </h3></div></div><div></div></div><p> 20315 This driver have been developed by Laurent Garnier (IN2P3, LAL Orsay). 20316 It is an interface to the powerful toolkit Qt, now free on lot of 20317 platforms. This driver needs OpenGL library to be install. It is well suited for 20318 real-time fast visualization and demonstration. Fast visualization 20319 is realized with hardware acceleration, reuse of shapes stored in a 20320 display list, etc. NURBS visualization is also supported. All OpenGL 20321 features are implements in Qt driver . In addition, mouse events control 20322 are used to rotation/move/zoom volume, you can save your scene in lots 20323 of formats (vector or not), make movies... 20324 </p><p> 20325 There is only one session of Qt driver for all available platform. 20326 Two display modes are available: immediate mode and stored mode. 20327 The former has no limitation on data size, and the latter is fast 20328 for visualizing large data repetitively, and so is suitable for 20329 animation. 20330 </p><p> 20331 To see the visualization window : 20332 20333 20334 </p><div class="informalexample"><pre class="programlisting"> 20335 /vis/open OGLSQt 20336 </pre></div><p> 20337 </p><p> 20338 <span class="bold"><b>Further information (Qt):</b></span> 20339 </p><div class="itemizedlist"><ul type="disc" compact><li><p> 20340 <a href="http://trolltech.com/" target="_top"> 20341 Qt 20342 </a> 20343 </p></li><li><p> 20344 <a href="http://geant4.slac.stanford.edu/Presentations/vis/G4OpenGLTutorial/G4OpenGLTutorial.html" target="_top"> 20345 Geant4 Visualization Tutorial 20346 </a> 20347 using the Qt Driver 20348 </p></li></ul></div><p> 20260 20349 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="sect.VisDrv.OpenInv"></a> 20261 20350 OpenInventor … … 20816 20905 Its default value is <tt class="literal">NONE</tt>, which means that no viewer 20817 20906 is invoked and only the file <tt class="literal">g4.wrl</tt> is generated. 20818 </p><h4><a name="id58 6905"></a>20907 </p><h4><a name="id587160"></a> 20819 20908 Remote Visualization with the VRML-Network Driver 20820 20909 </h4><p> … … 21773 21862 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="sect.VisCntCmmd.CutVw"></a> 21774 21863 Cut view 21775 </h3></div></div><div></div></div><h4><a name="id592 187"></a>21864 </h3></div></div><div></div></div><h4><a name="id592547"></a> 21776 21865 Sectioning 21777 21866 </h4><p> … … 21794 21883 Idle> /vis/viewer/set/sectionPlane on 2.0 0.0 0.0 cm 1.0 0.0 0.0 21795 21884 </pre></div><p> 21796 </p><h4><a name="id592 229"></a>21885 </p><h4><a name="id592589"></a> 21797 21886 Cutting away 21798 21887 </h4><p> … … 21949 22038 </p><p> 21950 22039 Time development of an electrmagnetic shower. 22040 </p><p> 22041 </p></li><li><p> 22042 <a href="./Visualization/visTutor/exN03Vis14_mac.html" target="_top"> 22043 exN03Vis14.mac:</a> 22044 </p><p> 22045 A basic macro for visualization of detector geometry and events 22046 using Qt in Stored mode. 22047 </p><p> 22048 </p></li><li><p> 22049 <a href="./Visualization/visTutor/exN03Vis15_mac.html" target="_top"> 22050 exN03Vis15.mac:</a> 22051 </p><p> 22052 A basic macro for visualization of detector geometry and events 22053 using Qt. 21951 22054 </p><p> 21952 22055 </p></li><li><p> … … 23159 23262 user. The models are described briefly below, followed by some 23160 23263 example configuration commands. 23161 </p><h4><a name="id 599896"></a>23264 </p><h4><a name="id600320"></a> 23162 23265 G4TrajectoryGenericDrawer 23163 23266 </h4><p> 23164 23267 This model simply draws all trajectories in the same style, with 23165 23268 the properties provided by the context. 23166 </p><h4><a name="id 599910"></a>23269 </p><h4><a name="id600334"></a> 23167 23270 G4TrajectoryDrawByCharge 23168 23271 </h4><p> … … 23180 23283 0 Green 23181 23284 </pre></div><p> 23182 </p><h4><a name="id 599938"></a>23285 </p><h4><a name="id600362"></a> 23183 23286 G4TrajectoryDrawByParticleID 23184 23287 </h4><p> … … 23187 23290 By default, all trajectories are coloured grey. Chosen particle 23188 23291 types can be highlighted with specified colours. 23189 </p><h4><a name="id 599954"></a>23292 </p><h4><a name="id600378"></a> 23190 23293 G4TrajectoryDrawByOriginVolume 23191 23294 </h4><p> … … 23194 23297 physical volume. Physical volume takes precedence over logical 23195 23298 volume. All trajectories are coloured grey by default. 23196 </p><h4><a name="id 599970"></a>23299 </p><h4><a name="id600394"></a> 23197 23300 G4TrajectoryDrawByAttribute 23198 23301 </h4><p> … … 23514 23617 mode. The above models are described briefly below, followed by 23515 23618 some example configuration commands. 23516 </p><h4><a name="id601 482"></a>23619 </p><h4><a name="id601906"></a> 23517 23620 G4TrajectoryChargeFilter 23518 23621 </h4><p> … … 23520 23623 running mode, only trajectories with charges matching those 23521 23624 registered with the model will pass the filter. 23522 </p><h4><a name="id601 497"></a>23625 </p><h4><a name="id601921"></a> 23523 23626 G4TrajectoryParticleFilter 23524 23627 </h4><p> … … 23526 23629 standard running mode, only trajectories with particle types 23527 23630 matching those registered with the model will pass the filter. 23528 </p><h4><a name="id601 512"></a>23631 </p><h4><a name="id601936"></a> 23529 23632 G4TrajectoryOriginVolumeFilter 23530 23633 </h4><p> … … 23533 23636 volumes matching those registered with the model will pass the 23534 23637 filter. 23535 </p><h4><a name="id601 528"></a>23638 </p><h4><a name="id601952"></a> 23536 23639 G4TrajectoryAttributeFilter 23537 23640 </h4><p> … … 23689 23792 </h3></div></div><div></div></div><p> 23690 23793 Here we explain how to use 3D markers in Geant4 Visualization. 23691 </p><h4><a name="id602 320"></a>23794 </p><h4><a name="id602744"></a> 23692 23795 What are Markers? 23693 23796 </h4><p> … … 23729 23832 </p><p> 23730 23833 Access functions of class <span class="emphasis"><em>G4VMarker</em></span> are summarized below. 23731 </p><h4><a name="id602 446"></a>23834 </p><h4><a name="id602870"></a> 23732 23835 Access functions of markers 23733 23836 </h4><p> … … 23898 24001 screen images and we would be happy to hear about them. Graphics 23899 24002 drivers currently capable of producing picture files are: 24003 24004 <a href="http://bmrc.berkeley.edu/frame/research/mpeg/mpeg_encode.html" target="_top">More informations about MPEG encoder</a> 23900 24005 23901 24006 </p><div class="informaltable"><table border="1"><colgroup><col><col></colgroup><tbody><tr><td><span class="bold"><b>Driver</b></span></td><td><span class="bold"><b>File type</b></span></td></tr><tr><td> … … 23915 24020 eps 23916 24021 </td></tr><tr><td> 24022 Qt 24023 </td><td> 24024 jpeg, eps, ppm, ... 24025 </td></tr><tr><td> 23917 24026 RayTracer 23918 24027 </td><td> … … 23994 24103 </p><p> 23995 24104 Then, on Mac, for example: 24105 24106 </p><div class="informalexample"><pre class="programlisting"> 24107 open G4OpenGL.mpg 24108 </pre></div><p> 24109 24110 opens a QuickTime player. 24111 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="sect.MkMovie.Qt"></a> 24112 Qt 24113 </h3></div></div><div></div></div><p> 24114 Make a movie with Qt driver is the easyest way. A function is already define to 24115 store all changes on OpenGL frame from viewer in a movie format. You can then use 24116 loops (as defined in OGLX section) or even move/rotate/zoom you scene in real time 24117 with your mouse. 24118 </p><p> 24119 All the work of OGLX section to store files, convert them, and make a movie is 24120 hidden by Qt driver. But as for previous section, you have to install mpeg_encoder. 24121 </p><p> 24122 To make a movie : 24123 </p><div class="itemizedlist"><ul type="disc" compact><li><p> 24124 Right clic will display a context menu, "Action"->"Movie parameters". 24125 </p></li><li><p> 24126 Select MPEG encoder path is it was not found 24127 </p></li><li><p> 24128 Select the name of the output movie. 24129 </p></li><li><p> 24130 Let go! Hit SPACE to Start/Pause recording, RETURN to STOP 24131 </p></li></ul></div><p> 24132 </p><p> 24133 Then, open your movies (on Mac, for example): 23996 24134 23997 24135 </p><div class="informalexample"><pre class="programlisting"> … … 24572 24710 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="sect.ExmpNvc.Exmp01"></a> 24573 24711 Example N01 24574 </h3></div></div><div></div></div><h4><a name="id61 7332"></a>24712 </h3></div></div><div></div></div><h4><a name="id618253"></a> 24575 24713 Basic concepts 24576 24714 </h4><div class="itemizedlist"><ul type="disc" compact><li><p> 24577 24715 minimal set for geantino transportation 24578 </p></li></ul></div><h4><a name="id61 7351"></a>24716 </p></li></ul></div><h4><a name="id618273"></a> 24579 24717 Classes 24580 24718 </h4><p> … … 24599 24737 Hard coded UI command application 24600 24738 </p></li></ul></div><p> 24601 </p><h4><a name="id61 7431"></a>24739 </p><h4><a name="id618353"></a> 24602 24740 ExN01DetectorConstruction 24603 24741 </h4><p> … … 24618 24756 <span class="emphasis"><em>G4PVPlacement</em></span> without rotation 24619 24757 </p></li></ul></div><p> 24620 </p><h4><a name="id61 7487"></a>24758 </p><h4><a name="id618408"></a> 24621 24759 ExN01PhysicsList 24622 24760 </h4><p> … … 24635 24773 assignment of transportation process 24636 24774 </p></li></ul></div><p> 24637 </p><h4><a name="id61 7537"></a>24775 </p><h4><a name="id618458"></a> 24638 24776 ExN01PrimaryGeneratorAction 24639 24777 </h4><p> … … 24654 24792 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="sect.ExmpNvc.Exmp02"></a> 24655 24793 Example N02 24656 </h3></div></div><div></div></div><h4><a name="id61 7606"></a>24794 </h3></div></div><div></div></div><h4><a name="id618527"></a> 24657 24795 Basic concepts 24658 24796 </h4><p> … … 24664 24802 Hits: tracker type hits 24665 24803 </p></li></ul></div><p> 24666 </p><h4><a name="id61 7638"></a>24804 </p><h4><a name="id618559"></a> 24667 24805 Classes 24668 24806 </h4><p> … … 24685 24823 construction and set of mandatory user classes 24686 24824 </p></li></ul></div><p> 24687 </p><h4><a name="id61 7706"></a>24825 </p><h4><a name="id618627"></a> 24688 24826 ExN02DetectorConstruction 24689 24827 </h4><p> … … 24712 24850 </p></li></ul></div><p> 24713 24851 </p></li></ul></div><p> 24714 </p><h4><a name="id61 7795"></a>24852 </p><h4><a name="id618716"></a> 24715 24853 ExN02MagneticField 24716 24854 </h4><p> … … 24727 24865 Uniform field. <span class="emphasis"><em>ExN02MagneticField</em></span> 24728 24866 </p></li></ul></div><p> 24729 </p><h4><a name="id61 7843"></a>24867 </p><h4><a name="id618765"></a> 24730 24868 ExN02PhysicsList 24731 24869 </h4><p> … … 24746 24884 Interactivity: chooses processes interactively (=> messenger class) 24747 24885 </p></li></ul></div><p> 24748 </p><h4><a name="id61 7901"></a>24886 </p><h4><a name="id618822"></a> 24749 24887 ExN02PrimaryGeneratorAction 24750 24888 </h4><p> … … 24763 24901 primary event generation via particle gun 24764 24902 </p></li></ul></div><p> 24765 </p><h4><a name="id61 7955"></a>24903 </p><h4><a name="id618876"></a> 24766 24904 ExN02RunAction 24767 24905 </h4><p> … … 24778 24916 draw detector 24779 24917 </p></li></ul></div><p> 24780 </p><h4><a name="id618 000"></a>24918 </p><h4><a name="id618921"></a> 24781 24919 ExN02EventAction 24782 24920 </h4><p> … … 24793 24931 print time information 24794 24932 </p></li></ul></div><p> 24795 </p><h4><a name="id618 045"></a>24933 </p><h4><a name="id618966"></a> 24796 24934 ExN02TrackerSD 24797 24935 </h4><p> … … 24808 24946 tracker-type hit generation 24809 24947 </p></li></ul></div><p> 24810 </p><h4><a name="id61 8090"></a>24948 </p><h4><a name="id619012"></a> 24811 24949 ExN02TrackerHit 24812 24950 </h4><p> … … 24825 24963 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="sect.ExmpNvc.Exmp03"></a> 24826 24964 Example N03 24827 </h3></div></div><div></div></div><h4><a name="id61 8149"></a>24965 </h3></div></div><div></div></div><h4><a name="id619071"></a> 24828 24966 Basic concepts 24829 24967 </h4><p> … … 24837 24975 Tracking: collect energy deposition, total track length 24838 24976 </p></li></ul></div><p> 24839 </p><h4><a name="id61 8187"></a>24977 </p><h4><a name="id619108"></a> 24840 24978 Classes 24841 24979 </h4><p> … … 24859 24997 macro file 24860 24998 </p></li></ul></div><p> 24861 </p><h4><a name="id61 8256"></a>24999 </p><h4><a name="id619177"></a> 24862 25000 ExN03DetectorConstruction 24863 25001 </h4><p> … … 24883 25021 visualization 24884 25022 </p></li></ul></div><p> 24885 </p><h4><a name="id61 8327"></a>25023 </p><h4><a name="id619249"></a> 24886 25024 ExN03PhysicsList 24887 25025 </h4><p> … … 24904 25042 class) 24905 25043 </p></li></ul></div><p> 24906 </p><h4><a name="id61 8389"></a>25044 </p><h4><a name="id619310"></a> 24907 25045 ExN03PrimaryGeneratorAction 24908 25046 </h4><p> … … 24924 25062 class) 24925 25063 </p></li></ul></div><p> 24926 </p><h4><a name="id61 8450"></a>25064 </p><h4><a name="id619372"></a> 24927 25065 ExN03RunAction 24928 25066 </h4><p> … … 24943 25081 Interactivity: change detector size, material, magnetic field. 24944 25082 </p></li></ul></div><p> 24945 </p><h4><a name="id61 8509"></a>25083 </p><h4><a name="id619431"></a> 24946 25084 ExN03EventAction 24947 25085 </h4><p> … … 24960 25098 print end of event information (energy deposited, etc.) 24961 25099 </p></li></ul></div><p> 24962 </p><h4><a name="id61 8560"></a>25100 </p><h4><a name="id619481"></a> 24963 25101 ExN03SteppingAction 24964 25102 </h4><p> … … 24977 25115 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="sect.ExmpNvc.Exmp04"></a> 24978 25116 Example N04 24979 </h3></div></div><div></div></div><h4><a name="id61 8619"></a>25117 </h3></div></div><div></div></div><h4><a name="id619541"></a> 24980 25118 Basic concepts 24981 25119 </h4><p> … … 24985 25123 Full hits/digits/trigger 24986 25124 </p></li></ul></div><p> 24987 </p><h4><a name="id61 8647"></a>25125 </p><h4><a name="id619568"></a> 24988 25126 Classes 24989 25127 </h4><p> … … 25001 25139 construction and set of user classes 25002 25140 </p></li></ul></div><p> 25003 </p><h4><a name="id61 8699"></a>25141 </p><h4><a name="id619620"></a> 25004 25142 ExN04DetectorConstruction 25005 25143 </h4><p> … … 25025 25163 </p></li><li><p> 25026 25164 calorimeter -- replica</p></li></ul></div><p> 25027 </p><h4><a name="id61 8774"></a>25165 </p><h4><a name="id619695"></a> 25028 25166 ExN04TrackerParametrisation 25029 25167 </h4><p> … … 25040 25178 parametrised sizes 25041 25179 </p></li></ul></div><p> 25042 </p><h4><a name="id61 8819"></a>25180 </p><h4><a name="id619741"></a> 25043 25181 ExN04CalorimeterParametrisation 25044 25182 </h4><p> … … 25055 25193 parametrized position/rotation 25056 25194 </p></li></ul></div><p> 25057 </p><h4><a name="id61 8865"></a>25195 </p><h4><a name="id619787"></a> 25058 25196 ExN04MagneticField 25059 25197 </h4><p> … … 25070 25208 solenoid and toroidal fields 25071 25209 </p></li></ul></div><p> 25072 </p><h4><a name="id61 8910"></a>25210 </p><h4><a name="id619832"></a> 25073 25211 ExN04TrackerSD 25074 25212 </h4><p> … … 25085 25223 tracker-type hit generation 25086 25224 </p></li></ul></div><p> 25087 </p><h4><a name="id61 8956"></a>25225 </p><h4><a name="id619877"></a> 25088 25226 ExN04TrackerHit 25089 25227 </h4><p> … … 25100 25238 draw hit point 25101 25239 </p></li></ul></div><p> 25102 </p><h4><a name="id619 001"></a>25240 </p><h4><a name="id619922"></a> 25103 25241 ExN04CalorimeterSD 25104 25242 </h4><p> … … 25115 25253 calorimeter-type hit generation 25116 25254 </p></li></ul></div><p> 25117 </p><h4><a name="id619 046"></a>25255 </p><h4><a name="id619967"></a> 25118 25256 ExN04CalorimeterHit 25119 25257 </h4><p> … … 25130 25268 draw physical volume with variable color 25131 25269 </p></li></ul></div><p> 25132 </p><h4><a name="id6 19091"></a>25270 </p><h4><a name="id620013"></a> 25133 25271 ExN04MuonSD 25134 25272 </h4><p> … … 25145 25283 Scintillator-type hit generation 25146 25284 </p></li></ul></div><p> 25147 </p><h4><a name="id6 19136"></a>25285 </p><h4><a name="id620058"></a> 25148 25286 ExN04MuonHit 25149 25287 </h4><p> … … 25160 25298 draw physical volume with variable color 25161 25299 </p></li></ul></div><p> 25162 </p><h4><a name="id6 19181"></a>25300 </p><h4><a name="id620103"></a> 25163 25301 ExN04PrimaryGeneratorAction 25164 25302 </h4><p> … … 25177 25315 primary event generation with PYTHIA event 25178 25316 </p></li></ul></div><p> 25179 </p><h4><a name="id6 19236"></a>25317 </p><h4><a name="id620157"></a> 25180 25318 ExN04EventAction 25181 25319 </h4><p> … … 25190 25328 store the initial seeds 25191 25329 </p></li></ul></div><p> 25192 </p><h4><a name="id6 19273"></a>25330 </p><h4><a name="id620194"></a> 25193 25331 ExN04StackingAction 25194 25332 </h4><p> … … 25207 25345 event abortion 25208 25346 </p></li></ul></div><p> 25209 </p><h4><a name="id6 19323"></a>25347 </p><h4><a name="id620244"></a> 25210 25348 ExN04StackingActionMessenger 25211 25349 </h4><p> … … 25222 25360 define abortion conditions 25223 25361 </p></li></ul></div><p> 25224 </p><h4><a name="id6 19368"></a>25362 </p><h4><a name="id620290"></a> 25225 25363 ExN04TrackingAction 25226 25364 </h4><p> … … 25241 25379 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="sect.ExmpNvc.Exmp05"></a> 25242 25380 Example N05 25243 </h3></div></div><div></div></div><h4><a name="id6 19432"></a>25381 </h3></div></div><div></div></div><h4><a name="id620354"></a> 25244 25382 Basic concepts 25245 25383 </h4><p> … … 25259 25397 (calorimeter type hits ?) 25260 25398 </p></li></ul></div><p> 25261 </p><h4><a name="id6 19487"></a>25399 </p><h4><a name="id620409"></a> 25262 25400 Classes 25263 25401 </h4><p> … … 25283 25421 construction EM physics shower fast simulation model 25284 25422 </p></li></ul></div><p> 25285 </p><h4><a name="id6 19570"></a>25423 </p><h4><a name="id620492"></a> 25286 25424 ExN05EMShowerModel 25287 25425 </h4><p> … … 25298 25436 energy deposition in sensitive detector 25299 25437 </p></li></ul></div><p> 25300 </p><h4><a name="id6 19616"></a>25438 </p><h4><a name="id620537"></a> 25301 25439 ExN05PionShowerModel 25302 25440 </h4><p> … … 25313 25451 energy deposition in sensitive detector 25314 25452 </p></li></ul></div><p> 25315 </p><h4><a name="id6 19661"></a>25453 </p><h4><a name="id620582"></a> 25316 25454 ExN05DetectorConstruction 25317 25455 </h4><p> … … 25332 25470 <span class="emphasis"><em>G4PVPlacement</em></span> 25333 25471 </p></li></ul></div><p> 25334 </p><h4><a name="id6 19720"></a>25472 </p><h4><a name="id620641"></a> 25335 25473 ExN05PhysicsList 25336 25474 </h4><p> … … 25347 25485 assignment of <span class="emphasis"><em>G4FastSimulationManagerProcess</em></span> 25348 25486 </p></li></ul></div><p> 25349 </p><h4><a name="id6 19769"></a>25487 </p><h4><a name="id620690"></a> 25350 25488 ExN05PrimaryGeneratorAction 25351 25489 </h4><p> … … 25364 25502 primary event generation via particle gun 25365 25503 </p></li></ul></div><p> 25366 </p><h4><a name="id6 19823"></a>25504 </p><h4><a name="id620744"></a> 25367 25505 ExN05RunAction 25368 25506 </h4><p> … … 25381 25519 (activation/deactivation of parameterisation ?) 25382 25520 </p></li></ul></div><p> 25383 </p><h4><a name="id6 19873"></a>25521 </p><h4><a name="id620795"></a> 25384 25522 ExN05EventAction 25385 25523 </h4><p> … … 25398 25536 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="sect.ExmpNvc.Exmp06"></a> 25399 25537 Example N06 25400 </h3></div></div><div></div></div><h4><a name="id6 19933"></a>25538 </h3></div></div><div></div></div><h4><a name="id620854"></a> 25401 25539 Basic concepts 25402 25540 </h4><div class="itemizedlist"><ul type="disc" compact><li><p> … … 25418 25556 </p></li><li><p> 25419 25557 Visualization : geometry, optical photon trajectories. 25420 </p></li></ul></div><h4><a name="id6 19991"></a>25558 </p></li></ul></div><h4><a name="id620913"></a> 25421 25559 Classes 25422 25560 </h4><p> … … 25438 25576 hard coded <tt class="literal">beamOn</tt> 25439 25577 </p></li></ul></div><p> 25440 </p><h4><a name="id620 061"></a>25578 </p><h4><a name="id620982"></a> 25441 25579 ExN06DetectorConstruction 25442 25580 </h4><p> … … 25465 25603 visualization 25466 25604 </p></li></ul></div><p> 25467 </p><h4><a name="id62 0140"></a>25605 </p><h4><a name="id621062"></a> 25468 25606 ExN06PhysicsList 25469 25607 </h4><p> … … 25485 25623 modify/augment optical process parameters 25486 25624 </p></li></ul></div><p> 25487 </p><h4><a name="id62 0198"></a>25625 </p><h4><a name="id621119"></a> 25488 25626 ExN06PrimaryGeneratorAction 25489 25627 </h4><p> … … 25502 25640 primary event generation via particle gun 25503 25641 </p></li></ul></div><p> 25504 </p><h4><a name="id62 0252"></a>25642 </p><h4><a name="id621173"></a> 25505 25643 ExN06RunAction 25506 25644 </h4><p> … … 25519 25657 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="sect.ExmpNvc.Exmp07"></a> 25520 25658 Example N07 25521 </h3></div></div><div></div></div><h4><a name="id62 0311"></a>25659 </h3></div></div><div></div></div><h4><a name="id621232"></a> 25522 25660 Basic concepts 25523 25661 </h4><p> … … 25535 25673 classes without implementing sensitive detector class. 25536 25674 </p></li></ul></div><p> 25537 </p><h4><a name="id62 0354"></a>25675 </p><h4><a name="id621275"></a> 25538 25676 Classes 25539 25677 </h4><p> … … 25556 25694 construction and set of <span class="emphasis"><em>ExN07RunAction</em></span> 25557 25695 </p></li></ul></div><p> 25558 </p><h4><a name="id62 0429"></a>25696 </p><h4><a name="id621350"></a> 25559 25697 ExN07DetectorConstruction 25560 25698 </h4><p> … … 25584 25722 visualization 25585 25723 </p></li></ul></div><p> 25586 </p><h4><a name="id62 0520"></a>25724 </p><h4><a name="id621442"></a> 25587 25725 ExN07DetectorMessenger 25588 25726 </h4><p> … … 25599 25737 definition of example-specific geometry commands 25600 25738 </p></li></ul></div><p> 25601 </p><h4><a name="id62 0566"></a>25739 </p><h4><a name="id621487"></a> 25602 25740 ExN07PhysicsList 25603 25741 </h4><p> … … 25618 25756 production thresholds for each region 25619 25757 </p></li></ul></div><p> 25620 </p><h4><a name="id62 0621"></a>25758 </p><h4><a name="id621543"></a> 25621 25759 ExN07PrimaryGeneratorAction 25622 25760 </h4><p> … … 25635 25773 primary event generation via particle gun 25636 25774 </p></li></ul></div><p> 25637 </p><h4><a name="id62 0676"></a>25775 </p><h4><a name="id621597"></a> 25638 25776 ExN07RunAction 25639 25777 </h4><p> … … 25652 25790 print out a run summary with <span class="emphasis"><em>ExN07Run</em></span> class object 25653 25791 </p></li></ul></div><p> 25654 </p><h4><a name="id62 0734"></a>25792 </p><h4><a name="id621655"></a> 25655 25793 ExN07Run 25656 25794 </h4><p> … … 25823 25961 </p></li></ul></div><p> 25824 25962 </p><p> 25825 </p><div class="table"><a name="id62 6437"></a><p class="title"><b>Table 9.4.25963 </p><div class="table"><a name="id627358"></a><p class="title"><b>Table 9.4. 25826 25964 TestEm by theme 25827 25965 </b></p><table summary=" … … 26385 26523 26386 26524 Has Geant4 been installed properly ? What to do to solve this error ? 26387 </a></dt></dl><table border="0" summary="Q and A Set"><col align="left" width="1%"><tbody><tr class="question"><td align="left" valign="top"><a name="qanda.Installation.UpkTar"></a><a name="id63 8151"></a><b>Q:</b></td><td align="left" valign="top"><p>26525 </a></dt></dl><table border="0" summary="Q and A Set"><col align="left" width="1%"><tbody><tr class="question"><td align="left" valign="top"><a name="qanda.Installation.UpkTar"></a><a name="id639073"></a><b>Q:</b></td><td align="left" valign="top"><p> 26388 26526 When I download the source from the web, and unpack the tar file, 26389 26527 some files unpack into the top level directory. … … 26394 26532 file for your system, and that you use the correct unpacking tool. 26395 26533 Note that for Linux you must download the gtar.gz file. 26396 </p></td></tr><tr class="question"><td align="left" valign="top"><a name="qanda.Installation.NoCLHEP"></a><a name="id63 8178"></a><b>Q:</b></td><td align="left" valign="top"><p>26534 </p></td></tr><tr class="question"><td align="left" valign="top"><a name="qanda.Installation.NoCLHEP"></a><a name="id639100"></a><b>Q:</b></td><td align="left" valign="top"><p> 26397 26535 I cannot find CLHEP files or library and I have it installed in my system. 26398 26536 </p></td></tr><tr class="answer"><td align="left" valign="top"><b>A:</b></td><td align="left" valign="top"><p> … … 26413 26551 just the name is required (i.e. <tt class="literal">CLHEP</tt> for 26414 26552 <tt class="literal">libCLHEP.a</tt>). 26415 </p></td></tr><tr class="question"><td align="left" valign="top"><a name="qanda.Installation.noCERNLib"></a><a name="id63 8280"></a><b>Q:</b></td><td align="left" valign="top"><p>26553 </p></td></tr><tr class="question"><td align="left" valign="top"><a name="qanda.Installation.noCERNLib"></a><a name="id639201"></a><b>Q:</b></td><td align="left" valign="top"><p> 26416 26554 While installing the Geant4 libraries I get the following message printed: 26417 26555 … … 26433 26571 tool, it's harmless. The cernlib script (and the needed cernlib libraries) 26434 26572 are available from: http://cern.ch/cernlib. 26435 </p></td></tr><tr class="question"><td align="left" valign="top"><a name="qanda.Installation.FileDepend"></a><a name="id63 8324"></a><b>Q:</b></td><td align="left" valign="top"><p>26573 </p></td></tr><tr class="question"><td align="left" valign="top"><a name="qanda.Installation.FileDepend"></a><a name="id639246"></a><b>Q:</b></td><td align="left" valign="top"><p> 26436 26574 Trying building the Geant4 libraries I see several of these errors appearing 26437 26575 and my installation fails: … … 26484 26622 length and this number is afterwards multiplied by a number greater 26485 26623 than 1. 26486 </a></dt></dl><table border="0" summary="Q and A Set"><col align="left" width="1%"><tbody><tr class="question"><td align="left" valign="top"><a name="qanda.RunTimeProb.SegFltInExmp"></a><a name="id63 8724"></a><b>Q:</b></td><td align="left" valign="top"><p>26624 </a></dt></dl><table border="0" summary="Q and A Set"><col align="left" width="1%"><tbody><tr class="question"><td align="left" valign="top"><a name="qanda.RunTimeProb.SegFltInExmp"></a><a name="id639645"></a><b>Q:</b></td><td align="left" valign="top"><p> 26487 26625 On Linux, I get a segmentation fault as soon as I run one of the official 26488 26626 examples. … … 26493 26631 Red-Hat 7.X is not fully compatible with binaries running on RH 9.X or 26494 26632 higher, due to different libc used in the two configurations. 26495 </p></td></tr><tr class="question"><td align="left" valign="top"><a name="qanda.RunTimeProb.ErrShareLib"></a><a name="id63 8750"></a><b>Q:</b></td><td align="left" valign="top"><p>26633 </p></td></tr><tr class="question"><td align="left" valign="top"><a name="qanda.RunTimeProb.ErrShareLib"></a><a name="id639672"></a><b>Q:</b></td><td align="left" valign="top"><p> 26496 26634 I installed Geant4 libraries and built my application, when I try to run 26497 26635 it I get: … … 26508 26646 setenv LD_LIBRARY_PATH ${LD_LIBRARY_PATH}:$CLHEP_BASE_DIR/lib 26509 26647 </pre></div><p> 26510 </p></td></tr><tr class="question"><td align="left" valign="top"><a name="qanda.RunTimeProb.errFPE"></a><a name="id63 8797"></a><b>Q:</b></td><td align="left" valign="top"><p>26648 </p></td></tr><tr class="question"><td align="left" valign="top"><a name="qanda.RunTimeProb.errFPE"></a><a name="id639718"></a><b>Q:</b></td><td align="left" valign="top"><p> 26511 26649 On my system I get a Floating Point Exception (FPE) since some physics 26512 26650 processes sometimes return <tt class="literal">DBL_MAX</tt> as interaction … … 26538 26676 geometry during tracking and how can I convert it to coordinates local 26539 26677 to the current volume ? 26540 </a></dt></dl><table border="0" summary="Q and A Set"><col align="left" width="1%"><tbody><tr class="question"><td align="left" valign="top"><a name="qanda.Geometry.GenPnt"></a><a name="id639 004"></a><b>Q:</b></td><td align="left" valign="top"><p>26678 </a></dt></dl><table border="0" summary="Q and A Set"><col align="left" width="1%"><tbody><tr class="question"><td align="left" valign="top"><a name="qanda.Geometry.GenPnt"></a><a name="id639925"></a><b>Q:</b></td><td align="left" valign="top"><p> 26541 26679 I have a generic point and I would like to know in which physical 26542 26680 volume I'm located in my detector geometry. … … 26563 26701 specified in the FAQ for tracking and steps. 26564 26702 </p></div><p> 26565 </p></td></tr><tr class="question"><td align="left" valign="top"><a name="qanda.Geometry.DghtVol"></a><a name="id639 060"></a><b>Q:</b></td><td align="left" valign="top"><p>26703 </p></td></tr><tr class="question"><td align="left" valign="top"><a name="qanda.Geometry.DghtVol"></a><a name="id639982"></a><b>Q:</b></td><td align="left" valign="top"><p> 26566 26704 How can I access the daughter volumes of a specific physical volume? 26567 26705 </p></td></tr><tr class="answer"><td align="left" valign="top"><b>A:</b></td><td align="left" valign="top"><p> … … 26573 26711 myPVolume = myLVolume->GetDaughter(i); 26574 26712 </pre></div><p> 26575 </p></td></tr><tr class="question"><td align="left" valign="top"><a name="qanda.Geometry.CpyNum"></a><a name="id6 39088"></a><b>Q:</b></td><td align="left" valign="top"><p>26713 </p></td></tr><tr class="question"><td align="left" valign="top"><a name="qanda.Geometry.CpyNum"></a><a name="id640009"></a><b>Q:</b></td><td align="left" valign="top"><p> 26576 26714 How can I identify the exact copy-number of a specific physical volume 26577 26715 in my mass geometry? I tried with GetCopyNo() from my physical volume … … 26595 26733 The method <tt class="literal">GetCopyNo()</tt> is meant to return only the 26596 26734 serial number of placements not duplicated in the geometry tree. 26597 </p></td></tr><tr class="question"><td align="left" valign="top"><a name="qanda.Geometry.ConvGtoL"></a><a name="id6 39155"></a><b>Q:</b></td><td align="left" valign="top"><p>26735 </p></td></tr><tr class="question"><td align="left" valign="top"><a name="qanda.Geometry.ConvGtoL"></a><a name="id640076"></a><b>Q:</b></td><td align="left" valign="top"><p> 26598 26736 How can I determine the exact position in global coordinates in my mass 26599 26737 geometry during tracking and how can I convert it to coordinates local … … 26619 26757 How can I access the track information through the step object and 26620 26758 what information am I allowed to access ? 26621 </a></dt></dl><table border="0" summary="Q and A Set"><col align="left" width="1%"><tbody><tr class="question"><td align="left" valign="top"><a name="qanda.TrackSteps.AccssTrkInfo"></a><a name="id6 39488"></a><b>Q:</b></td><td align="left" valign="top"><p>26759 </a></dt></dl><table border="0" summary="Q and A Set"><col align="left" width="1%"><tbody><tr class="question"><td align="left" valign="top"><a name="qanda.TrackSteps.AccssTrkInfo"></a><a name="id640409"></a><b>Q:</b></td><td align="left" valign="top"><p> 26622 26760 How can I access the track information through the step object and 26623 26761 what information am I allowed to access ? … … 26795 26933 in energy for the given material and the distance to the next boundary 26796 26934 is smaller than the cut in range, is the particle killed ? 26797 </a></dt></dl><table border="0" summary="Q and A Set"><col align="left" width="1%"><tbody><tr class="question"><td align="left" valign="top"><a name="qanda.PhysicsCuts.HowProdCuts"></a><a name="id64 0256"></a><b>Q:</b></td><td align="left" valign="top"><p>26935 </a></dt></dl><table border="0" summary="Q and A Set"><col align="left" width="1%"><tbody><tr class="question"><td align="left" valign="top"><a name="qanda.PhysicsCuts.HowProdCuts"></a><a name="id641178"></a><b>Q:</b></td><td align="left" valign="top"><p> 26798 26936 How do production cuts (in range) work in Geant4 ? Are they also used 26799 26937 in tracking ? If a particle has an energy lower than the converted cut … … 26823 26961 I have set G4VIS... environmental variables but visualization does not 26824 26962 appear to be enabled. 26825 </a></dt></dl><table border="0" summary="Q and A Set"><col align="left" width="1%"><tbody><tr class="question"><td align="left" valign="top"><a name="qanda.Vis.NoVisAppr"></a><a name="id64 0427"></a><b>Q:</b></td><td align="left" valign="top"><p>26963 </a></dt></dl><table border="0" summary="Q and A Set"><col align="left" width="1%"><tbody><tr class="question"><td align="left" valign="top"><a name="qanda.Vis.NoVisAppr"></a><a name="id641348"></a><b>Q:</b></td><td align="left" valign="top"><p> 26826 26964 I have set G4VIS... environmental variables but visualization does not 26827 26965 appear to be enabled. … … 26869 27007 Where can I find solutions to particular problems as well as general user 26870 27008 support? 26871 </a></dt></dl><table border="0" summary="Q and A Set"><col align="left" width="1%"><tbody><tr class="question"><td align="left" valign="top"><a name="qanda.UserSupPolicy.FirstAid"></a><a name="id64 0652"></a><b>Q:</b></td><td align="left" valign="top"><p>27009 </a></dt></dl><table border="0" summary="Q and A Set"><col align="left" width="1%"><tbody><tr class="question"><td align="left" valign="top"><a name="qanda.UserSupPolicy.FirstAid"></a><a name="id641573"></a><b>Q:</b></td><td align="left" valign="top"><p> 26872 27010 If I need to discuss technical matters specific to my simulation 26873 27011 application or ask for first-aid help, who can I contact? … … 26883 27021 Geant4 HyperNews Forum</a>. 26884 27022 26885 </p></td></tr><tr class="question"><td align="left" valign="top"><a name="qanda.UserSupPolicy.FindBug"></a><a name="id64 0692"></a><b>Q:</b></td><td align="left" valign="top"><p>27023 </p></td></tr><tr class="question"><td align="left" valign="top"><a name="qanda.UserSupPolicy.FindBug"></a><a name="id641614"></a><b>Q:</b></td><td align="left" valign="top"><p> 26886 27024 If I find a bug or other problem with the code, who should be informed? 26887 27025 </p></td></tr><tr class="answer"><td align="left" valign="top"><b>A:</b></td><td align="left" valign="top"><p> … … 26893 27031 fixed and showing their status. An acknowledgement of the bug report 26894 27032 will be sent. 26895 </p></td></tr><tr class="question"><td align="left" valign="top"><a name="qanda.UserSupPolicy.PropFix"></a><a name="id64 0725"></a><b>Q:</b></td><td align="left" valign="top"><p>27033 </p></td></tr><tr class="question"><td align="left" valign="top"><a name="qanda.UserSupPolicy.PropFix"></a><a name="id641646"></a><b>Q:</b></td><td align="left" valign="top"><p> 26896 27034 If I propose a fix, who is responsible for approving it? 26897 27035 </p></td></tr><tr class="answer"><td align="left" valign="top"><b>A:</b></td><td align="left" valign="top"><p> … … 26900 27038 If the fix affects more than one domain, the matter will be addressed by 26901 27039 the TSB. 26902 </p></td></tr><tr class="question"><td align="left" valign="top"><a name="qanda.UserSupPolicy.PropImprv"></a><a name="id64 0749"></a><b>Q:</b></td><td align="left" valign="top"><p>27040 </p></td></tr><tr class="question"><td align="left" valign="top"><a name="qanda.UserSupPolicy.PropImprv"></a><a name="id641670"></a><b>Q:</b></td><td align="left" valign="top"><p> 26903 27041 To whom should I send a proposal for an improvement in Geant4 26904 27042 functionality? … … 26912 27050 agreed upon by the TSB, which is charged with ensuring the consistency 26913 27051 of the entire toolkit. 26914 </p></td></tr><tr class="question"><td align="left" valign="top"><a name="qanda.UserSupPolicy.RegMeet"></a><a name="id64 0769"></a><b>Q:</b></td><td align="left" valign="top"><p>27052 </p></td></tr><tr class="question"><td align="left" valign="top"><a name="qanda.UserSupPolicy.RegMeet"></a><a name="id641691"></a><b>Q:</b></td><td align="left" valign="top"><p> 26915 27053 Is there a regular user meeting which I should attend? 26916 27054 </p></td></tr><tr class="answer"><td align="left" valign="top"><b>A:</b></td><td align="left" valign="top"><p> … … 26918 27056 institutes in the Geant4 collaboration organize their own regular and/or 26919 27057 special Geant4 user workshops. 26920 </p></td></tr><tr class="question"><td align="left" valign="top"><a name="qanda.UserSupPolicy.PrtcProb"></a><a name="id64 0792"></a><b>Q:</b></td><td align="left" valign="top"><p>27058 </p></td></tr><tr class="question"><td align="left" valign="top"><a name="qanda.UserSupPolicy.PrtcProb"></a><a name="id641713"></a><b>Q:</b></td><td align="left" valign="top"><p> 26921 27059 Where can I find solutions to particular problems as well as general user 26922 27060 support? … … 27177 27315 </a> 27178 27316 are available. 27179 </p><h4><a name="id64 3730"></a>27317 </p><h4><a name="id644652"></a> 27180 27318 Origin and current situation of CLHEP 27181 27319 </h4><p> … … 27185 27323 this package, including several contributions made by developers in 27186 27324 the Geant4 Collaboration. 27187 </p><h4><a name="id64 3748"></a>27325 </p><h4><a name="id644669"></a> 27188 27326 Geant4 and CLHEP 27189 27327 </h4><p> … … 27200 27338 </p></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="sect.CppStdTL"></a> 27201 27339 C++ Standard Template Library 27202 </h2></div></div><div></div></div><h4><a name="id64 3913"></a>27340 </h2></div></div><div></div></div><h4><a name="id644834"></a> 27203 27341 Overview 27204 27342 </h4><p> … … 27245 27383 , this is the basis of the native egcs STL implementation. 27246 27384 </p></li></ul></div><p> 27247 </p><h4><a name="id644 022"></a>27385 </p><h4><a name="id644944"></a> 27248 27386 STL in Geant4 27249 27387 </h4><p> … … 27349 27487 </p><p> 27350 27488 </p></li></ul></div><p> 27351 </p><h4><a name="id64 4513"></a>27489 </p><h4><a name="id645434"></a> 27352 27490 <tt class="literal">lib/ bin/</tt> and <tt class="literal">tmp/</tt> directories 27353 27491 </h4><p> … … 27374 27512 accident). They are already set and used internally in the default 27375 27513 setup !</b></span> 27376 </p><h4><a name="id64 4624"></a>27514 </p><h4><a name="id645545"></a> 27377 27515 System configuration 27378 27516 </h4><p> … … 27392 27530 <tt class="literal">env.[c]sh</tt>. 27393 27531 </p></dd></dl></div><p> 27394 </p><h4><a name="id64 4690"></a>27532 </p><h4><a name="id645611"></a> 27395 27533 Installation paths 27396 27534 </h4><p> … … 27446 27584 <tt class="literal">$G4LIB</tt> can be overridden. 27447 27585 </dd></dl></div><p> 27448 </p><h4><a name="id64 4936"></a>27586 </p><h4><a name="id645857"></a> 27449 27587 Build specific 27450 27588 </h4><p> … … 27533 27671 27534 27672 </span></dt><dd></dd></dl></div><p> 27535 </p><h4><a name="id64 5202"></a>27673 </p><h4><a name="id646124"></a> 27536 27674 UI specific 27537 27675 </h4><p> … … 27588 27726 its own UI system. 27589 27727 </dd></dl></div><p> 27590 </p><h4><a name="id64 5353"></a>27728 </p><h4><a name="id646274"></a> 27591 27729 Visualization specific 27592 27730 </h4><p> … … 27687 27825 If specified, no visualization drivers will be built or used. 27688 27826 </dd></dl></div><p> 27689 </p><h4><a name="id64 5630"></a>27827 </p><h4><a name="id646822"></a> 27690 27828 Hadronic physics specific 27691 27829 </h4><p> … … 27708 27846 Sets neglecting doppler broadening mode for boosting performance. 27709 27847 </dd></dl></div><p> 27710 </p><h4><a name="id64 5686"></a>27848 </p><h4><a name="id646878"></a> 27711 27849 <tt class="literal">GDML</tt>, <tt class="literal">zlib</tt> and <tt class="literal">g3tog4</tt> modules 27712 27850 </h4><p> … … 27750 27888 library has been already installed. 27751 27889 </dd></dl></div><p> 27752 </p><h4><a name="id64 5846"></a>27890 </p><h4><a name="id647039"></a> 27753 27891 Analysis specific 27754 27892 </h4><p> … … 27765 27903 of the specific analysis tools for details. 27766 27904 </dd></dl></div><p> 27767 </p><h4><a name="id64 5905"></a>27905 </p><h4><a name="id647097"></a> 27768 27906 Directory paths to Physics Data 27769 27907 </h4><p> -
trunk/documents/UserDoc/DocBookUsersGuides/ForApplicationDeveloper/xml/Appendix/Appendix.xml
r904 r921 25 25 &appbuildFile; 26 26 &appdevelopmentDebugTools; 27 &apppythonInterface; 27 28 &appmaterialNames; 28 29 -
trunk/documents/UserDoc/DocBookUsersGuides/ForApplicationDeveloper/xml/Appendix/AppendixEntityDef.dtd
r904 r921 19 19 <!ENTITY appmakeFile SYSTEM "./makeFile.xml"> 20 20 <!ENTITY appbuildFile SYSTEM "./buildFile.xml"> 21 <!ENTITY apppythonInterface SYSTEM "./pythonInterface.xml"> 21 22 <!ENTITY appdevelopmentDebugTools SYSTEM "./developmentDebugTools.xml"> 22 23 -
trunk/documents/UserDoc/DocBookUsersGuides/ForApplicationDeveloper/xml/BookForAppliDev.xml
r904 r921 4 4 <!ENTITY % bookForAppliDevEntityDef SYSTEM "./BookForAppliDevEntityDef.dtd"> 5 5 %bookForAppliDevEntityDef; 6 6 7 ]> 7 8 … … 30 31 </authorgroup> 31 32 32 <pubdate>1 4 December, 2007</pubdate>33 <releaseinfo>Version: geant4 9. 1</releaseinfo>33 <pubdate>19 December, 2008</pubdate> 34 <releaseinfo>Version: geant4 9.2</releaseinfo> 34 35 35 36 </bookinfo> -
trunk/documents/UserDoc/DocBookUsersGuides/ForApplicationDeveloper/xml/Fundamentals/biasing.xml
r904 r921 610 610 <mediaobject> 611 611 <imageobject role="fo"> 612 <imagedata fileref="./AllResources/Fundamentals/wwconcept. gif"613 format=" GIF" contentwidth="9.0cm" align="center" />612 <imagedata fileref="./AllResources/Fundamentals/wwconcept.jpg" 613 format="JPG" contentwidth="9.0cm" align="center" /> 614 614 </imageobject> 615 615 <imageobject role="html"> 616 <imagedata fileref="./AllResources/Fundamentals/wwconcept. gif"617 format=" GIF" align="center" />616 <imagedata fileref="./AllResources/Fundamentals/wwconcept.jpg" 617 format="JPG" align="center" /> 618 618 </imageobject> 619 619 <textobject> -
trunk/documents/UserDoc/DocBookUsersGuides/ForApplicationDeveloper/xml/Fundamentals/classCategory.xml
r905 r921 58 58 <mediaobject> 59 59 <imageobject role="fo"> 60 <imagedata fileref="./AllResources/Fundamentals/classCategory. gif"61 format=" GIF" contentwidth="7.0cm" align="center" />60 <imagedata fileref="./AllResources/Fundamentals/classCategory.jpg" 61 format="JPG" contentwidth="7.0cm" align="center" /> 62 62 </imageobject> 63 63 <imageobject role="html"> 64 <imagedata fileref="./AllResources/Fundamentals/classCategory. gif"65 format=" GIF" align="center" />64 <imagedata fileref="./AllResources/Fundamentals/classCategory.jpg" 65 format="JPG" align="center" /> 66 66 </imageobject> 67 67 </mediaobject> -
trunk/documents/UserDoc/DocBookUsersGuides/ForApplicationDeveloper/xml/GettingStarted/graphicalUserInterface.xml
r904 r921 29 29 The "intercoms" category 30 30 provides an expandable command interpreter. It is the key mechanism 31 of Geant4 to realize user interactions of all categories without31 of Geant4 to realize secure user interactions of all categories without 32 32 being annoyed by the dependencies among categories. The direct use 33 33 of Geant4 classes in a C++ program offers a first ground level of … … 36 36 hard-coded in the program. 37 37 </para> 38 39 38 40 39 41 </sect3> … … 52 54 the interfaces category. This interfacing strategy opens an 53 55 important door towards various user interface tools and allows 54 Geant4 to utilize the state-of-the-art GUI tools such as Motif and55 Java,etc..The richness of the collaboration has permitted for56 d ifferent groups to offer various user interfaces to the Geant456 Geant4 to utilize the state-of-the-art GUI tools such as Motif, Qt, 57 and Java etc..The richness of the collaboration has permitted for 58 developers to offer various user interfaces to the Geant4 57 59 command system. Currently available are the following; 58 60 … … 67 69 </para></listitem> 68 70 <listitem><para> 69 GAG, a fully Graphical User Interface and its extension71 GAG, a fully Graphical User Interface and its network extension 70 72 GainServer of the client/server type. 71 73 </para></listitem> … … 76 78 Full implementation of the character 77 79 terminals (1 and 2) is included in the standard Geant4 distribution 78 in the <literal>source/interfaces/basic</literal> directory. As for GAG 79 with rich GUI functionalities, its front-end classes are included 80 in the Geant4 distribution in the source/interfaces/GAG directory. 81 The corresponding GUI package is available either from the author's 82 Web pages (see URL below) or in the distributed package under the 83 <literal>environments/MOMO</literal> directory. 80 in the <literal>source/interfaces/basic</literal> directory. As for GAG, 81 the front-end class is included 82 in the Geant4 distribution in the source/interfaces/GAG directory, 83 while its partner GUI package MOMO.jar is available in the standard Geant4 distribution 84 under the 85 <literal>environments/MOMO</literal> directory. MOMO.jar, Java archive file, contains 86 not only GAG, but also GGE and other helper packages. 87 Supplementary information is available 88 from the author's Webpage(see URL below). 84 89 </para> 85 90 86 91 <para> 87 92 GAG, GainServer's client GUI Gain: 88 <ulink url="http:// erpc1.naruto-u.ac.jp/~geant4">89 http:// erpc1.naruto-u.ac.jp/~geant493 <ulink url="http://www-geant4.kek.jp/~yoshidah"> 94 http://www-geant4.kek.jp/~yoshidah 90 95 </ulink> 91 96 </para> … … 238 243 A command box is at disposal for entering or recalling Geant4 commands. 239 244 Command completion by typing &ldquo;TAB&rdquo; key is 240 available on the command line. The shell commands "exit, cont,245 available on the command line. The shell commands "exit, cont, 241 246 help, ls, cd..." are also supported. A menu bar could be customized 242 247 through the <emphasis>AddMenu</emphasis> and … … 287 292 288 293 <para> 289 They are the front-end classes of Geant4 which interfacewith their290 respective graphical user interfaces, GAG (Geant4 Adaptive GUI) and Gain291 (Geant4 adaptive interface for network) . While GAG must run on the same294 They are the front-end classes of Geant4 which make connection with their 295 respective graphical user interfaces, GAG (Geant4 Adaptive GUI) via pipe, and Gain 296 (Geant4 adaptive interface for network) via sockets. While GAG must run on the same 292 297 system (Windows or Unixen) as a Geant4 application, Gain can run on a 293 remote system (Windows, Linux, etc.) to which JVM (Java Virtual294 Machine) is installed. A Geant4 application is invoked on a Unix298 remote system (Windows, Linux, etc.) in which JRE (Java Runtime 299 Environment) is installed. A Geant4 application is invoked on a Unix 295 300 (Linux) system and behaves as a network server. It opens a port, 296 301 waiting the connection from the Gain. Gain is capable to connect to … … 300 305 301 306 <para> 302 Client GUI, GAG and Gain have almost similar look-and-feel. So, 303 GAG's functionalities are briefly introduced here. Please refer to 304 the above URL for details and to download the client GUIs. 305 </para> 306 307 <para> 308 GAG is a Graphical User Interface tool with which user 309 can set parameters and execute commands. It is adaptive, since GAG 310 reflects the internal states of Geant4 that is a state machine. GAG 311 is based on the server-client model; GAG is the server, while 312 Geant4 executables are clients. Hence, GAG does nothing by itself 313 and it must invoke an executable simulation program. Geant4's 307 Client GUIs, GAG and Gain have almost similar look-and-feel. So, 308 GAG's functionalities are briefly explained here. Please refer to 309 the above URL for details. 310 </para> 311 312 <para> 313 Using GAG, user 314 can select a command, set its parameters and execute it. It is adaptive, in the sense that it 315 reflects the internal states of Geant4 that is a state machine. So, GAG always provides users with 316 the Geant4 commands which may be added, deleted, enabled or disabled during a session. GAG does nothing by itself but to play an intermediate between user and 317 an executable simulation program via pipes. Geant4's 314 318 front-end class <emphasis>G4UIGAG</emphasis> must be instantiated to 315 communicate with GAG. This runs on Linux and Windows 2000. 316 GAG is written in Java and 317 its Jar (Java Archive) file is available from the above URL. See 318 the same pages to know how to install and run Java programs. 319 </para> 319 communicate with GAG. GAG runs on Linux and Windows. If MOMO.jar is in your 320 CLASSPATH, it can be run by a command; 321 </para> 322 323 <informalexample> 324 <programlisting> 325 %java -jar MOMO.jar 326 </programlisting> 327 </informalexample> 320 328 321 329 <para> … … 329 337 a GEANT4 process and to exit GAG. Upon the normal exit or an 330 338 unexpected death of the Geant4 process, GAG window are 331 automatically reset to acceptanother GEANT4 executable.339 automatically reset to run another GEANT4 executable. 332 340 </listitem> 333 341 </varlistentry> … … 335 343 <term>GEANT4 Command tree:</term> 336 344 <listitem> 337 Upon the establishment of the pipe with the GEANT4 process, GAG displays338 the command menu tree whose look and feel is quitesimilar to339 Windows' file browser. Disabled commands are shown opaque. GAG345 Upon the establishment of the pipe connection with the GEANT4 process, GAG displays 346 the command menu, using expandable tree browser whose look and feel is similar to 347 a file browser. Disabled commands are shown in opaque. GAG 340 348 doesn &rsquo;t display commands that are just below the root of 341 349 the command hierarchy. Direct type-in field is available for such … … 364 372 Log can be redirected to the terminal (xterm or cygwin 365 373 window) from which GAG is invoked. It can be interrupted as will, 366 in the middle of long session of execution. Log can be saved to a374 in the middle of a long session of execution. Log can be saved to a 367 375 file independent of the above redirection . GAG displays warning or 368 376 error messages from GEANT4 in a pop-up warning widget. … … 383 391 384 392 <para> 385 The libraries that don't depend on external packages are made by default. 393 The libraries that don't depend on external packages are created by default, using 394 Geant4 configure scripts. 386 395 They include <emphasis>G4UIterminal</emphasis>, <emphasis>G4UItcsh</emphasis> 387 396 and <emphasis>G4UIGAG</emphasis> in libraries <emphasis>libG4UIbasic.a/so</emphasis> and … … 396 405 <emphasis role="bold">G4UI_BUILD_XAW_SESSION</emphasis> or 397 406 <emphasis role="bold">G4UI_BUILD_WIN32_SESSION</emphasis> must be set 398 explicitly .407 explicitly before creating libraries. 399 408 </para> 400 409 … … 405 414 406 415 <para> 407 Build scheme ofthe user interface libraries is416 The scheme of building the user interface libraries is 408 417 specified in "$G4INSTALL/config/G4UI_BUILD.gmk" makefile and the 409 418 dependencies on the external packages are specified in … … 416 425 <sect2 id="sect.HowToSetUpInter.HowToUseInter"> 417 426 <title> 418 How to Use the Interface 427 How to Use the Interface in Your Application 419 428 </title> 420 429 … … 422 431 To use a given interface 423 432 (<literal>G4UIxxx</literal> where <literal>xxx = terminal,Xm, Xaw, Win32, 424 GAG, GainServer</literal>) in a user's program, he has thefollowing425 lines in hismain program;433 GAG, GainServer</literal>) in your program, you have following 434 lines in your main program; 426 435 427 436 <informalexample> 428 437 <programlisting> 429 // to include the class definition in hismain program:438 // to include the class definition in the main program: 430 439 #include "G4Uixxx.hh" 431 // to instantiate a session of hischoice and start the session440 // to instantiate a session of your choice and start the session 432 441 G4UIsession* session = new G4UIxxx; 433 442 session->SessionStart(); 434 // the line next to the "SessionStart" is usually to finish the session443 // the line next to the "SessionStart" is necessary to finish the session 435 444 delete session; 436 445 </programlisting> … … 466 475 467 476 <para> 468 Again, environment variable selectsa given interface. But for your469 convenience, some of them are set defaults.477 Again, environment variable must be preset to select a given interface. But for your 478 convenience, some of them are set by defaults. 470 479 471 480 <itemizedlist spacing="compact"> … … 473 482 <emphasis>G4UIterminal</emphasis>, <emphasis>G4UItcsh</emphasis>, 474 483 <emphasis>G4UIGAG</emphasis> and <emphasis>G4UIGainServer</emphasis> 475 can be used without any environment484 can be used without setting any environment 476 485 variables. Sessions not needing external packages or libraries are 477 486 always built (see "G4UI_BUILD.gmk") and linked, so the user can … … 497 506 <listitem><para> 498 507 If the environment variable <emphasis role="bold">G4UI_NONE</emphasis> is 499 set, no externa ibraries are selected. Also, for your convenience, if any508 set, no external libraries are selected. Also, for your convenience, if any 500 509 <emphasis role="bold">G4UI_USE_XXX</emphasis> environment variable is set, 501 510 then the corresponding C-pre-processor flag is also set. However, if the -
trunk/documents/UserDoc/DocBookUsersGuides/ForApplicationDeveloper/xml/GettingStarted/visualization.xml
r905 r921 2 2 <!-- --> 3 3 <!-- [History] --> 4 <!-- Update HepRApp reference: Joseph Perl, Dec-2008 --> 4 5 <!-- Converted to DocBook: Katsuya Amako, Aug-2006 --> 5 6 <!-- Changed by: Katsuya Amako, 30-Nov-1998 --> … … 72 73 graphics systems use a graphics library compiled with Geant4, such 73 74 as OpenGL, Qt or OpenInventor, while others involve a separate application, such as 74 WIREDor DAWN.75 HepRApp or DAWN. 75 76 </para> 76 77 -
trunk/documents/UserDoc/DocBookUsersGuides/ForApplicationDeveloper/xml/TrackingAndPhysics/physicsProcess.xml
r904 r921 360 360 361 361 <para> 362 This section summarizes the electromagnetic physics processes which 363 are installed in Geant4. For details on the implementation of these 362 This section summarizes the electromagnetic (EM) physics processes which 363 are provided with Geant4. Extended information are avalable at EM web 364 <ulink url="http://geant4.web.cern.ch/geant4/collaboration/EMindex.shtml"> 365 <emphasis role="bold">pages</emphasis></ulink>. 366 For details on the implementation of these 364 367 processes please refer to the 365 368 <ulink url="http://geant4.web.cern.ch/geant4/UserDocumentation/UsersGuides/PhysicsReferenceManual/html/PhysicsReferenceManual.html"> … … 407 410 </para></listitem> 408 411 <listitem><para> 412 Multiple scattering (class name <emphasis>G4eMultipleScattering</emphasis>) 413 </para></listitem> 414 <listitem><para> 409 415 Positron annihilation into two gammas (class name 410 416 <emphasis>G4eplusAnnihilation</emphasis>) … … 424 430 <itemizedlist spacing="compact"> 425 431 <listitem><para> 432 Bremsstrahlung (class name <emphasis>G4MuBremsstrahlung</emphasis>) 433 </para></listitem> 434 <listitem><para> 426 435 Ionisation and delta ray production (class name 427 436 <emphasis>G4MuIonisation</emphasis>) 428 437 </para></listitem> 429 438 <listitem><para> 430 Bremsstrahlung (class name <emphasis>G4MuBremsstrahlung</emphasis>)439 Multiple scattering (class name <emphasis>G4MuMultipleScattering</emphasis>) 431 440 </para></listitem> 432 441 <listitem><para> … … 440 449 <itemizedlist spacing="compact"> 441 450 <listitem><para> 451 Bremsstrahlung (class name <emphasis>G4hBremsstrahlung</emphasis>) 452 </para></listitem> 453 <listitem><para> 442 454 Ionisation (class name <emphasis>G4hIonisation</emphasis>) 443 455 </para></listitem> 444 456 <listitem><para> 457 e+e- pair production (class name <emphasis>G4hPairProduction</emphasis>) 458 </para></listitem> 459 <listitem><para> 445 460 Ionisation for ions (class name <emphasis>G4ionIonisation</emphasis>) 446 461 </para></listitem> 447 462 <listitem><para> 448 Ionisation for ions in low-density media (class name <emphasis>G4ionGasIonisation</emphasis>)463 Multiple scattering (class name <emphasis>G4hMultipleScattering</emphasis>) 449 464 </para></listitem> 450 465 <listitem><para> … … 465 480 is used to simulate the multiple scattering of the all charged 466 481 particles (class name <emphasis>G4MultipleScattering</emphasis>) 467 </para></listitem>468 <listitem><para>469 Specialised process for more fast simulation the multiple scattering470 of muons and hadrons (class name <emphasis>G4hMultipleScattering</emphasis>)471 </para></listitem>472 <listitem><para>473 Alternative process (beta-version) for the multiple scattering474 of muons (class name <emphasis>G4MuMultipleScattering</emphasis>)475 482 </para></listitem> 476 483 <listitem><para> … … 549 556 550 557 <para> 551 An example of the registration of these processes in a physics list 552 is given in <xref linkend="programlist_PhysProc_1" />, 553 similar method is used in EM-builders of reference physics 554 lists ($G4INSTALL/source/physics_lists/builders) and in 555 EM examples ($G4INSTALL/examples/extended/electromagnetic). 556 557 <example id="programlist_PhysProc_1"> 558 <title> 559 <literal>Registration of standard electromagnetic processes</literal> 560 </title> 561 562 <programlisting> 563 void PhysicsList::ConstructEM() 564 565 { 566 567 theParticleIterator->reset(); 568 569 while( (*theParticleIterator)() ){ 570 571 G4ParticleDefinition* particle = theParticleIterator->value(); 572 G4ProcessManager* pmanager = particle->GetProcessManager(); 573 G4String particleName = particle->GetParticleName(); 574 575 if (particleName == "gamma") { 576 577 pmanager->AddDiscreteProcess(new G4PhotoElectricEffect); 578 pmanager->AddDiscreteProcess(new G4ComptonScattering); 579 pmanager->AddDiscreteProcess(new G4GammaConversion); 580 581 } else if (particleName == "e-") { 582 583 pmanager->AddProcess(new G4MultipleScattering, -1, 1, 1); 584 pmanager->AddProcess(new G4eIonisation, -1, 2, 2); 585 pmanager->AddProcess(new G4eBremsstrahlung, -1, 3, 3); 586 587 } else if (particleName == "e+") { 588 589 pmanager->AddProcess(new G4MultipleScattering, -1, 1, 1); 590 pmanager->AddProcess(new G4eIonisation, -1, 2, 2); 591 pmanager->AddProcess(new G4eBremsstrahlung, -1, 3, 3); 592 pmanager->AddProcess(new G4eplusAnnihilation, 0,-1, 4); 593 594 } else if( particleName == "mu+" || 595 particleName == "mu-" ) { 596 597 pmanager->AddProcess(new G4hMultipleScattering,-1, 1, 1); 598 pmanager->AddProcess(new G4MuIonisation, -1, 2, 2); 599 pmanager->AddProcess(new G4MuBremsstrahlung, -1, 3, 3); 600 pmanager->AddProcess(new G4MuPairProduction, -1, 4, 4); 601 602 } else if (particleName == "alpha" || 603 particleName == "He3" || 604 particleName == "GenericIon") { 605 // ions with charge >= +2 606 pmanager->AddProcess(new G4hMultipleScattering,-1, 1, 1); 607 pmanager->AddProcess(new G4ionIonisation, -1, 2, 2); 608 609 } else if ((!particle->IsShortLived()) && 610 (particle->GetPDGCharge() != 0.0) && 611 (particle->GetParticleName() != "chargedgeantino")) { 612 //all others charged particles except geantino and short-lived 613 pmanager->AddProcess(new G4hMultipleScattering,-1, 1, 1); 614 pmanager->AddProcess(new G4hIonisation, -1, 2, 2); 615 616 } 617 } 618 } 619 </programlisting> 620 </example> 621 </para> 622 623 <para> 558 It is recommended to use physics constructor classes provided 559 with rederence physics lists ($G4INSTALL/source/physics_lists/builders): 560 <itemizedlist spacing="compact"> 561 <listitem><para> 562 default EM physics (class name <emphasis>G4EmStandardPhysics</emphasis>) 563 </para></listitem> 564 <listitem><para> 565 optional EM physics providing similar performance as g4 7.1p01 566 (class name <emphasis>G4EmStandardPhysics_option1</emphasis>) 567 </para></listitem> 568 <listitem><para> 569 Experimental EM physics with enabled "ApplyCuts" option 570 (class name <emphasis>G4EmStandardPhysics_option2</emphasis>) 571 </para></listitem> 572 <listitem><para> 573 EM physics for simulation with high accuracy 574 (class name <emphasis>G4EmStandardPhysics_option3</emphasis>) 575 </para></listitem> 576 </itemizedlist> 577 Examples of the registration of these physics constructor and 578 construction of alternative combinations of options are shown 579 in novice and extended examples ($G4INSTALL/examples/extended/electromagnetic). 624 580 Novice and extended electromagnetic examples illustrating the use 625 581 of electromagnetic processes are available as part of the Geant4 … … 676 632 <listitem><para> 677 633 SetApplyCuts(G4bool) 634 </para></listitem> 635 <listitem><para> 636 SetSpline(G4bool) 678 637 </para></listitem> 679 638 <listitem><para> … … 836 795 The following is a summary of the Low Energy Electromagnetic 837 796 processes available in Geant4. Further information is available in 838 the 839 <ulink url="http://www.ge.infn.it/geant4/lowE/index.html"> 840 homepage 797 the web 798 <ulink url="http://geant4.web.cern.ch/geant4/collaboration/working_groups/LEelectromagnetic/index.shtml">pages 841 799 </ulink> 842 800 of the Geant4 Low Energy Electromagnetic Physics Working Group. … … 845 803 Physics Reference Manual 846 804 </ulink> 847 and in other848 <ulink url="http://www.ge.infn.it/geant4/lowE/papers.html">849 papers</ulink>.850 805 </para> 851 806 … … 899 854 900 855 <para> 901 An example of the registration of these processes in a physics list 902 is given in <xref linkend="programlist_PhysProc_2" />. 903 904 <example id="programlist_PhysProc_2"> 905 <title> 906 Registration of electromagnetic low energy electron/photon processes. 907 </title> 908 909 <programlisting> 910 void LowEnPhysicsList::ConstructEM() 911 { 912 theParticleIterator->reset(); 913 914 while( (*theParticleIterator)() ){ 915 916 G4ParticleDefinition* particle = theParticleIterator->value(); 917 G4ProcessManager* pmanager = particle->GetProcessManager(); 918 G4String particleName = particle->GetParticleName(); 919 920 if (particleName == "gamma") { 921 922 theLEPhotoElectric = new G4LowEnergyPhotoElectric(); 923 theLECompton = new G4LowEnergyCompton(); 924 theLEGammaConversion = new G4LowEnergyGammaConversion(); 925 theLERayleigh = new G4LowEnergyRayleigh(); 926 927 pmanager->AddDiscreteProcess(theLEPhotoElectric); 928 pmanager->AddDiscreteProcess(theLECompton); 929 pmanager->AddDiscreteProcess(theLERayleigh); 930 pmanager->AddDiscreteProcess(theLEGammaConversion); 931 932 } 933 else if (particleName == "e-") { 934 935 theLEIonisation = new G4LowEnergyIonisation(); 936 theLEBremsstrahlung = new G4LowEnergyBremsstrahlung(); 937 theeminusMultipleScattering = new G4MultipleScattering(); 938 939 pmanager->AddProcess(theeminusMultipleScattering,-1,1,1); 940 pmanager->AddProcess(theLEIonisation,-1,2,2); 941 pmanager->AddProcess(theLEBremsstrahlung,-1,-1,3); 942 943 } 944 else if (particleName == "e+") { 945 946 theeplusMultipleScattering = new G4MultipleScattering(); 947 theeplusIonisation = new G4eIonisation(); 948 theeplusBremsstrahlung = new G4eBremsstrahlung(); 949 theeplusAnnihilation = new G4eplusAnnihilation(); 950 951 pmanager->AddProcess(theeplusMultipleScattering,-1,1,1); 952 pmanager->AddProcess(theeplusIonisation,-1,2,2); 953 pmanager->AddProcess(theeplusBremsstrahlung,-1,-1,3); 954 pmanager->AddProcess(theeplusAnnihilation,0,-1,4); 955 } 956 } 957 } 958 </programlisting> 959 </example> 960 </para> 961 962 <para> 963 Advanced <emphasis role="bold">examples</emphasis> illustrating the use of Low Energy 964 Electromagnetic processes are available as part of the Geant4 856 Examples of the registration of physics constructor with low-energy 857 electromagnetic processes are shown 858 in Geant4 extended examples ($G4INSTALL/examples/extended/electromagnetic). 859 <emphasis role="bold">Advanced examples</emphasis> illustrating alternative instantiation 860 of these processes. Both are available as part of the Geant4 965 861 <ulink url="http://geant4.web.cern.ch/geant4/support/download.shtml"> 966 release 967 </ulink> 968 and are further documented 969 <ulink url="http://www.ge.infn.it/geant4/lowE/examples/index.html"> 970 here</ulink>. 862 release</ulink>. 971 863 </para> 972 864 … … 979 871 </emphasis> 980 872 need to be copied by the user to his/her code 981 repository. These files are distributed together with Geant4 982 <ulink url="http://geant4.web.cern.ch/geant4/support/download.shtml"> 983 release</ulink>. 984 </para> 985 986 <para> 873 repository. These files are distributed together with Geant4. 987 874 The user should set the environment variable 988 875 <emphasis role="bold">G4LEDATA</emphasis> to the … … 1039 926 </para></listitem> 1040 927 </itemizedlist> 1041 </para>1042 1043 <para>1044 The available models for ElectronicStoppingPower and1045 NuclearStoppingPower are documented in the1046 <ulink url="http://www.ge.infn.it/geant4/lowE/swprocess/design/">1047 class diagrams</ulink>.1048 928 </para> 1049 929 … … 1090 970 <ulink url="http://geant4.web.cern.ch/geant4/UserDocumentation/UsersGuides/PhysicsReferenceManual/html/PhysicsReferenceManual.html"> 1091 971 Physics Reference Manual 1092 </ulink> 1093 and in the Geant4 Low Energy Electromagnetic Physics Working Group 1094 <ulink url="http://www.ge.infn.it/geant4/lowE/index.html"> 1095 homepage</ulink>. 972 </ulink>. 1096 973 </para> 1097 974 … … 1139 1016 G4PhotoElectricAngularGeneratorSauterGavrilla and 1140 1017 G4PhotoElectricAngularGeneratorPolarized can be set using the 1141 strings "standard" and "polarized". Information regarding 1142 conditions of use, performance and energy limits of different 1143 models are available in the 1144 <ulink url="http://geant4.web.cern.ch/geant4/UserDocumentation/UsersGuides/PhysicsReferenceManual/html/PhysicsReferenceManual.html"> 1145 Physics Reference Manual 1146 </ulink> 1147 and in the Geant4 Low Energy Electromagnetic Physics Working Group 1148 <ulink url="http://www.ge.infn.it/geant4/lowE/index.html"> 1149 homepage</ulink>. 1018 strings "standard" and "polarized". 1150 1019 </para> 1151 1020 … … 1155 1024 <sect3 id="sect.PhysProc.EleMag.VeryLowE"> 1156 1025 <title> 1157 Very Low energy Electromagnetic Processes (Geant4 DNA extension)1026 Very Low energy Electromagnetic Processes (Geant4-DNA extension) 1158 1027 </title> 1159 1028 … … 1162 1031 to energies of a few electronVolts suitable for the simulation of radiation 1163 1032 effects in liquid water for applications at the cellular and sub-cellular 1164 level. These developments take place in the framework of the Geant4 DNA 1165 project 1166 [ 1167 <ulink url="http://www.ge.infn.it/geant4/dna"> 1168 http://www.ge.infn.it/geant4/dna 1169 </ulink> 1170 ] and are fully described in the paper 1033 level. These developments take place in the framework of the Geant4-DNA 1034 project and are described in the paper 1171 1035 <citation> 1172 1036 <xref linkend="biblio.chauvie2007" endterm="biblio.chauvie2007.abbrev" /> … … 1196 1060 <itemizedlist spacing="compact"> 1197 1061 <listitem><para> 1198 Elastic scattering (two complementary models available depending on energy range )1062 Elastic scattering (two complementary models available depending on energy range, and one alternative model) 1199 1063 <itemizedlist spacing="compact"> 1200 1064 <listitem><para> 1201 Cross section policy class name, common to both models : 1202 G4CrossSectionElasticScreenedRutherford 1203 </para></listitem> 1204 <listitem><para> 1205 Final state policy class names : G4FinalStateElasticScreenedRutherford 1206 or G4FinalStateElasticBrennerZaider 1065 - 1) either : cross section policy class names : G4CrossSectionElasticScreenedRutherfordLE (below 200 eV) 1066 and G4CrossSectionElasticScreenedRutherfordHE (above 200 eV). Both should be used together. 1067 - 2) or : cross section policy class name : G4CrossSectionElasticChampion. 1068 </para></listitem> 1069 <listitem><para> 1070 - 1) either : final state policy class names : G4FinalStateElasticBrennerZaider (corresponding to G4CrossSectionElasticScreenedRutherfordLE) 1071 and G4CrossSectionElasticScreenedRutherfordLE (corresponding to G4CrossSectionElasticScreenedRutherfordHE). 1072 - 2) or final state policy class name : G4FinalStateElasticChampion (corresponding to G4CrossSectionElasticChampion). 1207 1073 </para></listitem> 1208 1074 </itemizedlist> … … 1471 1337 #include "G4FinalStateExcitationEmfietzoglou.hh" 1472 1338 1473 #include "G4CrossSectionElasticScreenedRutherford.hh" 1339 #include "G4CrossSectionElasticScreenedRutherfordLE.hh" 1340 #include "G4FinalStateElasticBrennerZaider.hh" 1341 1342 #include "G4CrossSectionElasticScreenedRutherfordHE.hh" 1474 1343 #include "G4FinalStateElasticScreenedRutherford.hh" 1475 #include "G4FinalStateElasticBrennerZaider.hh" 1344 1345 #include "G4CrossSectionElasticChampion.hh" 1346 #include "G4FinalStateElasticChampion.hh" 1476 1347 1477 1348 #include "G4CrossSectionExcitationBorn.hh" … … 1495 1366 // Processes definition 1496 1367 1497 typedef G4DNAProcess<G4CrossSectionElasticScreenedRutherford,G4FinalStateElasticScreenedRutherford> 1498 ElasticScreenedRutherford; 1499 typedef G4DNAProcess<G4CrossSectionElasticScreenedRutherford,G4FinalStateElasticBrennerZaider> 1500 ElasticBrennerZaider; 1368 typedef G4DNAProcess<G4CrossSectionElasticScreenedRutherfordLE,G4FinalStateElasticBrennerZaider> 1369 ElasticScreenedRutherfordLE; 1370 typedef G4DNAProcess<G4CrossSectionElasticScreenedRutherfordHE,G4FinalStateElasticScreenedRutherford> 1371 ElasticScreenedRutherfordHE; 1372 typedef G4DNAProcess<G4CrossSectionElasticChampion,G4FinalStateElasticChampion> 1373 ElasticChampion; 1501 1374 typedef G4DNAProcess<G4CrossSectionExcitationEmfietzoglou,G4FinalStateExcitationEmfietzoglou> 1502 1375 ExcitationEmfietzoglou; … … 1527 1400 1528 1401 if (particleName == "e-") { 1529 processManager->AddDiscreteProcess(new ExcitationEmfietzoglou); 1530 processManager->AddDiscreteProcess(new ElasticScreenedRutherford); 1531 processManager->AddDiscreteProcess(new ElasticBrennerZaider); 1532 processManager->AddDiscreteProcess(new IonisationBorn); 1402 processManager->AddDiscreteProcess(new ExcitationEmfietzoglou("ExcitationEmfietzoglou")); 1403 1404 // The two following elastic scattering models should be registered together 1405 processManager->AddDiscreteProcess(new ElasticScreenedRutherfordLE("ElasticScreenedRutherfordLE")); 1406 processManager->AddDiscreteProcess(new ElasticScreenedRutherfordHE("ElasticScreenedRutherfordHE")); 1407 1408 // The following process is commented here because it is ALTERNATIVE to ElasticScreenedRutherfordLE and ElasticScreenedRutherfordHE 1409 // It should NOT be registered simultaneously with ElasticScreenedRutherfordLE and ElasticScreenedRutherfordHE 1410 // processManager->AddDiscreteProcess(new ElasticChampion("ElasticChampion")); 1411 1412 processManager->AddDiscreteProcess(new IonisationBorn("IonisationBorn")); 1533 1413 1534 1414 } else if ( particleName == "proton" ) { 1535 processManager->AddDiscreteProcess(new ExcitationMillerGreen );1536 processManager->AddDiscreteProcess(new ExcitationBorn );1537 processManager->AddDiscreteProcess(new IonisationRudd );1538 processManager->AddDiscreteProcess(new IonisationBorn );1539 processManager->AddDiscreteProcess(new ChargeDecrease );1415 processManager->AddDiscreteProcess(new ExcitationMillerGreen("ExcitationMillerGreen")); 1416 processManager->AddDiscreteProcess(new ExcitationBorn("ExcitationBorn")); 1417 processManager->AddDiscreteProcess(new IonisationRudd("IonisationRudd")); 1418 processManager->AddDiscreteProcess(new IonisationBorn("IonisationBorn")); 1419 processManager->AddDiscreteProcess(new ChargeDecrease("ChargeDecrease")); 1540 1420 1541 1421 } else if ( particleName == "hydrogen" ) { 1542 processManager->AddDiscreteProcess(new IonisationRudd );1543 processManager->AddDiscreteProcess(new ChargeIncrease );1422 processManager->AddDiscreteProcess(new IonisationRudd("IonisationRudd")); 1423 processManager->AddDiscreteProcess(new ChargeIncrease("ChargeIncrease")); 1544 1424 1545 1425 } else if ( particleName == "alpha" ) { 1546 processManager->AddDiscreteProcess(new ExcitationMillerGreen );1547 processManager->AddDiscreteProcess(new IonisationRudd );1548 processManager->AddDiscreteProcess(new ChargeDecrease );1426 processManager->AddDiscreteProcess(new ExcitationMillerGreen("ExcitationMillerGreen")); 1427 processManager->AddDiscreteProcess(new IonisationRudd("IonisationRudd")); 1428 processManager->AddDiscreteProcess(new ChargeDecrease("ChargeDecrease")); 1549 1429 1550 1430 } else if ( particleName == "alpha+" ) { 1551 processManager->AddDiscreteProcess(new ExcitationMillerGreen );1552 processManager->AddDiscreteProcess(new IonisationRudd );1553 processManager->AddDiscreteProcess(new ChargeDecrease );1554 processManager->AddDiscreteProcess(new ChargeIncrease );1431 processManager->AddDiscreteProcess(new ExcitationMillerGreen("ExcitationMillerGreen")); 1432 processManager->AddDiscreteProcess(new IonisationRudd("IonisationRudd")); 1433 processManager->AddDiscreteProcess(new ChargeDecrease("ChargeDecrease")); 1434 processManager->AddDiscreteProcess(new ChargeIncrease("ChargeIncrease")); 1555 1435 1556 1436 } else if ( particleName == "helium" ) { 1557 processManager->AddDiscreteProcess(new ExcitationMillerGreen );1558 processManager->AddDiscreteProcess(new IonisationRudd );1559 processManager->AddDiscreteProcess(new ChargeIncrease );1437 processManager->AddDiscreteProcess(new ExcitationMillerGreen("ExcitationMillerGreen")); 1438 processManager->AddDiscreteProcess(new IonisationRudd("IonisationRudd")); 1439 processManager->AddDiscreteProcess(new ChargeIncrease("ChargeIncrease")); 1560 1440 } 1561 1441 … … 3467 3347 <mediaobject> 3468 3348 <imageobject role="fo"> 3469 <imagedata fileref="./AllResources/TrackingAndPhysics/physicsProcessPARAM.src/ComponentsWithRegion. gif"3349 <imagedata fileref="./AllResources/TrackingAndPhysics/physicsProcessPARAM.src/ComponentsWithRegion.jpg" 3470 3350 format="JPG" contentwidth="7.0cm" align="center" /> 3471 3351 </imageobject> 3472 3352 <imageobject role="html"> 3473 <imagedata fileref="./AllResources/TrackingAndPhysics/physicsProcessPARAM.src/ComponentsWithRegion. gif"3353 <imagedata fileref="./AllResources/TrackingAndPhysics/physicsProcessPARAM.src/ComponentsWithRegion.jpg" 3474 3354 format="JPG" align="center" /> 3475 3355 </imageobject> -
trunk/documents/UserDoc/DocBookUsersGuides/ForApplicationDeveloper/xml/TrackingAndPhysics/physicsTable.xml
r904 r921 25 25 event loop, the <literal>BuildPhysicsTable()</literal> method of 26 26 <emphasis>G4VProcess</emphasis> is invoked for all processes and 27 cross section tables are prepared. "Standard" electromagnetic28 processes calculate cross section and/or energy loss values for27 as a part of initialisation procedure cross section tables are prepared. 28 Energy loss processes calculate cross section and/or energy loss values for 29 29 each material and for each production cut value assigned to each 30 30 material. A change in production cut values therefore require these 31 31 cross sections to be re-calculated. Cross sections for hadronic 32 processes do not depend on the production cut.32 processes and gamma processes do not depend on the production cut. 33 33 </para> 34 34 … … 38 38 <emphasis>G4PhysicsVector</emphasis> (and derived classes), each of which has 39 39 cross section values for a particle within a given energy range 40 traveling in a material. 40 traveling in a material. By default the linear interpolation is used, alternatively 41 spline may be used if the flag 42 of spline is activated by <emphasis>SetSpline</emphasis> method of the 43 <emphasis>G4PhysicsVector</emphasis> 41 44 </para> 42 45 … … 81 84 82 85 <para> 83 Calculated physics tables for "Standard"electromagnetic processes86 Calculated physics tables for electromagnetic processes 84 87 can be stored in files. The user may thus eliminate the time 85 88 required for the calculation of physics tables by retrieving them -
trunk/documents/UserDoc/DocBookUsersGuides/ForApplicationDeveloper/xml/Visualization/commandcontrol.xml
r905 r921 3 3 <!-- [History] --> 4 4 <!-- Converted to DocBook: Katsuya Amako, Aug-2006 --> 5 <!-- Added Qt Info: Laurent Garnier, Dec-2008 --> 5 6 <!-- --> 6 7 <!-- ******************************************************** --> … … 373 374 </para> 374 375 </para></listitem> 376 <listitem><para> 377 <emphasis role="bold">Additional note 2</emphasis> 378 <para> 379 Events may be kept and reviewed at end of run with 380 <programlisting> 381 Idle> /vis/reviewKeptEvents 382 </programlisting> 383 Keep all events with 384 <programlisting> 385 Idle> /vis/scene/endOfEventAction accumulate [maxNumber] 386 </programlisting> 387 (see 388 <xref linkend="sect.VisCntCmmd.EndEvtRun" />) 389 </para><para> 390 or keep some chosen subset with 391 <programlisting> 392 G4EventManager::GetEventManager()->KeepTheCurrentEvent(); 393 </programlisting> 394 as described in 395 <xref linkend="programlist_OptUAct_1" />. 396 </para><para> 397 To suppress drawing during a run 398 <programlisting> 399 Idle> /vis/disable 400 Idle> /run/beamOn 10000 401 </programlisting> 402 then at end of run 403 <programlisting> 404 Idle> /vis/enable 405 Idle> /vis/reviewKeptEvents 406 </programlisting> 407 </para> 408 </para></listitem> 375 409 </itemizedlist> 376 410 … … 650 684 End of Event Action and End of Run Action: 651 685 <literal>/vis/viewer/endOfEventAction</literal> and 652 <literal>/vis/viewer/endOf EventAction</literal> commands686 <literal>/vis/viewer/endOfRunAction</literal> commands 653 687 </title> 654 688 … … 845 879 846 880 <para> 847 The WIRED3HepRep Browser and WIRED4 JAS Plug-In can generate a881 The HepRApp HepRep Browser and WIRED4 JAS Plug-In can generate a 848 882 wide variety of bitmap and vector output formats including 849 883 PostScript and PDF. … … 1225 1259 </para> 1226 1260 </para></listitem> 1227 <listitem><para> 1228 <ulink url="./Visualization/visTutor/exN03Vis15_mac.html"> 1229 exN03Vis15.mac:</ulink> 1230 <para> 1231 A basic macro for visualization of detector geometry and events 1232 using Qt. 1233 </para> 1234 </para></listitem> 1235 <listitem><para> 1261 <listitem><para> 1236 1262 <ulink url="./Visualization/visTutor/exN03Tree0_mac.html"> 1237 1263 exN03Tree0.mac:</ulink> -
trunk/documents/UserDoc/DocBookUsersGuides/ForApplicationDeveloper/xml/Visualization/introduction.xml
r905 r921 6 6 <!-- Proof read by: Joe Chuma, 5-Jul-1999 --> 7 7 <!-- Converted to DocBook: Katsuya Amako, Aug-2006 --> 8 <!-- Added Qt Info: Laurent Garnier, Dec-2008 --> 9 <!-- Updates for Qt and HepRApp: Joseph Perl, Dec-2008 --> 8 10 <!-- --> 9 11 <!-- ******************************************************** --> … … 47 49 graphics systems use a graphics library compiled with Geant4, such 48 50 as OpenGL, Qt, while others involve a separate application, such as 49 WIREDor DAWN.51 HepRApp or DAWN. 50 52 </para> 51 53 … … 123 125 </para></listitem> 124 126 <listitem><para> 125 Uses GL libraries that are already included on most Linux 126 systems (plus some Windows availability) 127 Requires addition of GL libraries that are freely avialable for all operating systems (and pre-installed on many) 127 128 </para></listitem> 128 129 <listitem><para> … … 137 138 </para></listitem> 138 139 <listitem><para> 139 Limited printing ability (pixel graphics, not vectorgraphics)140 Print to EPS (vector and pixel graphics) 140 141 </para></listitem> 141 142 </itemizedlist> … … 148 149 </para></listitem> 149 150 <listitem><para> 150 Uses Qt and GL libraries that are already included on most Linux151 systems (plus some Windows availability)151 Requies addition of Qt and GL libraries that are freely available on most operating 152 systems 152 153 </para></listitem> 153 154 <listitem><para> … … 168 169 </para></listitem> 169 170 <listitem><para> 170 Make movies interactively171 Easy interface to make movies 171 172 </para></listitem> 172 173 </itemizedlist> … … 205 206 </para></listitem> 206 207 <listitem><para> 207 HepRep/WIRED 208 <itemizedlist spacing="compact"> 209 <listitem><para> 210 Create a file to view in the WIRED3 HepRep Browser or the 211 WIRED4 JAS Plugin 212 </para></listitem> 213 <listitem><para> 214 Requires WIRED browser (a Java application easily to install on 215 all operating systems) 208 HepRep 209 <itemizedlist spacing="compact"> 210 <listitem><para> 211 Create a file to view in a HepRep browser such as HepRApp, 212 FRED or WIRED4 213 </para></listitem> 214 <listitem><para> 215 Requires a HepRep browser (above options work on any operating system) 216 216 </para></listitem> 217 217 <listitem><para> … … 348 348 <listitem><para> 349 349 If you want very responsive photorealistic graphics plus more 350 interactivity (and have the OpenInventor libraries installed)351 <itemizedlist spacing="compact"> 352 <listitem><para> 353 OpenInventor is a good solution350 interactivity (and have the OpenInventor or Qt libraries installed) 351 <itemizedlist spacing="compact"> 352 <listitem><para> 353 OpenInventor or Qt are good solutions 354 354 </para></listitem> 355 355 </itemizedlist> … … 370 370 <itemizedlist spacing="compact"> 371 371 <listitem><para> 372 HepRep /WIREDwill meet your needs372 HepRep will meet your needs 373 373 </para></listitem> 374 374 </itemizedlist> … … 473 473 <itemizedlist spacing="compact"> 474 474 <listitem><para> 475 HepRep /WIRED475 HepRep 476 476 </para></listitem> 477 477 <listitem><para> … … 527 527 <xref linkend="sect.VisPlylMrkTxt" /> 528 528 Polylines, Markers and Text 529 </para></listitem> 530 <listitem><para> 531 <xref linkend="sect.MkMovie" /> 532 Making a Movie 529 533 </para></listitem> 530 534 </itemizedlist> -
trunk/documents/UserDoc/DocBookUsersGuides/ForApplicationDeveloper/xml/Visualization/makingamovie.xml
r904 r921 3 3 <!-- [History] --> 4 4 <!-- Converted to DocBook: Katsuya Amako, Aug-2006 --> 5 <!-- Updates for Qt: Laurent Garnier, Dec-2008 --> 5 6 <!-- --> 6 7 <!-- ******************************************************** --> … … 29 30 drivers currently capable of producing picture files are: 30 31 32 <ulink url="http://bmrc.berkeley.edu/frame/research/mpeg/mpeg_encode.html">More informations about MPEG encoder</ulink> 33 31 34 <informaltable> 32 35 <tgroup cols="2"> … … 70 73 <entry> 71 74 eps 75 </entry> 76 </row> 77 <row> 78 <entry> 79 Qt 80 </entry> 81 <entry> 82 jpeg, eps, ppm, ... 72 83 </entry> 73 84 </row> … … 205 216 </sect2> 206 217 218 <!-- ******************* Section (Level#2) ****************** --> 219 <sect2 id="sect.MkMovie.Qt"> 220 <title> 221 Qt 222 </title> 223 224 <para> 225 The Qt driver provides one of the easiest ways to make a movie. 226 Of course, you first need to add the Qt libraries and link with Qt, 227 but once you have that, Qt provides a ready-made function to store all updates of the OpenGL 228 frame into the movie format. 229 You then use loops (as defined in OGLX section above) or even move/rotate/zoom you scene 230 by mouse actions to form your movie. 231 </para> 232 <para> 233 The Qt driver automatically handles all of the movie-making steps described in the OGLX section of this document - storing the files, converting them and assembling the finished movie. 234 You just have to take care of installing an mpeg_encoder. 235 </para> 236 <para> 237 To make a movie : 238 <itemizedlist spacing="compact"> 239 <listitem><para> 240 Right click to display a context menu, "Action"->"Movie parameters". 241 </para></listitem> 242 <listitem><para> 243 Select MPEG encoder path if it was not found. 244 </para></listitem> 245 <listitem><para> 246 Select the name of the output movie. 247 </para></listitem> 248 <listitem><para> 249 Let go! Hit SPACE to Start/Pause recording, RETURN to STOP 250 </para></listitem> 251 </itemizedlist> 252 </para> 253 <para> 254 Then, open your movie (on Mac, for example): 255 256 <informalexample> 257 <programlisting> 258 open G4OpenGL.mpg 259 </programlisting> 260 </informalexample> 261 262 opens a QuickTime player. 263 </para> 264 265 </sect2> 266 207 267 208 268 <!-- ******************* Section (Level#2) ****************** --> -
trunk/documents/UserDoc/DocBookUsersGuides/ForApplicationDeveloper/xml/Visualization/visdrivers.xml
r905 r921 4 4 <!-- Changed by: Dennis Wright, 27-Nov-2001 --> 5 5 <!-- Converted to DocBook: Katsuya Amako, Aug-2006 --> 6 <!-- Updates for Qt and HepRApp: Joseph Perl, Dec-2008 --> 6 7 <!-- --> 7 8 <!-- ******************************************************** --> … … 114 115 </entry> 115 116 <entry> 116 Linux, U nix, Mac with Xlib117 Linux, UNIX, Mac with Xlib 117 118 </entry> 118 119 </row> … … 147 148 </entry> 148 149 <entry> 149 Linux, U nix, Mac, Windows150 Linux, UNIX, Mac, Windows 150 151 </entry> 151 152 </row> … … 177 178 </entry> 178 179 <entry> 179 WIRED or FREDHepRep Browser180 HepRApp, FRED or WIRED4 HepRep Browser 180 181 </entry> 181 182 <entry> … … 191 192 </entry> 192 193 <entry> 193 Linux, U nix, Mac, Windows194 Linux, UNIX, Mac, Windows 194 195 </entry> 195 196 </row> … … 304 305 305 306 <para> 306 If you don't have Motif, all control is done from Geant4 307 Output can be exported to EPS (both vector and pixel graphics) 308 using vis/ogl/printEPS. 309 </para> 310 311 <para> 312 If you don't have Motif or Qt, all control is done from Geant4 307 313 commands: 308 314 … … 327 333 </programlisting> 328 334 </informalexample> 335 </para> 336 337 <para> 338 If you have Qt, see the Qt section below. 329 339 </para> 330 340 … … 367 377 368 378 <para> 369 This driver have been developed by Laurent Garnier (IN2P3, LAL Orsay). 370 It is an interface to the powerful toolkit Qt, now free on lot of 371 platforms. This driver needs OpenGL library to be install. It is well suited for 372 real-time fast visualization and demonstration. Fast visualization 373 is realized with hardware acceleration, reuse of shapes stored in a 379 This driver has been developed by Laurent Garnier (IN2P3, LAL Orsay). 380 It is an interface to the powerful application framework, Qt, now free on most 381 platforms. This driver also requires the OpenGL library. 382 </para><para> 383 The Qt driver is well suited for real-time fast visualization and demonstration. 384 Fast visualization is realized with hardware acceleration, reuse of shapes stored in a 374 385 display list, etc. NURBS visualization is also supported. All OpenGL 375 features are implement s in Qt driver . In addition, mouse events control376 are used to rotation/move/zoom volume, you can save your scene in lots 377 of formats (vector or not), make movies... 386 features are implemented in the Qt driver, but one also gets mouse 387 control of rotation/translation/zoom, the ability to save your scene in many formats 388 (both vector and pixel graphics) and an easy interface for making movies. 378 389 </para><para> 379 There is only one session of Qt driver for all available platform.380 390 Two display modes are available: immediate mode and stored mode. 381 391 The former has no limitation on data size, and the latter is fast … … 386 396 <para> 387 397 To see the visualization window : 388 </para> 398 389 399 <?soft-pagebreak ?> 390 400 <informalexample> 391 401 <programlisting> 392 /vis/open OGLSQt 402 /vis/open OGLSQt (for Stored mode) 403 or 404 /vis/open OGLIQt (for Immediate mode) 393 405 </programlisting> 394 406 </informalexample> … … 404 416 </para></listitem> 405 417 <listitem><para> 406 <ulink url="http:// geant4.slac.stanford.edu/Presentations/vis/G4OpenGLTutorial/G4OpenGLTutorial.html">418 <ulink url="http://users.lal.in2p3.fr/garnier/G4QtTutorial.html"> 407 419 Geant4 Visualization Tutorial 408 420 </ulink> … … 410 422 </para></listitem> 411 423 </itemizedlist> 424 </para> 412 425 </sect2> 413 426 … … 523 536 The HepRepFile driver creates a HepRep XML file in the HepRep1 524 537 format suitable for viewing with the 525 <ulink url="http://www.slac.stanford.edu/ BFROOT/www/Computing/Graphics/Wired/">526 WIRED3</ulink> HepRep Browser.538 <ulink url="http://www.slac.stanford.edu/~perl/HepRApp/"> 539 HepRApp</ulink> HepRep Browser. 527 540 </para> 528 541 … … 565 578 566 579 <para> 567 View the file using the WIRED3HepRep Browser, available from:568 </para> 569 <para> 570 <ulink url="http://www.slac.stanford.edu/ BFROOT/www/Computing/Graphics/Wired/">571 http://www.slac.stanford.edu/ BFROOT/www/Computing/Graphics/Wired/580 View the file using the HepRApp HepRep Browser, available from: 581 </para> 582 <para> 583 <ulink url="http://www.slac.stanford.edu/~perl/HepRApp/"> 584 http://www.slac.stanford.edu/~perl/HepRApp/ 572 585 </ulink> 573 586 . … … 575 588 576 589 <para> 577 WIRED3allows you to pick on volumes, trajectories and hits to590 HepRApp allows you to pick on volumes, trajectories and hits to 578 591 find out their associated HepRep Attributes, such as volume name, 579 592 particle ID, momentum, etc. These same attributes can be displayed … … 584 597 585 598 <para> 586 WIRED3can read heprep files in zipped format as well as599 HepRApp can read heprep files in zipped format as well as 587 600 unzipped, so you can save space by applying gzip to the heprep 588 601 file. This will reduce the file to about five percent of its … … 661 674 <itemizedlist spacing="compact"> 662 675 <listitem><para> 663 WIRED3Users Home Page:676 HepRApp Users Home Page: 664 677 <para> 665 <ulink url="http://www.slac.stanford.edu/ BFROOT/www/Computing/Graphics/Wired/">666 http://www.slac.stanford.edu/ BFROOT/www/Computing/Graphics/Wired/678 <ulink url="http://www.slac.stanford.edu/~perl/HepRApp/"> 679 http://www.slac.stanford.edu/~perl/HepRApp/ 667 680 </ulink> 668 681 . … … 678 691 </para></listitem> 679 692 <listitem><para> 680 Geant4 Visualization Tutorial using the WIRED3HepRep Browser693 Geant4 Visualization Tutorial using the HepRApp HepRep Browser 681 694 <para> 682 <ulink url="http://geant4.slac.stanford.edu/Presentations/vis/G4 WIREDTutorial/G4WIREDTutorial.html">683 http://geant4.slac.stanford.edu/Presentations/vis/G4 WIREDTutorial/G4WIREDTutorial.html695 <ulink url="http://geant4.slac.stanford.edu/Presentations/vis/G4HepRAppTutorial/G4HepRAppTutorial.html"> 696 http://geant4.slac.stanford.edu/Presentations/vis/G4HepRAppTutorial/G4HepRAppTutorial.html 684 697 </ulink> 685 698 </para> … … 1623 1636 <mediaobject> 1624 1637 <imageobject role="fo"> 1625 <imagedata fileref="./AllResources/Visualization/visualization.src/xmlnp. gif"1638 <imagedata fileref="./AllResources/Visualization/visualization.src/xmlnp.jpg" 1626 1639 format="JPG" contentwidth="12.0cm" align="center" /> 1627 1640 </imageobject> 1628 1641 <imageobject role="html"> 1629 <imagedata fileref="./AllResources/Visualization/visualization.src/xmlnp. gif"1642 <imagedata fileref="./AllResources/Visualization/visualization.src/xmlnp.jpg" 1630 1643 format="JPG" align="center" /> 1631 1644 </imageobject> … … 1643 1656 <mediaobject> 1644 1657 <imageobject role="fo"> 1645 <imagedata fileref="./AllResources/Visualization/visualization.src/xmlnpfind. gif"1658 <imagedata fileref="./AllResources/Visualization/visualization.src/xmlnpfind.jpg" 1646 1659 format="JPG" contentwidth="12.0cm" align="center" /> 1647 1660 </imageobject> 1648 1661 <imageobject role="html"> 1649 <imagedata fileref="./AllResources/Visualization/visualization.src/xmlnpfind. gif"1662 <imagedata fileref="./AllResources/Visualization/visualization.src/xmlnpfind.jpg" 1650 1663 format="JPG" align="center" /> 1651 1664 </imageobject> -
trunk/documents/UserDoc/DocBookUsersGuides/ForApplicationDeveloper/xml/Visualization/visexecutable.xml
r905 r921 3 3 <!-- [History] --> 4 4 <!-- Converted to DocBook: Katsuya Amako, Aug-2006 --> 5 <!-- Updates for Qt: Laurent Garnier, Dec-2008 --> 5 6 <!-- --> 6 7 <!-- ******************************************************** --> -
trunk/documents/UserDoc/DocBookUsersGuides/ForApplicationDeveloper/xml/XSLCustomizationLayer/G4XSLCustomFO.xsl
r904 r921 10 10 <!-- Import the FO stylesheet --> 11 11 <!-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> 12 <xsl:import href="/usr/share/xml/docbook/stylesheet/nwalsh/ current/fo/docbook.xsl"/>12 <xsl:import href="/usr/share/xml/docbook/stylesheet/nwalsh/fo/docbook.xsl" /> 13 13 14 14 <!-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> -
trunk/documents/UserDoc/DocBookUsersGuides/ForApplicationDeveloper/xml/XSLCustomizationLayer/G4XSLCustomHTML.xsl
r904 r921 9 9 <!-- Import the stylesheet to chunk the html output --> 10 10 <!-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> 11 <xsl:import href="/usr/share/xml/docbook/stylesheet/nwalsh/ current/html/chunk.xsl" />11 <xsl:import href="/usr/share/xml/docbook/stylesheet/nwalsh/html/chunk.xsl" /> 12 12 13 13 <!-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> -
trunk/documents/UserDoc/DocBookUsersGuides/ForToolkitDeveloper/xml/BookForToolDev.xml
r904 r921 32 32 </authorgroup> 33 33 34 <pubdate>1 4 December, 2007</pubdate>35 <releaseinfo>Version: geant4 9. 1</releaseinfo>34 <pubdate>19 December, 2008</pubdate> 35 <releaseinfo>Version: geant4 9.2</releaseinfo> 36 36 37 37 </bookinfo> -
trunk/documents/UserDoc/DocBookUsersGuides/ForToolkitDeveloper/xml/GuideToExtendFunctionality/HadronicPhysics/hadronics.xml
r904 r921 131 131 <mediaobject> 132 132 <imageobject role="fo"> 133 <imagedata fileref="./AllResources/GuideToExtendFunctionality/HadronicPhysics/Level1. gif"134 format=" GIF" align="center" contentwidth="10.0cm" />133 <imagedata fileref="./AllResources/GuideToExtendFunctionality/HadronicPhysics/Level1.jpg" 134 format="JPG" align="center" contentwidth="10.0cm" /> 135 135 </imageobject> 136 136 <imageobject role="html"> 137 <imagedata fileref="./AllResources/GuideToExtendFunctionality/HadronicPhysics/Level1. gif"138 format=" GIF" align="center" />137 <imagedata fileref="./AllResources/GuideToExtendFunctionality/HadronicPhysics/Level1.jpg" 138 format="JPG" align="center" /> 139 139 </imageobject> 140 140 </mediaobject> … … 270 270 <mediaobject> 271 271 <imageobject role="fo"> 272 <imagedata fileref="./AllResources/GuideToExtendFunctionality/HadronicPhysics/Level2_1. gif"273 format=" GIF" align="center" contentwidth="10.0cm" />272 <imagedata fileref="./AllResources/GuideToExtendFunctionality/HadronicPhysics/Level2_1.jpg" 273 format="JPG" align="center" contentwidth="10.0cm" /> 274 274 </imageobject> 275 275 <imageobject role="html"> 276 <imagedata fileref="./AllResources/GuideToExtendFunctionality/HadronicPhysics/Level2_1. gif"277 format=" GIF" align="center" />276 <imagedata fileref="./AllResources/GuideToExtendFunctionality/HadronicPhysics/Level2_1.jpg" 277 format="JPG" align="center" /> 278 278 </imageobject> 279 279 </mediaobject> … … 287 287 <mediaobject> 288 288 <imageobject role="fo"> 289 <imagedata fileref="./AllResources/GuideToExtendFunctionality/HadronicPhysics/Level2_2. gif"290 format=" GIF" align="center" contentwidth="10.0cm" />289 <imagedata fileref="./AllResources/GuideToExtendFunctionality/HadronicPhysics/Level2_2.jpg" 290 format="JPG" align="center" contentwidth="10.0cm" /> 291 291 </imageobject> 292 292 <imageobject role="html"> 293 <imagedata fileref="./AllResources/GuideToExtendFunctionality/HadronicPhysics/Level2_2. gif"294 format=" GIF" align="center" />293 <imagedata fileref="./AllResources/GuideToExtendFunctionality/HadronicPhysics/Level2_2.jpg" 294 format="JPG" align="center" /> 295 295 </imageobject> 296 296 </mediaobject> … … 304 304 <mediaobject> 305 305 <imageobject role="fo"> 306 <imagedata fileref="./AllResources/GuideToExtendFunctionality/HadronicPhysics/Level2_3. gif"307 format=" GIF" align="center" contentwidth="10.0cm" />306 <imagedata fileref="./AllResources/GuideToExtendFunctionality/HadronicPhysics/Level2_3.jpg" 307 format="JPG" align="center" contentwidth="10.0cm" /> 308 308 </imageobject> 309 309 <imageobject role="html"> 310 <imagedata fileref="./AllResources/GuideToExtendFunctionality/HadronicPhysics/Level2_3. gif"311 format=" GIF" align="center" />310 <imagedata fileref="./AllResources/GuideToExtendFunctionality/HadronicPhysics/Level2_3.jpg" 311 format="JPG" align="center" /> 312 312 </imageobject> 313 313 </mediaobject> … … 485 485 <mediaobject> 486 486 <imageobject role="fo"> 487 <imagedata fileref="./AllResources/GuideToExtendFunctionality/HadronicPhysics/Level3_1. gif"488 format=" GIF" align="center" contentwidth="10.0cm" />487 <imagedata fileref="./AllResources/GuideToExtendFunctionality/HadronicPhysics/Level3_1.jpg" 488 format="JPG" align="center" contentwidth="10.0cm" /> 489 489 </imageobject> 490 490 <imageobject role="html"> 491 <imagedata fileref="./AllResources/GuideToExtendFunctionality/HadronicPhysics/Level3_1. gif"492 format=" GIF" align="center" />491 <imagedata fileref="./AllResources/GuideToExtendFunctionality/HadronicPhysics/Level3_1.jpg" 492 format="JPG" align="center" /> 493 493 </imageobject> 494 494 </mediaobject> … … 682 682 <mediaobject> 683 683 <imageobject role="fo"> 684 <imagedata fileref="./AllResources/GuideToExtendFunctionality/HadronicPhysics/Level4_1. gif"685 format=" GIF" align="center" contentwidth="10.0cm" />684 <imagedata fileref="./AllResources/GuideToExtendFunctionality/HadronicPhysics/Level4_1.jpg" 685 format="JPG" align="center" contentwidth="10.0cm" /> 686 686 </imageobject> 687 687 <imageobject role="html"> 688 <imagedata fileref="./AllResources/GuideToExtendFunctionality/HadronicPhysics/Level4_1. gif"689 format=" GIF" align="center" />688 <imagedata fileref="./AllResources/GuideToExtendFunctionality/HadronicPhysics/Level4_1.jpg" 689 format="JPG" align="center" /> 690 690 </imageobject> 691 691 </mediaobject> … … 699 699 <mediaobject> 700 700 <imageobject role="fo"> 701 <imagedata fileref="./AllResources/GuideToExtendFunctionality/HadronicPhysics/Level4_2. gif"702 format=" GIF" align="center" contentwidth="10.0cm" />701 <imagedata fileref="./AllResources/GuideToExtendFunctionality/HadronicPhysics/Level4_2.jpg" 702 format="JPG" align="center" contentwidth="10.0cm" /> 703 703 </imageobject> 704 704 <imageobject role="html"> 705 <imagedata fileref="./AllResources/GuideToExtendFunctionality/HadronicPhysics/Level4_2. gif"706 format=" GIF" align="center" />705 <imagedata fileref="./AllResources/GuideToExtendFunctionality/HadronicPhysics/Level4_2.jpg" 706 format="JPG" align="center" /> 707 707 </imageobject> 708 708 </mediaobject> … … 808 808 <mediaobject> 809 809 <imageobject role="fo"> 810 <imagedata fileref="./AllResources/GuideToExtendFunctionality/HadronicPhysics/Level5_1. gif"811 format=" GIF" align="center" contentwidth="10.0cm" />810 <imagedata fileref="./AllResources/GuideToExtendFunctionality/HadronicPhysics/Level5_1.jpg" 811 format="JPG" align="center" contentwidth="10.0cm" /> 812 812 </imageobject> 813 813 <imageobject role="html"> 814 <imagedata fileref="./AllResources/GuideToExtendFunctionality/HadronicPhysics/Level5_1. gif"815 format=" GIF" align="center" />814 <imagedata fileref="./AllResources/GuideToExtendFunctionality/HadronicPhysics/Level5_1.jpg" 815 format="JPG" align="center" /> 816 816 </imageobject> 817 817 </mediaobject> -
trunk/documents/UserDoc/DocBookUsersGuides/ForToolkitDeveloper/xml/GuideToExtendFunctionality/Particles/particles.xml
r904 r921 63 63 Particle properties can be overridden with the method 64 64 <informalexample><programlisting> 65 G4bool SetParticleProperty(const G4ParticlePropertyData& newProperty)65 G4bool SetParticleProperty(const G4ParticlePropertyData& newProperty) 66 66 </programlisting></informalexample> 67 67 by setting new values in <emphasis> G4ParticlePropertyData </emphasis>. … … 92 92 93 93 G4Monopole( 94 const G4String& aName, G4double mass,94 const G4String& aName, G4double mass, 95 95 G4double width, G4double charge, 96 96 G4int iSpin, G4int iParity, 97 97 G4int iConjugation, G4int iIsospin, 98 98 G4int iIsospin3, G4int gParity, 99 const G4String& pType, G4int lepton,99 const G4String& pType, G4int lepton, 100 100 G4int baryon, G4int encoding, 101 101 G4bool stable, G4double lifetime, -
trunk/documents/UserDoc/DocBookUsersGuides/ForToolkitDeveloper/xml/GuideToExtendFunctionality/Visualization/visualization.xml
r904 r921 25 25 <mediaobject> 26 26 <imageobject role="fo"> 27 <imagedata fileref="./AllResources/GuideToExtendFunctionality/Visualization/visClassDiagram. gif"28 format=" GIF" contentwidth="10.0cm" align="center" />27 <imagedata fileref="./AllResources/GuideToExtendFunctionality/Visualization/visClassDiagram.jpg" 28 format="JPG" contentwidth="10.0cm" align="center" /> 29 29 </imageobject> 30 30 <imageobject role="html"> 31 <imagedata fileref="./AllResources/GuideToExtendFunctionality/Visualization/visClassDiagram. gif"32 format=" GIF" align="center" scale="110" />31 <imagedata fileref="./AllResources/GuideToExtendFunctionality/Visualization/visClassDiagram.jpg" 32 format="JPG" align="center" scale="110" /> 33 33 </imageobject> 34 34 </mediaobject> -
trunk/documents/UserDoc/DocBookUsersGuides/ForToolkitDeveloper/xml/OOAnalysisDesign/ChapDsgnFunc.xml
r904 r921 31 31 §DsgnFuncVisualization; 32 32 §DsgnFuncUserInterface; 33 33 34 </chapter> 34 35 -
trunk/documents/UserDoc/DocBookUsersGuides/ForToolkitDeveloper/xml/OOAnalysisDesign/ElectromagneticField/electroMagneticField.xml
r904 r921 20 20 <mediaobject> 21 21 <imageobject role="fo"> 22 <imagedata fileref="./AllResources/OOAnalysisDesign/ElectromagneticField/field-prop. gif"23 format=" GIF" contentwidth="10.0cm" align="center" />22 <imagedata fileref="./AllResources/OOAnalysisDesign/ElectromagneticField/field-prop.jpg" 23 format="JPG" contentwidth="10.0cm" align="center" /> 24 24 </imageobject> 25 25 <imageobject role="html"> 26 <imagedata fileref="./AllResources/OOAnalysisDesign/ElectromagneticField/field-prop. gif"27 format=" GIF" align="center" />26 <imagedata fileref="./AllResources/OOAnalysisDesign/ElectromagneticField/field-prop.jpg" 27 format="JPG" align="center" /> 28 28 </imageobject> 29 29 </mediaobject> -
trunk/documents/UserDoc/DocBookUsersGuides/ForToolkitDeveloper/xml/OOAnalysisDesign/Event/event.xml
r904 r921 79 79 <mediaobject> 80 80 <imageobject role="fo"> 81 <imagedata fileref="./AllResources/OOAnalysisDesign/Event/classDgmEventManager. gif"82 format=" GIF" contentwidth="10.0cm" align="center" />81 <imagedata fileref="./AllResources/OOAnalysisDesign/Event/classDgmEventManager.jpg" 82 format="JPG" contentwidth="10.0cm" align="center" /> 83 83 </imageobject> 84 84 <imageobject role="html"> 85 <imagedata fileref="./AllResources/OOAnalysisDesign/Event/classDgmEventManager. gif"86 format=" GIF" align="center" />85 <imagedata fileref="./AllResources/OOAnalysisDesign/Event/classDgmEventManager.jpg" 86 format="JPG" align="center" /> 87 87 </imageobject> 88 88 </mediaobject> … … 95 95 <mediaobject> 96 96 <imageobject role="fo"> 97 <imagedata fileref="./AllResources/OOAnalysisDesign/Event/classDgmEventGen. gif"98 format=" GIF" contentwidth="10.0cm" align="center" />97 <imagedata fileref="./AllResources/OOAnalysisDesign/Event/classDgmEventGen.jpg" 98 format="JPG" contentwidth="10.0cm" align="center" /> 99 99 </imageobject> 100 100 <imageobject role="html"> 101 <imagedata fileref="./AllResources/OOAnalysisDesign/Event/classDgmEventGen. gif"102 format=" GIF" align="center" />101 <imagedata fileref="./AllResources/OOAnalysisDesign/Event/classDgmEventGen.jpg" 102 format="JPG" align="center" /> 103 103 </imageobject> 104 104 </mediaobject> -
trunk/documents/UserDoc/DocBookUsersGuides/ForToolkitDeveloper/xml/OOAnalysisDesign/Geometry/geometry.xml
r904 r921 290 290 <mediaobject> 291 291 <imageobject role="fo"> 292 <imagedata fileref="./AllResources/OOAnalysisDesign/Geometry/overall. gif" format="GIF" contentwidth="10.0cm" align="center" />292 <imagedata fileref="./AllResources/OOAnalysisDesign/Geometry/overall.jpg" format="JPG" contentwidth="10.0cm" align="center" /> 293 293 </imageobject> 294 294 <imageobject role="html"> 295 <imagedata fileref="./AllResources/OOAnalysisDesign/Geometry/overall. gif" format="GIF" align="center" />295 <imagedata fileref="./AllResources/OOAnalysisDesign/Geometry/overall.jpg" format="JPG" align="center" /> 296 296 </imageobject> 297 297 </mediaobject> … … 321 321 <mediaobject> 322 322 <imageobject role="fo"> 323 <imagedata fileref="./AllResources/OOAnalysisDesign/Geometry/smart_voxels. gif" format="GIF" contentwidth="10.0cm" align="center" />323 <imagedata fileref="./AllResources/OOAnalysisDesign/Geometry/smart_voxels.jpg" format="JPG" contentwidth="10.0cm" align="center" /> 324 324 </imageobject> 325 325 <imageobject role="html"> 326 <imagedata fileref="./AllResources/OOAnalysisDesign/Geometry/smart_voxels. gif" format="GIF" align="center" />326 <imagedata fileref="./AllResources/OOAnalysisDesign/Geometry/smart_voxels.jpg" format="JPG" align="center" /> 327 327 </imageobject> 328 328 </mediaobject> … … 336 336 <mediaobject> 337 337 <imageobject role="fo"> 338 <imagedata fileref="./AllResources/OOAnalysisDesign/Geometry/navigator. gif" format="GIF" contentwidth="10.0cm" align="center" />338 <imagedata fileref="./AllResources/OOAnalysisDesign/Geometry/navigator.jpg" format="JPG" contentwidth="10.0cm" align="center" /> 339 339 </imageobject> 340 340 <imageobject role="html"> 341 <imagedata fileref="./AllResources/OOAnalysisDesign/Geometry/navigator. gif" format="GIF" align="center" />341 <imagedata fileref="./AllResources/OOAnalysisDesign/Geometry/navigator.jpg" format="JPG" align="center" /> 342 342 </imageobject> 343 343 </mediaobject> -
trunk/documents/UserDoc/DocBookUsersGuides/ForToolkitDeveloper/xml/OOAnalysisDesign/GlobalUsage/globalUsage.xml
r904 r921 171 171 <mediaobject> 172 172 <imageobject role="fo"> 173 <imagedata fileref="./AllResources/OOAnalysisDesign/GlobalUsage/classDgmRandom. gif"174 format=" GIF" contentwidth="10.0cm" align="center" />173 <imagedata fileref="./AllResources/OOAnalysisDesign/GlobalUsage/classDgmRandom.jpg" 174 format="JPG" contentwidth="10.0cm" align="center" /> 175 175 </imageobject> 176 176 <imageobject role="html"> 177 <imagedata fileref="./AllResources/OOAnalysisDesign/GlobalUsage/classDgmRandom. gif"178 format=" GIF" align="center" />177 <imagedata fileref="./AllResources/OOAnalysisDesign/GlobalUsage/classDgmRandom.jpg" 178 format="JPG" align="center" /> 179 179 </imageobject> 180 180 </mediaobject> … … 194 194 <mediaobject> 195 195 <imageobject role="fo"> 196 <imagedata fileref="./AllResources/OOAnalysisDesign/GlobalUsage/ObjDiagStat. gif"197 format=" GIF" contentwidth="10.0cm" align="center" />196 <imagedata fileref="./AllResources/OOAnalysisDesign/GlobalUsage/ObjDiagStat.jpg" 197 format="JPG" contentwidth="10.0cm" align="center" /> 198 198 </imageobject> 199 199 <imageobject role="html"> 200 <imagedata fileref="./AllResources/OOAnalysisDesign/GlobalUsage/ObjDiagStat. gif"201 format=" GIF" align="center" />200 <imagedata fileref="./AllResources/OOAnalysisDesign/GlobalUsage/ObjDiagStat.jpg" 201 format="JPG" align="center" /> 202 202 </imageobject> 203 203 </mediaobject> … … 216 216 <mediaobject> 217 217 <imageobject role="fo"> 218 <imagedata fileref="./AllResources/OOAnalysisDesign/GlobalUsage/ObjDiagDist. gif"219 format=" GIF" contentwidth="10.0cm" align="center" />218 <imagedata fileref="./AllResources/OOAnalysisDesign/GlobalUsage/ObjDiagDist.jpg" 219 format="JPG" contentwidth="10.0cm" align="center" /> 220 220 </imageobject> 221 221 <imageobject role="html"> 222 <imagedata fileref="./AllResources/OOAnalysisDesign/GlobalUsage/ObjDiagDist. gif"223 format=" GIF" align="center" />222 <imagedata fileref="./AllResources/OOAnalysisDesign/GlobalUsage/ObjDiagDist.jpg" 223 format="JPG" align="center" /> 224 224 </imageobject> 225 225 </mediaobject> … … 238 238 <mediaobject> 239 239 <imageobject role="fo"> 240 <imagedata fileref="./AllResources/OOAnalysisDesign/GlobalUsage/ObjDiagEng. gif"241 format=" GIF" contentwidth="10.0cm" align="center" />240 <imagedata fileref="./AllResources/OOAnalysisDesign/GlobalUsage/ObjDiagEng.jpg" 241 format="JPG" contentwidth="10.0cm" align="center" /> 242 242 </imageobject> 243 243 <imageobject role="html"> 244 <imagedata fileref="./AllResources/OOAnalysisDesign/GlobalUsage/ObjDiagEng. gif"245 format=" GIF" align="center" />244 <imagedata fileref="./AllResources/OOAnalysisDesign/GlobalUsage/ObjDiagEng.jpg" 245 format="JPG" align="center" /> 246 246 </imageobject> 247 247 </mediaobject> -
trunk/documents/UserDoc/DocBookUsersGuides/ForToolkitDeveloper/xml/OOAnalysisDesign/Hit/hit.xml
r904 r921 109 109 <imageobject role="fo"> 110 110 <imagedata 111 fileref="./AllResources/OOAnalysisDesign/Hit/classDgmHitMain. gif" format="GIF" contentwidth="10.0cm" align="center" />111 fileref="./AllResources/OOAnalysisDesign/Hit/classDgmHitMain.jpg" format="JPG" contentwidth="10.0cm" align="center" /> 112 112 </imageobject> 113 113 <imageobject role="html"> 114 <imagedata fileref="./AllResources/OOAnalysisDesign/Hit/classDgmHitMain. gif" format="GIF" align="center" />114 <imagedata fileref="./AllResources/OOAnalysisDesign/Hit/classDgmHitMain.jpg" format="JPG" align="center" /> 115 115 </imageobject> 116 116 </mediaobject> … … 125 125 <imageobject role="fo"> 126 126 <imagedata 127 fileref="./AllResources/OOAnalysisDesign/Hit/classDgmHitUser. gif" format="GIF"127 fileref="./AllResources/OOAnalysisDesign/Hit/classDgmHitUser.jpg" format="JPG" 128 128 contentwidth="10.0cm" align="center" /> 129 129 </imageobject> 130 130 <imageobject role="html"> 131 <imagedata fileref="./AllResources/OOAnalysisDesign/Hit/classDgmHitUser. gif" format="GIF" align="center" />131 <imagedata fileref="./AllResources/OOAnalysisDesign/Hit/classDgmHitUser.jpg" format="JPG" align="center" /> 132 132 </imageobject> 133 133 </mediaobject> … … 140 140 <mediaobject> 141 141 <imageobject role="fo"> 142 <imagedata fileref="./AllResources/OOAnalysisDesign/Hit/classDgmReadoutGeom. gif" format="GIF" contentwidth="10.0cm" align="center" />142 <imagedata fileref="./AllResources/OOAnalysisDesign/Hit/classDgmReadoutGeom.jpg" format="JPG" contentwidth="10.0cm" align="center" /> 143 143 </imageobject> 144 144 <imageobject role="html"> 145 <imagedata fileref="./AllResources/OOAnalysisDesign/Hit/classDgmReadoutGeom. gif" format="GIF" align="center" />145 <imagedata fileref="./AllResources/OOAnalysisDesign/Hit/classDgmReadoutGeom.jpg" format="JPG" align="center" /> 146 146 </imageobject> 147 147 </mediaobject> -
trunk/documents/UserDoc/DocBookUsersGuides/ForToolkitDeveloper/xml/OOAnalysisDesign/Materials/materials.xml
r904 r921 58 58 <mediaobject> 59 59 <imageobject role="fo"> 60 <imagedata fileref="./AllResources/OOAnalysisDesign/Materials/classDgmMaterials. gif"61 format=" GIF" contentwidth="10.0cm" align="center" />60 <imagedata fileref="./AllResources/OOAnalysisDesign/Materials/classDgmMaterials.jpg" 61 format="JPG" contentwidth="10.0cm" align="center" /> 62 62 </imageobject> 63 63 <imageobject role="html"> 64 <imagedata fileref="./AllResources/OOAnalysisDesign/Materials/classDgmMaterials. gif"65 format=" GIF" align="center" />64 <imagedata fileref="./AllResources/OOAnalysisDesign/Materials/classDgmMaterials.jpg" 65 format="JPG" align="center" /> 66 66 </imageobject> 67 67 </mediaobject> -
trunk/documents/UserDoc/DocBookUsersGuides/ForToolkitDeveloper/xml/OOAnalysisDesign/Particles/particles.xml
r904 r921 58 58 <mediaobject> 59 59 <imageobject role="fo"> 60 <imagedata fileref="./AllResources/OOAnalysisDesign/Particles/classDgmParticlesMain. gif"61 format=" GIF" contentwidth="10.0cm" align="center" />60 <imagedata fileref="./AllResources/OOAnalysisDesign/Particles/classDgmParticlesMain.jpg" 61 format="JPG" contentwidth="10.0cm" align="center" /> 62 62 </imageobject> 63 63 <imageobject role="html"> 64 <imagedata fileref="./AllResources/OOAnalysisDesign/Particles/classDgmParticlesMain. gif"65 format=" GIF" align="center" />64 <imagedata fileref="./AllResources/OOAnalysisDesign/Particles/classDgmParticlesMain.jpg" 65 format="JPG" align="center" /> 66 66 </imageobject> 67 67 </mediaobject> … … 75 75 <mediaobject> 76 76 <imageobject role="fo"> 77 <imagedata fileref="./AllResources/OOAnalysisDesign/Particles/classDgmParticleTable. gif"78 format=" GIF" contentwidth="10.0cm" align="center" />77 <imagedata fileref="./AllResources/OOAnalysisDesign/Particles/classDgmParticleTable.jpg" 78 format="JPG" contentwidth="10.0cm" align="center" /> 79 79 </imageobject> 80 80 <imageobject role="html"> 81 <imagedata fileref="./AllResources/OOAnalysisDesign/Particles/classDgmParticleTable. gif"82 format=" GIF" align="center" />81 <imagedata fileref="./AllResources/OOAnalysisDesign/Particles/classDgmParticleTable.jpg" 82 format="JPG" align="center" /> 83 83 </imageobject> 84 84 </mediaobject> … … 92 92 <mediaobject> 93 93 <imageobject role="fo"> 94 <imagedata fileref="./AllResources/OOAnalysisDesign/Particles/classDgmParticleDecay. gif"95 format=" GIF" contentwidth="10.0cm" align="center" />94 <imagedata fileref="./AllResources/OOAnalysisDesign/Particles/classDgmParticleDecay.jpg" 95 format="JPG" contentwidth="10.0cm" align="center" /> 96 96 </imageobject> 97 97 <imageobject role="html"> 98 <imagedata fileref="./AllResources/OOAnalysisDesign/Particles/classDgmParticleDecay. gif"99 format=" GIF" align="center" />98 <imagedata fileref="./AllResources/OOAnalysisDesign/Particles/classDgmParticleDecay.jpg" 99 format="JPG" align="center" /> 100 100 </imageobject> 101 101 </mediaobject> -
trunk/documents/UserDoc/DocBookUsersGuides/ForToolkitDeveloper/xml/OOAnalysisDesign/PhysicsProcesses/physicsProcesses.xml
r904 r921 106 106 <mediaobject> 107 107 <imageobject role="fo"> 108 <imagedata fileref="./AllResources/OOAnalysisDesign/PhysicsProcesses/classDgmProcessMain. gif"109 format=" GIF" contentwidth="10.0cm" align="center" />108 <imagedata fileref="./AllResources/OOAnalysisDesign/PhysicsProcesses/classDgmProcessMain.jpg" 109 format="JPG" contentwidth="10.0cm" align="center" /> 110 110 </imageobject> 111 111 <imageobject role="html"> 112 <imagedata fileref="./AllResources/OOAnalysisDesign/PhysicsProcesses/classDgmProcessMain. gif"113 format=" GIF" align="center" />112 <imagedata fileref="./AllResources/OOAnalysisDesign/PhysicsProcesses/classDgmProcessMain.jpg" 113 format="JPG" align="center" /> 114 114 </imageobject> 115 115 </mediaobject> … … 122 122 <mediaobject> 123 123 <imageobject role="fo"> 124 <imagedata fileref="./AllResources/OOAnalysisDesign/PhysicsProcesses/classDgmProcessProcesses. gif"125 format=" GIF" contentwidth="10.0cm" align="center" />124 <imagedata fileref="./AllResources/OOAnalysisDesign/PhysicsProcesses/classDgmProcessProcesses.jpg" 125 format="JPG" contentwidth="10.0cm" align="center" /> 126 126 </imageobject> 127 127 <imageobject role="html"> 128 <imagedata fileref="./AllResources/OOAnalysisDesign/PhysicsProcesses/classDgmProcessProcesses. gif"129 format=" GIF" align="center" />128 <imagedata fileref="./AllResources/OOAnalysisDesign/PhysicsProcesses/classDgmProcessProcesses.jpg" 129 format="JPG" align="center" /> 130 130 </imageobject> 131 131 </mediaobject> -
trunk/documents/UserDoc/DocBookUsersGuides/ForToolkitDeveloper/xml/OOAnalysisDesign/Tracking/tracking.xml
r904 r921 95 95 <mediaobject> 96 96 <imageobject role="fo"> 97 <imagedata fileref="./AllResources/OOAnalysisDesign/Tracking/classDgmTracking. gif"98 format=" GIF" contentwidth="10.0cm" align="center" />97 <imagedata fileref="./AllResources/OOAnalysisDesign/Tracking/classDgmTracking.jpg" 98 format="JPG" contentwidth="10.0cm" align="center" /> 99 99 </imageobject> 100 100 <imageobject role="html"> 101 <imagedata fileref="./AllResources/OOAnalysisDesign/Tracking/classDgmTracking. gif"102 format=" GIF" align="center" />101 <imagedata fileref="./AllResources/OOAnalysisDesign/Tracking/classDgmTracking.jpg" 102 format="JPG" align="center" /> 103 103 </imageobject> 104 104 </mediaobject> -
trunk/documents/UserDoc/DocBookUsersGuides/ForToolkitDeveloper/xml/OOAnalysisDesign/UserInterface/userInterface.xml
r904 r921 89 89 <mediaobject> 90 90 <imageobject role="fo"> 91 <imagedata fileref="./AllResources/OOAnalysisDesign/UserInterface/classDgmUserInterface. gif"92 format=" GIF" contentwidth="10.0cm" align="center" />91 <imagedata fileref="./AllResources/OOAnalysisDesign/UserInterface/classDgmUserInterface.jpg" 92 format="JPG" contentwidth="10.0cm" align="center" /> 93 93 </imageobject> 94 94 <imageobject role="html"> 95 <imagedata fileref="./AllResources/OOAnalysisDesign/UserInterface/classDgmUserInterface. gif"96 format=" GIF" align="center" />95 <imagedata fileref="./AllResources/OOAnalysisDesign/UserInterface/classDgmUserInterface.jpg" 96 format="JPG" align="center" /> 97 97 </imageobject> 98 98 </mediaobject> -
trunk/documents/UserDoc/DocBookUsersGuides/ForToolkitDeveloper/xml/XSLCustomizationLayer/G4XSLCustomFO.xsl
r904 r921 10 10 <!-- Import the FO stylesheet --> 11 11 <!-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> 12 <xsl:import href="/usr/share/xml/docbook/stylesheet/nwalsh/ current/fo/docbook.xsl"/>12 <xsl:import href="/usr/share/xml/docbook/stylesheet/nwalsh/fo/docbook.xsl" /> 13 13 14 14 <!-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> -
trunk/documents/UserDoc/DocBookUsersGuides/ForToolkitDeveloper/xml/XSLCustomizationLayer/G4XSLCustomHTML.xsl
r904 r921 9 9 <!-- Import the stylesheet to chunk the html output --> 10 10 <!-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> 11 <xsl:import href="/usr/share/xml/docbook/stylesheet/nwalsh/ current/html/chunk.xsl" />11 <xsl:import href="/usr/share/xml/docbook/stylesheet/nwalsh/html/chunk.xsl" /> 12 12 13 13 <!-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> -
trunk/documents/UserDoc/DocBookUsersGuides/InstallationGuide/xml/BookInstalGuide.xml
r904 r921 35 35 </authorgroup> 36 36 37 <pubdate>1 4 December, 2007</pubdate>38 <releaseinfo>Version: geant4 9. 1</releaseinfo>37 <pubdate>19 December, 2008</pubdate> 38 <releaseinfo>Version: geant4 9.2</releaseinfo> 39 39 40 40 </bookinfo> -
trunk/documents/UserDoc/DocBookUsersGuides/InstallationGuide/xml/Introduction/introduction.xml
r904 r921 146 146 </para></listitem> 147 147 <listitem><para> 148 <ulink url="http://www.trolltech.com"> 149 Qt 150 </ulink> 151 , a powerfull toolkit 152 </para></listitem> 153 <listitem><para> 148 154 <ulink url="http://oss.sgi.com/projects/inventor/"> 149 155 Open Inventor -
trunk/documents/UserDoc/DocBookUsersGuides/InstallationGuide/xml/XSLCustomizationLayer/G4XSLCustomFO.xsl
r904 r921 10 10 <!-- Import the FO stylesheet --> 11 11 <!-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> 12 <xsl:import href="/usr/share/xml/docbook/stylesheet/nwalsh/ current/fo/docbook.xsl"/>12 <xsl:import href="/usr/share/xml/docbook/stylesheet/nwalsh/fo/docbook.xsl" /> 13 13 14 14 <!-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> -
trunk/documents/UserDoc/DocBookUsersGuides/InstallationGuide/xml/XSLCustomizationLayer/G4XSLCustomHTML.xsl
r904 r921 9 9 <!-- Import the stylesheet to chunk the html output --> 10 10 <!-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> 11 <xsl:import href="/usr/share/xml/docbook/stylesheet/nwalsh/ current/html/chunk.xsl" />11 <xsl:import href="/usr/share/xml/docbook/stylesheet/nwalsh/html/chunk.xsl" /> 12 12 13 13 <!-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> -
trunk/documents/UserDoc/DocBookUsersGuides/IntroductionToGeant4/xml/BookIntroToGeant4.xml
r904 r921 31 31 </authorgroup> 32 32 33 <pubdate>1 4 December, 2007</pubdate>34 <releaseinfo>Version: geant4 9. 1</releaseinfo>33 <pubdate>19 December, 2008</pubdate> 34 <releaseinfo>Version: geant4 9.2</releaseinfo> 35 35 36 36 </bookinfo> -
trunk/documents/UserDoc/DocBookUsersGuides/IntroductionToGeant4/xml/XSLCustomizationLayer/G4XSLCustomFO.xsl
r904 r921 10 10 <!-- Import the FO stylesheet --> 11 11 <!-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> 12 <xsl:import href="/usr/share/xml/docbook/stylesheet/nwalsh/ current/fo/docbook.xsl"/>12 <xsl:import href="/usr/share/xml/docbook/stylesheet/nwalsh/fo/docbook.xsl" /> 13 13 14 14 <!-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> -
trunk/documents/UserDoc/DocBookUsersGuides/IntroductionToGeant4/xml/XSLCustomizationLayer/G4XSLCustomHTML.xsl
r904 r921 9 9 <!-- Import the stylesheet to chunk the html output --> 10 10 <!-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> 11 <xsl:import href="/usr/share/xml/docbook/stylesheet/nwalsh/ current/html/chunk.xsl" />11 <xsl:import href="/usr/share/xml/docbook/stylesheet/nwalsh/html/chunk.xsl" /> 12 12 13 13 <!-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> -
trunk/examples/novice/N02/vis.mac
r893 r921 11 11 # (Edit the next line(s) to choose another graphics system) 12 12 # 13 /vis/open OGLIX 600x600+20+70 13 /vis/open OGLIXm 600x400-100+30 14 #/vis/open OGLIX 14 15 # 15 16 ####/vis/open OGLSXm -
trunk/examples/novice/N03/G4History.macro
r893 r921 1 1 /run/verbose 2 2 2 /vis/scene/create 3 /vis/open OGL IQt4 /vis/sceneHandler/create OGL IQt3 /vis/open OGLSQt 4 /vis/sceneHandler/create OGLSQt 5 5 /vis/sceneHandler/attach 6 6 /vis/viewer/create ! ! 600 … … 17 17 /vis/modeling/trajectories/drawByCharge-0/default/setStepPtsSize 2 18 18 /vis/scene/endOfEventAction accumulate 19 /gun/energy 1 GeV 20 /run/beamOn 1 -
trunk/examples/novice/N03/vis.mac
r893 r921 22 22 # 23 23 # Use this open statement instead for OpenGL in immediate mode. 24 #/vis/open OGLIX 25 /vis/open OGLIQt 24 #/vis/open OGLSWin32 25 /vis/open OGLSQt 26 #/vis/open/OIX 26 27 # 27 28 # Use this open statement instead to get a HepRep version 1 file -
trunk/examples/novice/N03/visTutor/exN03Vis10.mac
r483 r921 8 8 # CONTENTS: A basic macro for demonstrating Inventor driver # 9 9 # # 10 # USAGE: % $G4BINDIR/exampleN03 visTutor/exN03Vis 6.mac#10 # USAGE: % $G4BINDIR/exampleN03 visTutor/exN03Vis10.mac # 11 11 # # 12 12 # REQUIRED PLATFORMS & SOFTWARES: Windows, # -
trunk/examples/novice/N03/visTutor/exN03Vis11.mac
r474 r921 58 58 # 59 59 /vis/viewer/reset 60 /vis/viewer/scale 1 1 2 60 61 /vis/viewer/set/viewpointThetaPhi 20 70 61 62 /vis/viewer/zoom 0.8 -
trunk/examples/novice/N03/visTutor/exN03Vis12.mac
r609 r921 8 8 # CONTENTS: A basic macro for demonstrating time slicing # 9 9 # # 10 # USAGE: % $G4BINDIR/exampleN03 visTutor/exN03Vis12.mac #10 # USAGE: % $G4BINDIR/exampleN03 visTutor/exN03Vis12.mac # 11 11 # # 12 12 # REQUIRED PLATFORMS & SOFTWARES: Mac/Unix with X-Windows, OpenGL # -
trunk/examples/novice/N03/visTutor/exN03Vis13.mac
r483 r921 8 8 # CONTENTS: Time development of an electrmagnetic shower. # 9 9 # # 10 # USAGE: % $G4BINDIR/exampleN03 visTutor/exN03Vis1 2.mac#10 # USAGE: % $G4BINDIR/exampleN03 visTutor/exN03Vis13.mac # 11 11 # # 12 12 # REQUIRED PLATFORMS & SOFTWARES: Mac/Unix with X-Windows, OpenGL # -
trunk/examples/novice/N03/visTutor/exN03Vis14.mac~
r888 r921 48 48 ########################################### 49 49 50 # Invoke the OGLSQ Tdriver51 /vis/open OGLSQ T50 # Invoke the OGLSQt driver 51 /vis/open OGLSQt 52 52 53 53 # Bird's-eye view of the detector geometry -
trunk/examples/novice/N03/visTutor/exN03Vis15.mac
r887 r921 10 10 # USAGE: % $G4BINDIR/exampleN03 visTutor/exN03Vis12.mac # 11 11 # # 12 # REQUIRED PLATFORMS & SOFTWARES: Unix, Motif, X-window, OpenGL,Qt # 13 # HEPVis # 14 # Inventor (TGS or SoFree) # 12 # REQUIRED PLATFORMS & SOFTWARES: Unix, Motif, X-window, OpenGL ,Qt # 15 13 # # 16 14 # ENVIRONMENTAL VARIABLES (C-MACROS) FOR INSTALLATION: # 17 15 # (See geant4/source/visualization/README for details.) # 18 16 # # 19 # % setenv G4VIS_BUILD_O IX_DRIVER 1 #17 # % setenv G4VIS_BUILD_OGLQT 20 18 # # 21 19 # ENVIRONMENTAL VARIABLES (C-MACROS) FOR COMPILATION: # 22 20 # (See geant4/source/visualization/README for details.) # 23 21 # # 24 # % setenv G4VIS_USE_O IQT 1 #22 # % setenv G4VIS_USE_OGLQT 1 # 25 23 # # 26 24 # ADDITIONAL NOTES: # … … 31 29 /vis/scene/create 32 30 33 # Invoke the OpenInventordriver34 /vis/sceneHandler/create OGL IQt31 # Invoke the Qt driver 32 /vis/sceneHandler/create OGLSQt 35 33 /vis/viewer/create 36 34 … … 47 45 # Bird-eye view of events 48 46 /vis/viewer/reset 49 /vis/viewer/set/viewpointThetaPhi 45 4547 /vis/viewer/set/viewpointThetaPhi 45 45 50 48 51 49 /vis/scene/notifyHandlers 52 50 53 51 /control/verbose 2 54 #######################################################################55 # Controls on an Inventor examiner viewer are : #56 # - in picking mode (cursor is the upper left arrow) #57 # Ctrl + pick a volume : see daughters. #58 # Shift + pick a volume : see mother. #59 # - in viewing mode (cursor is the hand) #60 # Left-button + pointer move : rotate. #61 # Ctrl+Left-button + pointer move : pane. #62 # Ctrl+Shift+Left-button + pointer move : scale. #63 # Middle-button + pointer move : pane. #64 # #65 #######################################################################66 52 67 53 /vis/viewer/update -
trunk/examples/novice/N03/visTutor/exN03Vis15.mac~
r888 r921 1 1 ####################################################################### 2 # MACRO FILE NAME: exN03Vis1 2.mac#2 # MACRO FILE NAME: exN03Vis15.mac # 3 3 # # 4 4 # AUTHOR(S): Laurent Garnier # … … 8 8 # CONTENTS: A basic macro for demonstrating Inventor driver # 9 9 # # 10 # USAGE: % $G4BINDIR/exampleN03 visTutor/exN03Vis1 2.mac #10 # USAGE: % $G4BINDIR/exampleN03 visTutor/exN03Vis15.mac # 11 11 # # 12 12 # REQUIRED PLATFORMS & SOFTWARES: Unix, Motif, X-window, OpenGL,Qt # … … 32 32 33 33 # Invoke the OpenInventor driver 34 /vis/sceneHandler/create OGLIQ T34 /vis/sceneHandler/create OGLIQt 35 35 /vis/viewer/create 36 36 -
trunk/examples/novice/N03/visTutor/exN03Vis5.mac
r474 r921 8 8 # CONTENTS: A basic macro for demonstrating Inventor driver # 9 9 # # 10 # USAGE: % $G4BINDIR/exampleN03 visTutor/exN03Vis 6.mac #10 # USAGE: % $G4BINDIR/exampleN03 visTutor/exN03Vis5.mac # 11 11 # # 12 12 # REQUIRED PLATFORMS & SOFTWARES: Unix, Motif, X-window, OpenGL, # … … 42 42 # Name of the gaps = name of their material (liquidArgon) ! 43 43 #/vis/scene/add/volume liquidArgon 44 #/vis/scene/add/trajectories44 /vis/scene/add/trajectories 45 45 /tracking/storeTrajectory 1 46 46 -
trunk/examples/novice/N03/visTutor/exN03Vis6.mac
r474 r921 15 15 # USAGE: % gmake visclean # 16 16 # % $G4BINDIR/exampleN03 # 17 # Idle> /control/execute visTutor/exN03Vis 7.mac #17 # Idle> /control/execute visTutor/exN03Vis6.mac # 18 18 # # 19 19 # REQUIRED PLATFORMS & SOFTWARES: Unix, X-window, # -
trunk/examples/novice/N03/visTutor/exN03Vis7.mac
r474 r921 13 13 # % make visclean # 14 14 # % $G4BINDIR/exampleN03 # 15 # Idle> /control/execute visTutor/exN03Vis 8.mac #15 # Idle> /control/execute visTutor/exN03Vis7.mac # 16 16 # Idle> exit # 17 17 # % gv g4_00.eps & # -
trunk/examples/novice/N03/visTutor/exN03Vis8.mac
r474 r921 19 19 # % gmake visclean # 20 20 # % $G4BINDIR/exampleN03 # 21 # Idle> /control/execute visTutor/exN03Vis 9.mac #21 # Idle> /control/execute visTutor/exN03Vis8.mac # 22 22 # Idle> exit # 23 23 # % gv g4_00.eps # -
trunk/source/digits_hits/History
r850 r921 1 $Id: History,v 1.3 3 2008/08/27 18:35:28asaim Exp $1 $Id: History,v 1.36 2008/11/26 22:40:01 asaim Exp $ 2 2 ------------------------------------------------------------------- 3 3 … … 17 17 * Reverse chronological order (last date on top), please * 18 18 ---------------------------------------------------------- 19 20 Nov 26, 2008, M.Asai (digits_hits-V09-01-02) 21 - Fixing an incorrect index number in G4ScoringMessenger.cc. 22 23 Nov 14, 2008, M.Asai (digits_hits-V09-01-01) 24 - Tag for release 9.2. 25 - Introducing the cylindrical scoring mesh (G4ScoringCylinder and related class) 26 - Introducing the log-scale color map (G4ScoreLogColorMap) 19 27 20 28 Aug 27, 2008, M.Asai (digits_hits-V09-01-00) -
trunk/source/geometry/magneticfield/History
r850 r921 1 $Id: History,v 1.13 0 2008/04/24 12:40:50 gcosmoExp $1 $Id: History,v 1.135 2008/11/21 21:16:11 gum Exp $ 2 2 ------------------------------------------------------------------- 3 3 … … 17 17 * Reverse chronological order (last date on top), please * 18 18 ---------------------------------------------------------- 19 20 November, 19th, 2008 P.Gumplinger - field-V09-01-05 21 - renormalize the spin to ONE in G4EqEMFieldWithSpin.cc and G4Mag_SpinEqRhs.cc 22 23 November, 7th, 2008 P.Gumplinger - field-V09-01-04 24 ---------------------------------- 25 - Added SetAnomaly() and GetAnomaly() accessors to G4EqEMFieldWithSpin. 26 27 October, 28th, 2008 T.Nikitina - field-V09-01-03 28 -------------------------------- 29 - Added 'ApproxCurveV' to method G4ChordFinder::ApproxCurvePointS() in 30 order to better calculate the curve length. 31 - Some code cleanup. 32 33 September, 18th, 2008 T.Nikitina 34 ---------------------------------- 35 - Added new stepper class G4ConstRK4, performing integration of one step 36 with error calculation in constant magnetic field; implementation derived 37 from G4ClassicalRK4. 38 39 July, 15th, 2008 J.Apostolakis - field-V09-01-02 40 -------------------------------- 41 - Revised signature of G4ChordFinder::FinderNextChord(), making 'FieldTrack' 42 argument passed a reference. 43 44 May, 28th, 2008 T.Nikitina 45 ---------------------------- 46 - G4ChordFinder: added new method ApproxCurvePointS() using Brent second order 47 location mechanism. 19 48 20 49 April 24th, 2008 T.Nikitina - field-V09-01-01 -
trunk/source/geometry/magneticfield/include/G4CashKarpRKF45.hh
r850 r921 26 26 // 27 27 // $Id: G4CashKarpRKF45.hh,v 1.11 2008/01/11 15:23:54 japost Exp $ 28 // GEANT4 tag $Name: HEAD$28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 29 // 30 30 // -
trunk/source/geometry/magneticfield/include/G4ChordFinder.hh
r850 r921 25 25 // 26 26 // 27 // $Id: G4ChordFinder.hh,v 1. 19 2008/07/15 14:02:06 japostExp $28 // GEANT4 tag $Name: HEAD$27 // $Id: G4ChordFinder.hh,v 1.21 2008/10/29 14:17:42 gcosmo Exp $ 28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 29 // 30 30 // 31 // class G4ChordFinder32 // 33 // Class description:31 // Class G4ChordFinder 32 // 33 // class description: 34 34 // 35 35 // A class that provides RK integration of motion ODE (as does g4magtr) … … 38 38 39 39 // History: 40 // - 25.02.97 John Apostolakis, design and implementation 41 // - 05.03.97 V. Grichine , makeup to G4 'standard' 40 // - 25.02.97 - John Apostolakis - Design and implementation 42 41 // ------------------------------------------------------------------- 43 42 … … 62 61 63 62 virtual ~G4ChordFinder(); 64 65 63 66 64 G4double AdvanceChordLimited( G4FieldTrack& yCurrent, … … 73 71 // -> Returns Length of Step taken. 74 72 75 G4FieldTrack ApproxCurvePointS(const G4FieldTrack& curveAPointVelocity, 76 const G4FieldTrack& curveBPointVelocity, 77 const G4ThreeVector& currentEPoint, 78 const G4ThreeVector& currentFPoint, 79 const G4ThreeVector& PointG, 80 G4bool first,G4double epsStep); 73 G4FieldTrack ApproxCurvePointS( const G4FieldTrack& curveAPointVelocity, 74 const G4FieldTrack& curveBPointVelocity, 75 const G4FieldTrack& ApproxCurveV, 76 const G4ThreeVector& currentEPoint, 77 const G4ThreeVector& currentFPoint, 78 const G4ThreeVector& PointG, 79 G4bool first, G4double epsStep); 81 80 82 G4FieldTrack ApproxCurvePointV( constG4FieldTrack& curveAPointVelocity,83 constG4FieldTrack& curveBPointVelocity,84 constG4ThreeVector& currentEPoint,85 G4double epsStep);81 G4FieldTrack ApproxCurvePointV( const G4FieldTrack& curveAPointVelocity, 82 const G4FieldTrack& curveBPointVelocity, 83 const G4ThreeVector& currentEPoint, 84 G4double epsStep); 86 85 87 86 inline G4double InvParabolic( const G4double xa, const G4double ya, 88 const G4double xb, const G4double yb,89 const G4double xc, const G4double yc );87 const G4double xb, const G4double yb, 88 const G4double xc, const G4double yc ); 90 89 91 90 inline G4double GetDeltaChord() const; … … 112 111 // A report with the above -- and possibly other stats 113 112 inline G4int SetVerbose( G4int newvalue=1); 114 // Set verbosity and return old value 113 // Set verbosity and return old value 114 115 void SetFractions_Last_Next( G4double fractLast= 0.90, 116 G4double fractNext= 0.95 ); 117 // Parameters for performance ... change with great care 118 119 inline void SetFirstFraction(G4double fractFirst); 120 // Parameter for performance ... change with great care 121 122 public: // without description 123 124 void TestChordPrint( G4int noTrials, 125 G4int lastStepTrial, 126 G4double dChordStep, 127 G4double nextStepTrial ); 128 129 // Printing for monitoring ... 130 131 inline G4double GetFirstFraction(); // Originally 0.999 132 inline G4double GetFractionLast(); // Originally 1.000 133 inline G4double GetFractionNextEstimate(); // Originally 0.980 134 inline G4double GetMultipleRadius(); // No original value 135 // Parameters for adapting performance ... use with great care 115 136 116 137 protected: // ......................................................... … … 140 161 G4double oldStepTrial, 141 162 G4double dChordStep); 142 public: // no description 143 void TestChordPrint( G4int noTrials, 144 G4int lastStepTrial, 145 G4double dChordStep, 146 G4double nextStepTrial ); 147 // Printing for monitoring ... 148 149 inline G4double GetFirstFraction(); // Originally 0.999 150 inline G4double GetFractionLast(); // Originally 1.000 151 inline G4double GetFractionNextEstimate(); // Originally 0.980 152 inline G4double GetMultipleRadius(); // No original value 153 // Parameters for adapting performance ... use with great care 154 155 public: // with description 156 void SetFractions_Last_Next( G4double fractLast= 0.90, 157 G4double fractNext= 0.95 ); 158 // Parameters for performance ... change with great care 159 160 inline void SetFirstFraction(G4double fractFirst); 161 // Parameter for performance ... change with great care 162 163 protected: 163 164 164 inline G4double GetLastStepEstimateUnc(); 165 165 inline void SetLastStepEstimateUnc( G4double stepEst ); … … 172 172 173 173 private: // ............................................................ 174 // G4int nOK, nBAD;174 // G4int nOK, nBAD; 175 175 G4MagInt_Driver* fIntgrDriver; 176 176 177 177 const G4double fDefaultDeltaChord; // SET in G4ChordFinder.cc = 0.25 mm 178 178 179 G4double fDeltaChord; // Maximum miss distance 180 181 G4double fLastStepEstimate_Unconstrained; // State information for efficiency 179 G4double fDeltaChord; // Maximum miss distance 180 181 G4double fLastStepEstimate_Unconstrained; 182 // State information for efficiency 183 182 184 // Variables used in construction/destruction 185 183 186 G4bool fAllocatedStepper; 184 187 G4EquationOfMotion* fEquation; -
trunk/source/geometry/magneticfield/include/G4ChordFinder.icc
r850 r921 25 25 // 26 26 // 27 // $Id: G4ChordFinder.icc,v 1.1 3 2008/05/28 09:20:03 tnikitinExp $28 // GEANT4 tag $Name: HEAD$27 // $Id: G4ChordFinder.icc,v 1.14 2008/10/29 14:34:35 gcosmo Exp $ 28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 29 // 30 30 // G4ChordFinder inline implementations … … 134 134 T = ya/yc; 135 135 const G4double Q = (T-1)*(R-1)*(S-1); 136 if ( fabs(Q) <DBL_MIN ) return DBL_MAX;136 if (std::fabs(Q) <DBL_MIN ) return DBL_MAX; 137 137 138 138 const G4double P = S*(T*(R-T)*(xc-xb) - (1-R)*(xb-xa)); -
trunk/source/geometry/magneticfield/include/G4ChordFinderSaf.hh
r850 r921 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4ChordFinderSaf.hh,v 1. 3 2006/06/29 18:21:52 gunterExp $27 // GEANT4 tag $Name: HEAD$26 // $Id: G4ChordFinderSaf.hh,v 1.4 2008/09/12 16:12:18 gcosmo Exp $ 27 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 28 28 // 29 29 // … … 53 53 ~G4ChordFinderSaf(); 54 54 55 G4double FindNextChord( const G4FieldTrack yStart,55 G4double FindNextChord( const G4FieldTrack& yStart, 56 56 G4double stepMax, 57 57 G4FieldTrack& yEnd, // Endpoint -
trunk/source/geometry/magneticfield/include/G4ClassicalRK4.hh
r850 r921 26 26 // 27 27 // $Id: G4ClassicalRK4.hh,v 1.10 2006/06/29 18:21:55 gunter Exp $ 28 // GEANT4 tag $Name: HEAD$28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 29 // 30 30 // -
trunk/source/geometry/magneticfield/include/G4DELPHIMagField.hh
r850 r921 26 26 // 27 27 // $Id: G4DELPHIMagField.hh,v 1.4 2006/06/29 18:21:57 gunter Exp $ 28 // GEANT4 tag $Name: HEAD$28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 29 // 30 30 // -
trunk/source/geometry/magneticfield/include/G4ElectricField.hh
r850 r921 26 26 // 27 27 // $Id: G4ElectricField.hh,v 1.2 2006/06/29 18:21:59 gunter Exp $ 28 // GEANT4 tag $Name: HEAD$28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 29 // 30 30 // -
trunk/source/geometry/magneticfield/include/G4ElectroMagneticField.hh
r850 r921 26 26 // 27 27 // $Id: G4ElectroMagneticField.hh,v 1.11 2006/06/29 18:22:01 gunter Exp $ 28 // GEANT4 tag $Name: HEAD$28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 29 // 30 30 // -
trunk/source/geometry/magneticfield/include/G4EqEMFieldWithSpin.hh
r850 r921 25 25 // 26 26 // 27 // $Id: G4EqEMFieldWithSpin.hh,v 1. 1 2007/08/30 23:34:01 gumExp $28 // GEANT4 tag $Name: HEAD$27 // $Id: G4EqEMFieldWithSpin.hh,v 1.3 2008/11/14 13:37:09 gcosmo Exp $ 28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 29 // 30 30 // … … 44 44 45 45 #include "G4EquationOfMotion.hh" 46 #include "G4ElectroMagneticField.hh" 46 47 class G4ElectroMagneticField; 47 48 48 49 class G4EqEMFieldWithSpin : public G4EquationOfMotion … … 52 53 G4EqEMFieldWithSpin(G4ElectroMagneticField *emField ); 53 54 54 ~G4EqEMFieldWithSpin() {;}55 ~G4EqEMFieldWithSpin(); 55 56 56 57 void SetChargeMomentumMass(G4double particleCharge, // in e+ units … … 64 65 // calculates the value of the derivative dydx. 65 66 67 inline void SetAnomaly(G4double a) { anomaly = a; } 68 inline G4double GetAnomaly() const { return anomaly; } 69 // set/get magnetic anomaly 70 66 71 private: 67 72 68 G4double fElectroMagCof ;69 G4double fMassCof;73 G4double fElectroMagCof ; 74 G4double fMassCof; 70 75 71 76 G4double omegac; … … 78 83 }; 79 84 80 #endif 85 #endif /* G4EQEMFIELDWITHSPIN */ -
trunk/source/geometry/magneticfield/include/G4EqMagElectricField.hh
r850 r921 26 26 // 27 27 // $Id: G4EqMagElectricField.hh,v 1.9 2006/06/29 18:22:03 gunter Exp $ 28 // GEANT4 tag $Name: HEAD$28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 29 // 30 30 // -
trunk/source/geometry/magneticfield/include/G4EquationOfMotion.hh
r850 r921 26 26 // 27 27 // $Id: G4EquationOfMotion.hh,v 1.10 2006/06/29 18:22:05 gunter Exp $ 28 // GEANT4 tag $Name: HEAD$28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 29 // 30 30 // -
trunk/source/geometry/magneticfield/include/G4EquationOfMotion.icc
r850 r921 26 26 // 27 27 // $Id: G4EquationOfMotion.icc,v 1.9 2006/06/29 18:22:07 gunter Exp $ 28 // GEANT4 tag $Name: HEAD$28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 29 // 30 30 // -
trunk/source/geometry/magneticfield/include/G4ErrorMag_UsualEqRhs.hh
r850 r921 26 26 // 27 27 // $Id: G4ErrorMag_UsualEqRhs.hh,v 1.1 2007/05/16 12:54:02 gcosmo Exp $ 28 // GEANT4 tag $Name: HEAD$28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 29 // 30 30 // -
trunk/source/geometry/magneticfield/include/G4ExactHelixStepper.hh
r850 r921 25 25 // 26 26 // $Id: G4ExactHelixStepper.hh,v 1.5 2007/05/18 12:50:31 tnikitin Exp $ 27 // GEANT4 tag $Name: HEAD$27 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 28 28 // 29 29 // -
trunk/source/geometry/magneticfield/include/G4ExplicitEuler.hh
r850 r921 26 26 // 27 27 // $Id: G4ExplicitEuler.hh,v 1.9 2006/06/29 18:22:11 gunter Exp $ 28 // GEANT4 tag $Name: HEAD$28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 29 // 30 30 // -
trunk/source/geometry/magneticfield/include/G4Field.hh
r850 r921 26 26 // 27 27 // $Id: G4Field.hh,v 1.10 2006/06/29 18:22:13 gunter Exp $ 28 // GEANT4 tag $Name: HEAD$28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 29 // 30 30 // -
trunk/source/geometry/magneticfield/include/G4FieldManager.hh
r850 r921 26 26 // 27 27 // $Id: G4FieldManager.hh,v 1.16 2006/06/29 18:22:15 gunter Exp $ 28 // GEANT4 tag $Name: HEAD$28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 29 // 30 30 // -
trunk/source/geometry/magneticfield/include/G4FieldManager.icc
r850 r921 26 26 // 27 27 // $Id: G4FieldManager.icc,v 1.12 2006/06/29 18:22:18 gunter Exp $ 28 // GEANT4 tag $Name: HEAD$28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 29 // 30 30 // -
trunk/source/geometry/magneticfield/include/G4FieldManagerStore.hh
r850 r921 26 26 // 27 27 // $Id: G4FieldManagerStore.hh,v 1.3 2008/01/17 09:39:08 gcosmo Exp $ 28 // GEANT4 tag $Name: HEAD$28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 29 // 30 30 // class G4FieldManagerStore -
trunk/source/geometry/magneticfield/include/G4FieldTrack.hh
r850 r921 26 26 // 27 27 // $Id: G4FieldTrack.hh,v 1.21 2006/11/13 18:24:35 gcosmo Exp $ 28 // GEANT4 tag $Name: HEAD$28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 29 // 30 30 // -
trunk/source/geometry/magneticfield/include/G4FieldTrack.icc
r850 r921 26 26 // 27 27 // $Id: G4FieldTrack.icc,v 1.21 2006/11/13 18:24:35 gcosmo Exp $ 28 // GEANT4 tag $Name: HEAD$28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 29 // 30 30 // ------------------------------------------------------------------- -
trunk/source/geometry/magneticfield/include/G4HarmonicPolMagField.hh
r850 r921 26 26 // 27 27 // $Id: G4HarmonicPolMagField.hh,v 1.4 2006/06/29 18:22:24 gunter Exp $ 28 // GEANT4 tag $Name: HEAD$28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 29 // 30 30 // class G4HarmonicPolMagField -
trunk/source/geometry/magneticfield/include/G4HelixExplicitEuler.hh
r850 r921 26 26 // 27 27 // $Id: G4HelixExplicitEuler.hh,v 1.9 2007/08/21 08:52:00 tnikitin Exp $ 28 // GEANT4 tag $Name: HEAD$28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 29 // 30 30 // -
trunk/source/geometry/magneticfield/include/G4HelixHeum.hh
r850 r921 26 26 // 27 27 // $Id: G4HelixHeum.hh,v 1.8 2006/06/29 18:22:36 gunter Exp $ 28 // GEANT4 tag $Name: HEAD$28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 29 // 30 30 // -
trunk/source/geometry/magneticfield/include/G4HelixImplicitEuler.hh
r850 r921 26 26 // 27 27 // $Id: G4HelixImplicitEuler.hh,v 1.8 2006/06/29 18:22:38 gunter Exp $ 28 // GEANT4 tag $Name: HEAD$28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 29 // 30 30 // -
trunk/source/geometry/magneticfield/include/G4HelixSimpleRunge.hh
r850 r921 26 26 // 27 27 // $Id: G4HelixSimpleRunge.hh,v 1.7 2006/06/29 18:22:41 gunter Exp $ 28 // GEANT4 tag $Name: HEAD$28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 29 // 30 30 // -
trunk/source/geometry/magneticfield/include/G4ImplicitEuler.hh
r850 r921 26 26 // 27 27 // $Id: G4ImplicitEuler.hh,v 1.8 2006/06/29 18:22:44 gunter Exp $ 28 // GEANT4 tag $Name: HEAD$28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 29 // 30 30 // -
trunk/source/geometry/magneticfield/include/G4LineCurrentMagField.hh
r850 r921 26 26 // 27 27 // $Id: G4LineCurrentMagField.hh,v 1.4 2006/06/29 18:22:46 gunter Exp $ 28 // GEANT4 tag $Name: HEAD$28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 29 // 30 30 // -
trunk/source/geometry/magneticfield/include/G4LineSection.hh
r850 r921 26 26 // 27 27 // $Id: G4LineSection.hh,v 1.9 2006/06/29 18:22:48 gunter Exp $ 28 // GEANT4 tag $Name: HEAD$28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 29 // 30 30 // -
trunk/source/geometry/magneticfield/include/G4MagErrorStepper.hh
r850 r921 26 26 // 27 27 // $Id: G4MagErrorStepper.hh,v 1.11 2006/06/29 18:22:50 gunter Exp $ 28 // GEANT4 tag $Name: HEAD$28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 29 // 30 30 // -
trunk/source/geometry/magneticfield/include/G4MagErrorStepper.icc
r850 r921 26 26 // 27 27 // $Id: G4MagErrorStepper.icc,v 1.13 2006/06/29 18:22:52 gunter Exp $ 28 // GEANT4 tag $Name: HEAD$28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 29 // 30 30 // -------------------------------------------------------------------- -
trunk/source/geometry/magneticfield/include/G4MagHelicalStepper.hh
r850 r921 27 27 // 28 28 // $Id: G4MagHelicalStepper.hh,v 1.15 2007/08/21 08:48:28 tnikitin Exp $ 29 // GEANT4 tag $Name: HEAD$29 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 30 30 // 31 31 // -
trunk/source/geometry/magneticfield/include/G4MagHelicalStepper.icc
r850 r921 26 26 // 27 27 // $Id: G4MagHelicalStepper.icc,v 1.13 2007/05/18 15:45:15 tnikitin Exp $ 28 // GEANT4 tag $Name: HEAD$28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 29 // 30 30 // Linear Step in regions of no field -
trunk/source/geometry/magneticfield/include/G4MagIntegratorDriver.hh
r850 r921 26 26 // 27 27 // $Id: G4MagIntegratorDriver.hh,v 1.20 2007/05/10 10:10:05 japost Exp $ 28 // GEANT4 tag $Name: HEAD$28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 29 // 30 30 // -
trunk/source/geometry/magneticfield/include/G4MagIntegratorDriver.icc
r850 r921 26 26 // 27 27 // $Id: G4MagIntegratorDriver.icc,v 1.13 2007/05/10 10:10:48 japost Exp $ 28 // GEANT4 tag $Name: HEAD$28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 29 // 30 30 // -------------------------------------------------------------------- -
trunk/source/geometry/magneticfield/include/G4MagIntegratorStepper.hh
r850 r921 25 25 // 26 26 // $Id: G4MagIntegratorStepper.hh,v 1.12 2006/09/20 09:31:01 japost Exp $ 27 // GEANT4 tag $Name: HEAD$27 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 28 28 // 29 29 // -
trunk/source/geometry/magneticfield/include/G4MagIntegratorStepper.icc
r850 r921 25 25 // 26 26 // $Id: G4MagIntegratorStepper.icc,v 1.10 2006/09/20 09:31:46 japost Exp $ 27 // GEANT4 tag $Name: HEAD$27 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 28 28 // 29 29 -
trunk/source/geometry/magneticfield/include/G4Mag_EqRhs.hh
r850 r921 26 26 // 27 27 // $Id: G4Mag_EqRhs.hh,v 1.9 2006/06/29 18:23:07 gunter Exp $ 28 // GEANT4 tag $Name: HEAD$28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 29 // 30 30 // -
trunk/source/geometry/magneticfield/include/G4Mag_SpinEqRhs.hh
r850 r921 26 26 // 27 27 // $Id: G4Mag_SpinEqRhs.hh,v 1.11 2006/06/29 18:23:09 gunter Exp $ 28 // GEANT4 tag $Name: HEAD$28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 29 // 30 30 // -
trunk/source/geometry/magneticfield/include/G4Mag_UsualEqRhs.hh
r850 r921 26 26 // 27 27 // $Id: G4Mag_UsualEqRhs.hh,v 1.7 2006/06/29 18:23:12 gunter Exp $ 28 // GEANT4 tag $Name: HEAD$28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 29 // 30 30 // -
trunk/source/geometry/magneticfield/include/G4MagneticField.hh
r850 r921 26 26 // 27 27 // $Id: G4MagneticField.hh,v 1.14 2006/06/29 18:23:14 gunter Exp $ 28 // GEANT4 tag $Name: HEAD$28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 29 // 30 30 // -
trunk/source/geometry/magneticfield/include/G4QuadrupoleMagField.hh
r850 r921 26 26 // 27 27 // $Id: G4QuadrupoleMagField.hh,v 1.4 2006/06/29 18:23:16 gunter Exp $ 28 // GEANT4 tag $Name: HEAD$28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 29 // 30 30 // -
trunk/source/geometry/magneticfield/include/G4RKG3_Stepper.hh
r850 r921 27 27 // 28 28 // $Id: G4RKG3_Stepper.hh,v 1.13 2007/05/18 12:44:02 tnikitin Exp $ 29 // GEANT4 tag $Name: HEAD$29 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 30 30 // 31 31 // -
trunk/source/geometry/magneticfield/include/G4SimpleHeum.hh
r850 r921 26 26 // 27 27 // $Id: G4SimpleHeum.hh,v 1.8 2006/06/29 18:23:20 gunter Exp $ 28 // GEANT4 tag $Name: HEAD$28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 29 // 30 30 // -
trunk/source/geometry/magneticfield/include/G4SimpleRunge.hh
r850 r921 26 26 // 27 27 // $Id: G4SimpleRunge.hh,v 1.8 2006/06/29 18:23:23 gunter Exp $ 28 // GEANT4 tag $Name: HEAD$28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 29 // 30 30 // -
trunk/source/geometry/magneticfield/include/G4UniformElectricField.hh
r850 r921 26 26 // 27 27 // $Id: G4UniformElectricField.hh,v 1.9 2006/06/29 18:23:25 gunter Exp $ 28 // GEANT4 tag $Name: HEAD$28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 29 // 30 30 // -
trunk/source/geometry/magneticfield/include/G4UniformMagField.hh
r850 r921 26 26 // 27 27 // $Id: G4UniformMagField.hh,v 1.9 2006/06/29 18:23:27 gunter Exp $ 28 // GEANT4 tag $Name: HEAD$28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 29 // 30 30 // -
trunk/source/geometry/magneticfield/src/G4CashKarpRKF45.cc
r850 r921 26 26 // 27 27 // $Id: G4CashKarpRKF45.cc,v 1.15 2008/01/11 18:11:44 japost Exp $ 28 // GEANT4 tag $Name: HEAD$28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 29 // 30 30 // The Cash-Karp Runge-Kutta-Fehlberg 4/5 method is an embedded fourth -
trunk/source/geometry/magneticfield/src/G4ChordFinder.cc
r850 r921 25 25 // 26 26 // 27 // $Id: G4ChordFinder.cc,v 1. 49 2008/07/15 14:02:06 japostExp $28 // GEANT4 tag $Name: HEAD$27 // $Id: G4ChordFinder.cc,v 1.51 2008/10/29 14:17:42 gcosmo Exp $ 28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 29 // 30 30 // 31 // 25.02.97 John Apostolakis, design and implimentation 32 // 05.03.97 V. Grichine , style modification 31 // 25.02.97 - John Apostolakis - Design and implementation 33 32 // ------------------------------------------------------------------- 33 34 #include <iomanip> 34 35 35 36 #include "G4ChordFinder.hh" … … 38 39 #include "G4ClassicalRK4.hh" 39 40 40 #include <iomanip>41 41 42 42 // .......................................................................... … … 54 54 { 55 55 // Simple constructor which does not create equation, .. 56 // fDeltaChord= fDefaultDeltaChord; 56 57 57 fIntgrDriver= pIntegrationDriver; 58 58 fAllocatedStepper= false; … … 62 62 // check the values and set the other parameters 63 63 } 64 64 65 65 66 // .......................................................................... … … 80 81 // Construct the Chord Finder 81 82 // by creating in inverse order the Driver, the Stepper and EqRhs ... 83 82 84 G4Mag_EqRhs *pEquation = new G4Mag_UsualEqRhs(theMagField); 83 85 fEquation = pEquation; … … 103 105 pItsStepper->GetNumberOfVariables() ); 104 106 } 107 108 109 // ...................................................................... 110 111 G4ChordFinder::~G4ChordFinder() 112 { 113 delete fEquation; // fIntgrDriver->pIntStepper->theEquation_Rhs; 114 if( fAllocatedStepper) 115 { 116 delete fDriversStepper; 117 } 118 delete fIntgrDriver; 119 120 if( fStatsVerbose ) { PrintStatistics(); } 121 } 122 105 123 106 124 // ...................................................................... … … 113 131 if( fractNext == -1.0 ) fractNext = 0.98; // 0.9; 114 132 115 // fFirstFraction = 0.999; // Orig 0.999 A safe value, range: ~ 0.95 - 0.999 116 // fMultipleRadius = 15.0; // For later use, range: ~ 2 - 20 117 118 if( fStatsVerbose ) { 133 // fFirstFraction = 0.999; // Orig 0.999 A safe value, range: ~ 0.95 - 0.999 134 // fMultipleRadius = 15.0; // For later use, range: ~ 2 - 20 135 136 if( fStatsVerbose ) 137 { 119 138 G4cout << " ChordFnd> Trying to set fractions: " 120 << " first " << fFirstFraction121 << " last " << fractLast122 << " next " << fractNext123 << " and multiple " << fMultipleRadius124 << G4endl;139 << " first " << fFirstFraction 140 << " last " << fractLast 141 << " next " << fractNext 142 << " and multiple " << fMultipleRadius 143 << G4endl; 125 144 } 126 145 127 146 if( (fractLast > 0.0) && (fractLast <=1.0) ) 128 { fFractionLast= fractLast; } 129 else 147 { 148 fFractionLast= fractLast; 149 } 150 else 151 { 152 G4cerr << "G4ChordFinder::SetFractions_Last_Next: Invalid " 153 << " fraction Last = " << fractLast 154 << " must be 0 < fractionLast <= 1 " << G4endl; 155 } 156 if( (fractNext > 0.0) && (fractNext <1.0) ) 157 { 158 fFractionNextEstimate = fractNext; 159 } 160 else 161 { 130 162 G4cerr << "G4ChordFinder:: SetFractions_Last_Next: Invalid " 131 << " fraction Last = " << fractLast 132 << " must be 0 < fractionLast <= 1 " << G4endl; 133 if( (fractNext > 0.0) && (fractNext <1.0) ) 134 { fFractionNextEstimate = fractNext; } 135 else 136 G4cerr << "G4ChordFinder:: SetFractions_Last_Next: Invalid " 137 << " fraction Next = " << fractNext 138 << " must be 0 < fractionNext < 1 " << G4endl; 139 } 163 << " fraction Next = " << fractNext 164 << " must be 0 < fractionNext < 1 " << G4endl; 165 } 166 } 167 140 168 141 169 // ...................................................................... 142 170 143 G4ChordFinder::~G4ChordFinder() 144 { 145 delete fEquation; // fIntgrDriver->pIntStepper->theEquation_Rhs; 146 if( fAllocatedStepper) 171 G4double 172 G4ChordFinder::AdvanceChordLimited( G4FieldTrack& yCurrent, 173 G4double stepMax, 174 G4double epsStep, 175 const G4ThreeVector latestSafetyOrigin, 176 G4double latestSafetyRadius ) 177 { 178 G4double stepPossible; 179 G4double dyErr; 180 G4FieldTrack yEnd( yCurrent); 181 G4double startCurveLen= yCurrent.GetCurveLength(); 182 G4double nextStep; 183 // ************* 184 stepPossible= FindNextChord(yCurrent, stepMax, yEnd, dyErr, epsStep, 185 &nextStep, latestSafetyOrigin, latestSafetyRadius 186 ); 187 // ************* 188 189 G4bool good_advance; 190 191 if ( dyErr < epsStep * stepPossible ) 192 { 193 // Accept this accuracy. 194 195 yCurrent = yEnd; 196 good_advance = true; 197 } 198 else 199 { 200 // Advance more accurately to "end of chord" 201 // *************** 202 good_advance = fIntgrDriver->AccurateAdvance(yCurrent, stepPossible, 203 epsStep, nextStep); 204 if ( ! good_advance ) 205 { 206 // In this case the driver could not do the full distance 207 stepPossible= yCurrent.GetCurveLength()-startCurveLen; 208 } 209 } 210 return stepPossible; 211 } 212 213 214 // ............................................................................ 215 216 G4double 217 G4ChordFinder::FindNextChord( const G4FieldTrack& yStart, 218 G4double stepMax, 219 G4FieldTrack& yEnd, // Endpoint 220 G4double& dyErrPos, // Error of endpoint 221 G4double epsStep, 222 G4double* pStepForAccuracy, 223 const G4ThreeVector, // latestSafetyOrigin, 224 G4double // latestSafetyRadius 225 ) 226 { 227 // Returns Length of Step taken 228 229 G4FieldTrack yCurrent= yStart; 230 G4double stepTrial, stepForAccuracy; 231 G4double dydx[G4FieldTrack::ncompSVEC]; 232 233 // 1.) Try to "leap" to end of interval 234 // 2.) Evaluate if resulting chord gives d_chord that is good enough. 235 // 2a.) If d_chord is not good enough, find one that is. 236 237 G4bool validEndPoint= false; 238 G4double dChordStep, lastStepLength; // stepOfLastGoodChord; 239 240 fIntgrDriver-> GetDerivatives( yCurrent, dydx ); 241 242 G4int noTrials=0; 243 const G4double safetyFactor= fFirstFraction; // 0.975 or 0.99 ? was 0.999 244 245 stepTrial = std::min( stepMax, safetyFactor*fLastStepEstimate_Unconstrained ); 246 247 G4double newStepEst_Uncons= 0.0; 248 do 147 249 { 148 delete fDriversStepper; 149 } // fIntgrDriver->pIntStepper;} 150 delete fIntgrDriver; 151 152 if( fStatsVerbose ) { PrintStatistics(); } 153 } 250 G4double stepForChord; 251 yCurrent = yStart; // Always start from initial point 252 253 // ************ 254 fIntgrDriver->QuickAdvance( yCurrent, dydx, stepTrial, 255 dChordStep, dyErrPos); 256 // ************ 257 258 // We check whether the criterion is met here. 259 validEndPoint = AcceptableMissDist(dChordStep); 260 261 lastStepLength = stepTrial; 262 263 // This method estimates to step size for a good chord. 264 stepForChord = NewStep(stepTrial, dChordStep, newStepEst_Uncons ); 265 266 if( ! validEndPoint ) 267 { 268 if( stepTrial<=0.0 ) 269 { 270 stepTrial = stepForChord; 271 } 272 else if (stepForChord <= stepTrial) 273 { 274 // Reduce by a fraction, possibly up to 20% 275 stepTrial = std::min( stepForChord, fFractionLast * stepTrial); 276 } 277 else 278 { 279 stepTrial *= 0.1; 280 } 281 } 282 noTrials++; 283 } 284 while( ! validEndPoint ); // End of do-while RKD 285 286 if( newStepEst_Uncons > 0.0 ) 287 { 288 fLastStepEstimate_Unconstrained= newStepEst_Uncons; 289 } 290 291 AccumulateStatistics( noTrials ); 292 293 if( pStepForAccuracy ) 294 { 295 // Calculate the step size required for accuracy, if it is needed 296 // 297 G4double dyErr_relative = dyErrPos/(epsStep*lastStepLength); 298 if( dyErr_relative > 1.0 ) 299 { 300 stepForAccuracy = fIntgrDriver->ComputeNewStepSize( dyErr_relative, 301 lastStepLength ); 302 } 303 else 304 { 305 stepForAccuracy = 0.0; // Convention to show step was ok 306 } 307 *pStepForAccuracy = stepForAccuracy; 308 } 309 310 #ifdef TEST_CHORD_PRINT 311 static int dbg=0; 312 if( dbg ) 313 { 314 G4cout << "ChordF/FindNextChord: NoTrials= " << noTrials 315 << " StepForGoodChord=" << std::setw(10) << stepTrial << G4endl; 316 } 317 #endif 318 yEnd= yCurrent; 319 return stepTrial; 320 } 321 322 323 // ........................................................................... 324 325 G4double G4ChordFinder::NewStep(G4double stepTrialOld, 326 G4double dChordStep, // Curr. dchord achieved 327 G4double& stepEstimate_Unconstrained ) 328 { 329 // Is called to estimate the next step size, even for successful steps, 330 // in order to predict an accurate 'chord-sensitive' first step 331 // which is likely to assist in more performant 'stepping'. 332 333 G4double stepTrial; 334 static G4double lastStepTrial = 1., lastDchordStep= 1.; 335 336 #if 1 337 338 if (dChordStep > 0.0) 339 { 340 stepEstimate_Unconstrained = 341 stepTrialOld*std::sqrt( fDeltaChord / dChordStep ); 342 stepTrial = fFractionNextEstimate * stepEstimate_Unconstrained; 343 } 344 else 345 { 346 // Should not update the Unconstrained Step estimate: incorrect! 347 stepTrial = stepTrialOld * 2.; 348 } 349 350 if( stepTrial <= 0.001 * stepTrialOld) 351 { 352 if ( dChordStep > 1000.0 * fDeltaChord ) 353 { 354 stepTrial= stepTrialOld * 0.03; 355 } 356 else 357 { 358 if ( dChordStep > 100. * fDeltaChord ) 359 { 360 stepTrial= stepTrialOld * 0.1; 361 } 362 else // Try halving the length until dChordStep OK 363 { 364 stepTrial= stepTrialOld * 0.5; 365 } 366 } 367 } 368 else if (stepTrial > 1000.0 * stepTrialOld) 369 { 370 stepTrial= 1000.0 * stepTrialOld; 371 } 372 373 if( stepTrial == 0.0 ) 374 { 375 stepTrial= 0.000001; 376 } 377 378 lastStepTrial = stepTrialOld; 379 lastDchordStep= dChordStep; 380 381 #else 382 383 if ( dChordStep > 1000. * fDeltaChord ) 384 { 385 stepTrial= stepTrialOld * 0.03; 386 } 387 else 388 { 389 if ( dChordStep > 100. * fDeltaChord ) 390 { 391 stepTrial= stepTrialOld * 0.1; 392 } 393 else // Keep halving the length until dChordStep OK 394 { 395 stepTrial= stepTrialOld * 0.5; 396 } 397 } 398 399 #endif 400 401 // A more sophisticated chord-finder could figure out a better 402 // stepTrial, from dChordStep and the required d_geometry 403 // e.g. 404 // Calculate R, r_helix (eg at orig point) 405 // if( stepTrial < 2 pi R ) 406 // stepTrial = R arc_cos( 1 - fDeltaChord / r_helix ) 407 // else 408 // ?? 409 410 return stepTrial; 411 } 412 413 414 // ........................................................................... 415 416 G4FieldTrack 417 G4ChordFinder::ApproxCurvePointS( const G4FieldTrack& CurveA_PointVelocity, 418 const G4FieldTrack& CurveB_PointVelocity, 419 const G4FieldTrack& ApproxCurveV, 420 const G4ThreeVector& CurrentE_Point, 421 const G4ThreeVector& CurrentF_Point, 422 const G4ThreeVector& PointG, 423 G4bool first, G4double eps_step) 424 { 425 // ApproxCurvePointS is 2nd implementation of ApproxCurvePoint. 426 // Use Brent Algorithm (or InvParabolic) when possible. 427 // Given a starting curve point A (CurveA_PointVelocity), curve point B 428 // (CurveB_PointVelocity), a point E which is (generally) not on the curve 429 // and a point F which is on the curve (first approximation), find new 430 // point S on the curve closer to point E. 431 // While advancing towards S utilise 'eps_step' as a measure of the 432 // relative accuracy of each Step. 433 434 G4FieldTrack EndPoint( CurveA_PointVelocity); 435 G4ThreeVector Point_A=CurveA_PointVelocity.GetPosition(); 436 G4ThreeVector Point_B=CurveB_PointVelocity.GetPosition(); 437 G4double xa,xb,xc,ya,yb,yc; 438 439 // InverseParabolic. AF Intersects (First Part of Curve) 440 441 if(first) 442 { 443 xa=0.; 444 ya=(PointG-Point_A).mag(); 445 xb=(Point_A-CurrentF_Point).mag(); 446 yb=-(PointG-CurrentF_Point).mag(); 447 xc=(Point_A-Point_B).mag(); 448 yc=-(CurrentE_Point-Point_B).mag(); 449 } 450 else 451 { 452 xa=0.; 453 ya=(Point_A-PointG).mag(); 454 xb=(Point_B-Point_A).mag(); 455 yb=-(PointG-Point_B).mag(); 456 xc=-(Point_A-CurrentF_Point).mag(); 457 yc=-(Point_A-CurrentE_Point).mag(); 458 459 } 460 const G4double tolerance= 1.e-12; 461 if(ya<=tolerance||std::abs(yc)<=tolerance) 462 { 463 ; // What to do for the moment: return the same point as at start 464 // then PropagatorInField will take care 465 } 466 else 467 { 468 G4double test_step = InvParabolic(xa,ya,xb,yb,xc,yc); 469 G4double curve; 470 if(first) 471 { 472 curve=std::abs(EndPoint.GetCurveLength() 473 -ApproxCurveV.GetCurveLength()); 474 } 475 else 476 { 477 curve=std::abs(EndPoint.GetCurveLength() 478 -CurveB_PointVelocity.GetCurveLength()); 479 } 480 481 if(test_step<=0) { test_step=0.1*xb; } 482 if(test_step>=xb) { test_step=0.5*xb; } 483 if(test_step>=curve){ test_step=0.5*curve; } 484 485 if(curve*(1.+eps_step)<xb) // Similar to ReEstimate Step from 486 { // G4VIntersectionLocator 487 test_step=0.5*curve; 488 } 489 490 G4bool goodAdvance; 491 goodAdvance = fIntgrDriver->AccurateAdvance(EndPoint,test_step, eps_step); 492 493 #ifdef G4DEBUG_FIELD 494 // Printing Brent and Linear Approximation 495 // 496 G4cout << "G4ChordFinder::ApproxCurvePointS() - test-step ShF = " 497 << test_step << " EndPoint = " << EndPoint << G4endl; 498 499 // Test Track 500 // 501 G4FieldTrack TestTrack( CurveA_PointVelocity); 502 TestTrack = ApproxCurvePointV( CurveA_PointVelocity, 503 CurveB_PointVelocity, 504 CurrentE_Point, eps_step ); 505 G4cout.precision(14); 506 G4cout << "G4ChordFinder::BrentApprox = " << EndPoint << G4endl; 507 G4cout << "G4ChordFinder::LinearApprox= " << TestTrack << G4endl; 508 #endif 509 } 510 return EndPoint; 511 } 512 513 514 // ........................................................................... 515 516 G4FieldTrack G4ChordFinder:: 517 ApproxCurvePointV( const G4FieldTrack& CurveA_PointVelocity, 518 const G4FieldTrack& CurveB_PointVelocity, 519 const G4ThreeVector& CurrentE_Point, 520 G4double eps_step) 521 { 522 // If r=|AE|/|AB|, and s=true path lenght (AB) 523 // return the point that is r*s along the curve! 524 525 G4FieldTrack Current_PointVelocity = CurveA_PointVelocity; 526 527 G4ThreeVector CurveA_Point= CurveA_PointVelocity.GetPosition(); 528 G4ThreeVector CurveB_Point= CurveB_PointVelocity.GetPosition(); 529 530 G4ThreeVector ChordAB_Vector= CurveB_Point - CurveA_Point; 531 G4ThreeVector ChordAE_Vector= CurrentE_Point - CurveA_Point; 532 533 G4double ABdist= ChordAB_Vector.mag(); 534 G4double curve_length; // A curve length of AB 535 G4double AE_fraction; 536 537 curve_length= CurveB_PointVelocity.GetCurveLength() 538 - CurveA_PointVelocity.GetCurveLength(); 539 540 G4double integrationInaccuracyLimit= std::max( perMillion, 0.5*eps_step ); 541 if( curve_length < ABdist * (1. - integrationInaccuracyLimit) ) 542 { 543 #ifdef G4DEBUG_FIELD 544 G4cerr << " Warning in G4ChordFinder::ApproxCurvePoint: " 545 << G4endl 546 << " The two points are further apart than the curve length " 547 << G4endl 548 << " Dist = " << ABdist 549 << " curve length = " << curve_length 550 << " relativeDiff = " << (curve_length-ABdist)/ABdist 551 << G4endl; 552 if( curve_length < ABdist * (1. - 10*eps_step) ) 553 { 554 G4cerr << " ERROR: the size of the above difference" 555 << " exceeds allowed limits. Aborting." << G4endl; 556 G4Exception("G4ChordFinder::ApproxCurvePointV()", "PrecisionError", 557 FatalException, "Unphysical curve length."); 558 } 559 #endif 560 // Take default corrective action: adjust the maximum curve length. 561 // NOTE: this case only happens for relatively straight paths. 562 // curve_length = ABdist; 563 } 564 565 G4double new_st_length; 566 567 if ( ABdist > 0.0 ) 568 { 569 AE_fraction = ChordAE_Vector.mag() / ABdist; 570 } 571 else 572 { 573 AE_fraction = 0.5; // Guess .. ?; 574 #ifdef G4DEBUG_FIELD 575 G4cout << "Warning in G4ChordFinder::ApproxCurvePointV():" 576 << " A and B are the same point!" << G4endl 577 << " Chord AB length = " << ChordAE_Vector.mag() << G4endl 578 << G4endl; 579 #endif 580 } 581 582 if( (AE_fraction> 1.0 + perMillion) || (AE_fraction< 0.) ) 583 { 584 #ifdef G4DEBUG_FIELD 585 G4cerr << " G4ChordFinder::ApproxCurvePointV() - Warning:" 586 << " Anomalous condition:AE > AB or AE/AB <= 0 " << G4endl 587 << " AE_fraction = " << AE_fraction << G4endl 588 << " Chord AE length = " << ChordAE_Vector.mag() << G4endl 589 << " Chord AB length = " << ABdist << G4endl << G4endl; 590 G4cerr << " OK if this condition occurs after a recalculation of 'B'" 591 << G4endl << " Otherwise it is an error. " << G4endl ; 592 #endif 593 // This course can now result if B has been re-evaluated, 594 // without E being recomputed (1 July 99). 595 // In this case this is not a "real error" - but it is undesired 596 // and we cope with it by a default corrective action ... 597 // 598 AE_fraction = 0.5; // Default value 599 } 600 601 new_st_length= AE_fraction * curve_length; 602 603 G4bool good_advance; 604 if ( AE_fraction > 0.0 ) 605 { 606 good_advance = fIntgrDriver->AccurateAdvance(Current_PointVelocity, 607 new_st_length, eps_step ); 608 // 609 // In this case it does not matter if it cannot advance the full distance 610 } 611 612 // If there was a memory of the step_length actually required at the start 613 // of the integration Step, this could be re-used ... 614 615 G4cout.precision(14); 616 617 return Current_PointVelocity; 618 } 619 620 621 // ...................................................................... 154 622 155 623 void … … 157 625 { 158 626 // Print Statistics 627 159 628 G4cout << "G4ChordFinder statistics report: " << G4endl; 160 629 G4cout … … 171 640 } 172 641 173 // ......................................................................174 175 G4double176 G4ChordFinder::AdvanceChordLimited( G4FieldTrack& yCurrent,177 G4double stepMax,178 G4double epsStep,179 const G4ThreeVector latestSafetyOrigin,180 G4double latestSafetyRadius181 )182 {183 G4double stepPossible;184 G4double dyErr;185 G4FieldTrack yEnd( yCurrent);186 G4double startCurveLen= yCurrent.GetCurveLength();187 G4double nextStep;188 // *************189 stepPossible= FindNextChord(yCurrent, stepMax, yEnd, dyErr, epsStep, &nextStep190 , latestSafetyOrigin, latestSafetyRadius191 );192 // *************193 // G4cout<<"Exit Find Next Chord Err= "<<dyErr<<" eps= "<<epsStep<<"stepPos= "<<stepPossible<<G4endl;194 G4bool good_advance;195 196 if ( dyErr < epsStep * stepPossible )197 198 { //G4cout<<"err comparison = "<<dyErr<<" eps= "<<epsStep<<G4endl;199 // Accept this accuracy.200 yCurrent = yEnd;201 good_advance = true;202 }203 else204 {205 // G4cout<<"Entering Accurate Advance"<<G4endl;206 // Advance more accurately to "end of chord"207 // ***************208 good_advance = fIntgrDriver->AccurateAdvance(yCurrent, stepPossible, epsStep, nextStep);209 // ***************210 if ( ! good_advance ){211 // In this case the driver could not do the full distance212 stepPossible= yCurrent.GetCurveLength()-startCurveLen;213 }214 }215 216 #ifdef G4DEBUG_FIELD217 //G4cout << "Exiting FindNextChord Limited with:" << G4endl218 // << " yCurrent: " << yCurrent<< G4endl;219 #endif220 221 return stepPossible;222 }223 224 // #define TEST_CHORD_PRINT 1225 226 // ............................................................................227 228 G4double229 G4ChordFinder::FindNextChord( const G4FieldTrack& yStart,230 G4double stepMax,231 G4FieldTrack& yEnd, // Endpoint232 G4double& dyErrPos, // Error of endpoint233 G4double epsStep,234 G4double* pStepForAccuracy,235 const G4ThreeVector, // latestSafetyOrigin,236 G4double // latestSafetyRadius237 )238 // Returns Length of Step taken239 {240 //G4cout<<"Inter Find Next Chord with step="<<stepMax<<G4endl;241 // G4int stepRKnumber=0;242 G4FieldTrack yCurrent= yStart;243 G4double stepTrial, stepForAccuracy;244 G4double dydx[G4FieldTrack::ncompSVEC];245 246 // 1.) Try to "leap" to end of interval247 // 2.) Evaluate if resulting chord gives d_chord that is good enough.248 // 2a.) If d_chord is not good enough, find one that is.249 250 G4bool validEndPoint= false;251 G4double dChordStep, lastStepLength; // stepOfLastGoodChord;252 253 fIntgrDriver-> GetDerivatives( yCurrent, dydx ) ;254 //for (G4int i=0;i<G4FieldTrack::ncompSVEC;i++){255 // dydx[i]=0.;256 //}257 G4int noTrials=0;258 const G4double safetyFactor= fFirstFraction; // 0.975 or 0.99 ? was 0.999259 260 stepTrial = std::min( stepMax,261 safetyFactor * fLastStepEstimate_Unconstrained );262 263 G4double newStepEst_Uncons= 0.0;264 do265 {266 G4double stepForChord;267 yCurrent = yStart; // Always start from initial point268 269 // ************270 fIntgrDriver->QuickAdvance( yCurrent, dydx, stepTrial,271 dChordStep, dyErrPos);272 // ************273 274 // G4cout<<"AfterQuickAdv step="<<stepTrial<<" dC="<<dChordStep<<" yErr="<<dyErrPos<<G4endl;275 276 // We check whether the criterion is met here.277 validEndPoint = AcceptableMissDist(dChordStep);278 // if(validEndPoint){G4cout<<"validEndPoint"<<fDeltaChord<<G4endl;}279 // else{G4cout<<"No__validEndPoint"<<G4endl;}280 281 282 //&& (dyErrPos < eps) ;283 // validEndPoint = AcceptableMissDist(dChordStep) && (dyErrPos < epsStep) ;284 285 lastStepLength = stepTrial;286 287 // This method estimates to step size for a good chord.288 stepForChord = NewStep(stepTrial, dChordStep, newStepEst_Uncons );289 290 if( ! validEndPoint ) {291 if( stepTrial<=0.0 )292 stepTrial = stepForChord;293 else if (stepForChord <= stepTrial)294 // Reduce by a fraction, possibly up to 20%295 stepTrial = std::min( stepForChord,296 fFractionLast * stepTrial);297 else298 stepTrial *= 0.1;299 300 // if(dbg) G4cerr<<"Dchord too big. Try new hstep="<<stepTrial<<G4endl;301 }302 // #ifdef TEST_CHORD_PRINT303 // TestChordPrint( noTrials, lastStepLength, dChordStep, stepTrial );304 // #endif305 306 noTrials++;307 }308 while( ! validEndPoint ); // End of do-while RKD309 310 if( newStepEst_Uncons > 0.0 ){311 fLastStepEstimate_Unconstrained= newStepEst_Uncons;312 }313 314 AccumulateStatistics( noTrials );315 316 // stepOfLastGoodChord = stepTrial;317 318 if( pStepForAccuracy ){319 // Calculate the step size required for accuracy, if it is needed320 G4double dyErr_relative = dyErrPos/(epsStep*lastStepLength);321 if( dyErr_relative > 1.0 ) {322 stepForAccuracy =323 fIntgrDriver->ComputeNewStepSize( dyErr_relative,324 lastStepLength );325 }else{326 stepForAccuracy = 0.0; // Convention to show step was ok327 }328 *pStepForAccuracy = stepForAccuracy;329 }330 331 #ifdef TEST_CHORD_PRINT332 static int dbg=0;333 if( dbg )334 G4cout << "ChordF/FindNextChord: NoTrials= " << noTrials335 << " StepForGoodChord=" << std::setw(10) << stepTrial << G4endl;336 #endif337 //G4cout << "ChordF/FindNextChord: NoTrials= " << noTrials338 // << " StepForGoodChord=" << std::setw(10) << stepTrial << G4endl;339 yEnd= yCurrent;340 return stepTrial;341 }342 343 // ----------------------------------------------------------------------------344 #if 0345 // #ifdef G4VERBOSE346 if( dbg ) {347 G4cerr << "Returned from QuickAdvance with: yCur=" << yCurrent <<G4endl;348 G4cerr << " dChordStep= "<< dChordStep <<" dyErr=" << dyErr << G4endl;349 }350 #endif351 // ----------------------------------------------------------------------------352 642 353 643 // ........................................................................... 354 644 355 G4double G4ChordFinder::NewStep(G4double stepTrialOld, 356 G4double dChordStep, // Curr. dchord achieved 357 G4double& stepEstimate_Unconstrained ) 358 // 359 // Is called to estimate the next step size, even for successful steps, 360 // in order to predict an accurate 'chord-sensitive' first step 361 // which is likely to assist in more performant 'stepping'. 362 // 363 364 { 365 G4double stepTrial; 366 static G4double lastStepTrial = 1., lastDchordStep= 1.; 367 368 #if 1 369 // const G4double threshold = 1.21, multiplier = 0.9; 370 // 0.9 < 1 / std::sqrt(1.21) 371 372 if (dChordStep > 0.0) 373 { 374 stepEstimate_Unconstrained = stepTrialOld*std::sqrt( fDeltaChord / dChordStep ); 375 // stepTrial = 0.98 * stepEstimate_Unconstrained; 376 stepTrial = fFractionNextEstimate * stepEstimate_Unconstrained; 377 } 378 else 379 { 380 // Should not update the Unconstrained Step estimate: incorrect! 381 stepTrial = stepTrialOld * 2.; 382 } 383 384 // if ( dChordStep < threshold * fDeltaChord ){ 385 // stepTrial= stepTrialOld * multiplier; 386 // } 387 if( stepTrial <= 0.001 * stepTrialOld) 388 { 389 if ( dChordStep > 1000.0 * fDeltaChord ){ 390 stepTrial= stepTrialOld * 0.03; 391 }else{ 392 if ( dChordStep > 100. * fDeltaChord ){ 393 stepTrial= stepTrialOld * 0.1; 394 }else{ 395 // Try halving the length until dChordStep OK 396 stepTrial= stepTrialOld * 0.5; 397 } 398 } 399 }else if (stepTrial > 1000.0 * stepTrialOld) 400 { 401 stepTrial= 1000.0 * stepTrialOld; 402 } 403 404 if( stepTrial == 0.0 ){ 405 stepTrial= 0.000001; 406 } 407 408 lastStepTrial = stepTrialOld; 409 lastDchordStep= dChordStep; 410 #else 411 if ( dChordStep > 1000. * fDeltaChord ){ 412 stepTrial= stepTrialOld * 0.03; 413 }else{ 414 if ( dChordStep > 100. * fDeltaChord ){ 415 stepTrial= stepTrialOld * 0.1; 416 }else{ 417 // Keep halving the length until dChordStep OK 418 stepTrial= stepTrialOld * 0.5; 419 } 420 } 421 #endif 422 423 // A more sophisticated chord-finder could figure out a better 424 // stepTrial, from dChordStep and the required d_geometry 425 // eg 426 // Calculate R, r_helix (eg at orig point) 427 // if( stepTrial < 2 pi R ) 428 // stepTrial = R arc_cos( 1 - fDeltaChord / r_helix ) 429 // else 430 // ?? 431 432 return stepTrial; 433 } 434 435 // ApproxCurvePointS is 2nd implementation of ApproxCurvePoint. 436 // Use Brent Algorithm(or InvParabolic) when it possible. 437 // Given a starting curve point A (CurveA_PointVelocity), 438 // curve point B (CurveB_PointVelocity), a point E which is (generally) 439 // not on the curve and a point F which is on the curve(first approximation) 440 // From this information find new point S on the curve closer to point E. 441 // While advancing towards S utilise eps_step 442 // as a measure of the relative accuracy of each Step. 443 G4FieldTrack 444 G4ChordFinder::ApproxCurvePointS( const G4FieldTrack& CurveA_PointVelocity, 445 const G4FieldTrack& CurveB_PointVelocity, 446 const G4ThreeVector& CurrentE_Point, 447 const G4ThreeVector& CurrentF_Point, 448 const G4ThreeVector& PointG, 449 G4bool first, G4double eps_step) 450 { 451 452 453 G4FieldTrack EndPoint( CurveA_PointVelocity); 454 G4ThreeVector Point_A=CurveA_PointVelocity.GetPosition(); 455 G4ThreeVector Point_B=CurveB_PointVelocity.GetPosition(); 456 G4double xa,xb,xc,ya,yb,yc; 457 458 //InverseParabolic 459 //AF Intersects (First Part of Curve) 460 if(first){ 461 xa=0.; 462 ya=(PointG-Point_A).mag(); 463 xb=(Point_A-CurrentF_Point).mag(); 464 yb=-(PointG-CurrentF_Point).mag(); 465 xc=(Point_A-Point_B).mag(); 466 yc=-(CurrentE_Point-Point_B).mag(); 467 } 468 else{ 469 xa=0.; 470 ya=(Point_A-PointG).mag(); 471 xb=(Point_B-Point_A).mag(); 472 yb=-(PointG-Point_B).mag(); 473 xc=-(Point_A-CurrentF_Point).mag(); 474 yc=-(Point_A-CurrentE_Point).mag(); 475 476 } 477 const G4double tolerance= 1.e-12; 478 if(ya<=tolerance||std::abs(yc)<=tolerance){ 479 ; //What to do for the moment return the same point as in begin 480 //Then PropagatorInField will take care 481 } 482 else{ 483 484 G4double test_step =InvParabolic(xa,ya,xb,yb,xc,yc); 485 G4double curve=std::abs(EndPoint.GetCurveLength()-CurveB_PointVelocity.GetCurveLength()); 486 G4double dist= (EndPoint.GetPosition()-Point_B).mag(); 487 if(test_step<=0) { test_step=0.1*xb;} 488 if(test_step>=xb){ test_step=0.5*xb;} 489 490 491 if(curve*(1.+eps_step)<dist){ 492 test_step=0.5*dist; 493 } 494 495 G4bool goodAdvance; 496 goodAdvance= 497 fIntgrDriver->AccurateAdvance(EndPoint,test_step, eps_step); 498 // *************** 499 500 #ifdef G4DEBUG_FIELD 501 G4cout<<"G4ChordFinder:: test-step ShF="<<test_step<<" EndPoint="<<EndPoint<<G4endl; 502 // Test Track 503 G4FieldTrack TestTrack( CurveA_PointVelocity); 504 TestTrack = ApproxCurvePointV( CurveA_PointVelocity, 505 CurveB_PointVelocity, 506 CurrentE_Point, 507 eps_step ); 508 G4cout.precision(14); 509 G4cout<<"G4ChordFinder:: BrentApprox="<<EndPoint<<G4endl; 510 G4cout<<"G4ChordFinder::LinearApprox="<<TestTrack<<G4endl; 511 #endif 512 } 513 return EndPoint; 514 } 515 516 G4FieldTrack 517 G4ChordFinder::ApproxCurvePointV( const G4FieldTrack& CurveA_PointVelocity, 518 const G4FieldTrack& CurveB_PointVelocity, 519 const G4ThreeVector& CurrentE_Point, 520 G4double eps_step) 521 { 522 // 1st implementation: 523 // if r=|AE|/|AB|, and s=true path lenght (AB) 524 // return the point that is r*s along the curve! 525 ///////////////////////////// 526 // 527 //2st implementation : Inverse Parabolic Extrapolation by D.C.Williams 528 // 529 // Uses InvParabolic (xa,ya,xb,yb,xc,yc) 530 531 G4FieldTrack Current_PointVelocity = CurveA_PointVelocity; 532 533 G4ThreeVector CurveA_Point= CurveA_PointVelocity.GetPosition(); 534 G4ThreeVector CurveB_Point= CurveB_PointVelocity.GetPosition(); 535 536 G4ThreeVector ChordAB_Vector= CurveB_Point - CurveA_Point; 537 G4ThreeVector ChordAE_Vector= CurrentE_Point - CurveA_Point; 538 539 G4double ABdist= ChordAB_Vector.mag(); 540 G4double curve_length; // A curve length of AB 541 G4double AE_fraction; 542 543 curve_length= CurveB_PointVelocity.GetCurveLength() 544 - CurveA_PointVelocity.GetCurveLength(); 545 546 // const 547 G4double integrationInaccuracyLimit= std::max( perMillion, 0.5*eps_step ); 548 if( curve_length < ABdist * (1. - integrationInaccuracyLimit) ){ 549 #ifdef G4DEBUG_FIELD 550 G4cerr << " Warning in G4ChordFinder::ApproxCurvePoint: " 551 << G4endl 552 << " The two points are further apart than the curve length " 553 << G4endl 554 << " Dist = " << ABdist 555 << " curve length = " << curve_length 556 << " relativeDiff = " << (curve_length-ABdist)/ABdist 557 << G4endl; 558 if( curve_length < ABdist * (1. - 10*eps_step) ) { 559 G4cerr << " ERROR: the size of the above difference" 560 << " exceeds allowed limits. Aborting." << G4endl; 561 G4Exception("G4ChordFinder::ApproxCurvePointV()", "PrecisionError", 562 FatalException, "Unphysical curve length."); 563 } 564 #endif 565 // Take default corrective action: 566 // --> adjust the maximum curve length. 567 // NOTE: this case only happens for relatively straight paths. 568 curve_length = ABdist; 569 } 570 571 G4double new_st_length; 572 573 if ( ABdist > 0.0 ){ 574 AE_fraction = ChordAE_Vector.mag() / ABdist; 575 }else{ 576 AE_fraction = 0.5; // Guess .. ?; 577 #ifdef G4DEBUG_FIELD 578 G4cout << "Warning in G4ChordFinder::ApproxCurvePoint:" 579 << " A and B are the same point!" << G4endl 580 << " Chord AB length = " << ChordAE_Vector.mag() << G4endl 581 << G4endl; 582 #endif 583 } 584 585 if( (AE_fraction> 1.0 + perMillion) || (AE_fraction< 0.) ){ 586 #ifdef G4DEBUG_FIELD 587 G4cerr << " G4ChordFinder::ApproxCurvePointV - Warning:" 588 << " Anomalous condition:AE > AB or AE/AB <= 0 " << G4endl 589 << " AE_fraction = " << AE_fraction << G4endl 590 << " Chord AE length = " << ChordAE_Vector.mag() << G4endl 591 << " Chord AB length = " << ABdist << G4endl << G4endl; 592 G4cerr << " OK if this condition occurs after a recalculation of 'B'" 593 << G4endl << " Otherwise it is an error. " << G4endl ; 594 #endif 595 // This course can now result if B has been re-evaluated, 596 // without E being recomputed (1 July 99) 597 // In this case this is not a "real error" - but it undesired 598 // and we cope with it by a default corrective action ... 599 AE_fraction = 0.5; // Default value 600 } 601 602 new_st_length= AE_fraction * curve_length; 603 604 G4bool good_advance; 605 if ( AE_fraction > 0.0 ) { 606 good_advance = 607 fIntgrDriver->AccurateAdvance(Current_PointVelocity, 608 new_st_length, 609 eps_step ); // Relative accuracy 610 // In this case it does not matter if it cannot advance the full distance 611 } 612 613 // If there was a memory of the step_length actually require at the start 614 // of the integration Step, this could be re-used ... 615 G4cout.precision(14); 616 617 // G4cout<<"G4ChordFinder::LinearApprox="<<Current_PointVelocity<<G4endl; 618 return Current_PointVelocity; 619 } 620 621 void 622 G4ChordFinder::TestChordPrint( G4int noTrials, 623 G4int lastStepTrial, 624 G4double dChordStep, 625 G4double nextStepTrial ) 645 void G4ChordFinder::TestChordPrint( G4int noTrials, 646 G4int lastStepTrial, 647 G4double dChordStep, 648 G4double nextStepTrial ) 626 649 { 627 650 G4int oldprec= G4cout.precision(5); 628 651 G4cout << " ChF/fnc: notrial " << std::setw( 3) << noTrials 629 652 << " this_step= " << std::setw(10) << lastStepTrial; 630 if( std::fabs( (dChordStep / fDeltaChord) - 1.0 ) < 0.001 ){ 631 G4cout.precision(8); 632 }else{ G4cout.precision(6); } 633 G4cout << " dChordStep= " << std::setw(12) << dChordStep; 653 if( std::fabs( (dChordStep / fDeltaChord) - 1.0 ) < 0.001 ) 654 { 655 G4cout.precision(8); 656 } 657 else 658 { 659 G4cout.precision(6); 660 } 661 G4cout << " dChordStep= " << std::setw(12) << dChordStep; 634 662 if( dChordStep > fDeltaChord ) { G4cout << " d+"; } 635 663 else { G4cout << " d-"; } -
trunk/source/geometry/magneticfield/src/G4ChordFinderSaf.cc
r831 r921 116 116 117 117 G4double 118 G4ChordFinderSaf::FindNextChord( const G4FieldTrack yStart,118 G4ChordFinderSaf::FindNextChord( const G4FieldTrack& yStart, 119 119 G4double stepMax, 120 120 G4FieldTrack& yEnd, // Endpoint -
trunk/source/geometry/magneticfield/src/G4ClassicalRK4.cc
r850 r921 26 26 // 27 27 // $Id: G4ClassicalRK4.cc,v 1.12 2006/06/29 18:23:37 gunter Exp $ 28 // GEANT4 tag $Name: HEAD$28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 29 // 30 30 // ------------------------------------------------------------------- -
trunk/source/geometry/magneticfield/src/G4DELPHIMagField.cc
r850 r921 26 26 // 27 27 // $Id: G4DELPHIMagField.cc,v 1.6 2006/06/29 18:23:39 gunter Exp $ 28 // GEANT4 tag $Name: HEAD$28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 29 // ------------------------------------------------------------------- 30 30 -
trunk/source/geometry/magneticfield/src/G4ElectricField.cc
r850 r921 26 26 // 27 27 // $Id: G4ElectricField.cc,v 1.2 2006/06/29 18:23:42 gunter Exp $ 28 // GEANT4 tag $Name: HEAD$28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 29 // 30 30 // -------------------------------------------------------------------- -
trunk/source/geometry/magneticfield/src/G4ElectroMagneticField.cc
r850 r921 26 26 // 27 27 // $Id: G4ElectroMagneticField.cc,v 1.3 2006/06/29 18:23:44 gunter Exp $ 28 // GEANT4 tag $Name: HEAD$28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 29 // 30 30 // -------------------------------------------------------------------- -
trunk/source/geometry/magneticfield/src/G4EqEMFieldWithSpin.cc
r850 r921 25 25 // 26 26 // 27 // $Id: G4EqEMFieldWithSpin.cc,v 1. 2 2008/04/24 12:33:08 tnikitinExp $28 // GEANT4 tag $Name: HEAD$27 // $Id: G4EqEMFieldWithSpin.cc,v 1.4 2008/11/21 21:17:03 gum Exp $ 28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 29 // 30 30 // … … 40 40 41 41 #include "G4EqEMFieldWithSpin.hh" 42 #include "G4ElectroMagneticField.hh" 42 43 #include "G4ThreeVector.hh" 43 44 #include "globals.hh" 44 45 45 46 G4EqEMFieldWithSpin::G4EqEMFieldWithSpin(G4ElectroMagneticField *emField ) 46 : G4EquationOfMotion( emField ) { anomaly = 1.165923e-3; } 47 : G4EquationOfMotion( emField ) 48 { 49 anomaly = 0.0011659208; 50 } 51 52 G4EqEMFieldWithSpin::~G4EqEMFieldWithSpin() 53 { 54 } 47 55 48 56 void 49 57 G4EqEMFieldWithSpin::SetChargeMomentumMass(G4double particleCharge, // e+ units 50 G4double MomentumXc,58 G4double MomentumXc, 51 59 G4double particleMass) 52 60 { … … 61 69 beta = MomentumXc/E; 62 70 gamma = E/particleMass; 71 63 72 } 64 65 66 73 67 74 void 68 75 G4EqEMFieldWithSpin::EvaluateRhsGivenB(const G4double y[], 69 const G4double Field[],70 G4double dydx[] ) const76 const G4double Field[], 77 G4double dydx[] ) const 71 78 { 72 79 … … 114 121 115 122 G4ThreeVector Spin(y[9],y[10],y[11]); 123 124 if (Spin.mag() > 0.) Spin = Spin.unit(); 125 116 126 G4ThreeVector dSpin; 117 127 -
trunk/source/geometry/magneticfield/src/G4EqMagElectricField.cc
r850 r921 26 26 // 27 27 // $Id: G4EqMagElectricField.cc,v 1.14 2008/04/24 12:33:35 tnikitin Exp $ 28 // GEANT4 tag $Name: HEAD$28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 29 // 30 30 // -
trunk/source/geometry/magneticfield/src/G4EquationOfMotion.cc
r850 r921 26 26 // 27 27 // $Id: G4EquationOfMotion.cc,v 1.9 2006/06/29 18:23:48 gunter Exp $ 28 // GEANT4 tag $Name: HEAD$28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 29 // 30 30 // ------------------------------------------------------------------- -
trunk/source/geometry/magneticfield/src/G4ErrorMag_UsualEqRhs.cc
r850 r921 26 26 // 27 27 // $Id: G4ErrorMag_UsualEqRhs.cc,v 1.1 2007/05/16 12:54:02 gcosmo Exp $ 28 // GEANT4 tag $Name: HEAD$28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 29 // 30 30 // -
trunk/source/geometry/magneticfield/src/G4ExactHelixStepper.cc
r850 r921 25 25 // 26 26 // 27 // $Id: G4ExactHelixStepper.cc,v 1. 8 2007/12/10 16:29:47 gunterExp $28 // GEANT4 tag $Name: HEAD$27 // $Id: G4ExactHelixStepper.cc,v 1.9 2008/10/29 14:34:35 gcosmo Exp $ 28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 29 // 30 30 // Helix a-la-Explicity Euler: x_1 = x_0 + helix(h) … … 112 112 { 113 113 // Implementation : must check whether h/R > pi !! 114 // If( h/R < pi) DistChord=h/2* tan(Ang_curve/4)114 // If( h/R < pi) DistChord=h/2*std::tan(Ang_curve/4) 115 115 // Else DistChord=R_helix 116 116 // -
trunk/source/geometry/magneticfield/src/G4ExplicitEuler.cc
r850 r921 26 26 // 27 27 // $Id: G4ExplicitEuler.cc,v 1.8 2006/06/29 18:23:53 gunter Exp $ 28 // GEANT4 tag $Name: HEAD$28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 29 // 30 30 // -
trunk/source/geometry/magneticfield/src/G4FieldManager.cc
r850 r921 26 26 // 27 27 // $Id: G4FieldManager.cc,v 1.15 2007/12/07 15:34:10 japost Exp $ 28 // GEANT4 tag $Name: HEAD$28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 29 // 30 30 // ------------------------------------------------------------------- -
trunk/source/geometry/magneticfield/src/G4FieldManagerStore.cc
r850 r921 26 26 // 27 27 // $Id: G4FieldManagerStore.cc,v 1.4 2008/01/17 10:56:23 gcosmo Exp $ 28 // GEANT4 tag $Name: HEAD$28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 29 // 30 30 // G4FieldManagerStore -
trunk/source/geometry/magneticfield/src/G4FieldTrack.cc
r850 r921 26 26 // 27 27 // $Id: G4FieldTrack.cc,v 1.14 2007/10/03 15:34:42 japost Exp $ 28 // GEANT4 tag $Name: HEAD$28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 29 // 30 30 // ------------------------------------------------------------------- -
trunk/source/geometry/magneticfield/src/G4HarmonicPolMagField.cc
r850 r921 26 26 // 27 27 // $Id: G4HarmonicPolMagField.cc,v 1.6 2006/06/29 18:24:00 gunter Exp $ 28 // GEANT4 tag $Name: HEAD$28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 29 // 30 30 // ------------------------------------------------------------------- -
trunk/source/geometry/magneticfield/src/G4HelixExplicitEuler.cc
r850 r921 26 26 // 27 27 // $Id: G4HelixExplicitEuler.cc,v 1.8 2007/12/10 16:29:49 gunter Exp $ 28 // GEANT4 tag $Name: HEAD$28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 29 // 30 30 // -
trunk/source/geometry/magneticfield/src/G4HelixHeum.cc
r850 r921 26 26 // 27 27 // $Id: G4HelixHeum.cc,v 1.6 2006/06/29 18:24:04 gunter Exp $ 28 // GEANT4 tag $Name: HEAD$28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 29 // 30 30 // -
trunk/source/geometry/magneticfield/src/G4HelixImplicitEuler.cc
r850 r921 26 26 // 27 27 // $Id: G4HelixImplicitEuler.cc,v 1.6 2006/06/29 18:24:06 gunter Exp $ 28 // GEANT4 tag $Name: HEAD$28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 29 // 30 30 // -
trunk/source/geometry/magneticfield/src/G4HelixSimpleRunge.cc
r850 r921 26 26 // 27 27 // $Id: G4HelixSimpleRunge.cc,v 1.7 2006/06/29 18:24:08 gunter Exp $ 28 // GEANT4 tag $Name: HEAD$28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 29 // 30 30 // -
trunk/source/geometry/magneticfield/src/G4ImplicitEuler.cc
r850 r921 26 26 // 27 27 // $Id: G4ImplicitEuler.cc,v 1.9 2006/06/29 18:24:11 gunter Exp $ 28 // GEANT4 tag $Name: HEAD$28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 29 // 30 30 // -
trunk/source/geometry/magneticfield/src/G4LineCurrentMagField.cc
r850 r921 25 25 // 26 26 // $Id: G4LineCurrentMagField.cc,v 1.6 2006/06/29 18:24:13 gunter Exp $ 27 // GEANT4 tag $Name: HEAD$27 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 28 28 // ------------------------------------------------------------------- 29 29 -
trunk/source/geometry/magneticfield/src/G4LineSection.cc
r850 r921 26 26 // 27 27 // $Id: G4LineSection.cc,v 1.10 2006/06/29 18:24:16 gunter Exp $ 28 // GEANT4 tag $Name: HEAD$28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 29 // 30 30 // -------------------------------------------------------------------- -
trunk/source/geometry/magneticfield/src/G4MagErrorStepper.cc
r850 r921 26 26 // 27 27 // $Id: G4MagErrorStepper.cc,v 1.13 2006/06/29 18:24:18 gunter Exp $ 28 // GEANT4 tag $Name: HEAD$28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 29 // 30 30 // -------------------------------------------------------------------- -
trunk/source/geometry/magneticfield/src/G4MagHelicalStepper.cc
r850 r921 26 26 // 27 27 // $Id: G4MagHelicalStepper.cc,v 1.23 2007/09/05 12:20:17 gcosmo Exp $ 28 // GEANT4 tag $Name: HEAD$28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 29 // 30 30 // -------------------------------------------------------------------- -
trunk/source/geometry/magneticfield/src/G4MagIntegratorDriver.cc
r850 r921 26 26 // 27 27 // $Id: G4MagIntegratorDriver.cc,v 1.49 2007/08/17 12:30:33 gcosmo Exp $ 28 // GEANT4 tag $Name: HEAD$28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 29 // 30 30 // -
trunk/source/geometry/magneticfield/src/G4MagIntegratorStepper.cc
r850 r921 26 26 // 27 27 // $Id: G4MagIntegratorStepper.cc,v 1.11 2006/06/29 18:24:34 gunter Exp $ 28 // GEANT4 tag $Name: HEAD$28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 29 // 30 30 // -------------------------------------------------------------------- -
trunk/source/geometry/magneticfield/src/G4Mag_EqRhs.cc
r850 r921 26 26 // 27 27 // $Id: G4Mag_EqRhs.cc,v 1.11 2006/06/29 18:24:36 gunter Exp $ 28 // GEANT4 tag $Name: HEAD$28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 29 // 30 30 // This is the standard right-hand side for equation of motion -
trunk/source/geometry/magneticfield/src/G4Mag_SpinEqRhs.cc
r850 r921 25 25 // 26 26 // 27 // $Id: G4Mag_SpinEqRhs.cc,v 1.1 2 2006/06/29 18:24:39 gunterExp $28 // GEANT4 tag $Name: HEAD$27 // $Id: G4Mag_SpinEqRhs.cc,v 1.13 2008/11/21 21:18:26 gum Exp $ 28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 29 // 30 30 // This is the standard right-hand side for equation of motion. … … 45 45 : G4Mag_EqRhs( MagField ) 46 46 { 47 anomaly = 1.165923e-3;47 anomaly = 0.0011659208; 48 48 } 49 49 … … 53 53 G4Mag_SpinEqRhs::SetChargeMomentumMass(G4double particleCharge, // in e+ units 54 54 G4double MomentumXc, 55 G4double mass)55 G4double particleMass) 56 56 { 57 57 // To set fCof_val 58 G4Mag_EqRhs::SetChargeMomentumMass(particleCharge, MomentumXc, mass);58 G4Mag_EqRhs::SetChargeMomentumMass(particleCharge, MomentumXc, particleMass); 59 59 60 omegac = 0.105658387*GeV/ mass * 2.837374841e-3*(rad/cm/kilogauss);60 omegac = 0.105658387*GeV/particleMass * 2.837374841e-3*(rad/cm/kilogauss); 61 61 62 62 ParticleCharge = particleCharge; 63 63 64 E = std::sqrt(sqr(MomentumXc)+sqr( mass));64 E = std::sqrt(sqr(MomentumXc)+sqr(particleMass)); 65 65 beta = MomentumXc/E; 66 gamma = E/ mass;66 gamma = E/particleMass; 67 67 68 68 } … … 96 96 97 97 G4ThreeVector Spin(y[9],y[10],y[11]); 98 99 if (Spin.mag() > 0.) Spin = Spin.unit(); 100 98 101 G4ThreeVector dSpin; 99 102 -
trunk/source/geometry/magneticfield/src/G4Mag_UsualEqRhs.cc
r850 r921 26 26 // 27 27 // $Id: G4Mag_UsualEqRhs.cc,v 1.12 2006/06/29 18:24:42 gunter Exp $ 28 // GEANT4 tag $Name: HEAD$28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 29 // 30 30 // -
trunk/source/geometry/magneticfield/src/G4MagneticField.cc
r850 r921 26 26 // 27 27 // $Id: G4MagneticField.cc,v 1.3 2006/06/29 18:24:44 gunter Exp $ 28 // GEANT4 tag $Name: HEAD$28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 29 // 30 30 // -------------------------------------------------------------------- -
trunk/source/geometry/magneticfield/src/G4QuadrupoleMagField.cc
r850 r921 26 26 // 27 27 // $Id: G4QuadrupoleMagField.cc,v 1.4 2006/06/29 18:24:46 gunter Exp $ 28 // GEANT4 tag $Name: HEAD$28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 29 // 30 30 // ------------------------------------------------------------------- -
trunk/source/geometry/magneticfield/src/G4RKG3_Stepper.cc
r850 r921 26 26 // 27 27 // $Id: G4RKG3_Stepper.cc,v 1.15 2007/08/21 10:17:41 tnikitin Exp $ 28 // GEANT4 tag $Name: HEAD$28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 29 // 30 30 // ------------------------------------------------------------------- -
trunk/source/geometry/magneticfield/src/G4SimpleHeum.cc
r850 r921 26 26 // 27 27 // $Id: G4SimpleHeum.cc,v 1.8 2006/06/29 18:24:51 gunter Exp $ 28 // GEANT4 tag $Name: HEAD$28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 29 // 30 30 // Simple Heum: -
trunk/source/geometry/magneticfield/src/G4SimpleRunge.cc
r850 r921 26 26 // 27 27 // $Id: G4SimpleRunge.cc,v 1.10 2006/06/29 18:24:53 gunter Exp $ 28 // GEANT4 tag $Name: HEAD$28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 29 // 30 30 // Simple Runge: -
trunk/source/geometry/magneticfield/src/G4UniformElectricField.cc
r850 r921 26 26 // 27 27 // $Id: G4UniformElectricField.cc,v 1.12 2006/06/29 18:24:56 gunter Exp $ 28 // GEANT4 tag $Name: HEAD$28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 29 // 30 30 // -
trunk/source/geometry/magneticfield/src/G4UniformMagField.cc
r850 r921 26 26 // 27 27 // $Id: G4UniformMagField.cc,v 1.11 2006/06/29 18:24:58 gunter Exp $ 28 // GEANT4 tag $Name: HEAD$28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 29 // 30 30 // -
trunk/source/geometry/management/History
r850 r921 1 $Id: History,v 1.1 28 2008/07/15 10:27:55 gcosmo Exp $1 $Id: History,v 1.131 2008/09/23 13:10:55 gcosmo Exp $ 2 2 ------------------------------------------------------------------- 3 3 … … 17 17 * Reverse chronological order (last date on top), please * 18 18 ---------------------------------------------------------- 19 20 September 23, 2008 G. Cosmo geommng-V09-01-08 21 - G4VSolid: explicitely reserve memory for polygon vectors in clipping 22 algorithm to help reducing memory footprint. Courtesy of P.Elmer, CMS. 23 24 September 10, 2008 G. Cosmo geommng-V09-01-07 25 - G4VSolid: promote copy-constructor and assignment operator to public 26 to cope with specific use-case in ATLAS (see problem report #1023). 19 27 20 28 July 15, 2008 G.Cosmo geommng-V09-01-06 -
trunk/source/geometry/management/include/G4VSolid.hh
r850 r921 25 25 // 26 26 // 27 // $Id: G4VSolid.hh,v 1.2 8 2008/02/20 15:24:25gcosmo Exp $28 // GEANT4 tag $Name: HEAD$27 // $Id: G4VSolid.hh,v 1.29 2008/09/10 13:18:42 gcosmo Exp $ 28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 29 // 30 30 // … … 230 230 // persistifiable objects. 231 231 232 G4VSolid(const G4VSolid& rhs); 233 G4VSolid& operator=(const G4VSolid& rhs); 234 // Copy constructor and assignment operator. 235 232 236 protected: // with description 233 237 … … 294 298 // expressed by the first argument. 295 299 296 protected: // without description297 298 G4VSolid(const G4VSolid& rhs);299 G4VSolid& operator=(const G4VSolid& rhs);300 // Protected copy constructor and assignment operator.301 302 300 protected: 303 301 -
trunk/source/geometry/management/src/G4VSolid.cc
r850 r921 25 25 // 26 26 // 27 // $Id: G4VSolid.cc,v 1.3 7 2008/02/20 15:24:26gcosmo Exp $28 // GEANT4 tag $Name: HEAD$27 // $Id: G4VSolid.cc,v 1.39 2008/09/23 13:07:41 gcosmo Exp $ 28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 29 // 30 30 // class G4VSolid … … 71 71 ////////////////////////////////////////////////////////////////////////// 72 72 // 73 // Protected copy constructor73 // Copy constructor 74 74 // 75 75 … … 181 181 182 182 G4ThreeVectorList polygon; 183 polygon.reserve(4); 183 184 polygon.push_back((*pVertices)[pSectionIndex]); 184 185 polygon.push_back((*pVertices)[pSectionIndex+1]); … … 210 211 { 211 212 G4ThreeVectorList polygon; 213 polygon.reserve(4); 212 214 polygon.push_back((*pVertices)[pSectionIndex]); 213 215 polygon.push_back((*pVertices)[pSectionIndex+4]); -
trunk/source/geometry/navigation/History
r850 r921 1 $Id: History,v 1.1 19 2008/04/29 15:33:05gcosmo Exp $1 $Id: History,v 1.125 2008/11/14 18:26:53 gcosmo Exp $ 2 2 ------------------------------------------------------------------- 3 3 … … 17 17 * Reverse chronological order (last date on top), please * 18 18 ---------------------------------------------------------- 19 20 November 14th, 2008 - T.Nikitina, J.Apostolakis (geomnav-V09-01-09) 21 ----------------------------------------------- 22 - Introduced first implementation of new optional method in locator classes 23 AdjustementOfFoundIntersection() using surface-normal of the intersecting 24 solid to boost accuracy. Added the optional call to the new method in each 25 concrete locator. 26 - Removed unnecessary accessors for Brent locator in G4PropagatorInField. 27 - G4VoxelNavigation: implemented additional check when running in "check" 28 mode; if it is on the surface, ensure that it can move on next step; 29 either DistanceToIn(p,v) or DistanceToOut(p,v) should return a finite 30 value greater than the tolerance. 31 32 November 10th, 2008 - G.Cosmo (geomnav-V09-01-08) 33 ----------------------------- 34 - G4PathFinder: cleared unecessary calls to ComputeSafety() in ReLocate(). 35 36 October 28th, 2008 - T.Nikitina (geomnav-V09-01-07) 37 ------------------------------- 38 - Moved method LocateIntersectionPoint() in G4PropagatorInField to a separate 39 class G4VIntersectionLocator, now allowing to use different location 40 algorithms: Brent, MultiLevel, Simple. 41 - New classes: G4VIntersectionLocator, G4SimpleLocator, G4BrentLocator and 42 G4MultiLevelLocator. 43 - Coworks with tag "field-V09-01-03". 44 45 October 10th, 2008 - G.Cosmo (geomnav-V09-01-06) 46 ---------------------------- 47 - Introduced optional Boolean argument in G4Navigator::ComputeSafety() to 48 allow for computation of safety without modifying the state restoring of 49 the navigator. 50 - Modified accordingly the following classes, for calls to ComputeSafety(): 51 G4SafetyHelper, G4PathFinder (now calling ComputeSafety() with TRUE 52 argument to preserve navigator's state), G4MultiNavigator and 53 G4ErrorPropagationNavigator. 54 55 May 5th, 2008 - T.Nikitina (geomnav-V09-01-05) 56 -------------------------- 57 - Added Brent method for LocateIntersectionPoint() in G4PropagatorInField. 58 The Brent method is now used as default and can be switched off through 59 call to the proper accessor function SetBrentMethod(). 60 - Requires related update to G4ChordFinder in geometry/magneticfield module 61 included in tag "field-V09-01-02". 19 62 20 63 April 29th, 2008 - M.Asai (geomnav-V09-01-04) -
trunk/source/geometry/navigation/include/G4AuxiliaryNavServices.hh
r850 r921 26 26 // 27 27 // $Id: G4AuxiliaryNavServices.hh,v 1.4 2007/05/22 07:48:08 gcosmo Exp $ 28 // GEANT4 tag $Name: HEAD$28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 29 // 30 30 // -
trunk/source/geometry/navigation/include/G4AuxiliaryNavServices.icc
r850 r921 26 26 // 27 27 // $Id: G4AuxiliaryNavServices.icc,v 1.4 2007/05/22 07:48:08 gcosmo Exp $ 28 // GEANT4 tag $Name: HEAD$28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 29 // 30 30 // -
trunk/source/geometry/navigation/include/G4DrawVoxels.hh
r850 r921 26 26 // 27 27 // $Id: G4DrawVoxels.hh,v 1.3 2006/06/29 18:35:36 gunter Exp $ 28 // GEANT4 tag $Name: HEAD$28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 29 // 30 30 // -
trunk/source/geometry/navigation/include/G4ErrorPropagationNavigator.hh
r850 r921 25 25 // 26 26 // 27 // $Id: G4ErrorPropagationNavigator.hh,v 1. 1 2007/05/16 12:49:18gcosmo Exp $28 // GEANT4 tag $Name: HEAD$27 // $Id: G4ErrorPropagationNavigator.hh,v 1.2 2008/10/24 14:00:03 gcosmo Exp $ 28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 29 // 30 30 // … … 64 64 65 65 G4double ComputeSafety(const G4ThreeVector &globalpoint, 66 const G4double pProposedMaxLength = DBL_MAX); 66 const G4double pProposedMaxLength = DBL_MAX, 67 const G4bool keepState = false); 67 68 // Calls the navigation in the detector geometry and then checks 68 69 // if the distance to surface is smaller than the proposed safety -
trunk/source/geometry/navigation/include/G4GeomTestErrorList.hh
r850 r921 26 26 // 27 27 // $Id: G4GeomTestErrorList.hh,v 1.3 2006/06/29 18:35:38 gunter Exp $ 28 // GEANT4 tag $Name: HEAD$28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 29 // 30 30 // -------------------------------------------------------------------- -
trunk/source/geometry/navigation/include/G4GeomTestLogger.hh
r850 r921 26 26 // 27 27 // $Id: G4GeomTestLogger.hh,v 1.3 2006/06/29 18:35:40 gunter Exp $ 28 // GEANT4 tag $Name: HEAD$28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 29 // 30 30 // -------------------------------------------------------------------- -
trunk/source/geometry/navigation/include/G4GeomTestOverlapList.hh
r850 r921 26 26 // 27 27 // $Id: G4GeomTestOverlapList.hh,v 1.3 2006/06/29 18:35:43 gunter Exp $ 28 // GEANT4 tag $Name: HEAD$28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 29 // 30 30 // -------------------------------------------------------------------- -
trunk/source/geometry/navigation/include/G4GeomTestOvershootList.hh
r850 r921 26 26 // 27 27 // $Id: G4GeomTestOvershootList.hh,v 1.3 2006/06/29 18:35:45 gunter Exp $ 28 // GEANT4 tag $Name: HEAD$28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 29 // 30 30 // -------------------------------------------------------------------- -
trunk/source/geometry/navigation/include/G4GeomTestPoint.hh
r850 r921 26 26 // 27 27 // $Id: G4GeomTestPoint.hh,v 1.3 2006/06/29 18:35:48 gunter Exp $ 28 // GEANT4 tag $Name: HEAD$28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 29 // 30 30 // -------------------------------------------------------------------- -
trunk/source/geometry/navigation/include/G4GeomTestSegment.hh
r850 r921 26 26 // 27 27 // $Id: G4GeomTestSegment.hh,v 1.4 2007/05/11 13:43:59 gcosmo Exp $ 28 // GEANT4 tag $Name: HEAD$28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 29 // 30 30 // -------------------------------------------------------------------- -
trunk/source/geometry/navigation/include/G4GeomTestStreamLogger.hh
r850 r921 26 26 // 27 27 // $Id: G4GeomTestStreamLogger.hh,v 1.3 2006/06/29 18:35:52 gunter Exp $ 28 // GEANT4 tag $Name: HEAD$28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 29 // 30 30 // -------------------------------------------------------------------- -
trunk/source/geometry/navigation/include/G4GeomTestVolPoint.hh
r850 r921 26 26 // 27 27 // $Id: G4GeomTestVolPoint.hh,v 1.3 2006/06/29 18:35:55 gunter Exp $ 28 // GEANT4 tag $Name: HEAD$28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 29 // 30 30 // -------------------------------------------------------------------- -
trunk/source/geometry/navigation/include/G4GeomTestVolume.hh
r850 r921 26 26 // 27 27 // $Id: G4GeomTestVolume.hh,v 1.3 2006/06/29 18:35:57 gunter Exp $ 28 // GEANT4 tag $Name: HEAD$28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 29 // 30 30 // -------------------------------------------------------------------- -
trunk/source/geometry/navigation/include/G4GeometryMessenger.hh
r850 r921 26 26 // 27 27 // $Id: G4GeometryMessenger.hh,v 1.4 2006/06/29 18:35:59 gunter Exp $ 28 // GEANT4 tag $Name: HEAD$28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 29 // 30 30 // -------------------------------------------------------------------- -
trunk/source/geometry/navigation/include/G4MultiNavigator.hh
r850 r921 25 25 // 26 26 // 27 // $Id: G4MultiNavigator.hh,v 1. 4 2007/05/21 15:36:25gcosmo Exp $28 // GEANT4 tag $Name: HEAD$27 // $Id: G4MultiNavigator.hh,v 1.5 2008/10/24 14:00:03 gcosmo Exp $ 28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 29 // 30 30 // … … 113 113 114 114 G4double ComputeSafety(const G4ThreeVector &globalpoint, 115 const G4double pProposedMaxLength = DBL_MAX); 115 const G4double pProposedMaxLength = DBL_MAX, 116 const G4bool keepState = false); 116 117 // Calculate the isotropic distance to the nearest boundary 117 118 // in any geometry from the specified point in the global coordinate -
trunk/source/geometry/navigation/include/G4Navigator.hh
r850 r921 25 25 // 26 26 // 27 // $Id: G4Navigator.hh,v 1.2 6 2007/10/18 14:18:36gcosmo Exp $28 // GEANT4 tag $Name: HEAD$27 // $Id: G4Navigator.hh,v 1.27 2008/10/24 14:00:03 gcosmo Exp $ 28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 29 // 30 30 // … … 181 181 182 182 virtual G4double ComputeSafety(const G4ThreeVector &globalpoint, 183 const G4double pProposedMaxLength = DBL_MAX); 183 const G4double pProposedMaxLength = DBL_MAX, 184 const G4bool keepState = false); 184 185 // Calculate the isotropic distance to the nearest boundary from the 185 186 // specified point in the global coordinate system. -
trunk/source/geometry/navigation/include/G4Navigator.icc
r850 r921 26 26 // 27 27 // $Id: G4Navigator.icc,v 1.15 2007/10/18 14:18:36 gcosmo Exp $ 28 // GEANT4 tag $Name: HEAD$28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 29 // 30 30 // -
trunk/source/geometry/navigation/include/G4NormalNavigation.hh
r850 r921 26 26 // 27 27 // $Id: G4NormalNavigation.hh,v 1.4 2006/06/29 18:36:06 gunter Exp $ 28 // GEANT4 tag $Name: HEAD$28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 29 // 30 30 // -
trunk/source/geometry/navigation/include/G4NormalNavigation.icc
r850 r921 26 26 // 27 27 // $Id: G4NormalNavigation.icc,v 1.4 2006/06/29 18:36:08 gunter Exp $ 28 // GEANT4 tag $Name: HEAD$28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 29 // 30 30 // -
trunk/source/geometry/navigation/include/G4ParameterisedNavigation.hh
r850 r921 26 26 // 27 27 // $Id: G4ParameterisedNavigation.hh,v 1.6 2007/11/09 16:06:02 gcosmo Exp $ 28 // GEANT4 tag $Name: HEAD$28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 29 // 30 30 // -
trunk/source/geometry/navigation/include/G4ParameterisedNavigation.icc
r850 r921 26 26 // 27 27 // $Id: G4ParameterisedNavigation.icc,v 1.7 2007/11/09 16:06:02 gcosmo Exp $ 28 // GEANT4 tag $Name: HEAD$28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 29 // 30 30 // -
trunk/source/geometry/navigation/include/G4PathFinder.hh
r850 r921 25 25 // 26 26 // $Id: G4PathFinder.hh,v 1.34 2007/11/02 12:28:31 japost Exp $ 27 // GEANT4 tag $Name: HEAD$27 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 28 28 // 29 29 // class G4PathFinder -
trunk/source/geometry/navigation/include/G4PhantomParameterisation.hh
r850 r921 26 26 // 27 27 // $Id: G4PhantomParameterisation.hh,v 1.4 2008/01/22 15:02:36 gcosmo Exp $ 28 // GEANT4 tag $Name: HEAD$28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 29 // 30 30 // -
trunk/source/geometry/navigation/include/G4PhantomParameterisation.icc
r850 r921 26 26 // 27 27 // $Id: G4PhantomParameterisation.icc,v 1.1 2007/10/17 19:13:58 arce Exp $ 28 // GEANT4 tag $Name: HEAD$28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 29 // 30 30 //-------------------------------------------------------------------- -
trunk/source/geometry/navigation/include/G4PropagatorInField.hh
r850 r921 24 24 // ******************************************************************** 25 25 // 26 //27 // $Id: G4PropagatorInField.hh,v 1.14 2008/05/28 09:11:59 tnikitin Exp $28 // GEANT4 tag $Name: HEAD $29 26 // 30 // class G4PropagatorInField 31 // 32 // Class description: 27 // $Id: G4PropagatorInField.hh,v 1.17 2008/11/13 14:28:56 tnikitin Exp $ 28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 // 30 // 31 // Class G4PropagatorInField 32 // 33 // class description: 33 34 // 34 35 // This class performs the navigation/propagation of a particle/track … … 36 37 // For the calculation of the path, it relies on the class G4ChordFinder. 37 38 // 38 // Key Method: 39 // ComputeStep(..) 39 // Key Method: ComputeStep(..) 40 40 41 // History: 41 42 // ------- … … 54 55 #include "G4FieldTrack.hh" 55 56 #include "G4FieldManager.hh" 57 #include "G4VIntersectionLocator.hh" 58 56 59 class G4ChordFinder; 57 60 … … 66 69 67 70 G4PropagatorInField( G4Navigator *theNavigator, 68 G4FieldManager *detectorFieldMgr ); 71 G4FieldManager *detectorFieldMgr, 72 G4VIntersectionLocator *vLocator=0 ); 69 73 ~G4PropagatorInField(); 70 74 … … 116 120 inline G4FieldTrack GetEndState() const; 117 121 118 // The following methods are now obsolescent but *for now* will work 119 // They are being replaced by same-name methods in G4FieldManager, 120 // allowing the specialisation in different volumes. 121 // Their new behaviour is to change the values for the global field manager. 122 inline G4double GetMinimumEpsilonStep() const; 123 inline void SetMinimumEpsilonStep( G4double newEpsMin ); 124 // Minimum for Relative accuracy of any Step 125 122 inline G4double GetMinimumEpsilonStep() const; // Min for relative accuracy 123 inline void SetMinimumEpsilonStep( G4double newEpsMin ); // of any step 126 124 inline G4double GetMaximumEpsilonStep() const; 127 125 inline void SetMaximumEpsilonStep( G4double newEpsMax ); 128 129 126 inline void SetLargestAcceptableStep( G4double newBigDist ); 130 127 inline G4double GetLargestAcceptableStep(); 128 // The 6 above methods are now obsolescent but *for now* will work 129 // They are being replaced by same-name methods in G4FieldManager, 130 // allowing the specialisation in different volumes. 131 // Their new behaviour is to change the values for the global field 132 // manager 133 134 void SetTrajectoryFilter(G4VCurvedTrajectoryFilter* filter); 135 // Set the filter that examines & stores 'intermediate' 136 // curved trajectory points. Currently only position is stored. 137 138 std::vector<G4ThreeVector>* GimmeTrajectoryVectorAndForgetIt() const; 139 // Access the points which have passed by the filter. 140 // Responsibility for deleting the points lies with the client. 141 // This method MUST BE called exactly ONCE per step. 142 143 void ClearPropagatorState(); 144 // Clear all the State of this class and its current associates 145 // --> the current field manager & chord finder will also be called 146 147 inline void SetDetectorFieldManager( G4FieldManager* newGlobalFieldManager ); 148 // Update this (dangerous) state -- for the time being 131 149 132 // Use alternative Locator(based on Brent Method,second order Intersection) 133 inline void SetBrentMethod(G4bool newLocator); 134 inline G4bool GetBrentMethod(); 135 136 public: // with description 137 138 // The following methods are obsolete and will not work -- 139 // as they have been replaced by the same methods in G4FieldManager 140 // since Geant4 4.0 150 inline void SetUseSafetyForOptimization( G4bool ); 151 inline G4bool GetUseSafetyForOptimization(); 152 // Toggle & view parameter for using safety to discard 153 // unneccesary calls to navigator (thus 'optimising' performance) 154 inline G4bool IntersectChord( G4ThreeVector StartPointA, 155 G4ThreeVector EndPointB, 156 G4double &NewSafety, 157 G4double &LinearStepLength, 158 G4ThreeVector &IntersectionPoint); 159 // Intersect the chord from StartPointA to EndPointB 160 // and return whether an intersection occurred 161 // NOTE : SAFETY IS CHANGED 162 163 inline G4VIntersectionLocator* GetIntersectionLocator(); 164 inline void SetIntersectionLocator(G4VIntersectionLocator *pLocator ); 165 166 public: // without description 167 141 168 inline G4double GetDeltaIntersection() const; 142 169 inline G4double GetDeltaOneStep() const; … … 144 171 inline void SetDeltaIntersection( G4double deltaIntersection ); 145 172 inline void SetDeltaOneStep( G4double deltaOneStep ); 146 147 public: // without description173 // The above 5 methods are obsolete and will not work, as they have been 174 // replaced by the same methods in G4FieldManager since Geant4 4.0 ... 148 175 149 176 inline G4FieldManager* GetCurrentFieldManager(); 150 177 inline void SetNavigatorForPropagating( G4Navigator *SimpleOrMultiNavigator ); 151 178 inline G4Navigator* GetNavigatorForPropagating(); 152 153 public: // no description154 179 155 180 inline void SetThresholdNoZeroStep( G4int noAct, … … 158 183 inline G4int GetThresholdNoZeroSteps( G4int i ); 159 184 160 public: // with description161 //162 void SetTrajectoryFilter(G4VCurvedTrajectoryFilter* filter);163 // Set the filter that examines & stores 'intermediate'164 // curved trajectory points. Currently only position is stored.165 166 std::vector<G4ThreeVector>* GimmeTrajectoryVectorAndForgetIt() const;167 // Access the points which have passed by the filter.168 // Responsibility for deleting the points lies with the client.169 // This method MUST BE called exactly ONCE per step.170 171 void ClearPropagatorState();172 // Clear all the State of this class and its current associates173 // --> the current field manager & chord finder will also be called174 175 inline void SetDetectorFieldManager( G4FieldManager* newGlobalFieldManager );176 // Update this (dangerous) state -- for the time being177 178 inline void SetUseSafetyForOptimization( G4bool );179 inline G4bool GetUseSafetyForOptimization();180 // Toggle & view parameter for using safety to discard181 // unneccesary calls to navigator (thus 'optimising' performance)182 183 185 protected: // with description 184 185 G4bool LocateIntersectionPoint(186 const G4FieldTrack& curveStartPointTangent, // A187 const G4FieldTrack& curveEndPointTangent, // B188 const G4ThreeVector& trialPoint, // E189 G4FieldTrack& intersectPointTangent, // Output190 G4bool& recalculatedEndPoint); // Out:191 192 // If such an intersection exists, this function193 // calculate the intersection point of the true path of the particle194 // with the surface of the current volume (or of one of its daughters).195 // (Should use lateral displacement as measure of convergence).196 197 G4bool IntersectChord( G4ThreeVector StartPointA,198 G4ThreeVector EndPointB,199 G4double &NewSafety,200 G4double &LinearStepLength,201 G4ThreeVector &IntersectionPoint);202 // Intersect the chord from StartPointA to EndPointB203 // and return whether an intersection occurred204 205 G4FieldTrack ReEstimateEndpoint( const G4FieldTrack &CurrentStateA,206 const G4FieldTrack &EstimtdEndStateB,207 G4double linearDistSq,208 G4double curveDist);209 // Return new estimate for state after curveDist210 // starting from CurrentStateA, to replace EstimtdEndStateB,211 // (and report displacement -- if field is compiled verbose.)212 186 213 187 void PrintStepLengthDiagnostic( G4double currentProposedStepLength, … … 217 191 private: 218 192 219 // ----------------------------------------------------------------------220 // DATA Members221 // ----------------------------------------------------------------------193 // ---------------------------------------------------------------------- 194 // DATA Members 195 // ---------------------------------------------------------------------- 222 196 223 197 G4FieldManager *fDetectorFieldMgr; … … 228 202 229 203 G4Navigator *fNavigator; 230 204 231 205 // STATE information 232 206 // ----------------- … … 270 244 // Geometrical tolerance defining surface thickness 271 245 272 G4int maxNumberOfStepsForIntersection; 273 G4int maxNumberOfCallsToReIntegration; 274 G4int maxNumberOfCallsToReIntegration_depth; 275 // Counters for Statistics about Location and ReIntegrations 276 private: 277 278 static const G4int max_depth=4; 279 G4FieldTrack* ptrInterMedFT[max_depth+1]; 280 // Used to store intermediate values of tracks in case of 281 // too slow progress 282 private: 283 G4bool fUseBrentLocator; 284 285 private: 286 287 G4VCurvedTrajectoryFilter* fpTrajectoryFilter; 288 // The filter encapsulates the algorithm which selects which 289 // intermediate points should be stored in a trajectory. 290 // When it is NULL, no intermediate points will be stored. 291 // Else PIF::ComputeStep must submit (all) intermediate 292 // points it calculates, to this filter. (jacek 04/11/2002) 246 G4VIntersectionLocator *fIntersectionLocator; 247 G4bool fAllocatedLocator; 248 // Used to Intersection Locator 249 250 private: 251 252 G4VCurvedTrajectoryFilter* fpTrajectoryFilter; 253 // The filter encapsulates the algorithm which selects which 254 // intermediate points should be stored in a trajectory. 255 // When it is NULL, no intermediate points will be stored. 256 // Else PIF::ComputeStep must submit (all) intermediate 257 // points it calculates, to this filter. (jacek 04/11/2002) 293 258 }; 294 259 -
trunk/source/geometry/navigation/include/G4PropagatorInField.icc
r850 r921 25 25 // 26 26 // 27 // $Id: G4PropagatorInField.icc,v 1.1 1 2008/05/28 09:12:05 tnikitinExp $28 // GEANT4 tag $Name: HEAD$27 // $Id: G4PropagatorInField.icc,v 1.13 2008/10/29 14:31:55 gcosmo Exp $ 28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 29 // 30 30 // … … 268 268 } 269 269 270 inline 271 void G4PropagatorInField::SetBrentMethod(G4bool newLocator) 272 { 273 fUseBrentLocator=newLocator; 274 } 275 inline 276 G4bool G4PropagatorInField::GetBrentMethod() 277 { 278 return fUseBrentLocator; 279 } 270 inline 271 void G4PropagatorInField:: 272 SetIntersectionLocator( G4VIntersectionLocator *pIntLoc ) 273 { 274 if(pIntLoc) { fIntersectionLocator= pIntLoc; } 275 } 276 277 inline 278 G4VIntersectionLocator* G4PropagatorInField::GetIntersectionLocator() 279 { 280 return fIntersectionLocator; 281 } 282 283 inline 284 G4bool G4PropagatorInField::IntersectChord( G4ThreeVector StartPointA, 285 G4ThreeVector EndPointB, 286 G4double &NewSafety, 287 G4double &LinearStepLength, 288 G4ThreeVector &IntersectionPoint ) 289 { 290 // Calculate the direction and length of the chord AB 291 // 292 return fIntersectionLocator 293 ->IntersectChord(StartPointA,EndPointB,NewSafety, 294 fPreviousSafety,fPreviousSftOrigin, 295 LinearStepLength,IntersectionPoint); 296 } -
trunk/source/geometry/navigation/include/G4RegularNavigation.hh
r850 r921 26 26 // 27 27 // $Id: G4RegularNavigation.hh,v 1.2 2007/10/18 14:18:36 gcosmo Exp $ 28 // GEANT4 tag $Name: HEAD$28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 29 // 30 30 // -
trunk/source/geometry/navigation/include/G4ReplicaNavigation.hh
r850 r921 26 26 // 27 27 // $Id: G4ReplicaNavigation.hh,v 1.6 2007/05/18 07:31:09 gcosmo Exp $ 28 // GEANT4 tag $Name: HEAD$28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 29 // 30 30 // -
trunk/source/geometry/navigation/include/G4ReplicaNavigation.icc
r850 r921 26 26 // 27 27 // $Id: G4ReplicaNavigation.icc,v 1.5 2006/06/29 18:36:22 gunter Exp $ 28 // GEANT4 tag $Name: HEAD$28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 29 // 30 30 // -
trunk/source/geometry/navigation/include/G4SafetyHelper.hh
r850 r921 26 26 // 27 27 // $Id: G4SafetyHelper.hh,v 1.7 2007/05/02 15:32:13 japost Exp $ 28 // GEANT4 tag $Name: HEAD$28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 29 // 30 30 // -
trunk/source/geometry/navigation/include/G4TransportationManager.hh
r850 r921 26 26 // 27 27 // $Id: G4TransportationManager.hh,v 1.12 2007/04/20 15:28:37 gcosmo Exp $ 28 // GEANT4 tag $Name: HEAD$28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 29 // 30 30 // class G4TransportationManager -
trunk/source/geometry/navigation/include/G4TransportationManager.icc
r850 r921 26 26 // 27 27 // $Id: G4TransportationManager.icc,v 1.10 2007/04/20 15:28:37 gcosmo Exp $ 28 // GEANT4 tag $Name: HEAD$28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 29 // ------------------------------------------------------------ 30 30 // GEANT 4 inlined function members implementation -
trunk/source/geometry/navigation/include/G4VoxelNavigation.hh
r850 r921 26 26 // 27 27 // $Id: G4VoxelNavigation.hh,v 1.5 2007/05/11 13:43:59 gcosmo Exp $ 28 // GEANT4 tag $Name: HEAD$28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 29 // 30 30 // -
trunk/source/geometry/navigation/include/G4VoxelNavigation.icc
r850 r921 26 26 // 27 27 // $Id: G4VoxelNavigation.icc,v 1.4 2006/06/29 18:36:30 gunter Exp $ 28 // GEANT4 tag $Name: HEAD$28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 29 // 30 30 // -
trunk/source/geometry/navigation/src/G4AuxiliaryNavServices.cc
r850 r921 25 25 // 26 26 // $Id: G4AuxiliaryNavServices.cc,v 1.3 2006/06/29 18:36:32 gunter Exp $ 27 // GEANT4 tag $Name: HEAD$27 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 28 28 // 29 29 // -------------------------------------------------------------------- -
trunk/source/geometry/navigation/src/G4DrawVoxels.cc
r850 r921 26 26 // 27 27 // $Id: G4DrawVoxels.cc,v 1.4 2006/06/29 18:36:34 gunter Exp $ 28 // GEANT4 tag $Name: HEAD$28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 29 // 30 30 // -
trunk/source/geometry/navigation/src/G4ErrorPropagationNavigator.cc
r850 r921 25 25 // 26 26 // 27 // $Id: G4ErrorPropagationNavigator.cc,v 1. 1 2007/05/16 12:49:18gcosmo Exp $28 // GEANT4 tag $Name: HEAD$27 // $Id: G4ErrorPropagationNavigator.cc,v 1.2 2008/10/24 14:00:03 gcosmo Exp $ 28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 29 // 30 30 // … … 126 126 G4double G4ErrorPropagationNavigator:: 127 127 ComputeSafety( const G4ThreeVector &pGlobalpoint, 128 const G4double pMaxLength ) 128 const G4double pMaxLength, 129 const G4bool keepState ) 129 130 { 130 G4double newSafety = G4Navigator::ComputeSafety(pGlobalpoint, pMaxLength); 131 G4double newSafety = G4Navigator::ComputeSafety(pGlobalpoint, 132 pMaxLength, keepState); 131 133 132 134 G4ErrorPropagatorData *g4edata -
trunk/source/geometry/navigation/src/G4GeomTestErrorList.cc
r850 r921 26 26 // 27 27 // $Id: G4GeomTestErrorList.cc,v 1.3 2006/06/29 18:36:36 gunter Exp $ 28 // GEANT4 tag $Name: HEAD$28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 29 // 30 30 // -------------------------------------------------------------------- -
trunk/source/geometry/navigation/src/G4GeomTestOverlapList.cc
r850 r921 26 26 // 27 27 // $Id: G4GeomTestOverlapList.cc,v 1.3 2006/06/29 18:36:39 gunter Exp $ 28 // GEANT4 tag $Name: HEAD$28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 29 // 30 30 // -------------------------------------------------------------------- -
trunk/source/geometry/navigation/src/G4GeomTestOvershootList.cc
r850 r921 26 26 // 27 27 // $Id: G4GeomTestOvershootList.cc,v 1.3 2006/06/29 18:36:41 gunter Exp $ 28 // GEANT4 tag $Name: HEAD$28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 29 // 30 30 // -------------------------------------------------------------------- -
trunk/source/geometry/navigation/src/G4GeomTestPoint.cc
r850 r921 26 26 // 27 27 // $Id: G4GeomTestPoint.cc,v 1.3 2006/06/29 18:36:44 gunter Exp $ 28 // GEANT4 tag $Name: HEAD$28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 29 // 30 30 // -------------------------------------------------------------------- -
trunk/source/geometry/navigation/src/G4GeomTestSegment.cc
r850 r921 26 26 // 27 27 // $Id: G4GeomTestSegment.cc,v 1.11 2007/11/16 09:39:14 gcosmo Exp $ 28 // GEANT4 tag $Name: HEAD$28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 29 // 30 30 // -------------------------------------------------------------------- -
trunk/source/geometry/navigation/src/G4GeomTestStreamLogger.cc
r850 r921 26 26 // 27 27 // $Id: G4GeomTestStreamLogger.cc,v 1.3 2006/06/29 18:36:49 gunter Exp $ 28 // GEANT4 tag $Name: HEAD$28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 29 // 30 30 // -------------------------------------------------------------------- -
trunk/source/geometry/navigation/src/G4GeomTestVolPoint.cc
r850 r921 26 26 // 27 27 // $Id: G4GeomTestVolPoint.cc,v 1.3 2006/06/29 18:36:52 gunter Exp $ 28 // GEANT4 tag $Name: HEAD$28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 29 // 30 30 // -------------------------------------------------------------------- -
trunk/source/geometry/navigation/src/G4GeomTestVolume.cc
r850 r921 26 26 // 27 27 // $Id: G4GeomTestVolume.cc,v 1.6 2007/11/16 09:39:14 gcosmo Exp $ 28 // GEANT4 tag $Name: HEAD$28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 29 // 30 30 // -------------------------------------------------------------------- -
trunk/source/geometry/navigation/src/G4GeometryMessenger.cc
r850 r921 26 26 // 27 27 // $Id: G4GeometryMessenger.cc,v 1.5 2006/06/29 18:36:57 gunter Exp $ 28 // GEANT4 tag $Name: HEAD$28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 29 // 30 30 // -------------------------------------------------------------------- -
trunk/source/geometry/navigation/src/G4MultiNavigator.cc
r831 r921 25 25 // 26 26 // 27 // $Id: G4MultiNavigator.cc,v 1. 7 2007/11/02 13:48:43 japostExp $27 // $Id: G4MultiNavigator.cc,v 1.8 2008/10/24 14:00:03 gcosmo Exp $ 28 28 // GEANT4 tag $ Name: $ 29 29 // … … 423 423 424 424 G4double G4MultiNavigator::ComputeSafety( const G4ThreeVector& position, 425 G4double maxDistance) 425 const G4double maxDistance, 426 const G4bool state) 426 427 { 427 428 // Recompute safety for the relevant point … … 434 435 for( register int num=0; num< fNoActiveNavigators; ++pNavigatorIter,++num ) 435 436 { 436 safety = (*pNavigatorIter)->ComputeSafety( position, maxDistance );437 safety = (*pNavigatorIter)->ComputeSafety( position, maxDistance, state); 437 438 if( safety < minSafety ) { minSafety = safety; } 438 439 } -
trunk/source/geometry/navigation/src/G4Navigator.cc
r831 r921 25 25 // 26 26 // 27 // $Id: G4Navigator.cc,v 1.3 7 2007/10/18 14:18:36gcosmo Exp $27 // $Id: G4Navigator.cc,v 1.38 2008/10/24 14:00:03 gcosmo Exp $ 28 28 // GEANT4 tag $ Name: $ 29 29 // … … 1214 1214 // 1215 1215 G4double G4Navigator::ComputeSafety( const G4ThreeVector &pGlobalpoint, 1216 const G4double pMaxLength) 1216 const G4double pMaxLength, 1217 const G4bool keepState) 1217 1218 { 1218 1219 G4double newSafety = 0.0; … … 1235 1236 } 1236 1237 #endif 1238 1239 if (keepState) { SetSavedState(); } 1237 1240 1238 1241 G4double distEndpointSq = (pGlobalpoint-fStepEndPoint).mag2(); … … 1322 1325 fPreviousSafety = newSafety; 1323 1326 1327 if (keepState) { RestoreSavedState(); } 1328 1324 1329 #ifdef G4DEBUG_NAVIGATION 1325 1330 if( fVerbose > 1 ) -
trunk/source/geometry/navigation/src/G4NormalNavigation.cc
r850 r921 26 26 // 27 27 // $Id: G4NormalNavigation.cc,v 1.9 2007/05/11 13:43:59 gcosmo Exp $ 28 // GEANT4 tag $Name: HEAD$28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 29 // 30 30 // -
trunk/source/geometry/navigation/src/G4ParameterisedNavigation.cc
r850 r921 26 26 // 27 27 // $Id: G4ParameterisedNavigation.cc,v 1.12 2007/11/09 16:06:02 gcosmo Exp $ 28 // GEANT4 tag $Name: HEAD$28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 29 // 30 30 // -
trunk/source/geometry/navigation/src/G4PathFinder.cc
r850 r921 25 25 // 26 26 // 27 // $Id: G4PathFinder.cc,v 1. 59 2008/04/29 15:32:54gcosmo Exp $27 // $Id: G4PathFinder.cc,v 1.61 2008/11/13 12:59:26 gcosmo Exp $ 28 28 // GEANT4 tag $ Name: $ 29 29 // … … 581 581 if( (!fNewTrack) && ( longMoveEnd && longMoveSaf ) ) 582 582 { 583 G4ThreeVector LastSafetyLocation;584 // Copy to keep last value - and restore585 586 LastSafetyLocation= fSafetyLocation;587 588 583 // Recompute ComputeSafety for end position 589 584 // 590 585 revisedSafety= ComputeSafety(lastEndPosition); 591 592 // Reset the state of last call to ComputeSafety593 //594 ComputeSafety( LastSafetyLocation );595 586 596 587 #ifdef G4DEBUG_PATHFINDER … … 757 748 758 749 std::vector<G4Navigator*>::iterator pNavigatorIter; 759 pNavigatorIter= fpTransportManager-> GetActiveNavigatorsIterator();750 pNavigatorIter= fpTransportManager->GetActiveNavigatorsIterator(); 760 751 761 752 for( register G4int num=0; num<fNoActiveNavigators; ++pNavigatorIter,++num ) 762 753 { 763 G4double safety = (*pNavigatorIter)->ComputeSafety( position );754 G4double safety = (*pNavigatorIter)->ComputeSafety( position,true ); 764 755 if( safety < minSafety ) { minSafety = safety; } 765 756 fNewSafetyComputed[num]= safety; … … 1183 1174 for( numNav=0; numNav < fNoActiveNavigators; ++numNav ) 1184 1175 { 1185 safety= fpNavigator[numNav]->ComputeSafety( startPoint );1176 safety= fpNavigator[numNav]->ComputeSafety( startPoint, false ); 1186 1177 fPreSafetyValues[numNav]= safety; 1187 1178 fCurrentPreStepSafety[numNav]= safety; -
trunk/source/geometry/navigation/src/G4PropagatorInField.cc
r850 r921 25 25 // 26 26 // 27 // $Id: G4PropagatorInField.cc,v 1.43 2008/05/28 09:12:23 tnikitin Exp $28 // GEANT4 tag $Name: HEAD $29 27 // 30 28 // … … 50 48 #include "G4VCurvedTrajectoryFilter.hh" 51 49 #include "G4ChordFinder.hh" 50 #include "G4BrentLocator.hh" 52 51 53 52 /////////////////////////////////////////////////////////////////////////// … … 56 55 57 56 G4PropagatorInField::G4PropagatorInField( G4Navigator *theNavigator, 58 G4FieldManager *detectorFieldMgr ) 57 G4FieldManager *detectorFieldMgr, 58 G4VIntersectionLocator *vLocator ) 59 59 : fDetectorFieldMgr(detectorFieldMgr), 60 60 fCurrentFieldMgr(detectorFieldMgr), … … 83 83 fPreviousSafety= 0.0; 84 84 kCarTolerance = G4GeometryTolerance::GetInstance()->GetSurfaceTolerance(); 85 // 86 fUseBrentLocator=true; 87 // In case of too slow progress in finding Intersection Point 88 // intermediates Points on the Track must be stored. 89 // Initialise the array of Pointers [max_depth+1] to do this 90 G4ThreeVector zeroV(0.0,0.0,0.0); 91 for (G4int idepth=0; idepth<max_depth+1; idepth++ ) 92 { 93 ptrInterMedFT[ idepth ] = new G4FieldTrack( zeroV, zeroV, 0., 0., 0., 0.); 94 } 95 // Counter for Maximum Number Of Trial before Intersection Found 96 maxNumberOfStepsForIntersection=0; 97 // Counter for Number Of Calls to ReIntegrationEndPoint Method 98 maxNumberOfCallsToReIntegration=0; 99 maxNumberOfCallsToReIntegration_depth=0; 85 86 // Definding Intersection Locator and his parameters 87 if(vLocator==0){ 88 fIntersectionLocator= new G4BrentLocator(theNavigator); 89 fAllocatedLocator=true; 90 }else{ 91 fIntersectionLocator=vLocator; 92 fAllocatedLocator=false; 93 } 94 fIntersectionLocator->SetEpsilonStepFor(fEpsilonStep); 95 fIntersectionLocator->SetDeltaIntersectionFor(GetDeltaIntersection()); 96 fIntersectionLocator->SetChordFinderFor(GetChordFinder()); 97 fIntersectionLocator->SetSafetyParametersFor( fUseSafetyForOptimisation); 100 98 } 101 99 102 100 G4PropagatorInField::~G4PropagatorInField() 103 101 { 104 for ( G4int idepth=0; idepth<max_depth+1; idepth++) 105 { 106 delete ptrInterMedFT[idepth]; 107 } 108 if(fVerboseLevel>0){ 109 G4cout<<"G4PropagatorInField::Location with Max Number of Steps=" 110 << maxNumberOfStepsForIntersection<<G4endl; 111 G4cout<<"G4PropagatorInField::ReIntegrateEndPoint was called "<< 112 maxNumberOfCallsToReIntegration<<" times and for depth algorithm "<< 113 maxNumberOfCallsToReIntegration_depth<<" times"<<G4endl; 114 } 102 if(fAllocatedLocator)delete fIntersectionLocator; 115 103 } 116 104 … … 162 150 fSetFieldMgr= false; 163 151 164 GetChordFinder()->SetChargeMomentumMass(fCharge, fInitialMomentumModulus, fMass); 165 152 GetChordFinder()->SetChargeMomentumMass(fCharge, fInitialMomentumModulus, fMass); 153 154 // Values for Intersection Locator has to be updated on each call 155 // because the CurrentFieldManager changes 156 fIntersectionLocator->SetChordFinderFor(GetChordFinder()); 157 fIntersectionLocator->SetSafetyParametersFor( fUseSafetyForOptimisation); 158 fIntersectionLocator->SetEpsilonStepFor(fEpsilonStep); 159 fIntersectionLocator->SetDeltaIntersectionFor(GetDeltaIntersection()); 160 166 161 G4FieldTrack CurrentState(pFieldTrack); 167 162 G4FieldTrack OriginalState = CurrentState; … … 300 295 // of vol(A), if it exists. Start with point E as first "estimate". 301 296 G4bool recalculatedEndPt= false; 302 G4bool found_intersection = 303 LocateIntersectionPoint( SubStepStartState, CurrentState, 297 298 G4bool found_intersection = fIntersectionLocator-> 299 EstimateIntersectionPoint( SubStepStartState, CurrentState, 304 300 InterSectionPointE, IntersectPointVelct_G, 305 recalculatedEndPt); 306 // G4cout<<"In Locate"<<recalculatedEndPt<<" and V"<<IntersectPointVelct_G.GetPosition()<<G4endl; 301 recalculatedEndPt,fPreviousSafety,fPreviousSftOrigin); 307 302 intersects = intersects && found_intersection; 308 303 if( found_intersection ) { … … 432 427 433 428 return TruePathLength; 434 }435 436 // --------------------------------------------------------------------------437 // G4bool438 // G4PropagatorInField::LocateIntersectionPoint(439 // const G4FieldTrack& CurveStartPointVelocity, // A440 // const G4FieldTrack& CurveEndPointVelocity, // B441 // const G4ThreeVector& TrialPoint, // E442 // G4FieldTrack& IntersectedOrRecalculated // Output443 // G4bool& recalculated) // Out444 // --------------------------------------------------------------------------445 //446 // Function that returns the intersection of the true path with the surface447 // of the current volume (either the external one or the inner one with one448 // of the daughters449 //450 // A = Initial point451 // B = another point452 //453 // Both A and B are assumed to be on the true path.454 //455 // E is the first point of intersection of the chord AB with456 // a volume other than A (on the surface of A or of a daughter)457 //458 // Convention of Use :459 // i) If it returns "true", then IntersectionPointVelocity is set460 // to the approximate intersection point.461 // ii) If it returns "false", no intersection was found.462 // The validity of IntersectedOrRecalculated depends on 'recalculated'463 // a) if latter is false, then IntersectedOrRecalculated is invalid.464 // b) if latter is true, then IntersectedOrRecalculated is465 // the new endpoint, due to a re-integration.466 // --------------------------------------------------------------------------467 468 G4bool469 G4PropagatorInField::LocateIntersectionPoint(470 const G4FieldTrack& CurveStartPointVelocity, // A471 const G4FieldTrack& CurveEndPointVelocity, // B472 const G4ThreeVector& TrialPoint, // E473 G4FieldTrack& IntersectedOrRecalculatedFT, // Out: point found474 G4bool& recalculatedEndPoint) // Out:475 {476 // Find Intersection Point ( A, B, E ) of true path AB - start at E.477 478 G4bool found_approximate_intersection = false;479 G4bool there_is_no_intersection = false;480 481 G4FieldTrack CurrentA_PointVelocity = CurveStartPointVelocity;482 G4FieldTrack CurrentB_PointVelocity = CurveEndPointVelocity;483 G4ThreeVector CurrentE_Point = TrialPoint;484 G4FieldTrack ApproxIntersecPointV(CurveEndPointVelocity); // FT-Def-Construct485 G4double NewSafety= -0.0;486 487 G4bool final_section= true; // Shows whether current section is last488 // (i.e. B=full end)489 G4bool first_section=true;490 recalculatedEndPoint= false;491 492 G4bool restoredFullEndpoint= false;493 494 G4int substep_no = 0;495 496 // Limits for substep number497 //498 const G4int max_substeps= 10000; // Test 120 (old value 100 )499 const G4int warn_substeps= 1000; // 100500 501 // Statistics for substeps502 //503 static G4int max_no_seen= -1;504 static G4int trigger_substepno_print= warn_substeps - 20 ;505 506 //--------------------------------------------------------------------------507 // Algoritm for the case if progress in founding intersection is too slow.508 // Process is defined too slow if after N=param_substeps advances on the509 // path, it will be only 'fraction_done' of the total length.510 // In this case the remaining length is divided in two half and511 // the loop is restarted for each half.512 // If progress is still too slow, the division in two halfs continue513 // until 'max_depth'.514 //--------------------------------------------------------------------------515 G4double count_did_len=0.;516 G4double count_all_len=0;517 G4int param_substeps=100;//Test value for the maximum number of substeps518 if(!fUseBrentLocator) param_substeps=10;// Reduced value for the maximum number519 520 const G4double fraction_done=0.3;521 522 G4bool Second_half=false; // First half or second half of divided step523 524 // We need to know this for the 'final_section':525 // real 'final_section' or first half 'final_section'526 // In algorithm it is considered that the 'Second_half' is true527 // and it becomes false only if we are in the first-half of level528 // depthness or if we are in the first section529 530 G4int depth=0; // Depth counts how many subdivisions of initial step made531 532 #ifdef G4DEBUG_FIELD533 static G4double tolerance= 1.0e-8;534 G4ThreeVector StartPosition= CurveStartPointVelocity.GetPosition();535 if( (TrialPoint - StartPosition).mag() < tolerance * mm )536 {537 G4cerr << "WARNING - G4PropagatorInField::LocateIntersectionPoint()"538 << G4endl539 << " Intermediate F point is on top of starting point A."540 << G4endl;541 G4Exception("G4PropagatorInField::LocateIntersectionPoint()",542 "IntersectionPointIsAtStart", JustWarning,543 "Intersection point F is exactly at start point A." );544 }545 #endif546 547 // Intermediates Points on the Track = Subdivided Points must be stored.548 // Give the initial values to 'InterMedFt'549 // Important is 'ptrInterMedFT[0]', it saves the 'EndCurvePoint'550 //551 *ptrInterMedFT[0] = CurveEndPointVelocity;552 for (G4int idepth=1; idepth<max_depth+1; idepth++ )553 {554 *ptrInterMedFT[idepth]=CurveStartPointVelocity;555 }556 557 // 'SubStartPoint' is needed to calculate the length of the divided step558 //559 G4FieldTrack SubStart_PointVelocity = CurveStartPointVelocity;560 561 do562 {563 G4int substep_no_p = 0;564 G4bool sub_final_section = false; // the same as final_section,565 // but for 'sub_section'566 do // REPEAT param567 {568 G4ThreeVector Point_A = CurrentA_PointVelocity.GetPosition();569 G4ThreeVector Point_B = CurrentB_PointVelocity.GetPosition();570 571 // F = a point on true AB path close to point E572 // (the closest if possible)573 //574 if((!fUseBrentLocator)||(substep_no_p==0)){575 ApproxIntersecPointV = GetChordFinder()576 ->ApproxCurvePointV( CurrentA_PointVelocity,577 CurrentB_PointVelocity,578 CurrentE_Point,579 fEpsilonStep );580 // The above method is the key & most intuitive part ...581 }582 #ifdef G4DEBUG_FIELD583 if( ApproxIntersecPointV.GetCurveLength() >584 CurrentB_PointVelocity.GetCurveLength() * (1.0 + tolerance) )585 {586 G4cerr << "ERROR - G4PropagatorInField::LocateIntersectionPoint()"587 << G4endl588 << " Intermediate F point is more advanced than"589 << " endpoint B." << G4endl;590 G4Exception("G4PropagatorInField::LocateIntersectionPoint()",591 "IntermediatePointConfusion", FatalException,592 "Intermediate F point is past end B point" );593 }594 #endif595 596 G4ThreeVector CurrentF_Point= ApproxIntersecPointV.GetPosition();597 if(substep_no> maxNumberOfStepsForIntersection)maxNumberOfStepsForIntersection=substep_no;598 // First check whether EF is small - then F is a good approx. point599 // Calculate the length and direction of the chord AF600 //601 G4ThreeVector ChordEF_Vector = CurrentF_Point - CurrentE_Point;602 603 if ( ChordEF_Vector.mag2() <= sqr(GetDeltaIntersection()) )604 {605 found_approximate_intersection = true;606 // Create the "point" return value607 //608 IntersectedOrRecalculatedFT = ApproxIntersecPointV;609 IntersectedOrRecalculatedFT.SetPosition( CurrentE_Point );610 611 // Note: in order to return a point on the boundary,612 // we must return E. But it is F on the curve.613 // So we must "cheat": we are using the position at point E614 // and the velocity at point F !!!615 //616 // This must limit the length we can allow for displacement!617 }618 else // E is NOT close enough to the curve (ie point F)619 {620 // Check whether any volumes are encountered by the chord AF621 // ---------------------------------------------------------622 // First relocate to restore any Voxel etc information623 // in the Navigator before calling ComputeStep()624 //625 fNavigator->LocateGlobalPointWithinVolume( Point_A );626 627 G4ThreeVector PointG; // Candidate intersection point628 G4double stepLengthAF;629 G4bool Intersects_AF = IntersectChord( Point_A, CurrentF_Point,630 NewSafety, stepLengthAF,631 PointG );632 if( Intersects_AF )633 {634 if(fUseBrentLocator){635 636 G4FieldTrack EndPoint=ApproxIntersecPointV;637 ApproxIntersecPointV= GetChordFinder()->ApproxCurvePointS(638 CurrentA_PointVelocity,CurrentB_PointVelocity,639 CurrentE_Point,CurrentF_Point,PointG,true,fEpsilonStep);640 CurrentB_PointVelocity = EndPoint;641 CurrentE_Point = PointG;642 // By moving point B, must take care if current643 // AF has no intersection to try current FB!!644 //645 final_section= false;646 647 }648 else{649 // G is our new Candidate for the intersection point.650 // It replaces "E" and we will repeat the test to see if651 // it is a good enough approximate point for us.652 // B <- F653 // E <- G654 655 CurrentB_PointVelocity = ApproxIntersecPointV;656 CurrentE_Point = PointG;657 658 // By moving point B, must take care if current659 // AF has no intersection to try current FB!!660 //661 final_section= false;662 }663 #ifdef G4VERBOSE664 if( fVerboseLevel > 3 )665 {666 G4cout << "G4PiF::LI> Investigating intermediate point"667 << " at s=" << ApproxIntersecPointV.GetCurveLength()668 << " on way to full s="669 << CurveEndPointVelocity.GetCurveLength() << G4endl;670 }671 #endif672 }673 else // not Intersects_AF674 {675 // In this case:676 // There is NO intersection of AF with a volume boundary.677 // We must continue the search in the segment FB!678 //679 fNavigator->LocateGlobalPointWithinVolume( CurrentF_Point );680 681 G4double stepLengthFB;682 G4ThreeVector PointH;683 684 // Check whether any volumes are encountered by the chord FB685 // ---------------------------------------------------------686 687 G4bool Intersects_FB = IntersectChord( CurrentF_Point, Point_B,688 NewSafety, stepLengthFB,689 PointH );690 if( Intersects_FB )691 {692 if(fUseBrentLocator){693 CurrentA_PointVelocity = ApproxIntersecPointV;694 ApproxIntersecPointV= GetChordFinder()->ApproxCurvePointS(695 CurrentA_PointVelocity,CurrentB_PointVelocity,696 CurrentE_Point,Point_A,PointH,false,fEpsilonStep);697 CurrentE_Point = PointH;698 }699 else{700 701 // There is an intersection of FB with a volume boundary702 // H <- First Intersection of Chord FB703 704 // H is our new Candidate for the intersection point.705 // It replaces "E" and we will repeat the test to see if706 // it is a good enough approximate point for us.707 708 // Note that F must be in volume volA (the same as A)709 // (otherwise AF would meet a volume boundary!)710 // A <- F711 // E <- H712 713 CurrentA_PointVelocity = ApproxIntersecPointV;714 CurrentE_Point = PointH;715 }716 }717 else // not Intersects_FB718 {719 // There is NO intersection of FB with a volume boundary720 721 if( final_section )722 {723 // If B is the original endpoint, this means that whatever724 // volume(s) intersected the original chord, none touch the725 // smaller chords we have used.726 // The value of 'IntersectedOrRecalculatedFT' returned is727 // likely not valid728 729 // Check on real final_section or SubEndSection730 //731 if( ((Second_half)&&(depth==0)) || (first_section) )732 {733 there_is_no_intersection = true; // real final_section734 }735 else736 {737 // end of subsection, not real final section738 // exit from the and go to the depth-1 level739 740 substep_no_p = param_substeps+2; // exit from the loop741 742 // but 'Second_half' is still true because we need to find743 // the 'CurrentE_point' for the next loop744 //745 Second_half = true;746 sub_final_section = true;747 748 }749 }750 else751 {752 // We must restore the original endpoint753 754 CurrentA_PointVelocity = CurrentB_PointVelocity; // Got to B755 CurrentB_PointVelocity = CurveEndPointVelocity;756 restoredFullEndpoint = true;757 }758 } // Endif (Intersects_FB)759 } // Endif (Intersects_AF)760 761 // Ensure that the new endpoints are not further apart in space762 // than on the curve due to different errors in the integration763 //764 G4double linDistSq, curveDist;765 linDistSq = ( CurrentB_PointVelocity.GetPosition()766 - CurrentA_PointVelocity.GetPosition() ).mag2();767 curveDist = CurrentB_PointVelocity.GetCurveLength()768 - CurrentA_PointVelocity.GetCurveLength();769 if( curveDist*curveDist*(1+2*fEpsilonStep ) < linDistSq )770 {771 // Re-integrate to obtain a new B772 //773 G4FieldTrack newEndPointFT=774 ReEstimateEndpoint( CurrentA_PointVelocity,775 CurrentB_PointVelocity,776 linDistSq, // to avoid recalculation777 curveDist );778 G4FieldTrack oldPointVelB = CurrentB_PointVelocity;779 CurrentB_PointVelocity = newEndPointFT;780 maxNumberOfCallsToReIntegration= maxNumberOfCallsToReIntegration+1;781 #ifdef G4DEBUG_FIELD782 G4cout<<"G4PIF::Call ReIntEnd1 linD="<<std::sqrt(linDistSq)<<" curve="<<curveDist<<" n="<<substep_no<<G4endl;783 G4cout<<"G4PIF::Call ReIntEnd2 IntersectAF="<< Intersects_AF<<" final_section="<<final_section<<G4endl;784 #endif785 if( (final_section)&&(Second_half)&&(depth==0) ) // real final section786 {787 recalculatedEndPoint = true;788 IntersectedOrRecalculatedFT = newEndPointFT;789 // So that we can return it, if it is the endpoint!790 }791 792 }793 794 if( curveDist < 0.0 )795 {796 G4cerr << "ERROR - G4PropagatorInField::LocateIntersectionPoint()"797 << G4endl798 << " Error in advancing propagation." << G4endl;799 fVerboseLevel = 5; // Print out a maximum of information800 printStatus( CurrentA_PointVelocity, CurrentB_PointVelocity,801 -1.0, NewSafety, substep_no, 0 );802 G4cerr << " Point A (start) is " << CurrentA_PointVelocity803 << G4endl;804 G4cerr << " Point B (end) is " << CurrentB_PointVelocity805 << G4endl;806 G4cerr << " Curve distance is " << curveDist << G4endl;807 G4cerr << G4endl808 << "The final curve point is not further along"809 << " than the original!" << G4endl;810 if( recalculatedEndPoint )811 {812 G4cerr << "Recalculation of EndPoint was called with fEpsStep= "813 << fEpsilonStep << G4endl;814 }815 G4cerr.precision(20);816 G4cerr << " Point A (Curve start) is " << CurveStartPointVelocity817 << G4endl;818 G4cerr << " Point B (Curve end) is " << CurveEndPointVelocity819 << G4endl;820 G4cerr << " Point A (Current start) is " << CurrentA_PointVelocity821 << G4endl;822 G4cerr << " Point B (Current end) is " << CurrentB_PointVelocity823 << G4endl;824 G4cerr << " Point S (Sub start) is " << SubStart_PointVelocity825 << G4endl;826 G4cerr << " Point E (Trial Point) is " << CurrentE_Point827 << G4endl;828 G4cerr << " Point F (Intersection) is " << ApproxIntersecPointV829 << G4endl;830 G4cerr << " LocateIntersection parameters are : Substep no= "831 << substep_no << G4endl;832 G4cerr << " Substep depth no= "<< substep_no_p << " Depth= "833 << depth << G4endl;834 G4cerr << " did_len= "<< count_did_len << " all_len= "835 << count_all_len << G4endl;836 G4Exception("G4PropagatorInField::LocateIntersectionPoint()",837 "FatalError", FatalException,838 "Error in advancing propagation.");839 }840 841 if(restoredFullEndpoint)842 {843 final_section = restoredFullEndpoint;844 restoredFullEndpoint = false;845 }846 } // EndIf ( E is close enough to the curve, ie point F. )847 // tests ChordAF_Vector.mag() <= maximum_lateral_displacement848 849 #ifdef G4DEBUG_LOCATE_INTERSECTION850 if( substep_no >= trigger_substepno_print )851 {852 G4cout << "Difficulty in converging in "853 << "G4PropagatorInField::LocateIntersectionPoint():"854 << G4endl855 << " Substep no = " << substep_no << G4endl;856 if( substep_no == trigger_substepno_print )857 {858 printStatus( CurveStartPointVelocity, CurveEndPointVelocity,859 -1.0, NewSafety, 0, 0);860 }861 G4cout << " State of point A: ";862 printStatus( CurrentA_PointVelocity, CurrentA_PointVelocity,863 -1.0, NewSafety, substep_no-1, 0);864 G4cout << " State of point B: ";865 printStatus( CurrentA_PointVelocity, CurrentB_PointVelocity,866 -1.0, NewSafety, substep_no, 0);867 }868 #endif869 870 substep_no++;871 substep_no_p++;872 873 } while ( ( ! found_approximate_intersection )874 && ( ! there_is_no_intersection )875 && ( substep_no_p <= param_substeps) ); // UNTIL found or876 // failed param substep877 first_section = false;878 879 if( (!found_approximate_intersection) && (!there_is_no_intersection) )880 {881 G4double did_len = std::abs( CurrentA_PointVelocity.GetCurveLength()882 - SubStart_PointVelocity.GetCurveLength());883 G4double all_len = std::abs( CurrentB_PointVelocity.GetCurveLength()884 - SubStart_PointVelocity.GetCurveLength());885 count_did_len=did_len;886 count_all_len=all_len;887 G4double stepLengthAB;888 G4ThreeVector PointGe;889 890 // Check if progress is too slow and if it possible to go deeper,891 // then halve the step if so892 //893 if( ( ( did_len )<fraction_done*all_len)894 && (depth<max_depth) && (!sub_final_section) )895 {896 897 Second_half=false;898 depth++;899 900 G4double Sub_len = (all_len-did_len)/(2.);901 G4FieldTrack start = CurrentA_PointVelocity;902 G4MagInt_Driver* integrDriver=GetChordFinder()->GetIntegrationDriver();903 integrDriver->AccurateAdvance(start, Sub_len, fEpsilonStep);904 *ptrInterMedFT[depth] = start;905 CurrentB_PointVelocity = *ptrInterMedFT[depth];906 907 // Adjust 'SubStartPoint' to calculate the 'did_length' in next loop908 //909 SubStart_PointVelocity = CurrentA_PointVelocity;910 911 // Find new trial intersection point needed at start of the loop912 //913 G4ThreeVector Point_A = CurrentA_PointVelocity.GetPosition();914 G4ThreeVector SubE_point = CurrentB_PointVelocity.GetPosition();915 916 fNavigator->LocateGlobalPointWithinVolume(Point_A);917 G4bool Intersects_AB = IntersectChord(Point_A, SubE_point,918 NewSafety, stepLengthAB, PointGe);919 if(Intersects_AB)920 {921 CurrentE_Point = PointGe;922 }923 else924 {925 // No intersection found for first part of curve926 // (CurrentA,InterMedPoint[depth]). Go to the second part927 //928 Second_half = true;929 }930 } // if did_len931 932 if( (Second_half)&&(depth!=0) )933 {934 // Second part of curve (InterMed[depth],Intermed[depth-1]) )935 // On the depth-1 level normally we are on the 'second_half'936 937 Second_half = true;938 939 // Find new trial intersection point needed at start of the loop940 //941 SubStart_PointVelocity = *ptrInterMedFT[depth];942 CurrentA_PointVelocity = *ptrInterMedFT[depth];943 CurrentB_PointVelocity = *ptrInterMedFT[depth-1];944 // Ensure that the new endpoints are not further apart in space945 // than on the curve due to different errors in the integration946 //947 G4double linDistSq, curveDist;948 linDistSq = ( CurrentB_PointVelocity.GetPosition()949 - CurrentA_PointVelocity.GetPosition() ).mag2();950 curveDist = CurrentB_PointVelocity.GetCurveLength()951 - CurrentA_PointVelocity.GetCurveLength();952 if( curveDist*curveDist*(1+2*fEpsilonStep ) < linDistSq )953 {954 // Re-integrate to obtain a new B955 //956 G4FieldTrack newEndPointFT=957 ReEstimateEndpoint( CurrentA_PointVelocity,958 CurrentB_PointVelocity,959 linDistSq, // to avoid recalculation960 curveDist );961 G4FieldTrack oldPointVelB = CurrentB_PointVelocity;962 CurrentB_PointVelocity = newEndPointFT;963 maxNumberOfCallsToReIntegration_depth= maxNumberOfCallsToReIntegration_depth+1;964 }965 966 G4ThreeVector Point_A = CurrentA_PointVelocity.GetPosition();967 G4ThreeVector SubE_point = CurrentB_PointVelocity.GetPosition();968 fNavigator->LocateGlobalPointWithinVolume(Point_A);969 G4bool Intersects_AB = IntersectChord(Point_A, SubE_point, NewSafety,970 stepLengthAB, PointGe);971 if(Intersects_AB)972 {973 CurrentE_Point = PointGe;974 }975 else976 {977 final_section = true;978 }979 depth--;980 }981 } // if(!found_aproximate_intersection)982 983 } while ( ( ! found_approximate_intersection )984 && ( ! there_is_no_intersection )985 && ( substep_no <= max_substeps) ); // UNTIL found or failed986 987 if( substep_no > max_no_seen )988 {989 max_no_seen = substep_no;990 if( max_no_seen > warn_substeps )991 {992 trigger_substepno_print = max_no_seen-20; // Want to see last 20 steps993 }994 }995 996 if( ( substep_no >= max_substeps)997 && !there_is_no_intersection998 && !found_approximate_intersection )999 {1000 G4cerr << "WARNING - G4PropagatorInField::LocateIntersectionPoint()"1001 << G4endl1002 << " Convergence is requiring too many substeps: "1003 << substep_no << G4endl;1004 G4cerr << " Abandoning effort to intersect. " << G4endl;1005 G4cerr << " Information on start & current step follows in cout."1006 << G4endl;1007 G4cout << "WARNING - G4PropagatorInField::LocateIntersectionPoint()"1008 << G4endl1009 << " Convergence is requiring too many substeps: "1010 << substep_no << G4endl;1011 G4cout << " Found intersection = "1012 << found_approximate_intersection << G4endl1013 << " Intersection exists = "1014 << !there_is_no_intersection << G4endl;1015 G4cout << " Start and Endpoint of Requested Step:" << G4endl;1016 printStatus( CurveStartPointVelocity, CurveEndPointVelocity,1017 -1.0, NewSafety, 0, 0);1018 G4cout << G4endl;1019 G4cout << " 'Bracketing' starting and endpoint of current Sub-Step"1020 << G4endl;1021 printStatus( CurrentA_PointVelocity, CurrentA_PointVelocity,1022 -1.0, NewSafety, substep_no-1, 0);1023 printStatus( CurrentA_PointVelocity, CurrentB_PointVelocity,1024 -1.0, NewSafety, substep_no, 0);1025 G4cout << G4endl;1026 1027 #ifdef FUTURE_CORRECTION1028 // Attempt to correct the results of the method // FIX - TODO1029 1030 if ( ! found_approximate_intersection )1031 {1032 recalculatedEndPoint = true;1033 // Return the further valid intersection point -- potentially A ??1034 // JA/19 Jan 20061035 IntersectedOrRecalculatedFT = CurrentA_PointVelocity;1036 1037 G4cout << "WARNING - G4PropagatorInField::LocateIntersectionPoint()"1038 << G4endl1039 << " Did not convergence after " << substep_no1040 << " substeps." << G4endl;1041 G4cout << " The endpoint was adjused to pointA resulting"1042 << G4endl1043 << " from the last substep: " << CurrentA_PointVelocity1044 << G4endl;1045 }1046 #endif1047 1048 G4cout.precision( 10 );1049 G4double done_len = CurrentA_PointVelocity.GetCurveLength();1050 G4double full_len = CurveEndPointVelocity.GetCurveLength();1051 G4cout << "ERROR - G4PropagatorInField::LocateIntersectionPoint()"1052 << G4endl1053 << " Undertaken only length: " << done_len1054 << " out of " << full_len << " required." << G4endl;1055 G4cout << " Remaining length = " << full_len - done_len << G4endl;1056 1057 G4Exception("G4PropagatorInField::LocateIntersectionPoint()",1058 "UnableToLocateIntersection", FatalException,1059 "Too many substeps while trying to locate intersection.");1060 }1061 else if( substep_no >= warn_substeps )1062 {1063 int oldprc= G4cout.precision( 10 );1064 G4cout << "WARNING - G4PropagatorInField::LocateIntersectionPoint()"1065 << G4endl1066 << " Undertaken length: "1067 << CurrentB_PointVelocity.GetCurveLength();1068 G4cout << " - Needed: " << substep_no << " substeps." << G4endl1069 << " Warning level = " << warn_substeps1070 << " and maximum substeps = " << max_substeps << G4endl;1071 G4Exception("G4PropagatorInField::LocateIntersectionPoint()",1072 "DifficultyToLocateIntersection", JustWarning,1073 "Many substeps while trying to locate intersection.");1074 G4cout.precision( oldprc );1075 }1076 1077 return !there_is_no_intersection; // Success or failure1078 429 } 1079 430 … … 1210 561 } 1211 562 1212 G4bool1213 G4PropagatorInField::IntersectChord( G4ThreeVector StartPointA,1214 G4ThreeVector EndPointB,1215 G4double &NewSafety,1216 G4double &LinearStepLength,1217 G4ThreeVector &IntersectionPoint1218 )1219 {1220 // Calculate the direction and length of the chord AB1221 G4ThreeVector ChordAB_Vector = EndPointB - StartPointA;1222 G4double ChordAB_Length = ChordAB_Vector.mag(); // Magnitude (norm)1223 G4ThreeVector ChordAB_Dir = ChordAB_Vector.unit();1224 G4bool intersects;1225 1226 G4ThreeVector OriginShift = StartPointA - fPreviousSftOrigin ;1227 G4double MagSqShift = OriginShift.mag2() ;1228 G4double currentSafety;1229 G4bool doCallNav= false;1230 1231 if( MagSqShift >= sqr(fPreviousSafety) )1232 {1233 currentSafety = 0.0 ;1234 }else{1235 currentSafety = fPreviousSafety - std::sqrt(MagSqShift) ;1236 }1237 1238 if( fUseSafetyForOptimisation && (ChordAB_Length <= currentSafety) )1239 {1240 // The Step is guaranteed to be taken1241 1242 LinearStepLength = ChordAB_Length;1243 intersects = false;1244 1245 NewSafety= currentSafety;1246 1247 #if 01248 G4cout << " G4PropagatorInField does not call Navigator::ComputeStep " << G4endl ;1249 G4cout << " step= " << LinearStepLength << " safety= " << NewSafety << G4endl;1250 G4cout << " safety: Origin = " << fPreviousSftOrigin << " val= " << fPreviousSafety << G4endl;1251 #endif1252 }1253 else1254 {1255 doCallNav= true;1256 // Check whether any volumes are encountered by the chord AB1257 1258 // G4cout << " G4PropagatorInField calling Navigator::ComputeStep " << G4endl ;1259 1260 LinearStepLength =1261 fNavigator->ComputeStep( StartPointA, ChordAB_Dir,1262 ChordAB_Length, NewSafety );1263 intersects = (LinearStepLength <= ChordAB_Length);1264 // G4Navigator contracts to return k_infinity if len==asked1265 // and it did not find a surface boundary at that length1266 LinearStepLength = std::min( LinearStepLength, ChordAB_Length);1267 1268 // G4cout << " G4PiF got step= " << LinearStepLength << " safety= " << NewSafety << G4endl;1269 1270 // Save the last calculated safety!1271 fPreviousSftOrigin = StartPointA;1272 fPreviousSafety= NewSafety;1273 1274 if( intersects ){1275 // Intersection Point of chord AB and either volume A's surface1276 // or a daughter volume's surface ..1277 IntersectionPoint = StartPointA + LinearStepLength * ChordAB_Dir;1278 }1279 }1280 1281 #ifdef DEBUG_INTERSECTS_CHORD1282 // printIntersection(1283 // StartPointA, EndPointB, LinearStepLength, IntersectionPoint, NewSafety1284 1285 G4cout << " G4PropagatorInField::IntersectChord reports " << G4endl;1286 G4cout << " PiF-IC> "1287 << "Start=" << std::setw(12) << StartPointA << " "1288 << "End= " << std::setw(8) << EndPointB << " "1289 << "StepIn=" << std::setw(8) << LinearStepLength << " "1290 << "NewSft=" << std::setw(8) << NewSafety << " "1291 << "CallNav=" << doCallNav << " "1292 << "Intersects " << intersects << " ";1293 if( intersects )1294 G4cout << "IntrPt=" << std::setw(8) << IntersectionPoint << " " ;1295 G4cout << G4endl;1296 #endif1297 1298 return intersects;1299 }1300 1301 // --------------------- oooo000000000000oooo ----------------------------1302 1303 G4FieldTrack G4PropagatorInField::1304 ReEstimateEndpoint( const G4FieldTrack &CurrentStateA,1305 const G4FieldTrack &EstimatedEndStateB,1306 G4double linearDistSq,1307 G4double curveDist1308 )1309 {1310 // G4double checkCurveDist= EstimatedEndStateB.GetCurveLength()1311 // - CurrentStateA.GetCurveLength();1312 // G4double checkLinDistSq= (EstimatedEndStateB.GetPosition()1313 // - CurrentStateA.GetPosition() ).mag2();1314 1315 G4FieldTrack newEndPoint( CurrentStateA );1316 G4MagInt_Driver* integrDriver= GetChordFinder()->GetIntegrationDriver();1317 1318 G4FieldTrack retEndPoint( CurrentStateA );1319 G4bool goodAdvance;1320 G4int itrial=0;1321 const G4int no_trials= 20;1322 1323 G4double endCurveLen= EstimatedEndStateB.GetCurveLength();1324 do1325 {1326 G4double currentCurveLen= newEndPoint.GetCurveLength();1327 G4double advanceLength= endCurveLen - currentCurveLen ;1328 if (std::abs(advanceLength)<kCarTolerance)1329 {1330 advanceLength=(EstimatedEndStateB.GetPosition()1331 -newEndPoint.GetPosition()).mag();1332 }1333 goodAdvance=1334 integrDriver->AccurateAdvance(newEndPoint, advanceLength, fEpsilonStep);1335 // ***************1336 }1337 while( !goodAdvance && (++itrial < no_trials) );1338 1339 if( goodAdvance )1340 {1341 retEndPoint= newEndPoint;1342 }1343 else1344 {1345 retEndPoint= EstimatedEndStateB; // Could not improve without major work !!1346 }1347 1348 // All the work is done1349 // below are some diagnostics only -- before the return!1350 //1351 static const G4String MethodName("G4PropagatorInField::ReEstimateEndpoint");1352 1353 #ifdef G4VERBOSE1354 G4int latest_good_trials=0;1355 if( itrial > 1)1356 {1357 if( fVerboseLevel > 0 )1358 {1359 G4cout << MethodName << " called - goodAdv= " << goodAdvance1360 << " trials = " << itrial1361 << " previous good= " << latest_good_trials1362 << G4endl;1363 }1364 latest_good_trials=0;1365 }1366 else1367 {1368 latest_good_trials++;1369 }1370 #endif1371 1372 #ifdef G4DEBUG_FIELD1373 G4double lengthDone = newEndPoint.GetCurveLength()1374 - CurrentStateA.GetCurveLength();1375 if( !goodAdvance )1376 {1377 if( fVerboseLevel >= 3 )1378 {1379 G4cout << MethodName << "> AccurateAdvance failed " ;1380 G4cout << " in " << itrial << " integration trials/steps. " << G4endl;1381 G4cout << " It went only " << lengthDone << " instead of " << curveDist1382 << " -- a difference of " << curveDist - lengthDone << G4endl;1383 G4cout << " ReEstimateEndpoint> Reset endPoint to original value!"1384 << G4endl;1385 }1386 }1387 1388 static G4int noInaccuracyWarnings = 0;1389 G4int maxNoWarnings = 10;1390 if ( (noInaccuracyWarnings < maxNoWarnings )1391 || (fVerboseLevel > 1) )1392 {1393 G4cerr << "G4PropagatorInField::LocateIntersectionPoint():"1394 << G4endl1395 << " Warning: Integration inaccuracy requires"1396 << " an adjustment in the step's endpoint." << G4endl1397 << " Two mid-points are further apart than their"1398 << " curve length difference" << G4endl1399 << " Dist = " << std::sqrt(linearDistSq)1400 << " curve length = " << curveDist << G4endl;1401 G4cerr << " Correction applied is "1402 << (newEndPoint.GetPosition()-EstimatedEndStateB.GetPosition()).mag()1403 << G4endl;1404 }1405 #else1406 // Statistics on the RMS value of the corrections1407 1408 static G4int noCorrections=0;1409 static G4double sumCorrectionsSq = 0;1410 noCorrections++;1411 if( goodAdvance )1412 {1413 sumCorrectionsSq += (EstimatedEndStateB.GetPosition() -1414 newEndPoint.GetPosition()).mag2();1415 }1416 linearDistSq -= curveDist; // To use linearDistSq ... !1417 #endif1418 1419 return retEndPoint;1420 }1421 1422 563 // Access the points which have passed through the filter. The 1423 564 // points are stored as ThreeVectors for the initial impelmentation -
trunk/source/geometry/navigation/src/G4ReplicaNavigation.cc
r850 r921 26 26 // 27 27 // $Id: G4ReplicaNavigation.cc,v 1.19 2008/04/28 15:39:55 gcosmo Exp $ 28 // GEANT4 tag $Name: HEAD$28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 29 // 30 30 // -
trunk/source/geometry/navigation/src/G4SafetyHelper.cc
r831 r921 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4SafetyHelper.cc,v 1.1 5 2007/11/14 10:04:21gcosmo Exp $26 // $Id: G4SafetyHelper.cc,v 1.16 2008/10/24 14:00:03 gcosmo Exp $ 27 27 // GEANT4 tag $ Name: $ 28 28 // … … 128 128 { 129 129 // Safety for mass geometry 130 fLastSafety = fpMassNavigator->ComputeSafety(position );130 fLastSafety = fpMassNavigator->ComputeSafety(position,true); 131 131 } 132 132 else 133 133 { 134 134 // Safety for all geometries 135 fLastSafety = fpPathFinder->ComputeSafety( position);135 fLastSafety = fpPathFinder->ComputeSafety(position); 136 136 } 137 137 newSafety = fLastSafety; -
trunk/source/geometry/navigation/src/G4TransportationManager.cc
r850 r921 26 26 // 27 27 // $Id: G4TransportationManager.cc,v 1.15 2007/04/12 11:51:48 vnivanch Exp $ 28 // GEANT4 tag $Name: HEAD$28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 29 // 30 30 // -
trunk/source/geometry/navigation/src/G4VoxelNavigation.cc
r850 r921 25 25 // 26 26 // 27 // $Id: G4VoxelNavigation.cc,v 1. 7 2007/05/11 13:43:59gcosmo Exp $28 // GEANT4 tag $Name: HEAD$27 // $Id: G4VoxelNavigation.cc,v 1.9 2008/11/14 18:26:35 gcosmo Exp $ 28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 29 // 30 30 // … … 254 254 G4String solidResponse = "-kInside-"; 255 255 if (insideIntPt == kOutside) 256 solidResponse = "-kOutside-";256 { solidResponse = "-kOutside-"; } 257 257 else if (insideIntPt == kSurface) 258 solidResponse = "-kSurface-";258 { solidResponse = "-kSurface-"; } 259 259 if( fVerbose == 1 ) 260 260 { … … 265 265 << " For point p: " << intersectionPoint 266 266 << ", considered as 'intersection' point." << G4endl; 267 } 268 G4double safetyIn= -1, safetyOut= -1; // Set to invalid values 269 G4double newDistIn= -1, newDistOut= -1; 270 if( insideIntPt != kInside ) 271 { 272 safetyIn= sampleSolid->DistanceToIn(intersectionPoint); 273 newDistIn= sampleSolid->DistanceToIn(intersectionPoint, 274 sampleDirection); 275 } 276 if( insideIntPt != kOutside ) 277 { 278 safetyOut= sampleSolid->DistanceToOut(intersectionPoint); 279 newDistOut= sampleSolid->DistanceToOut(intersectionPoint, 280 sampleDirection); 267 281 } 268 282 if( insideIntPt != kSurface ) … … 277 291 << " for this point !" << G4endl; 278 292 G4cout << " Point = " << intersectionPoint << G4endl; 293 G4cout << " Safety values: " << G4endl; 279 294 if ( insideIntPt != kInside ) 280 G4cout << " DistanceToIn(p) = "281 << sampleSolid->DistanceToIn(intersectionPoint)295 { 296 G4cout << " DistanceToIn(p) = " << safetyIn 282 297 << G4endl; 283 if ( insideIntPt != kOutside ) 284 G4cout << " DistanceToOut(p) = " 285 << sampleSolid->DistanceToOut(intersectionPoint) 298 } 299 if ( insideIntPt != kOutside ) 300 { 301 G4cout << " DistanceToOut(p) = " << safetyOut 286 302 << G4endl; 303 } 287 304 G4Exception("G4VoxelNavigation::ComputeStep()", 288 305 "InaccurateDistanceToIn", JustWarning, 289 " Navigator gets conflicting response from Solid.");306 "Conflicting response from Solid."); 290 307 G4cout.precision(oldcoutPrec); 308 } 309 else 310 { 311 // If it is on the surface, *ensure* that either DistanceToIn 312 // or DistanceToOut returns a finite value ( >= Tolerance). 313 // 314 if( std::max( newDistIn, newDistOut ) <= kCarTolerance ) 315 { 316 G4cout << "ERROR - G4VoxelNavigation::ComputeStep()" 317 << G4endl 318 << " Identified point for which the solid " 319 << sampleSolid->GetName() << G4endl 320 << " has MAJOR problem: " << G4endl 321 << " --> Both DistanceToIn(p,v) and DistanceToOut(p,v) " 322 << "return Zero, an equivalent value or negative value." 323 << G4endl; 324 G4cout << " Solid: " << sampleSolid << G4endl; 325 G4cout << " Point p= " << intersectionPoint << G4endl; 326 G4cout << " Direction v= " << sampleDirection << G4endl; 327 G4cout << " DistanceToIn(p,v) = " << newDistIn 328 << G4endl; 329 G4cout << " DistanceToOut(p,v,..) = " << newDistOut 330 << G4endl; 331 G4cout << " Safety values: " << G4endl; 332 G4cout << " DistanceToIn(p) = " << safetyIn 333 << G4endl; 334 G4cout << " DistanceToOut(p) = " << safetyOut 335 << G4endl; 336 G4Exception("G4VoxelNavigation::ComputeStep()", 337 "DistanceToInAndOutAreZero", FatalException, 338 "Zero from both Solid DistanceIn and Out(p,v)."); 339 } 291 340 } 292 341 } -
trunk/source/geometry/solids/CSG/History
r850 r921 1 $Id: History,v 1.10 5 2008/07/07 10:43:04gcosmo Exp $1 $Id: History,v 1.109 2008/11/21 09:50:20 gcosmo Exp $ 2 2 ------------------------------------------------------------------- 3 3 … … 17 17 * Reverse chronological order (last date on top), please * 18 18 ---------------------------------------------------------- 19 20 Nov 21, 2008 G.Cosmo geom-csg-V09-01-08 21 - G4Sphere: defined Get/SetInnerRadius() accessors to be compliant with 22 other CSG solids and allow consistent treatment in persistency code... 23 24 Nov 06, 2008 G.Cosmo geom-csg-V09-01-07 25 - G4Tubs, G4Cons: implemented caching of trigonometric values, now directly 26 computed inside modifiers for Phi angles and required for parametrised 27 cases. Improvement bringing up to 20% speedup in normal tracking for 28 tube/cone-sections placements. 29 30 Nov 05, 2008 G.Cosmo geom-csg-V09-01-06 31 - G4Cons: implemented first speed improvements and corrections from joint 32 code review of G4Cons class. Cached computation for half-tolerance and 33 use of Boolean flag for identifying if full-cone or section. 34 - G4Tubs: more refinements to previous review; corrected implementation 35 of constructor to conform to implementation as in G4Cons. Fixed issue in 36 SetDeltaPhi() method after changes introduced in the previous tag. 37 38 Sep 18, 2008 T.Nikitina geom-csg-V09-01-05 39 - G4Tubs: implemented first speed improvements and corrections from joint 40 code review of G4Tubs class. Cached computation for half-tolerance and 41 use of Boolean flag for identifying if full-tube or section. 19 42 20 43 Jul 07, 2008 V.Grichine geom-csg-V09-01-04 -
trunk/source/geometry/solids/CSG/include/G4Cons.hh
r850 r921 25 25 // 26 26 // 27 // $Id: G4Cons.hh,v 1. 18 2007/05/18 07:38:00 gcosmo Exp $28 // GEANT4 tag $Name: HEAD$27 // $Id: G4Cons.hh,v 1.21 2008/11/06 11:04:00 gcosmo Exp $ 28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 29 // 30 30 // … … 54 54 // fDPhi delta angle of the segment in radians 55 55 // 56 // fPhiFullCone Boolean variable used for indicate the Phi Section 57 // 56 58 // Note: 57 59 // Internally fSPhi & fDPhi are adjusted so that fDPhi<=2PI, … … 73 75 public: // with description 74 76 75 G4Cons(const G4String& pName,76 G4double pRmin1, G4double pRmax1,77 G4double pRmin2, G4double pRmax2,78 G4double pDz,79 G4double pSPhi, G4double pDPhi);77 G4Cons(const G4String& pName, 78 G4double pRmin1, G4double pRmax1, 79 G4double pRmin2, G4double pRmax2, 80 G4double pDz, 81 G4double pSPhi, G4double pDPhi); 80 82 81 virtual ~G4Cons() ;82 83 // Accessors84 85 inline G4double GetInnerRadiusMinusZ() const;86 inline G4double GetOuterRadiusMinusZ() const;87 inline G4double GetInnerRadiusPlusZ() const;88 inline G4double GetOuterRadiusPlusZ() const;89 90 inline G4double GetZHalfLength() const;91 92 inline G4double GetStartPhiAngle () const;93 inline G4double GetDeltaPhiAngle () const;94 95 // Modifiers96 97 inline void SetInnerRadiusMinusZ( G4double Rmin1 );98 inline void SetOuterRadiusMinusZ( G4double Rmax1 );99 inline void SetInnerRadiusPlusZ ( G4double Rmin2 );100 inline void SetOuterRadiusPlusZ ( G4double Rmax2 );83 virtual ~G4Cons() ; 84 85 // Accessors 86 87 inline G4double GetInnerRadiusMinusZ() const; 88 inline G4double GetOuterRadiusMinusZ() const; 89 inline G4double GetInnerRadiusPlusZ() const; 90 inline G4double GetOuterRadiusPlusZ() const; 91 92 inline G4double GetZHalfLength() const; 93 94 inline G4double GetStartPhiAngle () const; 95 inline G4double GetDeltaPhiAngle () const; 96 97 // Modifiers 98 99 inline void SetInnerRadiusMinusZ( G4double Rmin1 ); 100 inline void SetOuterRadiusMinusZ( G4double Rmax1 ); 101 inline void SetInnerRadiusPlusZ ( G4double Rmin2 ); 102 inline void SetOuterRadiusPlusZ ( G4double Rmax2 ); 101 103 102 inline void SetZHalfLength ( G4double newDz );103 inline void SetStartPhiAngle ( G4double newSPhi);104 inline void SetDeltaPhiAngle ( G4double newDPhi);105 106 // Other methods for solid107 108 inline G4double GetCubicVolume();109 inline G4double GetSurfaceArea();110 111 void ComputeDimensions(G4VPVParameterisation* p,112 const G4int n,113 const G4VPhysicalVolume* pRep);114 115 G4bool CalculateExtent(const EAxis pAxis,116 const G4VoxelLimits& pVoxelLimit,117 const G4AffineTransform& pTransform,118 G4double& pmin, G4double& pmax) const;119 120 EInside Inside(const G4ThreeVector& p) const;121 122 G4ThreeVector SurfaceNormal(const G4ThreeVector& p) const;123 124 G4double DistanceToIn(const G4ThreeVector& p,125 const G4ThreeVector& v) const;126 G4double DistanceToIn(const G4ThreeVector& p) const;127 G4double DistanceToOut(const G4ThreeVector& p,128 const G4ThreeVector& v,129 const G4bool calcNorm=G4bool(false),130 G4bool *validNorm=0,131 G4ThreeVector *n=0) const;132 G4double DistanceToOut(const G4ThreeVector& p) const;133 134 G4GeometryType GetEntityType() const;104 inline void SetZHalfLength ( G4double newDz ); 105 inline void SetStartPhiAngle ( G4double newSPhi); 106 inline void SetDeltaPhiAngle ( G4double newDPhi); 107 108 // Other methods for solid 109 110 inline G4double GetCubicVolume(); 111 inline G4double GetSurfaceArea(); 112 113 void ComputeDimensions(G4VPVParameterisation* p, 114 const G4int n, 115 const G4VPhysicalVolume* pRep); 116 117 G4bool CalculateExtent(const EAxis pAxis, 118 const G4VoxelLimits& pVoxelLimit, 119 const G4AffineTransform& pTransform, 120 G4double& pmin, G4double& pmax) const; 121 122 EInside Inside(const G4ThreeVector& p) const; 123 124 G4ThreeVector SurfaceNormal(const G4ThreeVector& p) const; 125 126 G4double DistanceToIn (const G4ThreeVector& p, 127 const G4ThreeVector& v) const; 128 G4double DistanceToIn (const G4ThreeVector& p) const; 129 G4double DistanceToOut(const G4ThreeVector& p, 130 const G4ThreeVector& v, 131 const G4bool calcNorm=G4bool(false), 132 G4bool *validNorm=0, 133 G4ThreeVector *n=0) const; 134 G4double DistanceToOut(const G4ThreeVector& p) const; 135 136 G4GeometryType GetEntityType() const; 135 137 136 G4ThreeVector GetPointOnSurface() const;138 G4ThreeVector GetPointOnSurface() const; 137 139 138 std::ostream& StreamInfo(std::ostream& os) const;139 140 // Visualisation functions141 142 void DescribeYourselfTo( G4VGraphicsScene& scene ) const;143 G4Polyhedron* CreatePolyhedron() const;144 G4NURBS* CreateNURBS() const;140 std::ostream& StreamInfo(std::ostream& os) const; 141 142 // Visualisation functions 143 144 void DescribeYourselfTo( G4VGraphicsScene& scene ) const; 145 G4Polyhedron* CreatePolyhedron() const; 146 G4NURBS* CreateNURBS() const; 145 147 146 148 public: // without description 147 149 148 G4Cons(__void__&); 149 // Fake default constructor for usage restricted to direct object 150 // persistency for clients requiring preallocation of memory for 151 // persistifiable objects. 152 153 // Old access functions 154 155 inline G4double GetRmin1() const; 156 inline G4double GetRmax1() const; 157 inline G4double GetRmin2() const; 158 inline G4double GetRmax2() const; 159 160 inline G4double GetDz() const; 161 162 inline G4double GetSPhi() const; 163 inline G4double GetDPhi() const; 150 G4Cons(__void__&); 151 // 152 // Fake default constructor for usage restricted to direct object 153 // persistency for clients requiring preallocation of memory for 154 // persistifiable objects. 155 156 // Old access functions 157 158 inline G4double GetRmin1() const; 159 inline G4double GetRmax1() const; 160 inline G4double GetRmin2() const; 161 inline G4double GetRmax2() const; 162 163 inline G4double GetDz() const; 164 165 inline G4double GetSPhi() const; 166 inline G4double GetDPhi() const; 164 167 165 168 protected: 166 169 167 G4ThreeVectorList* 168 CreateRotatedVertices(const G4AffineTransform& pTransform) const; 169 170 // Used by distanceToOut 171 172 enum ESide {kNull,kRMin,kRMax,kSPhi,kEPhi,kPZ,kMZ}; 173 174 // used by normal 175 176 enum ENorm {kNRMin,kNRMax,kNSPhi,kNEPhi,kNZ}; 170 G4ThreeVectorList* 171 CreateRotatedVertices(const G4AffineTransform& pTransform) const; 172 173 G4double fRmin1, fRmin2, fRmax1, fRmax2, fDz, fSPhi, fDPhi; 174 G4bool fPhiFullCone; 175 176 // Used by distanceToOut 177 178 enum ESide {kNull,kRMin,kRMax,kSPhi,kEPhi,kPZ,kMZ}; 179 180 // used by normal 181 182 enum ENorm {kNRMin,kNRMax,kNSPhi,kNEPhi,kNZ}; 177 183 178 184 private: 179 185 180 G4ThreeVector ApproxSurfaceNormal(const G4ThreeVector& p) const; 181 // Algorithm for SurfaceNormal() following the original 182 // specification for points not on the surface 186 inline void Initialise(); 187 // Reset relevant values to zero 188 189 inline void InitializeTrigonometry(); 190 // 191 // Recompute relevant trigonometric values and cache them 192 193 G4ThreeVector ApproxSurfaceNormal(const G4ThreeVector& p) const; 194 // 195 // Algorithm for SurfaceNormal() following the original 196 // specification for points not on the surface 183 197 184 198 private: 185 199 186 G4double kRadTolerance, kAngTolerance; 187 188 G4double fRmin1,fRmin2, 189 fRmax1,fRmax2, 190 fDz, 191 fSPhi,fDPhi; 200 G4double kRadTolerance, kAngTolerance; 201 // 202 // Radial and angular tolerances 203 204 G4double sinCPhi, cosCPhi, cosHDPhiOT, cosHDPhiIT, 205 sinSPhi, cosSPhi, sinEPhi, cosEPhi; 206 // 207 // Cached trigonometric values 192 208 }; 193 209 -
trunk/source/geometry/solids/CSG/include/G4Cons.icc
r850 r921 25 25 // 26 26 // 27 // $Id: G4Cons.icc,v 1. 6 2006/10/19 15:33:37gcosmo Exp $28 // GEANT4 tag $Name: HEAD$27 // $Id: G4Cons.icc,v 1.8 2008/11/06 10:55:40 gcosmo Exp $ 28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 29 // 30 30 // -------------------------------------------------------------------- … … 37 37 38 38 inline 39 G4double G4Cons::GetInnerRadiusMinusZ() const 40 { 41 return fRmin1 ; 42 } 43 44 inline 45 G4double G4Cons::GetOuterRadiusMinusZ() const 46 { 47 return fRmax1 ; 48 } 49 50 inline 51 G4double G4Cons::GetInnerRadiusPlusZ() const 52 { 53 return fRmin2 ; 54 } 55 56 inline 57 G4double G4Cons::GetOuterRadiusPlusZ() const 58 { 59 return fRmax2 ; 60 } 61 62 inline 63 G4double G4Cons::GetZHalfLength() const 64 { 65 return fDz ; 66 } 67 68 inline 69 G4double G4Cons::GetStartPhiAngle() const 70 { 71 return fSPhi ; 72 } 73 74 inline 75 G4double G4Cons::GetDeltaPhiAngle() const 76 { 77 return fDPhi; 78 } 79 80 inline 81 void G4Cons::SetInnerRadiusMinusZ( G4double Rmin1 ) 82 { 83 fRmin1= Rmin1 ; 39 void G4Cons::Initialise() 40 { 84 41 fCubicVolume= 0.; 85 42 fSurfaceArea= 0.; … … 87 44 } 88 45 46 inline 47 void G4Cons::InitializeTrigonometry() 48 { 49 G4double hDPhi = 0.5*fDPhi; // half delta phi 50 G4double cPhi = fSPhi + hDPhi; 51 G4double ePhi = fSPhi + fDPhi; 52 53 sinCPhi = std::sin(cPhi); 54 cosCPhi = std::cos(cPhi); 55 cosHDPhiIT = std::cos(hDPhi - 0.5*kAngTolerance); // inner/outer tol half dphi 56 cosHDPhiOT = std::cos(hDPhi + 0.5*kAngTolerance); 57 sinSPhi = std::sin(fSPhi); 58 cosSPhi = std::cos(fSPhi); 59 sinEPhi = std::sin(ePhi); 60 cosEPhi = std::cos(ePhi); 61 } 62 63 inline 64 G4double G4Cons::GetInnerRadiusMinusZ() const 65 { 66 return fRmin1 ; 67 } 68 69 inline 70 G4double G4Cons::GetOuterRadiusMinusZ() const 71 { 72 return fRmax1 ; 73 } 74 75 inline 76 G4double G4Cons::GetInnerRadiusPlusZ() const 77 { 78 return fRmin2 ; 79 } 80 81 inline 82 G4double G4Cons::GetOuterRadiusPlusZ() const 83 { 84 return fRmax2 ; 85 } 86 87 inline 88 G4double G4Cons::GetZHalfLength() const 89 { 90 return fDz ; 91 } 92 93 inline 94 G4double G4Cons::GetStartPhiAngle() const 95 { 96 return fSPhi ; 97 } 98 99 inline 100 G4double G4Cons::GetDeltaPhiAngle() const 101 { 102 return fDPhi; 103 } 104 105 inline 106 void G4Cons::SetInnerRadiusMinusZ( G4double Rmin1 ) 107 { 108 fRmin1= Rmin1 ; 109 Initialise(); 110 } 111 89 112 inline 90 113 void G4Cons::SetOuterRadiusMinusZ( G4double Rmax1 ) 91 114 { 92 115 fRmax1= Rmax1 ; 93 fCubicVolume= 0.; 94 fSurfaceArea= 0.; 95 fpPolyhedron = 0; 116 Initialise(); 96 117 } 97 118 … … 100 121 { 101 122 fRmin2= Rmin2 ; 102 fCubicVolume= 0.; 103 fSurfaceArea= 0.; 104 fpPolyhedron = 0; 123 Initialise(); 105 124 } 106 125 … … 109 128 { 110 129 fRmax2= Rmax2 ; 111 fCubicVolume= 0.; 112 fSurfaceArea= 0.; 113 fpPolyhedron = 0; 130 Initialise(); 114 131 } 115 132 … … 118 135 { 119 136 fDz= newDz ; 120 fCubicVolume= 0.; 121 fSurfaceArea= 0.; 122 fpPolyhedron = 0; 137 Initialise(); 123 138 } 124 139 … … 127 142 { 128 143 fSPhi= newSPhi; 129 fCubicVolume= 0.; 130 fSurfaceArea= 0.; 131 fpPolyhedron = 0; 144 Initialise(); 145 InitializeTrigonometry(); 132 146 } 133 147 134 148 void G4Cons::SetDeltaPhiAngle ( G4double newDPhi ) 135 149 { 150 if ( newDPhi >= twopi-kAngTolerance*0.5 ) 151 { 152 fPhiFullCone = true; 153 } 154 else if ( newDPhi > 0 ) 155 { 156 fPhiFullCone = false; 157 } 158 else 159 { 160 G4cerr << "ERROR - G4Cons()::SetDeltaPhiAngle() : " << GetName() << G4endl 161 << " Negative delta-Phi ! - " << newDPhi << G4endl; 162 G4Exception("G4Cons::SetDeltaPhiAngle()", "InvalidSetup", 163 FatalException, "Invalid dphi."); 164 } 136 165 fDPhi= newDPhi; 137 fCubicVolume= 0.; 138 fSurfaceArea= 0.; 139 fpPolyhedron = 0; 166 Initialise(); 167 InitializeTrigonometry(); 140 168 } 141 169 … … 220 248 + 0.5*(fRmax1*fRmax1-fRmin1*fRmin1 221 249 +fRmax2*fRmax2-fRmin2*fRmin2 )); 222 if( fDPhi < twopi)250 if(!fPhiFullCone) 223 251 { 224 252 fSurfaceArea = fSurfaceArea+4*fDz*(mmax-mmin); -
trunk/source/geometry/solids/CSG/include/G4Sphere.hh
r850 r921 25 25 // 26 26 // 27 // $Id: G4Sphere.hh,v 1.2 0 2007/05/18 07:38:00gcosmo Exp $28 // GEANT4 tag $Name: HEAD$27 // $Id: G4Sphere.hh,v 1.21 2008/11/21 09:50:05 gcosmo Exp $ 28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 29 // 30 30 // … … 88 88 // Accessors 89 89 90 inline G4double GetIn sideRadius() const;90 inline G4double GetInnerRadius () const; 91 91 inline G4double GetOuterRadius () const; 92 92 inline G4double GetStartPhiAngle () const; … … 97 97 // Modifiers 98 98 99 inline void SetIn sideRadius (G4double newRmin);99 inline void SetInnerRadius (G4double newRMin); 100 100 inline void SetOuterRadius (G4double newRmax); 101 101 inline void SetStartPhiAngle (G4double newSphi); … … 162 162 inline G4double GetSTheta() const; 163 163 inline G4double GetDTheta() const; 164 inline G4double GetInsideRadius() const; 165 inline void SetInsideRadius(G4double newRmin); 164 166 165 167 protected: -
trunk/source/geometry/solids/CSG/include/G4Sphere.icc
r850 r921 25 25 // 26 26 // 27 // $Id: G4Sphere.icc,v 1. 7 2006/10/19 15:33:37gcosmo Exp $28 // GEANT4 tag $Name: HEAD$27 // $Id: G4Sphere.icc,v 1.8 2008/11/21 09:50:05 gcosmo Exp $ 28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 29 // 30 30 // -------------------------------------------------------------------- … … 43 43 44 44 inline 45 G4double G4Sphere::GetInnerRadius() const 46 { 47 return fRmin; 48 } 49 50 inline 45 51 G4double G4Sphere::GetOuterRadius() const 46 52 { … … 73 79 inline 74 80 void G4Sphere::SetInsideRadius(G4double newRmin) 81 { 82 fRmin= newRmin; 83 fCubicVolume= 0.; 84 fSurfaceArea= 0.; 85 fpPolyhedron = 0; 86 } 87 88 inline 89 void G4Sphere::SetInnerRadius(G4double newRmin) 75 90 { 76 91 fRmin= newRmin; -
trunk/source/geometry/solids/CSG/include/G4Tubs.hh
r850 r921 25 25 // 26 26 // 27 // $Id: G4Tubs.hh,v 1. 17 2007/05/18 07:38:00 gcosmo Exp $28 // GEANT4 tag $Name: HEAD$27 // $Id: G4Tubs.hh,v 1.21 2008/11/06 10:55:40 gcosmo Exp $ 28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 29 // 30 30 // … … 39 39 // A tube or tube segment with curved sides parallel to 40 40 // the z-axis. The tube has a specified half-length along 41 // the z axis, about which it is centred, and a given41 // the z-axis, about which it is centered, and a given 42 42 // minimum and maximum radius. A minimum radius of 0 43 // signifies afilled tube /cylinder. The tube segment is43 // corresponds to filled tube /cylinder. The tube segment is 44 44 // specified by starting and delta angles for phi, with 0 45 45 // being the +x axis, PI/2 the +y axis. … … 57 57 // 58 58 // fDPhi Delta angle of the segment. 59 // 60 // fPhiFullTube Boolean variable used for indicate the Phi Section 59 61 60 62 // History: … … 103 105 inline void SetStartPhiAngle (G4double newSPhi); 104 106 inline void SetDeltaPhiAngle (G4double newDPhi); 105 107 106 108 // Methods for solid 107 109 … … 144 146 145 147 G4Tubs(__void__&); 148 // 146 149 // Fake default constructor for usage restricted to direct object 147 150 // persistency for clients requiring preallocation of memory for … … 164 167 // for G4VSolid:: ClipCrossSection and ClipBetweenSections 165 168 166 G4double fRMin,fRMax,fDz,fSPhi,fDPhi; 167 168 // Used by distanceToOut 169 G4double fRMin, fRMax, fDz, fSPhi, fDPhi; 170 G4bool fPhiFullTube; 171 172 // Used by distanceToOut 169 173 170 174 enum ESide {kNull,kRMin,kRMax,kSPhi,kEPhi,kPZ,kMZ}; 171 175 172 // used by normal176 // Used by normal 173 177 174 178 enum ENorm {kNRMin,kNRMax,kNSPhi,kNEPhi,kNZ}; … … 176 180 private: 177 181 182 inline void Initialize(); 183 // 184 // Reset relevant values to zero 185 186 inline void InitializeTrigonometry(); 187 // 188 // Recompute relevant trigonometric values and cache them 189 178 190 G4ThreeVector ApproxSurfaceNormal( const G4ThreeVector& p ) const; 191 // 179 192 // Algorithm for SurfaceNormal() following the original 180 193 // specification for points not on the surface … … 183 196 184 197 G4double kRadTolerance, kAngTolerance; 198 // 185 199 // Radial and angular tolerances 200 201 G4double sinCPhi, cosCPhi, cosHDPhiOT, cosHDPhiIT, 202 sinSPhi, cosSPhi, sinEPhi, cosEPhi; 203 // 204 // Cached trigonometric values 186 205 }; 187 206 -
trunk/source/geometry/solids/CSG/include/G4Tubs.icc
r850 r921 25 25 // 26 26 // 27 // $Id: G4Tubs.icc,v 1. 7 2006/10/19 15:33:37gcosmo Exp $28 // GEANT4 tag $Name: HEAD$27 // $Id: G4Tubs.icc,v 1.11 2008/11/06 10:55:40 gcosmo Exp $ 28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 29 // 30 30 // -------------------------------------------------------------------- … … 66 66 } 67 67 68 inline 69 void G4Tubs::Initialize() 70 { 71 fCubicVolume = 0.; 72 fSurfaceArea = 0.; 73 fpPolyhedron = 0; 74 } 75 76 inline 77 void G4Tubs::InitializeTrigonometry() 78 { 79 G4double hDPhi = 0.5*fDPhi; // half delta phi 80 G4double cPhi = fSPhi + hDPhi; 81 G4double ePhi = fSPhi + fDPhi; 82 83 sinCPhi = std::sin(cPhi); 84 cosCPhi = std::cos(cPhi); 85 cosHDPhiIT = std::cos(hDPhi - 0.5*kAngTolerance); // inner/outer tol half dphi 86 cosHDPhiOT = std::cos(hDPhi + 0.5*kAngTolerance); 87 sinSPhi = std::sin(fSPhi); 88 cosSPhi = std::cos(fSPhi); 89 sinEPhi = std::sin(ePhi); 90 cosEPhi = std::cos(ePhi); 91 } 92 68 93 inline 69 94 void G4Tubs::SetInnerRadius (G4double newRMin) 70 95 { 71 96 fRMin= newRMin; 72 fCubicVolume= 0.; 73 fSurfaceArea= 0.; 74 fpPolyhedron = 0; 97 Initialize(); 75 98 } 76 99 … … 79 102 { 80 103 fRMax= newRMax; 81 fCubicVolume= 0.; 82 fSurfaceArea= 0.; 83 fpPolyhedron = 0; 104 Initialize(); 84 105 } 85 106 … … 88 109 { 89 110 fDz= newDz; 90 fCubicVolume= 0.; 91 fSurfaceArea= 0.; 92 fpPolyhedron = 0; 111 Initialize(); 93 112 } 94 113 … … 97 116 { 98 117 fSPhi= newSPhi; 99 fCubicVolume= 0.; 100 fSurfaceArea= 0.; 101 fpPolyhedron = 0; 118 Initialize(); 119 InitializeTrigonometry(); 102 120 } 103 121 … … 105 123 void G4Tubs::SetDeltaPhiAngle (G4double newDPhi) 106 124 { 125 if ( newDPhi >= twopi-kAngTolerance*0.5 ) 126 { 127 fPhiFullTube = true; 128 } 129 else if ( newDPhi > 0 ) 130 { 131 fPhiFullTube = false; 132 } 133 else 134 { 135 G4cerr << "ERROR - G4Tubs()::SetDeltaPhiAngle() : " << GetName() << G4endl 136 << " Negative delta-Phi ! - " << newDPhi << G4endl; 137 G4Exception("G4Tubs::SetDeltaPhiAngle()", "InvalidSetup", 138 FatalException, "Invalid dphi."); 139 } 107 140 fDPhi= newDPhi; 108 fCubicVolume= 0.; 109 fSurfaceArea= 0.; 110 fpPolyhedron = 0; 141 Initialize(); 142 InitializeTrigonometry(); 111 143 } 112 144 … … 158 190 { 159 191 fSurfaceArea = fDPhi*(fRMin+fRMax)*(2*fDz+fRMax-fRMin); 160 if ( fDPhi < twopi)192 if (!fPhiFullTube) 161 193 { 162 194 fSurfaceArea = fSurfaceArea + 4*fDz*(fRMax-fRMin); -
trunk/source/geometry/solids/CSG/src/G4Cons.cc
r850 r921 25 25 // 26 26 // 27 // $Id: G4Cons.cc,v 1. 56 2008/02/20 08:56:16gcosmo Exp $28 // GEANT4 tag $Name: HEAD$27 // $Id: G4Cons.cc,v 1.60 2008/11/06 15:26:53 gcosmo Exp $ 28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 29 // 30 30 // … … 87 87 88 88 if ( pDz > 0 ) 89 fDz = pDz ; 89 { 90 fDz = pDz; 91 } 90 92 else 91 93 { … … 99 101 // Check radii 100 102 101 if ( pRmin1 < pRmax1 && pRmin2 < pRmax2 && pRmin1 >= 0 && pRmin2 >= 0)103 if ( (pRmin1<pRmax1) && (pRmin2<pRmax2) && (pRmin1>=0) && (pRmin2>=0) ) 102 104 { 103 105 … … 106 108 fRmin2 = pRmin2 ; 107 109 fRmax2 = pRmax2 ; 108 if( (pRmin1 == 0.0 && pRmin2 > 0.0) ) fRmin1 = 1e3*kRadTolerance ;109 if( (pRmin2 == 0.0 && pRmin1 > 0.0) ) fRmin2 = 1e3*kRadTolerance ;110 if( (pRmin1 == 0.0) && (pRmin2 > 0.0) ) { fRmin1 = 1e3*kRadTolerance ; } 111 if( (pRmin2 == 0.0) && (pRmin1 > 0.0) ) { fRmin2 = 1e3*kRadTolerance ; } 110 112 } 111 113 else … … 119 121 } 120 122 121 // Check angles 122 123 if ( pDPhi >= twopi ) 123 fPhiFullCone = true; 124 if ( pDPhi >= twopi-kAngTolerance*0.5 ) // Check angles 124 125 { 125 126 fDPhi=twopi; … … 128 129 else 129 130 { 130 if ( pDPhi > 0 ) fDPhi = pDPhi ; 131 fPhiFullCone = false; 132 if ( pDPhi > 0 ) 133 { 134 fDPhi = pDPhi; 135 } 131 136 else 132 137 { … … 135 140 << pDPhi << G4endl; 136 141 G4Exception("G4Cons::G4Cons()", "InvalidSetup", 137 FatalException, "Invalid pDPhi.") ; 138 } 139 140 // Ensure pSPhi in 0-2PI or -2PI-0 range if shape crosses 0 141 142 if ( pSPhi < 0 ) fSPhi = twopi - std::fmod(std::fabs(pSPhi),twopi) ; 143 else fSPhi = std::fmod(pSPhi,twopi) ; 144 145 if (fSPhi + fDPhi > twopi) fSPhi -= twopi ; 146 } 142 FatalException, "Invalid dphi."); 143 } 144 145 // Ensure fSphi in 0-2PI or -2PI-0 range if shape crosses 0 146 147 if ( pSPhi < 0 ) 148 { 149 fSPhi = twopi - std::fmod(std::fabs(pSPhi),twopi); 150 } 151 else 152 { 153 fSPhi = std::fmod(pSPhi,twopi) ; 154 } 155 if ( fSPhi+fDPhi > twopi ) 156 { 157 fSPhi -= twopi ; 158 } 159 } 160 InitializeTrigonometry(); 147 161 } 148 162 … … 173 187 G4double r2, rl, rh, pPhi, tolRMin, tolRMax; // rh2, rl2 ; 174 188 EInside in; 175 176 if (std::fabs(p.z()) > fDz + kCarTolerance*0.5 ) return in = kOutside; 177 else if(std::fabs(p.z()) >= fDz - kCarTolerance*0.5 ) in = kSurface; 178 else in = kInside; 189 static const G4double halfCarTolerance=kCarTolerance*0.5; 190 static const G4double halfRadTolerance=kRadTolerance*0.5; 191 static const G4double halfAngTolerance=kAngTolerance*0.5; 192 193 if (std::fabs(p.z()) > fDz + halfCarTolerance ) { return in = kOutside; } 194 else if(std::fabs(p.z()) >= fDz - halfCarTolerance ) { in = kSurface; } 195 else { in = kInside; } 179 196 180 197 r2 = p.x()*p.x() + p.y()*p.y() ; … … 184 201 // rh2 = rh*rh; 185 202 186 tolRMin = rl - kRadTolerance*0.5;187 if ( tolRMin < 0 ) tolRMin = 0 ;188 tolRMax = rh + kRadTolerance*0.5;189 190 if ( r2 < tolRMin*tolRMin || r2 > tolRMax*tolRMax ) return in = kOutside;191 192 if (rl) tolRMin = rl + kRadTolerance*0.5 ;193 else tolRMin = 0.0 ;194 tolRMax = rh - kRadTolerance*0.5;203 tolRMin = rl - halfRadTolerance; 204 if ( tolRMin < 0 ) { tolRMin = 0; } 205 tolRMax = rh + halfRadTolerance; 206 207 if ( (r2<tolRMin*tolRMin) || (r2>tolRMax*tolRMax) ) { return in = kOutside; } 208 209 if (rl) { tolRMin = rl + halfRadTolerance; } 210 else { tolRMin = 0.0; } 211 tolRMax = rh - halfRadTolerance; 195 212 196 213 if (in == kInside) // else it's kSurface already 197 214 { 198 if (r2 < tolRMin*tolRMin || r2 >= tolRMax*tolRMax) in = kSurface; 199 // if (r2 <= tolRMin*tolRMin || r2-rh2 >= -rh*kRadTolerance) in = kSurface; 200 } 201 if ( ( fDPhi < twopi - kAngTolerance ) && 202 ( (p.x() != 0.0 ) || (p.y() != 0.0) ) ) 215 if ( (r2 < tolRMin*tolRMin) || (r2 >= tolRMax*tolRMax) ) { in = kSurface; } 216 } 217 if ( !fPhiFullCone && ((p.x() != 0.0) || (p.y() != 0.0)) ) 203 218 { 204 219 pPhi = std::atan2(p.y(),p.x()) ; 205 220 206 if ( pPhi < fSPhi - kAngTolerance*0.5 ) pPhi += twopi ;207 else if ( pPhi > fSPhi + fDPhi + kAngTolerance*0.5 ) pPhi -= twopi;221 if ( pPhi < fSPhi - halfAngTolerance ) { pPhi += twopi; } 222 else if ( pPhi > fSPhi + fDPhi + halfAngTolerance ) { pPhi -= twopi; } 208 223 209 if ( (pPhi < fSPhi - kAngTolerance*0.5) ||210 (pPhi > fSPhi + fDPhi + kAngTolerance*0.5) ) return in = kOutside;224 if ( (pPhi < fSPhi - halfAngTolerance) || 225 (pPhi > fSPhi + fDPhi + halfAngTolerance) ) { return in = kOutside; } 211 226 212 227 else if (in == kInside) // else it's kSurface anyway already 213 228 { 214 if ( (pPhi < fSPhi + kAngTolerance*0.5) ||215 (pPhi > fSPhi + fDPhi - kAngTolerance*0.5) ) in = kSurface ;216 } 217 } 218 else if ( fDPhi < twopi - kAngTolerance ) in = kSurface ;229 if ( (pPhi < fSPhi + halfAngTolerance) || 230 (pPhi > fSPhi + fDPhi - halfAngTolerance) ) { in = kSurface; } 231 } 232 } 233 else if ( !fPhiFullCone ) { in = kSurface; } 219 234 220 235 return in ; … … 244 259 G4double& pMax ) const 245 260 { 246 if ( !pTransform.IsRotated() && 247 fDPhi == twopi && fRmin1 == 0 && fRmin2 == 0)261 if ( !pTransform.IsRotated() && (fDPhi == twopi) 262 && (fRmin1 == 0) && (fRmin2 == 0) ) 248 263 { 249 264 // Special case handling for unrotated solid cones … … 265 280 if (pVoxelLimit.IsZLimited()) 266 281 { 267 if( zMin > pVoxelLimit.GetMaxZExtent() + kCarTolerance||268 zMax < pVoxelLimit.GetMinZExtent() - kCarTolerance)282 if( (zMin > pVoxelLimit.GetMaxZExtent() + kCarTolerance) || 283 (zMax < pVoxelLimit.GetMinZExtent() - kCarTolerance) ) 269 284 { 270 285 return false ; … … 290 305 if (pVoxelLimit.IsXLimited()) 291 306 { 292 if ( xMin > pVoxelLimit.GetMaxXExtent() + kCarTolerance||293 xMax < pVoxelLimit.GetMinXExtent() - kCarTolerance)307 if ( (xMin > pVoxelLimit.GetMaxXExtent() + kCarTolerance) || 308 (xMax < pVoxelLimit.GetMinXExtent() - kCarTolerance) ) 294 309 { 295 310 return false ; … … 315 330 if (pVoxelLimit.IsYLimited()) 316 331 { 317 if ( yMin > pVoxelLimit.GetMaxYExtent() + kCarTolerance||318 yMax < pVoxelLimit.GetMinYExtent() - kCarTolerance)332 if ( (yMin > pVoxelLimit.GetMaxYExtent() + kCarTolerance) || 333 (yMax < pVoxelLimit.GetMinYExtent() - kCarTolerance) ) 319 334 { 320 335 return false ; … … 338 353 yoff2 = yMax - yoffset ; 339 354 340 if ( yoff1 >= 0 && yoff2 >= 0) // Y limits cross max/min x => no change341 { 355 if ((yoff1 >= 0) && (yoff2 >= 0)) // Y limits cross max/min x 356 { // => no change 342 357 pMin = xMin ; 343 358 pMax = xMax ; … … 362 377 xoff2 = xMax - xoffset ; 363 378 364 if ( xoff1 >= 0 && xoff2 >= 0 ) // X limits cross max/min y => no change365 { 379 if ((xoff1 >= 0) && (xoff2 >= 0) ) // X limits cross max/min y 380 { // => no change 366 381 pMin = yMin ; 367 382 pMax = yMax ; … … 409 424 for ( i = 0 ; i < noEntries ; i += 4 ) 410 425 { 411 ClipCrossSection(vertices, i,pVoxelLimit,pAxis,pMin,pMax) ;426 ClipCrossSection(vertices, i, pVoxelLimit, pAxis, pMin, pMax) ; 412 427 } 413 428 for ( i = 0 ; i < noBetweenSections4 ; i += 4 ) 414 429 { 415 ClipBetweenSections(vertices, i,pVoxelLimit,pAxis,pMin,pMax) ;430 ClipBetweenSections(vertices, i, pVoxelLimit, pAxis, pMin, pMax) ; 416 431 } 417 if ( pMin != kInfinity || pMax != -kInfinity)432 if ( (pMin != kInfinity) || (pMax != -kInfinity) ) 418 433 { 419 434 existsAfterClip = true ; … … 462 477 G4double tanRMin, secRMin, pRMin, widRMin; 463 478 G4double tanRMax, secRMax, pRMax, widRMax; 464 G4double delta = 0.5*kCarTolerance, dAngle = 0.5*kAngTolerance; 479 480 static const G4double delta = 0.5*kCarTolerance; 481 static const G4double dAngle = 0.5*kAngTolerance; 465 482 466 G4ThreeVector norm, sumnorm(0.,0.,0.), nZ = G4ThreeVector(0.,0.,1. 0);483 G4ThreeVector norm, sumnorm(0.,0.,0.), nZ = G4ThreeVector(0.,0.,1.); 467 484 G4ThreeVector nR, nr(0.,0.,0.), nPs, nPe; 468 485 … … 482 499 distRMax = std::fabs(pRMax - widRMax)/secRMax; 483 500 484 if ( fDPhi < twopi) // && rho )// Protected against (0,0,z)501 if (!fPhiFullCone) // Protected against (0,0,z) 485 502 { 486 503 if ( rho ) … … 488 505 pPhi = std::atan2(p.y(),p.x()); 489 506 490 if (pPhi < fSPhi-delta) pPhi += twopi;491 else if (pPhi > fSPhi+fDPhi+delta) pPhi -= twopi;507 if (pPhi < fSPhi-delta) { pPhi += twopi; } 508 else if (pPhi > fSPhi+fDPhi+delta) { pPhi -= twopi; } 492 509 493 510 distSPhi = std::fabs( pPhi - fSPhi ); 494 distEPhi = std::fabs( pPhi - fSPhi - fDPhi);511 distEPhi = std::fabs( pPhi - fSPhi - fDPhi ); 495 512 } 496 513 else if( !(fRmin1) || !(fRmin2) ) … … 499 516 distEPhi = 0.; 500 517 } 501 nPs = G4ThreeVector(std::sin(fSPhi), -std::cos(fSPhi),0);502 nPe = G4ThreeVector(-std::sin(fSPhi+fDPhi), std::cos(fSPhi+fDPhi),0);518 nPs = G4ThreeVector(std::sin(fSPhi), -std::cos(fSPhi), 0); 519 nPe = G4ThreeVector(-std::sin(fSPhi+fDPhi), std::cos(fSPhi+fDPhi), 0); 503 520 } 504 521 if ( rho > delta ) 505 522 { 506 nR = G4ThreeVector(p.x()/rho/secRMax,p.y()/rho/secRMax,-tanRMax/secRMax); 507 if (fRmin1 || fRmin2) nr = G4ThreeVector(-p.x()/rho/secRMin,-p.y()/rho/secRMin,tanRMin/secRMin); 523 nR = G4ThreeVector(p.x()/rho/secRMax, p.y()/rho/secRMax, -tanRMax/secRMax); 524 if (fRmin1 || fRmin2) 525 { 526 nr = G4ThreeVector(-p.x()/rho/secRMin,-p.y()/rho/secRMin,tanRMin/secRMin); 527 } 508 528 } 509 529 … … 513 533 sumnorm += nR; 514 534 } 515 if( (fRmin1 || fRmin2) && distRMin <= delta)535 if( (fRmin1 || fRmin2) && (distRMin <= delta) ) 516 536 { 517 537 noSurfaces ++; 518 538 sumnorm += nr; 519 539 } 520 if( fDPhi < twopi)540 if( !fPhiFullCone ) 521 541 { 522 542 if (distSPhi <= dAngle) … … 534 554 { 535 555 noSurfaces ++; 536 if ( p.z() >= 0.) sumnorm += nZ;537 else sumnorm -= nZ;556 if ( p.z() >= 0.) { sumnorm += nZ; } 557 else { sumnorm -= nZ; } 538 558 } 539 559 if ( noSurfaces == 0 ) … … 545 565 norm = ApproxSurfaceNormal(p); 546 566 } 547 else if ( noSurfaces == 1 ) norm = sumnorm; 548 else norm = sumnorm.unit(); 567 else if ( noSurfaces == 1 ) { norm = sumnorm; } 568 else { norm = sumnorm.unit(); } 569 549 570 return norm ; 550 571 } 551 572 552 //////////////////////////////////////////////////////////////////////////// //////573 //////////////////////////////////////////////////////////////////////////// 553 574 // 554 575 // Algorithm for SurfaceNormal() following the original specification … … 605 626 } 606 627 } 607 if ( fDPhi < twopi&& rho ) // Protected against (0,0,z)628 if ( !fPhiFullCone && rho ) // Protected against (0,0,z) 608 629 { 609 630 phi = std::atan2(p.y(),p.x()) ; 610 631 611 if (phi < 0) phi += twopi ;612 613 if (fSPhi < 0) distSPhi = std::fabs(phi - (fSPhi + twopi))*rho ;614 else distSPhi = std::fabs(phi - fSPhi)*rho ;632 if (phi < 0) { phi += twopi; } 633 634 if (fSPhi < 0) { distSPhi = std::fabs(phi - (fSPhi + twopi))*rho; } 635 else { distSPhi = std::fabs(phi - fSPhi)*rho; } 615 636 616 637 distEPhi = std::fabs(phi - fSPhi - fDPhi)*rho ; … … 620 641 if (distSPhi < distEPhi) 621 642 { 622 if (distSPhi < distMin) side = kNSPhi ;643 if (distSPhi < distMin) { side = kNSPhi; } 623 644 } 624 645 else 625 646 { 626 if (distEPhi < distMin) side = kNEPhi ;647 if (distEPhi < distMin) { side = kNEPhi; } 627 648 } 628 649 } … … 631 652 case kNRMin: // Inner radius 632 653 rho *= secRMin ; 633 norm = G4ThreeVector(-p.x()/rho, -p.y()/rho,tanRMin/secRMin) ;654 norm = G4ThreeVector(-p.x()/rho, -p.y()/rho, tanRMin/secRMin) ; 634 655 break ; 635 656 case kNRMax: // Outer radius 636 657 rho *= secRMax ; 637 norm = G4ThreeVector(p.x()/rho, p.y()/rho,-tanRMax/secRMax) ;658 norm = G4ThreeVector(p.x()/rho, p.y()/rho, -tanRMax/secRMax) ; 638 659 break ; 639 660 case kNZ: // +/- dz 640 if (p.z() > 0) norm = G4ThreeVector(0,0,1) ;641 else norm = G4ThreeVector(0,0,-1) ;661 if (p.z() > 0) { norm = G4ThreeVector(0,0,1); } 662 else { norm = G4ThreeVector(0,0,-1); } 642 663 break ; 643 664 case kNSPhi: 644 norm = G4ThreeVector(std::sin(fSPhi), -std::cos(fSPhi),0) ;665 norm = G4ThreeVector(std::sin(fSPhi), -std::cos(fSPhi), 0) ; 645 666 break ; 646 667 case kNEPhi: 647 norm=G4ThreeVector(-std::sin(fSPhi+fDPhi), std::cos(fSPhi+fDPhi),0) ;668 norm=G4ThreeVector(-std::sin(fSPhi+fDPhi), std::cos(fSPhi+fDPhi), 0) ; 648 669 break ; 649 670 default: … … 677 698 // 678 699 // NOTE: 679 // - Precalculations for phi trigonometry are Done `just in time'680 700 // - `if valid' implies tolerant checking of intersection points 681 701 // - z, phi intersection from Tubs … … 686 706 G4double snxt = kInfinity ; // snxt = default return value 687 707 688 G4bool seg ; // true if segmented in phi 689 G4double hDPhi,hDPhiOT,hDPhiIT,cosHDPhiOT=0.,cosHDPhiIT=0. ; 690 // half dphi + outer tolerance 691 G4double cPhi,sinCPhi=0.,cosCPhi=0. ; // central phi 708 static const G4double halfCarTolerance=kCarTolerance*0.5; 709 static const G4double halfRadTolerance=kRadTolerance*0.5; 692 710 693 711 G4double tanRMax,secRMax,rMaxAv,rMaxOAv ; // Data for cones … … 704 722 G4double nt1,nt2,nt3 ; 705 723 G4double Comp ; 706 G4double cosSPhi,sinSPhi ; // Trig for phi start intersect707 G4double ePhi,cosEPhi,sinEPhi ; // for phi end intersect708 709 //710 // Set phi divided flag and precalcs711 //712 if (fDPhi < twopi)713 {714 seg = true ;715 hDPhi = 0.5*fDPhi ; // half delta phi716 cPhi = fSPhi + hDPhi ; ;717 hDPhiOT = hDPhi + 0.5*kAngTolerance ; // outers tol' half delta phi718 hDPhiIT = hDPhi - 0.5*kAngTolerance ;719 sinCPhi = std::sin(cPhi) ;720 cosCPhi = std::cos(cPhi) ;721 cosHDPhiOT = std::cos(hDPhiOT) ;722 cosHDPhiIT = std::cos(hDPhiIT) ;723 }724 else seg = false ;725 724 726 725 // Cone Precalcs … … 730 729 rMinAv = (fRmin1 + fRmin2)*0.5 ; 731 730 732 if (rMinAv > kRadTolerance*0.5)733 { 734 rMinOAv = rMinAv - kRadTolerance*0.5;735 rMinIAv = rMinAv + kRadTolerance*0.5;731 if (rMinAv > halfRadTolerance) 732 { 733 rMinOAv = rMinAv - halfRadTolerance ; 734 rMinIAv = rMinAv + halfRadTolerance ; 736 735 } 737 736 else … … 743 742 secRMax = std::sqrt(1.0 + tanRMax*tanRMax) ; 744 743 rMaxAv = (fRmax1 + fRmax2)*0.5 ; 745 rMaxOAv = rMaxAv + kRadTolerance*0.5;744 rMaxOAv = rMaxAv + halfRadTolerance ; 746 745 747 746 // Intersection with z-surfaces 748 747 749 tolIDz = fDz - kCarTolerance*0.5;750 tolODz = fDz + kCarTolerance*0.5;748 tolIDz = fDz - halfCarTolerance ; 749 tolODz = fDz + halfCarTolerance ; 751 750 752 751 if (std::fabs(p.z()) >= tolIDz) … … 756 755 s = (std::fabs(p.z()) - fDz)/std::fabs(v.z()) ; // Z intersect distance 757 756 758 if( s < 0.0 ) s = 0.0 ;// negative dist -> zero757 if( s < 0.0 ) { s = 0.0; } // negative dist -> zero 759 758 760 759 xi = p.x() + s*v.x() ; // Intersection coords 761 760 yi = p.y() + s*v.y() ; 762 rhoi2 = xi*xi + yi*yi ;761 rhoi2 = xi*xi + yi*yi ; 763 762 764 763 // Check validity of intersection … … 767 766 if (v.z() > 0) 768 767 { 769 tolORMin = fRmin1 - 0.5*kRadTolerance*secRMin ;770 tolIRMin = fRmin1 + 0.5*kRadTolerance*secRMin ;771 tolIRMax = fRmax1 - 0.5*kRadTolerance*secRMin ;772 tolORMax2 = (fRmax1 + 0.5*kRadTolerance*secRMax)*773 (fRmax1 + 0.5*kRadTolerance*secRMax) ;768 tolORMin = fRmin1 - halfRadTolerance*secRMin ; 769 tolIRMin = fRmin1 + halfRadTolerance*secRMin ; 770 tolIRMax = fRmax1 - halfRadTolerance*secRMin ; 771 tolORMax2 = (fRmax1 + halfRadTolerance*secRMax)* 772 (fRmax1 + halfRadTolerance*secRMax) ; 774 773 } 775 774 else 776 775 { 777 tolORMin = fRmin2 - 0.5*kRadTolerance*secRMin ;778 tolIRMin = fRmin2 + 0.5*kRadTolerance*secRMin ;779 tolIRMax = fRmax2 - 0.5*kRadTolerance*secRMin ;780 tolORMax2 = (fRmax2 + 0.5*kRadTolerance*secRMax)*781 (fRmax2 + 0.5*kRadTolerance*secRMax) ;776 tolORMin = fRmin2 - halfRadTolerance*secRMin ; 777 tolIRMin = fRmin2 + halfRadTolerance*secRMin ; 778 tolIRMax = fRmax2 - halfRadTolerance*secRMin ; 779 tolORMax2 = (fRmax2 + halfRadTolerance*secRMax)* 780 (fRmax2 + halfRadTolerance*secRMax) ; 782 781 } 783 782 if ( tolORMin > 0 ) … … 791 790 tolIRMin2 = 0.0 ; 792 791 } 793 if ( tolIRMax > 0 ) tolIRMax2 = tolIRMax*tolIRMax ;794 else tolIRMax2 = 0.0 ;792 if ( tolIRMax > 0 ) { tolIRMax2 = tolIRMax*tolIRMax; } 793 else { tolIRMax2 = 0.0; } 795 794 796 if (tolIRMin2 <= rhoi2 && rhoi2 <= tolIRMax2) 797 { 798 if ( seg && rhoi2 ) 799 { 800 // Psi = angle made with central (average) phi of shape 801 802 cosPsi = (xi*cosCPhi + yi*sinCPhi)/std::sqrt(rhoi2) ; 803 804 if (cosPsi >= cosHDPhiIT) return s ; 805 } 806 else return s ; 807 } 808 /* 809 else if (tolORMin2 <= rhoi2 && rhoi2 <= tolORMax2) 810 { 811 if ( seg && rhoi2 ) 812 { 813 // Psi = angle made with central (average) phi of shape 814 815 cosPsi = (xi*cosCPhi + yi*sinCPhi)/std::sqrt(rhoi2) ; 816 817 if (cosPsi >= cosHDPhiIT) return s ; 818 } 819 else return s ; 820 } 821 */ 795 if ( (tolIRMin2 <= rhoi2) && (rhoi2 <= tolIRMax2) ) 796 { 797 if ( !fPhiFullCone && rhoi2 ) 798 { 799 // Psi = angle made with central (average) phi of shape 800 801 cosPsi = (xi*cosCPhi + yi*sinCPhi)/std::sqrt(rhoi2) ; 802 803 if (cosPsi >= cosHDPhiIT) { return s; } 804 } 805 else 806 { 807 return s; 808 } 809 } 822 810 } 823 811 else // On/outside extent, and heading away -> cannot intersect … … 861 849 if (std::fabs(nt1) > kRadTolerance) // Equation quadratic => 2 roots 862 850 { 863 b = nt2/nt1;864 c = nt3/nt1;865 d = b*b-c;866 if ( nt3 > rout*kRadTolerance*secRMax || rout < 0)851 b = nt2/nt1; 852 c = nt3/nt1; 853 d = b*b-c ; 854 if ( (nt3 > rout*kRadTolerance*secRMax) || (rout < 0) ) 867 855 { 868 856 // If outside real cone (should be rho-rout>kRadTolerance*0.5 869 857 // NOT rho^2 etc) saves a std::sqrt() at expense of accuracy 870 858 871 872 859 if (d >= 0) 873 860 { 874 861 875 if ( rout < 0 && nt3 <= 0)862 if ((rout < 0) && (nt3 <= 0)) 876 863 { 877 864 // Inside `shadow cone' with -ve radius … … 882 869 else 883 870 { 884 if ( b <= 0 && c >= 0) // both >=0, try smaller root871 if ((b <= 0) && (c >= 0)) // both >=0, try smaller root 885 872 { 886 873 s = -b - std::sqrt(d) ; … … 906 893 // Z ok. Check phi intersection if reqd 907 894 908 if ( ! seg ) return s ;895 if ( fPhiFullCone ) { return s; } 909 896 else 910 897 { … … 914 901 cosPsi = (xi*cosCPhi + yi*sinCPhi)/ri ; 915 902 916 if ( cosPsi >= cosHDPhiIT ) return s ;903 if ( cosPsi >= cosHDPhiIT ) { return s; } 917 904 } 918 905 } … … 925 912 // check not inside, and heading through G4Cons (-> 0 to in) 926 913 927 if ( t3 > (rin + kRadTolerance*0.5*secRMin)* 928 (rin + kRadTolerance*0.5*secRMin) && 929 nt2 < 0 && 930 d >= 0 && 931 // nt2 < -kCarTolerance*secRMax/2/fDz && 932 // t2 < std::sqrt(t3)*v.z()*tanRMax && 933 // d > kCarTolerance*secRMax*(rout-b*tanRMax*v.z())/nt1 && 934 std::fabs(p.z()) <= tolIDz ) 914 if ( ( t3 > (rin + halfRadTolerance*secRMin)* 915 (rin + halfRadTolerance*secRMin) ) 916 && (nt2 < 0) && (d >= 0) && (std::fabs(p.z()) <= tolIDz) ) 935 917 { 936 918 // Inside cones, delta r -ve, inside z extent 937 919 938 if ( seg)920 if ( !fPhiFullCone ) 939 921 { 940 922 cosPsi = (p.x()*cosCPhi + p.y()*sinCPhi)/std::sqrt(t3) ; 941 923 942 if (cosPsi >= cosHDPhiIT) return 0.0 ;943 } 944 else return 0.0 ;924 if (cosPsi >= cosHDPhiIT) { return 0.0; } 925 } 926 else { return 0.0; } 945 927 } 946 928 } … … 952 934 s = -0.5*nt3/nt2 ; 953 935 954 if ( s < 0 ) return kInfinity ;// travel away936 if ( s < 0 ) { return kInfinity; } // travel away 955 937 else // s >= 0, If 'forwards'. Check z intersection 956 938 { 957 939 zi = p.z() + s*v.z() ; 958 940 959 if ( std::fabs(zi) <= tolODz && nt2 < 0)941 if ((std::fabs(zi) <= tolODz) && (nt2 < 0)) 960 942 { 961 943 // Z ok. Check phi intersection if reqd 962 944 963 if ( ! seg ) return s ;945 if ( fPhiFullCone ) { return s; } 964 946 else 965 947 { … … 969 951 cosPsi = (xi*cosCPhi + yi*sinCPhi)/ri ; 970 952 971 if (cosPsi >= cosHDPhiIT) return s ;953 if (cosPsi >= cosHDPhiIT) { return s; } 972 954 } 973 955 } … … 1015 997 if ( std::fabs(zi) <= tolODz ) 1016 998 { 1017 if ( seg)999 if ( !fPhiFullCone ) 1018 1000 { 1019 1001 xi = p.x() + s*v.x() ; … … 1022 1004 cosPsi = (xi*cosCPhi + yi*sinCPhi)/ri ; 1023 1005 1024 if (cosPsi >= cosHDPhiIT) snxt = s ;1006 if (cosPsi >= cosHDPhiIT) { snxt = s; } 1025 1007 } 1026 else return s ;1008 else { return s; } 1027 1009 } 1028 1010 } … … 1046 1028 ri = rMinAv + zi*tanRMin ; 1047 1029 1048 if ( ri > =0 )1030 if ( ri > 0 ) 1049 1031 { 1050 if ( s >= 0 && std::fabs(zi) <= tolODz) // s > 01032 if ( (s >= 0) && (std::fabs(zi) <= tolODz) ) // s > 0 1051 1033 { 1052 if ( seg)1034 if ( !fPhiFullCone ) 1053 1035 { 1054 1036 xi = p.x() + s*v.x() ; … … 1056 1038 cosPsi = (xi*cosCPhi + yi*sinCPhi)/ri ; 1057 1039 1058 if (cosPsi >= cosHDPhiOT) snxt = s ;1040 if (cosPsi >= cosHDPhiOT) { snxt = s; } 1059 1041 } 1060 else return s ;1042 else { return s; } 1061 1043 } 1062 1044 } … … 1067 1049 ri = rMinAv + zi*tanRMin ; 1068 1050 1069 if ( s >= 0 && ri >= 0 && std::fabs(zi) <= tolODz) // s>01051 if ( (s >= 0) && (ri > 0) && (std::fabs(zi) <= tolODz) ) // s>0 1070 1052 { 1071 if ( seg)1053 if ( !fPhiFullCone ) 1072 1054 { 1073 1055 xi = p.x() + s*v.x() ; … … 1075 1057 cosPsi = (xi*cosCPhi + yi*sinCPhi)/ri ; 1076 1058 1077 if (cosPsi >= cosHDPhiIT) snxt = s ;1059 if (cosPsi >= cosHDPhiIT) { snxt = s; } 1078 1060 } 1079 else return s ;1061 else { return s; } 1080 1062 } 1081 1063 } … … 1095 1077 // Inside inner real cone, heading outwards, inside z range 1096 1078 1097 if ( seg)1079 if ( !fPhiFullCone ) 1098 1080 { 1099 1081 cosPsi = (p.x()*cosCPhi + p.y()*sinCPhi)/std::sqrt(t3) ; 1100 1082 1101 if (cosPsi >= cosHDPhiIT) return 0.0 ;1083 if (cosPsi >= cosHDPhiIT) { return 0.0; } 1102 1084 } 1103 else return 0.0 ;1085 else { return 0.0; } 1104 1086 } 1105 1087 else … … 1123 1105 zi = p.z() + s*v.z() ; 1124 1106 1125 if ( s >= 0 && std::fabs(zi) <= tolODz) // s>01107 if ( (s >= 0) && (std::fabs(zi) <= tolODz) ) // s>0 1126 1108 { 1127 if ( seg)1109 if ( !fPhiFullCone ) 1128 1110 { 1129 1111 xi = p.x() + s*v.x() ; … … 1132 1114 cosPsi = (xi*cosCPhi + yi*sinCPhi)/ri ; 1133 1115 1134 if ( cosPsi >= cosHDPhiIT ) snxt = s ;1116 if ( cosPsi >= cosHDPhiIT ) { snxt = s; } 1135 1117 } 1136 else return s ;1118 else { return s; } 1137 1119 } 1138 1120 } 1139 else return kInfinity ;1121 else { return kInfinity; } 1140 1122 } 1141 1123 } … … 1152 1134 zi = p.z() + s*v.z() ; 1153 1135 1154 if ( s >= 0 && std::fabs(zi) <= tolODz) // s>01136 if ( (s >= 0) && (std::fabs(zi) <= tolODz) ) // s>0 1155 1137 { 1156 if ( seg)1138 if ( !fPhiFullCone ) 1157 1139 { 1158 1140 xi = p.x() + s*v.x(); … … 1161 1143 cosPsi = (xi*cosCPhi + yi*sinCPhi)/ri; 1162 1144 1163 if (cosPsi >= cosHDPhiIT) snxt = s ;1145 if (cosPsi >= cosHDPhiIT) { snxt = s; } 1164 1146 } 1165 else return s ;1147 else { return s; } 1166 1148 } 1167 1149 } … … 1180 1162 // -> Should use some form of loop Construct 1181 1163 1182 if ( seg ) 1183 { 1184 // First phi surface (`S'tarting phi) 1185 1186 sinSPhi = std::sin(fSPhi) ; 1187 cosSPhi = std::cos(fSPhi) ; 1164 if ( !fPhiFullCone ) 1165 { 1166 // First phi surface (starting phi) 1167 1188 1168 Comp = v.x()*sinSPhi - v.y()*cosSPhi ; 1189 1169 … … 1192 1172 Dist = (p.y()*cosSPhi - p.x()*sinSPhi) ; 1193 1173 1194 if (Dist < kCarTolerance*0.5)1174 if (Dist < halfCarTolerance) 1195 1175 { 1196 1176 s = Dist/Comp ; … … 1198 1178 if ( s < snxt ) 1199 1179 { 1200 if ( s < 0 ) s = 0.0 ;1180 if ( s < 0 ) { s = 0.0; } 1201 1181 1202 1182 zi = p.z() + s*v.z() ; … … 1210 1190 tolORMax2 = (rMaxOAv + zi*tanRMax)*(rMaxOAv + zi*tanRMax) ; 1211 1191 1212 if ( rhoi2 >= tolORMin2 && rhoi2 <= tolORMax2)1192 if ( (rhoi2 >= tolORMin2) && (rhoi2 <= tolORMax2) ) 1213 1193 { 1214 1194 // z and r intersections good - check intersecting with 1215 1195 // correct half-plane 1216 1196 1217 if ((yi*cosCPhi - xi*sinCPhi) <= 0 ) snxt = s ;1218 } 1197 if ((yi*cosCPhi - xi*sinCPhi) <= 0 ) { snxt = s; } 1198 } 1219 1199 } 1220 1200 } 1221 1201 } 1222 } 1223 // Second phi surface (`E'nding phi) 1224 1225 ePhi = fSPhi + fDPhi ; 1226 sinEPhi = std::sin(ePhi) ; 1227 cosEPhi = std::cos(ePhi) ; 1202 } 1203 1204 // Second phi surface (Ending phi) 1205 1228 1206 Comp = -(v.x()*sinEPhi - v.y()*cosEPhi) ; 1229 1207 … … 1231 1209 { 1232 1210 Dist = -(p.y()*cosEPhi - p.x()*sinEPhi) ; 1233 if (Dist < kCarTolerance*0.5)1211 if (Dist < halfCarTolerance) 1234 1212 { 1235 1213 s = Dist/Comp ; … … 1237 1215 if ( s < snxt ) 1238 1216 { 1239 if ( s < 0 ) s = 0.0 ;1217 if ( s < 0 ) { s = 0.0; } 1240 1218 1241 1219 zi = p.z() + s*v.z() ; … … 1249 1227 tolORMax2 = (rMaxOAv + zi*tanRMax)*(rMaxOAv + zi*tanRMax) ; 1250 1228 1251 if ( rhoi2 >= tolORMin2 && rhoi2 <= tolORMax2)1229 if ( (rhoi2 >= tolORMin2) && (rhoi2 <= tolORMax2) ) 1252 1230 { 1253 1231 // z and r intersections good - check intersecting with 1254 1232 // correct half-plane 1255 1233 1256 if ( (yi*cosCPhi - xi*sinCPhi) >= 0.0 ) snxt = s ;1257 } 1234 if ( (yi*cosCPhi - xi*sinCPhi) >= 0.0 ) { snxt = s; } 1235 } 1258 1236 } 1259 1237 } … … 1261 1239 } 1262 1240 } 1263 if (snxt < kCarTolerance*0.5) snxt = 0.; 1264 1265 #ifdef consdebug 1266 G4cout.precision(24); 1267 G4cout<<"G4Cons::DistanceToIn(p,v) "<<G4endl; 1268 G4cout<<"position = "<<p<<G4endl; 1269 G4cout<<"direction = "<<v<<G4endl; 1270 G4cout<<"distance = "<<snxt<<G4endl; 1271 #endif 1241 if (snxt < halfCarTolerance) { snxt = 0.; } 1272 1242 1273 1243 return snxt ; … … 1283 1253 G4double G4Cons::DistanceToIn(const G4ThreeVector& p) const 1284 1254 { 1285 G4double safe=0.0, rho, safeR1, safeR2, safeZ ;1255 G4double safe=0.0, rho, safeR1, safeR2, safeZ, safePhi, cosPsi ; 1286 1256 G4double tanRMin, secRMin, pRMin ; 1287 1257 G4double tanRMax, secRMax, pRMax ; 1288 G4double phiC, cosPhiC, sinPhiC, safePhi, ePhi ;1289 G4double cosPsi ;1290 1258 1291 1259 rho = std::sqrt(p.x()*p.x() + p.y()*p.y()) ; … … 1304 1272 safeR2 = (rho - pRMax)/secRMax ; 1305 1273 1306 if ( safeR1 > safeR2) safe = safeR1 ;1307 else safe = safeR2 ;1274 if ( safeR1 > safeR2) { safe = safeR1; } 1275 else { safe = safeR2; } 1308 1276 } 1309 1277 else … … 1314 1282 safe = (rho - pRMax)/secRMax ; 1315 1283 } 1316 if ( safeZ > safe ) safe = safeZ ; 1317 1318 if ( fDPhi < twopi && rho ) 1319 { 1320 phiC = fSPhi + fDPhi*0.5 ; 1321 cosPhiC = std::cos(phiC) ; 1322 sinPhiC = std::sin(phiC) ; 1323 1284 if ( safeZ > safe ) { safe = safeZ; } 1285 1286 if ( !fPhiFullCone && rho ) 1287 { 1324 1288 // Psi=angle from central phi to point 1325 1289 1326 cosPsi = (p.x()*cos PhiC + p.y()*sinPhiC)/rho ;1290 cosPsi = (p.x()*cosCPhi + p.y()*sinCPhi)/rho ; 1327 1291 1328 1292 if ( cosPsi < std::cos(fDPhi*0.5) ) // Point lies outside phi range 1329 1293 { 1330 if ( (p.y()*cos PhiC - p.x()*sinPhiC) <= 0.0 )1331 { 1332 safePhi = std::fabs(p.x()*std::sin(fSPhi) - p.y()*std::cos(fSPhi));1294 if ( (p.y()*cosCPhi - p.x()*sinCPhi) <= 0.0 ) 1295 { 1296 safePhi = std::fabs(p.x()*std::sin(fSPhi)-p.y()*std::cos(fSPhi)); 1333 1297 } 1334 1298 else 1335 1299 { 1336 ePhi = fSPhi + fDPhi ; 1337 safePhi = std::fabs(p.x()*std::sin(ePhi) - p.y()*std::cos(ePhi)) ; 1338 } 1339 if ( safePhi > safe ) safe = safePhi ; 1340 } 1341 } 1342 if ( safe < 0.0 ) safe = 0.0 ; 1300 safePhi = std::fabs(p.x()*sinEPhi-p.y()*cosEPhi); 1301 } 1302 if ( safePhi > safe ) { safe = safePhi; } 1303 } 1304 } 1305 if ( safe < 0.0 ) { safe = 0.0; } 1343 1306 1344 1307 return safe ; … … 1347 1310 /////////////////////////////////////////////////////////////// 1348 1311 // 1349 // Calculate distance to surface of shape from `inside', allowing for tolerance1312 // Calculate distance to surface of shape from 'inside', allowing for tolerance 1350 1313 // - Only Calc rmax intersection if no valid rmin intersection 1351 1314 1352 1315 G4double G4Cons::DistanceToOut( const G4ThreeVector& p, 1353 const G4ThreeVector& v,1354 const G4bool calcNorm,1355 G4bool *validNorm,1356 G4ThreeVector *n) const1316 const G4ThreeVector& v, 1317 const G4bool calcNorm, 1318 G4bool *validNorm, 1319 G4ThreeVector *n) const 1357 1320 { 1358 1321 ESide side = kNull, sider = kNull, sidephi = kNull; 1359 1322 1323 static const G4double halfCarTolerance=kCarTolerance*0.5; 1324 static const G4double halfRadTolerance=kRadTolerance*0.5; 1325 static const G4double halfAngTolerance=kAngTolerance*0.5; 1326 1360 1327 G4double snxt,sr,sphi,pdist ; 1361 1328 … … 1373 1340 // Vars for phi intersection: 1374 1341 1375 G4double sinSPhi, cosSPhi, ePhi, sinEPhi, cosEPhi ;1376 G4double cPhi, sinCPhi, cosCPhi ;1377 1342 G4double pDistS, compS, pDistE, compE, sphi2, xi, yi, risec, vphi ; 1378 1343 G4double zi, ri, deltaRoi2 ; … … 1384 1349 pdist = fDz - p.z() ; 1385 1350 1386 if (pdist > kCarTolerance*0.5)1351 if (pdist > halfCarTolerance) 1387 1352 { 1388 1353 snxt = pdist/v.z() ; … … 1396 1361 *validNorm = true ; 1397 1362 } 1398 return snxt = 0.0;1363 return snxt = 0.0; 1399 1364 } 1400 1365 } … … 1403 1368 pdist = fDz + p.z() ; 1404 1369 1405 if ( pdist > kCarTolerance*0.5)1370 if ( pdist > halfCarTolerance) 1406 1371 { 1407 1372 snxt = -pdist/v.z() ; … … 1465 1430 - fRmax1*(fRmax1 + kRadTolerance*secRMax); 1466 1431 } 1467 else deltaRoi2 = 1.0 ; 1468 1469 if ( nt1 && deltaRoi2 > 0.0 ) 1432 else 1433 { 1434 deltaRoi2 = 1.0; 1435 } 1436 1437 if ( nt1 && (deltaRoi2 > 0.0) ) 1470 1438 { 1471 1439 // Equation quadratic => 2 roots : second root must be leaving … … 1478 1446 { 1479 1447 // Check if on outer cone & heading outwards 1480 // NOTE: Should use rho-rout>-kRad tolerance*0.51448 // NOTE: Should use rho-rout>-kRadTolerance*0.5 1481 1449 1482 if (nt3 > - kRadTolerance*0.5&& nt2 >= 0 )1450 if (nt3 > -halfRadTolerance && nt2 >= 0 ) 1483 1451 { 1484 1452 if (calcNorm) … … 1486 1454 risec = std::sqrt(t3)*secRMax ; 1487 1455 *validNorm = true ; 1488 *n = G4ThreeVector(p.x()/risec,p.y()/risec,-tanRMax/secRMax) ;1456 *n = G4ThreeVector(p.x()/risec,p.y()/risec,-tanRMax/secRMax); 1489 1457 } 1490 1458 return snxt=0 ; … … 1497 1465 ri = tanRMax*zi + rMaxAv ; 1498 1466 1499 if ( (ri >= 0) && (-kRadTolerance*0.5 <= sr) && 1500 ( sr <= kRadTolerance*0.5) ) 1467 if ((ri >= 0) && (-halfRadTolerance <= sr) && (sr <= halfRadTolerance)) 1501 1468 { 1502 1469 // An intersection within the tolerance … … 1506 1473 sidetol = kRMax ; 1507 1474 } 1508 if ( (ri < 0) || (sr < kRadTolerance*0.5) )1475 if ( (ri < 0) || (sr < halfRadTolerance) ) 1509 1476 { 1510 1477 // Safety: if both roots -ve ensure that sr cannot `win' … … 1515 1482 ri = tanRMax*zi + rMaxAv ; 1516 1483 1517 if (ri >= 0 && sr2 > kRadTolerance*0.5) sr = sr2 ; 1484 if ((ri >= 0) && (sr2 > halfRadTolerance)) 1485 { 1486 sr = sr2; 1487 } 1518 1488 else 1519 1489 { 1520 1490 sr = kInfinity ; 1521 1491 1522 if( (-kRadTolerance*0.5 <= sr2) 1523 && ( sr2 <= kRadTolerance*0.5) ) 1492 if( (-halfRadTolerance <= sr2) && ( sr2 <= halfRadTolerance) ) 1524 1493 { 1525 1494 // An intersection within the tolerance. … … 1540 1509 if ( calcNorm ) 1541 1510 { 1542 risec = std::sqrt(t3)*secRMax ;1543 *validNorm = true ;1544 *n = G4ThreeVector(p.x()/risec,p.y()/risec,-tanRMax/secRMax) ;1511 risec = std::sqrt(t3)*secRMax; 1512 *validNorm = true; 1513 *n = G4ThreeVector(p.x()/risec,p.y()/risec,-tanRMax/secRMax); 1545 1514 } 1546 1515 return snxt = 0.0 ; 1547 1516 } 1548 1517 } 1549 else if ( nt2 && deltaRoi2 > 0.0)1518 else if ( nt2 && (deltaRoi2 > 0.0) ) 1550 1519 { 1551 1520 // Linear case (only one intersection) => point outside outer cone … … 1553 1522 if ( calcNorm ) 1554 1523 { 1555 risec = std::sqrt(t3)*secRMax ;1556 *validNorm = true ;1557 *n = G4ThreeVector(p.x()/risec,p.y()/risec,-tanRMax/secRMax) ;1524 risec = std::sqrt(t3)*secRMax; 1525 *validNorm = true; 1526 *n = G4ThreeVector(p.x()/risec,p.y()/risec,-tanRMax/secRMax); 1558 1527 } 1559 1528 return snxt = 0.0 ; … … 1569 1538 // Check possible intersection within tolerance 1570 1539 1571 if ( slentol <= kCarTolerance*0.5)1540 if ( slentol <= halfCarTolerance ) 1572 1541 { 1573 1542 // An intersection within the tolerance was found. … … 1580 1549 // Calculate a normal vector, as below 1581 1550 1582 xi = p.x() + slentol*v.x() ;1583 yi = p.y() + slentol*v.y() ;1584 risec = std::sqrt(xi*xi + yi*yi)*secRMax ;1585 G4ThreeVector Normal = G4ThreeVector(xi/risec,yi/risec,-tanRMax/secRMax) ;1551 xi = p.x() + slentol*v.x(); 1552 yi = p.y() + slentol*v.y(); 1553 risec = std::sqrt(xi*xi + yi*yi)*secRMax; 1554 G4ThreeVector Normal = G4ThreeVector(xi/risec,yi/risec,-tanRMax/secRMax); 1586 1555 1587 1556 if ( Normal.dot(v) > 0 ) // We will leave the Cone immediatelly … … 1595 1564 } 1596 1565 else // On the surface, but not heading out so we ignore this intersection 1597 { // (as it is within tolerance).1566 { // (as it is within tolerance). 1598 1567 slentol = kInfinity ; 1599 1568 } … … 1621 1590 d = b*b - c ; 1622 1591 1623 if ( d >= 0.0 )1592 if ( d >= 0.0 ) 1624 1593 { 1625 1594 // NOTE: should be rho-rin<kRadTolerance*0.5, … … 1630 1599 if ( nt2 < 0.0 ) 1631 1600 { 1632 if (calcNorm) *validNorm = false ;1633 return snxt = 0.0 ;1601 if (calcNorm) { *validNorm = false; } 1602 return snxt = 0.0; 1634 1603 } 1635 1604 } … … 1640 1609 ri = tanRMin*zi + rMinAv ; 1641 1610 1642 if( (ri >= 0.0) && (-kRadTolerance*0.5 <= sr2) && 1643 ( sr2 <= kRadTolerance*0.5) ) 1611 if( (ri>=0.0)&&(-halfRadTolerance<=sr2)&&(sr2<=halfRadTolerance) ) 1644 1612 { 1645 1613 // An intersection within the tolerance … … 1649 1617 sidetol = kRMax ; 1650 1618 } 1651 if( (ri<0) || (sr2 < kRadTolerance*0.5) )1619 if( (ri<0) || (sr2 < halfRadTolerance) ) 1652 1620 { 1653 1621 sr3 = -b + std::sqrt(d) ; … … 1656 1624 // distancetoout 1657 1625 1658 if ( sr3 > kCarTolerance*0.5)1626 if ( sr3 > halfRadTolerance ) 1659 1627 { 1660 1628 if( sr3 < sr ) … … 1670 1638 } 1671 1639 } 1672 else if ( sr3 > - kCarTolerance*0.5)1640 else if ( sr3 > -halfRadTolerance ) 1673 1641 { 1674 1642 // Intersection in tolerance. Store to check if it's good … … 1678 1646 } 1679 1647 } 1680 else if ( sr2 < sr && sr2 > kCarTolerance*0.5)1648 else if ( (sr2 < sr) && (sr2 > halfCarTolerance) ) 1681 1649 { 1682 1650 sr = sr2 ; 1683 1651 sider = kRMin ; 1684 1652 } 1685 else if (sr2 > - kCarTolerance*0.5)1653 else if (sr2 > -halfCarTolerance) 1686 1654 { 1687 1655 // Intersection in tolerance. Store to check if it's good … … 1690 1658 sidetol = kRMin ; 1691 1659 } 1692 if( slentol <= kCarTolerance*0.5)1660 if( slentol <= halfCarTolerance ) 1693 1661 { 1694 1662 // An intersection within the tolerance was found. … … 1706 1674 if( Normal.dot(v) > 0 ) 1707 1675 { 1708 // We will leave the Cone immediatelly 1676 // We will leave the cone immediately 1677 1709 1678 if( calcNorm ) 1710 1679 { … … 1731 1700 // Phi Intersection 1732 1701 1733 if ( fDPhi < twopi ) 1734 { 1735 sinSPhi = std::sin(fSPhi) ; 1736 cosSPhi = std::cos(fSPhi) ; 1737 ePhi = fSPhi + fDPhi ; 1738 sinEPhi = std::sin(ePhi) ; 1739 cosEPhi = std::cos(ePhi) ; 1740 cPhi = fSPhi + fDPhi*0.5 ; 1741 sinCPhi = std::sin(cPhi) ; 1742 cosCPhi = std::cos(cPhi) ; 1702 if ( !fPhiFullCone ) 1703 { 1743 1704 // add angle calculation with correction 1744 // of the difference in domain of atan2 and Sphi 1745 vphi = std::atan2(v.y(),v.x()) ; 1746 1747 if ( vphi < fSPhi - kAngTolerance*0.5 ) vphi += twopi ; 1748 else if ( vphi > fSPhi + fDPhi + kAngTolerance*0.5 ) vphi -= twopi; 1705 // of the difference in domain of atan2 and Sphi 1706 1707 vphi = std::atan2(v.y(),v.x()) ; 1708 1709 if ( vphi < fSPhi - halfAngTolerance ) { vphi += twopi; } 1710 else if ( vphi > fSPhi + fDPhi + halfAngTolerance ) { vphi -= twopi; } 1711 1749 1712 if ( p.x() || p.y() ) // Check if on z axis (rho not needed later) 1750 1713 { … … 1761 1724 sidephi = kNull ; 1762 1725 1763 if( ( (fDPhi <= pi) && ( (pDistS <= 0.5*kCarTolerance) 1764 && (pDistE <= 0.5*kCarTolerance) ) ) 1765 || ( (fDPhi > pi) && !((pDistS > 0.5*kCarTolerance) 1766 && (pDistE > 0.5*kCarTolerance) ) ) ) 1767 { 1768 // Inside both phi *full* planes 1769 if ( compS < 0 ) 1726 if( ( (fDPhi <= pi) && ( (pDistS <= halfCarTolerance) 1727 && (pDistE <= halfCarTolerance) ) ) 1728 || ( (fDPhi > pi) && !((pDistS > halfCarTolerance) 1729 && (pDistE > halfCarTolerance) ) ) ) 1730 { 1731 // Inside both phi *full* planes 1732 if ( compS < 0 ) 1733 { 1734 sphi = pDistS/compS ; 1735 if (sphi >= -halfCarTolerance) 1770 1736 { 1771 sphi = pDistS/compS ; 1772 if (sphi >= -0.5*kCarTolerance) 1737 xi = p.x() + sphi*v.x() ; 1738 yi = p.y() + sphi*v.y() ; 1739 1740 // Check intersecting with correct half-plane 1741 // (if not -> no intersect) 1742 // 1743 if ( (std::abs(xi)<=kCarTolerance) 1744 && (std::abs(yi)<=kCarTolerance) ) 1773 1745 { 1774 xi = p.x() + sphi*v.x() ; 1775 yi = p.y() + sphi*v.y() ; 1776 1777 // Check intersecting with correct half-plane 1778 // (if not -> no intersect) 1779 // 1780 if((std::abs(xi)<=kCarTolerance)&&(std::abs(yi)<=kCarTolerance)){ 1781 sidephi= kSPhi; 1782 if(((fSPhi-0.5*kAngTolerance)<=vphi)&&((ePhi+0.5*kAngTolerance)>=vphi)) 1783 { sphi = kInfinity; } 1784 1746 sidephi= kSPhi; 1747 if ( ( fSPhi-halfAngTolerance <= vphi ) 1748 && ( fSPhi+fDPhi+halfAngTolerance >=vphi ) ) 1749 { 1750 sphi = kInfinity; 1785 1751 } 1786 else 1787 if ((yi*cosCPhi-xi*sinCPhi)>=0) 1788 { 1789 sphi = kInfinity ; 1790 } 1791 else 1792 { 1793 sidephi = kSPhi ; 1794 if ( pDistS > -kCarTolerance*0.5 ) 1795 { 1796 sphi = 0.0 ; // Leave by sphi immediately 1797 } 1798 } 1752 } 1753 else 1754 if ( (yi*cosCPhi-xi*sinCPhi)>=0 ) 1755 { 1756 sphi = kInfinity ; 1799 1757 } 1800 1758 else 1801 1759 { 1802 sphi = kInfinity ; 1803 } 1760 sidephi = kSPhi ; 1761 if ( pDistS > -halfCarTolerance ) 1762 { 1763 sphi = 0.0 ; // Leave by sphi immediately 1764 } 1765 } 1804 1766 } 1805 1767 else … … 1807 1769 sphi = kInfinity ; 1808 1770 } 1809 1810 if ( compE < 0 ) 1771 } 1772 else 1773 { 1774 sphi = kInfinity ; 1775 } 1776 1777 if ( compE < 0 ) 1778 { 1779 sphi2 = pDistE/compE ; 1780 1781 // Only check further if < starting phi intersection 1782 // 1783 if ( (sphi2 > -halfCarTolerance) && (sphi2 < sphi) ) 1811 1784 { 1812 sphi2 = pDistE/compE ; 1813 1814 // Only check further if < starting phi intersection 1815 // 1816 if ( (sphi2 > -0.5*kCarTolerance) && (sphi2 < sphi) ) 1785 xi = p.x() + sphi2*v.x() ; 1786 yi = p.y() + sphi2*v.y() ; 1787 1788 // Check intersecting with correct half-plane 1789 1790 if ( (std::abs(xi)<=kCarTolerance) 1791 && (std::abs(yi)<=kCarTolerance) ) 1817 1792 { 1818 xi = p.x() + sphi2*v.x() ; 1819 yi = p.y() + sphi2*v.y() ; 1820 1821 // Check intersecting with correct half-plane 1822 if((std::abs(xi)<=kCarTolerance)&&(std::abs(yi)<=kCarTolerance)){ 1823 // Leaving via ending phi 1824 if(!(((fSPhi-0.5*kAngTolerance)<=vphi)&&((ePhi+0.5*kAngTolerance)>=vphi))){ 1825 sidephi = kEPhi ; 1826 if ( pDistE <= -kCarTolerance*0.5 ) sphi = sphi2 ; 1827 else sphi = 0.0 ; 1828 } 1829 } 1830 else // Check intersecting with correct half-plane 1831 if ( (yi*cosCPhi-xi*sinCPhi) >= 0) 1793 // Leaving via ending phi 1794 1795 if(!( (fSPhi-halfAngTolerance <= vphi) 1796 && (fSPhi+fDPhi+halfAngTolerance >= vphi) ) ) 1832 1797 { 1833 // Leaving via ending phi1834 1835 1798 sidephi = kEPhi ; 1836 if ( pDistE <= - kCarTolerance*0.5 ) sphi = sphi2 ;1837 else sphi = 0.0 ;1799 if ( pDistE <= -halfCarTolerance ) { sphi = sphi2; } 1800 else { sphi = 0.0; } 1838 1801 } 1839 1802 } 1803 else // Check intersecting with correct half-plane 1804 if ( yi*cosCPhi-xi*sinCPhi >= 0 ) 1805 { 1806 // Leaving via ending phi 1807 1808 sidephi = kEPhi ; 1809 if ( pDistE <= -halfCarTolerance ) { sphi = sphi2; } 1810 else { sphi = 0.0; } 1811 } 1840 1812 } 1841 1813 } 1842 else 1843 { 1844 sphi = kInfinity ; 1845 } 1846 1847 1814 } 1815 else 1816 { 1817 sphi = kInfinity ; 1818 } 1848 1819 } 1849 1820 else … … 1852 1823 // within phi of shape, Step limited by rmax, else Step =0 1853 1824 1854 // vphi = std::atan2(v.y(),v.x()) ; 1855 1856 // if ( fSPhi < vphi && vphi < fSPhi + fDPhi ) sphi = kInfinity ; 1857 1858 if ( ((fSPhi-0.5*kAngTolerance) <= vphi) && (vphi <=( fSPhi + fDPhi)+0.5*kAngTolerance) ) 1859 { 1860 sphi = kInfinity ; 1861 } 1825 if ( (fSPhi-halfAngTolerance <= vphi) 1826 && (vphi <= fSPhi+fDPhi+halfAngTolerance) ) 1827 { 1828 sphi = kInfinity ; 1829 } 1862 1830 else 1863 1831 { … … 1868 1836 if ( sphi < snxt ) // Order intersecttions 1869 1837 { 1870 snxt=sphi ;1871 side=sidephi ;1838 snxt=sphi ; 1839 side=sidephi ; 1872 1840 } 1873 1841 } … … 1880 1848 { 1881 1849 switch(side) 1882 { 1883 case kRMax: 1884 // Note: returned vector not normalised 1885 // (divide by frmax for unit vector) 1850 { // Note: returned vector not normalised 1851 case kRMax: // (divide by frmax for unit vector) 1886 1852 xi = p.x() + snxt*v.x() ; 1887 1853 yi = p.y() + snxt*v.y() ; … … 1891 1857 break ; 1892 1858 case kRMin: 1893 *validNorm =false ; // Rmin is inconvex1859 *validNorm = false ; // Rmin is inconvex 1894 1860 break ; 1895 1861 case kSPhi: 1896 1862 if ( fDPhi <= pi ) 1897 1863 { 1898 *n = G4ThreeVector(s td::sin(fSPhi),-std::cos(fSPhi),0);1864 *n = G4ThreeVector(sinSPhi, -cosSPhi, 0); 1899 1865 *validNorm = true ; 1900 1866 } 1901 else *validNorm = false ; 1867 else 1868 { 1869 *validNorm = false ; 1870 } 1902 1871 break ; 1903 1872 case kEPhi: 1904 1873 if ( fDPhi <= pi ) 1905 1874 { 1906 *n = G4ThreeVector(-std::sin(fSPhi+fDPhi),std::cos(fSPhi+fDPhi),0);1875 *n = G4ThreeVector(-sinEPhi, cosEPhi, 0); 1907 1876 *validNorm = true ; 1908 1877 } 1909 else *validNorm = false ; 1878 else 1879 { 1880 *validNorm = false ; 1881 } 1910 1882 break ; 1911 1883 case kPZ: … … 1925 1897 G4cout << "p.y() = " << p.y()/mm << " mm" << G4endl ; 1926 1898 G4cout << "p.z() = " << p.z()/mm << " mm" << G4endl << G4endl ; 1927 G4cout << "pho at z = " << std::sqrt( p.x()*p.x()+p.y()*p.y() )/mm << " mm"1928 << G4endl << G4endl ;1899 G4cout << "pho at z = " << std::sqrt( p.x()*p.x()+p.y()*p.y() )/mm 1900 << " mm" << G4endl << G4endl ; 1929 1901 if( p.x() != 0. || p.x() != 0.) 1930 1902 { 1931 G4cout << "point phi = " << std::atan2(p.y(),p.x())/degree << " degree"1932 << G4endl << G4endl ;1903 G4cout << "point phi = " << std::atan2(p.y(),p.x())/degree 1904 << " degree" << G4endl << G4endl ; 1933 1905 } 1934 1906 G4cout << "Direction:" << G4endl << G4endl ; … … 1943 1915 } 1944 1916 } 1945 if (snxt < kCarTolerance*0.5) snxt = 0.; 1946 #ifdef consdebug 1947 G4cout.precision(24); 1948 G4cout<<"G4Cons::DistanceToOut(p,v,...) "<<G4endl; 1949 G4cout<<"position = "<<p<<G4endl; 1950 G4cout<<"direction = "<<v<<G4endl; 1951 G4cout<<"distance = "<<snxt<<G4endl; 1952 #endif 1917 if (snxt < halfCarTolerance) { snxt = 0.; } 1918 1953 1919 return snxt ; 1954 1920 } … … 1960 1926 G4double G4Cons::DistanceToOut(const G4ThreeVector& p) const 1961 1927 { 1962 G4double safe=0.0,rho,safeR1,safeR2,safeZ ; 1963 G4double tanRMin,secRMin,pRMin ; 1964 G4double tanRMax,secRMax,pRMax ; 1965 G4double safePhi,phiC,cosPhiC,sinPhiC,ePhi ; 1928 G4double safe=0.0, rho, safeR1, safeR2, safeZ, safePhi; 1929 G4double tanRMin, secRMin, pRMin; 1930 G4double tanRMax, secRMax, pRMax; 1966 1931 1967 1932 #ifdef G4CSGDEBUG … … 1975 1940 G4cout << "p.y() = " << p.y()/mm << " mm" << G4endl ; 1976 1941 G4cout << "p.z() = " << p.z()/mm << " mm" << G4endl << G4endl ; 1977 G4cout << "pho at z = " << std::sqrt( p.x()*p.x()+p.y()*p.y() )/mm << " mm"1978 << G4endl << G4endl ;1979 if( p.x() != 0. || p.x() != 0.)1980 { 1981 G4cout << "point phi = " << std::atan2(p.y(),p.x())/degree << " degree"1982 << G4endl << G4endl ;1983 } 1984 G4Exception("G4Cons::DistanceToOut(p)", "Notification", JustWarning,1985 "Point p is outside !?" );1942 G4cout << "pho at z = " << std::sqrt( p.x()*p.x()+p.y()*p.y() )/mm 1943 << " mm" << G4endl << G4endl ; 1944 if( (p.x() != 0.) || (p.x() != 0.) ) 1945 { 1946 G4cout << "point phi = " << std::atan2(p.y(),p.x())/degree 1947 << " degree" << G4endl << G4endl ; 1948 } 1949 G4Exception("G4Cons::DistanceToOut(p)", "Notification", 1950 JustWarning, "Point p is outside !?" ); 1986 1951 } 1987 1952 #endif … … 1997 1962 safeR1 = (rho - pRMin)/secRMin ; 1998 1963 } 1999 else safeR1 = kInfinity ; 1964 else 1965 { 1966 safeR1 = kInfinity ; 1967 } 2000 1968 2001 1969 tanRMax = (fRmax2 - fRmax1)*0.5/fDz ; … … 2004 1972 safeR2 = (pRMax - rho)/secRMax ; 2005 1973 2006 if (safeR1 < safeR2) safe = safeR1 ;2007 else safe = safeR2 ;2008 if (safeZ < safe) safe = safeZ ;1974 if (safeR1 < safeR2) { safe = safeR1; } 1975 else { safe = safeR2; } 1976 if (safeZ < safe) { safe = safeZ ; } 2009 1977 2010 1978 // Check if phi divided, Calc distances closest phi plane 2011 1979 2012 if ( fDPhi < twopi)1980 if (!fPhiFullCone) 2013 1981 { 2014 1982 // Above/below central phi of G4Cons? 2015 1983 2016 phiC = fSPhi + fDPhi*0.5 ; 2017 cosPhiC = std::cos(phiC) ; 2018 sinPhiC = std::sin(phiC) ; 2019 2020 if ( (p.y()*cosPhiC - p.x()*sinPhiC) <= 0 ) 2021 { 2022 safePhi = -(p.x()*std::sin(fSPhi) - p.y()*std::cos(fSPhi)) ; 1984 if ( (p.y()*cosCPhi - p.x()*sinCPhi) <= 0 ) 1985 { 1986 safePhi = -(p.x()*sinSPhi - p.y()*cosSPhi) ; 2023 1987 } 2024 1988 else 2025 1989 { 2026 ePhi = fSPhi + fDPhi;2027 safePhi = (p.x()*std::sin(ePhi) - p.y()*std::cos(ePhi)) ;2028 }2029 if (safePhi < safe) safe = safePhi ;2030 }2031 if ( safe < 0 ) safe = 0 ; 2032 return safe ; 1990 safePhi = (p.x()*sinEPhi - p.y()*cosEPhi) ; 1991 } 1992 if (safePhi < safe) { safe = safePhi; } 1993 } 1994 if ( safe < 0 ) { safe = 0; } 1995 1996 return safe ; 2033 1997 } 2034 1998 … … 2068 2032 meshAngle = fDPhi/(noCrossSections - 1) ; 2069 2033 2070 // G4double RMax = (fRmax2 >= fRmax1) ? fRmax2 : fRmax1 ;2071 2072 2034 meshRMax1 = fRmax1/std::cos(meshAngle*0.5) ; 2073 2035 meshRMax2 = fRmax2/std::cos(meshAngle*0.5) ; … … 2076 2038 // on the x axis. Will give better extent calculations when not rotated. 2077 2039 2078 if ( fDPhi == twopi && fSPhi == 0.0)2040 if ( fPhiFullCone && (fSPhi == 0.0) ) 2079 2041 { 2080 2042 sAngle = -meshAngle*0.5 ; … … 2102 2064 rMaxY2 = meshRMax2*sinCrossAngle ; 2103 2065 2104 // G4double RMin = (fRmin2 <= fRmin1) ? fRmin2 : fRmin1 ;2105 2106 2066 rMinX1 = fRmin1*cosCrossAngle ; 2107 2067 rMinY1 = fRmin1*sinCrossAngle ; … … 2127 2087 "Error in allocation of vertices. Out of memory !"); 2128 2088 } 2089 2129 2090 return vertices ; 2130 2091 } … … 2192 2153 rRand2 = RandFlat::shoot(fRmin2,fRmax2); 2193 2154 2194 if (fSPhi == 0. && fDPhi == twopi){ Afive = 0.; }2155 if ( (fSPhi == 0.) && fPhiFullCone ) { Afive = 0.; } 2195 2156 chose = RandFlat::shoot(0.,Aone+Atwo+Athree+Afour+2.*Afive); 2196 2157 … … 2225 2186 else if( (chose >= Aone + Atwo) && (chose < Aone + Atwo + Athree) ) 2226 2187 { 2227 return G4ThreeVector (rRand1*cosu, rRand1*sinu,-1*fDz);2188 return G4ThreeVector (rRand1*cosu, rRand1*sinu, -1*fDz); 2228 2189 } 2229 2190 else if( (chose >= Aone + Atwo + Athree) -
trunk/source/geometry/solids/CSG/src/G4Tubs.cc
r850 r921 25 25 // 26 26 // 27 // $Id: G4Tubs.cc,v 1. 68 2008/06/23 13:37:39gcosmo Exp $28 // GEANT4 tag $Name: HEAD$27 // $Id: G4Tubs.cc,v 1.74 2008/11/06 15:26:53 gcosmo Exp $ 28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 29 // 30 30 // … … 108 108 "Invalid Z half-length"); 109 109 } 110 if ( pRMin < pRMax && pRMin >= 0) // Check radii110 if ( (pRMin < pRMax) && (pRMin >= 0) ) // Check radii 111 111 { 112 112 fRMin = pRMin ; … … 121 121 "Invalid radii."); 122 122 } 123 if ( pDPhi >= twopi ) // Check angles 123 124 fPhiFullTube = true; 125 if ( pDPhi >= twopi-kAngTolerance*0.5 ) // Check angles 124 126 { 125 127 fDPhi=twopi; 128 fSPhi=0; 126 129 } 127 130 else 128 131 { 132 fPhiFullTube = false; 129 133 if ( pDPhi > 0 ) 130 134 { … … 136 140 << " Negative delta-Phi ! - " 137 141 << pDPhi << G4endl; 138 G4Exception("G4Tubs::G4Tubs()", "InvalidSetup", FatalException, 139 "Invalid dphi."); 140 } 141 } 142 143 // Ensure fSphi in 0-2PI or -2PI-0 range if shape crosses 0 144 145 fSPhi = pSPhi; 146 147 if ( fSPhi < 0 ) 148 { 149 fSPhi = twopi - std::fmod(std::fabs(fSPhi),twopi) ; 150 } 151 else 152 { 153 fSPhi = std::fmod(fSPhi,twopi) ; 154 } 155 if (fSPhi + fDPhi > twopi ) 156 { 157 fSPhi -= twopi ; 158 } 142 G4Exception("G4Tubs::G4Tubs()", "InvalidSetup", 143 FatalException, "Invalid dphi."); 144 } 145 146 // Ensure fSphi in 0-2PI or -2PI-0 range if shape crosses 0 147 148 if ( pSPhi < 0 ) 149 { 150 fSPhi = twopi - std::fmod(std::fabs(pSPhi),twopi); 151 } 152 else 153 { 154 fSPhi = std::fmod(pSPhi,twopi) ; 155 } 156 if ( fSPhi+fDPhi > twopi ) 157 { 158 fSPhi -= twopi ; 159 } 160 } 161 InitializeTrigonometry(); 159 162 } 160 163 … … 290 293 yoff2 = yMax - yoffset ; 291 294 292 if ( yoff1 >= 0 && yoff2 >= 0 ) // Y limits cross max/min x => no change293 { 295 if ( (yoff1 >= 0) && (yoff2 >= 0) ) // Y limits cross max/min x 296 { // => no change 294 297 pMin = xMin ; 295 298 pMax = xMax ; … … 317 320 xoff2 = xMax - xoffset ; 318 321 319 if ( xoff1 >= 0 && xoff2 >= 0 ) // X limits cross max/min y => no change320 { 322 if ( (xoff1 >= 0) && (xoff2 >= 0) ) // X limits cross max/min y 323 { // => no change 321 324 pMin = yMin ; 322 325 pMax = yMax ; … … 363 366 noEntries = vertices->size() ; 364 367 noBetweenSections4 = noEntries - 4 ; 365 /* 366 G4cout << "vertices = " << noEntries << "\t" 367 << "v-4 = " << noBetweenSections4 << G4endl; 368 G4cout << G4endl; 369 for(i = 0 ; i < noEntries ; i++ ) 370 { 371 G4cout << i << "\t" << "v.x = " << ((*vertices)[i]).x() << "\t" 372 << "v.y = " << ((*vertices)[i]).y() << "\t" 373 << "v.z = " << ((*vertices)[i]).z() << "\t" << G4endl; 374 } 375 G4cout << G4endl; 376 G4cout << "ClipCrossSection" << G4endl; 377 */ 368 378 369 for (i = 0 ; i < noEntries ; i += 4 ) 379 370 { 380 // G4cout << "section = " << i << G4endl; 381 ClipCrossSection(vertices,i,pVoxelLimit,pAxis,pMin,pMax) ; 382 } 383 // G4cout << "ClipBetweenSections" << G4endl; 371 ClipCrossSection(vertices, i, pVoxelLimit, pAxis, pMin, pMax) ; 372 } 384 373 for (i = 0 ; i < noBetweenSections4 ; i += 4 ) 385 374 { 386 // G4cout << "between sections = " << i << G4endl; 387 ClipBetweenSections(vertices,i,pVoxelLimit,pAxis,pMin,pMax) ; 388 } 389 if (pMin != kInfinity || pMax != -kInfinity ) 375 ClipBetweenSections(vertices, i, pVoxelLimit, pAxis, pMin, pMax) ; 376 } 377 if ((pMin != kInfinity) || (pMax != -kInfinity) ) 390 378 { 391 379 existsAfterClip = true ; … … 426 414 G4double r2,pPhi,tolRMin,tolRMax; 427 415 EInside in = kOutside ; 428 429 if (std::fabs(p.z()) <= fDz - kCarTolerance*0.5) 416 static const G4double halfCarTolerance=kCarTolerance*0.5; 417 static const G4double halfRadTolerance=kRadTolerance*0.5; 418 static const G4double halfAngTolerance=kAngTolerance*0.5; 419 420 if (std::fabs(p.z()) <= fDz - halfCarTolerance) 430 421 { 431 422 r2 = p.x()*p.x() + p.y()*p.y() ; 432 423 433 if (fRMin) { tolRMin = fRMin + kRadTolerance*0.5; }424 if (fRMin) { tolRMin = fRMin + halfRadTolerance ; } 434 425 else { tolRMin = 0 ; } 435 426 436 tolRMax = fRMax - kRadTolerance*0.5;427 tolRMax = fRMax - halfRadTolerance ; 437 428 438 if ( r2 >= tolRMin*tolRMin && r2 <= tolRMax*tolRMax)439 { 440 if ( f DPhi == twopi)429 if ((r2 >= tolRMin*tolRMin) && (r2 <= tolRMax*tolRMax)) 430 { 431 if ( fPhiFullTube ) 441 432 { 442 433 in = kInside ; … … 447 438 // if not inside, try outer tolerant phi boundaries 448 439 449 pPhi = std::atan2(p.y(),p.x()) ; 450 if ((tolRMin==0)&&(p.x()==0)&&(p.y()==0)) 440 if ((tolRMin==0)&&(p.x()<=halfCarTolerance)&&(p.y()<=halfCarTolerance)) 451 441 { 452 442 in=kSurface; … … 454 444 else 455 445 { 456 if ( pPhi < -kAngTolerance*0.5 ) { pPhi += twopi; } // 0<=pPhi<2pi 446 pPhi = std::atan2(p.y(),p.x()) ; 447 if ( pPhi < -halfAngTolerance ) { pPhi += twopi; } // 0<=pPhi<2pi 457 448 458 449 if ( fSPhi >= 0 ) 459 450 { 460 if ( (std::abs(pPhi) < kAngTolerance*0.5)461 && (std::abs(fSPhi + fDPhi - twopi) < kAngTolerance*0.5) )451 if ( (std::abs(pPhi) < halfAngTolerance) 452 && (std::abs(fSPhi + fDPhi - twopi) < halfAngTolerance) ) 462 453 { 463 454 pPhi += twopi ; // 0 <= pPhi < 2pi 464 455 } 465 if ( (pPhi >= fSPhi + kAngTolerance*0.5)466 && (pPhi <= fSPhi + fDPhi - kAngTolerance*0.5) )456 if ( (pPhi >= fSPhi + halfAngTolerance) 457 && (pPhi <= fSPhi + fDPhi - halfAngTolerance) ) 467 458 { 468 459 in = kInside ; 469 460 } 470 else if ( (pPhi >= fSPhi - kAngTolerance*0.5)471 && (pPhi <= fSPhi + fDPhi + kAngTolerance*0.5) )461 else if ( (pPhi >= fSPhi - halfAngTolerance) 462 && (pPhi <= fSPhi + fDPhi + halfAngTolerance) ) 472 463 { 473 464 in = kSurface ; … … 476 467 else // fSPhi < 0 477 468 { 478 if ( (pPhi <= fSPhi + twopi - kAngTolerance*0.5)479 && (pPhi >= fSPhi + fDPhi + kAngTolerance*0.5) ) {;}480 else if ( (pPhi <= fSPhi + twopi + kAngTolerance*0.5)481 && (pPhi >= fSPhi + fDPhi - kAngTolerance*0.5) )469 if ( (pPhi <= fSPhi + twopi - halfAngTolerance) 470 && (pPhi >= fSPhi + fDPhi + halfAngTolerance) ) {;} //kOutside 471 else if ( (pPhi <= fSPhi + twopi + halfAngTolerance) 472 && (pPhi >= fSPhi + fDPhi - halfAngTolerance) ) 482 473 { 483 474 in = kSurface ; … … 493 484 else // Try generous boundaries 494 485 { 495 tolRMin = fRMin - kRadTolerance*0.5;496 tolRMax = fRMax + kRadTolerance*0.5;486 tolRMin = fRMin - halfRadTolerance ; 487 tolRMax = fRMax + halfRadTolerance ; 497 488 498 489 if ( tolRMin < 0 ) { tolRMin = 0; } … … 500 491 if ( (r2 >= tolRMin*tolRMin) && (r2 <= tolRMax*tolRMax) ) 501 492 { 502 if ( fDPhi == twopi || r2 == 0 ) // Continuous in phi or on z-axis503 { 493 if (fPhiFullTube || (r2 <=halfRadTolerance*halfRadTolerance) ) 494 { // Continuous in phi or on z-axis 504 495 in = kSurface ; 505 496 } … … 508 499 pPhi = std::atan2(p.y(),p.x()) ; 509 500 510 if ( pPhi < - kAngTolerance*0.5) { pPhi += twopi; } // 0<=pPhi<2pi501 if ( pPhi < -halfAngTolerance) { pPhi += twopi; } // 0<=pPhi<2pi 511 502 if ( fSPhi >= 0 ) 512 503 { 513 if ( (std::abs(pPhi) < kAngTolerance*0.5)514 && (std::abs(fSPhi + fDPhi - twopi) < kAngTolerance*0.5) )504 if ( (std::abs(pPhi) < halfAngTolerance) 505 && (std::abs(fSPhi + fDPhi - twopi) < halfAngTolerance) ) 515 506 { 516 507 pPhi += twopi ; // 0 <= pPhi < 2pi 517 508 } 518 if ( (pPhi >= fSPhi - kAngTolerance*0.5)519 && (pPhi <= fSPhi + fDPhi + kAngTolerance*0.5) )509 if ( (pPhi >= fSPhi - halfAngTolerance) 510 && (pPhi <= fSPhi + fDPhi + halfAngTolerance) ) 520 511 { 521 512 in = kSurface ; … … 524 515 else // fSPhi < 0 525 516 { 526 if ( (pPhi <= fSPhi + twopi - kAngTolerance*0.5)527 && (pPhi >= fSPhi + fDPhi + kAngTolerance*0.5) ) {;}517 if ( (pPhi <= fSPhi + twopi - halfAngTolerance) 518 && (pPhi >= fSPhi + fDPhi + halfAngTolerance) ) {;} // kOutside 528 519 else 529 520 { … … 535 526 } 536 527 } 537 else if (std::fabs(p.z()) <= fDz + kCarTolerance*0.5)528 else if (std::fabs(p.z()) <= fDz + halfCarTolerance) 538 529 { // Check within tolerant r limits 539 530 r2 = p.x()*p.x() + p.y()*p.y() ; 540 tolRMin = fRMin - kRadTolerance*0.5;541 tolRMax = fRMax + kRadTolerance*0.5;531 tolRMin = fRMin - halfRadTolerance ; 532 tolRMax = fRMax + halfRadTolerance ; 542 533 543 534 if ( tolRMin < 0 ) { tolRMin = 0; } … … 545 536 if ( (r2 >= tolRMin*tolRMin) && (r2 <= tolRMax*tolRMax) ) 546 537 { 547 if (f DPhi == twopi || r2 == 0 ) // Continuous in phi or on z-axis548 { 538 if (fPhiFullTube || (r2 <=halfRadTolerance*halfRadTolerance)) 539 { // Continuous in phi or on z-axis 549 540 in = kSurface ; 550 541 } … … 553 544 pPhi = std::atan2(p.y(),p.x()) ; 554 545 555 if ( pPhi < - kAngTolerance*0.5) { pPhi += twopi; } // 0<=pPhi<2pi546 if ( pPhi < -halfAngTolerance ) { pPhi += twopi; } // 0<=pPhi<2pi 556 547 if ( fSPhi >= 0 ) 557 548 { 558 if ( (std::abs(pPhi) < kAngTolerance*0.5)559 && (std::abs(fSPhi + fDPhi - twopi) < kAngTolerance*0.5) )549 if ( (std::abs(pPhi) < halfAngTolerance) 550 && (std::abs(fSPhi + fDPhi - twopi) < halfAngTolerance) ) 560 551 { 561 552 pPhi += twopi ; // 0 <= pPhi < 2pi 562 553 } 563 if ( (pPhi >= fSPhi - kAngTolerance*0.5)564 && (pPhi <= fSPhi + fDPhi + kAngTolerance*0.5) )554 if ( (pPhi >= fSPhi - halfAngTolerance) 555 && (pPhi <= fSPhi + fDPhi + halfAngTolerance) ) 565 556 { 566 557 in = kSurface; … … 569 560 else // fSPhi < 0 570 561 { 571 if ( (pPhi <= fSPhi + twopi - kAngTolerance*0.5)572 && (pPhi >= fSPhi + fDPhi + kAngTolerance*0.5) ) {;}562 if ( (pPhi <= fSPhi + twopi - halfAngTolerance) 563 && (pPhi >= fSPhi + fDPhi + halfAngTolerance) ) {;} 573 564 else 574 565 { … … 589 580 590 581 G4ThreeVector G4Tubs::SurfaceNormal( const G4ThreeVector& p ) const 591 { G4int noSurfaces = 0; 582 { 583 G4int noSurfaces = 0; 592 584 G4double rho, pPhi; 593 G4double delta = 0.5*kCarTolerance, dAngle = 0.5*kAngTolerance;594 585 G4double distZ, distRMin, distRMax; 595 586 G4double distSPhi = kInfinity, distEPhi = kInfinity; 587 588 static const G4double halfCarTolerance = 0.5*kCarTolerance; 589 static const G4double halfAngTolerance = 0.5*kAngTolerance; 590 596 591 G4ThreeVector norm, sumnorm(0.,0.,0.); 597 592 G4ThreeVector nZ = G4ThreeVector(0, 0, 1.0); … … 604 599 distZ = std::fabs(std::fabs(p.z()) - fDz); 605 600 606 if ( fDPhi < twopi) // && rho )// Protected against (0,0,z)607 { 608 if ( rho )601 if (!fPhiFullTube) // Protected against (0,0,z) 602 { 603 if ( rho > halfCarTolerance ) 609 604 { 610 605 pPhi = std::atan2(p.y(),p.x()); 611 606 612 if(pPhi < fSPhi- delta) { pPhi += twopi; }613 else if(pPhi > fSPhi+fDPhi+ delta) { pPhi -= twopi; }614 615 distSPhi = std::fabs( pPhi - fSPhi);607 if(pPhi < fSPhi- halfCarTolerance) { pPhi += twopi; } 608 else if(pPhi > fSPhi+fDPhi+ halfCarTolerance) { pPhi -= twopi; } 609 610 distSPhi = std::fabs(pPhi - fSPhi); 616 611 distEPhi = std::fabs(pPhi - fSPhi - fDPhi); 617 612 } … … 624 619 nPe = G4ThreeVector(-std::sin(fSPhi+fDPhi),std::cos(fSPhi+fDPhi),0); 625 620 } 626 if ( rho > delta ){ nR = G4ThreeVector(p.x()/rho,p.y()/rho,0); }627 628 if( distRMax <= delta)621 if ( rho > halfCarTolerance ) { nR = G4ThreeVector(p.x()/rho,p.y()/rho,0); } 622 623 if( distRMax <= halfCarTolerance ) 629 624 { 630 625 noSurfaces ++; 631 626 sumnorm += nR; 632 627 } 633 if( fRMin && distRMin <= delta)628 if( fRMin && (distRMin <= halfCarTolerance) ) 634 629 { 635 630 noSurfaces ++; … … 638 633 if( fDPhi < twopi ) 639 634 { 640 if (distSPhi <= dAngle) // delta)635 if (distSPhi <= halfAngTolerance) 641 636 { 642 637 noSurfaces ++; 643 638 sumnorm += nPs; 644 639 } 645 if (distEPhi <= dAngle) // delta)640 if (distEPhi <= halfAngTolerance) 646 641 { 647 642 noSurfaces ++; … … 649 644 } 650 645 } 651 if (distZ <= delta)646 if (distZ <= halfCarTolerance) 652 647 { 653 648 noSurfaces ++; … … 668 663 else if ( noSurfaces == 1 ) { norm = sumnorm; } 669 664 else { norm = sumnorm.unit(); } 665 670 666 return norm; 671 667 } … … 714 710 } 715 711 } 716 if ( fDPhi < twopi&& rho ) // Protected against (0,0,z)712 if (!fPhiFullTube && rho ) // Protected against (0,0,z) 717 713 { 718 714 phi = std::atan2(p.y(),p.x()) ; … … 749 745 case kNRMin : // Inner radius 750 746 { 751 norm = G4ThreeVector(-p.x()/rho, -p.y()/rho,0) ;747 norm = G4ThreeVector(-p.x()/rho, -p.y()/rho, 0) ; 752 748 break ; 753 749 } 754 750 case kNRMax : // Outer radius 755 751 { 756 norm = G4ThreeVector(p.x()/rho, p.y()/rho,0) ;752 norm = G4ThreeVector(p.x()/rho, p.y()/rho, 0) ; 757 753 break ; 758 754 } 759 755 case kNZ : // + or - dz 760 756 { 761 if ( p.z() > 0 ) norm = G4ThreeVector(0,0,1) ;762 else norm = G4ThreeVector(0,0,-1) ;757 if ( p.z() > 0 ) { norm = G4ThreeVector(0,0,1) ; } 758 else { norm = G4ThreeVector(0,0,-1); } 763 759 break ; 764 760 } 765 761 case kNSPhi: 766 762 { 767 norm = G4ThreeVector(std::sin(fSPhi), -std::cos(fSPhi),0) ;763 norm = G4ThreeVector(std::sin(fSPhi), -std::cos(fSPhi), 0) ; 768 764 break ; 769 765 } 770 766 case kNEPhi: 771 767 { 772 norm = G4ThreeVector(-std::sin(fSPhi+fDPhi), std::cos(fSPhi+fDPhi),0) ;768 norm = G4ThreeVector(-std::sin(fSPhi+fDPhi), std::cos(fSPhi+fDPhi), 0) ; 773 769 break; 774 770 } … … 804 800 // 805 801 // NOTE: 806 // - Precalculations for phi trigonometry are Done `just in time' 807 // - `if valid' implies tolerant checking of intersection points 802 // - 'if valid' implies tolerant checking of intersection points 808 803 809 804 G4double G4Tubs::DistanceToIn( const G4ThreeVector& p, 810 805 const G4ThreeVector& v ) const 811 806 { 812 G4double snxt = kInfinity ; // snxt = default return value 813 814 // Precalculated trig for phi intersections - used by r,z intersections to 815 // check validity 816 817 G4bool seg ; // true if segmented 818 819 G4double hDPhi, hDPhiOT, hDPhiIT, cosHDPhiOT=0., cosHDPhiIT=0. ; 820 // half dphi + outer tolerance 821 822 G4double cPhi, sinCPhi=0., cosCPhi=0. ; // central phi 823 824 G4double tolORMin2, tolIRMax2 ; // `generous' radii squared 825 807 G4double snxt = kInfinity ; // snxt = default return value 808 G4double tolORMin2, tolIRMax2 ; // 'generous' radii squared 826 809 G4double tolORMax2, tolIRMin2, tolODz, tolIDz ; 810 811 static const G4double halfCarTolerance = 0.5*kCarTolerance; 812 static const G4double halfRadTolerance = 0.5*kRadTolerance; 827 813 828 814 // Intersection point variables 829 815 // 830 G4double Dist, s, xi, yi, zi, rho2, inum, iden, cosPsi ; 831 832 G4double t1, t2, t3, b, c, d ; // Quadratic solver variables 833 834 G4double Comp ; 835 G4double cosSPhi, sinSPhi ; // Trig for phi start intersect 836 837 G4double ePhi, cosEPhi, sinEPhi ; // for phi end intersect 838 839 // Set phi divided flag and precalcs 840 841 if ( fDPhi < twopi ) 842 { 843 seg = true ; 844 hDPhi = 0.5*fDPhi ; // half delta phi 845 cPhi = fSPhi + hDPhi ; 846 hDPhiOT = hDPhi + 0.5*kAngTolerance ; // outers tol' half delta phi 847 hDPhiIT = hDPhi - 0.5*kAngTolerance ; 848 sinCPhi = std::sin(cPhi) ; 849 cosCPhi = std::cos(cPhi) ; 850 cosHDPhiOT = std::cos(hDPhiOT) ; 851 cosHDPhiIT = std::cos(hDPhiIT) ; 852 } 853 else 854 { 855 seg = false ; 856 } 857 816 G4double Dist, s, xi, yi, zi, rho2, inum, iden, cosPsi, Comp ; 817 G4double t1, t2, t3, b, c, d ; // Quadratic solver variables 818 858 819 // Calculate tolerant rmin and rmax 859 820 860 821 if (fRMin > kRadTolerance) 861 822 { 862 tolORMin2 = (fRMin - 0.5*kRadTolerance)*(fRMin - 0.5*kRadTolerance) ;863 tolIRMin2 = (fRMin + 0.5*kRadTolerance)*(fRMin + 0.5*kRadTolerance) ;823 tolORMin2 = (fRMin - halfRadTolerance)*(fRMin - halfRadTolerance) ; 824 tolIRMin2 = (fRMin + halfRadTolerance)*(fRMin + halfRadTolerance) ; 864 825 } 865 826 else … … 868 829 tolIRMin2 = 0.0 ; 869 830 } 870 tolORMax2 = (fRMax + 0.5*kRadTolerance)*(fRMax + 0.5*kRadTolerance) ;871 tolIRMax2 = (fRMax - 0.5*kRadTolerance)*(fRMax - 0.5*kRadTolerance) ;831 tolORMax2 = (fRMax + halfRadTolerance)*(fRMax + halfRadTolerance) ; 832 tolIRMax2 = (fRMax - halfRadTolerance)*(fRMax - halfRadTolerance) ; 872 833 873 834 // Intersection with Z surfaces 874 835 875 tolIDz = fDz - kCarTolerance*0.5;876 tolODz = fDz + kCarTolerance*0.5;836 tolIDz = fDz - halfCarTolerance ; 837 tolODz = fDz + halfCarTolerance ; 877 838 878 839 if (std::fabs(p.z()) >= tolIDz) … … 880 841 if ( p.z()*v.z() < 0 ) // at +Z going in -Z or visa versa 881 842 { 882 s = (std::fabs(p.z()) - fDz)/std::fabs(v.z()) ; // Z intersect distance843 s = (std::fabs(p.z()) - fDz)/std::fabs(v.z()) ; // Z intersect distance 883 844 884 845 if(s < 0.0) { s = 0.0; } … … 890 851 // Check validity of intersection 891 852 892 if ( tolIRMin2 <= rho2 && rho2 <= tolIRMax2)893 { 894 if ( seg&& rho2)853 if ((tolIRMin2 <= rho2) && (rho2 <= tolIRMax2)) 854 { 855 if (!fPhiFullTube && rho2) 895 856 { 896 857 // Psi = angle made with central (average) phi of shape … … 899 860 iden = std::sqrt(rho2) ; 900 861 cosPsi = inum/iden ; 901 if (cosPsi >= cosHDPhiIT) return s ;862 if (cosPsi >= cosHDPhiIT) { return s ; } 902 863 } 903 864 else … … 909 870 else 910 871 { 911 if ( snxt< kCarTolerance*0.5) { snxt=0; }872 if ( snxt<halfCarTolerance ) { snxt=0; } 912 873 return snxt ; // On/outside extent, and heading away 913 874 // -> cannot intersect … … 934 895 b = t2/t1 ; 935 896 c = t3 - fRMax*fRMax ; 936 if ( t3 >= tolORMax2 && t2<0) // This also handles the tangent case897 if ((t3 >= tolORMax2) && (t2<0)) // This also handles the tangent case 937 898 { 938 899 // Try outer cylinder intersection … … 954 915 // Z ok. Check phi intersection if reqd 955 916 // 956 if ( !seg)917 if (fPhiFullTube) 957 918 { 958 919 return s ; … … 963 924 yi = p.y() + s*v.y() ; 964 925 cosPsi = (xi*cosCPhi + yi*sinCPhi)/fRMax ; 965 if (cosPsi >= cosHDPhiIT) return s ;926 if (cosPsi >= cosHDPhiIT) { return s ; } 966 927 } 967 928 } // end if std::fabs(zi) … … 974 935 // check not inside, and heading through tubs (-> 0 to in) 975 936 976 if ( t3 > tolIRMin2 && t2 < 0 && std::fabs(p.z()) <= tolIDz)937 if ((t3 > tolIRMin2) && (t2 < 0) && (std::fabs(p.z()) <= tolIDz)) 977 938 { 978 939 // Inside both radii, delta r -ve, inside z extent 979 940 980 if ( seg)941 if (!fPhiFullTube) 981 942 { 982 943 inum = p.x()*cosCPhi + p.y()*sinCPhi ; … … 1004 965 snxt = c/(-b+std::sqrt(d)); // using safe solution 1005 966 // for quadratic equation 1006 if ( snxt <kCarTolerance*0.5) { snxt=0; }967 if ( snxt < halfCarTolerance ) { snxt=0; } 1007 968 return snxt ; 1008 969 } … … 1035 996 snxt= c/(-b+std::sqrt(d)); // using safe solution 1036 997 // for quadratic equation 1037 if ( snxt <kCarTolerance*0.5) { snxt=0; }998 if ( snxt < halfCarTolerance ) { snxt=0; } 1038 999 return snxt ; 1039 1000 } … … 1043 1004 } 1044 1005 } 1045 } // end if ( seg)1006 } // end if (!fPhiFullTube) 1046 1007 } // end if (t3>tolIRMin2) 1047 1008 } // end if (Inside Outer Radius) … … 1056 1017 1057 1018 s = -b + std::sqrt(d) ; 1058 if (s >= - 0.5*kCarTolerance) // check forwards1019 if (s >= -halfCarTolerance) // check forwards 1059 1020 { 1060 1021 // Check z intersection … … 1066 1027 // Z ok. Check phi 1067 1028 // 1068 if ( !seg)1029 if ( fPhiFullTube ) 1069 1030 { 1070 1031 return s ; … … 1098 1059 // -> use some form of loop Construct ? 1099 1060 // 1100 if ( seg)1061 if ( !fPhiFullTube ) 1101 1062 { 1102 1063 // First phi surface (Starting phi) 1103 1104 sinSPhi = std::sin(fSPhi) ; 1105 cosSPhi = std::cos(fSPhi) ; 1064 // 1106 1065 Comp = v.x()*sinSPhi - v.y()*cosSPhi ; 1107 1066 … … 1110 1069 Dist = (p.y()*cosSPhi - p.x()*sinSPhi) ; 1111 1070 1112 if ( Dist < kCarTolerance*0.5)1071 if ( Dist < halfCarTolerance ) 1113 1072 { 1114 1073 s = Dist/Comp ; … … 1135 1094 // - check intersecting with correct half-plane 1136 1095 // 1137 if ((yi*cosCPhi-xi*sinCPhi) <= 0) snxt = s ;1138 } 1096 if ((yi*cosCPhi-xi*sinCPhi) <= halfCarTolerance) { snxt = s; } 1097 } 1139 1098 } 1140 1099 } … … 1142 1101 } 1143 1102 1144 // Second phi surface (`E'nding phi) 1145 1146 ePhi = fSPhi + fDPhi ; 1147 sinEPhi = std::sin(ePhi) ; 1148 cosEPhi = std::cos(ePhi) ; 1103 // Second phi surface (Ending phi) 1104 1149 1105 Comp = -(v.x()*sinEPhi - v.y()*cosEPhi) ; 1150 1106 … … 1153 1109 Dist = -(p.y()*cosEPhi - p.x()*sinEPhi) ; 1154 1110 1155 if ( Dist < kCarTolerance*0.5)1111 if ( Dist < halfCarTolerance ) 1156 1112 { 1157 1113 s = Dist/Comp ; … … 1177 1133 // - check intersecting with correct half-plane 1178 1134 // 1179 if ( (yi*cosCPhi-xi*sinCPhi) >= 0 ) { snxt = s; }1180 } 1135 if ( (yi*cosCPhi-xi*sinCPhi) >= 0 ) { snxt = s; } 1136 } //?? >=-halfCarTolerance 1181 1137 } 1182 1138 } 1183 1139 } 1184 1140 } // Comp < 0 1185 } // seg != 01186 if ( snxt< kCarTolerance*0.5) { snxt=0; }1141 } // !fPhiFullTube 1142 if ( snxt<halfCarTolerance ) { snxt=0; } 1187 1143 return snxt ; 1188 1144 } … … 1217 1173 { 1218 1174 G4double safe=0.0, rho, safe1, safe2, safe3 ; 1219 G4double phiC, cosPhiC, sinPhiC, safePhi,ePhi, cosPsi ;1175 G4double safePhi, cosPsi ; 1220 1176 1221 1177 rho = std::sqrt(p.x()*p.x() + p.y()*p.y()) ; … … 1228 1184 if ( safe3 > safe ) { safe = safe3; } 1229 1185 1230 if (fDPhi < twopi && rho) 1231 { 1232 phiC = fSPhi + fDPhi*0.5 ; 1233 cosPhiC = std::cos(phiC) ; 1234 sinPhiC = std::sin(phiC) ; 1235 1186 if ( (!fPhiFullTube) && (rho) ) 1187 { 1236 1188 // Psi=angle from central phi to point 1237 1189 // 1238 cosPsi = (p.x()*cos PhiC + p.y()*sinPhiC)/rho ;1239 1190 cosPsi = (p.x()*cosCPhi + p.y()*sinCPhi)/rho ; 1191 1240 1192 if ( cosPsi < std::cos(fDPhi*0.5) ) 1241 1193 { 1242 1194 // Point lies outside phi range 1243 1195 1244 if ( (p.y()*cos PhiC - p.x()*sinPhiC) <= 0 )1245 { 1246 safePhi = std::fabs(p.x()*s td::sin(fSPhi) - p.y()*std::cos(fSPhi)) ;1196 if ( (p.y()*cosCPhi - p.x()*sinCPhi) <= 0 ) 1197 { 1198 safePhi = std::fabs(p.x()*sinSPhi - p.y()*cosSPhi) ; 1247 1199 } 1248 1200 else 1249 1201 { 1250 ePhi = fSPhi + fDPhi ; 1251 safePhi = std::fabs(p.x()*std::sin(ePhi) - p.y()*std::cos(ePhi)) ; 1202 safePhi = std::fabs(p.x()*sinEPhi - p.y()*cosEPhi) ; 1252 1203 } 1253 1204 if ( safePhi > safe ) { safe = safePhi; } … … 1269 1220 G4ThreeVector *n ) const 1270 1221 { 1271 ESide side = kNull , sider = kNull, sidephi =kNull ;1272 G4double snxt, sr = kInfinity, sphi =kInfinity, pdist ;1222 ESide side=kNull , sider=kNull, sidephi=kNull ; 1223 G4double snxt, sr=kInfinity, sphi=kInfinity, pdist ; 1273 1224 G4double deltaR, t1, t2, t3, b, c, d2, roMin2 ; 1274 1225 1226 static const G4double halfCarTolerance = kCarTolerance*0.5; 1227 static const G4double halfAngTolerance = kAngTolerance*0.5; 1228 1275 1229 // Vars for phi intersection: 1276 1230 1277 G4double sinSPhi, cosSPhi, ePhi, sinEPhi, cosEPhi ;1278 G4double cPhi, sinCPhi, cosCPhi ;1279 1231 G4double pDistS, compS, pDistE, compE, sphi2, xi, yi, vphi, roi2 ; 1280 1232 … … 1284 1236 { 1285 1237 pdist = fDz - p.z() ; 1286 if ( pdist > kCarTolerance*0.5)1238 if ( pdist > halfCarTolerance ) 1287 1239 { 1288 1240 snxt = pdist/v.z() ; … … 1303 1255 pdist = fDz + p.z() ; 1304 1256 1305 if ( pdist > kCarTolerance*0.5)1257 if ( pdist > halfCarTolerance ) 1306 1258 { 1307 1259 snxt = -pdist/v.z() ; … … 1326 1278 // Radial Intersections 1327 1279 // 1328 // Find inters ction with cylinders at rmax/rmin1280 // Find intersection with cylinders at rmax/rmin 1329 1281 // Intersection point (xi,yi,zi) on line x=p.x+t*v.x etc. 1330 1282 // … … 1359 1311 b = t2/t1 ; 1360 1312 c = deltaR/t1 ; 1361 d2 = b*b-c;1362 if( d2>=0.){sr = -b + std::sqrt(d2);}1363 else {sr=0.;};1313 d2 = b*b-c; 1314 if( d2 >= 0 ) { sr = -b + std::sqrt(d2); } 1315 else { sr = 0.; } 1364 1316 sider = kRMax ; 1365 1317 } … … 1371 1323 if ( calcNorm ) 1372 1324 { 1373 // if ( p.x() || p.y() )1374 // {1375 // *n=G4ThreeVector(p.x(),p.y(),0);1376 // }1377 // else1378 // {1379 // *n=v;1380 // }1381 1325 *n = G4ThreeVector(p.x()/fRMax,p.y()/fRMax,0) ; 1382 1326 *validNorm = true ; … … 1417 1361 c = deltaR/t1 ; 1418 1362 d2 = b*b-c; 1419 if( d2>=0.)1363 if( d2 >=0. ) 1420 1364 { 1421 1365 sr = -b + std::sqrt(d2) ; … … 1423 1367 } 1424 1368 else // Case: On the border+t2<kRadTolerance 1425 // (v is perpendicula ir to the surface)1369 // (v is perpendicular to the surface) 1426 1370 { 1427 1371 if (calcNorm) … … 1441 1385 c = deltaR/t1; 1442 1386 d2 = b*b-c; 1443 if( d2>=0.)1387 if( d2 >= 0 ) 1444 1388 { 1445 1389 sr = -b + std::sqrt(d2) ; … … 1447 1391 } 1448 1392 else // Case: On the border+t2<kRadTolerance 1449 // (v is perpendicula ir to the surface)1393 // (v is perpendicular to the surface) 1450 1394 { 1451 1395 if (calcNorm) … … 1461 1405 // Phi Intersection 1462 1406 1463 if ( fDPhi < twopi ) 1464 { 1465 sinSPhi = std::sin(fSPhi) ; 1466 cosSPhi = std::cos(fSPhi) ; 1467 ePhi = fSPhi + fDPhi ; 1468 sinEPhi = std::sin(ePhi) ; 1469 cosEPhi = std::cos(ePhi) ; 1470 cPhi = fSPhi + fDPhi*0.5 ; 1471 sinCPhi = std::sin(cPhi) ; 1472 cosCPhi = std::cos(cPhi) ; 1473 1407 if ( !fPhiFullTube ) 1408 { 1474 1409 // add angle calculation with correction 1475 1410 // of the difference in domain of atan2 and Sphi 1476 1411 // 1477 1412 vphi = std::atan2(v.y(),v.x()) ; 1478 1479 if ( vphi < fSPhi - kAngTolerance*0.5) { vphi += twopi; }1480 else if ( vphi > fSPhi + fDPhi + kAngTolerance*0.5) { vphi -= twopi; }1413 1414 if ( vphi < fSPhi - halfAngTolerance ) { vphi += twopi; } 1415 else if ( vphi > fSPhi + fDPhi + halfAngTolerance ) { vphi -= twopi; } 1481 1416 1482 1417 … … 1492 1427 compS = -sinSPhi*v.x() + cosSPhi*v.y() ; 1493 1428 compE = sinEPhi*v.x() - cosEPhi*v.y() ; 1429 1494 1430 sidephi = kNull; 1495 1431 1496 if( ( (fDPhi <= pi) && ( (pDistS <= 0.5*kCarTolerance)1497 && (pDistE <= 0.5*kCarTolerance) ) )1498 || ( (fDPhi > pi) && !((pDistS > 0.5*kCarTolerance)1499 && (pDistE > 0.5*kCarTolerance) ) ) )1432 if( ( (fDPhi <= pi) && ( (pDistS <= halfCarTolerance) 1433 && (pDistE <= halfCarTolerance) ) ) 1434 || ( (fDPhi > pi) && !((pDistS > halfCarTolerance) 1435 && (pDistE > halfCarTolerance) ) ) ) 1500 1436 { 1501 1437 // Inside both phi *full* planes … … 1505 1441 sphi = pDistS/compS ; 1506 1442 1507 if (sphi >= - 0.5*kCarTolerance)1443 if (sphi >= -halfCarTolerance) 1508 1444 { 1509 1445 xi = p.x() + sphi*v.x() ; … … 1513 1449 // (if not -> no intersect) 1514 1450 // 1515 if((std::abs(xi)<=kCarTolerance)&&(std::abs(yi)<=kCarTolerance)) 1516 { sidephi = kSPhi; 1517 if (((fSPhi-0.5*kAngTolerance)<=vphi) 1518 &&((ePhi+0.5*kAngTolerance)>=vphi)) 1451 if( (std::abs(xi)<=kCarTolerance)&&(std::abs(yi)<=kCarTolerance) ) 1452 { 1453 sidephi = kSPhi; 1454 if (((fSPhi-halfAngTolerance)<=vphi) 1455 &&((fSPhi+fDPhi+halfAngTolerance)>=vphi)) 1519 1456 { 1520 1457 sphi = kInfinity; 1521 1458 } 1522 1459 } 1523 else if ( (yi*cosCPhi-xi*sinCPhi)>=0)1460 else if ( yi*cosCPhi-xi*sinCPhi >=0 ) 1524 1461 { 1525 1462 sphi = kInfinity ; … … 1528 1465 { 1529 1466 sidephi = kSPhi ; 1530 if ( pDistS > - kCarTolerance*0.5)1467 if ( pDistS > -halfCarTolerance ) 1531 1468 { 1532 1469 sphi = 0.0 ; // Leave by sphi immediately … … 1550 1487 // Only check further if < starting phi intersection 1551 1488 // 1552 if ( (sphi2 > - 0.5*kCarTolerance) && (sphi2 < sphi) )1489 if ( (sphi2 > -halfCarTolerance) && (sphi2 < sphi) ) 1553 1490 { 1554 1491 xi = p.x() + sphi2*v.x() ; … … 1559 1496 // Leaving via ending phi 1560 1497 // 1561 if( !(((fSPhi-0.5*kAngTolerance)<=vphi)1562 &&((ePhi+0.5*kAngTolerance)>=vphi)))1498 if( !((fSPhi-halfAngTolerance <= vphi) 1499 &&(fSPhi+fDPhi+halfAngTolerance >= vphi)) ) 1563 1500 { 1564 1501 sidephi = kEPhi ; 1565 if ( pDistE <= - kCarTolerance*0.5) { sphi = sphi2 ; }1566 else { sphi = 0.0 ;}1502 if ( pDistE <= -halfCarTolerance ) { sphi = sphi2 ; } 1503 else { sphi = 0.0 ; } 1567 1504 } 1568 1505 } … … 1574 1511 // 1575 1512 sidephi = kEPhi ; 1576 if ( pDistE <= - kCarTolerance*0.5) { sphi = sphi2 ; }1577 else { sphi = 0.0 ;}1513 if ( pDistE <= -halfCarTolerance ) { sphi = sphi2 ; } 1514 else { sphi = 0.0 ; } 1578 1515 } 1579 1516 } … … 1589 1526 // On z axis + travel not || to z axis -> if phi of vector direction 1590 1527 // within phi of shape, Step limited by rmax, else Step =0 1591 1592 // vphi = std::atan2(v.y(),v.x()) ;//defined previosly1593 // G4cout<<"In axis vphi="<<vphi1594 // <<" Sphi="<<fSPhi<<" Ephi="<<ePhi<<G4endl;1595 // old if ( (fSPhi < vphi) && (vphi < fSPhi + fDPhi) )1596 // new : correction for if statement, must be '<='1597 1528 1598 if ( ( (fSPhi-0.5*kAngTolerance)<= vphi)1599 && (vphi <= ( ePhi+0.5*kAngTolerance) ))1529 if ( (fSPhi - halfAngTolerance <= vphi) 1530 && (vphi <= fSPhi + fDPhi + halfAngTolerance ) ) 1600 1531 { 1601 1532 sphi = kInfinity ; … … 1640 1571 if ( fDPhi <= pi ) 1641 1572 { 1642 *n = G4ThreeVector(s td::sin(fSPhi),-std::cos(fSPhi),0) ;1573 *n = G4ThreeVector(sinSPhi,-cosSPhi,0) ; 1643 1574 *validNorm = true ; 1644 1575 } … … 1652 1583 if (fDPhi <= pi) 1653 1584 { 1654 *n = G4ThreeVector(-s td::sin(fSPhi+fDPhi),std::cos(fSPhi+fDPhi),0) ;1585 *n = G4ThreeVector(-sinEPhi,cosEPhi,0) ; 1655 1586 *validNorm = true ; 1656 1587 } … … 1662 1593 1663 1594 case kPZ: 1664 *n =G4ThreeVector(0,0,1) ;1665 *validNorm =true ;1595 *n = G4ThreeVector(0,0,1) ; 1596 *validNorm = true ; 1666 1597 break ; 1667 1598 … … 1690 1621 } 1691 1622 } 1692 if ( snxt< kCarTolerance*0.5) { snxt=0 ; }1623 if ( snxt<halfCarTolerance ) { snxt=0 ; } 1693 1624 1694 1625 return snxt ; … … 1701 1632 G4double G4Tubs::DistanceToOut( const G4ThreeVector& p ) const 1702 1633 { 1703 G4double safe=0.0, rho, safeR1, safeR2, safeZ ; 1704 G4double safePhi, phiC, cosPhiC, sinPhiC, ePhi ; 1634 G4double safe=0.0, rho, safeR1, safeR2, safeZ, safePhi ; 1705 1635 rho = std::sqrt(p.x()*p.x() + p.y()*p.y()) ; 1706 1636 … … 1738 1668 // Check if phi divided, Calc distances closest phi plane 1739 1669 // 1740 if ( fDPhi < twopi ) 1741 { 1742 // Above/below central phi of Tubs? 1743 1744 phiC = fSPhi + fDPhi*0.5 ; 1745 cosPhiC = std::cos(phiC) ; 1746 sinPhiC = std::sin(phiC) ; 1747 1748 if ( (p.y()*cosPhiC - p.x()*sinPhiC) <= 0 ) 1749 { 1750 safePhi = -(p.x()*std::sin(fSPhi) - p.y()*std::cos(fSPhi)) ; 1670 if ( !fPhiFullTube ) 1671 { 1672 if ( p.y()*cosCPhi-p.x()*sinCPhi <= 0 ) 1673 { 1674 safePhi = -(p.x()*sinSPhi - p.y()*cosSPhi) ; 1751 1675 } 1752 1676 else 1753 1677 { 1754 ePhi = fSPhi + fDPhi ; 1755 safePhi = (p.x()*std::sin(ePhi) - p.y()*std::cos(ePhi)) ; 1678 safePhi = (p.x()*sinEPhi - p.y()*cosEPhi) ; 1756 1679 } 1757 1680 if (safePhi < safe) { safe = safePhi ; } … … 1806 1729 // on the x axis. Will give better extent calculations when not rotated. 1807 1730 1808 if (f DPhi == pi*2.0 && fSPhi == 0) { sAngle = -meshAngle*0.5 ; }1809 else { sAngle = fSPhi ; }1731 if (fPhiFullTube && (fSPhi == 0) ) { sAngle = -meshAngle*0.5 ; } 1732 else { sAngle = fSPhi ; } 1810 1733 1811 1734 vertices = new G4ThreeVectorList(); … … 1975 1898 if (fRMin != 0) 1976 1899 { 1977 if (f DPhi >= twopi)1900 if (fPhiFullTube) 1978 1901 { 1979 1902 pNURBS = new G4NURBStube (fRMin,fRMax,fDz) ; … … 1986 1909 else 1987 1910 { 1988 if (f DPhi >= twopi)1911 if (fPhiFullTube) 1989 1912 { 1990 1913 pNURBS = new G4NURBScylinder (fRMax,fDz) ; -
trunk/source/geometry/solids/specific/History
r850 r921 1 $Id: History,v 1.1 45 2008/08/12 08:57:31gcosmo Exp $1 $Id: History,v 1.150 2008/11/21 09:26:53 gcosmo Exp $ 2 2 ------------------------------------------------------------------- 3 3 … … 17 17 * Reverse chronological order (last date on top), please * 18 18 ---------------------------------------------------------- 19 20 21-Nov-2008, G.Cosmo (geom-specific-V09-01-19) 21 - Added missing accessors to G4EllipticalCone, required for detector 22 persistency. 23 24 13-Nov-2008, G.Cosmo (geom-specific-V09-01-18) 25 - Corrected initialisation of algorithm in G4TriangularFacet constructor. 26 27 30-Oct-2008, I.Hrivnacova (geom-specific-V09-01-17) 28 - G4ExtrudedSolid: fixed bug in the decomposition of polygonal sides for 29 quadrangular facets in MakeFacets(). Addresses problem report #1029. 30 31 23-Sep-2008, T.Nikitina (geom-specific-V09-01-16) 32 - Corrected algorithm in G4TriangularFacet::GetPointOnFace() according to 33 suggestion advanced in problem report #1025. Fixes a problem of false 34 overlaps detection related to G4ExtrudedSolid and G4TessellatedSolid. 35 36 12-Sep-2008, G.Cosmo (geom-specific-V09-01-15) 37 - G4VFacet: corrected increment of indeces in operator==(), following 38 problem report #1024. 19 39 20 40 25-Jul-2008, I.Hrivnacova (geom-specific-V09-01-14) -
trunk/source/geometry/solids/specific/include/G4EllipticalCone.hh
r850 r921 25 25 // 26 26 // 27 // $Id: G4EllipticalCone.hh,v 1.1 1 2007/08/20 15:21:40 tnikitinExp $28 // GEANT4 tag $Name: HEAD$27 // $Id: G4EllipticalCone.hh,v 1.12 2008/11/21 09:26:22 gcosmo Exp $ 28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 29 // 30 30 // … … 96 96 // 97 97 inline G4double GetSemiAxisMax () const; 98 inline G4double GetSemiAxisX () const; 99 inline G4double GetSemiAxisY () const; 100 inline G4double GetZMax() const; 98 101 inline G4double GetZTopCut() const; 99 102 inline void SetSemiAxis (G4double x, G4double y, G4double z); -
trunk/source/geometry/solids/specific/include/G4EllipticalCone.icc
r850 r921 25 25 // 26 26 // 27 // $Id: G4EllipticalCone.icc,v 1. 6 2006/10/20 13:45:20gcosmo Exp $28 // GEANT4 tag $Name: HEAD$27 // $Id: G4EllipticalCone.icc,v 1.7 2008/11/21 09:26:22 gcosmo Exp $ 28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 29 // 30 30 // … … 43 43 { 44 44 return ySemiAxis > xSemiAxis ? ySemiAxis : xSemiAxis; 45 } 46 47 inline 48 G4double G4EllipticalCone::GetSemiAxisX () const 49 { 50 return xSemiAxis; 51 } 52 53 inline 54 G4double G4EllipticalCone::GetSemiAxisY () const 55 { 56 return ySemiAxis; 57 } 58 59 inline 60 G4double G4EllipticalCone::GetZMax() const 61 { 62 return zheight; 45 63 } 46 64 -
trunk/source/geometry/solids/specific/src/G4ExtrudedSolid.cc
r850 r921 25 25 // 26 26 // 27 // $Id: G4ExtrudedSolid.cc,v 1.1 7 2008/08/12 08:54:57 gcosmoExp $28 // GEANT4 tag $Name: HEAD$27 // $Id: G4ExtrudedSolid.cc,v 1.18 2008/10/30 11:47:45 ivana Exp $ 28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 29 // 30 30 // … … 562 562 563 563 good = AddFacet( new G4QuadrangularFacet( GetVertex(fNz-1, 3), GetVertex(fNz-1, 2), 564 GetVertex(fNz-1, 1), GetVertex( 1, 0),564 GetVertex(fNz-1, 1), GetVertex(fNz-1, 0), 565 565 ABSOLUTE) ); 566 566 if ( ! good ) { return false; } -
trunk/source/geometry/solids/specific/src/G4TriangularFacet.cc
r850 r921 25 25 // ******************************************************************** 26 26 // 27 // $Id: G4TriangularFacet.cc,v 1.1 0 2007/12/10 16:30:35 gunterExp $28 // GEANT4 tag $Name: HEAD$27 // $Id: G4TriangularFacet.cc,v 1.12 2008/11/13 08:25:07 gcosmo Exp $ 28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 29 // 30 30 // %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% … … 75 75 : G4VFacet() 76 76 { 77 if (!tGeomAlg) { tGeomAlg = G4TessellatedGeometryAlgorithms::GetInstance(); }77 tGeomAlg = G4TessellatedGeometryAlgorithms::GetInstance(); 78 78 P0 = Pt0; 79 79 nVertices = 3; … … 710 710 G4ThreeVector G4TriangularFacet::GetPointOnFace() const 711 711 { 712 G4double lambda0 = CLHEP::RandFlat::shoot(0.,1.); 713 G4double lambda1 = CLHEP::RandFlat::shoot(0.,lambda0); 714 712 G4double alpha = CLHEP::RandFlat::shoot(0.,1.); 713 G4double beta = CLHEP::RandFlat::shoot(0.,1); 714 G4double lambda1=alpha*beta; 715 G4double lambda0=alpha-lambda1; 716 715 717 return (P0 + lambda0*E[0] + lambda1*E[1]); 716 718 } -
trunk/source/geometry/solids/specific/src/G4VFacet.cc
r850 r921 25 25 // ******************************************************************** 26 26 // 27 // $Id: G4VFacet.cc,v 1. 6 2007/08/23 14:45:03gcosmo Exp $28 // GEANT4 tag $Name: HEAD$27 // $Id: G4VFacet.cc,v 1.7 2008/09/12 07:16:22 gcosmo Exp $ 28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 29 // 30 30 // %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% … … 96 96 { 97 97 coincident = (GetVertex(i)-right.GetVertex(j)).mag2() < tolerance; 98 } while (!coincident && j++< nVertices);99 } while (coincident && i++< nVertices);98 } while (!coincident && ++j < nVertices); 99 } while (coincident && ++i < nVertices); 100 100 101 101 return coincident; … … 117 117 std::ostream &G4VFacet::StreamInfo(std::ostream &os) const 118 118 { 119 os << G4endl;120 os << "***********************************************************************"121 << G4endl;122 os << "FACET TYPE = " <<geometryType <<G4endl;123 os << "ABSOLUTE VECTORS = " <<G4endl;124 os << "P0 = " <<P0 <<G4endl;119 os << G4endl; 120 os << "*********************************************************************" 121 << G4endl; 122 os << "FACET TYPE = " << geometryType << G4endl; 123 os << "ABSOLUTE VECTORS = " << G4endl; 124 os << "P0 = " << P0 << G4endl; 125 125 for (G4ThreeVectorList::const_iterator it=P.begin(); it!=P.end(); it++) 126 os <<"P[" <<it-P.begin()+1 <<"] = " <<*it <<G4endl;127 128 os << "RELATIVE VECTORS = " <<G4endl;126 { os << "P[" << it-P.begin()+1 << "] = " << *it << G4endl; } 127 128 os << "RELATIVE VECTORS = " << G4endl; 129 129 for (G4ThreeVectorList::const_iterator it=E.begin(); it!=E.end(); it++) 130 os <<"E[" <<it-E.begin()+1 <<"] = " <<*it <<G4endl;131 132 os << "***********************************************************************"133 << G4endl;130 { os << "E[" << it-E.begin()+1 << "] = " << *it << G4endl; } 131 132 os << "*********************************************************************" 133 << G4endl; 134 134 135 135 return os; -
trunk/source/geometry/volumes/History
r850 r921 1 $Id: History,v 1.15 3 2008/08/19 15:32:14gcosmo Exp $1 $Id: History,v 1.155 2008/11/13 09:35:03 gcosmo Exp $ 2 2 ------------------------------------------------------------------- 3 3 … … 17 17 * Reverse chronological order (last date on top), please * 18 18 ---------------------------------------------------------- 19 20 Nov 13th, 2008 G.Cosmo - geomvol-V09-01-03 21 - Corrected singleton definition for G4ReflectionFactory. 22 - Return 'const G4String&' instead of copy in GetVolumesNameExtension(). 19 23 20 24 Aug 19th, 2008 G.Cosmo - geomvol-V09-01-02 -
trunk/source/geometry/volumes/include/G4ReflectionFactory.hh
r850 r921 25 25 // 26 26 // 27 // $Id: G4ReflectionFactory.hh,v 1. 3 2006/06/29 18:57:39 gunterExp $28 // GEANT4 tag $Name: HEAD$27 // $Id: G4ReflectionFactory.hh,v 1.4 2008/11/13 09:33:20 gcosmo Exp $ 28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 29 // 30 30 // … … 152 152 153 153 void SetVolumesNameExtension(const G4String& nameExtension); 154 G4StringGetVolumesNameExtension() const;154 const G4String& GetVolumesNameExtension() const; 155 155 // Returns the name extension for the reflected solids 156 156 // and logical volumes. -
trunk/source/geometry/volumes/src/G4ReflectionFactory.cc
r850 r921 25 25 // 26 26 // 27 // $Id: G4ReflectionFactory.cc,v 1. 6 2007/05/11 13:58:35gcosmo Exp $28 // GEANT4 tag $Name: HEAD$27 // $Id: G4ReflectionFactory.cc,v 1.9 2008/11/13 09:33:20 gcosmo Exp $ 28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 29 // 30 30 // … … 75 75 // --- 76 76 77 if (!fInstance) new G4ReflectionFactory();78 77 if (!fInstance) { fInstance = new G4ReflectionFactory(); } 78 79 79 return fInstance; 80 80 } … … 98 98 G4ReflectionFactory::~G4ReflectionFactory() 99 99 { 100 delete fInstance; 100 101 } 101 102 … … 862 863 //_____________________________________________________________________________ 863 864 864 G4StringG4ReflectionFactory::GetVolumesNameExtension() const865 const G4String& G4ReflectionFactory::GetVolumesNameExtension() const 865 866 { 866 867 return fNameExtension; -
trunk/source/global/History
r850 r921 1 $Id: History,v 1.2 06 2008/09/03 07:21:32gcosmo Exp $1 $Id: History,v 1.213 2008/12/02 09:16:10 gcosmo Exp $ 2 2 ------------------------------------------------------------------- 3 3 … … 18 18 ---------------------------------------------------------- 19 19 20 Dec 02, 2008 G.Cosmo (global-V09-01-17) 21 - Changed date for release 9.2. 22 23 Nov 07, 2008 P.Gumplinger (global-V09-01-16) 24 - Removed unnecessary 'const' qualifier from G4PlaneVectorRand() function 25 declaration. 26 27 Nov 07, 2008 G.Cosmo (global-V09-01-15) 28 - Added header G4RandomTools.hh, implementing global utility methods for 29 random Lambertian vector and random plane vector. Implementation derived 30 from G4OpBoundaryProcess. 31 32 Oct 14, 2008 V.Ivantchenko (global-V09-01-14) 33 - G4PhysicsVector: changed algorithm for computation of second derivatives, to 34 guarantee continuity with first derivative; fixed second derivative at edges 35 of the vector to be the same as in neighboring nodes. 36 37 Sep 22, 2008 G.Cosmo (global-V09-01-13) 38 - Corrected initialisation of vectors to conform to definition in 39 G4PhysicsVector, and added protections against empty vectors. (V.Ivantchenko) 40 - Corrected definition of copy-constructor and operator=() in G4PhysicsVector 41 and added corresponding definitions in derived classes, where needed. 42 20 43 Aug 15, 2008 G.Cosmo (global-V09-01-12) 21 44 - Restored original implementation of G4SwapPtr() but using reference of 22 45 pointers as arguments, allowing for unambiguous use from client code. 23 46 24 Aug 14, 2008 P.Gumplinger (global-V09-01-10 )47 Aug 14, 2008 P.Gumplinger (global-V09-01-10, global-V09-01-11) 25 48 - Corrected G4SwapPtr() function in templates.hh (see also problem 26 49 report #1020). -
trunk/source/global/management/include/G4LPhysicsFreeVector.hh
r850 r921 25 25 // 26 26 // 27 // $Id: G4LPhysicsFreeVector.hh,v 1.1 0 2008/04/07 14:18:57gcosmo Exp $28 // GEANT4 tag $Name: HEAD$27 // $Id: G4LPhysicsFreeVector.hh,v 1.11 2008/09/22 08:26:33 gcosmo Exp $ 28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 29 // 30 30 // … … 62 62 ~G4LPhysicsFreeVector(); 63 63 64 G4LPhysicsFreeVector(const G4LPhysicsFreeVector&); 65 G4LPhysicsFreeVector& operator=(const G4LPhysicsFreeVector&); 66 // Copy constructor and assignment operator. 67 64 68 void PutValues(size_t binNumber, G4double binValue, G4double dataValue); 65 69 // G4PhysicsVector has PutValue() but it is inconvenient. -
trunk/source/global/management/include/G4LPhysicsFreeVector.icc
r850 r921 25 25 // 26 26 // 27 // $Id: G4LPhysicsFreeVector.icc,v 1.1 1 2008/09/06 19:52:16 vnivanchExp $28 // GEANT4 tag $Name: HEAD$27 // $Id: G4LPhysicsFreeVector.icc,v 1.13 2008/09/22 08:26:33 gcosmo Exp $ 28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 29 // 30 30 // … … 40 40 // 41 41 // F.W. Jones, TRIUMF, 04-JUN-96 42 // 05 Sep. 2008, V.Ivanchenko : added protections for zero-length vector43 42 // -------------------------------------------------------------------------- 44 43 … … 49 48 // Want to simultaneously fill the bin and data vectors. 50 49 { 51 if(binNumber <= numberOfBin) {52 binVector[binNumber] = binValue;53 dataVector[binNumber]= dataValue;54 if(0 == binNumber) edgeMin = binValue;55 else if( numberOfBin - 1 == binNumber) edgeMax = binValue;56 }50 binVector[binNumber] = binValue; 51 dataVector[binNumber] = dataValue; 52 if(binNumber == 0) 53 { edgeMin = binValue; } 54 else if( numberOfBin - 1 == binNumber) 55 { edgeMax = binValue; } 57 56 } 58 57 -
trunk/source/global/management/include/G4PhysicsFreeVector.hh
r850 r921 25 25 // 26 26 // 27 // $Id: G4PhysicsFreeVector.hh,v 1.1 0 2006/06/29 19:02:18 gunterExp $28 // GEANT4 tag $Name: HEAD$27 // $Id: G4PhysicsFreeVector.hh,v 1.12 2008/09/22 14:49:57 gcosmo Exp $ 28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 29 // 30 30 // -
trunk/source/global/management/include/G4PhysicsLinearVector.hh
r850 r921 25 25 // 26 26 // 27 // $Id: G4PhysicsLinearVector.hh,v 1.1 0 2006/06/29 19:02:21 gunterExp $28 // GEANT4 tag $Name: HEAD$27 // $Id: G4PhysicsLinearVector.hh,v 1.11 2008/09/22 11:37:09 vnivanch Exp $ 28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 29 // 30 30 // … … 73 73 // Destructor 74 74 75 G4PhysicsLinearVector(const G4PhysicsLinearVector&); 76 G4PhysicsLinearVector& operator=(const G4PhysicsLinearVector&); 77 // Copy constructor and assignment operator. 78 75 79 G4bool Retrieve(std::ifstream& fIn, G4bool ascii); 76 80 -
trunk/source/global/management/include/G4PhysicsLnVector.hh
r850 r921 25 25 // 26 26 // 27 // $Id: G4PhysicsLnVector.hh,v 1.1 2 2006/06/29 19:02:23 gunterExp $28 // GEANT4 tag $Name: HEAD$27 // $Id: G4PhysicsLnVector.hh,v 1.13 2008/09/22 11:37:09 vnivanch Exp $ 28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 29 // 30 30 // … … 70 70 // Destructor. 71 71 72 G4PhysicsLnVector(const G4PhysicsLnVector&); 73 G4PhysicsLnVector& operator=(const G4PhysicsLnVector&); 74 // Copy constructor and assignment operator. 75 72 76 G4bool Retrieve(std::ifstream& fIn, G4bool ascii); 73 77 // To retrieve persistent data from file stream. -
trunk/source/global/management/include/G4PhysicsLogVector.hh
r850 r921 25 25 // 26 26 // 27 // $Id: G4PhysicsLogVector.hh,v 1.1 1 2006/06/29 19:02:25 gunterExp $28 // GEANT4 tag $Name: HEAD$27 // $Id: G4PhysicsLogVector.hh,v 1.13 2008/09/22 08:26:33 gcosmo Exp $ 28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 29 // 30 30 // … … 75 75 // Destructor 76 76 77 G4PhysicsLogVector(const G4PhysicsLogVector&); 78 G4PhysicsLogVector& operator=(const G4PhysicsLogVector&); 79 // Copy constructor and assignment operator. 80 77 81 G4bool Retrieve(std::ifstream& fIn, G4bool ascii); 78 82 // To retrieve persistent data from file stream. 79 83 80 84 protected: 81 85 -
trunk/source/global/management/include/G4PhysicsOrderedFreeVector.hh
r850 r921 25 25 // 26 26 // 27 // $Id: G4PhysicsOrderedFreeVector.hh,v 1. 9 2006/06/29 19:02:28 gunterExp $28 // GEANT4 tag $Name: HEAD$27 // $Id: G4PhysicsOrderedFreeVector.hh,v 1.11 2008/09/22 14:49:57 gcosmo Exp $ 28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 29 // 30 30 //////////////////////////////////////////////////////////////////////// -
trunk/source/global/management/include/G4PhysicsVector.hh
r850 r921 25 25 // 26 26 // 27 // $Id: G4PhysicsVector.hh,v 1.1 7 2008/04/07 14:18:57gcosmo Exp $28 // GEANT4 tag $Name: HEAD$27 // $Id: G4PhysicsVector.hh,v 1.18 2008/09/22 08:26:33 gcosmo Exp $ 28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 29 // 30 30 // … … 144 144 // Find the bin# in which theEnergy belongs - pure virtual function 145 145 146 void DeleteData(); 147 void CopyData(const G4PhysicsVector& vec); 148 // Internal methods for allowing copy of objects 149 150 protected: 151 146 152 typedef std::vector<G4double> G4PVDataVector; 147 153 -
trunk/source/global/management/include/G4PhysicsVector.icc
r850 r921 25 25 // 26 26 // 27 // $Id: G4PhysicsVector.icc,v 1.1 4 2008/09/05 18:04:45 vnivanchExp $28 // GEANT4 tag $Name: HEAD$27 // $Id: G4PhysicsVector.icc,v 1.17 2008/09/22 08:26:33 gcosmo Exp $ 28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 29 // 30 30 // … … 41 41 // energy scale, for example like 'log', 'linear', 'free', etc. 42 42 // 43 // Modified:44 // 05 Sep. 2008, V.Ivanchenko : added protections for zero-length vector45 43 //--------------------------------------------------------------- 46 44 … … 127 125 if( theEnergy == lastEnergy ) { 128 126 129 } else if( theEnergy <= edgeMin ) {130 lastBin = 0;131 lastEnergy = theEnergy;132 lastValue = dataVector[0];133 134 127 } else if(theEnergy < lastEnergy && theEnergy >= binVector[lastBin]) { 135 128 lastEnergy = theEnergy; 136 129 Interpolation(); 130 131 } else if( theEnergy <= edgeMin ) { 132 lastBin = 0; 133 lastEnergy = edgeMin; 134 lastValue = dataVector[0]; 137 135 138 136 } else if(theEnergy < lastEnergy && theEnergy >= binVector[lastBin-1]) { … … 168 166 void G4PhysicsVector::PutValue(size_t binNumber, G4double theValue) 169 167 { 170 if(binNumber < numberOfBin) { 171 dataVector[binNumber] = theValue; 172 173 // Fill the bin which is hidden to user with theValue. This is to 174 // handle correctly when Energy=theEmax in getValue. 175 176 if(binNumber==numberOfBin-1) { dataVector[binNumber+1] = theValue; } 177 } 168 dataVector[binNumber] = theValue; 169 170 // Fill the bin which is hidden to user with theValue. This is to 171 // handle correctly when Energy=theEmax in getValue. 172 173 if(binNumber==numberOfBin-1) { dataVector[binNumber+1] = theValue; } 178 174 } 179 175 -
trunk/source/global/management/include/G4Version.hh
r850 r921 25 25 // 26 26 // 27 // $Id: G4Version.hh,v 1.1 6 2008/06/26 06:38:51gcosmo Exp $28 // GEANT4 tag $Name: HEAD$27 // $Id: G4Version.hh,v 1.17 2008/12/02 09:15:58 gcosmo Exp $ 28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 29 // 30 30 // Version information … … 51 51 52 52 #ifndef G4VERSION_TAG 53 #define G4VERSION_TAG "$Name: HEAD$"53 #define G4VERSION_TAG "$Name: geant4-09-02-cand-01 $" 54 54 #endif 55 55 … … 58 58 #include "G4String.hh" 59 59 60 static const G4String G4Version = "$Name: HEAD$";61 static const G4String G4Date = "( 4-July-2008)";60 static const G4String G4Version = "$Name: geant4-09-02-cand-01 $"; 61 static const G4String G4Date = "(19-December-2008)"; 62 62 63 63 #endif -
trunk/source/global/management/src/G4LPhysicsFreeVector.cc
r850 r921 25 25 // 26 26 // 27 // $Id: G4LPhysicsFreeVector.cc,v 1. 17 2008/09/06 19:52:16 vnivanchExp $28 // GEANT4 tag $Name: HEAD$27 // $Id: G4LPhysicsFreeVector.cc,v 1.22 2008/09/22 08:26:33 gcosmo Exp $ 28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 29 // 30 30 // … … 36 36 // F.W. Jones, TRIUMF, 04-JUN-96 37 37 // 38 // 27-MAR-97 FWJ: first version for Alpha release39 // 05-SEP-2008, V.Ivanchenko : added protections for zero-length vector40 38 // -------------------------------------------------------------------- 41 39 … … 49 47 : G4PhysicsVector(), verboseLevel(0) 50 48 { 51 type = T_G4LPhysicsFreeVector;49 type = T_G4LPhysicsFreeVector; 52 50 } 53 51 … … 59 57 : G4PhysicsVector(), verboseLevel(0) 60 58 { 61 type = T_G4LPhysicsFreeVector;59 type = T_G4LPhysicsFreeVector; 62 60 63 numberOfBin = nbin; 64 if(nbin > 0) { 65 binVector.resize(nbin+1); 66 dataVector.resize(nbin+1); 67 edgeMin = binmin; 68 edgeMax = binmax; 69 for (size_t i=0; i<=numberOfBin; i++) { 70 binVector[i] = binmin; 71 dataVector[i]= 0.0; 72 } 73 } 61 edgeMin = binmin; 62 edgeMax = binmax; 63 numberOfBin = nbin; 64 binVector.reserve(nbin+1); 65 dataVector.reserve(nbin+1); 66 for (size_t i=0; i<=numberOfBin; i++) 67 { 68 binVector.push_back(0.0); 69 dataVector.push_back(0.0); 70 } 74 71 } 75 72 … … 78 75 G4LPhysicsFreeVector::~G4LPhysicsFreeVector() 79 76 { 77 } 78 79 // -------------------------------------------------------------------- 80 81 G4LPhysicsFreeVector::G4LPhysicsFreeVector(const G4LPhysicsFreeVector& right) 82 : G4PhysicsVector(right) 83 { 84 verboseLevel = right.verboseLevel; 85 } 86 87 // -------------------------------------------------------------------- 88 89 G4LPhysicsFreeVector& 90 G4LPhysicsFreeVector::operator=(const G4LPhysicsFreeVector& right) 91 { 92 // Check assignment to self 93 // 94 if(this == &right) { return *this; } 95 96 DeleteData(); 97 CopyData(right); 98 99 verboseLevel = right.verboseLevel; 100 return *this; 80 101 } 81 102 -
trunk/source/global/management/src/G4PhysicsFreeVector.cc
r850 r921 25 25 // 26 26 // 27 // $Id: G4PhysicsFreeVector.cc,v 1.1 0 2006/06/29 19:04:10 gunterExp $28 // GEANT4 tag $Name: HEAD$27 // $Id: G4PhysicsFreeVector.cc,v 1.12 2008/09/22 14:49:57 gcosmo Exp $ 28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 29 // 30 30 // … … 47 47 48 48 49 G4PhysicsFreeVector::G4PhysicsFreeVector() 49 G4PhysicsFreeVector::G4PhysicsFreeVector() 50 : G4PhysicsVector() 50 51 { 51 edgeMin = 0.0;52 edgeMax = 0.0;53 numberOfBin = 0;54 52 type = T_G4PhysicsFreeVector; 55 53 } 56 54 57 58 55 G4PhysicsFreeVector::G4PhysicsFreeVector(size_t theNbin) 56 : G4PhysicsVector() 59 57 { 60 58 type = T_G4PhysicsFreeVector; … … 71 69 dataVector.push_back(0.0); 72 70 } 73 74 edgeMin = 0.;75 edgeMax = 0.;76 77 lastBin = INT_MAX;78 lastEnergy = -DBL_MAX;79 lastValue = DBL_MAX;80 71 } 81 82 72 83 73 G4PhysicsFreeVector::G4PhysicsFreeVector(const G4DataVector& theBinVector, … … 111 101 edgeMin = binVector[0]; 112 102 edgeMax = binVector[numberOfBin-1]; 113 114 lastBin = INT_MAX;115 lastEnergy = -DBL_MAX;116 lastValue = DBL_MAX;117 103 } 118 104 119 120 G4PhysicsFreeVector::~G4PhysicsFreeVector(){} 121 105 G4PhysicsFreeVector::~G4PhysicsFreeVector() 106 { 107 } 122 108 123 109 void G4PhysicsFreeVector::PutValue( size_t theBinNumber, G4double theBinValue, -
trunk/source/global/management/src/G4PhysicsLinearVector.cc
r850 r921 25 25 // 26 26 // 27 // $Id: G4PhysicsLinearVector.cc,v 1.1 2 2006/06/29 19:04:13 gunterExp $28 // GEANT4 tag $Name: HEAD$27 // $Id: G4PhysicsLinearVector.cc,v 1.14 2008/09/22 14:49:57 gcosmo Exp $ 28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 29 // 30 30 // … … 34 34 // G4PhysicsLinearVector.cc 35 35 // 36 // History: 37 // 02 Dec. 1995, G.Cosmo : Structure created based on object model 38 // 15 Feb. 1996, K.Amako : Implemented the 1st version 39 // 01 Jul. 1996, K.Amako : Cache mechanism and hidden bin from the 40 // user introduced. 41 // 26 Sep. 1996, K.Amako : Constructor with only 'bin size' added. 42 // 11 Nov. 2000, H.Kurashige : use STL vector for dataVector and binVector 43 // 9 Mar. 2001, H.Kurashige : add PhysicsVector type and Retrieve 36 // 15 Feb 1996 - K.Amako : 1st version 44 37 // 45 38 //-------------------------------------------------------------------- … … 48 41 49 42 G4PhysicsLinearVector::G4PhysicsLinearVector() 50 : dBin(0.), baseBin(0.)43 : G4PhysicsVector(), dBin(0.), baseBin(0.) 51 44 { 52 edgeMin = 0.0;53 edgeMax = 0.0;54 numberOfBin = 0;55 45 type = T_G4PhysicsLinearVector; 56 46 } 57 47 58 48 G4PhysicsLinearVector::G4PhysicsLinearVector(size_t theNbin) 59 : dBin(0.), baseBin(0.)49 : G4PhysicsVector(), dBin(0.), baseBin(0.) 60 50 { 61 51 type = T_G4PhysicsLinearVector; … … 68 58 numberOfBin = theNbin; 69 59 70 edgeMin = 0.;71 edgeMax = 0.;72 73 lastBin = INT_MAX;74 lastEnergy = -DBL_MAX;75 lastValue = DBL_MAX;76 77 60 for (size_t i=0; i<=numberOfBin; i++) 78 61 { … … 84 67 G4PhysicsLinearVector::G4PhysicsLinearVector(G4double theEmin, 85 68 G4double theEmax, size_t theNbin) 86 : dBin((theEmax-theEmin)/theNbin), 69 : G4PhysicsVector(), 70 dBin((theEmax-theEmin)/theNbin), 87 71 baseBin(theEmin/dBin) 88 72 { … … 105 89 edgeMax = binVector[numberOfBin-1]; 106 90 107 lastBin = INT_MAX;108 lastEnergy = -DBL_MAX;109 lastValue = DBL_MAX;110 91 } 111 92 … … 123 104 return success; 124 105 } 106 107 G4PhysicsLinearVector::G4PhysicsLinearVector(const G4PhysicsLinearVector& right) 108 : G4PhysicsVector(right) 109 { 110 dBin = right.dBin; 111 baseBin = right.baseBin; 112 } 113 114 G4PhysicsLinearVector& 115 G4PhysicsLinearVector::operator=(const G4PhysicsLinearVector& right) 116 { 117 // Check assignment to self 118 // 119 if(this == &right) { return *this; } 120 121 DeleteData(); 122 CopyData(right); 123 124 dBin = right.dBin; 125 baseBin = right.baseBin; 126 return *this; 127 } -
trunk/source/global/management/src/G4PhysicsLnVector.cc
r850 r921 25 25 // 26 26 // 27 // $Id: G4PhysicsLnVector.cc,v 1.1 5 2006/06/29 19:04:15 gunterExp $28 // GEANT4 tag $Name: HEAD$27 // $Id: G4PhysicsLnVector.cc,v 1.17 2008/09/22 14:49:57 gcosmo Exp $ 28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 29 // 30 30 // … … 34 34 // G4PhysicsLnVector.cc 35 35 // 36 // History: 37 // 27 Apr. 1999, M.G. Pia: Created, copying from G4PhysicsLogVector 38 // 11 Nov. 2000, H.Kurashige : use STL vector for dataVector and binVector 39 // 9 Mar. 2001, H.Kurashige : add PhysicsVector type and Retrieve 36 // 27 Apr 1999 - M.G.Pia: Created from G4PhysicsLogVector 40 37 // 41 38 // -------------------------------------------------------------- … … 44 41 45 42 G4PhysicsLnVector::G4PhysicsLnVector() 46 : dBin(0.), baseBin(0.)43 : G4PhysicsVector(), dBin(0.), baseBin(0.) 47 44 { 48 45 type = T_G4PhysicsLnVector; … … 50 47 51 48 G4PhysicsLnVector::G4PhysicsLnVector(size_t theNbin) 52 : dBin(0.), baseBin(0.)49 : G4PhysicsVector(), dBin(0.), baseBin(0.) 53 50 { 54 51 type = T_G4PhysicsLnVector; … … 61 58 numberOfBin = theNbin; 62 59 63 edgeMin = 0.;64 edgeMax = 0.;65 66 lastBin = INT_MAX;67 lastEnergy = -DBL_MAX;68 lastValue = DBL_MAX;69 70 60 for (size_t i=0; i<=numberOfBin; i++) 71 61 { … … 77 67 G4PhysicsLnVector::G4PhysicsLnVector(G4double theEmin, 78 68 G4double theEmax, size_t theNbin) 79 : dBin(std::log(theEmax/theEmin)/theNbin), 69 : G4PhysicsVector(), 70 dBin(std::log(theEmax/theEmin)/theNbin), 80 71 baseBin(std::log(theEmin)/dBin) 81 72 { … … 97 88 edgeMin = binVector[0]; 98 89 edgeMax = binVector[numberOfBin-1]; 99 100 lastBin = INT_MAX;101 lastEnergy = -DBL_MAX;102 lastValue = DBL_MAX;103 90 } 104 91 … … 116 103 return success; 117 104 } 105 106 G4PhysicsLnVector::G4PhysicsLnVector(const G4PhysicsLnVector& right) 107 : G4PhysicsVector(right) 108 { 109 dBin = right.dBin; 110 baseBin = right.baseBin; 111 } 112 113 G4PhysicsLnVector& 114 G4PhysicsLnVector::operator=(const G4PhysicsLnVector& right) 115 { 116 // Check assignment to self 117 // 118 if(this == &right) { return *this; } 119 120 DeleteData(); 121 CopyData(right); 122 123 dBin = right.dBin; 124 baseBin = right.baseBin; 125 return *this; 126 } -
trunk/source/global/management/src/G4PhysicsLogVector.cc
r850 r921 25 25 // 26 26 // 27 // $Id: G4PhysicsLogVector.cc,v 1. 16 2008/09/06 19:52:16 vnivanchExp $28 // GEANT4 tag $Name: HEAD$27 // $Id: G4PhysicsLogVector.cc,v 1.21 2008/09/22 08:26:33 gcosmo Exp $ 28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 29 // 30 30 // … … 40 40 // 26 Sep. 1996, K.Amako : Constructor with only 'bin size' added 41 41 // 11 Nov. 2000, H.Kurashige : use STL vector for dataVector and binVector 42 // 9 Mar. 2001, H.Kurashige : add PhysicsVector type and Retrieve42 // 9 Mar. 2001, H.Kurashige : added PhysicsVector type and Retrieve 43 43 // 05 Sep. 2008, V.Ivanchenko : added protections for zero-length vector 44 44 // … … 60 60 // Add extra one bin (hidden to user) to handle correctly when 61 61 // Energy=theEmax in getValue. 62 dataVector.reserve(theNbin+1); 63 binVector.reserve(theNbin+1); 62 64 63 65 numberOfBin = theNbin; 64 66 65 if(numberOfBin > 0) { 66 dataVector.resize(theNbin+1); 67 binVector.resize(theNbin+1); 68 edgeMin = 1; 69 edgeMax = numberOfBin; 70 for (size_t i=0; i<=numberOfBin; i++) { 71 binVector[i] = i + 1; 72 dataVector[i]= 0.0; 73 } 67 for (size_t i=0; i<=numberOfBin; i++) 68 { 69 binVector.push_back(0.0); 70 dataVector.push_back(0.0); 74 71 } 75 72 } … … 84 81 // Add extra one bin (hidden to user) to handle correctly when 85 82 // Energy=theEmax in getValue. 86 dataVector.res ize(theNbin+1);87 binVector.res ize(theNbin+1);83 dataVector.reserve(theNbin+1); 84 binVector.reserve(theNbin+1); 88 85 89 86 numberOfBin = theNbin; 90 87 91 if(numberOfBin > 0) { 92 for (size_t i=0; i<=numberOfBin; i++) { 93 binVector[i] = std::pow(10., std::log10(theEmin)+i*dBin); 94 dataVector[i]= 0.0; 95 } 96 edgeMin = binVector[0]; 97 edgeMax = binVector[numberOfBin-1]; 88 for (size_t i=0; i<numberOfBin+1; i++) 89 { 90 binVector.push_back(std::pow(10., std::log10(theEmin)+i*dBin)); 91 dataVector.push_back(0.0); 98 92 } 93 edgeMin = binVector[0]; 94 edgeMax = binVector[numberOfBin-1]; 99 95 } 100 96 101 G4PhysicsLogVector::~G4PhysicsLogVector(){} 97 G4PhysicsLogVector::~G4PhysicsLogVector() 98 { 99 } 102 100 103 101 G4bool G4PhysicsLogVector::Retrieve(std::ifstream& fIn, G4bool ascii) … … 112 110 return success; 113 111 } 112 113 G4PhysicsLogVector::G4PhysicsLogVector(const G4PhysicsLogVector& right) 114 : G4PhysicsVector(right) 115 { 116 dBin = right.dBin; 117 baseBin = right.baseBin; 118 } 119 120 G4PhysicsLogVector& 121 G4PhysicsLogVector::operator=(const G4PhysicsLogVector& right) 122 { 123 // Check assignment to self 124 // 125 if(this == &right) { return *this; } 126 127 DeleteData(); 128 CopyData(right); 129 130 dBin = right.dBin; 131 baseBin = right.baseBin; 132 return *this; 133 } -
trunk/source/global/management/src/G4PhysicsOrderedFreeVector.cc
r850 r921 25 25 // 26 26 // 27 // $Id: G4PhysicsOrderedFreeVector.cc,v 1.1 0 2006/06/29 19:04:20 gunterExp $28 // GEANT4 tag $Name: HEAD$27 // $Id: G4PhysicsOrderedFreeVector.cc,v 1.12 2008/09/22 14:49:57 gcosmo Exp $ 28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 29 // 30 30 //////////////////////////////////////////////////////////////////////// … … 61 61 G4double *Values, 62 62 size_t VectorLength) 63 : G4PhysicsVector() 63 64 { 64 65 type = T_G4PhysicsOrderedFreeVector; 65 66 66 lastBin = INT_MAX; 67 68 lastEnergy = -DBL_MAX; 69 lastValue = DBL_MAX; 70 67 dataVector.reserve(VectorLength+1); 68 binVector.reserve(VectorLength+1); 71 69 numberOfBin = VectorLength; 72 70 … … 78 76 edgeMin = binVector.front(); 79 77 edgeMax = binVector.back(); 78 binVector.push_back ( binVector[numberOfBin-1] + 1.0 ); 79 dataVector.push_back( dataVector[numberOfBin-1] ); 80 80 } 81 81 82 82 G4PhysicsOrderedFreeVector::G4PhysicsOrderedFreeVector() 83 : G4PhysicsVector() 83 84 { 84 85 type = T_G4PhysicsOrderedFreeVector; 85 86 lastBin = INT_MAX;87 lastEnergy = -DBL_MAX;88 lastValue = DBL_MAX;89 90 edgeMin = 0.0;91 edgeMax = 0.0;92 numberOfBin = 0;93 86 } 94 87 -
trunk/source/global/management/src/G4PhysicsVector.cc
r850 r921 25 25 // 26 26 // 27 // $Id: G4PhysicsVector.cc,v 1.2 2 2008/09/05 18:04:45 vnivanchExp $28 // GEANT4 tag $Name: HEAD$27 // $Id: G4PhysicsVector.cc,v 1.27 2008/10/16 12:14:36 gcosmo Exp $ 28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 29 // 30 30 // … … 52 52 G4PhysicsVector::G4PhysicsVector(G4bool spline) 53 53 : type(T_G4PhysicsVector), 54 edgeMin( DBL_MAX), edgeMax(0.), numberOfBin(0),54 edgeMin(0.), edgeMax(0.), numberOfBin(0), 55 55 lastEnergy(0.), lastValue(0.), lastBin(0), 56 56 secDerivative(0), useSpline(spline) 57 { 58 binVector.push_back(edgeMin); 59 dataVector.push_back(0.0); 60 } 57 {} 61 58 62 59 // -------------------------------------------------------------- … … 64 61 G4PhysicsVector::~G4PhysicsVector() 65 62 { 66 delete [] secDerivative;63 DeleteData(); 67 64 } 68 65 … … 71 68 G4PhysicsVector::G4PhysicsVector(const G4PhysicsVector& right) 72 69 { 73 *this=right;70 CopyData(right); 74 71 } 75 72 … … 81 78 if (type != right.type) { return *this; } 82 79 83 type = right.type; 84 edgeMin = right.edgeMin; 85 edgeMax = right.edgeMax; 86 numberOfBin = right.numberOfBin; 87 lastEnergy = right.lastEnergy; 88 lastValue = right.lastValue; 89 lastBin = right.lastBin; 90 dataVector = right.dataVector; 91 binVector = right.binVector; 92 secDerivative = right.secDerivative; 93 useSpline = right.useSpline; 94 comment = right.comment; 80 DeleteData(); 81 CopyData(right); 82 95 83 return *this; 96 84 } … … 108 96 { 109 97 return (this != &right); 98 } 99 100 // -------------------------------------------------------------- 101 102 void G4PhysicsVector::DeleteData() 103 { 104 delete [] secDerivative; 105 secDerivative = 0; 106 } 107 108 // -------------------------------------------------------------- 109 110 void G4PhysicsVector::CopyData(const G4PhysicsVector& vec) 111 { 112 type = vec.type; 113 edgeMin = vec.edgeMin; 114 edgeMax = vec.edgeMax; 115 numberOfBin = vec.numberOfBin; 116 lastEnergy = vec.lastEnergy; 117 lastValue = vec.lastValue; 118 lastBin = vec.lastBin; 119 dataVector = vec.dataVector; 120 binVector = vec.binVector; 121 useSpline = vec.useSpline; 122 comment = vec.comment; 123 if (vec.secDerivative) 124 { 125 secDerivative = new G4double [numberOfBin]; 126 for (size_t i=0; i<numberOfBin; i++) 127 { 128 secDerivative[i] = vec.secDerivative[i]; 129 } 130 } 131 else 132 { 133 secDerivative = 0; 134 } 110 135 } 111 136 … … 224 249 secDerivative = new G4double [numberOfBin]; 225 250 226 s ecDerivative[0] = 0.0;251 size_t n = numberOfBin-1; 227 252 228 253 // cannot compute derivatives for less than 3 points 229 if(3 > numberOfBin) { 230 secDerivative[numberOfBin-1] = 0.0 ; 254 if(3 > numberOfBin) 255 { 256 secDerivative[0] = 0.0; 257 secDerivative[n] = 0.0; 231 258 return; 232 259 } 233 260 234 G4double* u = new G4double [numberOfBin]; 235 u[0] = 0.0 ; 236 237 // Decomposition loop for tridiagonal algorithm. secDerivative[i] 238 // and u[i] are used for temporary storage of the decomposed factors. 239 240 for(size_t i=1; i<numberOfBin-1; i++) 241 { 242 G4double sig = (binVector[i]-binVector[i-1]) 243 / (binVector[i+1]-binVector[i-1]) ; 244 G4double p = sig*secDerivative[i-1] + 2.0 ; 245 secDerivative[i] = (sig - 1.0)/p ; 246 u[i] = (dataVector[i+1]-dataVector[i])/(binVector[i+1]-binVector[i]) 247 - (dataVector[i]-dataVector[i-1])/(binVector[i]-binVector[i-1]) ; 248 u[i] =(6.0*u[i]/(binVector[i+1]-binVector[i-1]) - sig*u[i-1])/p ; 249 } 250 251 G4double qn = 0.0 ; 252 G4double un = 0.0 ; 253 254 secDerivative[numberOfBin-1] = (un - qn*u[numberOfBin-2]) 255 / (qn*secDerivative[numberOfBin-2] + 1.0) ; 256 257 // The back-substitution loop for the triagonal algorithm of solving 258 // a linear system of equations. 259 260 for(G4int k=numberOfBin-2; k>=0; k--) 261 { 262 secDerivative[k] = secDerivative[k]*secDerivative[k+1] + u[k]; 263 } 264 delete [] u; 261 for(size_t i=1; i<n; i++) 262 { 263 secDerivative[i] = 264 3.0*((dataVector[i+1]-dataVector[i])/(binVector[i+1]-binVector[i]) - 265 (dataVector[i]-dataVector[i-1])/(binVector[i]-binVector[i-1])) 266 /(binVector[i+1]-binVector[i-1]); 267 } 268 secDerivative[n] = secDerivative[n-1]; 269 secDerivative[0] = secDerivative[1]; 265 270 } 266 271 -
trunk/source/graphics_reps/History
r850 r921 1 cvs log $Id: History,v 1.13 2 2008/04/28 16:06:06 allisonExp $1 cvs log $Id: History,v 1.133 2008/11/13 09:07:31 gcosmo Exp $ 2 2 ------------------------------------------------------------------- 3 3 … … 17 17 * Reverse chronological order (last date on top), please * 18 18 ---------------------------------------------------------- 19 20 13th November 2008 Gabriele Cosmo (greps-V09-01-06) 21 - HepPolyhedronHype: fixed arrays upper-bound in constructor, responsible 22 for memory corruption in visualization of G4Hype shape. 19 23 20 24 28th April 2008 John Allison (greps-V09-01-05) -
trunk/source/graphics_reps/src/HepPolyhedron.cc
r850 r921 25 25 // 26 26 // 27 // $Id: HepPolyhedron.cc,v 1.3 1 2008/04/28 16:06:06 allisonExp $28 // GEANT4 tag $Name: HEAD$27 // $Id: HepPolyhedron.cc,v 1.32 2008/11/13 09:05:27 gcosmo Exp $ 28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 29 // 30 30 // … … 1630 1630 if (sqrtan1<0.||sqrtan2<0.) k += 4; 1631 1631 1632 if (k != 0) { 1632 if (k != 0) 1633 { 1633 1634 std::cerr << "HepPolyhedronHype: error in input parameters"; 1634 1635 if ((k & 1) != 0) std::cerr << " (radiuses)"; … … 1650 1651 double k2 = r2*r2; 1651 1652 1652 double *zz = new double[n + n], *rr = new double[n + n];1653 double *zz = new double[n+n+1], *rr = new double[n+n+1]; 1653 1654 1654 1655 zz[0] = halfZ; 1655 1656 rr[0] = std::sqrt(sqrtan2*halfZ*halfZ+k2); 1656 1657 1657 for(int i = 1; i < n -1; i++)1658 for(int i = 1; i < n-1; i++) 1658 1659 { 1659 1660 zz[i] = zz[i-1] - dz; 1660 rr[i] =std::sqrt(sqrtan2*zz[i]*zz[i]+k2) ; 1661 1661 rr[i] =std::sqrt(sqrtan2*zz[i]*zz[i]+k2); 1662 1662 } 1663 1663 … … 1665 1665 rr[n-1] = rr[0]; 1666 1666 1667 1668 1667 zz[n] = halfZ; 1669 1668 rr[n] = std::sqrt(sqrtan1*halfZ*halfZ+k1); 1670 for(int i = n+1; i < n +n; i++) 1669 1670 for(int i = n+1; i < n+n; i++) 1671 1671 { 1672 1672 zz[i] = zz[i-1] - dz; 1673 rr[i] =std::sqrt(sqrtan1*zz[i]*zz[i]+k1) ; 1674 1673 rr[i] =std::sqrt(sqrtan1*zz[i]*zz[i]+k1); 1675 1674 } 1676 1675 zz[n+n] = -halfZ; -
trunk/source/interfaces/common/src/G4VBasicShell.cc
r850 r921 186 186 // From intercoms/src/G4UIcommandTree::FindPath. 187 187 { 188 #ifdef G4DEBUG 189 printf("G4VBasicShell::FindMatchingPath %s\n",aCommandPath.c_str()); 190 #endif 188 191 G4String empty = ""; 189 192 if(aTree==NULL) return empty; … … 193 196 remainingPath.remove(0,pathName.length()); 194 197 size_t i = remainingPath.first('/'); 198 #ifdef G4DEBUG 199 printf("G4VBasicShell::FindMatchingPath remainingPath:%s\n",remainingPath.c_str()); 200 #endif 195 201 if( i == std::string::npos ) { 202 #ifdef G4DEBUG 203 printf("G4VBasicShell::FindMatchingPath npos \n"); 204 #endif 196 205 // Look for number of matching commands : 197 206 std::vector<G4UIcommand*> commands; … … 202 211 ss.resize(remainingPath.length()); 203 212 if( remainingPath == ss ) commands.push_back(cmd); 213 #ifdef G4DEBUG 214 printf("look for command check %s %s \n",ss.c_str(),remainingPath.c_str()); 215 #endif 204 216 } 205 217 n_commandEntry = commands.size(); 218 #ifdef G4DEBUG 219 printf("%d found\n",n_commandEntry); 220 #endif 206 221 if(n_commandEntry==1) { 207 222 return (pathName + commands[0]->GetCommandName()); -
trunk/source/materials/History
r850 r921 1 $Id: History,v 1.1 27 2008/08/13 16:06:42 vnivanchExp $1 $Id: History,v 1.131 2008/11/14 15:14:41 gcosmo Exp $ 2 2 ------------------------------------------------------------------- 3 3 … … 18 18 ---------------------------------------------------------- 19 19 20 14-11-08 G.Cosmo (materials-V09-01-19) 21 - Added SetName() method to G4Element, G4Isotope, G4Material for use 22 in detector persistency. Use "const G4String&" for accessors, instead 23 of implicit copy... 24 25 02-11-08 V.Ivanchenko (materials-V09-01-18) 26 - G4IronStoppingICRU73, G4MaterialStoppingICRU73, 27 G4SimpleMaterialStoppingICRU73: fixed inline methods. 28 29 24-10-08 V.Ivanchenko (materials-V09-01-17) 30 - G4IronStoppingICRU73, G4MaterialStoppingICRU73, 31 G4SimpleMaterialStoppingICRU73: renamed ICRU'73 data classes and inlined 32 accessors. 33 34 20-10-08 V.Ivanchenko (materials-V09-01-16) 35 - G4IronStopping, G4MaterialStopping, G4SimpleMaterialStopping: added 36 ICRU'73 data on stopping powers 25 keV/n - 10 MeV/n 37 20 38 13-08-08 V.Ivanchenko (materials-V09-01-15) 21 G4Material -use array size defined in material constructor, extend it if22 a component is a compound material39 - G4Material: use array size defined in material constructor, extend it if 40 a component is a compound material 23 41 24 42 07-08-08 V.Ivanchenko (materials-V09-01-14) 25 - G4NistElementBuilder - use best known parameterisation for total 26 binding energy of atoms, use standard masses 27 for lightest stable isotopes 28 -G4NistManager and G4NistElementBuilder - added method 29 GetTotalElectronBindingEnergy 30 -G4Isotope - use AtomicMass instead of NuclearMass 31 -G4Element - use G4int(fZeff) everywhere in the class 43 - G4NistElementBuilder: use best known parameterisation for total 44 binding energy of atoms, use standard masses for lightest stable isotopes 45 - G4NistManager and G4NistElementBuilder: added method 46 GetTotalElectronBindingEnergy(). 47 - G4Isotope: use AtomicMass instead of NuclearMass. 48 - G4Element: use G4int(fZeff) everywhere in the class. 32 49 33 50 23-07-08 V.Ivanchenko (materials-V09-01-13) 34 - G4NistManager - bug introduced in tag (-11) is fixed51 - G4NistManager: fixed bug introduced in tag (-11). 35 52 36 53 21-07-08 P.Gumplinger (materials-V09-01-12) 37 - G4SurfaceProperty and G4OpticalSurface, make them truly Polymorphic54 - G4SurfaceProperty and G4OpticalSurface, make them truly polymorphic. 38 55 39 56 17-07-08 V.Ivanchenko (materials-V09-01-11) 40 - G4NistManager - added inline methods to speed up EM computations57 - G4NistManager: added inline methods to speed up EM computations. 41 58 42 59 16-07-08 P.Gumplinger (materials-V09-01-10) -
trunk/source/materials/include/G4Element.hh
r850 r921 25 25 // 26 26 // 27 // $Id: G4Element.hh,v 1.2 2 2006/10/17 15:15:46 vnivanchExp $28 // GEANT4 tag $Name: HEAD$27 // $Id: G4Element.hh,v 1.23 2008/11/14 15:14:24 gcosmo Exp $ 28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 29 // 30 30 … … 118 118 // retrieval methods 119 119 // 120 G4String GetName() const {return fName;};121 G4String GetSymbol() const {return fSymbol;};122 G4double GetZ() const {return fZeff;} ;//atomic number123 G4double GetN() const {return fNeff;} ;//number of nucleons124 G4double GetA() const {return fAeff;} ;//mass of a mole120 const G4String& GetName() const {return fName;} 121 const G4String& GetSymbol() const {return fSymbol;} 122 G4double GetZ() const {return fZeff;} //atomic number 123 G4double GetN() const {return fNeff;} //number of nucleons 124 G4double GetA() const {return fAeff;} //mass of a mole 125 125 G4bool GetNaturalAbandancesFlag(); 126 126 … … 129 129 //the number of atomic shells in this element: 130 130 // 131 G4int GetNbOfAtomicShells() const {return fNbOfAtomicShells;} ;131 G4int GetNbOfAtomicShells() const {return fNbOfAtomicShells;} 132 132 133 133 //the binding energy of the shell: … … 137 137 //number of isotopes constituing this element: 138 138 // 139 size_t GetNumberOfIsotopes() const {return fNumberOfIsotopes;} ;139 size_t GetNumberOfIsotopes() const {return fNumberOfIsotopes;} 140 140 141 141 //vector of pointers to isotopes constituing this element: 142 142 // 143 G4IsotopeVector* GetIsotopeVector() const {return theIsotopeVector;} ;143 G4IsotopeVector* GetIsotopeVector() const {return theIsotopeVector;} 144 144 145 145 //vector of relative abundance of each isotope: 146 146 // 147 147 G4double* GetRelativeAbundanceVector() const 148 {return fRelativeAbundanceVector;} ;148 {return fRelativeAbundanceVector;} 149 149 150 150 const G4Isotope* GetIsotope(G4int iso) const 151 {return (*theIsotopeVector)[iso];} ;151 {return (*theIsotopeVector)[iso];} 152 152 153 153 //the (static) Table of Elements: … … 161 161 //the index of this element in the Table: 162 162 // 163 size_t GetIndex() const {return fIndexInTable;} ;163 size_t GetIndex() const {return fIndexInTable;} 164 164 165 165 //return pointer to an element, given its name: … … 170 170 //count number of materials which use this element 171 171 // 172 G4int GetCountUse() const {return fCountUse;} ;173 void increaseCountUse() {fCountUse++;} ;174 void decreaseCountUse() {fCountUse--;} ;172 G4int GetCountUse() const {return fCountUse;} 173 void increaseCountUse() {fCountUse++;} 174 void decreaseCountUse() {fCountUse--;} 175 175 176 176 //count elements with same Z 177 177 // 178 G4int GetIndexZ() const {return fIndexZ;} ;178 G4int GetIndexZ() const {return fIndexZ;} 179 179 180 180 //Coulomb correction factor: 181 181 // 182 G4double GetfCoulomb() const {return fCoulomb;} ;182 G4double GetfCoulomb() const {return fCoulomb;} 183 183 184 184 //Tsai formula for the radiation length: 185 185 // 186 G4double GetfRadTsai() const {return fRadTsai;} ;186 G4double GetfRadTsai() const {return fRadTsai;} 187 187 188 188 //pointer to ionisation parameters: 189 189 // 190 G4IonisParamElm* GetIonisation() const {return fIonisation;} ;190 G4IonisParamElm* GetIonisation() const {return fIonisation;} 191 191 192 192 // printing methods … … 205 205 // persistency for clients requiring preallocation of memory for 206 206 // persistifiable objects. 207 208 void SetName(const G4String& name) {fName=name;} 207 209 208 210 private: -
trunk/source/materials/include/G4Isotope.hh
r850 r921 25 25 // 26 26 // 27 // $Id: G4Isotope.hh,v 1.2 0 2008/08/11 11:53:11 vnivanchExp $28 // GEANT4 tag $Name: HEAD$27 // $Id: G4Isotope.hh,v 1.21 2008/11/14 15:14:24 gcosmo Exp $ 28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 29 // 30 30 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... … … 74 74 75 75 // Make an isotope 76 // 76 77 G4Isotope(const G4String& name, //its name 77 78 G4int z, //atomic number … … 82 83 83 84 // Retrieval methods 84 G4String GetName() const {return fName;}; 85 G4int GetZ() const {return fZ;}; 86 G4int GetN() const {return fN;}; 87 G4double GetA() const {return fA;}; 85 // 86 const G4String& GetName() const {return fName;} 87 G4int GetZ() const {return fZ;} 88 G4int GetN() const {return fN;} 89 G4double GetA() const {return fA;} 88 90 89 G4int GetCountUse() const {return fCountUse;}; 90 void increaseCountUse() {fCountUse++;}; 91 void decreaseCountUse() {fCountUse--;}; 91 G4int GetCountUse() const {return fCountUse;} 92 92 93 93 static … … 100 100 size_t GetNumberOfIsotopes(); 101 101 102 size_t GetIndex() const {return fIndexInTable;} ;102 size_t GetIndex() const {return fIndexInTable;} 103 103 104 104 friend … … 121 121 // persistifiable objects. 122 122 123 void SetName(const G4String& name) {fName=name;} 124 void increaseCountUse() {fCountUse++;} 125 void decreaseCountUse() {fCountUse--;} 126 123 127 private: 124 128 125 129 G4Isotope(G4Isotope&); 126 130 G4Isotope& operator=(const G4Isotope&); 127 131 128 132 private: 129 133 -
trunk/source/materials/include/G4Material.hh
r850 r921 25 25 // 26 26 // 27 // $Id: G4Material.hh,v 1.2 6 2008/08/13 16:06:42 vnivanchExp $28 // GEANT4 tag $Name: HEAD$27 // $Id: G4Material.hh,v 1.27 2008/11/14 15:14:24 gcosmo Exp $ 28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 29 // 30 30 … … 103 103 class G4Material 104 104 { 105 public: // with description105 public: // with description 106 106 107 107 // … … 145 145 virtual ~G4Material(); 146 146 147 void SetChemicalFormula (const G4String& chF) {fChemicalFormula=chF;};148 147 void SetChemicalFormula (const G4String& chF) {fChemicalFormula=chF;} 148 149 149 // 150 150 // retrieval methods 151 151 // 152 G4String GetName() const {return fName;}; 153 G4String GetChemicalFormula() const {return fChemicalFormula;}; 154 G4double GetDensity() const {return fDensity;}; 155 156 G4State GetState() const {return fState;}; 157 G4double GetTemperature() const {return fTemp;}; 158 G4double GetPressure() const {return fPressure;}; 152 const G4String& GetName() const {return fName;} 153 const G4String& GetChemicalFormula() const {return fChemicalFormula;} 154 G4double GetDensity() const {return fDensity;} 155 G4State GetState() const {return fState;} 156 G4double GetTemperature() const {return fTemp;} 157 G4double GetPressure() const {return fPressure;} 159 158 160 159 //number of elements constituing this material: 161 size_t GetNumberOfElements() const {return fNumberOfElements;} ;160 size_t GetNumberOfElements() const {return fNumberOfElements;} 162 161 163 162 //vector of pointers to elements constituing this material: 164 163 const 165 G4ElementVector* GetElementVector() const {return theElementVector;} ;164 G4ElementVector* GetElementVector() const {return theElementVector;} 166 165 167 166 //vector of fractional mass of each element: 168 const G4double* GetFractionVector() const {return fMassFractionVector;} ;167 const G4double* GetFractionVector() const {return fMassFractionVector;} 169 168 170 169 //vector of atom count of each element: 171 const G4int* GetAtomsVector() const {return fAtomsVector;} ;170 const G4int* GetAtomsVector() const {return fAtomsVector;} 172 171 173 172 //return a pointer to an element, given its index in the material: 174 173 const 175 G4Element* GetElement(G4int iel) const {return (*theElementVector)[iel];} ;174 G4Element* GetElement(G4int iel) const {return (*theElementVector)[iel];} 176 175 177 176 //vector of nb of atoms per volume of each element in this material: 178 177 const 179 G4double* GetVecNbOfAtomsPerVolume() const {return VecNbOfAtomsPerVolume;} ;178 G4double* GetVecNbOfAtomsPerVolume() const {return VecNbOfAtomsPerVolume;} 180 179 //total number of atoms per volume: 181 G4double GetTotNbOfAtomsPerVolume() const {return TotNbOfAtomsPerVolume;} ;180 G4double GetTotNbOfAtomsPerVolume() const {return TotNbOfAtomsPerVolume;} 182 181 //total number of electrons per volume: 183 G4double GetTotNbOfElectPerVolume() const {return TotNbOfElectPerVolume;} ;182 G4double GetTotNbOfElectPerVolume() const {return TotNbOfElectPerVolume;} 184 183 185 184 //obsolete names (5-10-98) see the 2 functions above 186 185 const 187 G4double* GetAtomicNumDensityVector() const {return VecNbOfAtomsPerVolume;} ;188 G4double GetElectronDensity() const {return TotNbOfElectPerVolume;} ;186 G4double* GetAtomicNumDensityVector() const {return VecNbOfAtomsPerVolume;} 187 G4double GetElectronDensity() const {return TotNbOfElectPerVolume;} 189 188 190 189 // Radiation length: 191 G4double GetRadlen() const {return fRadlen;} ;190 G4double GetRadlen() const {return fRadlen;} 192 191 193 192 // Nuclear interaction length: 194 G4double GetNuclearInterLength() const {return fNuclInterLen;} ;193 G4double GetNuclearInterLength() const {return fNuclInterLen;} 195 194 196 195 // ionisation parameters: 197 G4IonisParamMat* GetIonisation() const {return fIonisation;} ;196 G4IonisParamMat* GetIonisation() const {return fIonisation;} 198 197 199 198 // Sandia table: 200 G4SandiaTable* GetSandiaTable() const {return fSandiaTable;} ;199 G4SandiaTable* GetSandiaTable() const {return fSandiaTable;} 201 200 202 201 //meaningful only for single material: … … 206 205 //the MaterialPropertiesTable (if any) attached to this material: 207 206 void SetMaterialPropertiesTable(G4MaterialPropertiesTable* anMPT) 208 {fMaterialPropertiesTable = anMPT;} ;207 {fMaterialPropertiesTable = anMPT;} 209 208 210 209 G4MaterialPropertiesTable* GetMaterialPropertiesTable() const 211 {return fMaterialPropertiesTable;} ;210 {return fMaterialPropertiesTable;} 212 211 213 212 //the (static) Table of Materials: … … 220 219 221 220 //the index of this material in the Table: 222 size_t GetIndex() const {return fIndexInTable;} ;221 size_t GetIndex() const {return fIndexInTable;} 223 222 224 223 //return pointer to a material, given its name: … … 232 231 friend std::ostream& operator<<(std::ostream&, G4MaterialTable); 233 232 234 public: // without description233 public: // without description 235 234 236 235 G4int operator==(const G4Material&) const; … … 241 240 // persistifiable objects. 242 241 243 private: 242 void SetName (const G4String& name) {fName=name;} 243 244 private: 244 245 245 246 G4Material(const G4Material&); -
trunk/source/particles/GNUmakefile
r824 r921 1 # $Id: GNUmakefile,v 1. 4 2004/06/01 15:37:42 gcosmoExp $1 # $Id: GNUmakefile,v 1.5 2008/11/06 13:17:36 kurasige Exp $ 2 2 # -------------------------------------------------------------- 3 3 # GNUmakefile for particles library. Gabriele Cosmo, 4/4/97. … … 15 15 SUBDIRS = management bosons leptons shortlived 16 16 SUBDIRS += hadrons/mesons hadrons/barions hadrons/ions 17 SUBDIRS += utils17 SUBDIRS += adjoint utils 18 18 SUBLIBS = G4partman G4bosons G4leptons G4shortlived 19 19 SUBLIBS += G4mesons G4baryons G4ions 20 SUBLIBS += G4part utils20 SUBLIBS += G4partadj G4partutils 21 21 22 22 include $(G4INSTALL)/config/globlib.gmk -
trunk/source/particles/History
r850 r921 1 $Id: History,v 1.1 53 2008/08/09 14:16:14kurasige Exp $1 $Id: History,v 1.162 2008/11/13 08:23:12 kurasige Exp $ 2 2 ------------------------------------------------------------------- 3 3 … … 17 17 * Reverse chronological order (last date on top), please * 18 18 ---------------------------------------------------------- 19 - Nov. 13 2008 H.Kurashige (particles-V09-01-13) 20 - Fix magnetic moment for leptons 21 22 - Nov. 10 2008 H.Kurashige (particles-V09-01-12) 23 - Fix particle name of G4AdjointPositron 24 25 - Nov. 06 2008 H.Kurashige (particles-V09-01-11) 26 - Adding new sub-directory of adjoint and adjoint-particles (Laurent) 27 28 - Oct. 28 2008 H.Kurashige (particles-V09-01-10) 29 - Add methods of taking A nd Z arguments as G4double G4NucleiProperties 30 31 - Oct. 23 2008 H.Kurashige (particles-V09-01-09) 32 - Add G4NucleiProperties::IsInStableTable 33 (as a replace of G4NucleiPropertiesTable::IsInTable) 34 - Change G4NucleiProperties::GetBindingEnergy as 'public' 35 - Change G4NucleiProperties::GetMassExcess as 'public' 36 37 - Oct. 22 2008 H.Kurashige (particles-V09-01-08) 38 - Fix using raw number of elecrtron mass in calculation of magnetic moment for e+/- 39 40 - Oct. 22 2008 H.Kurashige (particles-V09-01-07) 41 - Hide all methods of getting mass of nucleus except for G4NucleiProperties::GetNuclearMass() 42 - Cash pointers/masses of light nuclei in G4NucleiProperties 43 - Add a table of sum of masses of orbital electrons and their binding energy in G4NucleiProperties 44 45 - Sep. 18 2008 H.Kurashige (particles-V09-01-06) 46 - update mass/width according PDG2008 47 48 - Sep. 17 2008 H.Kurashige (particles-V09-01-05) 49 - Avoid direct comparison with string in G4IonTable::IsIon() 50 19 51 - August 08 2008 H.Kurashige (particles-V09-01-04) 20 52 - Modify G4HtmlPPReporter -
trunk/source/particles/hadrons/barions/src/G4AntiLambda.cc
r850 r921 25 25 // 26 26 // 27 // $Id: G4AntiLambda.cc,v 1.1 8 2007/03/11 07:17:34kurasige Exp $28 // GEANT4 tag $Name: HEAD$27 // $Id: G4AntiLambda.cc,v 1.19 2008/09/18 08:37:27 kurasige Exp $ 28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 29 // 30 30 // … … 70 70 71 71 anInstance = new G4ParticleDefinition( 72 name, 1.115683*GeV, 2.5 01e-12*MeV, 0.0,72 name, 1.115683*GeV, 2.518e-12*MeV, 0.0, 73 73 1, +1, 0, 74 74 0, 0, 0, -
trunk/source/particles/hadrons/barions/src/G4AntiLambdacPlus.cc
r850 r921 25 25 // 26 26 // 27 // $Id: G4AntiLambdacPlus.cc,v 1.1 3 2006/06/29 19:16:22 gunterExp $28 // GEANT4 tag $Name: HEAD$27 // $Id: G4AntiLambdacPlus.cc,v 1.14 2008/09/18 08:37:27 kurasige Exp $ 28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 29 // 30 30 // … … 70 70 71 71 anInstance = new G4ParticleDefinition( 72 name, 2.2849*GeV, 3.3 0e-9*MeV, -1.*eplus,72 name, 2.2849*GeV, 3.32e-9*MeV, -1.*eplus, 73 73 1, +1, 0, 74 74 0, 0, 0, -
trunk/source/particles/hadrons/barions/src/G4AntiNeutron.cc
r850 r921 25 25 // 26 26 // 27 // $Id: G4AntiNeutron.cc,v 1.2 2 2008/03/06 15:41:56kurasige Exp $28 // GEANT4 tag $Name: HEAD$27 // $Id: G4AntiNeutron.cc,v 1.23 2008/09/18 08:37:27 kurasige Exp $ 28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 29 // 30 30 // … … 69 69 70 70 anInstance = new G4ParticleDefinition( 71 name, neutron_mass_c2, 7.4 32e-28*GeV, 0.0,71 name, neutron_mass_c2, 7.480e-28*GeV, 0.0, 72 72 1, +1, 0, 73 73 1, +1, 0, -
trunk/source/particles/hadrons/barions/src/G4AntiOmegaMinus.cc
r850 r921 25 25 // 26 26 // 27 // $Id: G4AntiOmegaMinus.cc,v 1.1 4 2007/03/11 07:17:34kurasige Exp $28 // GEANT4 tag $Name: HEAD$27 // $Id: G4AntiOmegaMinus.cc,v 1.15 2008/09/18 08:37:27 kurasige Exp $ 28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 29 // 30 30 // … … 70 70 71 71 anInstance = new G4ParticleDefinition( 72 name, 1.67245*GeV, 8.0 2e-12*MeV, eplus,72 name, 1.67245*GeV, 8.07e-12*MeV, eplus, 73 73 3, +1, 0, 74 74 0, 0, 0, -
trunk/source/particles/hadrons/barions/src/G4AntiSigmaMinus.cc
r850 r921 25 25 // 26 26 // 27 // $Id: G4AntiSigmaMinus.cc,v 1.1 4 2007/03/11 07:17:34kurasige Exp $28 // GEANT4 tag $Name: HEAD$27 // $Id: G4AntiSigmaMinus.cc,v 1.15 2008/09/18 08:37:27 kurasige Exp $ 28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 29 // 30 30 // … … 70 70 71 71 anInstance = new G4ParticleDefinition( 72 name, 1.197449*GeV, 4.4 5e-12*MeV, eplus,72 name, 1.197449*GeV, 4.48e-12*MeV, eplus, 73 73 1, +1, 0, 74 74 2, +2, 0, -
trunk/source/particles/hadrons/barions/src/G4AntiSigmaPlus.cc
r850 r921 25 25 // 26 26 // 27 // $Id: G4AntiSigmaPlus.cc,v 1.1 4 2007/03/11 07:17:34kurasige Exp $28 // GEANT4 tag $Name: HEAD$27 // $Id: G4AntiSigmaPlus.cc,v 1.15 2008/09/18 08:37:27 kurasige Exp $ 28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 29 // 30 30 // … … 70 70 71 71 anInstance = new G4ParticleDefinition( 72 name, 1.18937*GeV, 8.2 09e-12*MeV, -1.*eplus,72 name, 1.18937*GeV, 8.264e-12*MeV, -1.*eplus, 73 73 1, +1, 0, 74 74 2, -2, 0, 75 75 "baryon", 0, -1, -3222, 76 false, 0.0802*ns, NULL,76 false, 0.08018*ns, NULL, 77 77 false, "sigma"); 78 78 -
trunk/source/particles/hadrons/barions/src/G4AntiSigmaZero.cc
r850 r921 25 25 // 26 26 // 27 // $Id: G4AntiSigmaZero.cc,v 1.1 8 2007/03/11 07:17:34kurasige Exp $28 // GEANT4 tag $Name: HEAD$27 // $Id: G4AntiSigmaZero.cc,v 1.19 2008/09/18 08:37:27 kurasige Exp $ 28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 29 // 30 30 // … … 70 70 71 71 anInstance = new G4ParticleDefinition( 72 name, 1.192642*GeV, 8.9e-3*MeV, 0.0,72 name, 1.192642*GeV, 9.0e-3*MeV, 0.0, 73 73 1, +1, 0, 74 74 2, 0, 0, -
trunk/source/particles/hadrons/barions/src/G4AntiXiMinus.cc
r850 r921 25 25 // 26 26 // 27 // $Id: G4AntiXiMinus.cc,v 1.1 3 2007/03/11 07:17:34kurasige Exp $28 // GEANT4 tag $Name: HEAD$27 // $Id: G4AntiXiMinus.cc,v 1.14 2008/09/18 08:37:27 kurasige Exp $ 28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 29 // 30 30 // … … 70 70 71 71 anInstance = new G4ParticleDefinition( 72 name, 1.321 31*GeV, 4.02e-12*MeV, eplus,72 name, 1.32171*GeV, 4.04e-12*MeV, eplus, 73 73 1, +1, 0, 74 74 1, +1, 0, -
trunk/source/particles/hadrons/barions/src/G4AntiXiZero.cc
r850 r921 25 25 // 26 26 // 27 // $Id: G4AntiXiZero.cc,v 1. 19 2007/03/11 07:17:34kurasige Exp $28 // GEANT4 tag $Name: HEAD$27 // $Id: G4AntiXiZero.cc,v 1.20 2008/09/18 08:37:27 kurasige Exp $ 28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 29 // 30 30 // … … 70 70 71 71 anInstance = new G4ParticleDefinition( 72 name, 1.31483*GeV, 2.2 7e-12*MeV, 0.0,72 name, 1.31483*GeV, 2.28e-12*MeV, 0.0, 73 73 1, +1, 0, 74 74 1, -1, 0, -
trunk/source/particles/hadrons/barions/src/G4AntiXicPlus.cc
r850 r921 25 25 // 26 26 // 27 // $Id: G4AntiXicPlus.cc,v 1.1 3 2006/06/29 19:16:52 gunterExp $28 // GEANT4 tag $Name: HEAD$27 // $Id: G4AntiXicPlus.cc,v 1.14 2008/09/18 08:37:27 kurasige Exp $ 28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 29 // 30 30 // … … 70 70 71 71 anInstance = new G4ParticleDefinition( 72 name, 2.4680*GeV, 1. 49e-9*MeV, -1.*eplus,72 name, 2.4680*GeV, 1.50e-9*MeV, -1.*eplus, 73 73 1, +1, 0, 74 74 1, -1, 0, -
trunk/source/particles/hadrons/barions/src/G4AntiXicZero.cc
r850 r921 25 25 // 26 26 // 27 // $Id: G4AntiXicZero.cc,v 1. 19 2006/10/12 10:59:45kurasige Exp $28 // GEANT4 tag $Name: HEAD$27 // $Id: G4AntiXicZero.cc,v 1.20 2008/09/18 08:37:27 kurasige Exp $ 28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 29 // 30 30 // … … 70 70 71 71 anInstance = new G4ParticleDefinition( 72 name, 2.4710*GeV, 6.0e-9*MeV, 0.0,72 name, 2.4710*GeV, 5.9e-9*MeV, 0.0, 73 73 1, +1, 0, 74 74 1, +1, 0, -
trunk/source/particles/hadrons/barions/src/G4Lambda.cc
r850 r921 25 25 // 26 26 // 27 // $Id: G4Lambda.cc,v 1.1 8 2007/03/11 07:17:34kurasige Exp $28 // GEANT4 tag $Name: HEAD$27 // $Id: G4Lambda.cc,v 1.19 2008/09/18 08:37:27 kurasige Exp $ 28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 29 // 30 30 // … … 70 70 71 71 anInstance = new G4ParticleDefinition( 72 name, 1.115683*GeV, 2.5 01e-12*MeV, 0.0,72 name, 1.115683*GeV, 2.518e-12*MeV, 0.0, 73 73 1, +1, 0, 74 74 0, 0, 0, -
trunk/source/particles/hadrons/barions/src/G4LambdacPlus.cc
r850 r921 25 25 // 26 26 // 27 // $Id: G4LambdacPlus.cc,v 1.1 4 2006/10/12 10:59:45kurasige Exp $28 // GEANT4 tag $Name: HEAD$27 // $Id: G4LambdacPlus.cc,v 1.15 2008/09/18 08:37:27 kurasige Exp $ 28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 29 // 30 30 // … … 70 70 71 71 anInstance = new G4ParticleDefinition( 72 name, 2.28646*GeV, 3.3 0e-9*MeV, +1.*eplus,72 name, 2.28646*GeV, 3.32e-9*MeV, +1.*eplus, 73 73 1, +1, 0, 74 74 0, 0, 0, -
trunk/source/particles/hadrons/barions/src/G4Neutron.cc
r850 r921 25 25 // 26 26 // 27 // $Id: G4Neutron.cc,v 1.2 2 2008/03/06 15:41:57 kurasige Exp $28 // GEANT4 tag $Name: HEAD$27 // $Id: G4Neutron.cc,v 1.23 2008/09/18 08:37:27 kurasige Exp $ 28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 29 // 30 30 // … … 73 73 74 74 anInstance = new G4Ions( 75 name, neutron_mass_c2, 7.4 32e-28*GeV, 0.0,75 name, neutron_mass_c2, 7.480e-28*GeV, 0.0, 76 76 1, +1, 0, 77 77 1, -1, 0, 78 78 "baryon", 0, +1, 2112, 79 false, 88 6.7*second, NULL,79 false, 885.7*second, NULL, 80 80 false, "nucleon", 0, 81 81 0.0 -
trunk/source/particles/hadrons/barions/src/G4OmegaMinus.cc
r850 r921 25 25 // 26 26 // 27 // $Id: G4OmegaMinus.cc,v 1.1 4 2007/03/11 07:17:34kurasige Exp $28 // GEANT4 tag $Name: HEAD$27 // $Id: G4OmegaMinus.cc,v 1.15 2008/09/18 08:37:27 kurasige Exp $ 28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 29 // 30 30 // … … 70 70 71 71 anInstance = new G4ParticleDefinition( 72 name, 1.67245*GeV, 8.0 2e-12*MeV, -1*eplus,72 name, 1.67245*GeV, 8.07e-12*MeV, -1*eplus, 73 73 3, +1, 0, 74 74 0, 0, 0, -
trunk/source/particles/hadrons/barions/src/G4SigmaMinus.cc
r850 r921 25 25 // 26 26 // 27 // $Id: G4SigmaMinus.cc,v 1.1 3 2007/03/11 07:17:34kurasige Exp $28 // GEANT4 tag $Name: HEAD$27 // $Id: G4SigmaMinus.cc,v 1.14 2008/09/18 08:37:27 kurasige Exp $ 28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 29 // 30 30 // … … 70 70 71 71 anInstance = new G4ParticleDefinition( 72 name, 1.197449*GeV, 4.4 5e-12*MeV, -1*eplus,72 name, 1.197449*GeV, 4.48e-12*MeV, -1*eplus, 73 73 1, +1, 0, 74 74 2, -2, 0, -
trunk/source/particles/hadrons/barions/src/G4SigmaPlus.cc
r850 r921 25 25 // 26 26 // 27 // $Id: G4SigmaPlus.cc,v 1.1 4 2007/03/11 07:17:35kurasige Exp $28 // GEANT4 tag $Name: HEAD$27 // $Id: G4SigmaPlus.cc,v 1.15 2008/09/18 08:37:27 kurasige Exp $ 28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 29 // 30 30 // … … 70 70 71 71 anInstance = new G4ParticleDefinition( 72 name, 1.18937*GeV, 8.2 09e-12*MeV, eplus,72 name, 1.18937*GeV, 8.264e-12*MeV, eplus, 73 73 1, +1, 0, 74 74 2, +2, 0, 75 75 "baryon", 0, +1, 3222, 76 false, 0.0802*ns, NULL,76 false, 0.08018*ns, NULL, 77 77 false, "sigma"); 78 78 -
trunk/source/particles/hadrons/barions/src/G4SigmaZero.cc
r850 r921 25 25 // 26 26 // 27 // $Id: G4SigmaZero.cc,v 1.1 8 2007/03/11 07:17:35kurasige Exp $28 // GEANT4 tag $Name: HEAD$27 // $Id: G4SigmaZero.cc,v 1.19 2008/09/18 08:37:27 kurasige Exp $ 28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 29 // 30 30 // … … 70 70 71 71 anInstance = new G4ParticleDefinition( 72 name, 1.192642*GeV, 8.9e-3*MeV, 0.0,72 name, 1.192642*GeV, 9.0e-3*MeV, 0.0, 73 73 1, +1, 0, 74 74 2, 0, 0, -
trunk/source/particles/hadrons/barions/src/G4XiMinus.cc
r850 r921 25 25 // 26 26 // 27 // $Id: G4XiMinus.cc,v 1.1 3 2007/03/11 07:17:35kurasige Exp $28 // GEANT4 tag $Name: HEAD$27 // $Id: G4XiMinus.cc,v 1.14 2008/09/18 08:37:27 kurasige Exp $ 28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 29 // 30 30 // … … 70 70 71 71 anInstance = new G4ParticleDefinition( 72 name, 1.321 31*GeV, 4.02e-12*MeV, -1*eplus,72 name, 1.32171*GeV, 4.04e-12*MeV, -1*eplus, 73 73 1, +1, 0, 74 74 1, -1, 0, -
trunk/source/particles/hadrons/barions/src/G4XiZero.cc
r850 r921 25 25 // 26 26 // 27 // $Id: G4XiZero.cc,v 1.1 8 2007/03/11 07:17:35kurasige Exp $28 // GEANT4 tag $Name: HEAD$27 // $Id: G4XiZero.cc,v 1.19 2008/09/18 08:37:27 kurasige Exp $ 28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 29 // 30 30 // … … 70 70 71 71 anInstance = new G4ParticleDefinition( 72 name, 1.31483*GeV, 2.2 7e-12*MeV, 0.0,72 name, 1.31483*GeV, 2.28e-12*MeV, 0.0, 73 73 1, +1, 0, 74 74 1, +1, 0, -
trunk/source/particles/hadrons/barions/src/G4XicPlus.cc
r850 r921 25 25 // 26 26 // 27 // $Id: G4XicPlus.cc,v 1.1 3 2006/06/29 19:17:31 gunterExp $28 // GEANT4 tag $Name: HEAD$27 // $Id: G4XicPlus.cc,v 1.14 2008/09/18 08:37:27 kurasige Exp $ 28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 29 // 30 30 // … … 70 70 71 71 anInstance = new G4ParticleDefinition( 72 name, 2.4680*GeV, 1. 49e-9*MeV, +1.*eplus,72 name, 2.4680*GeV, 1.50e-9*MeV, +1.*eplus, 73 73 1, +1, 0, 74 74 1, +1, 0, -
trunk/source/particles/hadrons/mesons/src/G4AntiBMesonZero.cc
r850 r921 25 25 // 26 26 // 27 // $Id: G4AntiBMesonZero.cc,v 1. 19 2006/10/12 10:59:45kurasige Exp $28 // GEANT4 tag $Name: HEAD$27 // $Id: G4AntiBMesonZero.cc,v 1.20 2008/09/18 08:37:27 kurasige Exp $ 28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 29 // 30 30 // … … 66 66 67 67 anInstance = new G4ParticleDefinition( 68 name, 5.2794*GeV, 4.3 02e-10*MeV, 0.,68 name, 5.2794*GeV, 4.331e-10*MeV, 0., 69 69 0, -1, 0, 70 70 1, +1, 0, 71 71 "meson", 0, 0, -511, 72 false, 1.53 2e-3*ns, NULL,72 false, 1.530e-3*ns, NULL, 73 73 false, "B"); 74 74 } -
trunk/source/particles/hadrons/mesons/src/G4AntiBsMesonZero.cc
r850 r921 25 25 // 26 26 // 27 // $Id: G4AntiBsMesonZero.cc,v 1.1 8 2006/10/12 10:59:45kurasige Exp $28 // GEANT4 tag $Name: HEAD$27 // $Id: G4AntiBsMesonZero.cc,v 1.19 2008/09/18 08:37:27 kurasige Exp $ 28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 29 // 30 30 // … … 66 66 67 67 anInstance = new G4ParticleDefinition( 68 name, 5.36 75*GeV, 4.49e-10*MeV, 0.,68 name, 5.3663*GeV, 4.65e-10*MeV, 0., 69 69 0, -1, 0, 70 70 0, 0, 0, 71 71 "meson", 0, 0, -531, 72 false, 1.4 66e-3*ns, NULL,72 false, 1.470e-3*ns, NULL, 73 73 false, "Bs"); 74 74 } -
trunk/source/particles/hadrons/mesons/src/G4AntiDMesonZero.cc
r850 r921 25 25 // 26 26 // 27 // $Id: G4AntiDMesonZero.cc,v 1.1 8 2006/10/12 10:59:45kurasige Exp $28 // GEANT4 tag $Name: HEAD$27 // $Id: G4AntiDMesonZero.cc,v 1.19 2008/09/18 08:37:27 kurasige Exp $ 28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 29 // 30 30 // … … 66 66 67 67 anInstance = new G4ParticleDefinition( 68 name, 1.8645*GeV, 1.605e-9*MeV, 0.,68 name, 1.86484*GeV, 1.616e-9*MeV, 0., 69 69 0, -1, 0, 70 70 1, +1, 0, 71 71 "meson", 0, 0, -421, 72 false, 0.415e-3*ns, NULL,72 false, 0.4101e-3*ns, NULL, 73 73 false, "D"); 74 74 } -
trunk/source/particles/hadrons/mesons/src/G4AntiKaonZero.cc
r850 r921 25 25 // 26 26 // 27 // $Id: G4AntiKaonZero.cc,v 1.1 5 2006/06/29 19:19:11 gunterExp $28 // GEANT4 tag $Name: HEAD$27 // $Id: G4AntiKaonZero.cc,v 1.16 2008/09/18 08:37:27 kurasige Exp $ 28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 29 // 30 30 // … … 71 71 72 72 anInstance = new G4ParticleDefinition( 73 name, 0.4976 72*GeV, 0.0*MeV, 0.0,73 name, 0.497614*GeV, 0.0*MeV, 0.0, 74 74 0, -1, 0, 75 75 1, 1, 0, -
trunk/source/particles/hadrons/mesons/src/G4BMesonMinus.cc
r850 r921 25 25 // 26 26 // 27 // $Id: G4BMesonMinus.cc,v 1.1 4 2006/10/12 10:59:45kurasige Exp $28 // GEANT4 tag $Name: HEAD$27 // $Id: G4BMesonMinus.cc,v 1.15 2008/09/18 08:37:27 kurasige Exp $ 28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 29 // 30 30 // … … 67 67 68 68 anInstance = new G4ParticleDefinition( 69 name, 5.2790*GeV, 4.0 18e-10*MeV, -1.*eplus,69 name, 5.2790*GeV, 4.045e-10*MeV, -1.*eplus, 70 70 0, -1, 0, 71 71 1, -1, 0, -
trunk/source/particles/hadrons/mesons/src/G4BMesonPlus.cc
r850 r921 25 25 // 26 26 // 27 // $Id: G4BMesonPlus.cc,v 1.1 4 2006/10/12 10:59:45kurasige Exp $28 // GEANT4 tag $Name: HEAD$27 // $Id: G4BMesonPlus.cc,v 1.15 2008/09/18 08:37:27 kurasige Exp $ 28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 29 // 30 30 // … … 67 67 68 68 anInstance = new G4ParticleDefinition( 69 name, 5.2790*GeV, 4.0 18e-10*MeV, +1.*eplus,69 name, 5.2790*GeV, 4.045e-10*MeV, +1.*eplus, 70 70 0, -1, 0, 71 71 1, +1, 0, -
trunk/source/particles/hadrons/mesons/src/G4BMesonZero.cc
r850 r921 25 25 // 26 26 // 27 // $Id: G4BMesonZero.cc,v 1. 19 2006/10/12 10:59:45kurasige Exp $28 // GEANT4 tag $Name: HEAD$27 // $Id: G4BMesonZero.cc,v 1.20 2008/09/18 08:37:27 kurasige Exp $ 28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 29 // 30 30 // … … 66 66 67 67 anInstance = new G4ParticleDefinition( 68 name, 5.2794*GeV, 4.3 02e-10*MeV, 0.,68 name, 5.2794*GeV, 4.331e-10*MeV, 0., 69 69 0, -1, 0, 70 70 1, -1, 0, 71 71 "meson", 0, 0, 511, 72 false, 1.53 2e-3*ns, NULL,72 false, 1.530e-3*ns, NULL, 73 73 false, "B"); 74 74 } -
trunk/source/particles/hadrons/mesons/src/G4BsMesonZero.cc
r850 r921 25 25 // 26 26 // 27 // $Id: G4BsMesonZero.cc,v 1.1 8 2006/10/12 10:59:45kurasige Exp $28 // GEANT4 tag $Name: HEAD$27 // $Id: G4BsMesonZero.cc,v 1.19 2008/09/18 08:37:27 kurasige Exp $ 28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 29 // 30 30 // … … 66 66 67 67 anInstance = new G4ParticleDefinition( 68 name, 5.36 75*GeV, 4.49e-10*MeV, 0.,68 name, 5.3663*GeV, 4.65e-10*MeV, 0., 69 69 0, -1, 0, 70 70 0, 0, 0, 71 71 "meson", 0, 0, 531, 72 false, 1.4 66e-3*ns, NULL,72 false, 1.470e-3*ns, NULL, 73 73 false, "Bs"); 74 74 } -
trunk/source/particles/hadrons/mesons/src/G4DMesonMinus.cc
r850 r921 25 25 // 26 26 // 27 // $Id: G4DMesonMinus.cc,v 1.1 3 2006/06/29 19:19:26 gunterExp $28 // GEANT4 tag $Name: HEAD$27 // $Id: G4DMesonMinus.cc,v 1.14 2008/09/18 08:37:27 kurasige Exp $ 28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 29 // 30 30 // … … 67 67 68 68 anInstance = new G4ParticleDefinition( 69 name, 1.8693*GeV, 6.33e-10*MeV, -1.*eplus,69 name, 1.86962*GeV, 6.37e-10*MeV, -1.*eplus, 70 70 0, -1, 0, 71 71 1, -1, 0, -
trunk/source/particles/hadrons/mesons/src/G4DMesonPlus.cc
r850 r921 25 25 // 26 26 // 27 // $Id: G4DMesonPlus.cc,v 1.1 3 2006/06/29 19:19:28 gunterExp $28 // GEANT4 tag $Name: HEAD$27 // $Id: G4DMesonPlus.cc,v 1.14 2008/09/18 08:37:27 kurasige Exp $ 28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 29 // 30 30 // … … 67 67 68 68 anInstance = new G4ParticleDefinition( 69 name, 1.8693*GeV, 6.33e-10*MeV, +1.*eplus,69 name, 1.86962*GeV, 6.37e-10*MeV, +1.*eplus, 70 70 0, -1, 0, 71 71 1, +1, 0, -
trunk/source/particles/hadrons/mesons/src/G4DMesonZero.cc
r850 r921 25 25 // 26 26 // 27 // $Id: G4DMesonZero.cc,v 1. 19 2006/10/12 10:59:45kurasige Exp $28 // GEANT4 tag $Name: HEAD$27 // $Id: G4DMesonZero.cc,v 1.20 2008/09/18 08:37:27 kurasige Exp $ 28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 29 // 30 30 // … … 65 65 // shortlived subType anti_encoding 66 66 anInstance = new G4ParticleDefinition( 67 name, 1.8645*GeV, 1.605e-9*MeV, 0.,67 name, 1.86484*GeV, 1.616e-9*MeV, 0., 68 68 0, -1, 0, 69 69 1, -1, 0, 70 70 "meson", 0, 0, 421, 71 false, 0.415e-3*ns, NULL,71 false, 0.4101e-3*ns, NULL, 72 72 false, "D" 73 73 ); -
trunk/source/particles/hadrons/mesons/src/G4DsMesonMinus.cc
r850 r921 25 25 // 26 26 // 27 // $Id: G4DsMesonMinus.cc,v 1.1 3 2006/10/12 10:59:45kurasige Exp $28 // GEANT4 tag $Name: HEAD$27 // $Id: G4DsMesonMinus.cc,v 1.14 2008/09/18 08:37:27 kurasige Exp $ 28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 29 // 30 30 // … … 66 66 // shortlived subType anti_encoding 67 67 anInstance = new G4ParticleDefinition( 68 name, 1.9682*GeV, 1.317e-9*MeV, -1.*eplus,68 name, 1.96849*GeV, 1.325e-9*MeV, -1.*eplus, 69 69 0, -1, 0, 70 70 0, 0, 0, 71 71 "meson", 0, 0, -431, 72 false, 0. 490e-3*ns, NULL,72 false, 0.500e-3*ns, NULL, 73 73 false, "Ds" 74 74 ); -
trunk/source/particles/hadrons/mesons/src/G4DsMesonPlus.cc
r850 r921 25 25 // 26 26 // 27 // $Id: G4DsMesonPlus.cc,v 1.1 3 2006/10/12 10:59:45kurasige Exp $28 // GEANT4 tag $Name: HEAD$27 // $Id: G4DsMesonPlus.cc,v 1.14 2008/09/18 08:37:27 kurasige Exp $ 28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 29 // 30 30 // … … 66 66 // shortlived subType anti_encoding 67 67 anInstance = new G4ParticleDefinition( 68 name, 1.9682*GeV, 1.317e-9*MeV, +1.*eplus,68 name, 1.96849*GeV, 1.325e-9*MeV, +1.*eplus, 69 69 0, -1, 0, 70 70 0, 0, 0, 71 71 "meson", 0, 0, 431, 72 false, 0. 490e-3*ns, NULL,72 false, 0.500e-3*ns, NULL, 73 73 false, "Ds" 74 74 ); -
trunk/source/particles/hadrons/mesons/src/G4Eta.cc
r850 r921 25 25 // 26 26 // 27 // $Id: G4Eta.cc,v 1.1 8 2006/10/12 10:59:45kurasige Exp $28 // GEANT4 tag $Name: HEAD$27 // $Id: G4Eta.cc,v 1.19 2008/09/18 08:37:27 kurasige Exp $ 28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 29 // 30 30 // … … 73 73 74 74 anInstance = new G4ParticleDefinition( 75 name, 0.54751*GeV, 1.30*keV, 0.0,75 name, 0.547853*GeV, 1.30*keV, 0.0, 76 76 0, -1, +1, 77 77 0, 0, +1, -
trunk/source/particles/hadrons/mesons/src/G4EtaPrime.cc
r850 r921 25 25 // 26 26 // 27 // $Id: G4EtaPrime.cc,v 1.1 8 2006/10/12 10:59:45kurasige Exp $28 // GEANT4 tag $Name: HEAD$27 // $Id: G4EtaPrime.cc,v 1.19 2008/09/18 08:37:27 kurasige Exp $ 28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 29 // 30 30 // … … 71 71 72 72 anInstance = new G4ParticleDefinition( 73 name, 0.957 78*GeV, 0.203*MeV, 0.0,73 name, 0.95766*GeV, 0.205*MeV, 0.0, 74 74 0, -1, +1, 75 75 0, 0, +1, -
trunk/source/particles/hadrons/mesons/src/G4JPsi.cc
r850 r921 25 25 // 26 26 // 27 // $Id: G4JPsi.cc,v 1.1 7 2006/10/12 10:59:45kurasige Exp $28 // GEANT4 tag $Name: HEAD$27 // $Id: G4JPsi.cc,v 1.18 2008/09/18 08:37:27 kurasige Exp $ 28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 29 // 30 30 // … … 66 66 67 67 anInstance = new G4ParticleDefinition( 68 name, 3.096916*GeV, 0.093 4*MeV, 0.,68 name, 3.096916*GeV, 0.0932*MeV, 0., 69 69 2, -1, -1, 70 70 0, 0, -1, -
trunk/source/particles/hadrons/mesons/src/G4KaonMinus.cc
r850 r921 25 25 // 26 26 // 27 // $Id: G4KaonMinus.cc,v 1.1 4 2006/06/29 19:19:45 gunterExp $28 // GEANT4 tag $Name: HEAD$27 // $Id: G4KaonMinus.cc,v 1.15 2008/09/18 08:37:27 kurasige Exp $ 28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 29 // 30 30 // … … 72 72 73 73 anInstance = new G4ParticleDefinition( 74 name, 0.493677*GeV, 5.3 15e-14*MeV, -1.*eplus,74 name, 0.493677*GeV, 5.352e-14*MeV, -1.*eplus, 75 75 0, -1, 0, 76 76 1, -1, 0, -
trunk/source/particles/hadrons/mesons/src/G4KaonPlus.cc
r850 r921 25 25 // 26 26 // 27 // $Id: G4KaonPlus.cc,v 1.1 3 2006/06/29 19:19:47 gunterExp $28 // GEANT4 tag $Name: HEAD$27 // $Id: G4KaonPlus.cc,v 1.14 2008/09/18 08:37:27 kurasige Exp $ 28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 29 // 30 30 // … … 72 72 73 73 anInstance = new G4ParticleDefinition( 74 name, 0.493677*GeV, 5.3 15e-14*MeV, +1.*eplus,74 name, 0.493677*GeV, 5.352e-14*MeV, +1.*eplus, 75 75 0, -1, 0, 76 76 1, +1, 0, -
trunk/source/particles/hadrons/mesons/src/G4KaonZero.cc
r850 r921 25 25 // 26 26 // 27 // $Id: G4KaonZero.cc,v 1.1 5 2006/06/29 19:19:49 gunterExp $28 // GEANT4 tag $Name: HEAD$27 // $Id: G4KaonZero.cc,v 1.16 2008/09/18 08:37:27 kurasige Exp $ 28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 29 // 30 30 // … … 71 71 72 72 anInstance = new G4ParticleDefinition( 73 name, 0.4976 72*GeV, 0.0*MeV, 0.0,73 name, 0.497614*GeV, 0.0*MeV, 0.0, 74 74 0, -1, 0, 75 75 1, -1, 0, -
trunk/source/particles/hadrons/mesons/src/G4KaonZeroLong.cc
r850 r921 25 25 // 26 26 // 27 // $Id: G4KaonZeroLong.cc,v 1.1 8 2006/10/12 10:59:45kurasige Exp $28 // GEANT4 tag $Name: HEAD$27 // $Id: G4KaonZeroLong.cc,v 1.19 2008/09/18 08:37:27 kurasige Exp $ 28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 29 // 30 30 // … … 74 74 75 75 anInstance = new G4ParticleDefinition( 76 name, 0.4976 72*GeV, 1.287e-14*MeV, 0.0,76 name, 0.497614*GeV, 1.295e-14*MeV, 0.0, 77 77 0, -1, 0, 78 78 1, 0, 0, 79 79 "meson", 0, 0, 130, 80 false, 51.6*ns, NULL,80 false, 51.16*ns, NULL, 81 81 false, "kaon", 130); 82 82 -
trunk/source/particles/hadrons/mesons/src/G4KaonZeroShort.cc
r850 r921 25 25 // 26 26 // 27 // $Id: G4KaonZeroShort.cc,v 1.1 7 2006/06/29 19:19:54 gunterExp $28 // GEANT4 tag $Name: HEAD$27 // $Id: G4KaonZeroShort.cc,v 1.18 2008/09/18 08:37:27 kurasige Exp $ 28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 29 // 30 30 // … … 71 71 72 72 anInstance = new G4ParticleDefinition( 73 name, 0.4976 72*GeV, 7.352e-12*MeV, 0.0,73 name, 0.497614*GeV, 7.397e-12*MeV, 0.0, 74 74 0, -1, 0, 75 75 1, 0, 0, 76 76 "meson", 0, 0, 310, 77 false, 0.0895 3*ns, NULL,77 false, 0.08958*ns, NULL, 78 78 false, "kaon", 310); 79 79 -
trunk/source/particles/hadrons/mesons/src/G4PionMinus.cc
r850 r921 25 25 // 26 26 // 27 // $Id: G4PionMinus.cc,v 1.1 1 2006/06/29 19:19:58 gunterExp $28 // GEANT4 tag $Name: HEAD$27 // $Id: G4PionMinus.cc,v 1.12 2008/09/18 08:37:27 kurasige Exp $ 28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 29 // 30 30 // … … 70 70 71 71 anInstance = new G4ParticleDefinition( 72 name, 0.1395700*GeV, 2.5 284e-14*MeV, -1.*eplus,72 name, 0.1395700*GeV, 2.5452e-14*MeV, -1.*eplus, 73 73 0, -1, 0, 74 74 2, -2, -1, -
trunk/source/particles/hadrons/mesons/src/G4PionPlus.cc
r850 r921 25 25 // 26 26 // 27 // $Id: G4PionPlus.cc,v 1.1 2 2006/06/29 19:20:01 gunterExp $28 // GEANT4 tag $Name: HEAD$27 // $Id: G4PionPlus.cc,v 1.13 2008/09/18 08:37:27 kurasige Exp $ 28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 29 // 30 30 // … … 70 70 71 71 anInstance = new G4ParticleDefinition( 72 name, 0.1395700*GeV, 2.5284e-14*MeV, +1.*eplus,72 name, 0.1395700*GeV, 2.5452e-14*MeV, +1.*eplus, 73 73 0, -1, 0, 74 74 2, +2, -1, -
trunk/source/particles/hadrons/mesons/src/G4PionZero.cc
r850 r921 25 25 // 26 26 // 27 // $Id: G4PionZero.cc,v 1.1 6 2006/06/29 19:20:04 gunterExp $28 // GEANT4 tag $Name: HEAD$27 // $Id: G4PionZero.cc,v 1.17 2008/09/18 08:37:27 kurasige Exp $ 28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 29 // 30 30 // … … 72 72 73 73 anInstance = new G4ParticleDefinition( 74 name, 0.1349764*GeV, 7. 8e-06*MeV, 0.0,74 name, 0.1349764*GeV, 7.9e-06*MeV, 0.0, 75 75 0, -1, +1, 76 76 2, 0, -1, -
trunk/source/particles/leptons/src/G4Electron.cc
r850 r921 25 25 // 26 26 // 27 // $Id: G4Electron.cc,v 1.1 5 2008/03/06 15:41:57kurasige Exp $28 // GEANT4 tag $Name: HEAD$27 // $Id: G4Electron.cc,v 1.17 2008/11/13 08:23:12 kurasige Exp $ 28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 29 // 30 30 // … … 77 77 ); 78 78 // Bohr Magnetron 79 G4double muB = -0.5*eplus*hbar_Planck/( 0.51099906*MeV/c_squared) ;79 G4double muB = -0.5*eplus*hbar_Planck/(electron_mass_c2/c_squared) ; 80 80 81 anInstance->SetPDGMagneticMoment( muB * 1.0011596521859 );81 anInstance->SetPDGMagneticMoment( muB * 2.* 1.0011596521859 ); 82 82 83 83 } -
trunk/source/particles/leptons/src/G4MuonMinus.cc
r850 r921 25 25 // 26 26 // 27 // $Id: G4MuonMinus.cc,v 1.1 3 2007/03/15 06:53:57kurasige Exp $28 // GEANT4 tag $Name: HEAD$27 // $Id: G4MuonMinus.cc,v 1.15 2008/11/13 08:23:12 kurasige Exp $ 28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 29 // 30 30 // … … 68 68 // shortlived subType anti_encoding 69 69 anInstance = new G4ParticleDefinition( 70 name, 0.1056584*GeV, 2.99591e-16*MeV, -1.*eplus,70 name, 0.1056584*GeV, 3.01594e-16*MeV, -1.*eplus, 71 71 1, 0, 0, 72 72 0, 0, 0, … … 78 78 G4double muB = -0.5*eplus*hbar_Planck/(0.1056584*GeV/c_squared) ; 79 79 80 anInstance->SetPDGMagneticMoment( muB * 1.0011659208);80 anInstance->SetPDGMagneticMoment( muB * 2. * 1.0011659208); 81 81 82 82 //create Decay Table -
trunk/source/particles/leptons/src/G4MuonPlus.cc
r850 r921 25 25 // 26 26 // 27 // $Id: G4MuonPlus.cc,v 1.1 3 2007/03/15 06:53:58kurasige Exp $28 // GEANT4 tag $Name: HEAD$27 // $Id: G4MuonPlus.cc,v 1.15 2008/11/13 08:23:12 kurasige Exp $ 28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 29 // 30 30 // … … 68 68 // shortlived subType anti_encoding 69 69 anInstance = new G4ParticleDefinition( 70 name, 0.1056584*GeV, 2.99591e-16*MeV, +1.*eplus,70 name, 0.1056584*GeV, 3.01594e-16*MeV, +1.*eplus, 71 71 1, 0, 0, 72 72 0, 0, 0, … … 78 78 G4double muB = 0.5*eplus*hbar_Planck/(0.1056584*GeV/c_squared) ; 79 79 80 anInstance->SetPDGMagneticMoment( muB * 1.0011659208);80 anInstance->SetPDGMagneticMoment( muB * 2.* 1.0011659208); 81 81 82 82 //create Decay Table -
trunk/source/particles/leptons/src/G4Positron.cc
r850 r921 25 25 // 26 26 // 27 // $Id: G4Positron.cc,v 1.1 4 2008/03/06 15:41:57kurasige Exp $28 // GEANT4 tag $Name: HEAD$27 // $Id: G4Positron.cc,v 1.16 2008/11/13 08:23:12 kurasige Exp $ 28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 29 // 30 30 // … … 77 77 78 78 // Bohr Magnetron 79 G4double muB = 0.5*eplus*hbar_Planck/( 0.51099906*MeV/c_squared) ;79 G4double muB = 0.5*eplus*hbar_Planck/(electron_mass_c2/c_squared) ; 80 80 81 anInstance->SetPDGMagneticMoment( muB * 1.0011596521859 );81 anInstance->SetPDGMagneticMoment( muB * 2.* 1.0011596521859 ); 82 82 83 83 } -
trunk/source/particles/leptons/src/G4TauMinus.cc
r850 r921 25 25 // 26 26 // 27 // $Id: G4TauMinus.cc,v 1.1 6 2007/03/15 06:53:58kurasige Exp $28 // GEANT4 tag $Name: HEAD$27 // $Id: G4TauMinus.cc,v 1.18 2008/11/13 08:23:12 kurasige Exp $ 28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 29 // 30 30 // … … 70 70 // shortlived subType anti_encoding 71 71 anInstance = new G4ParticleDefinition( 72 name, 1.77699*GeV, 2.2 65e-9*MeV, -1.*eplus,72 name, 1.77699*GeV, 2.280e-9*MeV, -1.*eplus, 73 73 1, 0, 0, 74 74 0, 0, 0, … … 81 81 G4double muB = -0.5*eplus*hbar_Planck/(1.77699*GeV/c_squared) ; 82 82 83 anInstance->SetPDGMagneticMoment( muB * 1.00116);83 anInstance->SetPDGMagneticMoment( muB * 2. * 1.00116); 84 84 85 85 //create Decay Table -
trunk/source/particles/leptons/src/G4TauPlus.cc
r850 r921 25 25 // 26 26 // 27 // $Id: G4TauPlus.cc,v 1.1 6 2007/03/15 06:53:58kurasige Exp $28 // GEANT4 tag $Name: HEAD$27 // $Id: G4TauPlus.cc,v 1.18 2008/11/13 08:23:12 kurasige Exp $ 28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 29 // 30 30 // … … 70 70 // shortlived subType anti_encoding 71 71 anInstance = new G4ParticleDefinition( 72 name, 1.77699*GeV, 2.2 65e-9*MeV, 1.*eplus,72 name, 1.77699*GeV, 2.280e-9*MeV, 1.*eplus, 73 73 1, 0, 0, 74 74 0, 0, 0, … … 80 80 G4double muB = 0.5*eplus*hbar_Planck/(1.77699*GeV/c_squared) ; 81 81 82 anInstance->SetPDGMagneticMoment( muB * 1.00116);82 anInstance->SetPDGMagneticMoment( muB * 2.* 1.00116); 83 83 84 84 //create Decay Table -
trunk/source/particles/management/include/G4ParticleDefinition.hh
r890 r921 25 25 // 26 26 // 27 // $Id: G4ParticleDefinition.hh,v 1.3 3 2008/11/14 16:26:30 kurasige Exp $28 // GEANT4 tag $Name: $27 // $Id: G4ParticleDefinition.hh,v 1.32 2008/03/22 06:03:40 kurasige Exp $ 28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 29 // 30 30 // … … 129 129 130 130 G4double GetPDGMagneticMoment() const { return thePDGMagneticMoment; } 131 void SetPDGMagneticMoment(G4double mageticMoment); 132 G4double CalculateAnomaly() const; 133 // gives the anomaly of magnetic moment for spin 1/2 particles 131 void SetPDGMagneticMoment(G4double mageticMoment); 134 132 135 133 const G4String& GetParticleType() const { return theParticleType; } -
trunk/source/particles/management/include/G4ParticleDefinition.icc
r890 r921 25 25 // 26 26 // 27 // $Id: G4ParticleDefinition.icc,v 1.1 3 2008/11/14 16:26:30kurasige Exp $28 // GEANT4 tag $Name: $27 // $Id: G4ParticleDefinition.icc,v 1.12 2007/03/11 07:17:35 kurasige Exp $ 28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 29 // 30 30 … … 155 155 } 156 156 157 inline 158 G4double G4ParticleDefinition::CalculateAnomaly() const 159 { 160 // gives the anomaly of magnetic moment for spin 1/2 particles 161 if (thePDGiSpin==1) { 162 G4double muB = 0.5*eplus*hbar_Planck/(thePDGMass/c_squared); 163 return 0.5*fabs(thePDGMagneticMoment/muB - 2.*thePDGCharge/eplus); 164 } else { 165 return 0.0; 166 } 167 } 157 -
trunk/source/particles/shortlived/src/G4ExcitedDeltaConstructor.cc
r850 r921 25 25 // 26 26 // 27 // $Id: G4ExcitedDeltaConstructor.cc,v 1.1 1 2006/10/12 10:59:45kurasige Exp $28 // GEANT4 tag $Name: HEAD$27 // $Id: G4ExcitedDeltaConstructor.cc,v 1.12 2008/09/18 08:37:27 kurasige Exp $ 28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 29 // 30 30 // … … 482 482 const G4double G4ExcitedDeltaConstructor::width[] = { 483 483 350.0*MeV, 145.0*MeV, 300.0*MeV, 200.0*MeV, 330.0*MeV, 484 250.0*MeV, 200.0*MeV, 360.0*MeV, 2 80.0*MeV484 250.0*MeV, 200.0*MeV, 360.0*MeV, 290.0*MeV 485 485 }; 486 486 -
trunk/source/particles/shortlived/src/G4ExcitedLambdaConstructor.cc
r850 r921 25 25 // 26 26 // 27 // $Id: G4ExcitedLambdaConstructor.cc,v 1.1 1 2006/10/12 10:59:45kurasige Exp $28 // GEANT4 tag $Name: HEAD$27 // $Id: G4ExcitedLambdaConstructor.cc,v 1.12 2008/09/18 08:37:27 kurasige Exp $ 28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 29 // 30 30 // … … 357 357 358 358 const G4double G4ExcitedLambdaConstructor::mass[] = { 359 1.4065*GeV,1.5195*GeV, 1.600*GeV, 1.670*GeV, 1.690*GeV,359 1.406*GeV,1.5195*GeV, 1.600*GeV, 1.670*GeV, 1.690*GeV, 360 360 1.800*GeV, 1.810*GeV, 1.820*GeV, 1.830*GeV, 1.890*GeV, 361 361 2.100*GeV, 2.110*GeV -
trunk/source/particles/shortlived/src/G4ExcitedMesonConstructor.cc
r850 r921 25 25 // 26 26 // 27 // $Id: G4ExcitedMesonConstructor.cc,v 1. 19 2006/10/12 10:59:45kurasige Exp $28 // GEANT4 tag $Name: HEAD$27 // $Id: G4ExcitedMesonConstructor.cc,v 1.20 2008/09/18 08:37:27 kurasige Exp $ 28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 29 // 30 30 // … … 1401 1401 { 1402 1402 { 1.2295*GeV, 1.170*GeV, 1.386*GeV, 1.272*GeV, 1.273*GeV }, 1403 { 1.474*GeV, 1.350*GeV, 0.0, 1.4 14*GeV, 1.414*GeV },1404 { 1.230*GeV,1.2818*GeV,1.4263*GeV, 1.40 2*GeV, 1.402*GeV },1405 { 1.3183*GeV,1.275 4*GeV, 1.525*GeV,1.4256*GeV, 1.4256*GeV },1403 { 1.474*GeV, 1.350*GeV, 0.0, 1.420*GeV, 1.420*GeV }, 1404 { 1.230*GeV,1.2818*GeV,1.4263*GeV, 1.403*GeV, 1.403*GeV }, 1405 { 1.3183*GeV,1.2751*GeV, 1.525*GeV,1.4256*GeV, 1.4256*GeV }, 1406 1406 { 1.6724*GeV, 1.617*GeV, 1.842*GeV, 1.773*GeV, 1.773*GeV }, 1407 1407 { 1.720*GeV, 1.670*GeV, 0.0, 1.717*GeV, 1.717*GeV }, 1408 1408 { 1.6888*GeV, 1.667*GeV, 1.854*GeV, 1.776*GeV, 1.776*GeV }, 1409 1409 { 1.300*GeV, 1.294*GeV, 1.476*GeV, 1.460*GeV, 1.460*GeV }, 1410 { 1.4 59*GeV, 1.425*GeV, 1.680*GeV, 1.414*GeV, 1.414*GeV },1410 { 1.465*GeV, 1.425*GeV, 1.680*GeV, 1.414*GeV, 1.414*GeV }, 1411 1411 { 0.0, 1.815*GeV, 2.010*GeV, 1.973*GeV, 1.973*GeV } 1412 1412 }; … … 1425 1425 { 1426 1426 { 142.0*MeV, 360.0*MeV, 91.0*MeV, 90.0*MeV, 90.0*MeV }, 1427 { 265.0*MeV, 350.0*MeV, 0.0, 2 90.0*MeV, 290.0*MeV },1428 { 420.0*MeV, 24. 2*MeV, 54.9*MeV, 174.0*MeV, 174.0*MeV },1429 { 107.0*MeV, 185. 2*MeV, 73.0*MeV, 98.5*MeV, 98.5*MeV },1427 { 265.0*MeV, 350.0*MeV, 0.0, 270.0*MeV, 270.0*MeV }, 1428 { 420.0*MeV, 24.3*MeV, 54.9*MeV, 174.0*MeV, 174.0*MeV }, 1429 { 107.0*MeV, 185.0*MeV, 73.0*MeV, 98.5*MeV, 98.5*MeV }, 1430 1430 { 259.0*MeV, 181.0*MeV, 225.0*MeV, 186.0*MeV, 186.0*MeV }, 1431 1431 { 250.0*MeV, 315.0*MeV, 0.0, 320.0*MeV, 320.0*MeV }, 1432 1432 { 161.0*MeV, 168.0*MeV, 87.0*MeV, 159.0*MeV, 159.0*MeV }, 1433 { 400.0*MeV, 55.0*MeV, 8 7.0*MeV, 260.0*MeV, 260.0*MeV },1434 { 150.0*MeV, 215.0*MeV, 150.0*MeV, 232.0*MeV, 232.0*MeV },1433 { 400.0*MeV, 55.0*MeV, 85.0*MeV, 260.0*MeV, 260.0*MeV }, 1434 { 400.0*MeV, 215.0*MeV, 150.0*MeV, 232.0*MeV, 232.0*MeV }, 1435 1435 { 0.0, 197.0*MeV, 200.0*MeV, 373.0*MeV, 373.0*MeV } 1436 1436 }; -
trunk/source/particles/shortlived/src/G4ExcitedXiConstructor.cc
r850 r921 25 25 // 26 26 // 27 // $Id: G4ExcitedXiConstructor.cc,v 1. 7 2006/06/29 19:27:12 gunterExp $28 // GEANT4 tag $Name: HEAD$27 // $Id: G4ExcitedXiConstructor.cc,v 1.8 2008/09/18 08:37:27 kurasige Exp $ 28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 29 // 30 30 // … … 290 290 291 291 const G4double G4ExcitedXiConstructor::mass[] = { 292 1.53 18*GeV, 1.690*GeV, 1.823*GeV, 1.950*GeV, 2.025*GeV292 1.5334*GeV, 1.690*GeV, 1.823*GeV, 1.950*GeV, 2.025*GeV 293 293 }; 294 294 -
trunk/source/particles/shortlived/src/G4ShortLivedConstructor.cc
r850 r921 25 25 // 26 26 // 27 // $Id: G4ShortLivedConstructor.cc,v 1.1 5 2006/10/12 10:59:45kurasige Exp $28 // GEANT4 tag $Name: HEAD$27 // $Id: G4ShortLivedConstructor.cc,v 1.16 2008/09/18 08:37:27 kurasige Exp $ 28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 29 // 30 30 // … … 91 91 // u-quark 92 92 particle = new G4Quarks( 93 "u_quark", 2. 3*MeV, 0.0*MeV, 2./3.*eplus,93 "u_quark", 2.4*MeV, 0.0*MeV, 2./3.*eplus, 94 94 1, +1, 0, 95 95 1, +1, 0, … … 98 98 // d-quark 99 99 particle = new G4Quarks( 100 "d_quark", 5.0*MeV, 0.0*MeV, -1./3.*eplus,100 "d_quark", 4.8*MeV, 0.0*MeV, -1./3.*eplus, 101 101 1, +1, 0, 102 102 1, -1, 0, … … 105 105 // s-quark 106 106 particle = new G4Quarks( 107 "s_quark", 95.0*MeV, 0.0*MeV, -1./3.*eplus,107 "s_quark", 104.0*MeV, 0.0*MeV, -1./3.*eplus, 108 108 1, +1, 0, 109 109 0, 0, 0, … … 112 112 // c-quark 113 113 particle = new G4Quarks( 114 "c_quark", 1.2 5*GeV, 0.0*MeV, +2./3.*eplus,114 "c_quark", 1.27*GeV, 0.0*MeV, +2./3.*eplus, 115 115 1, +1, 0, 116 116 0, 0, 0, … … 119 119 // b-quark 120 120 particle = new G4Quarks( 121 "b_quark", 4. 20*GeV, 0.0*MeV, -1./3.*eplus,121 "b_quark", 4.68*GeV, 0.0*MeV, -1./3.*eplus, 122 122 1, +1, 0, 123 123 0, 0, 0, … … 126 126 // t-quark 127 127 particle = new G4Quarks( 128 "t_quark", 17 4.2*GeV, 0.0*MeV, +2./3.*eplus,128 "t_quark", 171.2*GeV, 0.0*MeV, +2./3.*eplus, 129 129 1, +1, 0, 130 130 0, 0, 0, … … 133 133 // anti u-quark 134 134 particle = new G4Quarks( 135 "anti_u_quark", 2. 3*MeV, 0.0*MeV, -2./3.*eplus,135 "anti_u_quark", 2.4*MeV, 0.0*MeV, -2./3.*eplus, 136 136 1, +1, 0, 137 137 1, -1, 0, … … 140 140 // anti d-quark 141 141 particle = new G4Quarks( 142 "anti_d_quark", 5.0*MeV, 0.0*MeV, 1./3.*eplus,142 "anti_d_quark", 4.8*MeV, 0.0*MeV, 1./3.*eplus, 143 143 1, +1, 0, 144 144 1, +1, 0, … … 147 147 // s-quark 148 148 particle = new G4Quarks( 149 "anti_s_quark", 95.0*MeV, 0.0*MeV, 1./3.*eplus,149 "anti_s_quark", 104.0*MeV, 0.0*MeV, 1./3.*eplus, 150 150 1, +1, 0, 151 151 0, 0, 0, … … 154 154 // c-quark 155 155 particle = new G4Quarks( 156 "anti_c_quark", 1.2 5*GeV, 0.0*MeV, -2./3.*eplus,156 "anti_c_quark", 1.27*GeV, 0.0*MeV, -2./3.*eplus, 157 157 1, +1, 0, 158 158 0, 0, 0, … … 161 161 // b-quark 162 162 particle = new G4Quarks( 163 "anti_b_quark", 4. 20*GeV, 0.0*MeV, 1./3.*eplus,163 "anti_b_quark", 4.68*GeV, 0.0*MeV, 1./3.*eplus, 164 164 1, +1, 0, 165 165 0, 0, 0, … … 168 168 // t-quark 169 169 particle = new G4Quarks( 170 "anti_t_quark", 17 4.2*GeV, 0.0*MeV, -2./3.*eplus,170 "anti_t_quark", 171.2*GeV, 0.0*MeV, -2./3.*eplus, 171 171 1, +1, 0, 172 172 0, 0, 0, … … 176 176 // uu1-Diquark 177 177 particle = new G4DiQuarks( 178 "uu1_diquark", 4. 6*MeV, 0.0*MeV, 4./3.*eplus,178 "uu1_diquark", 4.8*MeV, 0.0*MeV, 4./3.*eplus, 179 179 2, +1, 0, 180 180 2, +2, 0, … … 183 183 // ud1-Diquark 184 184 particle = new G4DiQuarks( 185 "ud1_diquark", 7. 3*MeV, 0.0*MeV, 1./3.*eplus,185 "ud1_diquark", 7.2*MeV, 0.0*MeV, 1./3.*eplus, 186 186 2, +1, 0, 187 187 2, +0, 0, … … 190 190 // dd1-Diquark 191 191 particle = new G4DiQuarks( 192 "dd1_diquark", 10.0*MeV, 0.0*MeV, -2./3.*eplus,192 "dd1_diquark", 9.6*MeV, 0.0*MeV, -2./3.*eplus, 193 193 2, +1, 0, 194 194 2, -2, 0, … … 206 206 // sd1-Diquark 207 207 particle = new G4DiQuarks( 208 "sd1_diquark", 10 0.0*MeV, 0.0*MeV, -2./3.*eplus,208 "sd1_diquark", 108.8*MeV, 0.0*MeV, -2./3.*eplus, 209 209 2, +1, 0, 210 210 1, -1, 0, … … 214 214 // su1-Diquark 215 215 particle = new G4DiQuarks( 216 "su1_diquark", 97.3*MeV, 0.0*MeV, 1./3.*eplus,216 "su1_diquark", 106.4*MeV, 0.0*MeV, 1./3.*eplus, 217 217 2, +1, 0, 218 218 1, +1, 0, … … 222 222 // sd0-Diquark 223 223 particle = new G4DiQuarks( 224 "sd0_diquark", 10 0.0*MeV, 0.0*MeV, -2./3.*eplus,224 "sd0_diquark", 108.0*MeV, 0.0*MeV, -2./3.*eplus, 225 225 0, +1, 0, 226 226 1, -1, 0, … … 230 230 // su0-Diquark 231 231 particle = new G4DiQuarks( 232 "su0_diquark", 97.3*MeV, 0.0*MeV, 1./3.*eplus,232 "su0_diquark", 106.4*MeV, 0.0*MeV, 1./3.*eplus, 233 233 0, +1, 0, 234 234 1, +1, 0, … … 238 238 // anti uu1-Diquark 239 239 particle = new G4DiQuarks( 240 "anti_uu1_diquark", 4. 6*MeV, 0.0*MeV, -4./3.*eplus,240 "anti_uu1_diquark", 4.8*MeV, 0.0*MeV, -4./3.*eplus, 241 241 2, +1, 0, 242 242 2, -2, 0, … … 245 245 // anti ud1-Diquark 246 246 particle = new G4DiQuarks( 247 "anti_ud1_diquark", 7. 3*MeV, 0.0*MeV, -1./3.*eplus,247 "anti_ud1_diquark", 7.2*MeV, 0.0*MeV, -1./3.*eplus, 248 248 2, +1, 0, 249 249 2, +0, 0, … … 252 252 // anti dd1-Diquark 253 253 particle = new G4DiQuarks( 254 "anti_dd1_diquark", 10.0*MeV, 0.0*MeV, 2./3.*eplus,254 "anti_dd1_diquark", 9.6*MeV, 0.0*MeV, 2./3.*eplus, 255 255 2, +1, 0, 256 256 2, +2, 0, … … 260 260 // anti ud0-Diquark 261 261 particle = new G4DiQuarks( 262 "anti_ud0_diquark", 7. 3*MeV, 0.0*MeV, -1./3.*eplus,262 "anti_ud0_diquark", 7.2*MeV, 0.0*MeV, -1./3.*eplus, 263 263 0, +1, 0, 264 264 0, +0, 0, … … 268 268 // anti sd1-Diquark 269 269 particle = new G4DiQuarks( 270 "anti_sd1_diquark", 10 0.0*MeV, 0.0*MeV, 2./3.*eplus,270 "anti_sd1_diquark", 108.8*MeV, 0.0*MeV, 2./3.*eplus, 271 271 2, +1, 0, 272 272 1, +1, 0, … … 276 276 // anti su1-Diquark 277 277 particle = new G4DiQuarks( 278 "anti_su1_diquark", 97.3*MeV, 0.0*MeV, -1./3.*eplus,278 "anti_su1_diquark", 106.4*MeV, 0.0*MeV, -1./3.*eplus, 279 279 2, +1, 0, 280 280 1, -1, 0, … … 284 284 // anti sd0-Diquark 285 285 particle = new G4DiQuarks( 286 "anti_sd0_diquark", 10 0.0*MeV, 0.0*MeV, 2./3.*eplus,286 "anti_sd0_diquark", 108.8*MeV, 0.0*MeV, 2./3.*eplus, 287 287 0, +1, 0, 288 288 1, +1, 0, … … 292 292 // anti su0-Diquark 293 293 particle = new G4DiQuarks( 294 "anti_su0_diquark", 97.3*MeV, 0.0*MeV, -1./3.*eplus,294 "anti_su0_diquark", 106.4*MeV, 0.0*MeV, -1./3.*eplus, 295 295 0, +1, 0, 296 296 1, -1, 0, … … 299 299 // ss1-Diquark 300 300 particle = new G4DiQuarks( 301 "ss1_diquark", 190.0*MeV, 0.0*MeV, -2./3.*eplus,301 "ss1_diquark", 208.0*MeV, 0.0*MeV, -2./3.*eplus, 302 302 2, +1, 0, 303 303 0, 0, 0, … … 307 307 // anti ss1-Diquark 308 308 particle = new G4DiQuarks( 309 "anti_ss1_diquark", 190.0*MeV, 0.0*MeV, 2./3.*eplus,309 "anti_ss1_diquark", 208.0*MeV, 0.0*MeV, 2./3.*eplus, 310 310 2, +1, 0, 311 311 0, 0, 0, … … 813 813 // f0(1500) 814 814 particle = new G4ExcitedMesons( 815 "f0(1500)", 150 7.0*MeV, 109.0*MeV, 0.0,815 "f0(1500)", 1505.0*MeV, 109.0*MeV, 0.0, 816 816 0, +1, +1, 817 817 0, 0, +1, … … 833 833 // f0(1710) 834 834 particle = new G4ExcitedMesons( 835 "f0(1710)", 17 18.0*MeV, 137.0*MeV, 0.0,835 "f0(1710)", 1724.0*MeV, 137.0*MeV, 0.0, 836 836 0, +1, +1, 837 837 0, 0, +1, -
trunk/source/persistency/GNUmakefile
r818 r921 1 # $Id: GNUmakefile,v 1. 29 2007/11/02 16:22:05gcosmo Exp $1 # $Id: GNUmakefile,v 1.30 2008/10/23 14:47:26 gcosmo Exp $ 2 2 # ----------------------------------------------------------------------- 3 3 # GNUmakefile for persistency library. Gabriele Cosmo, 16/11/96. … … 6 6 name := G4persistency 7 7 8 SUBDIRS := mctruth 9 SUBLIBS = G4mctruth 8 SUBDIRS := mctruth ascii 9 SUBLIBS = G4mctruth G4geomtext 10 10 11 11 ifdef G4LIB_BUILD_GDML -
trunk/source/persistency/History
r818 r921 15 15 * Reverse chronological order (last date on top), please * 16 16 ---------------------------------------------------------- 17 18 23 October, 08 G.Cosmo (persistency-V09-01-00) 19 - Added "ascii" module from original implementation by P.Arce (CIEMAT). 20 First release. 21 - Coworks with tag "config-V09-01-08". 17 22 18 23 02 November, 07 G.Cosmo (persistency-V09-00-00) -
trunk/source/persistency/gdml/History
r850 r921 1 $Id: History,v 1. 89 2008/08/22 16:01:02 gcosmo Exp $1 $Id: History,v 1.98 2009/01/23 10:41:12 gcosmo Exp $ 2 2 ------------------------------------------------------------------- 3 3 … … 17 17 * Reverse chronological order (last date on top), please * 18 18 ---------------------------------------------------------- 19 20 23 January 2009 Gabriele Cosmo (gdml-V09-02-01) 21 - Changed post-fix"_refl" to "_PV" for placements made through the 22 reflection-factory. 23 24 22 January 2009 Gabriele Cosmo (gdml-V09-02-00) 25 - Added possibility to check overlaps by activating/de-activating the 26 built-in surface check for placement and parameterised volumes. 27 By default the overlap check is off. To activate it, use call to the 28 parser 'SetOverlapCheck(true)' before reading the GDML file. 29 30 4 December 2008 Gabriele Cosmo (gdml-V09-01-21) 31 - Updated default GDML schema location in G4GDMLParser to point to new 32 GDML schema. 33 34 21 November 2008 Tatiana Nikitina (gdml-V09-01-20) 35 - Updated schema to include new features introduced in reader/writer plugin. 36 37 21 November 2008 Gabriele Cosmo (gdml-V09-01-19) 38 - Added missing solid Elliptical-Cone to reader and writer. 39 40 20 November 2008 Gabriele Cosmo (gdml-V09-01-18) 41 - Implemented mechanism for importing GDML descriptions with extensions 42 to the GDML schema, identified by a new tag "extension". 43 - Added implementation .cc file for G4GDMLParser. 44 45 17 November 2008 Gabriele Cosmo (gdml-V09-01-17) 46 - Get rid of module-name pre-pended to entity names. 47 - Added StripNamePointers() method to G4GDMLParser, utility to be invoked in 48 the user-code to strip off pointers from entity names in a GDML modular setup 49 after loading all modules. 50 51 14 November 2008 Gabriele Cosmo (gdml-V09-01-16) 52 - Enhanced name stripping in G4GDMLRead, to remove also additional IDs 53 prepended to the original name of entities in the case of modular GDML files. 54 55 13 November 2008 Gabriele Cosmo (gdml-V09-01-15) 56 - Added support for new serializer API as introduced in Xerces-3.0.0. 57 - Cleared compilation warnings on Intel-icc compiler. 19 58 20 59 22 August 2008 Tatiana Nikitina (gdml-V09-01-14) -
trunk/source/persistency/gdml/include/G4GDMLParser.hh
r850 r921 25 25 // 26 26 // 27 // $Id: G4GDMLParser.hh,v 1.5 3 2008/08/21 12:17:09gcosmo Exp $28 // GEANT4 tag $Name: HEAD$27 // $Id: G4GDMLParser.hh,v 1.57 2009/01/22 11:02:07 gcosmo Exp $ 28 // GEANT4 tag $Name: $ 29 29 // 30 30 // … … 46 46 #include "G4STRead.hh" 47 47 48 #define G4GDML_DEFAULT_SCHEMALOCATION G4String("http://service-spi.web.cern.ch/service-spi/app/releases/GDML/ GDML_2_10_0/src/GDMLSchema/gdml.xsd")48 #define G4GDML_DEFAULT_SCHEMALOCATION G4String("http://service-spi.web.cern.ch/service-spi/app/releases/GDML/schema/gdml.xsd") 49 49 50 50 class G4GDMLParser … … 52 52 public: // with description 53 53 54 G4GDMLParser() { xercesc::XMLPlatformUtils::Initialize(); } 55 ~G4GDMLParser() { xercesc::XMLPlatformUtils::Terminate(); } 54 G4GDMLParser(); 55 G4GDMLParser(G4GDMLReadStructure*); 56 ~G4GDMLParser(); 56 57 // 57 // Parser constructor & destructor58 // Parser constructors & destructor 58 59 59 60 inline void Read(const G4String& filename, G4bool Validate=true); … … 99 100 inline G4VPhysicalVolume* GetWorldVolume(const G4String& setupName="Default"); 100 101 inline G4GDMLAuxListType GetVolumeAuxiliaryInformation(const G4LogicalVolume* const logvol); 102 inline void StripNamePointers() const; 103 inline void SetOverlapCheck(G4bool); 101 104 102 105 // Methods for Writer … … 108 111 private: 109 112 110 G4GDMLReadStructure reader; 111 G4GDMLWriteStructure writer; 113 G4GDMLReadStructure* reader; 114 G4GDMLWriteStructure* writer; 115 G4bool ucode; 112 116 113 117 }; -
trunk/source/persistency/gdml/src/G4GDMLParser.cc
r818 r921 24 24 // ******************************************************************** 25 25 // 26 // 27 // $Id: G4GDMLParser.cc,v 1.13 2008/11/20 15:33:52 gcosmo Exp $ 28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 // 30 // 31 // class G4GDMLParser Implementation 32 // 33 // ------------------------------------------------------------------------- 34 26 35 #include "G4GDMLParser.hh" 36 37 G4GDMLParser::G4GDMLParser() 38 : ucode(false) 39 { 40 reader = new G4GDMLReadStructure; 41 writer = new G4GDMLWriteStructure; 42 xercesc::XMLPlatformUtils::Initialize(); 43 } 44 45 G4GDMLParser::G4GDMLParser(G4GDMLReadStructure* ext) 46 : ucode(true) 47 { 48 reader = ext; 49 writer = new G4GDMLWriteStructure; 50 xercesc::XMLPlatformUtils::Initialize(); 51 } 52 53 G4GDMLParser::~G4GDMLParser() 54 { 55 xercesc::XMLPlatformUtils::Terminate(); 56 delete writer; 57 if (!ucode) { delete reader; } 58 } -
trunk/source/physics_lists/History
r850 r921 1 $Id: History,v 1. 65 2008/08/05 10:25:00vnivanch Exp $1 $Id: History,v 1.74 2008/12/01 17:04:13 vnivanch Exp $ 2 2 ------------------------------------------------------------------- 3 3 … … 15 15 * Reverse chronological order (last date on top), please * 16 16 ---------------------------------------------------------- 17 18 01-12-2008, V.Ivanchenko phys-lists-V09-01-19 19 G4HadronElasticPhysics - fixed adding optional Barashenkov Xsection 20 QBBC - added QBBBG option 21 22 21-11-2008, V.Ivanchenko phys-lists-V09-01-18 23 - Added sigma_c+, sigma_c++ in the list of stable hadrons 24 - added interfaces to G4PhysicsListFactory - ALICE requirement 25 26 20-11-2008, V.Ivanchenko phys-lists-V09-01-17 27 - Added charge exchange process to QBBC Physics Lists 28 29 17-11-2008, V.Ivanchenko phys-lists-V09-01-16 30 - Added names to string models builders 31 32 14-11-2008, V.Ivanchenko phys-lists-V09-01-15 33 G4EmStandardPhysics_option1 - disable ApplyCuts option 34 G4EmStandardPhysics_option3 - linLossLimit set to be default (0.01) 35 G4PhysicsListFactory - added QBBCG 36 37 15-10-2008, V.Ivanchenko phys-lists-V09-01-14 38 In all EM builders - set inactive for AlongStep for bremsstrahlung and pair 39 production porcesses for minor CPU improvenment 40 41 15-10-2008, V.Ivanchenko phys-lists-V09-01-13 42 In all EM builders: added hadron bemsstrahlung and e+e- pair production 43 and e-msc for e+-; 44 G4EmStandardPhysics_option2 - enable "ApplyCuts", disable "SubCutoff" 45 G4EmStandardPhysics_option3 - added G4LowEnergyRayleigh, set 120 bins 46 for tables (60 is the default), StepFunction per particle type 47 48 24-09-2008, V.Ivanchenko phys-lists-V09-01-12 49 - QBBC temporary variant which is equivalent QGSP_BERT without LHEP 50 for protons, neutrons and pions 51 52 17-09-2008, V.Ivanchenko phys-lists-V09-01-11 53 - G4NeutronTrackingCut - added Set methods to define time and energy 54 limits directly 55 - G4HadronInelasticQBBC, QBBC - use FTF with Binary Casacde, improved cout 17 56 18 57 04-08-2008, V.Ivanchenko phys-lists-V09-01-10 -
trunk/source/physics_lists/builders/GNUmakefile
r850 r921 1 # $Id: GNUmakefile,v 1. 4 2008/05/30 11:01:37vnivanch Exp $1 # $Id: GNUmakefile,v 1.5 2008/10/15 18:24:11 vnivanch Exp $ 2 2 # --------------------------------------------------------------------------- 3 3 # GNUmakefile for physics_lists/builders library. Gunter Folger 25-Oct-2006. … … 39 39 -I$(G4BASE)/processes/electromagnetic/utils/include \ 40 40 -I$(G4BASE)/processes/electromagnetic/xrays/include \ 41 -I$(G4BASE)/processes/electromagnetic/lowenergy/include \ 41 42 -I$(G4BASE)/processes/hadronic/cross_sections/include \ 42 43 -I$(G4BASE)/processes/hadronic/stopping/include \ -
trunk/source/physics_lists/builders/include/G4NeutronTrackingCut.hh
r850 r921 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4NeutronTrackingCut.hh,v 1. 1 2006/11/20 17:56:08 gunterExp $27 // GEANT4 tag $Name: HEAD$26 // $Id: G4NeutronTrackingCut.hh,v 1.2 2008/09/17 18:19:15 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 28 28 // 29 29 //--------------------------------------------------------------------------- … … 51 51 virtual ~G4NeutronTrackingCut(); 52 52 53 public:54 53 // This method will be invoked in the Construct() method. 55 54 // each particle type will be instantiated … … 61 60 virtual void ConstructProcess(); 62 61 62 inline void SetTimeLimit(G4double); 63 inline void SetKineticEnergyLimit(G4double); 64 63 65 private: 66 64 67 G4NeutronKiller* pNeutronKiller; 68 69 G4double timeLimit; 70 G4double kineticEnergyLimit; 71 65 72 G4int verbose; 66 73 G4bool wasActivated; 67 74 }; 75 76 inline void G4NeutronTrackingCut::SetTimeLimit(G4double val) 77 { 78 timeLimit = val; 79 } 80 81 inline void G4NeutronTrackingCut::SetKineticEnergyLimit(G4double val) 82 { 83 kineticEnergyLimit = val; 84 } 68 85 69 86 #endif -
trunk/source/physics_lists/builders/src/G4EmStandardPhysics.cc
r850 r921 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4EmStandardPhysics.cc,v 1.1 3 2008/04/22 18:28:37vnivanch Exp $27 // GEANT4 tag $Name: HEAD$26 // $Id: G4EmStandardPhysics.cc,v 1.16 2008/11/21 16:50:30 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 28 28 // 29 29 //--------------------------------------------------------------------------- … … 56 56 #include "G4MultipleScattering.hh" 57 57 #include "G4hMultipleScattering.hh" 58 #include "G4eMultipleScattering.hh" 58 59 59 60 #include "G4eIonisation.hh" … … 64 65 #include "G4MuBremsstrahlung.hh" 65 66 #include "G4MuPairProduction.hh" 67 #include "G4hBremsstrahlung.hh" 68 #include "G4hPairProduction.hh" 66 69 67 70 #include "G4hIonisation.hh" … … 152 155 } else if (particleName == "e-") { 153 156 154 pmanager->AddProcess(new G4 MultipleScattering,-1, 1, 1);157 pmanager->AddProcess(new G4eMultipleScattering,-1, 1, 1); 155 158 pmanager->AddProcess(new G4eIonisation, -1, 2, 2); 156 pmanager->AddProcess(new G4eBremsstrahlung(), -1, 3, 3);159 pmanager->AddProcess(new G4eBremsstrahlung(), -1,-3, 3); 157 160 158 161 } else if (particleName == "e+") { 159 162 160 pmanager->AddProcess(new G4 MultipleScattering,-1, 1, 1);163 pmanager->AddProcess(new G4eMultipleScattering,-1, 1, 1); 161 164 pmanager->AddProcess(new G4eIonisation, -1, 2, 2); 162 pmanager->AddProcess(new G4eBremsstrahlung, -1, 3, 3);165 pmanager->AddProcess(new G4eBremsstrahlung, -1,-3, 3); 163 166 pmanager->AddProcess(new G4eplusAnnihilation, 0,-1, 4); 164 167 … … 168 171 pmanager->AddProcess(new G4hMultipleScattering,-1, 1, 1); 169 172 pmanager->AddProcess(new G4MuIonisation, -1, 2, 2); 170 pmanager->AddProcess(new G4MuBremsstrahlung, -1, 3, 3);171 pmanager->AddProcess(new G4MuPairProduction, -1, 4, 4);173 pmanager->AddProcess(new G4MuBremsstrahlung, -1,-3, 3); 174 pmanager->AddProcess(new G4MuPairProduction, -1,-4, 4); 172 175 173 176 } else if (particleName == "alpha" || … … 177 180 pmanager->AddProcess(new G4hMultipleScattering, -1, 1, 1); 178 181 pmanager->AddProcess(new G4ionIonisation, -1, 2, 2); 182 183 } else if (particleName == "pi+" || 184 particleName == "pi-" || 185 particleName == "proton" ) { 186 187 pmanager->AddProcess(new G4hMultipleScattering, -1, 1, 1); 188 pmanager->AddProcess(new G4hIonisation, -1, 2, 2); 189 pmanager->AddProcess(new G4hBremsstrahlung, -1,-3, 3); 190 pmanager->AddProcess(new G4hPairProduction, -1,-4, 4); 179 191 180 192 } else if (particleName == "B+" || … … 187 199 particleName == "anti_omega-" || 188 200 particleName == "anti_proton" || 201 particleName == "anti_sigma_c+" || 202 particleName == "anti_sigma_c++" || 189 203 particleName == "anti_sigma+" || 190 204 particleName == "anti_sigma-" || … … 192 206 particleName == "anti_xi-" || 193 207 particleName == "deuteron" || 194 particleName == "kaon+" ||208 particleName == "kaon+" || 195 209 particleName == "kaon-" || 196 particleName == "lambda_c+" ||210 particleName == "lambda_c+" || 197 211 particleName == "omega-" || 198 particleName == "pi+" || 199 particleName == "pi-" || 200 particleName == "proton" || 212 particleName == "sigma_c+" || 213 particleName == "sigma_c++" || 201 214 particleName == "sigma+" || 202 215 particleName == "sigma-" || -
trunk/source/physics_lists/builders/src/G4EmStandardPhysics_option1.cc
r850 r921 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4EmStandardPhysics_option1.cc,v 1. 7 2008/04/22 18:28:38vnivanch Exp $27 // GEANT4 tag $Name: HEAD$26 // $Id: G4EmStandardPhysics_option1.cc,v 1.11 2008/11/21 16:50:30 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 28 28 // 29 29 //--------------------------------------------------------------------------- … … 56 56 #include "G4PhotoElectricEffect.hh" 57 57 58 #include "G4eMultipleScattering.hh" 58 59 #include "G4hMultipleScattering.hh" 59 60 #include "G4MultipleScattering.hh" … … 67 68 #include "G4MuBremsstrahlung.hh" 68 69 #include "G4MuPairProduction.hh" 70 #include "G4hBremsstrahlung.hh" 71 #include "G4hPairProduction.hh" 69 72 70 73 #include "G4hIonisation.hh" … … 158 161 G4eIonisation* eioni = new G4eIonisation(); 159 162 eioni->SetStepFunction(0.8, 1.0*mm); 160 G4 MultipleScattering* msc = new G4MultipleScattering;163 G4eMultipleScattering* msc = new G4eMultipleScattering; 161 164 msc->SetStepLimitType(fMinimal); 162 165 pmanager->AddProcess(msc, -1, 1, 1); 163 166 pmanager->AddProcess(eioni, -1, 2, 2); 164 pmanager->AddProcess(new G4eBremsstrahlung, -1, 3, 3);167 pmanager->AddProcess(new G4eBremsstrahlung, -1,-3, 3); 165 168 166 169 } else if (particleName == "e+") { … … 168 171 G4eIonisation* eioni = new G4eIonisation(); 169 172 eioni->SetStepFunction(0.8, 1.0*mm); 170 G4 MultipleScattering* msc = new G4MultipleScattering;173 G4eMultipleScattering* msc = new G4eMultipleScattering; 171 174 msc->SetStepLimitType(fMinimal); 172 175 pmanager->AddProcess(msc, -1, 1, 1); 173 176 pmanager->AddProcess(eioni, -1, 2, 2); 174 pmanager->AddProcess(new G4eBremsstrahlung, -1, 3, 3);177 pmanager->AddProcess(new G4eBremsstrahlung, -1,-3, 3); 175 178 pmanager->AddProcess(new G4eplusAnnihilation, 0,-1, 4); 176 179 … … 180 183 pmanager->AddProcess(new G4hMultipleScattering, -1, 1, 1); 181 184 pmanager->AddProcess(new G4MuIonisation, -1, 2, 2); 182 pmanager->AddProcess(new G4MuBremsstrahlung, -1, 3, 3);183 pmanager->AddProcess(new G4MuPairProduction, -1, 4, 4);185 pmanager->AddProcess(new G4MuBremsstrahlung, -1,-3, 3); 186 pmanager->AddProcess(new G4MuPairProduction, -1,-4, 4); 184 187 185 188 } else if (particleName == "alpha" || … … 189 192 pmanager->AddProcess(new G4hMultipleScattering, -1, 1, 1); 190 193 pmanager->AddProcess(new G4ionIonisation, -1, 2, 2); 194 195 } else if (particleName == "pi+" || 196 particleName == "pi-" || 197 particleName == "proton" ) { 198 199 pmanager->AddProcess(new G4hMultipleScattering, -1, 1, 1); 200 pmanager->AddProcess(new G4hIonisation, -1, 2, 2); 201 pmanager->AddProcess(new G4hBremsstrahlung, -1,-3, 3); 202 pmanager->AddProcess(new G4hPairProduction, -1,-4, 4); 191 203 192 204 } else if (particleName == "B+" || … … 199 211 particleName == "anti_omega-" || 200 212 particleName == "anti_proton" || 213 particleName == "anti_sigma_c+" || 214 particleName == "anti_sigma_c++" || 201 215 particleName == "anti_sigma+" || 202 216 particleName == "anti_sigma-" || … … 204 218 particleName == "anti_xi-" || 205 219 particleName == "deuteron" || 206 particleName == "kaon+" ||220 particleName == "kaon+" || 207 221 particleName == "kaon-" || 208 particleName == "lambda_c+" ||222 particleName == "lambda_c+" || 209 223 particleName == "omega-" || 210 particleName == "pi+" || 211 particleName == "pi-" || 212 particleName == "proton" || 224 particleName == "sigma_c+" || 225 particleName == "sigma_c++" || 213 226 particleName == "sigma+" || 214 227 particleName == "sigma-" || … … 225 238 G4EmProcessOptions opt; 226 239 opt.SetVerbose(verbose); 240 //opt.SetApplyCuts(true); 227 241 } 228 242 -
trunk/source/physics_lists/builders/src/G4EmStandardPhysics_option2.cc
r850 r921 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4EmStandardPhysics_option2.cc,v 1.1 1 2008/08/05 10:24:44vnivanch Exp $27 // GEANT4 tag $Name: HEAD$26 // $Id: G4EmStandardPhysics_option2.cc,v 1.15 2008/11/21 17:59:23 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 28 28 // 29 29 //--------------------------------------------------------------------------- … … 161 161 } else if (particleName == "e-") { 162 162 163 pmanager->AddProcess(new G4 MuMultipleScattering, -1, 1, 1);163 pmanager->AddProcess(new G4eMultipleScattering, -1, 1, 1); 164 164 pmanager->AddProcess(new G4eIonisation, -1, 2, 2); 165 165 pmanager->AddProcess(new G4eBremsstrahlung, -1,-3, 3); 166 pmanager->AddDiscreteProcess(new G4CoulombScattering());167 166 168 167 } else if (particleName == "e+") { 169 168 170 pmanager->AddProcess(new G4 MuMultipleScattering, -1, 1, 1);169 pmanager->AddProcess(new G4eMultipleScattering, -1, 1, 1); 171 170 pmanager->AddProcess(new G4eIonisation, -1, 2, 2); 172 171 pmanager->AddProcess(new G4eBremsstrahlung, -1,-3, 3); 173 172 pmanager->AddProcess(new G4eplusAnnihilation, 0,-1, 4); 174 pmanager->AddDiscreteProcess(new G4CoulombScattering());175 173 176 174 } else if (particleName == "mu+" || 177 175 particleName == "mu-" ) { 178 176 179 pmanager->AddProcess(new G4MuMultipleScattering, -1, 1, 1);177 pmanager->AddProcess(new G4MuMultipleScattering,-1, 1, 1); 180 178 pmanager->AddProcess(new G4MuIonisation, -1, 2, 2); 181 179 pmanager->AddProcess(new G4MuBremsstrahlung, -1,-3, 3); … … 194 192 particleName == "proton" ) { 195 193 196 pmanager->AddProcess(new G4MuMultipleScattering, -1, 1, 1);194 pmanager->AddProcess(new G4MuMultipleScattering,-1, 1, 1); 197 195 pmanager->AddProcess(new G4hIonisation, -1, 2, 2); 198 196 pmanager->AddProcess(new G4hBremsstrahlung, -1,-3, 3); … … 208 206 particleName == "anti_omega-" || 209 207 particleName == "anti_proton" || 208 particleName == "anti_sigma_c+" || 209 particleName == "anti_sigma_c++" || 210 210 particleName == "anti_sigma+" || 211 211 particleName == "anti_sigma-" || … … 217 217 particleName == "lambda_c+" || 218 218 particleName == "omega-" || 219 particleName == "sigma_c+" || 220 particleName == "sigma_c++" || 219 221 particleName == "sigma+" || 220 222 particleName == "sigma-" || … … 238 240 // Physics tables 239 241 // 240 opt.SetMinEnergy(100*eV);241 opt.SetMaxEnergy(100*TeV);242 opt.SetDEDXBinning(120);243 opt.SetLambdaBinning(120);244 opt.SetSplineFlag(true);242 //opt.SetMinEnergy(100*eV); 243 //opt.SetMaxEnergy(100*TeV); 244 //opt.SetDEDXBinning(84); 245 //opt.SetLambdaBinning(84); 246 //opt.SetSplineFlag(true); 245 247 opt.SetPolarAngleLimit(0.2); 246 248 247 249 // Energy loss 248 250 // 249 opt.SetLinearLossLimit(0.01);251 //opt.SetLinearLossLimit(0.01); 250 252 251 253 // Ionization -
trunk/source/physics_lists/builders/src/G4FTFBinaryNeutronBuilder.cc
r825 r921 33 33 { 34 34 theMin = 4*GeV; 35 theModel = new G4TheoFSGenerator ;35 theModel = new G4TheoFSGenerator("FTFB"); 36 36 37 37 theStringModel = new G4FTFModel; -
trunk/source/physics_lists/builders/src/G4FTFBinaryPiKBuilder.cc
r825 r921 33 33 { 34 34 theMin = 4*GeV; 35 theModel = new G4TheoFSGenerator ;35 theModel = new G4TheoFSGenerator("FTFB"); 36 36 37 37 theStringModel = new G4FTFModel; -
trunk/source/physics_lists/builders/src/G4FTFBinaryProtonBuilder.cc
r825 r921 33 33 { 34 34 theMin = 4*GeV; 35 theModel = new G4TheoFSGenerator ;35 theModel = new G4TheoFSGenerator("FTFB"); 36 36 37 37 theStringModel = new G4FTFModel; -
trunk/source/physics_lists/builders/src/G4FTFPNeutronBuilder.cc
r825 r921 33 33 { 34 34 theMin = 4*GeV; 35 theModel = new G4TheoFSGenerator ;35 theModel = new G4TheoFSGenerator("FTFP"); 36 36 37 37 theStringModel = new G4FTFModel; -
trunk/source/physics_lists/builders/src/G4FTFPPiKBuilder.cc
r825 r921 33 33 { 34 34 theMin = 4*GeV; 35 theModel = new G4TheoFSGenerator ;35 theModel = new G4TheoFSGenerator("FTFP"); 36 36 37 37 theStringModel = new G4FTFModel; -
trunk/source/physics_lists/builders/src/G4FTFPProtonBuilder.cc
r825 r921 33 33 { 34 34 theMin = 4*GeV; 35 theModel = new G4TheoFSGenerator ;35 theModel = new G4TheoFSGenerator("FTFP"); 36 36 37 37 theStringModel = new G4FTFModel; -
trunk/source/physics_lists/builders/src/G4HadronElasticPhysics.cc
r850 r921 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4HadronElasticPhysics.cc,v 1. 8 2008/05/19 10:21:34vnivanch Exp $27 // GEANT4 tag $Name: HEAD$26 // $Id: G4HadronElasticPhysics.cc,v 1.9 2008/12/01 16:57:22 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 28 28 // 29 29 //--------------------------------------------------------------------------- … … 64 64 #include "G4VQCrossSection.hh" 65 65 #include "G4UElasticCrossSection.hh" 66 #include "G4BGGNucleonElasticXS.hh" 67 #include "G4BGGPionElasticXS.hh" 66 68 67 69 G4HadronElasticPhysics::G4HadronElasticPhysics( … … 123 125 { 124 126 G4ParticleDefinition* particle = theParticleIterator->value(); 127 G4ProcessManager* pmanager = particle->GetProcessManager(); 125 128 G4String pname = particle->GetParticleName(); 126 129 if(pname == "anti_lambda" || … … 138 141 pname == "lambda" || 139 142 pname == "omega-" || 140 pname == "pi-" ||141 pname == "pi+" ||142 pname == "proton" ||143 143 pname == "sigma-" || 144 144 pname == "sigma+" || … … 148 148 pname == "triton") { 149 149 150 G4ProcessManager* pmanager = particle->GetProcessManager();151 150 if(mname == "elastic") { 152 151 G4UHadronElasticProcess* h = new G4UHadronElasticProcess("hElastic"); … … 159 158 hel->RegisterMe(model); 160 159 pmanager->AddDiscreteProcess(hel); 160 if(verbose > 1) 161 G4cout << "### HadronElasticPhysics added for " 162 << particle->GetParticleName() << G4endl; 163 164 // proton case 165 } else if(pname == "proton") { 166 if(mname == "elastic") { 167 G4UHadronElasticProcess* h = new G4UHadronElasticProcess("hElastic"); 168 h->SetQElasticCrossSection(man); 169 hel = h; 170 if(glFlag) hel->AddDataSet(new G4BGGNucleonElasticXS(particle)); 171 } else { 172 hel = new G4HadronElasticProcess("hElastic"); 173 } 174 hel->RegisterMe(model); 175 pmanager->AddDiscreteProcess(hel); 176 if(verbose > 1) 177 G4cout << "### HadronElasticPhysics added for " 178 << particle->GetParticleName() << G4endl; 161 179 162 180 // neutron case 163 181 } else if(pname == "neutron") { 164 182 165 G4ProcessManager* pmanager = particle->GetProcessManager();166 183 if(mname == "elastic") { 167 184 G4UHadronElasticProcess* h = new G4UHadronElasticProcess("hElastic"); … … 172 189 h->SetQElasticCrossSection(nhe->GetCS()); 173 190 hel = h; 174 if(glFlag) hel->AddDataSet(new G4 UElasticCrossSection(particle));191 if(glFlag) hel->AddDataSet(new G4BGGNucleonElasticXS(particle)); 175 192 } else { 176 193 hel = new G4HadronElasticProcess("hElastic"); … … 191 208 G4cout << "### HadronElasticPhysics added for " 192 209 << particle->GetParticleName() << G4endl; 210 211 // pion case 212 } else if(pname == "pi+" || pname == "pi-") { 213 if(mname == "elastic") { 214 G4UHadronElasticProcess* h = new G4UHadronElasticProcess("hElastic"); 215 h->SetQElasticCrossSection(man); 216 hel = h; 217 if(glFlag) hel->AddDataSet(new G4BGGPionElasticXS(particle)); 218 } else { 219 hel = new G4HadronElasticProcess("hElastic"); 220 } 221 hel->RegisterMe(model); 222 pmanager->AddDiscreteProcess(hel); 223 224 if(verbose > 1) 225 G4cout << "### HadronElasticPhysics added for " 226 << particle->GetParticleName() << G4endl; 193 227 } 194 228 } -
trunk/source/physics_lists/builders/src/G4NeutronTrackingCut.cc
r850 r921 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4NeutronTrackingCut.cc,v 1. 4 2006/11/24 16:30:13 gunterExp $27 // GEANT4 tag $Name: HEAD$26 // $Id: G4NeutronTrackingCut.cc,v 1.5 2008/09/17 18:19:15 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 28 28 // 29 29 //--------------------------------------------------------------------------- … … 47 47 G4NeutronTrackingCut::G4NeutronTrackingCut(const G4String& name, G4int ver) 48 48 : G4VPhysicsConstructor(name), verbose(ver), wasActivated(false) 49 {} 49 { 50 timeLimit = 10.*microsecond; 51 kineticEnergyLimit = 0.0; 52 } 50 53 51 54 G4NeutronTrackingCut::~G4NeutronTrackingCut() … … 53 56 if(wasActivated) 54 57 { 55 delete pNeutronKiller;58 delete pNeutronKiller; 56 59 } 57 60 } … … 59 62 void G4NeutronTrackingCut::ConstructParticle() 60 63 { 61 62 // G4cout << "G4NeutronTrackingCut::ConstructParticle" << G4endl;63 64 64 G4Neutron::NeutronDefinition(); 65 65 } … … 67 67 void G4NeutronTrackingCut::ConstructProcess() 68 68 { 69 G4double timeLimit =10*microsecond;70 // G4double kineticEnergylimit =1*keV;71 69 if(wasActivated) return; 72 70 wasActivated = true; 73 71 74 // Add Decay Process 72 // Add Process 73 75 74 pNeutronKiller = new G4NeutronKiller(); 76 75 G4ParticleDefinition * particle = G4Neutron::Neutron(); 77 76 G4ProcessManager * pmanager = particle->GetProcessManager(); 78 // if(verbose > 1) 79 G4cout << "### Adding Neutron tracking cut for " << particle->GetParticleName() << G4endl; 80 G4cout << "### cut value is " << timeLimit/microsecond << " microseconds" << G4endl; 81 pmanager -> AddDiscreteProcess(pNeutronKiller); 82 // pNeutronKiller->SetKinEnergyLimit(kineticEnergylimit); 83 pNeutronKiller->SetTimeLimit(timeLimit); 77 78 if(verbose > 0) { 79 G4cout << "### Adding tracking cuts for " << particle->GetParticleName() 80 << " TimeCut(ns)= " << timeLimit/ns 81 << " KinEnergyCut(MeV)= " << kineticEnergyLimit/MeV 82 << G4endl; 83 } 84 pmanager -> AddDiscreteProcess(pNeutronKiller); 85 pNeutronKiller->SetKinEnergyLimit(kineticEnergyLimit); 86 pNeutronKiller->SetTimeLimit(timeLimit); 84 87 } 85 88 -
trunk/source/physics_lists/builders/src/G4QGSBinaryNeutronBuilder.cc
r825 r921 33 33 { 34 34 theMin = 12*GeV; 35 theModel = new G4TheoFSGenerator ;35 theModel = new G4TheoFSGenerator("QGSB"); 36 36 37 37 theStringModel = new G4QGSModel< G4QGSParticipants >; -
trunk/source/physics_lists/builders/src/G4QGSBinaryPiKBuilder.cc
r825 r921 33 33 { 34 34 theMin = 12*GeV; 35 theModel = new G4TheoFSGenerator ;35 theModel = new G4TheoFSGenerator("QGSB"); 36 36 37 37 theStringModel = new G4QGSModel< G4QGSParticipants >; -
trunk/source/physics_lists/builders/src/G4QGSBinaryProtonBuilder.cc
r825 r921 33 33 { 34 34 theMin = 12*GeV; 35 theModel = new G4TheoFSGenerator ;35 theModel = new G4TheoFSGenerator("QGSB"); 36 36 37 37 theStringModel = new G4QGSModel< G4QGSParticipants >; -
trunk/source/physics_lists/builders/src/G4QGSCEflowNeutronBuilder.cc
r825 r921 33 33 { 34 34 theMin = 8*GeV; 35 theModel = new G4TheoFSGenerator ;35 theModel = new G4TheoFSGenerator("QGSCElow"); 36 36 37 37 theStringModel= new G4QGSModel< G4QGSParticipants >; -
trunk/source/physics_lists/builders/src/G4QGSCEflowPiKBuilder.cc
r825 r921 33 33 { 34 34 theMin = 8*GeV; 35 theModel = new G4TheoFSGenerator ;35 theModel = new G4TheoFSGenerator("QGSCEflow"); 36 36 37 37 theStringModel = new G4QGSModel< G4QGSParticipants >; -
trunk/source/physics_lists/builders/src/G4QGSCEflowProtonBuilder.cc
r825 r921 33 33 { 34 34 theMin = 8*GeV; 35 theModel = new G4TheoFSGenerator ;35 theModel = new G4TheoFSGenerator("QGSCEflow"); 36 36 37 37 theStringModel = new G4QGSModel< G4QGSParticipants >; -
trunk/source/physics_lists/builders/src/G4QGSCNeutronBuilder.cc
r825 r921 33 33 { 34 34 theMin = 8*GeV; 35 theModel = new G4TheoFSGenerator ;35 theModel = new G4TheoFSGenerator("QGSC"); 36 36 37 37 theStringModel= new G4QGSModel< G4QGSParticipants >; -
trunk/source/physics_lists/builders/src/G4QGSCPiKBuilder.cc
r825 r921 33 33 { 34 34 theMin = 8*GeV; 35 theModel = new G4TheoFSGenerator ;35 theModel = new G4TheoFSGenerator("QGSC"); 36 36 37 37 theStringModel = new G4QGSModel< G4QGSParticipants >; -
trunk/source/physics_lists/builders/src/G4QGSCProtonBuilder.cc
r825 r921 33 33 { 34 34 theMin = 8*GeV; 35 theModel = new G4TheoFSGenerator ;35 theModel = new G4TheoFSGenerator("QGSC"); 36 36 37 37 theStringModel = new G4QGSModel< G4QGSParticipants >; -
trunk/source/physics_lists/builders/src/G4QGSPNeutronBuilder.cc
r825 r921 33 33 { 34 34 theMin = 12*GeV; 35 theModel = new G4TheoFSGenerator ;35 theModel = new G4TheoFSGenerator("QGSP"); 36 36 37 37 theStringModel = new G4QGSModel< G4QGSParticipants >; -
trunk/source/physics_lists/builders/src/G4QGSPPiKBuilder.cc
r825 r921 33 33 { 34 34 theMin = 12*GeV; 35 theModel = new G4TheoFSGenerator ;35 theModel = new G4TheoFSGenerator("QGSP"); 36 36 37 37 theStringModel = new G4QGSModel< G4QGSParticipants >; -
trunk/source/physics_lists/builders/src/G4QGSPProtonBuilder.cc
r825 r921 33 33 { 34 34 theMin = 12*GeV; 35 theModel = new G4TheoFSGenerator ;35 theModel = new G4TheoFSGenerator("QGSP"); 36 36 37 37 theStringModel = new G4QGSModel< G4QGSParticipants >; -
trunk/source/physics_lists/lists/include/G4HadronInelasticQBBC.hh
r850 r921 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4HadronInelasticQBBC.hh,v 1. 5 2008/08/05 10:25:00vnivanch Exp $27 // GEANT4 tag $Name: HEAD$26 // $Id: G4HadronInelasticQBBC.hh,v 1.7 2008/09/24 18:10:51 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 28 28 // 29 29 //--------------------------------------------------------------------------- … … 102 102 G4PreCompoundModel* thePreEquilib; 103 103 G4QuasiElasticChannel* theQuasiElastic; 104 // G4GeneratorPrecompoundInterface* theCascade;104 G4GeneratorPrecompoundInterface* preCompound; 105 105 G4BinaryCascade* theCascade; 106 106 G4QStringChipsParticleLevelInterface * theCHIPSCascade; 107 107 G4QGSModel< G4QGSParticipants > * theQGStringModel; 108 108 G4ExcitedStringDecay* theQGStringDecay; 109 G4ExcitedStringDecay* theFTFStringDecay; 110 G4FTFModel* theFTFStringModel; 109 G4ExcitedStringDecay* theFTFBStringDecay; 110 G4ExcitedStringDecay* theFTFCStringDecay; 111 G4FTFModel* theFTFBStringModel; 112 G4FTFModel* theFTFCStringModel; 111 113 112 114 G4int verbose; -
trunk/source/physics_lists/lists/include/QBBC.icc
r850 r921 24 24 // ******************************************************************** 25 25 // 26 // $Id: QBBC.icc,v 1.1 2 2008/08/05 10:25:00vnivanch Exp $27 // GEANT4 tag $Name: HEAD$26 // $Id: QBBC.icc,v 1.16 2008/11/25 15:36:19 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 28 28 // 29 29 //--------------------------------------------------------------------------- … … 55 55 #include "G4HadronDElasticPhysics.hh" 56 56 #include "G4HadronHElasticPhysics.hh" 57 #include "G4ChargeExchangePhysics.hh" 57 58 #include "G4IonBinaryCascadePhysics.hh" 58 59 #include "G4IonPhysics.hh" … … 79 80 // Hadron Physics 80 81 if(type == "QBBC") { 81 this->RegisterPhysics( new G4HadronElasticPhysics(" hElastic",ver,false,true));82 this->RegisterPhysics( new G4HadronElasticPhysics("elastic",ver,false,false)); 82 83 this->RegisterPhysics( new G4QStoppingPhysics("stopping",ver)); 83 84 this->RegisterPhysics( new G4IonBinaryCascadePhysics("ionBIC")); 84 this->RegisterPhysics( new G4HadronInelasticQBBC("inelastic", ver, true,85 false, false, false, false));85 this->RegisterPhysics( new G4HadronInelasticQBBC("inelastic", ver, false, 86 true, false, false, false)); 86 87 87 } else if(type == "QBBCG") { 88 this->RegisterPhysics( new G4HadronElasticPhysics("hElastic",ver,false,true)); 88 } else if(type == "QBBBG") { 89 this->RegisterPhysics( new G4HadronElasticPhysics("elastic",ver,false,true)); 90 this->RegisterPhysics( new G4ChargeExchangePhysics(ver,true)); 89 91 this->RegisterPhysics( new G4QStoppingPhysics("stopping",ver)); 90 92 this->RegisterPhysics( new G4IonBinaryCascadePhysics("ionBIC")); … … 92 94 false, false, false, true)); 93 95 94 } else if(type == "QBBC_DEL") { 95 this->RegisterPhysics( new G4HadronDElasticPhysics(ver,false)); 96 } else if(type == "QBBCG") { 97 this->RegisterPhysics( new G4HadronElasticPhysics("elastic",ver,false,true)); 98 this->RegisterPhysics( new G4ChargeExchangePhysics(ver,true)); 96 99 this->RegisterPhysics( new G4QStoppingPhysics("stopping",ver)); 97 100 this->RegisterPhysics( new G4IonBinaryCascadePhysics("ionBIC")); 98 101 this->RegisterPhysics( new G4HadronInelasticQBBC("inelastic", ver, false, 102 true, false, false, true)); 103 104 } else if(type == "QBBCF") { 105 this->RegisterPhysics( new G4HadronElasticPhysics("elastic",ver,false,false)); 106 this->RegisterPhysics( new G4ChargeExchangePhysics(ver,false)); 107 this->RegisterPhysics( new G4QStoppingPhysics("stopping",ver)); 108 this->RegisterPhysics( new G4IonBinaryCascadePhysics("ionBIC")); 109 this->RegisterPhysics( new G4HadronInelasticQBBC("inelastic", ver, true, 99 110 true, false, false, false)); 100 111 101 } else if(type == "QBBC_H EL") {102 this->RegisterPhysics( new G4Hadron HElasticPhysics(ver,false));112 } else if(type == "QBBC_HP") { 113 this->RegisterPhysics( new G4HadronElasticPhysics("elastic",ver,true,false)); 103 114 this->RegisterPhysics( new G4QStoppingPhysics("stopping",ver)); 104 115 this->RegisterPhysics( new G4IonBinaryCascadePhysics("ionBIC")); 105 116 this->RegisterPhysics( new G4HadronInelasticQBBC("inelastic", ver, false, 106 true, false, false, false)); 107 108 } else if(type == "QBBC_HP") { 109 this->RegisterPhysics( new G4HadronElasticPhysics("hElastic",ver,true,true)); 110 this->RegisterPhysics( new G4QStoppingPhysics("stopping",ver)); 111 this->RegisterPhysics( new G4IonBinaryCascadePhysics("ionBIC")); 112 this->RegisterPhysics( new G4HadronInelasticQBBC("inelastic", ver, false, 113 false, false, true, false)); 117 true, false, true, false)); 114 118 115 119 } else { -
trunk/source/physics_lists/lists/src/G4HadronInelasticQBBC.cc
r850 r921 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4HadronInelasticQBBC.cc,v 1. 9 2008/08/05 10:25:00vnivanch Exp $27 // GEANT4 tag $Name: HEAD$26 // $Id: G4HadronInelasticQBBC.cc,v 1.15 2008/11/21 18:42:36 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 28 28 // 29 29 //--------------------------------------------------------------------------- … … 57 57 #include "G4QStringChipsParticleLevelInterface.hh" 58 58 #include "G4StringChipsInterface.hh" 59 #include "G4GeneratorPrecompoundInterface.hh" 59 60 #include "G4QGSMFragmentation.hh" 60 61 #include "G4LundStringFragmentation.hh" … … 78 79 chipsFlag(chips), hpFlag(hp), glFlag(glauber), wasActivated(false) 79 80 { 80 if(verbose > -1) G4cout << "### HadronInelasticQBBC" << G4endl; 81 // store = G4HadronProcessStore::Instance(); 81 if(verbose > 1) G4cout << "### HadronInelasticQBBC bertFlag= " << bertFlag <<G4endl; 82 82 theHPXSecI = 0; 83 83 theHPXSecC = 0; 84 84 theHPXSecF = 0; 85 85 theCascade = 0; 86 preCompound = 0; 86 87 theCHIPSCascade = 0; 87 88 theQuasiElastic = 0; 88 89 theQGStringDecay = 0; 89 90 theQGStringModel = 0; 90 theFTFStringDecay = 0; 91 theFTFStringModel = 0; 91 theFTFBStringDecay = 0; 92 theFTFBStringModel = 0; 93 theFTFCStringDecay = 0; 94 theFTFCStringModel = 0; 92 95 } 93 96 … … 95 98 { 96 99 delete theCascade; 100 delete preCompound; 97 101 delete theCHIPSCascade; 98 102 delete theQuasiElastic; 99 103 delete theQGStringDecay; 100 104 delete theQGStringModel; 101 delete theFTFStringDecay; 102 delete theFTFStringModel; 105 delete theFTFBStringDecay; 106 delete theFTFCStringDecay; 107 delete theFTFBStringModel; 108 delete theFTFCStringModel; 103 109 delete theHPXSecI; 104 110 delete theHPXSecC; … … 121 127 122 128 if(verbose > 1) 123 G4cout << "### HadronInelasticQBBC Construct Process" << G4endl; 124 125 G4double minEstring = 4.0*GeV; 126 G4double maxEcascade = 6.0*GeV; 127 // G4double minFtf = 7.5*GeV; 129 G4cout << "### HadronInelasticQBBC Construct Process" 130 << " ftfFlag= " << ftfFlag << " bertFlag= " << bertFlag 131 << G4endl; 132 133 G4double minEstring = 9.5*GeV; 134 G4double maxEcascade = 7.5*GeV; 135 G4double minFTF = 4.5*GeV; 136 G4double maxFTF = 25.*GeV; 128 137 129 138 //Binary … … 143 152 144 153 //QGS 145 theCascade = new G4BinaryCascade; 154 theCascade = new G4BinaryCascade(); 155 preCompound = new G4GeneratorPrecompoundInterface(); 156 146 157 theCHIPSCascade = new G4QStringChipsParticleLevelInterface; 147 G4TheoFSGenerator* theQGSModel = new G4TheoFSGenerator( );158 G4TheoFSGenerator* theQGSModel = new G4TheoFSGenerator("QGSP"); 148 159 theQGStringModel = new G4QGSModel< G4QGSParticipants >; 149 160 theQGStringDecay = new G4ExcitedStringDecay(new G4QGSMFragmentation()); 150 161 theQGStringModel->SetFragmentationModel(theQGStringDecay); 151 theQGSModel->SetTransport( theCHIPSCascade);152 153 theQuasiElastic = new G4QuasiElasticChannel ;162 theQGSModel->SetTransport(preCompound); 163 164 theQuasiElastic = new G4QuasiElasticChannel(); 154 165 theQGSModel->SetQuasiElasticChannel(theQuasiElastic); 155 166 theQGSModel->SetHighEnergyGenerator(theQGStringModel); … … 157 168 theQGSModel->SetMaxEnergy(100*TeV); 158 169 159 //FTF 160 G4TheoFSGenerator* theFTFModel = new G4TheoFSGenerator(); 161 theFTFStringModel = new G4FTFModel(); 162 theFTFStringDecay = new G4ExcitedStringDecay(new G4LundStringFragmentation()); 163 theFTFStringModel->SetFragmentationModel(theFTFStringDecay); 164 //theFTFModel->SetTransport(theCHIPSCascade); 165 theFTFModel->SetTransport(theCascade); 166 theFTFModel->SetHighEnergyGenerator(theFTFStringModel); 167 theFTFModel->SetMinEnergy(minEstring); 168 theFTFModel->SetMaxEnergy(100*TeV); 169 //theFTFModel->SetQuasiElasticChannel(theQuasiElastic); 170 //FTFB 171 G4TheoFSGenerator* theFTFBModel = new G4TheoFSGenerator("FTFP"); 172 theFTFBStringModel = new G4FTFModel(); 173 theFTFBStringDecay = new G4ExcitedStringDecay(new G4LundStringFragmentation()); 174 theFTFBStringModel->SetFragmentationModel(theFTFBStringDecay); 175 176 // theFTFBModel->SetTransport(theCascade); 177 theFTFBModel->SetTransport(preCompound); 178 theFTFBModel->SetHighEnergyGenerator(theFTFBStringModel); 179 theFTFBModel->SetMinEnergy(minFTF); 180 theFTFBModel->SetMaxEnergy(100*TeV); 181 182 //FTFP 183 G4TheoFSGenerator* theFTFCModel = new G4TheoFSGenerator("FTFP"); 184 theFTFCStringModel = new G4FTFModel(); 185 theFTFCStringDecay = new G4ExcitedStringDecay(new G4LundStringFragmentation()); 186 theFTFCStringModel->SetFragmentationModel(theFTFCStringDecay); 187 188 theFTFCModel->SetTransport(preCompound); 189 theFTFCModel->SetHighEnergyGenerator(theFTFCStringModel); 190 theFTFCModel->SetMinEnergy(minFTF); 191 theFTFCModel->SetMaxEnergy(maxFTF); 170 192 171 193 theParticleIterator->reset(); … … 205 227 hp->AddDataSet(&theXSecP); 206 228 207 if(ftfFlag) hp->RegisterMe(theFTFModel); 208 else hp->RegisterMe(theQGSModel); 229 hp->RegisterMe(theQGSModel); 230 hp->RegisterMe(theFTFCModel); 231 //if(ftfFlag) hp->RegisterMe(theFTFCModel); 232 //else hp->RegisterMe(theQGSModel); 209 233 210 234 if(bertFlag) hp->RegisterMe(theBERT); … … 216 240 } else if(pname == "neutron") { 217 241 hp->AddDataSet(&theXSecN); 218 if(ftfFlag) hp->RegisterMe(theFTFModel); 219 else hp->RegisterMe(theQGSModel); 242 hp->RegisterMe(theQGSModel); 243 hp->RegisterMe(theFTFCModel); 244 //if(ftfFlag) hp->RegisterMe(theFTFCModel); 245 //else hp->RegisterMe(theQGSModel); 220 246 221 247 G4HadronCaptureProcess* theNeutronCapture = … … 260 286 } else if(pname == "pi-" || pname == "pi+") { 261 287 hp->AddDataSet(&thePiCross); 262 if(ftfFlag) hp->RegisterMe(theFTFModel); 263 else hp->RegisterMe(theQGSModel); 288 hp->RegisterMe(theQGSModel); 289 hp->RegisterMe(theFTFCModel); 290 //if(ftfFlag) hp->RegisterMe(theFTFCModel); 291 //else hp->RegisterMe(theQGSModel); 264 292 265 293 hp->RegisterMe(theBERT); … … 274 302 pname == "kaon0S" || 275 303 pname == "kaon0L") { 276 hp->RegisterMe(theFTF Model);304 hp->RegisterMe(theFTFBModel); 277 305 hp->RegisterMe(theBERT); 278 306 //hp->AddDataSet(new G4UInelasticCrossSection(particle)); … … 284 312 pname == "xi0") { 285 313 286 hp->RegisterMe(theFTF Model);314 hp->RegisterMe(theFTFBModel); 287 315 hp->RegisterMe(theBERT); 288 316 //hp->AddDataSet(new G4UInelasticCrossSection(particle)); 289 317 290 318 } else if(pname == "anti_proton" || pname == "anti_neutron") { 291 hp->RegisterMe(theFTF Model);319 hp->RegisterMe(theFTFBModel); 292 320 hp->RegisterMe(theCHIPS); 293 321 //hp->AddDataSet(new G4UInelasticCrossSection(particle)); 294 322 295 323 } else { 296 hp->RegisterMe(theFTF Model);324 hp->RegisterMe(theFTFBModel); 297 325 hp->RegisterMe(theCHIPS); 298 326 //hp->AddDataSet(new G4UInelasticCrossSection(particle)); -
trunk/source/track/History
r850 r921 1 $Id: History,v 1.10 1 2008/02/05 01:46:57kurasige Exp $1 $Id: History,v 1.102 2008/10/24 08:22:20 kurasige Exp $ 2 2 ------------------------------------------------------------------- 3 3 … … 17 17 * Reverse chronological order (last date on top), please * 18 18 ---------------------------------------------------------- 19 Oct. 24, 2008 Hisaya Kurashige (track-V09-01-02) 20 - change fpCreatorProcess and fpLCAtVertex in G4Track to 'const' pointer 21 - change fpProcessDefinedStep in G4StepPoint to 'const' pointer 22 23 19 24 Feb. 5, 2008 Hisaya Kurashige (track-V09-01-01) 20 25 - reset non-ionizing energy loss in G4Step::ResetTotalEnergyDeposit -
trunk/source/track/include/G4StepPoint.hh
r850 r921 25 25 // 26 26 // 27 // $Id: G4StepPoint.hh,v 1.1 8 2007/03/11 07:19:06kurasige Exp $28 // GEANT4 tag $Name: HEAD$27 // $Id: G4StepPoint.hh,v 1.19 2008/10/24 08:22:20 kurasige Exp $ 28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 29 // 30 30 // … … 157 157 // If the pointer is 0, this means the Step is defined 158 158 // by the user defined limit in the current volume. 159 inline void SetProcessDefinedStep( G4VProcess* aValue);159 inline void SetProcessDefinedStep(const G4VProcess* aValue); 160 160 161 161 … … 206 206 G4StepStatus fStepStatus; 207 207 // DoIt type which defined the current Step. 208 G4VProcess* fpProcessDefinedStep;208 const G4VProcess* fpProcessDefinedStep; 209 209 // Process which defined the current Step. 210 210 G4double fMass; -
trunk/source/track/include/G4StepPoint.icc
r850 r921 25 25 // 26 26 // 27 // $Id: G4StepPoint.icc,v 1.1 3 2007/03/11 07:19:06kurasige Exp $28 // GEANT4 tag $Name: HEAD$27 // $Id: G4StepPoint.icc,v 1.14 2008/10/24 08:22:20 kurasige Exp $ 28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 29 // 30 30 // … … 173 173 // If the pointer is 0, this means the Step is defined 174 174 // by the user defined limit in the current volume. 175 inline void G4StepPoint::SetProcessDefinedStep( G4VProcess* aValue)175 inline void G4StepPoint::SetProcessDefinedStep(const G4VProcess* aValue) 176 176 { fpProcessDefinedStep = aValue; } 177 177 -
trunk/source/track/include/G4Track.hh
r850 r921 25 25 // 26 26 // 27 // $Id: G4Track.hh,v 1.1 8 2006/06/29 21:14:47 gunterExp $28 // GEANT4 tag $Name: HEAD$27 // $Id: G4Track.hh,v 1.19 2008/10/24 08:22:20 kurasige Exp $ 28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 29 // 30 30 // … … 217 217 void SetVertexKineticEnergy(const G4double aValue); 218 218 219 G4LogicalVolume* GetLogicalVolumeAtVertex() const;220 void SetLogicalVolumeAtVertex( G4LogicalVolume* );219 const G4LogicalVolume* GetLogicalVolumeAtVertex() const; 220 void SetLogicalVolumeAtVertex(const G4LogicalVolume* ); 221 221 222 222 const G4VProcess* GetCreatorProcess() const; 223 void SetCreatorProcess( G4VProcess* aValue);223 void SetCreatorProcess(const G4VProcess* aValue); 224 224 225 225 // track weight … … 273 273 G4ThreeVector fVtxMomentumDirection; // Momentum direction at the vertex 274 274 G4double fVtxKineticEnergy; // Kinetic energy at the vertex 275 G4LogicalVolume* fpLVAtVertex;//Logical Volume at the vertex276 G4VProcess* fpCreatorProcess;// Process which created the track275 const G4LogicalVolume* fpLVAtVertex; //Logical Volume at the vertex 276 const G4VProcess* fpCreatorProcess; // Process which created the track 277 277 278 278 G4VUserTrackInformation* fpUserInformation; -
trunk/source/track/include/G4Track.icc
r850 r921 25 25 // 26 26 // 27 // $Id: G4Track.icc,v 1.1 5 2007/10/02 00:46:21kurasige Exp $28 // GEANT4 tag $Name: HEAD$27 // $Id: G4Track.icc,v 1.16 2008/10/24 08:22:20 kurasige Exp $ 28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 29 // 30 30 //----------------------------------------------------------------- … … 247 247 { fVtxKineticEnergy = aValue; } 248 248 249 inline G4LogicalVolume* G4Track::GetLogicalVolumeAtVertex() const249 inline const G4LogicalVolume* G4Track::GetLogicalVolumeAtVertex() const 250 250 { return fpLVAtVertex; } 251 251 252 inline void G4Track::SetLogicalVolumeAtVertex( G4LogicalVolume* aValue)252 inline void G4Track::SetLogicalVolumeAtVertex(const G4LogicalVolume* aValue) 253 253 { fpLVAtVertex = aValue; } 254 254 … … 259 259 // 0, it points to the process which created this track. 260 260 261 inline void G4Track::SetCreatorProcess( G4VProcess* aValue)261 inline void G4Track::SetCreatorProcess(const G4VProcess* aValue) 262 262 { fpCreatorProcess = aValue; } 263 263 -
trunk/source/tracking/History
r850 r921 1 $Id: History,v 1.12 2 2008/05/06 12:52:48tsasaki Exp $2 $Name: HEAD$1 $Id: History,v 1.125 2008/10/02 01:08:23 tsasaki Exp $ 2 $Name: geant4-09-02-cand-01 $ 3 3 ------------------------------------------------------------------- 4 4 … … 18 18 * Reverse chronological order (last date on top), please * 19 19 ---------------------------------------------------------- 20 02 Oct 2008 T.Sasaki (tracking-V09-01-03) 21 - G4SteppingManager2.cc: PhyscalStep etc was not updated when 22 any flaga for ForceCondition is set. (since begining of Geant4) 23 24 25 Sep 2008 T.Sasaki (tracking-V09-01-02) 25 - G4SteppingManager2.cc: Bug fix for the previous tag 26 27 24 Sep 2008 T.Sasaki (tracking-V09-01-01) 28 - G4SteppingManager2.cc: Bug fix for PhysicalStep 20 29 21 30 06 May 2008 T.Sasaki (tracking-V09-01-00) -
trunk/source/visualization/GNUmakefile
r919 r921 43 43 44 44 ifdef G4VIS_BUILD_OPENGL_DRIVER 45 SUBDIRS += externals/gl2ps 45 46 SUBDIRS += OpenGL 46 47 SUBLIBS += G4OpenGL 47 SUBDIRS += externals/gl2ps48 SUBLIBS += G4gl2ps49 48 endif 50 49 ifdef G4VIS_BUILD_OI_DRIVER 50 SUBDIRS += externals/gl2ps 51 51 SUBDIRS += OpenInventor 52 52 SUBLIBS += G4OpenInventor 53 SUBDIRS += externals/gl2ps54 SUBLIBS += G4gl2ps55 53 endif 56 54 endif #G4VIS_BUILD -
trunk/source/visualization/OpenGL/GNUmakefile
r916 r921 22 22 23 23 CPPFLAGS += -DG4DEBUG_VIS_OGL 24 25 ifdef G4VIS_BUILD_OPENGL_DRIVER 26 CPPFLAGS += -I$(G4BASE)/visualization/externals/gl2ps/include 27 endif 28 ifdef G4VIS_BUILD_OI_DRIVER 29 CPPFLAGS += -I$(G4BASE)/visualization/externals/gl2ps/include 30 endif 24 31 CPPFLAGS += -I$(G4BASE)/visualization/management/include 25 32 CPPFLAGS += -I$(G4BASE)/visualization/modeling/include … … 35 42 CPPFLAGS += -I$(G4BASE)/digits_hits/hits/include 36 43 44 INTYLIBS += -L$(G4LIBDIR) -lG4gl2ps 45 37 46 include $(G4INSTALL)/config/moc.gmk 38 47 include $(G4INSTALL)/config/common.gmk -
trunk/source/visualization/OpenGL/include/G4OpenGLViewer.hh
r918 r921 38 38 39 39 #include "G4VViewer.hh" 40 #include <GL/gl.h>40 #include "G4OpenGL2PSAction.hh" 41 41 42 42 class G4OpenGLSceneHandler; … … 108 108 fDisplayLightFrontT; 109 109 G4double fDisplayLightFrontRed, fDisplayLightFrontGreen, fDisplayLightFrontBlue; 110 G4OpenGL2PSAction* fGL2PSAction; 110 111 111 112 private : -
trunk/source/visualization/OpenGL/src/G4OpenGLViewer.cc
r918 r921 48 48 #include "G4AttHolder.hh" 49 49 #include "G4AttCheck.hh" 50 51 #include "Geant4_gl2ps.h"52 50 53 51 #include <sstream> … … 118 116 fWinSize_x = fVP.GetWindowSizeHintX(); 119 117 fWinSize_y = fVP.GetWindowSizeHintY(); 118 119 fGL2PSAction = new G4OpenGL2PSAction(); 120 120 121 121 // glClearColor (0.0, 0.0, 0.0, 0.0); … … 883 883 884 884 // fGL2PSAction->enableFileWriting(); 885 886 887 ////////////// 888 if (!fGL2PSAction) return; 889 890 fGL2PSAction->setFileName("gl2psTest.ps"); 891 G4cout << "Produce " << aFile << "..." << G4endl; 892 if (fGL2PSAction->enableFileWriting()) { 893 DrawView(); 894 fGL2PSAction->disableFileWriting(); 895 } 896 ////////////// 897 885 898 FILE *fFile = fopen(aFile,"w"); 886 899 if(!fFile) { … … 930 943 15, 20, 10, buffsize, fFile, aFile); 931 944 DrawView(); 945 #ifdef G4DEBUG_VIS_OGL 946 printf("into While............\n"); 947 #endif 932 948 res = gl2psEndPage(); 933 949 } -
trunk/source/visualization/OpenInventor/GNUmakefile
r529 r921 18 18 include $(G4INSTALL)/config/interactivity.gmk 19 19 20 ifdef G4VIS_BUILD_OPENGL_DRIVER 21 CPPFLAGS += -I$(G4BASE)/visualization/externals/gl2ps/include 22 endif 23 ifdef G4VIS_BUILD_OI_DRIVER 24 CPPFLAGS += -I$(G4BASE)/visualization/externals/gl2ps/include 25 endif 26 20 27 CPPFLAGS += -I$(G4BASE)/visualization/management/include 21 28 CPPFLAGS += -I$(G4BASE)/visualization/modeling/include … … 33 40 CPPFLAGS += -I$(G4BASE)/digits_hits/hits/include 34 41 42 INTYLIBS += -L$(G4LIBDIR) -lG4gl2ps 43 35 44 include $(G4INSTALL)/config/common.gmk 36 45 -
trunk/source/visualization/OpenInventor/include/HEPVis/actions/SoGL2PSAction.h
r529 r921 28 28 29 29 #include <Inventor/actions/SoGLRenderAction.h> 30 #include "G4OpenGL2PSAction.hh" 30 31 31 32 /** … … 37 38 #define SoGL2PSAction Geant4_SoGL2PSAction 38 39 39 class SoGL2PSAction : public SoGLRenderAction {40 class SoGL2PSAction : public SoGLRenderAction, public G4OpenGL2PSAction { 40 41 SO_ACTION_HEADER(SoGL2PSAction); 41 42 public: 42 43 SoGL2PSAction(const SbViewportRegion&); 43 void setFileName(const char*);44 void enableFileWriting();45 void disableFileWriting();46 SbBool fileWritingEnabled() const;47 SbBool addBitmap(int,int,float=0,float=0,float=0,float=0);48 void beginViewport();49 void endViewport();50 44 public: /*SoINTERNAL*/ 51 45 static void initClass(); 52 46 protected: 53 47 virtual void beginTraversal(SoNode*); 54 private: 55 void gl2psBegin(); 56 private: 57 SbString fFileName; 58 FILE* fFile; 48 void setViewport(); 59 49 }; 60 50 -
trunk/source/visualization/OpenInventor/src/G4OpenInventorViewer.cc
r850 r921 50 50 #include "G4Scene.hh" 51 51 #include "Geant4_SoPolyhedron.h" 52 #include "G4AttValue.hh" 53 #include "G4AttDef.hh" 52 #include "G4AttValue.hh"#include "G4AttDef.hh" 54 53 #include "G4AttCheck.hh" 55 54 #include "G4AttHolder.hh" … … 480 479 fGL2PSAction->setFileName(aFile.c_str()); 481 480 G4cout << "Produce " << aFile << "..." << G4endl; 482 fGL2PSAction->enableFileWriting(); 483 ViewerRender(); 484 fGL2PSAction->disableFileWriting(); 481 if (fGL2PSAction->enableFileWriting()) { 482 ViewerRender(); 483 fGL2PSAction->disableFileWriting(); 484 } 485 485 } 486 486 -
trunk/source/visualization/OpenInventor/src/SoGL2PSAction.cc
r529 r921 33 33 /*--------------------------------------------------------------------------*/ 34 34 35 35 36 // this : 36 37 #include <HEPVis/actions/SoGL2PSAction.h> … … 40 41 #include <Inventor/errors/SoDebugError.h> 41 42 42 #include "Geant4_gl2ps.h"43 //#include "Geant4_gl2ps.h" 43 44 44 45 #include <stdio.h> … … 58 59 ) 59 60 :SoGLRenderAction(aViewPortRegion) 60 ,fFileName("out.ps") 61 ,fFile(0) 61 ,G4OpenGL2PSAction() 62 62 ////////////////////////////////////////////////////////////////////////////// 63 63 //!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!// 64 64 { 65 setFileName("out.ps"); 65 66 SO_ACTION_CONSTRUCTOR(SoGL2PSAction); 66 67 } 67 68 ////////////////////////////////////////////////////////////////////////////// 68 void SoGL2PSAction::setFileName( 69 const char* aFileName 69 void SoGL2PSAction::setViewport( 70 70 ) 71 71 ////////////////////////////////////////////////////////////////////////////// 72 72 //!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!// 73 73 { 74 fFileName = aFileName; 75 } 76 ////////////////////////////////////////////////////////////////////////////// 77 void SoGL2PSAction::enableFileWriting( 78 ) 79 ////////////////////////////////////////////////////////////////////////////// 80 //!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!// 81 { 82 fFile = ::fopen(fFileName.getString(),"w"); 83 if(!fFile) { 84 SoDebugError::post("SoGL2PSAction::enableFileWriting", 85 "Cannot open file %s",fFileName.getString()); 86 return; 87 } 74 // FIXME Useful ?? 75 88 76 #ifdef __COIN__ 89 77 #else //SGI 90 78 const SbViewportRegion& vpr = getViewportRegion(); 91 79 SoViewportRegionElement::set(getState(),vpr); 92 gl2psBegin(); 80 81 const SbVec2s& win = vpr.getWindowSize(); 82 fViewport[0] = 0; 83 fViewport[1] = 0; 84 fViewport[2] = win[0]; 85 fViewport[3] = win[1]; 93 86 #endif 94 }95 //////////////////////////////////////////////////////////////////////////////96 void SoGL2PSAction::disableFileWriting(97 )98 //////////////////////////////////////////////////////////////////////////////99 //!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!//100 {101 #ifdef __COIN__102 #else //SGI103 gl2psEndPage();104 #endif105 ::fclose(fFile);106 fFile = 0;107 }108 //////////////////////////////////////////////////////////////////////////////109 SbBool SoGL2PSAction::fileWritingEnabled(110 ) const111 //////////////////////////////////////////////////////////////////////////////112 //!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!//113 {114 return (fFile?TRUE:FALSE);115 }116 //////////////////////////////////////////////////////////////////////////////117 SbBool SoGL2PSAction::addBitmap(118 int aWidth119 ,int aHeight120 ,float aXorig121 ,float aYorig122 ,float aXmove123 ,float aYmove124 )125 /////////////////////////////////////////////////////////////////////////////126 //!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!//127 {128 if(!fFile) return FALSE;129 GLboolean valid;130 glGetBooleanv(GL_CURRENT_RASTER_POSITION_VALID,&valid);131 if(valid==GL_FALSE) return FALSE;132 float pos[4];133 glGetFloatv(GL_CURRENT_RASTER_POSITION,pos);134 int xoff = -(int)(aXmove + aXorig);135 int yoff = -(int)(aYmove + aYorig);136 int x = (int)(pos[0] + xoff);137 int y = (int)(pos[1] + yoff);138 // Should clip against viewport area :139 GLint vp[4];140 glGetIntegerv(GL_VIEWPORT,vp);141 GLsizei w = aWidth;142 GLsizei h = aHeight;143 if(x+w>(vp[0]+vp[2])) w = vp[0]+vp[2]-x;144 if(y+h>(vp[1]+vp[3])) h = vp[1]+vp[3]-y;145 int s = 3 * w * h;146 if(s<=0) return FALSE;147 float* image = (float*)::malloc(s * sizeof(float));148 if(!image) return FALSE;149 glReadPixels(x,y,w,h,GL_RGB,GL_FLOAT,image);150 GLint status = gl2psDrawPixels(w,h,xoff,yoff,GL_RGB,GL_FLOAT,image);151 ::free(image);152 return (status!=GL2PS_SUCCESS ? FALSE : TRUE);153 }154 //////////////////////////////////////////////////////////////////////////////155 void SoGL2PSAction::beginViewport(156 )157 /////////////////////////////////////////////////////////////////////////////158 //!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!//159 {160 if(!fFile) return;161 GLint vp[4];162 glGetIntegerv(GL_VIEWPORT,vp);163 gl2psBeginViewport(vp);164 }165 //////////////////////////////////////////////////////////////////////////////166 void SoGL2PSAction::endViewport(167 )168 /////////////////////////////////////////////////////////////////////////////169 //!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!//170 {171 if(!fFile) return;172 gl2psEndViewport();173 87 } 174 88 ////////////////////////////////////////////////////////////////////////////// … … 183 97 const SbViewportRegion& vpr = getViewportRegion(); 184 98 SoViewportRegionElement::set(getState(),vpr); 185 gl2psBegin();99 Geant4_gl2psBegin(); 186 100 traverse(aNode); 187 gl2psEndPage();101 Geant4_gl2psEndPage(); 188 102 #else //SGI 189 103 SoGLRenderAction::beginTraversal(aNode); … … 193 107 } 194 108 } 195 //////////////////////////////////////////////////////////////////////////////196 void SoGL2PSAction::gl2psBegin(197 )198 //////////////////////////////////////////////////////////////////////////////199 //!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!//200 {201 if(!fFile) return;202 int options = GL2PS_OCCLUSION_CULL |203 GL2PS_BEST_ROOT | GL2PS_SILENT | GL2PS_DRAW_BACKGROUND;204 int sort = GL2PS_BSP_SORT;205 //int sort = GL2PS_SIMPLE_SORT;206 207 const SbViewportRegion& vpr = getViewportRegion();208 SoViewportRegionElement::set(getState(),vpr);209 210 const SbVec2s& win = vpr.getWindowSize();211 GLint vp[4];212 vp[0] = 0;213 vp[1] = 0;214 vp[2] = win[0];215 vp[3] = win[1];216 217 int bufsize = 0;218 gl2psBeginPage("title","HEPVis::SoGL2PSAction",219 vp,220 GL2PS_EPS,221 sort,222 options,223 GL_RGBA,0, NULL,0,0,0,224 bufsize,225 fFile,fFileName.getString());226 }227 109 228 110 #endif
Note:
See TracChangeset
for help on using the changeset viewer.
