Import Geant4 8.0.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-09 14:36:02 +02:00
parent d93e1e39a9
commit 8a51e0bc40
5471 changed files with 99628 additions and 55248 deletions
+1 -1
View File
@@ -22,7 +22,7 @@
//
//
// $Id: G4ASCIITree.cc,v 1.9 2005/06/02 17:43:46 allison Exp $
// GEANT4 tag $Name: geant4-07-01 $
// GEANT4 tag $Name: geant4-08-00 $
//
//
// John Allison 5th April 2001
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4ASCIITreeMessenger.cc,v 1.13 2005/05/06 08:38:36 allison Exp $
// GEANT4 tag $Name: geant4-07-01 $
// $Id: G4ASCIITreeMessenger.cc,v 1.15 2005/11/22 16:21:26 allison Exp $
// GEANT4 tag $Name: geant4-08-00 $
//
//
// John Allison 5th April 2001
@@ -53,31 +53,36 @@ G4ASCIITreeMessenger::G4ASCIITreeMessenger
fpCommandVerbose = new G4UIcmdWithAnInteger ("/vis/ASCIITree/verbose", this);
fVerbosityGuidance.push_back
("< 10: - does not print daughters of repeated placements,"
(" < 10: - does not print daughters of repeated placements,"
" does not repeat replicas.");
fVerbosityGuidance.push_back
(">= 10: prints all physical volumes.");
(" >= 10: prints all physical volumes.");
fVerbosityGuidance.push_back
("The level of detail is given by the units (verbosity%10):");
("The level of detail is given by verbosity%10:");
fVerbosityGuidance.push_back
(">= 0: prints physical volume name.");
("for each volume:");
fVerbosityGuidance.push_back
(">= 1: prints logical volume name (and names of sensitive detector"
(" >= 0: physical volume name.");
fVerbosityGuidance.push_back
(" >= 1: logical volume name (and names of sensitive detector"
" and readout geometry, if any).");
fVerbosityGuidance.push_back
(">= 2: prints solid name and type.");
(" >= 2: solid name and type.");
fVerbosityGuidance.push_back
(">= 3: prints volume and density.");
(" >= 3: volume and density.");
fVerbosityGuidance.push_back
(">= 4: prints mass of each top physical volume in scene to depth specified.");
(" >= 5: daughter-subtracted volume and mass.");
fVerbosityGuidance.push_back
(">= 5: prints mass of branch at each volume (can be time consuming).");
("and in the summary at the end of printing:");
fVerbosityGuidance.push_back
(" >= 4: daughter-included mass of top physical volume(s) in scene"
" to depth specified.");
fVerbosityGuidance.push_back
("Note: by default, culling is switched off so all volumes are seen.");
fVerbosityGuidance.push_back
("Note: the mass calculation takes into account daughters, normally"
" to unlimited depth, which can be time consuuming. If you want the"
" mass of a particular subtree to a particular depth:");
("Note: the mass calculation takes into account daughters, which can be"
" time consuming. If you want the mass of a particular subtree to a"
" particular depth:");
fVerbosityGuidance.push_back
(" /vis/open ATree");
fVerbosityGuidance.push_back
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4ASCIITreeSceneHandler.cc,v 1.20 2005/05/06 08:38:36 allison Exp $
// GEANT4 tag $Name: geant4-07-01 $
// $Id: G4ASCIITreeSceneHandler.cc,v 1.22 2005/11/22 16:21:26 allison Exp $
// GEANT4 tag $Name: geant4-08-00 $
//
//
// John Allison 5th April 2001
@@ -100,7 +100,7 @@ void G4ASCIITreeSceneHandler::WriteHeader (std::ostream& os)
if (detail >= 1) os << " / LV (SD,RO)";
if (detail >= 2) os << " / Solid(type)";
if (detail >= 3) os << ", volume, density";
if (detail >= 5) os << ", mass of branch";
if (detail >= 5) os << ", daughter-subtracted volume and mass";
os <<
"\n# Abbreviations: PV = Physical Volume, LV = Logical Volume,"
"\n# SD = Sensitive Detector, RO = Read Out Geometry.";
@@ -134,9 +134,11 @@ void G4ASCIITreeSceneHandler::EndModeling () {
<< pvModel->GetTopPhysicalVolume()->GetCopyNo()
<< ", is "
<< G4BestUnit (volume, "Volume")
<< "\nMass of tree";
<< " and the daughter-included mass";
G4int requestedDepth = pvModel->GetRequestedDepth();
if (requestedDepth != G4PhysicalVolumeModel::UNLIMITED) {
if (requestedDepth == G4PhysicalVolumeModel::UNLIMITED) {
G4cout << " to unlimited depth";
} else {
G4cout << ", ignoring daughters at depth "
<< requestedDepth
<< " and below,";
@@ -257,10 +259,17 @@ void G4ASCIITreeSceneHandler::RequestPrimitives(const G4VSolid& solid) {
}
if (detail >= 5) {
G4double daughter_subtracted_mass = fpCurrentLV->GetMass
(fpCurrentPV->IsParameterised(), // Force if parametrised.
false, // Do not propagate - calculate for this volume minus
// volume of daughters.
fpCurrentMaterial);
G4double daughter_subtracted_volume =
daughter_subtracted_mass / fpCurrentMaterial->GetDensity();
*fpOutFile << ", "
<< G4BestUnit
(fpCurrentLV->GetMass(fpCurrentPV->IsParameterised(), // Force if so.
fpCurrentMaterial),"Mass");
<< G4BestUnit(daughter_subtracted_volume,"Volume")
<< ", "
<< G4BestUnit(daughter_subtracted_mass,"Mass");
}
if (fLVSet.find(fpCurrentLV) == fLVSet.end()) {
@@ -21,14 +21,11 @@
// ********************************************************************
//
//
// $Id: G4ASCIITreeViewer.cc,v 1.6 2003/06/16 17:13:50 gunter Exp $
// GEANT4 tag $Name: geant4-07-01 $
// $Id: G4ASCIITreeViewer.cc,v 1.7 2005/10/13 17:39:21 allison Exp $
// GEANT4 tag $Name: geant4-08-00 $
#include "G4ASCIITreeViewer.hh"
#include "G4ios.hh"
#include <strstream>
G4ASCIITreeViewer::G4ASCIITreeViewer
(G4VSceneHandler& sceneHandler, const G4String& name):
G4VTreeViewer(sceneHandler, name) {
@@ -24,7 +24,7 @@
// A scene handler to dump geometry hierarchy to GAG.
#include "G4Types.hh"
#include <strstream>
#include <sstream>
#include "G4GAGTreeSceneHandler.hh"
@@ -159,9 +159,7 @@ void G4GAGTreeSceneHandler::RequestPrimitives (const G4VSolid&)
// Add the extension ".details.index" to the current PV node
// Step 1: Initialize the extension
const int CHAR_LENGTH = 1024;
char pv_ext [CHAR_LENGTH]; pv_ext[0] = '\0';
std::ostrstream ost (pv_ext, CHAR_LENGTH);
std::ostringstream ost;
// Step 2: Generate the extension
// copy number
@@ -176,10 +174,10 @@ void G4GAGTreeSceneHandler::RequestPrimitives (const G4VSolid&)
ost << "." << fpCurrentLV->GetSolid()->GetEntityType() ;
}
// Tree index (0 for the world)
ost << "." << fPVCounter << '\0' ;
ost << "." << fPVCounter;
// Step 3: Add the extention to the current PV name
cur_pv_name += pv_ext ;
cur_pv_name += ost.str() ;
// End of adding extension
@@ -25,9 +25,6 @@
#include "G4GAGTreeViewer.hh"
#include "G4ios.hh"
#include <strstream>
G4GAGTreeViewer::G4GAGTreeViewer
(G4VSceneHandler& sceneHandler, const G4String& name):
G4VTreeViewer(sceneHandler, name) {
+1 -1
View File
@@ -22,7 +22,7 @@
//
//
// $Id: G4VTree.cc,v 1.4 2001/07/11 10:09:08 gunter Exp $
// GEANT4 tag $Name: geant4-07-01 $
// GEANT4 tag $Name: geant4-08-00 $
//
//
// John Allison 5th April 2001
@@ -22,7 +22,7 @@
//
//
// $Id: G4VTreeSceneHandler.cc,v 1.9 2005/06/02 17:43:47 allison Exp $
// GEANT4 tag $Name: geant4-07-01 $
// GEANT4 tag $Name: geant4-08-00 $
//
//
// John Allison 5th April 2001
@@ -21,14 +21,11 @@
// ********************************************************************
//
//
// $Id: G4VTreeViewer.cc,v 1.5 2003/06/16 17:13:53 gunter Exp $
// GEANT4 tag $Name: geant4-07-01 $
// $Id: G4VTreeViewer.cc,v 1.6 2005/10/13 17:39:21 allison Exp $
// GEANT4 tag $Name: geant4-08-00 $
#include "G4VTreeViewer.hh"
#include "G4ios.hh"
#include <strstream>
#include "G4VSceneHandler.hh"
G4VTreeViewer::G4VTreeViewer