Import Geant4 1.1.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-08 15:34:16 +02:00
parent ca1c8cb059
commit 103bda00c8
2654 changed files with 29719 additions and 20203 deletions
+22 -16
View File
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4BuildGeom.cc,v 1.9 1999/12/05 17:50:11 gcosmo Exp $
// GEANT4 tag $Name: geant4-01-00 $
// $Id: G4BuildGeom.cc,v 1.12 1999/12/15 14:49:43 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
//
// modified by I. Hrivnacova, 13.10.99
@@ -14,6 +14,7 @@
#include "g4std/fstream"
#include "globals.hh"
#include "G3toG4.hh"
#include "G3toG4Debug.hh"
#include "G3MatTable.hh"
#include "G3MedTable.hh"
#include "G3RotTable.hh"
@@ -27,7 +28,7 @@
#include "G4PVPlacement.hh"
#include "G4VisAttributes.hh"
extern ofstream ofile;
extern G4std::ofstream ofile;
void G3CLRead(G4String &, char *);
void checkVol(G4LogicalVolume*, G4int);
@@ -39,11 +40,11 @@ G4LogicalVolume* G4BuildGeom(G4String& inFile){
G4int irot=0;
G4gsrotm(0, 90, 0, 90, 90, 0, 0);
G4cout << "Instantiated unit rotation matrix irot=" << irot << endl;
G4cout << "Instantiated unit rotation matrix irot=" << irot << G4endl;
// Read the call List and interpret to Generate Geant4 geometry
G4cout << "Reading the call List file " << inFile << "..." << endl;
G4cout << "Reading the call List file " << inFile << "..." << G4endl;
G3CLRead(inFile, NULL);
@@ -52,12 +53,13 @@ G4LogicalVolume* G4BuildGeom(G4String& inFile){
G3Det.PrintAll();
G3Vol.PrintAll();
G4cout << "Call List file read completed. Build geometry" << endl;
G4cout << "Call List file read completed. Build geometry" << G4endl;
// Build the geometry
G3VolTableEntry* topVTE = G3Vol.GetFirstVTE();
G4cout << "G3toG4 top level volume is " << topVTE->GetName() << endl;
G4cout << "G3toG4 top level volume is " << topVTE->GetName() << G4endl;
// modified
G3toG4BuildTree(topVTE, 0);
@@ -76,14 +78,12 @@ G4LogicalVolume* G4BuildGeom(G4String& inFile){
topLV->SetVisAttributes(G4VisAttributes::Invisible);
G4cout << "Top-level G3toG4 logical volume " << topLV->GetName() << " "
<< *(topLV->GetVisAttributes()) << endl;
<< *(topLV->GetVisAttributes()) << G4endl;
// check the geometry here
G4int debug=0;
if (debug){
G4cout << "scan through G4LogicalVolumeStore:" << endl;
if (G3toG4Debug() != 0){
G4cout << "scan through G4LogicalVolumeStore:" << G4endl;
checkVol();
}
return topLV;
@@ -106,13 +106,13 @@ void checkVol(G4LogicalVolume* _lvol, G4int level)
G4int ndau = _lvol -> GetNoDaughters();
G4cout << "G44LogicalVolume " << _lvol->GetName() << " at level " << level
<< " contains " << ndau << " daughters." << endl;
<< " contains " << ndau << " daughters." << G4endl;
for (int idau=0; idau<ndau; idau++){
_pdvol = _lvol-> GetDaughter(idau);
_ldvol = _pdvol -> GetLogicalVolume();
G4cout << "G4VPhysical volume " << setw(5) << _pdvol -> GetName()
<< " (G4LogicalVolume " << setw(5) << _ldvol->GetName() << ")"
<< endl;
G4cout << "G4VPhysical volume " << G4std::setw(5) << _pdvol -> GetName()
<< " (G4LogicalVolume " << G4std::setw(5) << _ldvol->GetName() << ")"
<< G4endl;
checkVol(_ldvol, level);
}
return;
@@ -122,3 +122,9 @@ void checkVol(G4LogicalVolume* _lvol, G4int level)