Import Geant4 5.0.0 source tree
This commit is contained in:
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4ProcessPlacer.cc,v 1.6 2002/05/31 10:16:02 dressel Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// $Id: G4ProcessPlacer.cc,v 1.11 2002/11/04 10:47:56 dressel Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// GEANT 4 class source file
|
||||
@@ -37,28 +37,30 @@
|
||||
#include "G4ParticleTable.hh"
|
||||
|
||||
G4ProcessPlacer::G4ProcessPlacer(const G4String &particlename)
|
||||
: G4VProcessPlacer(particlename),
|
||||
fParticleName(particlename)
|
||||
{
|
||||
G4cout << "+++ G4ProcessPlacer::G4ProcessPlacer: for: " << particlename
|
||||
<< G4endl;
|
||||
}
|
||||
: fParticleName(particlename)
|
||||
{}
|
||||
|
||||
G4ProcessPlacer::~G4ProcessPlacer()
|
||||
{}
|
||||
|
||||
void G4ProcessPlacer::RemoveProcess(G4VProcess *process){
|
||||
G4cout << "=== G4ProcessPlacer::RemoveProcess: for: " << fParticleName
|
||||
<< G4endl;
|
||||
G4cout << " ProcessName: " << process->GetProcessName()
|
||||
<< ", will be removed!" << G4endl;
|
||||
|
||||
G4cout << "The initial Vectors: " << G4endl;
|
||||
G4cout << " The initial Vectors: " << G4endl;
|
||||
PrintPostStepGPILVec();
|
||||
PrintPostStepDoItVec();
|
||||
|
||||
GetProcessManager().RemoveProcess(process);
|
||||
GetProcessManager()->RemoveProcess(process);
|
||||
|
||||
G4cout << "The final Vectors: " << G4endl;
|
||||
G4cout << " The final Vectors: " << G4endl;
|
||||
PrintPostStepGPILVec();
|
||||
PrintPostStepDoItVec();
|
||||
|
||||
G4cout << "================================================" << G4endl;
|
||||
|
||||
|
||||
}
|
||||
|
||||
void G4ProcessPlacer::AddProcessAs(G4VProcess *process, SecondOrLast sol)
|
||||
@@ -71,7 +73,7 @@ void G4ProcessPlacer::AddProcessAs(G4VProcess *process, SecondOrLast sol)
|
||||
|
||||
|
||||
if (sol == eLast) {
|
||||
GetProcessManager().AddProcess(process,
|
||||
GetProcessManager()->AddProcess(process,
|
||||
ordInActive,
|
||||
ordInActive,
|
||||
ordLast);
|
||||
@@ -79,7 +81,7 @@ void G4ProcessPlacer::AddProcessAs(G4VProcess *process, SecondOrLast sol)
|
||||
else if (sol == eSecond) {
|
||||
// get transportation process
|
||||
G4VProcess *transportation =
|
||||
(* (GetProcessManager().GetProcessList()))[0];
|
||||
(* (GetProcessManager()->GetProcessList()))[0];
|
||||
|
||||
if (!transportation) {
|
||||
G4Exception(" G4ProcessPlacer:: could not get process id=0");
|
||||
@@ -90,11 +92,11 @@ void G4ProcessPlacer::AddProcessAs(G4VProcess *process, SecondOrLast sol)
|
||||
}
|
||||
|
||||
// place the given proces as first for the moment
|
||||
GetProcessManager().AddProcess(process);
|
||||
GetProcessManager().SetProcessOrderingToFirst(process,
|
||||
GetProcessManager()->AddProcess(process);
|
||||
GetProcessManager()->SetProcessOrderingToFirst(process,
|
||||
idxPostStep);
|
||||
// place transportation first again
|
||||
GetProcessManager().SetProcessOrderingToFirst(transportation,
|
||||
GetProcessManager()->SetProcessOrderingToFirst(transportation,
|
||||
idxPostStep);
|
||||
}
|
||||
|
||||
@@ -109,21 +111,23 @@ void G4ProcessPlacer::AddProcessAs(G4VProcess *process, SecondOrLast sol)
|
||||
|
||||
void G4ProcessPlacer::AddProcessAsSecondDoIt(G4VProcess *process)
|
||||
{
|
||||
G4cout << "=== G4ProcessPlacer::AddProcessAsSecondDoIt ===" << G4endl;
|
||||
G4cout << "=== G4ProcessPlacer::AddProcessAsSecondDoIt: for: "
|
||||
<< fParticleName << G4endl;
|
||||
AddProcessAs(process, eSecond);
|
||||
}
|
||||
|
||||
void G4ProcessPlacer::AddProcessAsLastDoIt(G4VProcess *process)
|
||||
{
|
||||
G4cout << "=== G4ProcessPlacer::AddProcessAsLastDoIt ===" << G4endl;
|
||||
G4cout << "=== G4ProcessPlacer::AddProcessAsLastDoIt: for: "
|
||||
<< fParticleName << G4endl;
|
||||
AddProcessAs(process, eLast);
|
||||
}
|
||||
|
||||
G4ProcessManager &G4ProcessPlacer::GetProcessManager()
|
||||
G4ProcessManager *G4ProcessPlacer::GetProcessManager()
|
||||
{
|
||||
// get particle iterator to add processes ---------------------
|
||||
G4ParticleTable* theParticleTable;
|
||||
G4ParticleTable::G4PTblDicIterator* theParticleIterator;
|
||||
G4ParticleTable* theParticleTable = 0;
|
||||
G4ParticleTable::G4PTblDicIterator* theParticleIterator = 0;
|
||||
theParticleTable = G4ParticleTable::GetParticleTable();
|
||||
theParticleIterator = theParticleTable->GetIterator();
|
||||
// -------------------------------------------------------
|
||||
@@ -138,31 +142,37 @@ G4ProcessManager &G4ProcessPlacer::GetProcessManager()
|
||||
}
|
||||
}
|
||||
// ---------------------------------------------------------
|
||||
if (!processmanager) G4Exception(" G4ProcessPlacer::GetProcessManager: no ProcessSampler");
|
||||
return *processmanager;
|
||||
if (!processmanager) {
|
||||
G4Exception(" G4ProcessPlacer::GetProcessManager: no ProcessSampler");
|
||||
}
|
||||
return processmanager;
|
||||
}
|
||||
|
||||
|
||||
void G4ProcessPlacer::PrintPostStepGPILVec(){
|
||||
G4cout << "GPIL Vector: " << G4endl;
|
||||
G4ProcessVector* processGPILVec =
|
||||
GetProcessManager().GetPostStepProcessVector(typeGPIL);
|
||||
GetProcessManager()->GetPostStepProcessVector(typeGPIL);
|
||||
PrintProcVec(processGPILVec);
|
||||
}
|
||||
|
||||
void G4ProcessPlacer::PrintPostStepDoItVec(){
|
||||
G4cout << "DoIt Vector: " << G4endl;
|
||||
G4ProcessVector* processDoItVec =
|
||||
GetProcessManager().GetPostStepProcessVector(typeDoIt);
|
||||
GetProcessManager()->GetPostStepProcessVector(typeDoIt);
|
||||
PrintProcVec(processDoItVec);
|
||||
}
|
||||
|
||||
|
||||
void G4ProcessPlacer::PrintProcVec(G4ProcessVector* processVec)
|
||||
{
|
||||
if (!processVec) G4Exception("G4ProcessPlacer::G4ProcessPlacer: no processVec");
|
||||
if (!processVec) {
|
||||
G4Exception("G4ProcessPlacer::G4ProcessPlacer: no processVec");
|
||||
}
|
||||
G4int len = processVec->length();
|
||||
if (len==0) G4Exception("G4ProcessPlacer::G4ProcessPlacer:processVec len = 0");
|
||||
if (len==0) {
|
||||
G4Exception("G4ProcessPlacer::G4ProcessPlacer:processVec len = 0");
|
||||
}
|
||||
for (int pi=0; pi<len; pi++) {
|
||||
G4VProcess *p = (*processVec)[pi];
|
||||
if (p) {
|
||||
|
||||
Reference in New Issue
Block a user