Import Geant4 8.0.0 source tree
This commit is contained in:
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4ExceptionHandler.cc,v 1.3 2003/05/21 21:06:01 asaim Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
|
||||
@@ -21,14 +21,12 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4Run.cc,v 1.7 2004/06/11 14:27:45 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// $Id: G4Run.cc,v 1.9 2005/09/26 08:34:17 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
|
||||
#include "G4Run.hh"
|
||||
|
||||
G4Allocator<G4Run> aRunAllocator;
|
||||
|
||||
G4Run::G4Run()
|
||||
:runID(0),numberOfEvent(0),numberOfEventToBeProcessed(0),HCtable(0),DCtable(0)
|
||||
{;}
|
||||
@@ -36,3 +34,6 @@ G4Run::G4Run()
|
||||
G4Run::~G4Run()
|
||||
{;}
|
||||
|
||||
void G4Run::RecordEvent(const G4Event*)
|
||||
{ numberOfEvent++; }
|
||||
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4RunManager.cc,v 1.86 2004/12/30 19:37:32 asaim Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// $Id: G4RunManager.cc,v 1.88 2005/11/09 10:06:32 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
//
|
||||
|
||||
@@ -51,8 +51,9 @@
|
||||
#include "G4SDManager.hh"
|
||||
#include "G4UImanager.hh"
|
||||
#include "G4ios.hh"
|
||||
#include <strstream>
|
||||
#include <sstream>
|
||||
|
||||
using namespace CLHEP;
|
||||
|
||||
G4RunManager* G4RunManager::fRunManager = 0;
|
||||
|
||||
@@ -392,7 +393,7 @@ void G4RunManager::rndmSaveThisRun()
|
||||
|
||||
G4String fileIn = randomNumberStatusDir + "currentRun.rndm";
|
||||
|
||||
std::ostrstream os;
|
||||
std::ostringstream os;
|
||||
os << "run" << runNumber << ".rndm" << '\0';
|
||||
G4String fileOut = randomNumberStatusDir + os.str();
|
||||
|
||||
@@ -412,7 +413,7 @@ void G4RunManager::rndmSaveThisEvent()
|
||||
|
||||
G4String fileIn = randomNumberStatusDir + "currentEvent.rndm";
|
||||
|
||||
std::ostrstream os;
|
||||
std::ostringstream os;
|
||||
os << "run" << currentRun->GetRunID() << "evt" << currentEvent->GetEventID()
|
||||
<< ".rndm" << '\0';
|
||||
G4String fileOut = randomNumberStatusDir + os.str();
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4RunManagerKernel.cc,v 1.27 2005/06/17 21:07:13 asaim Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// $Id: G4RunManagerKernel.cc,v 1.33 2005/11/28 10:57:24 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
//
|
||||
|
||||
@@ -46,6 +46,7 @@
|
||||
#include "G4UImanager.hh"
|
||||
#include "G4VVisManager.hh"
|
||||
#include "G4UnitsTable.hh"
|
||||
#include "G4Version.hh"
|
||||
#include "G4ios.hh"
|
||||
#include <vector>
|
||||
|
||||
@@ -75,16 +76,17 @@ G4RunManagerKernel::G4RunManagerKernel()
|
||||
G4ProductionCutsTable::GetProductionCutsTable()->GetDefaultProductionCuts());
|
||||
|
||||
// Following line is tentatively moved from SetPhysics method
|
||||
G4ParticleTable::GetParticleTable()->SetReadiness();
|
||||
// Commented out for introduction of non-static particle definition // G4ParticleTable::GetParticleTable()->SetReadiness();
|
||||
// set the initial application state
|
||||
G4StateManager::GetStateManager()->SetNewState(G4State_PreInit);
|
||||
|
||||
// version banner
|
||||
G4String vs = "$Name: geant4-07-01 $";
|
||||
G4String vs = G4Version;
|
||||
vs = vs.substr(1,vs.size()-2);
|
||||
versionString = " Geant4 version ";
|
||||
versionString += vs;
|
||||
versionString += " (30-June-2005)";
|
||||
versionString += " ";
|
||||
versionString += G4Date;
|
||||
G4cout << G4endl
|
||||
<< "*************************************************************" << G4endl
|
||||
<< versionString << G4endl
|
||||
@@ -202,7 +204,7 @@ void G4RunManagerKernel::DefineWorldVolume(G4VPhysicalVolume* worldVol,
|
||||
void G4RunManagerKernel::SetPhysics(G4VUserPhysicsList* uPhys)
|
||||
{
|
||||
physicsList = uPhys;
|
||||
// G4ParticleTable::GetParticleTable()->SetReadiness();
|
||||
G4ParticleTable::GetParticleTable()->SetReadiness();
|
||||
physicsList->ConstructParticle();
|
||||
if(verboseLevel>2) G4ParticleTable::GetParticleTable()->DumpTable();
|
||||
if(verboseLevel>1)
|
||||
@@ -240,8 +242,8 @@ void G4RunManagerKernel::InitializePhysics()
|
||||
"G4VUserPhysicsList is not defined");
|
||||
}
|
||||
|
||||
if(verboseLevel>1) G4cout << "physicsList->ConstructParticle() start." << G4endl;
|
||||
physicsList->ConstructParticle();
|
||||
//if(verboseLevel>1) G4cout << "physicsList->ConstructParticle() start." << G4endl;
|
||||
//physicsList->ConstructParticle();
|
||||
|
||||
if(verboseLevel>1) G4cout << "physicsList->Construct() start." << G4endl;
|
||||
physicsList->Construct();
|
||||
@@ -325,8 +327,8 @@ void G4RunManagerKernel::ResetNavigator()
|
||||
|
||||
void G4RunManagerKernel::UpdateRegion()
|
||||
{
|
||||
G4RegionStore::GetInstance()->UpdateMaterialList();
|
||||
G4ProductionCutsTable::GetProductionCutsTable()->UpdateCoupleTable();
|
||||
G4RegionStore::GetInstance()->UpdateMaterialList(currentWorld);
|
||||
G4ProductionCutsTable::GetProductionCutsTable()->UpdateCoupleTable(currentWorld);
|
||||
}
|
||||
|
||||
void G4RunManagerKernel::BuildPhysicsTables()
|
||||
@@ -346,14 +348,18 @@ void G4RunManagerKernel::BuildPhysicsTables()
|
||||
|
||||
void G4RunManagerKernel::CheckRegions()
|
||||
{
|
||||
G4RegionStore::GetInstance()->SetWorldVolume();
|
||||
|
||||
for(size_t i=0;i<G4RegionStore::GetInstance()->size();i++)
|
||||
{
|
||||
G4Region* region = (*(G4RegionStore::GetInstance()))[i];
|
||||
if(region->GetWorldPhysical()!=currentWorld) continue;
|
||||
G4ProductionCuts* cuts = region->GetProductionCuts();
|
||||
if(!cuts)
|
||||
{
|
||||
G4cerr << "Warning : Region <" << region->GetName()
|
||||
<< "> does not have specific production cuts." << G4endl;
|
||||
<< "> does not have specific production cuts," << G4endl
|
||||
<< "even though it appears in the current tracking world." << G4endl;
|
||||
G4cerr << "Default cuts are used for this region." << G4endl;
|
||||
region->SetProductionCuts(
|
||||
G4ProductionCutsTable::GetProductionCutsTable()->GetDefaultProductionCuts());
|
||||
@@ -377,7 +383,13 @@ void G4RunManagerKernel::DumpRegion(G4Region* region) const
|
||||
else
|
||||
{
|
||||
G4cout << G4endl;
|
||||
G4cout << "Region " << region->GetName() << G4endl;
|
||||
G4cout << "Region <" << region->GetName() << "> -- appears in <"
|
||||
<< region->GetWorldPhysical()->GetName() << "> world volume" << G4endl;
|
||||
if(region->GetWorldPhysical()!=currentWorld)
|
||||
{
|
||||
G4cout << G4endl;
|
||||
return;
|
||||
}
|
||||
G4cout << " Materials : ";
|
||||
std::vector<G4Material*>::const_iterator mItr = region->GetMaterialIterator();
|
||||
size_t nMaterial = region->GetNumberOfMaterials();
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4RunMessenger.cc,v 1.20 2003/11/04 01:58:29 asaim Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// $Id: G4RunMessenger.cc,v 1.21 2005/11/09 10:06:32 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
|
||||
#include "G4RunMessenger.hh"
|
||||
@@ -37,7 +37,7 @@
|
||||
#include "G4UImanager.hh"
|
||||
#include "G4ProductionCutsTable.hh"
|
||||
#include "G4ios.hh"
|
||||
#include <strstream>
|
||||
#include <sstream>
|
||||
|
||||
G4RunMessenger::G4RunMessenger(G4RunManager * runMgr)
|
||||
:runManager(runMgr)
|
||||
@@ -242,7 +242,7 @@ void G4RunMessenger::SetNewValue(G4UIcommand * command,G4String newValue)
|
||||
G4int nev;
|
||||
G4int ns;
|
||||
const char* nv = (const char*)newValue;
|
||||
std::istrstream is((char*)nv);
|
||||
std::istringstream is(nv);
|
||||
is >> nev >> macroFileName >> ns;
|
||||
if(macroFileName=="***NULL***")
|
||||
{ runManager->BeamOn(nev); }
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4UserPhysicsListMessenger.cc,v 1.24 2004/11/01 16:47:56 kurasige Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// $Id: G4UserPhysicsListMessenger.cc,v 1.25 2005/11/09 10:06:32 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------------------
|
||||
@@ -46,6 +46,7 @@
|
||||
#include "G4ios.hh"
|
||||
#include "G4Tokenizer.hh"
|
||||
|
||||
#include <sstream>
|
||||
|
||||
G4UserPhysicsListMessenger::G4UserPhysicsListMessenger(G4VUserPhysicsList* pParticleList):thePhysicsList(pParticleList)
|
||||
{
|
||||
@@ -209,7 +210,7 @@ void G4UserPhysicsListMessenger::SetNewValue(G4UIcommand * command,G4String newV
|
||||
//G4String cValue = G4String(next())+" "+G4String(next());
|
||||
//G4double newCut = setCutCmd->GetNewDoubleValue(cValue);
|
||||
//thePhysicsList->SetCutsForRegion(newCut,rName);
|
||||
std::istrstream is(newValue);
|
||||
std::istringstream is(newValue);
|
||||
char regName[50];
|
||||
G4double cVal;
|
||||
char uniName[10];
|
||||
|
||||
@@ -21,14 +21,30 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4UserRunAction.cc,v 1.6 2003/05/21 21:06:01 asaim Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// $Id: G4UserRunAction.cc,v 1.7 2005/11/22 19:54:53 asaim Exp $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
|
||||
#include "G4UserRunAction.hh"
|
||||
#include "G4ParticleTable.hh"
|
||||
#include "globals.hh"
|
||||
|
||||
|
||||
G4UserRunAction::G4UserRunAction()
|
||||
{;}
|
||||
{
|
||||
if(!(G4ParticleTable::GetParticleTable()->GetReadiness()))
|
||||
{
|
||||
G4String msg;
|
||||
msg = " You are instantiating G4UserRunAction BEFORE your G4VUserPhysicsList is\n";
|
||||
msg += "instantiated and assigned to G4RunManager.\n";
|
||||
msg += " Such an instantiation is prohibited by Geant4 version 8.0. To fix this problem,\n";
|
||||
msg += "please make sure that your main() instantiates G4VUserPhysicsList AND\n";
|
||||
msg += "set it to G4RunManager before instantiating other user action classes\n";
|
||||
msg += "such as G4UserRunAction.";
|
||||
G4Exception("G4UserRunAction::G4UserRunAction()",
|
||||
"Run0002",FatalException,msg);
|
||||
}
|
||||
}
|
||||
|
||||
G4UserRunAction::~G4UserRunAction()
|
||||
{;}
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4VModularPhysicsList.cc,v 1.2 2002/05/29 12:11:08 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4VPersistencyManager.cc,v 1.4 2001/07/13 15:57:06 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
|
||||
#include "G4VPersistencyManager.hh"
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4VUserDetectorConstruction.cc,v 1.3 2001/07/11 10:08:34 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
|
||||
#include "G4VUserDetectorConstruction.hh"
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4VUserPhysicsList.cc,v 1.52 2005/05/09 10:02:51 kurasige Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
|
||||
@@ -21,14 +21,29 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4VUserPrimaryGeneratorAction.cc,v 1.3 2001/07/11 10:08:34 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// $Id: G4VUserPrimaryGeneratorAction.cc,v 1.4 2005/11/22 19:54:53 asaim Exp $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
|
||||
#include "G4VUserPrimaryGeneratorAction.hh"
|
||||
#include "G4ParticleTable.hh"
|
||||
#include "globals.hh"
|
||||
|
||||
G4VUserPrimaryGeneratorAction::G4VUserPrimaryGeneratorAction()
|
||||
{;}
|
||||
{
|
||||
if(!(G4ParticleTable::GetParticleTable()->GetReadiness()))
|
||||
{
|
||||
G4String msg;
|
||||
msg = " You are instantiating G4VUserPrimaryGeneratorAction BEFORE your\n";
|
||||
msg += "G4VUserPhysicsList is instantiated and assigned to G4RunManager.\n";
|
||||
msg += " Such an instantiation is prohibited by Geant4 version 8.0. To fix this problem,\n";
|
||||
msg += "please make sure that your main() instantiates G4VUserPhysicsList AND\n";
|
||||
msg += "set it to G4RunManager before instantiating other user action classes\n";
|
||||
msg += "such as G4VUserPrimaryParticleGeneratorAction.";
|
||||
G4Exception("G4VUserPrimaryGeneratorAction::G4VUserPrimaryGeneratorAction()",
|
||||
"Run0001",FatalException,msg);
|
||||
}
|
||||
}
|
||||
|
||||
G4VUserPrimaryGeneratorAction::~G4VUserPrimaryGeneratorAction()
|
||||
{;}
|
||||
|
||||
Reference in New Issue
Block a user