G4ProcessManager.icc

Go to the documentation of this file.
00001 //
00002 // ********************************************************************
00003 // * License and Disclaimer                                           *
00004 // *                                                                  *
00005 // * The  Geant4 software  is  copyright of the Copyright Holders  of *
00006 // * the Geant4 Collaboration.  It is provided  under  the terms  and *
00007 // * conditions of the Geant4 Software License,  included in the file *
00008 // * LICENSE and available at  http://cern.ch/geant4/license .  These *
00009 // * include a list of copyright holders.                             *
00010 // *                                                                  *
00011 // * Neither the authors of this software system, nor their employing *
00012 // * institutes,nor the agencies providing financial support for this *
00013 // * work  make  any representation or  warranty, express or implied, *
00014 // * regarding  this  software system or assume any liability for its *
00015 // * use.  Please see the license in the file  LICENSE  and URL above *
00016 // * for the full disclaimer and the limitation of liability.         *
00017 // *                                                                  *
00018 // * This  code  implementation is the result of  the  scientific and *
00019 // * technical work of the GEANT4 collaboration.                      *
00020 // * By using,  copying,  modifying or  distributing the software (or *
00021 // * any work based  on the software)  you  agree  to acknowledge its *
00022 // * use  in  resulting  scientific  publications,  and indicate your *
00023 // * acceptance of all terms of the Geant4 Software license.          *
00024 // ********************************************************************
00025 //
00026 //
00027 // $Id$
00028 //
00029 // 
00030 
00031 // -----------------------------------------
00032 //  inlined function members implementation
00033 // -----------------------------------------
00034 inline  
00035  void G4ProcessManager::SetParticleType(const G4ParticleDefinition* aParticle)
00036 {
00037   theParticleType = aParticle;
00038 }
00039 
00040 inline 
00041  G4ProcessVector* G4ProcessManager::GetProcessList() const
00042 {
00043   return theProcessList;
00044 }
00045 
00046 inline
00047  G4int  G4ProcessManager::GetProcessListLength() const
00048 {
00049   return numberOfProcesses;
00050 }
00051 
00052 inline 
00053  G4int  G4ProcessManager::GetProcessIndex(G4VProcess* aProcess) const
00054 {
00055   G4int idx = theProcessList->index(aProcess);
00056   if (idx>=numberOfProcesses) idx = -1;
00057   return idx;
00058 }
00059 
00060 inline 
00061  G4int G4ProcessManager::GetProcessVectorId(G4ProcessVectorDoItIndex idx,
00062                                             G4ProcessVectorTypeIndex typ) const
00063 {
00064   if ( idx == idxAtRest ) {
00065     if (typ == typeGPIL) { return 0; }
00066     else                 { return 1; }
00067   } else if ( idx == idxAlongStep ) {
00068     if (typ == typeGPIL) { return 2; }
00069     else                 { return 3; }
00070   } else if ( idx == idxPostStep ) {
00071     if (typ == typeGPIL) { return 4; }
00072     else                 { return 5; }
00073   } else {
00074     return -1;
00075   }
00076 }
00077  
00078 inline  
00079  G4ProcessVector* G4ProcessManager::GetProcessVector(
00080                                        G4ProcessVectorDoItIndex idx,  
00081                                        G4ProcessVectorTypeIndex typ
00082                                       ) const
00083 {
00084   G4int ivec = GetProcessVectorId(idx, typ);
00085   if ( ivec >=0 ) {
00086     return theProcVector[ivec];
00087   } else {
00088     return 0;
00089   }
00090 }
00091 
00092 inline 
00093  G4ProcessVector* G4ProcessManager::GetAtRestProcessVector(G4ProcessVectorTypeIndex typ) const
00094 {
00095   if (typ == typeGPIL) { return theProcVector[0]; }
00096   else                { return theProcVector[1]; }
00097 }
00098 
00099 inline 
00100  G4ProcessVector* G4ProcessManager::GetAlongStepProcessVector(G4ProcessVectorTypeIndex typ) const
00101 {
00102   if (typ == typeGPIL) { return theProcVector[2]; }
00103   else                { return theProcVector[3]; }
00104 }
00105 
00106 inline 
00107  G4ProcessVector* G4ProcessManager::GetPostStepProcessVector(G4ProcessVectorTypeIndex typ) const
00108 {
00109   if (typ == typeGPIL) { return theProcVector[4]; }
00110   else                { return theProcVector[5]; }
00111 }
00112 
00113 inline
00114  G4int G4ProcessManager::GetAtRestIndex(
00115                            G4VProcess* aProcess,
00116                            G4ProcessVectorTypeIndex typ 
00117                            ) const
00118 {
00119   return GetProcessVectorIndex(aProcess, idxAtRest, typ);
00120 }
00121 
00122 inline 
00123  G4int G4ProcessManager::GetAlongStepIndex(
00124                            G4VProcess* aProcess,
00125                            G4ProcessVectorTypeIndex typ 
00126                            ) const
00127 {
00128   return GetProcessVectorIndex(aProcess, idxAlongStep, typ);
00129 }
00130 
00131 inline
00132  G4int G4ProcessManager::GetPostStepIndex(
00133                            G4VProcess* aProcess,
00134                            G4ProcessVectorTypeIndex typ 
00135                          ) const
00136 {
00137   return GetProcessVectorIndex(aProcess, idxPostStep, typ);
00138 }
00139 
00140 inline 
00141  G4int G4ProcessManager::AddRestProcess(G4VProcess *aProcess,G4int ord)
00142 {
00143   return AddProcess(aProcess, ord, ordInActive, ordInActive);
00144 }
00145 
00146 inline 
00147  G4int G4ProcessManager::AddContinuousProcess(G4VProcess *aProcess,G4int ord)
00148 {
00149   return AddProcess(aProcess, ordInActive, ord, ordInActive);
00150 }
00151 
00152 inline 
00153  G4int G4ProcessManager::AddDiscreteProcess(G4VProcess *aProcess,G4int ord)
00154 {
00155   return AddProcess(aProcess, ordInActive, ordInActive, ord);
00156 }
00157 
00158 inline 
00159  G4ParticleDefinition* G4ProcessManager::GetParticleType() const
00160 { 
00161   return (G4ParticleDefinition* )theParticleType; 
00162 }
00163 
00164 
00165 inline 
00166  void G4ProcessManager::SetVerboseLevel(G4int value)
00167 {
00168   verboseLevel = value;
00169 }
00170 
00171 inline  
00172  G4int G4ProcessManager::GetVerboseLevel() const
00173 {
00174   return  verboseLevel;
00175 }
00176 

Generated on Mon May 27 17:49:26 2013 for Geant4 by  doxygen 1.4.7