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: G4StepLimiter.hh 69887 2013-05-17 08:17:02Z gcosmo $ 00028 // 00029 // class description 00030 // 00031 // A "process" to be registered to the process manager of each particle, 00032 // in the UserPhysicsList, in order to take into account the MaxAllowedStep 00033 // defined in the G4UserLimits object attached to a logical volume. 00034 // 00035 // ------------------------------------------------------------ 00036 // 23 Jan. 2004 H.Kurashige 00037 // ------------------------------------------------------------ 00038 #ifndef G4StepLimiter_h 00039 #define G4StepLimiter_h 1 00040 00041 #include "G4ios.hh" 00042 #include "globals.hh" 00043 #include "G4VProcess.hh" 00044 00045 class G4StepLimiter : public G4VProcess 00046 { 00047 public: // with description 00048 00049 G4StepLimiter(const G4String& processName ="StepLimiter" ); 00050 00051 virtual ~G4StepLimiter(); 00052 00053 virtual G4double PostStepGetPhysicalInteractionLength( 00054 const G4Track& track, 00055 G4double previousStepSize, 00056 G4ForceCondition* condition 00057 ); 00058 00059 virtual G4VParticleChange* PostStepDoIt( 00060 const G4Track& , 00061 const G4Step& 00062 ); 00063 00064 public: // without description 00065 00066 // no operation in AtRestGPIL 00067 virtual G4double AtRestGetPhysicalInteractionLength( 00068 const G4Track& , 00069 G4ForceCondition* 00070 ){ return -1.0; }; 00071 00072 // no operation in AtRestDoIt 00073 virtual G4VParticleChange* AtRestDoIt( 00074 const G4Track& , 00075 const G4Step& 00076 ){return 0;}; 00077 00078 // no operation in AlongStepGPIL 00079 virtual G4double AlongStepGetPhysicalInteractionLength( 00080 const G4Track&, 00081 G4double , 00082 G4double , 00083 G4double& , 00084 G4GPILSelection* 00085 ){ return -1.0; }; 00086 00087 // no operation in AlongStepDoIt 00088 virtual G4VParticleChange* AlongStepDoIt( 00089 const G4Track& , 00090 const G4Step& 00091 ) {return 0;}; 00092 00093 private: 00094 00095 // hide assignment operator as private 00096 G4StepLimiter(G4StepLimiter&); 00097 G4StepLimiter& operator=(const G4StepLimiter& right); 00098 00099 }; 00100 00101 #endif 00102 00103 00104 00105 00106 00107 00108 00109 00110 00111