Import Geant4 8.3.0 source tree
This commit is contained in:
@@ -24,8 +24,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4Event.cc,v 1.11 2006/11/03 03:11:13 asaim Exp $
|
||||
// GEANT4 tag $Name: geant4-08-02 $
|
||||
// $Id: G4Event.cc,v 1.14 2007/03/07 02:44:16 asaim Exp $
|
||||
// GEANT4 tag $Name: geant4-08-03 $
|
||||
//
|
||||
|
||||
// G4Event
|
||||
@@ -44,14 +44,18 @@ G4Event::G4Event()
|
||||
:eventID(0),
|
||||
thePrimaryVertex(0),numberOfPrimaryVertex(0),
|
||||
HC(0),DC(0),trajectoryContainer(0),eventAborted(false),userInfo(0),
|
||||
validRandomNumberStatus(false),keepTheEvent(false)
|
||||
randomNumberStatus(0),validRandomNumberStatus(false),
|
||||
randomNumberStatusForProcessing(0),validRandomNumberStatusForProcessing(false),
|
||||
keepTheEvent(false)
|
||||
{;}
|
||||
|
||||
G4Event::G4Event(G4int evID)
|
||||
:eventID(evID),
|
||||
thePrimaryVertex(0),numberOfPrimaryVertex(0),
|
||||
HC(0),DC(0),trajectoryContainer(0),eventAborted(false),userInfo(0),
|
||||
validRandomNumberStatus(false),keepTheEvent(false)
|
||||
randomNumberStatus(0),validRandomNumberStatus(false),
|
||||
randomNumberStatusForProcessing(0),validRandomNumberStatusForProcessing(false),
|
||||
keepTheEvent(false)
|
||||
{;}
|
||||
|
||||
G4Event::~G4Event()
|
||||
@@ -65,6 +69,8 @@ G4Event::~G4Event()
|
||||
delete trajectoryContainer;
|
||||
}
|
||||
if(userInfo) delete userInfo;
|
||||
if(validRandomNumberStatus) delete randomNumberStatus;
|
||||
if(validRandomNumberStatusForProcessing) delete randomNumberStatusForProcessing;
|
||||
}
|
||||
|
||||
G4int G4Event::operator==(const G4Event &right) const
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4EventManager.cc,v 1.26 2006/11/03 03:11:13 asaim Exp $
|
||||
// GEANT4 tag $Name: geant4-08-02 $
|
||||
// $Id: G4EventManager.cc,v 1.30 2007/03/08 23:56:12 asaim Exp $
|
||||
// GEANT4 tag $Name: geant4-08-03 $
|
||||
//
|
||||
//
|
||||
//
|
||||
@@ -49,7 +49,8 @@ G4EventManager* G4EventManager::GetEventManager()
|
||||
|
||||
G4EventManager::G4EventManager()
|
||||
:currentEvent(0),trajectoryContainer(0),
|
||||
verboseLevel(0),tracking(false),abortRequested(false)
|
||||
verboseLevel(0),tracking(false),abortRequested(false),
|
||||
storetRandomNumberStatusToG4Event(false)
|
||||
{
|
||||
if(fpEventManager)
|
||||
{
|
||||
@@ -108,9 +109,13 @@ void G4EventManager::DoProcessing(G4Event* anEvent)
|
||||
}
|
||||
currentEvent = anEvent;
|
||||
stateManager->SetNewState(G4State_EventProc);
|
||||
std::ostringstream oss;
|
||||
CLHEP::HepRandom::saveFullState(oss);
|
||||
currentEvent->SetRandomNumberStatusForProcessing(oss.str());
|
||||
if(storetRandomNumberStatusToG4Event>1)
|
||||
{
|
||||
std::ostringstream oss;
|
||||
CLHEP::HepRandom::saveFullState(oss);
|
||||
randomNumberStatusToG4Event = oss.str();
|
||||
currentEvent->SetRandomNumberStatusForProcessing(randomNumberStatusToG4Event);
|
||||
}
|
||||
|
||||
// Reseting Navigator has been moved to G4Eventmanager, so that resetting
|
||||
// is now done for every event.
|
||||
@@ -334,15 +339,19 @@ void G4EventManager::ProcessOneEvent(G4Event* anEvent)
|
||||
#include "G4HepMCInterface.hh"
|
||||
void G4EventManager::ProcessOneEvent(const HepMC::GenEvent* hepmcevt,G4Event* anEvent)
|
||||
{
|
||||
static G4String randStat;
|
||||
trackIDCounter = 0;
|
||||
G4bool tempEvent = false;
|
||||
if(!anEvent)
|
||||
{
|
||||
anEvent = new G4Event();
|
||||
tempEvent = true;
|
||||
}
|
||||
if(storetRandomNumberStatusToG4Event==1 || storetRandomNumberStatusToG4Event==3)
|
||||
{
|
||||
std::ostringstream oss;
|
||||
CLHEP::HepRandom::saveFullState(oss);
|
||||
anEvent->SetRandomNumberStatus(oss.str());
|
||||
anEvent->SetRandomNumberStatus(randStat=oss.str());
|
||||
}
|
||||
G4HepMCInterface::HepMC2G4(hepmcevt,anEvent);
|
||||
DoProcessing(anEvent);
|
||||
@@ -353,15 +362,19 @@ void G4EventManager::ProcessOneEvent(const HepMC::GenEvent* hepmcevt,G4Event* an
|
||||
|
||||
void G4EventManager::ProcessOneEvent(G4TrackVector* trackVector,G4Event* anEvent)
|
||||
{
|
||||
static G4String randStat;
|
||||
trackIDCounter = 0;
|
||||
G4bool tempEvent = false;
|
||||
if(!anEvent)
|
||||
{
|
||||
anEvent = new G4Event();
|
||||
tempEvent = true;
|
||||
}
|
||||
if(storetRandomNumberStatusToG4Event==1 || storetRandomNumberStatusToG4Event==3)
|
||||
{
|
||||
std::ostringstream oss;
|
||||
CLHEP::HepRandom::saveFullState(oss);
|
||||
anEvent->SetRandomNumberStatus(oss.str());
|
||||
anEvent->SetRandomNumberStatus(randStat=oss.str());
|
||||
}
|
||||
StackTracks(trackVector,false);
|
||||
DoProcessing(anEvent);
|
||||
|
||||
Reference in New Issue
Block a user