Import Geant4 9.4.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-09 16:25:56 +02:00
parent 74cad5e589
commit 89a9605df1
4440 changed files with 379508 additions and 189225 deletions
+21 -1
View File
@@ -1,4 +1,4 @@
$Id: History,v 1.10 2005/11/15 14:15:25 gcosmo Exp $
$Id: History,v 1.19 2010/11/16 14:36:24 gcosmo Exp $
-------------------------------------------------------------------
=========================================================
@@ -17,6 +17,26 @@ committal in the CVS repository !
* Reverse chronological order (last date on top), please *
----------------------------------------------------------
November 16th, 2010 G.Cosmo - olapex-V09-03-04
- Fixed uninitialised data in OlapInfo, causing undefined behavior.
- OlapDetConstr: moved printout for no daughter in world to cout.
November 9th, 2010 G.Folger - olapex-V09-03-03
- Added simple batch.mac to use in testing.
October 27th, 2010 G.Cosmo - olapex-V09-03-02
- Set primary-generator action after physics-list to run-manager.
- Fixed compilation warnings for unused parameters.
August 24th, 2010 G.Cosmo - olapex-V09-03-01
- Fixed compilation error for setting of kRadTolerance.
August 16th, 2010 H.Kurashige
- Removed inclusion of G4ParticleWithCuts header.
May 12th, 2010 J.Allison - olapex-V09-03-00
- Introduced G4UIExecutive.
November 15th, 2005 G.Cosmo - olapex-V07-01-00
- migration to <sstream> from deprecated <strstream>.
@@ -0,0 +1,2 @@
/olap/grid 17 17 17
/olap/trigger
@@ -24,8 +24,8 @@
// ********************************************************************
//
//
// $Id: OlapEventAction.hh,v 1.3 2006/06/29 17:22:02 gunter Exp $
// GEANT4 tag $Name: geant4-09-02 $
// $Id: OlapEventAction.hh,v 1.6 2010/11/16 14:34:30 gcosmo Exp $
// GEANT4 tag $Name: geant4-09-04 $
//
//
// --------------------------------------------------------------
@@ -57,9 +57,9 @@ public:
G4ThreeVector & p1,
G4ThreeVector & p2,
G4int a=0,
G4LogicalVolume* original=0) :
hist1(h1), hist2(h2), v1(p1), v2(p2),axis(a)
{};
G4LogicalVolume* original=0)
: hist1(h1), hist2(h2), v1(p1), v2(p2),axis(a),
info(""), probNot(false), originalMother(original) {}
~OlapInfo();
@@ -72,7 +72,7 @@ public:
std::vector<OlapStepInfo *> stAB;
std::vector<OlapStepInfo *> stBA;
G4String info;
G4int probNot ;
G4bool probNot ;
G4LogicalVolume* originalMother;
};
@@ -24,8 +24,8 @@
// ********************************************************************
//
//
// $Id: OlapManager.hh,v 1.4 2006/06/29 17:22:08 gunter Exp $
// GEANT4 tag $Name: geant4-09-02 $
// $Id: OlapManager.hh,v 1.5 2010/10/27 10:25:26 gcosmo Exp $
// GEANT4 tag $Name: geant4-09-04 $
//
//
// --------------------------------------------------------------
@@ -88,7 +88,7 @@ public:
void registerNotification(OlapNotify*n) { theNotifs.insert(n); }
void notifyNewWorld(G4LogicalVolume*);
void notifyOlaps(const std::vector<OlapInfo*> &);
void deRegisterNotification(OlapNotify*n) { ; }
void deRegisterNotification(OlapNotify*) { ; }
// FIXME: handle completly different in next redesign!
std::map<G4LogicalVolume *, G4bool> NoOlapMap;
+31 -34
View File
@@ -24,8 +24,8 @@
// ********************************************************************
//
//
// $Id: olapex.cc,v 1.3 2006/06/29 17:21:55 gunter Exp $
// GEANT4 tag $Name: geant4-09-02 $
// $Id: olapex.cc,v 1.5 2010/10/27 10:40:21 gcosmo Exp $
// GEANT4 tag $Name: geant4-09-04 $
//
//
// --------------------------------------------------------------
@@ -40,8 +40,6 @@
// Geant4
#include "G4RunManager.hh"
#include "G4UIterminal.hh"
#include "G4UItcsh.hh"
// this module
#include "OlapGenerator.hh"
@@ -57,6 +55,10 @@
#include "G4VisExecutive.hh"
#endif
#ifdef G4UI_USE
#include "G4UIExecutive.hh"
#endif
#ifdef debug
#include "G4LogicalVolumeStore.hh"
#include "G4PhysicalVolumeStore.hh"
@@ -68,14 +70,13 @@ int main(int argc,char** argv) {
G4RunManager * runManager = new G4RunManager;
// particle-generator must be the first useraction!!!
runManager->SetUserAction(new OlapGenerator);
// put the user-geometry here
G4VUserDetectorConstruction * origGeom = new RandomDetector(0);
OlapDetConstr * olapGeom = new OlapDetConstr(origGeom);
runManager->SetUserInitialization(olapGeom);
runManager->SetUserInitialization(new OlapPhysicsList);
runManager->SetUserAction(new OlapGenerator);
// initialize G4
runManager->Initialize();
@@ -84,12 +85,6 @@ int main(int argc,char** argv) {
OlapManager * olap = OlapManager::GetOlapManager();
olap->GotoLV(olap->GetFullWorld()->GetLogicalVolume()->GetName());
#ifdef G4VIS_USE
//Instantiating VisManager
G4VisManager *visManager = new G4VisExecutive;
visManager -> Initialize();
#endif
//User action classes.
OlapRunAction * olapRunAction = new OlapRunAction;
OlapEventAction * olapEventAction = new OlapEventAction(olapRunAction);
@@ -98,8 +93,6 @@ int main(int argc,char** argv) {
runManager->SetUserAction(olapEventAction);
runManager->SetUserAction(olapSteppingAction);
#ifdef debug
//Get number of logical and physical volumes
G4LogicalVolumeStore* logstore = G4LogicalVolumeStore::GetInstance();
@@ -111,28 +104,32 @@ int main(int argc,char** argv) {
<< "====================================" << endl << endl;
#endif
#ifdef G4VIS_USE
//Instantiating VisManager
G4VisManager *visManager = new G4VisExecutive;
visManager -> Initialize();
#endif
//Get the pointer for the User Interface maager
G4UImanager* UI = G4UImanager::GetUIpointer();
if (argc == 1) {
G4VUIshell * s = new G4UItcsh("Idle> ",10);
G4UIsession* session = new G4UIterminal(s);
G4String command = "/control/execute gui.mac";
UI->ApplyCommand(command);
session->SessionStart();
delete session;
}
//Batch mode
else {
G4String command = "/control/execute ";
G4String fileName = argv[1];
UI->ApplyCommand(command+fileName);
}
G4UImanager* UImanager = G4UImanager::GetUIpointer();
if (argc!=1) // batch mode
{
#ifdef G4VIS_USE
visManager->SetVerboseLevel("quiet");
#endif
G4String command = "/control/execute ";
G4String fileName = argv[1];
UImanager->ApplyCommand(command+fileName);
}
else
{ // interactive mode : define UI session
#ifdef G4UI_USE
G4UIExecutive* ui = new G4UIExecutive(argc, argv);
ui->SessionStart();
delete ui;
#endif
}
#ifdef G4VIS_USE
delete visManager;
@@ -24,8 +24,8 @@
// ********************************************************************
//
//
// $Id: OlapDetConstr.cc,v 1.4 2006/06/29 17:22:52 gunter Exp $
// GEANT4 tag $Name: geant4-09-02 $
// $Id: OlapDetConstr.cc,v 1.5 2010/11/16 14:34:30 gcosmo Exp $
// GEANT4 tag $Name: geant4-09-04 $
//
//
// --------------------------------------------------------------
@@ -529,7 +529,7 @@ void OlapDetConstr::DeleteNewWorld()
if (nr==0)
{
G4cerr << "OlapDetConstr::DeleteNewWorld(): no daughter in NewWorld!"
G4cout << "OlapDetConstr::DeleteNewWorld(): no daughter in NewWorld!"
<< G4endl << G4endl;
return;
}
@@ -24,8 +24,8 @@
// ********************************************************************
//
//
// $Id: OlapManager.cc,v 1.3 2006/06/29 17:23:00 gunter Exp $
// GEANT4 tag $Name: geant4-09-02 $
// $Id: OlapManager.cc,v 1.4 2010/08/24 07:57:14 gcosmo Exp $
// GEANT4 tag $Name: geant4-09-04 $
//
//
// --------------------------------------------------------------
@@ -45,15 +45,15 @@
#include "OlapGenerator.hh"
#include "OlapEventAction.hh"
#include "G4GeoNav.hh"
#include "G4GeometryTolerance.hh"
#include "G4RunManager.hh"
#include "globals.hh"
OlapManager * OlapManager::theInstance = 0;
OlapManager::OlapManager() :
olapGenerator(0), delta( kRadTolerance ),
eventsPerRun(27), lvPos(0), polyMode(false),
interrupt(false)
OlapManager::OlapManager()
: olapGenerator(0), eventsPerRun(27), lvPos(0),
polyMode(false), interrupt(false)
{
theMessenger = new OlapManagerMessenger(this);
theLVStore = G4LogicalVolumeStore::GetInstance();
@@ -61,6 +61,7 @@ OlapManager::OlapManager() :
//std::vector<G4LogicalVolume*>::iterator aIt = theLVStore->begin();
//G4LogicalVolumeStore::iterator aIt = theLVStore->begin();
delta = G4GeometryTolerance::GetInstance()->GetAngularTolerance();
theRunManager = G4RunManager::GetRunManager();
const G4VUserDetectorConstruction * aTmp =
theRunManager->GetUserDetectorConstruction();
@@ -24,8 +24,8 @@
// ********************************************************************
//
//
// $Id: OlapManagerMessenger.cc,v 1.3 2006/06/29 17:23:02 gunter Exp $
// GEANT4 tag $Name: geant4-09-02 $
// $Id: OlapManagerMessenger.cc,v 1.4 2010/08/24 07:57:14 gcosmo Exp $
// GEANT4 tag $Name: geant4-09-04 $
//
//
// --------------------------------------------------------------
@@ -39,6 +39,7 @@
#include "OlapManager.hh"
#include "OlapLogManager.hh"
#include "G4GeometryTolerance.hh"
#include "G4UIdirectory.hh"
#include "G4UIcmdWithAString.hh"
#include "G4UIcmdWithAnInteger.hh"
@@ -54,6 +55,8 @@ OlapManagerMessenger::OlapManagerMessenger(OlapManager* aManager)
theLogManager = OlapLogManager::GetOlapLogManager();
G4double delta = G4GeometryTolerance::GetInstance()->GetAngularTolerance();
theOlapDir = new G4UIdirectory("/olap/");
theOlapDir->SetGuidance("Overlap detection facility");
@@ -77,7 +80,7 @@ OlapManagerMessenger::OlapManagerMessenger(OlapManager* aManager)
theDeltaCmd = new G4UIcmdWithADoubleAndUnit("/olap/delta",this);
theDeltaCmd->SetGuidance("set boundary tolerance for overlaps in units of length");
theDeltaCmd->SetDefaultValue(kRadTolerance);
theDeltaCmd->SetDefaultValue(delta);
theDeltaCmd->SetParameterName("delta",true);
theDeltaCmd->SetRange("delta>=1.e-9"); // current G4-accuracy
theDeltaCmd->SetUnitCategory("Length");
@@ -24,8 +24,8 @@
// ********************************************************************
//
//
// $Id: OlapPhysicsList.cc,v 1.2 2006/06/29 17:23:07 gunter Exp $
// GEANT4 tag $Name: geant4-09-02 $
// $Id: OlapPhysicsList.cc,v 1.3 2010/08/16 08:23:55 kurasige Exp $
// GEANT4 tag $Name: geant4-09-04 $
//
//
// --------------------------------------------------------------
@@ -38,8 +38,6 @@
#include "OlapPhysicsList.hh"
#include "G4ios.hh"
#include "G4ParticleDefinition.hh"
#include "G4ParticleWithCuts.hh"
#include "G4ProcessManager.hh"
#include "G4ProcessVector.hh"
#include "G4ParticleTypes.hh"