Import Geant4 1.1.0 source tree
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4Run.hh,v 1.2.4.1 1999/12/07 20:52:58 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
// GEANT4 tag $Name: geant4-01-01 $
|
||||
//
|
||||
|
||||
#ifndef G4Run_h
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4RunManager.hh,v 1.7.2.1 1999/12/07 20:52:58 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
// GEANT4 tag $Name: geant4-01-01 $
|
||||
//
|
||||
//
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4RunMessenger.hh,v 1.4.4.1 1999/12/07 20:52:58 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
// GEANT4 tag $Name: geant4-01-01 $
|
||||
//
|
||||
//
|
||||
// GEANT 4 class header file
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4UserPhysicsListMessenger.hh,v 1.4.4.1 1999/12/07 20:52:58 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
// GEANT4 tag $Name: geant4-01-01 $
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------------------
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4UserRunAction.hh,v 1.3.4.1 1999/12/07 20:52:58 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
// GEANT4 tag $Name: geant4-01-01 $
|
||||
//
|
||||
|
||||
#ifndef G4UserRunAction_h
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4VPersistencyManager.hh,v 1.2.4.1 1999/12/07 20:52:58 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
// GEANT4 tag $Name: geant4-01-01 $
|
||||
//
|
||||
|
||||
#ifndef G4VPersistencyManager_h
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4VUserDetectorConstruction.hh,v 1.2.4.1 1999/12/07 20:52:59 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
// GEANT4 tag $Name: geant4-01-01 $
|
||||
//
|
||||
|
||||
#ifndef G4VUserDetectorConstruction_h
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4VUserPhysicsList.hh,v 1.5 1999/11/07 13:11:49 kurasige Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
// $Id: G4VUserPhysicsList.hh,v 1.5.6.1 1999/12/08 17:35:17 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-01 $
|
||||
//
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
@@ -194,14 +194,14 @@ class G4VUserPhysicsList
|
||||
|
||||
inline void G4VUserPhysicsList::Construct()
|
||||
{
|
||||
if (verboseLevel >1) G4cout << "G4VUserPhysicsList::Construct()" << endl;
|
||||
if (verboseLevel >1) G4cout << "G4VUserPhysicsList::Construct()" << G4endl;
|
||||
|
||||
if (verboseLevel >1) G4cout << "Construct particles " << endl;
|
||||
if (verboseLevel >1) G4cout << "Construct particles " << G4endl;
|
||||
ConstructParticle();
|
||||
|
||||
InitializeProcessManager();
|
||||
|
||||
if (verboseLevel >1) G4cout << "Construct processes " << endl;
|
||||
if (verboseLevel >1) G4cout << "Construct processes " << G4endl;
|
||||
ConstructProcess();
|
||||
}
|
||||
|
||||
@@ -215,7 +215,7 @@ inline void G4VUserPhysicsList::SetVerboseLevel(G4int value)
|
||||
verboseLevel = value;
|
||||
if (verboseLevel >1){
|
||||
G4cout << "G4VUserPhysicsList::SetVerboseLevel :";
|
||||
G4cout << " Verbose level is set to " << verboseLevel << endl;
|
||||
G4cout << " Verbose level is set to " << verboseLevel << G4endl;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4VUserPrimaryGeneratorAction.hh,v 1.2.4.1 1999/12/07 20:52:59 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
// GEANT4 tag $Name: geant4-01-01 $
|
||||
//
|
||||
|
||||
#ifndef G4VUserPrimaryGeneratorAction_h
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4Run.cc,v 1.1.10.1 1999/12/07 20:52:59 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
// GEANT4 tag $Name: geant4-01-01 $
|
||||
//
|
||||
|
||||
#include "G4Run.hh"
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4RunManager.cc,v 1.10.2.1 1999/12/07 20:52:59 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
// $Id: G4RunManager.cc,v 1.12 2000/03/09 17:07:02 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-01-01 $
|
||||
//
|
||||
//
|
||||
|
||||
@@ -37,11 +37,7 @@
|
||||
#include "G4VVisManager.hh"
|
||||
|
||||
#include "G4ios.hh"
|
||||
#ifdef WIN32
|
||||
# include <Strstrea.h>
|
||||
#else
|
||||
# include <strstream.h>
|
||||
#endif
|
||||
#include "g4std/strstream"
|
||||
|
||||
|
||||
G4RunManager* G4RunManager::fRunManager = NULL;
|
||||
@@ -71,20 +67,20 @@ G4RunManager::G4RunManager()
|
||||
G4ParticleTable::GetParticleTable()->CreateMessenger();
|
||||
G4ProcessTable::GetProcessTable()->CreateMessenger();
|
||||
G4cout
|
||||
<< "**********************************************" << endl
|
||||
<< " Geant4 version $Name: geant4-01-00 $" << endl
|
||||
<< " (07-Dec-99)" << endl
|
||||
<< " Copyright : Geant4 Collaboration" << endl
|
||||
<< "**********************************************" << endl;
|
||||
<< "**********************************************" << G4endl
|
||||
<< " Geant4 version $Name: geant4-01-01 $" << G4endl
|
||||
<< " (10-Mar-2000)" << G4endl
|
||||
<< " Copyright : Geant4 Collaboration" << G4endl
|
||||
<< "**********************************************" << G4endl;
|
||||
}
|
||||
|
||||
G4RunManager::~G4RunManager()
|
||||
{
|
||||
if(verboseLevel>0) G4cout << "G4 kernel has come to Quit state." << endl;
|
||||
if(verboseLevel>0) G4cout << "G4 kernel has come to Quit state." << G4endl;
|
||||
G4StateManager* pStateManager = G4StateManager::GetStateManager();
|
||||
pStateManager->SetNewState(Quit);
|
||||
|
||||
if(verboseLevel>1) G4cout << "Deletion of G4 kernel class start." << endl;
|
||||
if(verboseLevel>1) G4cout << "Deletion of G4 kernel class start." << G4endl;
|
||||
delete timer;
|
||||
delete runMessenger;
|
||||
physicsList->RemoveProcessManager();
|
||||
@@ -94,42 +90,42 @@ G4RunManager::~G4RunManager()
|
||||
if(userDetector)
|
||||
{
|
||||
delete userDetector;
|
||||
if(verboseLevel>1) G4cout << "UserDetectorConstruction deleted." << endl;
|
||||
if(verboseLevel>1) G4cout << "UserDetectorConstruction deleted." << G4endl;
|
||||
}
|
||||
if(physicsList)
|
||||
{
|
||||
delete physicsList;
|
||||
if(verboseLevel>1) G4cout << "UserPhysicsList deleted." << endl;
|
||||
if(verboseLevel>1) G4cout << "UserPhysicsList deleted." << G4endl;
|
||||
}
|
||||
if(userRunAction)
|
||||
{
|
||||
delete userRunAction;
|
||||
if(verboseLevel>1) G4cout << "UserRunAction deleted." << endl;
|
||||
if(verboseLevel>1) G4cout << "UserRunAction deleted." << G4endl;
|
||||
}
|
||||
if(userPrimaryGeneratorAction)
|
||||
{
|
||||
delete userPrimaryGeneratorAction;
|
||||
if(verboseLevel>1) G4cout << "UserPrimaryGenerator deleted." << endl;
|
||||
if(verboseLevel>1) G4cout << "UserPrimaryGenerator deleted." << G4endl;
|
||||
}
|
||||
G4SDManager* fSDM = G4SDManager::GetSDMpointerIfExist();
|
||||
if(fSDM)
|
||||
{
|
||||
delete fSDM;
|
||||
if(verboseLevel>1) G4cout << "G4SDManager deleted." << endl;
|
||||
if(verboseLevel>1) G4cout << "G4SDManager deleted." << G4endl;
|
||||
}
|
||||
delete eventManager;
|
||||
if(verboseLevel>1) G4cout << "EventManager deleted." << endl;
|
||||
if(verboseLevel>1) G4cout << "EventManager deleted." << G4endl;
|
||||
G4UImanager* pUImanager = G4UImanager::GetUIpointer();
|
||||
{
|
||||
if(pUImanager) delete pUImanager;
|
||||
if(verboseLevel>1) G4cout << "UImanager deleted." << endl;
|
||||
if(verboseLevel>1) G4cout << "UImanager deleted." << G4endl;
|
||||
}
|
||||
if(pStateManager)
|
||||
{
|
||||
delete pStateManager;
|
||||
if(verboseLevel>1) G4cout << "StateManager deleted." << endl;
|
||||
if(verboseLevel>1) G4cout << "StateManager deleted." << G4endl;
|
||||
}
|
||||
if(verboseLevel>1) G4cout << "RunManager is deleting." << endl;
|
||||
if(verboseLevel>1) G4cout << "RunManager is deleting." << G4endl;
|
||||
}
|
||||
|
||||
void G4RunManager::BeamOn(G4int n_event,const char* macroFile,G4int n_select)
|
||||
@@ -150,14 +146,14 @@ G4bool G4RunManager::ConfirmBeamOnCondition()
|
||||
G4ApplicationState currentState = stateManager->GetCurrentState();
|
||||
if(currentState!=PreInit && currentState!=Idle)
|
||||
{
|
||||
G4cerr << "Illegal application state - BeamOn() ignored." << endl;
|
||||
G4cerr << "Illegal application state - BeamOn() ignored." << G4endl;
|
||||
return false;
|
||||
}
|
||||
|
||||
if(!initializedAtLeastOnce)
|
||||
{
|
||||
G4cerr << " Geant4 kernel should be initialized" << endl;
|
||||
G4cerr << "before the first BeamOn(). - BeamOn ignored." << endl;
|
||||
G4cerr << " Geant4 kernel should be initialized" << G4endl;
|
||||
G4cerr << "before the first BeamOn(). - BeamOn ignored." << G4endl;
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -165,11 +161,11 @@ G4bool G4RunManager::ConfirmBeamOnCondition()
|
||||
{
|
||||
if(verboseLevel>0)
|
||||
{
|
||||
G4cout << "Start re-initialization because " << endl;
|
||||
if(!geometryInitialized) G4cout << " Geometry" << endl;
|
||||
if(!physicsInitialized) G4cout << " Physics processes" << endl;
|
||||
if(!cutoffInitialized) G4cout << " Cutoff" << endl;
|
||||
G4cout << "has been modified since last Run." << endl;
|
||||
G4cout << "Start re-initialization because " << G4endl;
|
||||
if(!geometryInitialized) G4cout << " Geometry" << G4endl;
|
||||
if(!physicsInitialized) G4cout << " Physics processes" << G4endl;
|
||||
if(!cutoffInitialized) G4cout << " Cutoff" << G4endl;
|
||||
G4cout << "has been modified since last Run." << G4endl;
|
||||
}
|
||||
Initialize();
|
||||
}
|
||||
@@ -189,7 +185,7 @@ void G4RunManager::RunInitialization()
|
||||
if(userRunAction) userRunAction->BeginOfRunAction(currentRun);
|
||||
if(geometryNeedsToBeClosed)
|
||||
{
|
||||
if(verboseLevel>1) G4cout << "Start closing geometry." << endl;
|
||||
if(verboseLevel>1) G4cout << "Start closing geometry." << G4endl;
|
||||
G4GeometryManager* geomManager = G4GeometryManager::GetInstance();
|
||||
geomManager->OpenGeometry();
|
||||
geomManager->CloseGeometry(geometryToBeOptimized);
|
||||
@@ -206,7 +202,7 @@ void G4RunManager::RunInitialization()
|
||||
|
||||
if(storeRandomNumberStatus==1 || storeRandomNumberStatus==-1) StoreRandomNumberStatus();
|
||||
|
||||
if(verboseLevel>0) G4cout << "Start Run processing." << endl;
|
||||
if(verboseLevel>0) G4cout << "Start Run processing." << G4endl;
|
||||
}
|
||||
|
||||
void G4RunManager::DoEventLoop(G4int n_event,const char* macroFile,G4int n_select)
|
||||
@@ -250,13 +246,13 @@ void G4RunManager::DoEventLoop(G4int n_event,const char* macroFile,G4int n_selec
|
||||
if(verboseLevel>0)
|
||||
{
|
||||
timer->Stop();
|
||||
G4cout << "Run terminated." << endl;
|
||||
G4cout << "Run Summary" << endl;
|
||||
G4cout << "Run terminated." << G4endl;
|
||||
G4cout << "Run Summary" << G4endl;
|
||||
if(runAborted)
|
||||
{ G4cout << " Run Aborted after " << i_event << " events processed." << endl; }
|
||||
{ G4cout << " Run Aborted after " << i_event << " events processed." << G4endl; }
|
||||
else
|
||||
{ G4cout << " Number of events processed : " << n_event << endl; }
|
||||
G4cout << " " << *timer << endl;
|
||||
{ G4cout << " Number of events processed : " << n_event << G4endl; }
|
||||
G4cout << " " << *timer << G4endl;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -320,7 +316,7 @@ void G4RunManager::Initialize()
|
||||
if(currentState!=PreInit && currentState!=Idle)
|
||||
{
|
||||
G4cerr << "Illegal application state - "
|
||||
<< "G4RunManager::Initialize() ignored." << endl;
|
||||
<< "G4RunManager::Initialize() ignored." << G4endl;
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -340,7 +336,7 @@ void G4RunManager::InitializeGeometry()
|
||||
("G4RunManager::InitializeGeometry - G4VUserDetectorConstruction is not defined.");
|
||||
}
|
||||
|
||||
if(verboseLevel>1) G4cout << "userDetector->Construct() start." << endl;
|
||||
if(verboseLevel>1) G4cout << "userDetector->Construct() start." << G4endl;
|
||||
DefineWorldVolume(userDetector->Construct());
|
||||
geometryInitialized = true;
|
||||
}
|
||||
@@ -349,7 +345,7 @@ void G4RunManager::InitializePhysics()
|
||||
{
|
||||
if(physicsList)
|
||||
{
|
||||
if(verboseLevel>1) G4cout << "physicsList->Construct() start." << endl;
|
||||
if(verboseLevel>1) G4cout << "physicsList->Construct() start." << G4endl;
|
||||
physicsList->Construct();
|
||||
}
|
||||
else
|
||||
@@ -363,7 +359,7 @@ void G4RunManager::InitializeCutOff()
|
||||
{
|
||||
if(physicsList)
|
||||
{
|
||||
if(verboseLevel>1) G4cout << "physicsList->setCut() start." << endl;
|
||||
if(verboseLevel>1) G4cout << "physicsList->setCut() start." << G4endl;
|
||||
physicsList->SetCuts();
|
||||
}
|
||||
cutoffInitialized = true;
|
||||
@@ -381,7 +377,7 @@ void G4RunManager::AbortRun()
|
||||
}
|
||||
else
|
||||
{
|
||||
G4cerr << "Run is not in progress. AbortRun() ignored." << endl;
|
||||
G4cerr << "Run is not in progress. AbortRun() ignored." << G4endl;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -405,7 +401,7 @@ void G4RunManager::StoreRandomNumberStatus(G4int eventID)
|
||||
if(storeRandomNumberStatus>0 && currentRun != NULL)
|
||||
{
|
||||
char st[20];
|
||||
ostrstream os(st,20);
|
||||
G4std::ostrstream os(st,20);
|
||||
os << currentRun->GetRunID() << '\0';
|
||||
fileN += "R";
|
||||
fileN += st;
|
||||
@@ -413,7 +409,7 @@ void G4RunManager::StoreRandomNumberStatus(G4int eventID)
|
||||
if(storeRandomNumberStatus==2 && eventID>=0)
|
||||
{
|
||||
char st[20];
|
||||
ostrstream os(st,20);
|
||||
G4std::ostrstream os(st,20);
|
||||
os << eventID << '\0';
|
||||
fileN += "E";
|
||||
fileN += st;
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4RunMessenger.cc,v 1.4.8.1 1999/12/07 20:52:59 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
// $Id: G4RunMessenger.cc,v 1.4.8.1.2.5 1999/12/14 09:16:50 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-01 $
|
||||
//
|
||||
|
||||
#include "G4RunMessenger.hh"
|
||||
@@ -19,11 +19,7 @@
|
||||
#include "G4UIcommand.hh"
|
||||
#include "G4UIparameter.hh"
|
||||
#include "G4ios.hh"
|
||||
#ifdef WIN32
|
||||
# include <Strstrea.h>
|
||||
#else
|
||||
# include <strstream.h>
|
||||
#endif
|
||||
#include "g4std/strstream"
|
||||
|
||||
G4RunMessenger::G4RunMessenger(G4RunManager * runMgr)
|
||||
:runManager(runMgr)
|
||||
@@ -161,7 +157,7 @@ void G4RunMessenger::SetNewValue(G4UIcommand * command,G4String newValue)
|
||||
G4int nev;
|
||||
G4int ns;
|
||||
const char* nv = (const char*)newValue;
|
||||
istrstream is((char*)nv);
|
||||
G4std::istrstream is((char*)nv);
|
||||
is >> nev >> macroFileName >> ns;
|
||||
if(macroFileName=="***NULL***")
|
||||
{ runManager->BeamOn(nev); }
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4UserPhysicsListMessenger.cc,v 1.2.8.1 1999/12/07 20:52:59 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
// GEANT4 tag $Name: geant4-01-01 $
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------------------
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4UserRunAction.cc,v 1.2.8.1 1999/12/07 20:53:00 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
// GEANT4 tag $Name: geant4-01-01 $
|
||||
//
|
||||
|
||||
#include "G4UserRunAction.hh"
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4VPersistencyManager.cc,v 1.1.10.1 1999/12/07 20:53:00 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
// GEANT4 tag $Name: geant4-01-01 $
|
||||
//
|
||||
|
||||
#include "G4VPersistencyManager.hh"
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4VUserDetectorConstruction.cc,v 1.1.10.1 1999/12/07 20:53:00 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
// GEANT4 tag $Name: geant4-01-01 $
|
||||
//
|
||||
|
||||
#include "G4VUserDetectorConstruction.hh"
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4VUserPhysicsList.cc,v 1.7.8.1 1999/12/07 20:53:00 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
// $Id: G4VUserPhysicsList.cc,v 1.7.8.1.2.3 1999/12/14 07:08:32 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-01 $
|
||||
//
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
@@ -37,7 +37,7 @@
|
||||
#include "G4UImanager.hh"
|
||||
#include "G4ios.hh"
|
||||
#include "G4UnitsTable.hh"
|
||||
#include <iomanip.h>
|
||||
#include "g4std/iomanip"
|
||||
|
||||
|
||||
G4VUserPhysicsList::G4VUserPhysicsList()
|
||||
@@ -74,7 +74,7 @@ void G4VUserPhysicsList::AddProcessManager(G4ParticleDefinition* newParticle,
|
||||
if (verboseLevel >1){
|
||||
G4cout << "G4VUserPhysicsList::AddProcessManager: ";
|
||||
G4cout << newParticle->GetParticleName();
|
||||
G4cout << " already has ProcessManager " << endl;
|
||||
G4cout << " already has ProcessManager " << G4endl;
|
||||
}
|
||||
#endif
|
||||
return;
|
||||
@@ -117,7 +117,7 @@ void G4VUserPhysicsList::AddProcessManager(G4ParticleDefinition* newParticle,
|
||||
if (verboseLevel >2){
|
||||
G4cout << "G4VUserPhysicsList::AddProcessManager: ";
|
||||
G4cout << "adds ProcessManager to ";
|
||||
G4cout << newParticle->GetParticleName() << endl;
|
||||
G4cout << newParticle->GetParticleName() << G4endl;
|
||||
newManager->DumpInfo();
|
||||
}
|
||||
#endif
|
||||
@@ -153,7 +153,7 @@ void G4VUserPhysicsList::RemoveProcessManager()
|
||||
if (verboseLevel >2){
|
||||
G4cout << "G4VUserPhysicsList::RemoveProcessManager: ";
|
||||
G4cout << "remove ProcessManager from ";
|
||||
G4cout << particle->GetParticleName() << endl;
|
||||
G4cout << particle->GetParticleName() << G4endl;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
@@ -194,7 +194,7 @@ void G4VUserPhysicsList::SetDefaultCutValue(G4double value)
|
||||
#ifdef G4VERBOSE
|
||||
if (verboseLevel >0){
|
||||
G4cout << "G4VUserPhysicsList::SetDefaultCutValue: negative cut values";
|
||||
G4cout << " :" << value/mm << "[mm]" << endl;
|
||||
G4cout << " :" << value/mm << "[mm]" << G4endl;
|
||||
}
|
||||
#endif
|
||||
} else {
|
||||
@@ -202,7 +202,7 @@ void G4VUserPhysicsList::SetDefaultCutValue(G4double value)
|
||||
if (verboseLevel >1){
|
||||
G4cout << "G4VUserPhysicsList::SetDefaultCutValue:";
|
||||
G4cout << "default cut value is changed to :" ;
|
||||
G4cout << value/mm << "[mm]" << endl;
|
||||
G4cout << value/mm << "[mm]" << G4endl;
|
||||
}
|
||||
#endif
|
||||
defaultCutValue = value;
|
||||
@@ -214,8 +214,8 @@ void G4VUserPhysicsList::ResetCuts()
|
||||
{
|
||||
#ifdef G4VERBOSE
|
||||
if (verboseLevel >1) {
|
||||
G4cout << "G4VUserPhysicsList::ResetCuts()" << endl;
|
||||
G4cout << " cut values in energy will be calculated later" << endl;
|
||||
G4cout << "G4VUserPhysicsList::ResetCuts()" << G4endl;
|
||||
G4cout << " cut values in energy will be calculated later" << G4endl;
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -257,7 +257,7 @@ void G4VUserPhysicsList::SetCutValueForOtherThan(G4double cutValue,
|
||||
#ifdef G4VERBOSE
|
||||
if (verboseLevel >0){
|
||||
G4cout << "G4VUserPhysicsList::SetCutValueForOtherThan: negative cut values";
|
||||
G4cout << " :" << cutValue/mm << "[mm]" << endl;
|
||||
G4cout << " :" << cutValue/mm << "[mm]" << G4endl;
|
||||
}
|
||||
#endif
|
||||
return;
|
||||
@@ -265,7 +265,7 @@ void G4VUserPhysicsList::SetCutValueForOtherThan(G4double cutValue,
|
||||
#ifdef G4VERBOSE
|
||||
if (verboseLevel >1) {
|
||||
G4cout << "G4VUserPhysicsList::SetCutValueForOtherThan ";
|
||||
G4cout << " :" << cutValue/mm << "[mm]" << endl;
|
||||
G4cout << " :" << cutValue/mm << "[mm]" << G4endl;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
@@ -330,7 +330,7 @@ void G4VUserPhysicsList::SetCutValueForOtherThan(G4double cutValue,
|
||||
BuildPhysicsTable(particle);
|
||||
|
||||
#ifdef G4VERBOSE
|
||||
if (verboseLevel >1) G4cout << "Set cuts for " << particle->GetParticleName() << endl;
|
||||
if (verboseLevel >1) G4cout << "Set cuts for " << particle->GetParticleName() << G4endl;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
@@ -350,10 +350,10 @@ void G4VUserPhysicsList::SetCutValue(G4double aCut, const G4String& name)
|
||||
|
||||
#ifdef G4VERBOSE
|
||||
if (particle != 0){
|
||||
if (verboseLevel >1) G4cout << "Set cuts for " << name << endl;
|
||||
if (verboseLevel >1) G4cout << "Set cuts for " << name << G4endl;
|
||||
} else {
|
||||
if (verboseLevel >0)
|
||||
G4cout << name << " is not found in ParticleTable" << endl;
|
||||
G4cout << name << " is not found in ParticleTable" << G4endl;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
@@ -366,7 +366,7 @@ void G4VUserPhysicsList::SetCutsWithDefault()
|
||||
#ifdef G4VERBOSE
|
||||
if (verboseLevel >1){
|
||||
G4cout << "G4VUserPhysicsList::SetCutsWithDefault:";
|
||||
G4cout << "CutLength : " << cut/mm << " (mm)" << endl;
|
||||
G4cout << "CutLength : " << cut/mm << " (mm)" << G4endl;
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -395,7 +395,7 @@ void G4VUserPhysicsList::SetCutValueForOthers(G4double cutValue)
|
||||
#ifdef G4VERBOSE
|
||||
if (verboseLevel >0){
|
||||
G4cout << "G4VUserPhysicsList::SetCutValueForOthers: negative cut values";
|
||||
G4cout << " :" << cutValue/mm << "[mm]" << endl;
|
||||
G4cout << " :" << cutValue/mm << "[mm]" << G4endl;
|
||||
}
|
||||
#endif
|
||||
return;
|
||||
@@ -404,7 +404,7 @@ void G4VUserPhysicsList::SetCutValueForOthers(G4double cutValue)
|
||||
#ifdef G4VERBOSE
|
||||
if (verboseLevel >1) {
|
||||
G4cout << "G4VUserPhysicsList::SetCutValueForOthers ";
|
||||
G4cout << " :" << cutValue/mm << "[mm]" << endl;
|
||||
G4cout << " :" << cutValue/mm << "[mm]" << G4endl;
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -423,7 +423,7 @@ void G4VUserPhysicsList::SetCutValueForOthers(G4double cutValue)
|
||||
|
||||
#ifdef G4VERBOSE
|
||||
if (verboseLevel >1)
|
||||
G4cout << "Set cuts for " << particle->GetParticleName() << endl;
|
||||
G4cout << "Set cuts for " << particle->GetParticleName() << G4endl;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
@@ -440,14 +440,14 @@ void G4VUserPhysicsList::ReCalcCutValue(const G4String& name)
|
||||
BuildPhysicsTable(particle);
|
||||
|
||||
#ifdef G4VERBOSE
|
||||
if (verboseLevel >1) G4cout << "Recalc cuts for " << name << endl;
|
||||
if (verboseLevel >1) G4cout << "Recalc cuts for " << name << G4endl;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef G4VERBOSE
|
||||
if (( particle ==0 ) && (verboseLevel >0)) {
|
||||
G4cout << name << " is not found in ParticleTable" << endl;
|
||||
G4cout << name << " is not found in ParticleTable" << G4endl;
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -474,7 +474,7 @@ void G4VUserPhysicsList::ReCalcCutValueForOthers()
|
||||
|
||||
#ifdef G4VERBOSE
|
||||
if (verboseLevel >1)
|
||||
G4cout << "ReCalc cuts for " << particle->GetParticleName() << endl;
|
||||
G4cout << "ReCalc cuts for " << particle->GetParticleName() << G4endl;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
@@ -542,12 +542,12 @@ void G4VUserPhysicsList::DumpList() const
|
||||
G4ParticleDefinition* particle = theParticleIterator->value();
|
||||
G4cout << particle->GetParticleName();
|
||||
if ((idx++ % 4) == 3) {
|
||||
G4cout << endl;
|
||||
G4cout << G4endl;
|
||||
} else {
|
||||
G4cout << ", ";
|
||||
}
|
||||
}
|
||||
G4cout << endl;
|
||||
G4cout << G4endl;
|
||||
}
|
||||
|
||||
void G4VUserPhysicsList::DumpCutValues(const G4String &particle_name) const
|
||||
@@ -573,29 +573,29 @@ void G4VUserPhysicsList::DumpCutValues( G4ParticleDefinition* particle) const
|
||||
|
||||
if (particle->IsShortLived()) {
|
||||
// name field
|
||||
G4cout << " --- " << particle->GetParticleName() << " is a short lived particle ------ " << endl;
|
||||
G4cout << " --- " << particle->GetParticleName() << " is a short lived particle ------ " << G4endl;
|
||||
} else {
|
||||
// name field
|
||||
G4cout << " --- " << particle->GetParticleName() << " ------ " << endl;
|
||||
G4cout << " --- " << particle->GetParticleName() << " ------ " << G4endl;
|
||||
|
||||
// cut value in range field
|
||||
G4cout << " - Cut in range = " << G4BestUnit(particle->GetLengthCuts(),"Length") << endl;
|
||||
G4cout << " - Cut in range = " << G4BestUnit(particle->GetLengthCuts(),"Length") << G4endl;
|
||||
|
||||
// material and energy cut value for the material
|
||||
G4double* theKineticEnergyCuts = particle->GetEnergyCuts();
|
||||
|
||||
if (theKineticEnergyCuts != 0) {
|
||||
const G4MaterialTable* materialTable = G4Material::GetMaterialTable();
|
||||
G4cout << " - Material ---------------- Energy Cut ---" << endl;
|
||||
G4cout << " - Material ---------------- Energy Cut ---" << G4endl;
|
||||
for (G4int idx=0; idx<materialTable->entries(); idx++){
|
||||
G4cout << " " << setw(19) << (*materialTable)[idx]->GetName();
|
||||
G4cout << " : " << setw(10) << G4BestUnit(theKineticEnergyCuts[idx],"Energy");
|
||||
G4cout << endl;
|
||||
G4cout << " " << G4std::setw(19) << (*materialTable)[idx]->GetName();
|
||||
G4cout << " : " << G4std::setw(10) << G4BestUnit(theKineticEnergyCuts[idx],"Energy");
|
||||
G4cout << G4endl;
|
||||
}
|
||||
|
||||
} else {
|
||||
G4cout << " - Cuts in energy are not calculated yet --" << endl;
|
||||
G4cout << " Enter /run/initialize command to calculate cuts " << endl;
|
||||
G4cout << " - Cuts in energy are not calculated yet --" << G4endl;
|
||||
G4cout << " Enter /run/initialize command to calculate cuts " << G4endl;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -618,17 +618,17 @@ void G4VUserPhysicsList::DumpCutValuesTable() const
|
||||
|
||||
//line 1 //-- Commented out (M.Asai)
|
||||
//G4cout << "Default cut value in range :";
|
||||
//G4cout << defaultCutValue/mm << "[mm]" << endl;
|
||||
//G4cout << defaultCutValue/mm << "[mm]" << G4endl;
|
||||
|
||||
//line 2
|
||||
G4cout << "============= The cut Energy ==============================" <<endl;
|
||||
G4cout << "============= The cut Energy ==============================" <<G4endl;
|
||||
|
||||
// line 3
|
||||
G4cout << " ";
|
||||
for (idx=0; idx <size; idx++) {
|
||||
G4cout << " " << setw(11) << name[idx] << " ";
|
||||
G4cout << " " << G4std::setw(11) << name[idx] << " ";
|
||||
}
|
||||
G4cout << endl;
|
||||
G4cout << G4endl;
|
||||
|
||||
// line 4
|
||||
G4cout << "Cut in range ";
|
||||
@@ -636,19 +636,19 @@ void G4VUserPhysicsList::DumpCutValuesTable() const
|
||||
if (particle[idx] == 0) {
|
||||
G4cout << " ";
|
||||
} else {
|
||||
G4cout << " " << setw(11) << G4BestUnit(particle[idx]->GetLengthCuts(),"Length");
|
||||
G4cout << " " << G4std::setw(11) << G4BestUnit(particle[idx]->GetLengthCuts(),"Length");
|
||||
}
|
||||
}
|
||||
G4cout << endl;
|
||||
G4cout << G4endl;
|
||||
|
||||
// line 5
|
||||
G4cout << "Cut in energy";
|
||||
G4cout << endl;
|
||||
G4cout << G4endl;
|
||||
|
||||
// line 6 ..
|
||||
const G4MaterialTable* materialTable = G4Material::GetMaterialTable();
|
||||
for (G4int J=0; J<materialTable->entries(); J++) {
|
||||
G4cout << " " << setw(18) << ((*materialTable)[J])->GetName();
|
||||
G4cout << " " << G4std::setw(18) << ((*materialTable)[J])->GetName();
|
||||
for (idx=0; idx <size; idx++) {
|
||||
if (particle[idx] == 0) {
|
||||
G4cout << " ";
|
||||
@@ -657,20 +657,20 @@ void G4VUserPhysicsList::DumpCutValuesTable() const
|
||||
G4cout << " ---------- ";
|
||||
IsOK = false;
|
||||
} else {
|
||||
G4cout << " " << setw(11) << G4BestUnit((particle[idx]->GetEnergyCuts())[J],"Energy");
|
||||
G4cout << " " << G4std::setw(11) << G4BestUnit((particle[idx]->GetEnergyCuts())[J],"Energy");
|
||||
}
|
||||
}
|
||||
}
|
||||
G4cout << endl;
|
||||
G4cout << G4endl;
|
||||
}
|
||||
|
||||
if (!IsOK) {
|
||||
G4cout << " Cuts in energy have not calculated yet !!" << endl;
|
||||
G4cout << " Enter /run/initialize command to calculate cuts " << endl;
|
||||
G4cout << " Cuts in energy have not calculated yet !!" << G4endl;
|
||||
G4cout << " Enter /run/initialize command to calculate cuts " << G4endl;
|
||||
}
|
||||
|
||||
// last line
|
||||
G4cout << "===================================================" << endl;
|
||||
G4cout << "===================================================" << G4endl;
|
||||
G4cout.precision(prec);
|
||||
}
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4VUserPrimaryGeneratorAction.cc,v 1.1.10.1 1999/12/07 20:53:00 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
// GEANT4 tag $Name: geant4-01-01 $
|
||||
//
|
||||
|
||||
#include "G4VUserPrimaryGeneratorAction.hh"
|
||||
|
||||
Reference in New Issue
Block a user