// // ******************************************************************** // * 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: G4ProcessManager.icc,v 1.6 2007/03/30 01:02:28 kurasige 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; }