Files
geant4/source/processes/management/include/G4ProcessManager.icc
T
2016-06-08 16:10:37 +02:00

177 lines
5.0 KiB
Plaintext

//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * 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. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
//
// $Id: G4ProcessManager.icc,v 1.2.4.1 2001/06/28 19:15:05 gunter Exp $
// GEANT4 tag $Name: $
//
//
#include "G4ProcessAttribute.hh"
// -----------------------------------------
// inlined function members implementation
// -----------------------------------------
inline
void G4ProcessManager::SetParticleType(const G4ParticleDefinition* aParticle)
{
theParticleType = aParticle;
}
inline
G4ProcessVector* G4ProcessManager::GetProcessList() const
{
return theProcessList;
}
inline
G4int G4ProcessManager::GetProcessListLength() const
{
return numberOfProcesses;
}
inline
G4int G4ProcessManager::GetProcessIndex(G4VProcess* aProcess) const
{
G4int idx = theProcessList->index(aProcess);
if (idx>=numberOfProcesses) idx = -1;
return idx;
}
inline
G4int G4ProcessManager::GetProcessVectorId(G4ProcessVectorDoItIndex idx,
G4ProcessVectorTypeIndex typ) const
{
if ( idx == idxAtRest ) {
if (typ == typeGPIL) { return 0; }
else { return 1; }
} else if ( idx == idxAlongStep ) {
if (typ == typeGPIL) { return 2; }
else { return 3; }
} else if ( idx == idxPostStep ) {
if (typ == typeGPIL) { return 4; }
else { return 5; }
} else {
return -1;
}
}
inline
G4ProcessVector* G4ProcessManager::GetProcessVector(
G4ProcessVectorDoItIndex idx,
G4ProcessVectorTypeIndex typ
) const
{
G4int ivec = GetProcessVectorId(idx, typ);
if ( ivec >=0 ) {
return theProcVector[ivec];
} else {
return 0;
}
}
inline
G4ProcessVector* G4ProcessManager::GetAtRestProcessVector(G4ProcessVectorTypeIndex typ) const
{
if (typ == typeGPIL) { return theProcVector[0]; }
else { return theProcVector[1]; }
}
inline
G4ProcessVector* G4ProcessManager::GetAlongStepProcessVector(G4ProcessVectorTypeIndex typ) const
{
if (typ == typeGPIL) { return theProcVector[2]; }
else { return theProcVector[3]; }
}
inline
G4ProcessVector* G4ProcessManager::GetPostStepProcessVector(G4ProcessVectorTypeIndex typ) const
{
if (typ == typeGPIL) { return theProcVector[4]; }
else { return theProcVector[5]; }
}
inline
G4int G4ProcessManager::GetAtRestIndex(
G4VProcess* aProcess,
G4ProcessVectorTypeIndex typ
) const
{
return GetProcessVectorIndex(aProcess, idxAtRest, typ);
}
inline
G4int G4ProcessManager::GetAlongStepIndex(
G4VProcess* aProcess,
G4ProcessVectorTypeIndex typ
) const
{
return GetProcessVectorIndex(aProcess, idxAlongStep, typ);
}
inline
G4int G4ProcessManager::GetPostStepIndex(
G4VProcess* aProcess,
G4ProcessVectorTypeIndex typ
) const
{
return GetProcessVectorIndex(aProcess, idxPostStep, typ);
}
inline
G4int G4ProcessManager::AddRestProcess(G4VProcess *aProcess,G4int ord)
{
return AddProcess(aProcess, ord, ordInActive, ordInActive);
}
inline
G4int G4ProcessManager::AddContinuousProcess(G4VProcess *aProcess,G4int ord)
{
return AddProcess(aProcess, ordInActive, ord, ordInActive);
}
inline
G4int G4ProcessManager::AddDiscreteProcess(G4VProcess *aProcess,G4int ord)
{
return AddProcess(aProcess, ordInActive, ordInActive, ord);
}
inline
G4ParticleDefinition* G4ProcessManager::GetParticleType() const
{
return (G4ParticleDefinition* )theParticleType;
}
inline
void G4ProcessManager::SetVerboseLevel(G4int value)
{
verboseLevel = value;
}
inline
G4int G4ProcessManager::GetVerboseLevel() const
{
return verboseLevel;
}