]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
added Transportation to fProcessMap; GetMCProcess(): argument changed from G4String...
authorivana <ivana@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 21 Dec 2000 18:23:43 +0000 (18:23 +0000)
committerivana <ivana@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 21 Dec 2000 18:23:43 +0000 (18:23 +0000)
TGeant4/TG4PhysicsManager.cxx

index 35b855889bda753b807156bb89e19e875da5adad..0acdd7c44954712347da15e86ef86f731dc5014b 100644 (file)
@@ -10,6 +10,7 @@
 #include "TG4G3Defaults.h"
 
 #include <G4ParticleDefinition.hh>
+#include <G4VProcess.hh>
 
 #include <TDatabasePDG.h>
 
@@ -227,7 +228,7 @@ void TG4PhysicsManager::FillProcessMap()
   fProcessMap.Add("Rayleigh Scattering", kPRayleigh);
 
   // no mechanism is active, usually at the entrance of a new volume
-  // kPNull
+  fProcessMap.Add("Transportation", kPNull);
 
   // particle has fallen below energy threshold and tracking stops
   // kPStop
@@ -284,16 +285,19 @@ G4int TG4PhysicsManager::GetPDGEncoding(G4ParticleDefinition* particle)
   return pdgEncoding;  
 }  
      
-AliMCProcess TG4PhysicsManager::GetMCProcess(const G4String& g4ProcessName)
+AliMCProcess TG4PhysicsManager::GetMCProcess(const G4VProcess* process)
 {
-// Returns the AliMCProcess code of process specified by name.
+// Returns the AliMCProcess code of the specified G4 process.
 // ---
+  if (!process) return kPNoProcess;
 
-  G4int processCode = fProcessMap.GetSecond(g4ProcessName);
+  G4String name = process->GetProcessName();
+  G4int code = fProcessMap.GetSecond(name);
   
-  if (processCode == 0) return kPNoProcess;
+  if (code == 0) return kPNoProcess;
   
-  return (AliMCProcess)processCode; 
+  return (AliMCProcess)code; 
 }
 
 G4int TG4PhysicsManager::GetPDGEncoding(G4String particleName)