Import Geant4 9.1.0 source tree
This commit is contained in:
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4IVContinuousDiscreteProcess.cc,v 1.9 2006/06/29 21:08:02 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
//
|
||||
// $Id:
|
||||
// --------------------------------------------------------------
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4IVRestDiscreteProcess.cc,v 1.9 2006/06/29 21:08:04 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
//
|
||||
// $Id:
|
||||
// --------------------------------------------------------------
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4ProcTblElement.cc,v 1.7 2006/06/29 21:08:06 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
//
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4ProcessAttribute.cc,v 1.5 2006/06/29 21:08:08 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
//
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4ProcessManager.cc,v 1.28 2006/06/29 21:08:10 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
// $Id: G4ProcessManager.cc,v 1.34 2007/11/28 17:47:57 kurasige Exp $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
//
|
||||
//
|
||||
// --------------------------------------------------------------
|
||||
@@ -39,6 +39,7 @@
|
||||
// fixed bugs in FindInsertPosition
|
||||
// 18 July 1998 H.Kurashige
|
||||
// Use STL vector instead of RW vector 1. Mar 00 H.Kurashige
|
||||
// Add exception to check ordering paramters 2 Oct. 2007 H.Kurashige
|
||||
// ------------------------------------------------------------
|
||||
|
||||
#include "G4ProcessManagerMessenger.hh"
|
||||
@@ -270,10 +271,11 @@ G4ProcessAttribute* G4ProcessManager::GetAttribute(G4int index) const
|
||||
#ifdef G4VERBOSE
|
||||
if (GetVerboseLevel()>0) {
|
||||
G4cout << "G4ProcessManager::GetAttribute():";
|
||||
G4cout << " particle[" << theParticleType->GetParticleName() << "]";
|
||||
G4cout << G4endl;
|
||||
G4cout << "Warning:: attribute vector index is inconsistent with process List index" << G4endl;
|
||||
}
|
||||
G4cout << " particle[" << theParticleType->GetParticleName() << "]"
|
||||
<< G4endl;
|
||||
G4cout << "Warning:: attribute vector index is inconsistent with process List index"
|
||||
<< G4endl;
|
||||
}
|
||||
#endif
|
||||
// re-ordering attribute vector
|
||||
G4ProcessAttribute *pAttr = 0;
|
||||
@@ -300,7 +302,7 @@ G4int G4ProcessManager::InsertAt(G4int ip, G4VProcess* process, G4int ivec)
|
||||
G4ProcessVector* pVector = theProcVector[ivec];
|
||||
// check position
|
||||
if ( (ip<0) || (ip > pVector->entries()) ) return -1;
|
||||
|
||||
|
||||
// insert in pVector
|
||||
pVector->insertAt(ip, process);
|
||||
|
||||
@@ -329,12 +331,8 @@ G4int G4ProcessManager::RemoveAt(G4int ip, G4VProcess* , G4int ivec)
|
||||
// check position
|
||||
if ( (ip<0) || (ip >= pVector->entries()) ) return -1;
|
||||
|
||||
//check pointer and remove
|
||||
//if ((*pVector)[ip]== process) {
|
||||
// remove process
|
||||
pVector->removeAt(ip);
|
||||
//} else {
|
||||
// return -1;
|
||||
//}
|
||||
|
||||
// correct index
|
||||
for(G4int iproc=0; iproc<numberOfProcesses; iproc++) {
|
||||
@@ -437,7 +435,7 @@ G4int G4ProcessManager::AddProcess(
|
||||
pAttr->ordProcVector[3] = ordAlongStepDoIt;
|
||||
pAttr->ordProcVector[4] = ordPostStepDoIt;
|
||||
pAttr->ordProcVector[5] = ordPostStepDoIt;
|
||||
|
||||
|
||||
// add aProccess in Process vectors
|
||||
for (G4int ivec=1; ivec<SizeOfProcVectorArray; ivec+=2) {
|
||||
if (pAttr->ordProcVector[ivec] < 0 ) {
|
||||
@@ -471,6 +469,9 @@ G4int G4ProcessManager::AddProcess(
|
||||
|
||||
numberOfProcesses += 1;
|
||||
|
||||
// check consistencies between ordering parameters and process
|
||||
CheckOrderingParameters(aProcess);
|
||||
|
||||
CreateGPILvectors();
|
||||
|
||||
// inform process manager pointer to the process
|
||||
@@ -577,7 +578,7 @@ void G4ProcessManager::SetProcessOrdering(
|
||||
G4int ordDoIt
|
||||
)
|
||||
{
|
||||
const G4String aErrorMessage(" G4ProcessManager::GetProcessVectorIndex:");
|
||||
const G4String aErrorMessage(" G4ProcessManager::SetProcessOrdering");
|
||||
|
||||
#ifdef G4VERBOSE
|
||||
if (GetVerboseLevel()>2) {
|
||||
@@ -593,8 +594,8 @@ void G4ProcessManager::SetProcessOrdering(
|
||||
#ifdef G4VERBOSE
|
||||
if (verboseLevel>0) {
|
||||
G4cout << aErrorMessage << G4endl;
|
||||
G4cout << "particle[" + theParticleType->GetParticleName() +"] " ;
|
||||
G4cout << "process[" + aProcess->GetProcessName() + "]"<< G4endl;
|
||||
G4cout << "particle[" << theParticleType->GetParticleName() << "] " ;
|
||||
G4cout << "process[" << aProcess->GetProcessName() << "]"<< G4endl;
|
||||
G4cout << " illegal DoIt Index [= " << G4int(idDoIt) << "]";
|
||||
G4cout << G4endl;
|
||||
}
|
||||
@@ -632,8 +633,8 @@ void G4ProcessManager::SetProcessOrdering(
|
||||
#ifdef G4VERBOSE
|
||||
if (verboseLevel>2) {
|
||||
G4cout << aErrorMessage << G4endl;
|
||||
G4cout << "particle[" + theParticleType->GetParticleName() +"] " ;
|
||||
G4cout <<"process[" + aProcess->GetProcessName() + "]"<< G4endl;
|
||||
G4cout << "particle[" << theParticleType->GetParticleName() << "] " ;
|
||||
G4cout <<"process[" << aProcess->GetProcessName() << "]"<< G4endl;
|
||||
G4cout << aProcess->GetProcessName() << " is inserted at "<< ip;
|
||||
G4cout << " in ProcessVetor[" << ivec<< "]";
|
||||
G4cout << " with Ordering parameter = " << ordDoIt ;
|
||||
@@ -643,6 +644,9 @@ void G4ProcessManager::SetProcessOrdering(
|
||||
}
|
||||
|
||||
}
|
||||
// check consistencies between ordering parameters and process
|
||||
CheckOrderingParameters(aProcess);
|
||||
|
||||
// create GPIL vectors
|
||||
CreateGPILvectors();
|
||||
}
|
||||
@@ -699,11 +703,105 @@ void G4ProcessManager::SetProcessOrderingToFirst(
|
||||
#endif
|
||||
}
|
||||
|
||||
// check consistencies between ordering parameters and process
|
||||
CheckOrderingParameters(aProcess);
|
||||
|
||||
// create GPIL vectors
|
||||
CreateGPILvectors();
|
||||
|
||||
}
|
||||
|
||||
// ///////////////////////////////////////
|
||||
void G4ProcessManager::SetProcessOrderingToSecond(
|
||||
G4VProcess *aProcess,
|
||||
G4ProcessVectorDoItIndex idDoIt
|
||||
)
|
||||
{
|
||||
const G4String aErrorMessage(" G4ProcessManager::SetProcessOrderingToSecond");
|
||||
|
||||
#ifdef G4VERBOSE
|
||||
if (GetVerboseLevel()>2) {
|
||||
G4cout << aErrorMessage ;
|
||||
G4cout << "particle[" << theParticleType->GetParticleName() << "] " ;
|
||||
G4cout <<"process[" << aProcess->GetProcessName() << "]"<< G4endl;
|
||||
}
|
||||
#endif
|
||||
|
||||
// get Process Vector Id
|
||||
G4int ivec = GetProcessVectorId(idDoIt, typeDoIt);
|
||||
if (ivec <0 ) {
|
||||
#ifdef G4VERBOSE
|
||||
if (verboseLevel>0) {
|
||||
G4cout << aErrorMessage << G4endl;
|
||||
G4cout << "particle[" << theParticleType->GetParticleName() << "] " ;
|
||||
G4cout << "process[" << aProcess->GetProcessName() << "]"<< G4endl;
|
||||
G4cout << " illegal DoIt Index [= " << G4int(idDoIt) << "]";
|
||||
G4cout << G4endl;
|
||||
}
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
|
||||
// get attribute
|
||||
G4ProcessAttribute* pAttr = GetAttribute(aProcess);
|
||||
if (pAttr == 0) {
|
||||
// can not get process attribute
|
||||
return;
|
||||
} else {
|
||||
G4int ip = pAttr->idxProcVector[ivec];
|
||||
// remove a process from the process vector
|
||||
if ( ip >=0 ) {
|
||||
RemoveAt(ip, aProcess, ivec);
|
||||
}
|
||||
}
|
||||
|
||||
// set ordering parameter to 1
|
||||
pAttr->ordProcVector[ivec-1] = 1;
|
||||
pAttr->ordProcVector[ivec] = 1;
|
||||
|
||||
// find insert position
|
||||
G4ProcessVector* pVector = theProcVector[ivec];
|
||||
G4int ip = pVector->entries();
|
||||
G4int tmp = INT_MAX;
|
||||
|
||||
// find insert position
|
||||
for (G4int iproc=0; iproc<numberOfProcesses; iproc++) {
|
||||
G4ProcessAttribute* aAttr = (*theAttrVector)[iproc];
|
||||
if ( aAttr->idxProcVector[ivec] >= 0 ) {
|
||||
if ( (aAttr->ordProcVector[ivec] !=0 ) &&
|
||||
(tmp >= aAttr->ordProcVector[ivec]) ) {
|
||||
tmp = aAttr->ordProcVector[ivec];
|
||||
if ( ip > aAttr->idxProcVector[ivec] ) {
|
||||
ip = aAttr->idxProcVector[ivec] ;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// insert
|
||||
InsertAt(ip, aProcess, ivec);
|
||||
|
||||
// set index in Process Attribute
|
||||
pAttr->idxProcVector[ivec] = ip;
|
||||
#ifdef G4VERBOSE
|
||||
if (verboseLevel>2) {
|
||||
G4cout << aErrorMessage << G4endl;
|
||||
G4cout << "particle[" << theParticleType->GetParticleName() << "] " ;
|
||||
G4cout <<"process[" << aProcess->GetProcessName() << "]"<< G4endl;
|
||||
G4cout << aProcess->GetProcessName() << " is inserted at "<< ip;
|
||||
G4cout << " in ProcessVetor[" << ivec<< "]";
|
||||
G4cout << " with Ordering parameter = 1 ";
|
||||
G4cout << G4endl;
|
||||
}
|
||||
#endif
|
||||
|
||||
// check consistencies between ordering parameters and process
|
||||
CheckOrderingParameters(aProcess);
|
||||
|
||||
// create GPIL vectors
|
||||
CreateGPILvectors();
|
||||
}
|
||||
|
||||
// ///////////////////////////////////////
|
||||
void G4ProcessManager::SetProcessOrderingToLast(
|
||||
G4VProcess *aProcess,
|
||||
@@ -858,10 +956,9 @@ void G4ProcessManager::DumpInfo()
|
||||
// Dump Information
|
||||
|
||||
// particle type
|
||||
G4String* aMessage = new G4String("G4ProcessManager:");
|
||||
*aMessage += "particle[" + theParticleType->GetParticleName() + "]";
|
||||
G4cout << *aMessage << G4endl;
|
||||
delete aMessage;
|
||||
G4cout << "G4ProcessManager: particle["
|
||||
<< theParticleType->GetParticleName() << "]"
|
||||
<< G4endl;
|
||||
|
||||
// loop over all processes
|
||||
for (G4int idx=0; idx <theProcessList->entries(); idx++){
|
||||
@@ -987,7 +1084,7 @@ void G4ProcessManager::EndTracking()
|
||||
G4cout << " process (or its index) not found ";
|
||||
}
|
||||
#endif
|
||||
return false;
|
||||
return false;
|
||||
}
|
||||
// process attribute
|
||||
G4ProcessAttribute* pAttr = (*theAttrVector)[index];
|
||||
@@ -995,14 +1092,75 @@ void G4ProcessManager::EndTracking()
|
||||
return pAttr-> isActive;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/////////////////////////////////////////////
|
||||
void G4ProcessManager::CheckOrderingParameters(G4VProcess* aProcess) const
|
||||
{
|
||||
if (aProcess==0) return;
|
||||
G4ProcessAttribute* pAttr = GetAttribute(aProcess);
|
||||
if (pAttr ==0) {
|
||||
#ifdef G4VERBOSE
|
||||
if (GetVerboseLevel()>0) {
|
||||
G4cout << "G4ProcessManager::CheckOrderingParameters ";
|
||||
G4cout << " process " << aProcess->GetProcessName()
|
||||
<< " has no attribute" << G4endl;
|
||||
}
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
|
||||
// check consistencies between ordering parameters and
|
||||
// validity of DoIt of the Process
|
||||
G4bool isOK =true;
|
||||
if ( (pAttr->ordProcVector[0]>=0) && (!aProcess->isAtRestDoItIsEnabled()) ){
|
||||
#ifdef G4VERBOSE
|
||||
if (GetVerboseLevel()>0) {
|
||||
G4cerr << "G4ProcessManager::CheckOrderingParameters ";
|
||||
G4cerr << "You cannot set ordering parameter ["
|
||||
<< pAttr->ordProcVector[0]
|
||||
<< "] for AtRest DoIt to the process "
|
||||
<< aProcess->GetProcessName() << G4endl;
|
||||
}
|
||||
#endif
|
||||
isOK = false;
|
||||
}
|
||||
|
||||
if ( (pAttr->ordProcVector[2]>=0) && (!aProcess->isAlongStepDoItIsEnabled()) ){
|
||||
#ifdef G4VERBOSE
|
||||
if (GetVerboseLevel()>0) {
|
||||
G4cerr << "G4ProcessManager::CheckOrderingParameters ";
|
||||
G4cerr << "You cannot set ordering parameter ["
|
||||
<< pAttr->ordProcVector[2]
|
||||
<< "] for AlongStep DoIt to the process "
|
||||
<< aProcess->GetProcessName() << G4endl;
|
||||
|
||||
}
|
||||
#endif
|
||||
isOK = false;
|
||||
}
|
||||
|
||||
if ( (pAttr->ordProcVector[4]>=0) && (!aProcess->isPostStepDoItIsEnabled()) ) {
|
||||
#ifdef G4VERBOSE
|
||||
if (GetVerboseLevel()>0) {
|
||||
G4cerr << "G4ProcessManager::CheckOrderingParameters ";
|
||||
G4cerr << "You cannot set ordering parameter ["
|
||||
<< pAttr->ordProcVector[4]
|
||||
<< "] for PostStep DoIt to the process"
|
||||
<< aProcess->GetProcessName() << G4endl;
|
||||
}
|
||||
#endif
|
||||
isOK = false;
|
||||
}
|
||||
|
||||
if (!isOK) {
|
||||
G4String msg;
|
||||
msg = "Invalid ordering parameters are set for ";
|
||||
msg += aProcess->GetProcessName();
|
||||
G4Exception( "G4ProcessManager::CheckOrderingParameters ",
|
||||
"Invalid Ordering",FatalException, msg);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4ProcessManagerMessenger.cc,v 1.10 2006/06/29 21:08:12 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------------------
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4ProcessTable.cc,v 1.12 2006/06/29 21:08:14 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
// $Id: G4ProcessTable.cc,v 1.13 2007/10/06 05:33:58 kurasige Exp $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
//
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
@@ -72,8 +72,8 @@ G4ProcessTable::~G4ProcessTable()
|
||||
if (verboseLevel>1){
|
||||
G4cout << "-- G4ProcessTable destructor --" << G4endl;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
if ( tmpTblVector != 0) {
|
||||
tmpTblVector ->clear();
|
||||
delete tmpTblVector;
|
||||
@@ -601,12 +601,26 @@ void G4ProcessTable::DumpInfo(G4VProcess* process,
|
||||
manager = anElement->GetProcessManager(idx);
|
||||
G4cout << " for " << manager->GetParticleType()->GetParticleName();
|
||||
G4cout << G4endl;
|
||||
if (verboseLevel >2) manager->DumpInfo();
|
||||
#ifdef G4VERBOSE
|
||||
if (verboseLevel >2){
|
||||
tmpVerbose = manager->GetVerboseLevel();
|
||||
manager->SetVerboseLevel(verboseLevel);
|
||||
manager->DumpInfo();
|
||||
manager->SetVerboseLevel(tmpVerbose);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
} else {
|
||||
G4cout << " for " << manager->GetParticleType()->GetParticleName();
|
||||
G4cout << G4endl;
|
||||
if (verboseLevel >2) manager->DumpInfo();
|
||||
#ifdef G4VERBOSE
|
||||
if (verboseLevel >2){
|
||||
tmpVerbose = manager->GetVerboseLevel();
|
||||
manager->SetVerboseLevel(verboseLevel);
|
||||
manager->DumpInfo();
|
||||
manager->SetVerboseLevel(tmpVerbose);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4ProcessTableMessenger.cc,v 1.17 2006/06/29 21:08:16 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------------------
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4ProcessVector.cc,v 1.4 2006/06/29 21:08:18 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
//
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4VContinuousDiscreteProcess.cc,v 1.5 2006/06/29 21:08:20 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
// $Id: G4VContinuousDiscreteProcess.cc,v 1.6 2007/10/02 08:23:20 kurasige Exp $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
//
|
||||
//
|
||||
// --------------------------------------------------------------
|
||||
@@ -48,6 +48,7 @@ G4VContinuousDiscreteProcess::G4VContinuousDiscreteProcess()
|
||||
G4VContinuousDiscreteProcess::G4VContinuousDiscreteProcess(const G4String& aName , G4ProcessType aType)
|
||||
: G4VProcess(aName, aType)
|
||||
{
|
||||
enableAtRestDoIt = false;
|
||||
}
|
||||
|
||||
G4VContinuousDiscreteProcess::~G4VContinuousDiscreteProcess()
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4VContinuousProcess.cc,v 1.4 2006/06/29 21:08:22 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
// $Id: G4VContinuousProcess.cc,v 1.5 2007/10/02 08:23:20 kurasige Exp $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
//
|
||||
//
|
||||
// --------------------------------------------------------------
|
||||
@@ -47,6 +47,8 @@ G4VContinuousProcess::G4VContinuousProcess()
|
||||
G4VContinuousProcess::G4VContinuousProcess(const G4String& aName , G4ProcessType aType)
|
||||
: G4VProcess(aName, aType)
|
||||
{
|
||||
enableAtRestDoIt = false;
|
||||
enablePostStepDoIt = false;
|
||||
}
|
||||
|
||||
G4VContinuousProcess::~G4VContinuousProcess()
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4VDiscreteProcess.cc,v 1.5 2006/06/29 21:08:24 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
// $Id: G4VDiscreteProcess.cc,v 1.6 2007/10/02 08:23:20 kurasige Exp $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
//
|
||||
//
|
||||
// --------------------------------------------------------------
|
||||
@@ -48,6 +48,9 @@ G4VDiscreteProcess::G4VDiscreteProcess()
|
||||
G4VDiscreteProcess::G4VDiscreteProcess(const G4String& aName , G4ProcessType aType)
|
||||
: G4VProcess(aName, aType)
|
||||
{
|
||||
enableAtRestDoIt = false;
|
||||
enableAlongStepDoIt = false;
|
||||
|
||||
}
|
||||
|
||||
G4VDiscreteProcess::~G4VDiscreteProcess()
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4VProcess.cc,v 1.14 2006/06/29 21:08:26 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
// $Id: G4VProcess.cc,v 1.15 2007/10/02 08:23:20 kurasige Exp $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
//
|
||||
//
|
||||
// --------------------------------------------------------------
|
||||
@@ -52,6 +52,9 @@ G4VProcess::G4VProcess(const G4String& aName, G4ProcessType aType )
|
||||
theProcessName(aName),
|
||||
theProcessType(aType),
|
||||
thePILfactor(1.0),
|
||||
enableAtRestDoIt(true),
|
||||
enableAlongStepDoIt(true),
|
||||
enablePostStepDoIt(true),
|
||||
verboseLevel(0)
|
||||
{
|
||||
pParticleChange = &aParticleChange;
|
||||
@@ -68,7 +71,10 @@ G4VProcess::G4VProcess(const G4VProcess& right)
|
||||
theProcessName(right.theProcessName),
|
||||
theProcessType(right.theProcessType),
|
||||
thePILfactor(1.0),
|
||||
verboseLevel(right.verboseLevel)
|
||||
enableAtRestDoIt(true),
|
||||
enableAlongStepDoIt(true),
|
||||
enablePostStepDoIt(true),
|
||||
verboseLevel(right.verboseLevel)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4VRestContinuousDiscreteProcess.cc,v 1.5 2006/06/29 21:08:28 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
// $Id: G4VRestContinuousDiscreteProcess.cc,v 1.6 2007/10/02 08:23:20 kurasige Exp $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
//
|
||||
//
|
||||
// --------------------------------------------------------------
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4VRestContinuousProcess.cc,v 1.5 2006/06/29 21:08:30 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
// $Id: G4VRestContinuousProcess.cc,v 1.6 2007/10/02 08:23:20 kurasige Exp $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
//
|
||||
//
|
||||
// --------------------------------------------------------------
|
||||
@@ -48,6 +48,7 @@ G4VRestContinuousProcess::G4VRestContinuousProcess()
|
||||
G4VRestContinuousProcess::G4VRestContinuousProcess(const G4String& aName , G4ProcessType aType)
|
||||
: G4VProcess(aName, aType)
|
||||
{
|
||||
enablePostStepDoIt = false;
|
||||
}
|
||||
|
||||
G4VRestContinuousProcess::~G4VRestContinuousProcess()
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4VRestDiscreteProcess.cc,v 1.5 2006/06/29 21:08:32 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
// $Id: G4VRestDiscreteProcess.cc,v 1.6 2007/10/02 08:23:20 kurasige Exp $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
//
|
||||
//
|
||||
// --------------------------------------------------------------
|
||||
@@ -48,6 +48,7 @@ G4VRestDiscreteProcess::G4VRestDiscreteProcess()
|
||||
G4VRestDiscreteProcess::G4VRestDiscreteProcess(const G4String& aName , G4ProcessType aType)
|
||||
: G4VProcess(aName, aType)
|
||||
{
|
||||
enableAlongStepDoIt = false;
|
||||
}
|
||||
|
||||
G4VRestDiscreteProcess::~G4VRestDiscreteProcess()
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4VRestProcess.cc,v 1.5 2006/06/29 21:08:34 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
// $Id: G4VRestProcess.cc,v 1.6 2007/10/02 08:23:20 kurasige Exp $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
//
|
||||
//
|
||||
// --------------------------------------------------------------
|
||||
@@ -48,6 +48,8 @@ G4VRestProcess::G4VRestProcess()
|
||||
G4VRestProcess::G4VRestProcess(const G4String& aName , G4ProcessType aType)
|
||||
: G4VProcess(aName, aType)
|
||||
{
|
||||
enableAlongStepDoIt = false;
|
||||
enablePostStepDoIt = false;
|
||||
}
|
||||
|
||||
G4VRestProcess::~G4VRestProcess()
|
||||
|
||||
@@ -0,0 +1,172 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4WrapperProcess.cc,v 1.1 2007/12/12 10:09:49 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
//
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
// GEANT 4 class implementation file
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
// New Physics scheme 18 Dec. 1996 H.Kurahige
|
||||
// ------------------------------------------------------------
|
||||
|
||||
#include "G4WrapperProcess.hh"
|
||||
|
||||
G4WrapperProcess::G4WrapperProcess(const G4String& aName,
|
||||
G4ProcessType aType)
|
||||
: G4VProcess(aName,aType), pRegProcess((G4VProcess*)(0))
|
||||
{
|
||||
}
|
||||
|
||||
G4WrapperProcess::G4WrapperProcess(const G4WrapperProcess& right)
|
||||
: G4VProcess(*((G4VProcess*)(&right))), pRegProcess(right.pRegProcess)
|
||||
{
|
||||
}
|
||||
|
||||
G4WrapperProcess::~G4WrapperProcess()
|
||||
{
|
||||
if (pRegProcess!=0) delete pRegProcess;
|
||||
}
|
||||
|
||||
void G4WrapperProcess::ResetNumberOfInteractionLengthLeft()
|
||||
{
|
||||
pRegProcess->ResetNumberOfInteractionLengthLeft();
|
||||
}
|
||||
|
||||
G4double G4WrapperProcess::
|
||||
AlongStepGetPhysicalInteractionLength( const G4Track& track,
|
||||
G4double previousStepSize,
|
||||
G4double currentMinimumStep,
|
||||
G4double& proposedSafety,
|
||||
G4GPILSelection* selection )
|
||||
{
|
||||
return pRegProcess->
|
||||
AlongStepGetPhysicalInteractionLength( track,
|
||||
previousStepSize,
|
||||
currentMinimumStep,
|
||||
proposedSafety,
|
||||
selection );
|
||||
}
|
||||
|
||||
G4double G4WrapperProcess::
|
||||
AtRestGetPhysicalInteractionLength( const G4Track& track,
|
||||
G4ForceCondition* condition )
|
||||
{
|
||||
return pRegProcess->AtRestGetPhysicalInteractionLength( track, condition );
|
||||
}
|
||||
|
||||
G4double G4WrapperProcess::
|
||||
PostStepGetPhysicalInteractionLength( const G4Track& track,
|
||||
G4double previousStepSize,
|
||||
G4ForceCondition* condition )
|
||||
{
|
||||
return pRegProcess->PostStepGetPhysicalInteractionLength( track,
|
||||
previousStepSize,
|
||||
condition );
|
||||
}
|
||||
|
||||
void G4WrapperProcess::SetProcessManager(const G4ProcessManager* procMan)
|
||||
{
|
||||
pRegProcess->SetProcessManager(procMan);
|
||||
}
|
||||
|
||||
const G4ProcessManager* G4WrapperProcess::GetProcessManager()
|
||||
{
|
||||
return pRegProcess->GetProcessManager();
|
||||
}
|
||||
|
||||
G4VParticleChange* G4WrapperProcess::PostStepDoIt( const G4Track& track,
|
||||
const G4Step& stepData )
|
||||
{
|
||||
return pRegProcess->PostStepDoIt( track, stepData );
|
||||
}
|
||||
|
||||
G4VParticleChange* G4WrapperProcess::AlongStepDoIt( const G4Track& track,
|
||||
const G4Step& stepData )
|
||||
{
|
||||
return pRegProcess->AlongStepDoIt( track, stepData );
|
||||
}
|
||||
|
||||
G4VParticleChange* G4WrapperProcess::AtRestDoIt( const G4Track& track,
|
||||
const G4Step& stepData )
|
||||
{
|
||||
return pRegProcess->AtRestDoIt( track, stepData );
|
||||
}
|
||||
|
||||
G4bool G4WrapperProcess::IsApplicable(const G4ParticleDefinition& particle)
|
||||
{
|
||||
return pRegProcess->IsApplicable(particle);
|
||||
}
|
||||
|
||||
void G4WrapperProcess::BuildPhysicsTable(const G4ParticleDefinition& particle)
|
||||
{
|
||||
return pRegProcess->BuildPhysicsTable(particle);
|
||||
}
|
||||
|
||||
void G4WrapperProcess::PreparePhysicsTable(const G4ParticleDefinition& particle)
|
||||
{
|
||||
return pRegProcess->PreparePhysicsTable(particle);
|
||||
}
|
||||
|
||||
G4bool G4WrapperProcess::
|
||||
StorePhysicsTable(const G4ParticleDefinition* particle,
|
||||
const G4String& directory,
|
||||
G4bool ascii)
|
||||
{
|
||||
return pRegProcess->StorePhysicsTable(particle, directory, ascii);
|
||||
}
|
||||
|
||||
G4bool G4WrapperProcess::
|
||||
RetrievePhysicsTable( const G4ParticleDefinition* particle,
|
||||
const G4String& directory,
|
||||
G4bool ascii)
|
||||
{
|
||||
return pRegProcess->RetrievePhysicsTable(particle, directory, ascii);
|
||||
}
|
||||
|
||||
void G4WrapperProcess::StartTracking(G4Track* track)
|
||||
{
|
||||
pRegProcess->StartTracking(track);
|
||||
}
|
||||
|
||||
void G4WrapperProcess::EndTracking()
|
||||
{
|
||||
pRegProcess->EndTracking();
|
||||
}
|
||||
|
||||
void G4WrapperProcess::RegisterProcess(G4VProcess* process)
|
||||
{
|
||||
pRegProcess=process;
|
||||
theProcessName += process->GetProcessName();
|
||||
theProcessType = process->GetProcessType();
|
||||
}
|
||||
|
||||
const G4VProcess* G4WrapperProcess::GetRegisteredProcess() const
|
||||
{
|
||||
return pRegProcess;
|
||||
}
|
||||
Reference in New Issue
Block a user