G4WrapperProcess.cc

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 //        GEANT 4 class implementation file 
00032 //
00033 // ------------------------------------------------------------
00034 //   New Physics scheme           18 Dec. 1996  H.Kurahige
00035 // ------------------------------------------------------------
00036 
00037 #include "G4WrapperProcess.hh"
00038 
00039 G4WrapperProcess::G4WrapperProcess(const G4String& aName,
00040                                          G4ProcessType   aType)
00041   : G4VProcess(aName,aType), pRegProcess((G4VProcess*)(0))
00042 {
00043 }
00044 
00045 G4WrapperProcess::G4WrapperProcess(const G4WrapperProcess& right)
00046   : G4VProcess(*((G4VProcess*)(&right))), pRegProcess(right.pRegProcess)
00047 {
00048 }
00049 
00050 G4WrapperProcess::~G4WrapperProcess()
00051 {
00052   if (pRegProcess!=0) delete pRegProcess;
00053 }
00054 
00055 void G4WrapperProcess::ResetNumberOfInteractionLengthLeft()
00056 {
00057   pRegProcess->ResetNumberOfInteractionLengthLeft();
00058 }
00059 
00060 G4double G4WrapperProcess::
00061 AlongStepGetPhysicalInteractionLength( const G4Track& track,
00062                                              G4double  previousStepSize,
00063                                              G4double  currentMinimumStep,
00064                                              G4double& proposedSafety,
00065                                              G4GPILSelection* selection     )
00066 {
00067   return pRegProcess->
00068          AlongStepGetPhysicalInteractionLength( track,
00069                                                 previousStepSize,
00070                                                 currentMinimumStep,
00071                                                 proposedSafety,
00072                                                 selection     );
00073 }
00074 
00075 G4double G4WrapperProcess::
00076 AtRestGetPhysicalInteractionLength( const G4Track& track,
00077                                           G4ForceCondition* condition )
00078 {
00079   return pRegProcess->AtRestGetPhysicalInteractionLength( track, condition );
00080 }
00081 
00082 G4double G4WrapperProcess::
00083 PostStepGetPhysicalInteractionLength( const G4Track& track,
00084                                             G4double   previousStepSize,
00085                                             G4ForceCondition* condition )
00086 {
00087    return pRegProcess->PostStepGetPhysicalInteractionLength( track,
00088                                                              previousStepSize,
00089                                                              condition );
00090 }
00091       
00092 void G4WrapperProcess::SetProcessManager(const G4ProcessManager* procMan)
00093 {
00094    pRegProcess->SetProcessManager(procMan); 
00095 }
00096 
00097 const G4ProcessManager* G4WrapperProcess::GetProcessManager()
00098 {
00099   return     pRegProcess->GetProcessManager();
00100 }
00101 
00102 G4VParticleChange* G4WrapperProcess::PostStepDoIt( const G4Track& track,
00103                                                    const G4Step&  stepData )
00104 {
00105   return     pRegProcess->PostStepDoIt( track, stepData );        
00106 }
00107 
00108 G4VParticleChange* G4WrapperProcess::AlongStepDoIt( const G4Track& track,
00109                                                     const G4Step& stepData )
00110 {
00111   return     pRegProcess->AlongStepDoIt( track, stepData );        
00112 }
00113  
00114 G4VParticleChange* G4WrapperProcess::AtRestDoIt( const G4Track& track,
00115                                                  const G4Step& stepData )
00116 {
00117   return     pRegProcess->AtRestDoIt( track, stepData );        
00118 }
00119 
00120 G4bool G4WrapperProcess::IsApplicable(const G4ParticleDefinition& particle)
00121 {
00122   return     pRegProcess->IsApplicable(particle);
00123 }
00124 
00125 void G4WrapperProcess::BuildPhysicsTable(const G4ParticleDefinition& particle)
00126 {
00127   return     pRegProcess->BuildPhysicsTable(particle);
00128 }
00129 
00130 void G4WrapperProcess::PreparePhysicsTable(const G4ParticleDefinition& particle)
00131 {
00132   return     pRegProcess->PreparePhysicsTable(particle);
00133 }
00134 
00135 G4bool G4WrapperProcess::
00136 StorePhysicsTable(const G4ParticleDefinition* particle,
00137                   const G4String& directory, 
00138                         G4bool          ascii)
00139 {
00140   return pRegProcess->StorePhysicsTable(particle,  directory,  ascii);
00141 } 
00142  
00143 G4bool G4WrapperProcess::
00144 RetrievePhysicsTable( const G4ParticleDefinition* particle,
00145                       const G4String& directory, 
00146                             G4bool          ascii)
00147 {
00148   return pRegProcess->RetrievePhysicsTable(particle,  directory,  ascii);
00149 }  
00150 
00151 void G4WrapperProcess::StartTracking(G4Track* track)
00152 {
00153   pRegProcess->StartTracking(track);
00154 }
00155 
00156 void G4WrapperProcess::EndTracking()
00157 {
00158   pRegProcess->EndTracking();
00159 }
00160 
00161 void   G4WrapperProcess::RegisterProcess(G4VProcess* process)
00162 {
00163   pRegProcess=process;
00164   theProcessName += process->GetProcessName();
00165   theProcessType = process->GetProcessType();
00166 }
00167 
00168 const G4VProcess* G4WrapperProcess::GetRegisteredProcess() const
00169 {
00170   return pRegProcess;
00171 } 

Generated on Mon May 27 17:50:25 2013 for Geant4 by  doxygen 1.4.7