|
||||
File indexing completed on 2025-01-18 09:59:17
0001 // 0002 // ******************************************************************** 0003 // * License and Disclaimer * 0004 // * * 0005 // * The Geant4 software is copyright of the Copyright Holders of * 0006 // * the Geant4 Collaboration. It is provided under the terms and * 0007 // * conditions of the Geant4 Software License, included in the file * 0008 // * LICENSE and available at http://cern.ch/geant4/license . These * 0009 // * include a list of copyright holders. * 0010 // * * 0011 // * Neither the authors of this software system, nor their employing * 0012 // * institutes,nor the agencies providing financial support for this * 0013 // * work make any representation or warranty, express or implied, * 0014 // * regarding this software system or assume any liability for its * 0015 // * use. Please see the license in the file LICENSE and URL above * 0016 // * for the full disclaimer and the limitation of liability. * 0017 // * * 0018 // * This code implementation is the result of the scientific and * 0019 // * technical work of the GEANT4 collaboration. * 0020 // * By using, copying, modifying or distributing the software (or * 0021 // * any work based on the software) you agree to acknowledge its * 0022 // * use in resulting scientific publications, and indicate your * 0023 // * acceptance of all terms of the Geant4 Software license. * 0024 // ******************************************************************** 0025 // 0026 // G4UserLimits 0027 // 0028 // Class description: 0029 // 0030 // Simple placeholder for user Step limitations 0031 // In order to activate these limitations, users need to register 0032 // their "special" processes to each particle wanted. 0033 // Sample processes below can be found under processes/transportation 0034 // MaxAllowedStep : UserStepLimit 0035 // other limitation : UserSpecialCuts 0036 // In addition, users can add their own Step limitations by creating 0037 // a new class derived from G4UserLimits. In these case, 'fType' member 0038 // is supposed to be used to identify the class. 0039 0040 // Author: Paul Kent, August 1996 0041 // Revisions: 0042 // - 01-11-1997, H.Kurashige: changed GetMaxAllowedStep() 0043 // - 08-04-1998: M.Maire: new data members 0044 // -------------------------------------------------------------------- 0045 #ifndef G4USERLIMITS_HH 0046 #define G4USERLIMITS_HH 1 0047 0048 #include "globals.hh" 0049 0050 class G4Track; 0051 0052 class G4UserLimits 0053 { 0054 public: 0055 G4UserLimits(G4double ustepMax = DBL_MAX, G4double utrakMax = DBL_MAX, 0056 G4double utimeMax = DBL_MAX, G4double uekinMin = 0., 0057 G4double urangMin = 0.); 0058 G4UserLimits(const G4String& type, G4double ustepMax = DBL_MAX, 0059 G4double utrakMax = DBL_MAX, G4double utimeMax = DBL_MAX, 0060 G4double uekinMin = 0., G4double urangMin = 0.); 0061 virtual ~G4UserLimits(); 0062 0063 virtual G4double GetMaxAllowedStep(const G4Track&); 0064 // If a logical volume has a G4UserLimits object, the Step length can 0065 // be limited as shorter than MaxAllowedStep in the volume 0066 0067 virtual G4double GetUserMaxTrackLength(const G4Track&); 0068 virtual G4double GetUserMaxTime(const G4Track&); 0069 virtual G4double GetUserMinEkine(const G4Track&); 0070 virtual G4double GetUserMinRange(const G4Track&); 0071 0072 virtual void SetMaxAllowedStep(G4double ustepMax); 0073 virtual void SetUserMaxTrackLength(G4double utrakMax); 0074 virtual void SetUserMaxTime(G4double utimeMax); 0075 virtual void SetUserMinEkine(G4double uekinMin); 0076 virtual void SetUserMinRange(G4double urangMin); 0077 0078 const G4String& GetType() const; 0079 void SetType(const G4String& type); 0080 // Set/Get type name for UserLimits. 0081 // This type member is supposed to be used to check real class types for 0082 // each concrete instantiation of G4UserLimits. In other words, users who 0083 // use special classes derived from this base class should name their 0084 // class with a proper identifier 0085 0086 protected: 0087 G4double fMaxStep = 0.; // max allowed Step size in this volume 0088 G4double fMaxTrack = 0.; // max total track length 0089 G4double fMaxTime = 0.; // max time 0090 G4double fMinEkine = 0.; // min kinetic energy (only for charged particles) 0091 G4double fMinRange = 0.; // min remaining range (only for charged particles) 0092 0093 G4String fType; // type name 0094 }; 0095 0096 #include "G4UserLimits.icc" 0097 0098 #endif
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |