Import Geant4 5.2.0 source tree
This commit is contained in:
+27
-1
@@ -1,4 +1,4 @@
|
||||
$Id: History,v 1.90 2003/04/29 08:29:15 gcosmo Exp $
|
||||
$Id: History,v 1.95 2003/06/19 13:21:02 gcosmo Exp $
|
||||
-------------------------------------------------------------------
|
||||
|
||||
=========================================================
|
||||
@@ -17,6 +17,32 @@ committal in the CVS repository !
|
||||
* Reverse chronological order (last date on top), please *
|
||||
----------------------------------------------------------
|
||||
|
||||
June 19, 2003, G.Cosmo (run-V05-01-04)
|
||||
- G4VUserPhysicsList.cc: check IsShortLived() before building the
|
||||
physics table in BuildPhysicsTable(). (V.Ivantchenko)
|
||||
- G4RunManager.cc: changed date for release 5.2.
|
||||
|
||||
May 21, 2003, M.Asai (run-V05-01-03)
|
||||
- G4RunManager : Old world logical volume to be removed from the default region
|
||||
|
||||
May 21, 2003, M.Asai (run-V05-01-02)
|
||||
- Clean up unused variables.
|
||||
|
||||
May 16, 2003, G.Cosmo (run-V05-01-01)
|
||||
- G4RunManager.cc: changed date for 5.1-patch01.
|
||||
|
||||
May 06, 2003, G.Cosmo (run-V05-01-00)
|
||||
- G4RunManager[hh.cc]: changed behavior of function DefineWorldVolume()
|
||||
to properly reset navigation history and optimisation in case the
|
||||
topology of the geometry has changed between runs.
|
||||
It requires simplification of all examples/tests where geometry setup
|
||||
is changed between runs.
|
||||
o Added new boolean argument (default set to TRUE) to specify if
|
||||
topology has changed. Call to DefineWorldVolume() at initialisation
|
||||
will use FALSE as value for this argument.
|
||||
o Forced open/close geometry in method ResetNavigator() to properly
|
||||
reset G4Navigator status and remove old optimisations.
|
||||
|
||||
Apr 29, 2003, M.Asai (run-V05-00-17)
|
||||
- G4UserPhysicsListMessenger.cc: changed implementation in
|
||||
SetNewValue() for command 'setCutRCmd' to allow porting on
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4ExceptionHandler.hh,v 1.1 2002/08/19 18:33:29 asaim Exp $
|
||||
// GEANT4 tag $Name: geant4-05-01 $
|
||||
// GEANT4 tag $Name: geant4-05-02 $
|
||||
//
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4Run.hh,v 1.7 2003/04/23 17:54:17 asaim Exp $
|
||||
// GEANT4 tag $Name: geant4-05-01 $
|
||||
// GEANT4 tag $Name: geant4-05-02 $
|
||||
//
|
||||
|
||||
#ifndef G4Run_h
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4RunManager.hh,v 1.32 2003/04/23 17:54:27 asaim Exp $
|
||||
// GEANT4 tag $Name: geant4-05-01 $
|
||||
// $Id: G4RunManager.hh,v 1.34 2003/06/16 17:12:49 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-05-02 $
|
||||
//
|
||||
//
|
||||
|
||||
@@ -86,7 +86,7 @@ class G4ExceptionHandler;
|
||||
#include "G4Event.hh"
|
||||
#include "G4EventManager.hh"
|
||||
#include "globals.hh"
|
||||
#include "g4std/vector"
|
||||
#include <vector>
|
||||
////////#include <signal.h>
|
||||
|
||||
class G4RunManager
|
||||
@@ -133,12 +133,16 @@ class G4RunManager
|
||||
// If the user forget the second invokation, G4RunManager will invoke BeamOn()
|
||||
// method will invoke this method. (Note that this feature is not valid for the
|
||||
// first initialization.)
|
||||
virtual void DefineWorldVolume(G4VPhysicalVolume * worldVol);
|
||||
// Usually, this method is invoked from InitializeGeometry() protected method
|
||||
// of this class. But, in case all of geometry has already created and kept in
|
||||
// the ODBMS, the pointer to the world physical volume can be set by this method.
|
||||
virtual void DefineWorldVolume(G4VPhysicalVolume * worldVol,
|
||||
G4bool topologyIsChanged=true);
|
||||
// This method must be invoked if the geometry setup has been changed between
|
||||
// runs. The flag 'topologyIsChanged' will specify if the geometry topology is
|
||||
// different from the original one used in the previous run; if not, it must be
|
||||
// set to false, so that the original optimisation and navigation history is
|
||||
// preserved. This method is invoked also at initialisation.
|
||||
virtual void ResetNavigator() const;
|
||||
// Resets state of navigator for tracking, needed for geometry updates.
|
||||
// Resets the state of the navigator for tracking; needed for geometry updates.
|
||||
// It forces the optimisation and navigation history to be reset.
|
||||
virtual void AbortRun(G4bool softAbort=false);
|
||||
// This method safely aborts the current event loop even if an event is in progress.
|
||||
// This method is available for Geant4 states of GeomClosed and EventProc. The state
|
||||
@@ -241,7 +245,7 @@ class G4RunManager
|
||||
|
||||
G4Run* currentRun;
|
||||
G4Event* currentEvent;
|
||||
G4std::vector<G4Event*>* previousEvents;
|
||||
std::vector<G4Event*>* previousEvents;
|
||||
G4int n_perviousEventsToBeStored;
|
||||
G4int numberOfEventToBeProcessed;
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4RunMessenger.hh,v 1.11 2003/03/11 05:00:47 asaim Exp $
|
||||
// GEANT4 tag $Name: geant4-05-01 $
|
||||
// GEANT4 tag $Name: geant4-05-02 $
|
||||
//
|
||||
//
|
||||
// GEANT 4 class header file
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4UserPhysicsListMessenger.hh,v 1.15 2003/04/14 20:07:25 asaim Exp $
|
||||
// GEANT4 tag $Name: geant4-05-01 $
|
||||
// GEANT4 tag $Name: geant4-05-02 $
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------------------
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4UserRunAction.hh,v 1.7 2003/04/04 16:45:30 asaim Exp $
|
||||
// GEANT4 tag $Name: geant4-05-01 $
|
||||
// GEANT4 tag $Name: geant4-05-02 $
|
||||
//
|
||||
|
||||
#ifndef G4UserRunAction_h
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4VModularPhysicsList.hh,v 1.4 2002/05/29 12:11:08 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-05-01 $
|
||||
// $Id: G4VModularPhysicsList.hh,v 1.5 2003/06/16 17:12:50 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-05-02 $
|
||||
//
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
@@ -49,7 +49,7 @@
|
||||
|
||||
#include "globals.hh"
|
||||
#include "G4ios.hh"
|
||||
#include "g4std/vector"
|
||||
#include <vector>
|
||||
|
||||
#include "G4VUserPhysicsList.hh"
|
||||
#include "G4VPhysicsConstructor.hh"
|
||||
@@ -85,7 +85,7 @@ class G4VModularPhysicsList: public virtual G4VUserPhysicsList
|
||||
|
||||
protected: // with description
|
||||
// vector of pointers to G4VPhysicsConstructor
|
||||
typedef G4std::vector<G4VPhysicsConstructor*> G4PhysConstVector;
|
||||
typedef std::vector<G4VPhysicsConstructor*> G4PhysConstVector;
|
||||
G4PhysConstVector* physicsVector;
|
||||
};
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4VPersistencyManager.hh,v 1.4 2001/07/11 10:08:32 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-05-01 $
|
||||
// GEANT4 tag $Name: geant4-05-02 $
|
||||
//
|
||||
|
||||
#ifndef G4VPersistencyManager_h
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4VPhysicsConstructor.hh,v 1.3 2001/11/06 06:08:04 kurasige Exp $
|
||||
// GEANT4 tag $Name: geant4-05-01 $
|
||||
// GEANT4 tag $Name: geant4-05-02 $
|
||||
//
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4VUserDetectorConstruction.hh,v 1.4 2001/07/11 10:08:33 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-05-01 $
|
||||
// GEANT4 tag $Name: geant4-05-02 $
|
||||
//
|
||||
|
||||
#ifndef G4VUserDetectorConstruction_h
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4VUserPhysicsList.hh,v 1.23 2003/04/11 11:36:21 asaim Exp $
|
||||
// GEANT4 tag $Name: geant4-05-01 $
|
||||
// $Id: G4VUserPhysicsList.hh,v 1.24 2003/05/21 21:06:00 asaim Exp $
|
||||
// GEANT4 tag $Name: geant4-05-02 $
|
||||
//
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
@@ -184,7 +184,7 @@ class G4VUserPhysicsList
|
||||
void DumpCutValues(const G4String &particle_name = "ALL")
|
||||
{
|
||||
G4cerr << "WARNING !" << G4endl;
|
||||
G4cerr << " DumpCutValues() became obsolete." << G4endl;
|
||||
G4cerr << " Obsolete DumpCutValues() method is invoked for " << particle_name << G4endl;
|
||||
G4cerr << " Please use DumpCutValuesTable() instead." << G4endl;
|
||||
G4cerr << " This dummy method implementation will be removed soon." << G4endl;
|
||||
DumpCutValuesTable();
|
||||
@@ -310,7 +310,7 @@ class G4VUserPhysicsList
|
||||
// Following method is for backward compatibility and removed soon
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
protected:
|
||||
void SetCutValueForOthers(G4double cutValue)
|
||||
void SetCutValueForOthers(G4double)
|
||||
{
|
||||
G4cerr << "WARNING !" << G4endl;
|
||||
G4cerr << " SetCutValueForOthers became obsolete." << G4endl;
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4VUserPrimaryGeneratorAction.hh,v 1.4 2001/07/11 10:08:33 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-05-01 $
|
||||
// GEANT4 tag $Name: geant4-05-02 $
|
||||
//
|
||||
|
||||
#ifndef G4VUserPrimaryGeneratorAction_h
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4ExceptionHandler.cc,v 1.2 2002/12/04 21:52:40 asaim Exp $
|
||||
// GEANT4 tag $Name: geant4-05-01 $
|
||||
// $Id: G4ExceptionHandler.cc,v 1.3 2003/05/21 21:06:01 asaim Exp $
|
||||
// GEANT4 tag $Name: geant4-05-02 $
|
||||
//
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
@@ -47,15 +47,13 @@ G4ExceptionHandler::~G4ExceptionHandler()
|
||||
{
|
||||
}
|
||||
|
||||
G4ExceptionHandler::G4ExceptionHandler(const G4ExceptionHandler &right)
|
||||
G4ExceptionHandler::G4ExceptionHandler(const G4ExceptionHandler &)
|
||||
:G4VExceptionHandler()
|
||||
{
|
||||
*this = right;
|
||||
}
|
||||
|
||||
G4ExceptionHandler& G4ExceptionHandler::operator=(const G4ExceptionHandler &right)
|
||||
G4ExceptionHandler& G4ExceptionHandler::operator=(const G4ExceptionHandler &)
|
||||
{
|
||||
if (&right == this) return *this;
|
||||
*this = right;
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4Run.cc,v 1.5 2003/04/23 17:54:31 asaim Exp $
|
||||
// GEANT4 tag $Name: geant4-05-01 $
|
||||
// GEANT4 tag $Name: geant4-05-02 $
|
||||
//
|
||||
|
||||
#include "G4Run.hh"
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4RunManager.cc,v 1.75 2003/04/24 17:42:06 asaim Exp $
|
||||
// GEANT4 tag $Name: geant4-05-01 $
|
||||
// $Id: G4RunManager.cc,v 1.81 2003/06/19 13:05:13 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-05-02 $
|
||||
//
|
||||
//
|
||||
|
||||
@@ -41,6 +41,7 @@
|
||||
#include "G4VUserPrimaryGeneratorAction.hh"
|
||||
#include "G4GeometryManager.hh"
|
||||
#include "G4SDManager.hh"
|
||||
#include "G4Navigator.hh"
|
||||
#include "G4TransportationManager.hh"
|
||||
#include "G4VPhysicalVolume.hh"
|
||||
#include "G4LogicalVolume.hh"
|
||||
@@ -59,7 +60,7 @@
|
||||
#include "G4Material.hh"
|
||||
#include "G4ExceptionHandler.hh"
|
||||
#include "G4ios.hh"
|
||||
#include "g4std/strstream"
|
||||
#include <strstream>
|
||||
|
||||
G4RunManager* G4RunManager::fRunManager = 0;
|
||||
|
||||
@@ -99,13 +100,13 @@ G4RunManager::G4RunManager()
|
||||
eventManager = new G4EventManager();
|
||||
timer = new G4Timer();
|
||||
runMessenger = new G4RunMessenger(this);
|
||||
previousEvents = new G4std::vector<G4Event*>;
|
||||
previousEvents = new std::vector<G4Event*>;
|
||||
defaultRegion = new G4Region("DefaultRegionForTheWorld");
|
||||
defaultRegion->SetProductionCuts(G4ProductionCutsTable::GetProductionCutsTable()->GetDefaultProductionCuts());
|
||||
G4ParticleTable::GetParticleTable()->CreateMessenger();
|
||||
G4ProcessTable::GetProcessTable()->CreateMessenger();
|
||||
randomNumberStatusDir = "./";
|
||||
versionString = " Geant4 version $Name: geant4-05-01 $\n (30-Apr-2003)";
|
||||
versionString = " Geant4 version $Name: geant4-05-02 $\n (27-June-2003)";
|
||||
G4cout
|
||||
<< "**********************************************" << G4endl
|
||||
<< versionString << G4endl
|
||||
@@ -329,8 +330,8 @@ G4Event* G4RunManager::GenerateEvent(G4int i_event)
|
||||
void G4RunManager::AnalyzeEvent(G4Event* anEvent)
|
||||
{
|
||||
G4VPersistencyManager* fPersM = G4VPersistencyManager::GetPersistencyManager();
|
||||
if(fPersM) fPersM->Store(currentEvent);
|
||||
currentRun->RecordEvent(currentEvent);
|
||||
if(fPersM) fPersM->Store(anEvent);
|
||||
currentRun->RecordEvent(anEvent);
|
||||
}
|
||||
|
||||
void G4RunManager::RunTermination()
|
||||
@@ -395,7 +396,7 @@ void G4RunManager::InitializeGeometry()
|
||||
}
|
||||
|
||||
if(verboseLevel>1) G4cout << "userDetector->Construct() start." << G4endl;
|
||||
DefineWorldVolume(userDetector->Construct());
|
||||
DefineWorldVolume(userDetector->Construct(),false);
|
||||
geometryInitialized = true;
|
||||
}
|
||||
|
||||
@@ -485,11 +486,10 @@ void G4RunManager::AbortEvent()
|
||||
}
|
||||
}
|
||||
|
||||
void G4RunManager::DefineWorldVolume(G4VPhysicalVolume* worldVol)
|
||||
void G4RunManager::DefineWorldVolume(G4VPhysicalVolume* worldVol,
|
||||
G4bool topologyIsChanged)
|
||||
{
|
||||
// check if this is different from previous
|
||||
//////if(currentWorld==worldVol) return;
|
||||
// The world volume MUST NOT have a region defined by the user.
|
||||
// The world volume MUST NOT have a region defined by the user
|
||||
if(worldVol->GetLogicalVolume()->GetRegion())
|
||||
{
|
||||
if(worldVol->GetLogicalVolume()->GetRegion()!=defaultRegion)
|
||||
@@ -503,29 +503,41 @@ void G4RunManager::DefineWorldVolume(G4VPhysicalVolume* worldVol)
|
||||
"World would have a default region assigned by RunManager.");
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
// Remove old world logical volume from the default region, if exist
|
||||
if(defaultRegion->GetNumberOfRootVolumes())
|
||||
{
|
||||
// set the default region to the world
|
||||
G4LogicalVolume* worldLog = worldVol->GetLogicalVolume();
|
||||
worldLog->SetRegion(defaultRegion);
|
||||
defaultRegion->AddRootLogicalVolume(worldLog);
|
||||
if(defaultRegion->GetNumberOfRootVolumes()>size_t(1))
|
||||
{
|
||||
G4Exception("G4RunManager::DefineWorldVolume",
|
||||
"RUN:DefaultRegionHasMoreThanOneVolume",
|
||||
FatalException,
|
||||
"Default world region should have a unique logical volume.");
|
||||
}
|
||||
std::vector<G4LogicalVolume*>::iterator lvItr
|
||||
= defaultRegion->GetRootLogicalVolumeIterator();
|
||||
defaultRegion->RemoveRootLogicalVolume(*lvItr);
|
||||
if(verboseLevel>1) G4cout << (*lvItr)->GetName()
|
||||
<< " is removed from the default region." << G4endl;
|
||||
}
|
||||
|
||||
// Set the default region to the world
|
||||
G4LogicalVolume* worldLog = worldVol->GetLogicalVolume();
|
||||
worldLog->SetRegion(defaultRegion);
|
||||
defaultRegion->AddRootLogicalVolume(worldLog);
|
||||
if(verboseLevel>1) G4cout << worldLog->GetName()
|
||||
<< " is registered to the default region." << G4endl;
|
||||
|
||||
// Set the world volume, notify the Navigator and reset its state
|
||||
currentWorld = worldVol;
|
||||
//geometryNeedsToBeClosed = true;
|
||||
GeometryHasBeenModified();
|
||||
|
||||
// set the world volume to the Navigator
|
||||
//ResetNavigator();
|
||||
G4TransportationManager::GetTransportationManager()
|
||||
->GetNavigatorForTracking()
|
||||
->SetWorldVolume(worldVol);
|
||||
//ResetNavigator();
|
||||
->GetNavigatorForTracking()
|
||||
->SetWorldVolume(worldVol);
|
||||
if (topologyIsChanged) ResetNavigator();
|
||||
|
||||
// Let VisManager know it
|
||||
// Notify the VisManager as well
|
||||
G4VVisManager* pVVisManager = G4VVisManager::GetConcreteInstance();
|
||||
if(pVVisManager) pVVisManager->GeometryHasChanged();
|
||||
|
||||
}
|
||||
|
||||
void G4RunManager::ResetNavigator() const
|
||||
@@ -542,12 +554,20 @@ void G4RunManager::ResetNavigator() const
|
||||
return;
|
||||
}
|
||||
|
||||
// We have to tweak the navigator's state in case a geometry has been modified between runs
|
||||
// By the following call we ensure that navigator's state is reset properly
|
||||
// We have to tweak the navigator's state in case a geometry has been
|
||||
// modified between runs. By the following calls we ensure that navigator's
|
||||
// state is reset properly. It is required the geometry to be closed
|
||||
// and previous optimisations to be cleared.
|
||||
|
||||
G4GeometryManager* geomManager = G4GeometryManager::GetInstance();
|
||||
if(verboseLevel>1) G4cout << "Start closing geometry." << G4endl;
|
||||
geomManager->OpenGeometry();
|
||||
geomManager->CloseGeometry(geometryToBeOptimized, verboseLevel>1);
|
||||
|
||||
G4ThreeVector center(0,0,0);
|
||||
G4TransportationManager::GetTransportationManager()
|
||||
->GetNavigatorForTracking()
|
||||
->LocateGlobalPointAndSetup(center,0,false);
|
||||
G4Navigator* navigator =
|
||||
G4TransportationManager::GetTransportationManager()->GetNavigatorForTracking();
|
||||
navigator->LocateGlobalPointAndSetup(center,0,false);
|
||||
}
|
||||
|
||||
void G4RunManager::rndmSaveThisRun()
|
||||
@@ -563,7 +583,7 @@ void G4RunManager::rndmSaveThisRun()
|
||||
|
||||
G4String fileIn = randomNumberStatusDir + "currentRun.rndm";
|
||||
|
||||
G4std::ostrstream os;
|
||||
std::ostrstream os;
|
||||
os << "run" << runNumber << ".rndm" << '\0';
|
||||
G4String fileOut = randomNumberStatusDir + os.str();
|
||||
|
||||
@@ -583,7 +603,7 @@ void G4RunManager::rndmSaveThisEvent()
|
||||
|
||||
G4String fileIn = randomNumberStatusDir + "currentEvent.rndm";
|
||||
|
||||
G4std::ostrstream os;
|
||||
std::ostrstream os;
|
||||
os << "run" << currentRun->GetRunID() << "evt" << currentEvent->GetEventID()
|
||||
<< ".rndm" << '\0';
|
||||
G4String fileOut = randomNumberStatusDir + os.str();
|
||||
@@ -596,7 +616,7 @@ void G4RunManager::rndmSaveThisEvent()
|
||||
void G4RunManager::RestoreRandomNumberStatus(G4String fileN)
|
||||
{
|
||||
G4String fileNameWithDirectory;
|
||||
if(fileN.index("/")==G4std::string::npos)
|
||||
if(fileN.index("/")==std::string::npos)
|
||||
{ fileNameWithDirectory = randomNumberStatusDir+fileN; }
|
||||
else
|
||||
{ fileNameWithDirectory = fileN; }
|
||||
@@ -624,7 +644,7 @@ void G4RunManager::DumpRegion(G4Region* region) const
|
||||
{
|
||||
G4cout << "Region " << region->GetName() << G4endl;
|
||||
G4cout << " Materials : ";
|
||||
G4std::vector<G4Material*>::const_iterator mItr = region->GetMaterialIterator();
|
||||
std::vector<G4Material*>::const_iterator mItr = region->GetMaterialIterator();
|
||||
size_t nMaterial = region->GetNumberOfMaterials();
|
||||
for(size_t iMate=0;iMate<nMaterial;iMate++)
|
||||
{
|
||||
@@ -640,6 +660,3 @@ void G4RunManager::DumpRegion(G4Region* region) const
|
||||
<< G4endl;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4RunMessenger.cc,v 1.17 2003/04/03 18:43:32 asaim Exp $
|
||||
// GEANT4 tag $Name: geant4-05-01 $
|
||||
// $Id: G4RunMessenger.cc,v 1.18 2003/06/16 17:12:52 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-05-02 $
|
||||
//
|
||||
|
||||
#include "G4RunMessenger.hh"
|
||||
@@ -37,7 +37,7 @@
|
||||
#include "G4UImanager.hh"
|
||||
#include "G4ProductionCutsTable.hh"
|
||||
#include "G4ios.hh"
|
||||
#include "g4std/strstream"
|
||||
#include <strstream>
|
||||
|
||||
G4RunMessenger::G4RunMessenger(G4RunManager * runMgr)
|
||||
:runManager(runMgr)
|
||||
@@ -237,7 +237,7 @@ void G4RunMessenger::SetNewValue(G4UIcommand * command,G4String newValue)
|
||||
G4int nev;
|
||||
G4int ns;
|
||||
const char* nv = (const char*)newValue;
|
||||
G4std::istrstream is((char*)nv);
|
||||
std::istrstream is((char*)nv);
|
||||
is >> nev >> macroFileName >> ns;
|
||||
if(macroFileName=="***NULL***")
|
||||
{ runManager->BeamOn(nev); }
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4UserPhysicsListMessenger.cc,v 1.22 2003/04/28 22:54:37 asaim Exp $
|
||||
// GEANT4 tag $Name: geant4-05-01 $
|
||||
// $Id: G4UserPhysicsListMessenger.cc,v 1.23 2003/06/16 17:12:53 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-05-02 $
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------------------
|
||||
@@ -209,7 +209,7 @@ void G4UserPhysicsListMessenger::SetNewValue(G4UIcommand * command,G4String newV
|
||||
//G4String cValue = G4String(next())+" "+G4String(next());
|
||||
//G4double newCut = setCutCmd->GetNewDoubleValue(cValue);
|
||||
//thePhysicsList->SetCutsForRegion(newCut,rName);
|
||||
G4std::istrstream is(newValue);
|
||||
std::istrstream is(newValue);
|
||||
char regName[50];
|
||||
G4double cVal;
|
||||
char uniName[10];
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4UserRunAction.cc,v 1.5 2003/03/10 01:50:21 asaim Exp $
|
||||
// GEANT4 tag $Name: geant4-05-01 $
|
||||
// $Id: G4UserRunAction.cc,v 1.6 2003/05/21 21:06:01 asaim Exp $
|
||||
// GEANT4 tag $Name: geant4-05-02 $
|
||||
//
|
||||
|
||||
#include "G4UserRunAction.hh"
|
||||
@@ -36,9 +36,9 @@ G4UserRunAction::~G4UserRunAction()
|
||||
G4Run* G4UserRunAction::GenerateRun()
|
||||
{ return 0; }
|
||||
|
||||
void G4UserRunAction::BeginOfRunAction(const G4Run* aRun)
|
||||
void G4UserRunAction::BeginOfRunAction(const G4Run*)
|
||||
{;}
|
||||
|
||||
void G4UserRunAction::EndOfRunAction(const G4Run* aRun)
|
||||
void G4UserRunAction::EndOfRunAction(const G4Run*)
|
||||
{;}
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4VModularPhysicsList.cc,v 1.2 2002/05/29 12:11:08 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-05-01 $
|
||||
// GEANT4 tag $Name: geant4-05-02 $
|
||||
//
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4VPersistencyManager.cc,v 1.4 2001/07/13 15:57:06 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-05-01 $
|
||||
// GEANT4 tag $Name: geant4-05-02 $
|
||||
//
|
||||
|
||||
#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-05-01 $
|
||||
// GEANT4 tag $Name: geant4-05-02 $
|
||||
//
|
||||
|
||||
#include "G4VUserDetectorConstruction.hh"
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4VUserPhysicsList.cc,v 1.41 2003/04/25 13:28:31 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-05-01 $
|
||||
// $Id: G4VUserPhysicsList.cc,v 1.45 2003/06/19 13:20:28 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-05-02 $
|
||||
//
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
@@ -30,18 +30,15 @@
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
// History
|
||||
// first version 09 Jan. 1998 by H.Kurashige
|
||||
// modified 24 Jan. 1998 by H.Kurashige
|
||||
// modified 06 June 1998 by H.Kurashige
|
||||
// add G4ParticleWithCuts::SetEnergyRange
|
||||
// 18 June 1998 by H.Kurashige
|
||||
// modifeid for short lived particles 27 June 1998 by H.Kurashige
|
||||
// G4BestUnit on output 12 nov. 1998 mma
|
||||
// Added RemoveProcessManager 9 Feb. 1999 by H.Kurashige
|
||||
// Fixed RemoveProcessManager 15 Apr. 1999 by H.Kurashige
|
||||
// Removed ConstructAllParticles() 15 Apr. 1999 by H.Kurashige
|
||||
// modified 08, Mar 2001 by H.Kurashige
|
||||
// modified for CUTS per REGION 10, Oct 2002 by H.Kurashige
|
||||
// first version 09 Jan 1998 by H.Kurashige
|
||||
// Added SetEnergyRange 18 Jun 1998 by H.Kurashige
|
||||
// Change for short lived particles 27 Jun 1998 by H.Kurashige
|
||||
// G4BestUnit on output 12 nov 1998 by M.Maire
|
||||
// Added RemoveProcessManager 9 Feb 1999 by H.Kurashige
|
||||
// Fixed RemoveProcessManager 15 Apr 1999 by H.Kurashige
|
||||
// Removed ConstructAllParticles() 15 Apr 1999 by H.Kurashige
|
||||
// Modified for CUTS per REGION 10 Oct 2002 by H.Kurashige
|
||||
// Check if particle IsShortLived 18 Jun 2003 by V.Ivanchenko
|
||||
// ------------------------------------------------------------
|
||||
|
||||
#include "globals.hh"
|
||||
@@ -61,8 +58,8 @@
|
||||
#include "G4MaterialCutsCouple.hh"
|
||||
|
||||
#include "G4ios.hh"
|
||||
#include "g4std/iomanip"
|
||||
#include "g4std/fstream"
|
||||
#include <iomanip>
|
||||
#include <fstream>
|
||||
|
||||
////////////////////////////////////////////////////////
|
||||
G4VUserPhysicsList::G4VUserPhysicsList()
|
||||
@@ -151,7 +148,7 @@ void G4VUserPhysicsList::AddProcessManager(G4ParticleDefinition* newParticle,
|
||||
newParticle->SetProcessManager(newManager);
|
||||
|
||||
#ifdef G4VERBOSE
|
||||
if (verboseLevel >2){
|
||||
if (verboseLevel >2){
|
||||
G4cout << "G4VUserPhysicsList::AddProcessManager: ";
|
||||
G4cout << "adds ProcessManager to ";
|
||||
G4cout << newParticle->GetParticleName() << G4endl;
|
||||
@@ -402,21 +399,19 @@ void G4VUserPhysicsList::BuildPhysicsTable(G4ParticleDefinition* particle)
|
||||
G4cout << " for " << particle->GetParticleName() << G4endl;
|
||||
}
|
||||
#endif
|
||||
G4int j;
|
||||
// Rebuild the physics tables for every process for this particle type
|
||||
G4ProcessVector* pVector = (particle->GetProcessManager())->GetProcessList();
|
||||
for ( j=0; j < pVector->size(); ++j) {
|
||||
(*pVector)[j]->BuildPhysicsTable(*particle);
|
||||
}
|
||||
for ( j=0; j < pVector->size(); ++j) {
|
||||
// temporary addition to make the integral schema
|
||||
BuildIntegralPhysicsTable((*pVector)[j], particle);
|
||||
// if particle is not ShortLived
|
||||
if(!particle->IsShortLived()) {
|
||||
G4ProcessVector* pVector = particle->GetProcessManager()->GetProcessList();
|
||||
for (G4int j=0; j < pVector->size(); ++j) {
|
||||
(*pVector)[j]->BuildPhysicsTable(*particle);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////
|
||||
void G4VUserPhysicsList::BuildIntegralPhysicsTable(G4VProcess* process,
|
||||
G4ParticleDefinition* particle)
|
||||
G4ParticleDefinition* particle)
|
||||
{
|
||||
//*********************************************************************
|
||||
// temporary addition to make the integral schema of electromagnetic
|
||||
@@ -431,7 +426,7 @@ void G4VUserPhysicsList::BuildIntegralPhysicsTable(G4VProcess* process,
|
||||
(process->GetProcessName() == "IMuIoni") ||
|
||||
(process->GetProcessName() == "IMuBrems") ||
|
||||
(process->GetProcessName() == "IMuPairProd") ) {
|
||||
#ifdef G4VERBOSE
|
||||
#ifdef G4VERBOSE
|
||||
if (verboseLevel>2){
|
||||
G4cout << "G4VUserPhysicsList::BuildIntegralPhysicsTable ";
|
||||
G4cout << " BuildPhysicsTable is invoked for ";
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4VUserPrimaryGeneratorAction.cc,v 1.3 2001/07/11 10:08:34 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-05-01 $
|
||||
// GEANT4 tag $Name: geant4-05-02 $
|
||||
//
|
||||
|
||||
#include "G4VUserPrimaryGeneratorAction.hh"
|
||||
|
||||
Reference in New Issue
Block a user