Import Geant4 10.5.0.beta source tree
This commit is contained in:
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4Event.cc 99158 2016-09-07 08:10:46Z gcosmo $
|
||||
// $Id: G4Event.cc 110273 2018-05-17 14:43:43Z gcosmo $
|
||||
//
|
||||
|
||||
// G4Event
|
||||
@@ -37,7 +37,11 @@
|
||||
#include "G4VDigiCollection.hh"
|
||||
#include "G4ios.hh"
|
||||
|
||||
G4ThreadLocal G4Allocator<G4Event> *anEventAllocator = nullptr;
|
||||
G4Allocator<G4Event>*& anEventAllocator()
|
||||
{
|
||||
G4ThreadLocalStatic G4Allocator<G4Event>* _instance = nullptr;
|
||||
return _instance;
|
||||
}
|
||||
|
||||
G4Event::G4Event()
|
||||
:eventID(0),
|
||||
|
||||
@@ -24,13 +24,17 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4HEPEvtParticle.cc 69010 2013-04-15 09:34:16Z gcosmo $
|
||||
// $Id: G4HEPEvtParticle.cc 110273 2018-05-17 14:43:43Z gcosmo $
|
||||
//
|
||||
//
|
||||
|
||||
#include "G4HEPEvtParticle.hh"
|
||||
|
||||
G4ThreadLocal G4Allocator<G4HEPEvtParticle> *aHEPEvtParticleAllocator = 0;
|
||||
G4Allocator<G4HEPEvtParticle>*& aHEPEvtParticleAllocator()
|
||||
{
|
||||
G4ThreadLocalStatic G4Allocator<G4HEPEvtParticle>* _instance = nullptr;
|
||||
return _instance;
|
||||
}
|
||||
|
||||
G4HEPEvtParticle::G4HEPEvtParticle()
|
||||
: theParticle(0), ISTHEP(1), JDAHEP1(1), JDAHEP2(1)
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4ParticleGunMessenger.cc 108473 2018-02-15 14:15:09Z gcosmo $
|
||||
// $Id: G4ParticleGunMessenger.cc 108396 2018-02-12 10:19:18Z gcosmo $
|
||||
//
|
||||
|
||||
#include "G4ParticleGunMessenger.hh"
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4StackManager.cc 106992 2017-10-31 10:14:18Z gcosmo $
|
||||
// $Id: G4StackManager.cc 109173 2018-04-03 06:51:03Z gcosmo $
|
||||
//
|
||||
//
|
||||
// Last Modification : 09/Dec/96 M.Asai
|
||||
@@ -94,114 +94,23 @@ G4int G4StackManager::PushOneTrack(G4Track *newTrack,G4VTrajectory *newTrajector
|
||||
const G4ParticleDefinition* pd = newTrack->GetParticleDefinition();
|
||||
if(pd->GetParticleDefinitionID() < 0)
|
||||
{
|
||||
#ifdef G4VERBOSE
|
||||
G4ExceptionDescription ED;
|
||||
if(verboseLevel>0) {
|
||||
ED << "A track without proper process manager is pushed into the track stack.\n"
|
||||
<< " Particle name : " << pd->GetParticleName() << " -- ";
|
||||
if(newTrack->GetParentID()<0)
|
||||
{ ED << "created by a primary particle generator."; }
|
||||
else
|
||||
{
|
||||
const G4VProcess* vp = newTrack->GetCreatorProcess();
|
||||
if(vp)
|
||||
{ ED << "created by " << vp->GetProcessName() << "."; }
|
||||
else
|
||||
{ ED << "creaded by unknown process."; }
|
||||
}
|
||||
}
|
||||
#endif
|
||||
//// Temporal care of setting process manager for general ion.
|
||||
if(pd->IsGeneralIon())
|
||||
{
|
||||
#ifdef G4VERBOSE
|
||||
if( verboseLevel > 0 ) {
|
||||
ED << "\n Process manager is temporally set, but this operation is thread-unsafe\n"
|
||||
<< "and will be replaced with other methods at version 10.0.";
|
||||
G4Exception("G4StackManager::PushOneTrack","Event10051",JustWarning,ED);
|
||||
}
|
||||
#endif
|
||||
G4ParticleDefinition* genericIon = G4ParticleTable::GetParticleTable()->GetGenericIon();
|
||||
G4ProcessManager* pman=0;
|
||||
if (genericIon!=0) pman = genericIon->GetProcessManager();
|
||||
if ((genericIon ==0) || (pman==0)){
|
||||
G4Exception( "G4IonTable::AddProcessManager()","PART10052", FatalException,
|
||||
"Can not define process manager. GenericIon is not available.");
|
||||
}
|
||||
G4ParticleDefinition* ion = const_cast<G4ParticleDefinition*>(pd);
|
||||
ion->SetParticleDefinitionID(genericIon->GetParticleDefinitionID());
|
||||
#ifdef G4VERBOSE
|
||||
if( verboseLevel > 1 )
|
||||
{
|
||||
G4ProcessManager* ionPman = ion->GetProcessManager();
|
||||
G4cout << "Now " << ion->GetParticleName() << " has a process manaegr at " << ionPman
|
||||
<< " that is equivalent to " << pman << G4endl;
|
||||
G4ProcessVector* ionPvec = ionPman->GetProcessList();
|
||||
for(G4int ip1=0;ip1<ionPvec->size();ip1++)
|
||||
{
|
||||
G4cout << " " << ip1 << " - " << (*ionPvec)[ip1]->GetProcessName()
|
||||
<< " AtRest " << ionPman->GetAtRestIndex((*ionPvec)[ip1])
|
||||
<< ", AlongStep " << ionPman->GetAlongStepIndex((*ionPvec)[ip1])
|
||||
<< ", PostStep " << ionPman->GetPostStepIndex((*ionPvec)[ip1])
|
||||
<< G4endl;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
//// End of temporal care of setting process manager
|
||||
#ifdef G4MUATOMS_INUSE
|
||||
//// Setting process manager for muonic atom (a temporary solution)
|
||||
if(pd->IsMuonicAtom())
|
||||
{
|
||||
#ifdef G4VERBOSE
|
||||
if( verboseLevel > 0 ) {
|
||||
ED << "\n Process manager is temporally set, but this operation is thread-unsafe\n"
|
||||
<< "and will be replaced with other methods at version 10.0.";
|
||||
G4Exception("G4StackManager::PushOneTrack","Event10051",JustWarning,ED);
|
||||
}
|
||||
#endif
|
||||
G4ParticleDefinition* genericMA =
|
||||
G4ParticleTable::GetParticleTable()->GetGenericMuonicAtom();
|
||||
G4ProcessManager* pman=nullptr;
|
||||
if (genericMA!=nullptr) pman = genericMA->GetProcessManager();
|
||||
if ((genericMA == nullptr) || (pman== nullptr)){
|
||||
G4Exception( "G4IonTable::AddProcessManager()","PART10052", FatalException,
|
||||
"Can not define process manager. GenericIon is not available.");
|
||||
}
|
||||
G4ParticleDefinition* muAtom = const_cast<G4ParticleDefinition*>(pd);
|
||||
muAtom->SetParticleDefinitionID(genericMA->GetParticleDefinitionID());
|
||||
#ifdef G4VERBOSE
|
||||
if( verboseLevel > 1 )
|
||||
{
|
||||
G4ProcessManager* muAtomPman = muAtom->GetProcessManager();
|
||||
G4cout << "Now " << muAtom->GetParticleName() << " has a process manager at " << muAtomPman
|
||||
<< " that is equivalent to " << pman << G4endl;
|
||||
G4ProcessVector* muAtomPvec = muAtomPman->GetProcessList();
|
||||
for(G4int ip1=0;ip1<muAtomPvec->size();ip1++)
|
||||
{
|
||||
G4cout << " " << ip1 << " - " << (*muAtomPvec)[ip1]->GetProcessName()
|
||||
<< " AtRest " << muAtomPman->GetAtRestIndex((*muAtomPvec)[ip1])
|
||||
<< ", AlongStep " << muAtomPman->GetAlongStepIndex((*muAtomPvec)[ip1])
|
||||
<< ", PostStep " << muAtomPman->GetPostStepIndex((*muAtomPvec)[ip1])
|
||||
<< G4endl;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
//// End of Setting process manager for muonic atom (a temporary solution)
|
||||
#endif
|
||||
ED << "A track without proper process manager is pushed into the track stack.\n"
|
||||
<< " Particle name : " << pd->GetParticleName() << " -- ";
|
||||
if(newTrack->GetParentID()<0)
|
||||
{ ED << "created by a primary particle generator."; }
|
||||
else
|
||||
{
|
||||
#ifdef G4VERBOSE
|
||||
if( verboseLevel > 0 ) {
|
||||
ED << "\nThis track is deleted.";
|
||||
G4Exception("G4StackManager::PushOneTrack","Event10051",
|
||||
JustWarning,ED);
|
||||
}
|
||||
#endif
|
||||
delete newTrack;
|
||||
return GetNUrgentTrack();
|
||||
{
|
||||
const G4VProcess* vp = newTrack->GetCreatorProcess();
|
||||
if(vp)
|
||||
{ ED << "created by " << vp->GetProcessName() << "."; }
|
||||
else
|
||||
{ ED << "creaded by unknown process."; }
|
||||
}
|
||||
G4Exception("G4StackManager::PushOneTrack","Event10051",
|
||||
FatalException,ED);
|
||||
delete newTrack;
|
||||
return GetNUrgentTrack();
|
||||
}
|
||||
|
||||
G4ClassificationOfNewTrack classification = DefaultClassification( newTrack );
|
||||
|
||||
@@ -24,12 +24,16 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4TrajectoryContainer.cc 69010 2013-04-15 09:34:16Z gcosmo $
|
||||
// $Id: G4TrajectoryContainer.cc 110273 2018-05-17 14:43:43Z gcosmo $
|
||||
//
|
||||
|
||||
#include "G4TrajectoryContainer.hh"
|
||||
|
||||
G4ThreadLocal G4Allocator<G4TrajectoryContainer> *aTrajectoryContainerAllocator = 0;
|
||||
G4Allocator<G4TrajectoryContainer>*& aTrajectoryContainerAllocator()
|
||||
{
|
||||
G4ThreadLocalStatic G4Allocator<G4TrajectoryContainer>* _instance = nullptr;
|
||||
return _instance;
|
||||
}
|
||||
|
||||
G4TrajectoryContainer::G4TrajectoryContainer()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user