Geant4 Cross Reference |
1 // 1 // 2 // ******************************************* 2 // ******************************************************************** 3 // * License and Disclaimer << 3 // * DISCLAIMER * 4 // * 4 // * * 5 // * The Geant4 software is copyright of th << 5 // * The following disclaimer summarizes all the specific disclaimers * 6 // * the Geant4 Collaboration. It is provided << 6 // * of contributors to this software. The specific disclaimers,which * 7 // * conditions of the Geant4 Software License << 7 // * govern, are listed with their locations in: * 8 // * LICENSE and available at http://cern.ch/ << 8 // * http://cern.ch/geant4/license * 9 // * include a list of copyright holders. << 10 // * 9 // * * 11 // * Neither the authors of this software syst 10 // * Neither the authors of this software system, nor their employing * 12 // * institutes,nor the agencies providing fin 11 // * institutes,nor the agencies providing financial support for this * 13 // * work make any representation or warran 12 // * work make any representation or warranty, express or implied, * 14 // * regarding this software system or assum 13 // * regarding this software system or assume any liability for its * 15 // * use. Please see the license in the file << 14 // * use. * 16 // * for the full disclaimer and the limitatio << 17 // * 15 // * * 18 // * This code implementation is the result << 16 // * This code implementation is the intellectual property of the * 19 // * technical work of the GEANT4 collaboratio << 17 // * GEANT4 collaboration. * 20 // * By using, copying, modifying or distri << 18 // * By copying, distributing or modifying the Program (or any work * 21 // * any work based on the software) you ag << 19 // * based on the Program) you indicate your acceptance of this * 22 // * use in resulting scientific publicati << 20 // * statement, and all its terms. * 23 // * acceptance of all terms of the Geant4 Sof << 24 // ******************************************* 21 // ******************************************************************** 25 // 22 // 26 // G4UserLimits << 23 // >> 24 // $Id: G4UserLimits.hh,v 1.8 2004/01/23 02:23:09 kurasige Exp $ >> 25 // GEANT4 tag $Name: geant4-08-00 $ >> 26 // >> 27 // >> 28 // class G4UserLimits 27 // 29 // 28 // Class description: 30 // Class description: 29 // 31 // 30 // Simple placeholder for user Step limitation 32 // Simple placeholder for user Step limitations 31 // In order to activate these limitations, use 33 // In order to activate these limitations, users need to register 32 // their "special" processes to each particle << 34 // their "special" processes to each particle they want. 33 // Sample processes below can be found under p << 35 // Sample processes below can be found under processes/transportation 34 // MaxAllowedStep : UserStepLimit 36 // MaxAllowedStep : UserStepLimit 35 // other limitation : UserSpecialCuts 37 // other limitation : UserSpecialCuts 36 // In addition, users can add their own Step l << 38 // In addition, users can add their own Step limitations by creating 37 // a new class derived from G4UserLimits. In t << 39 // new class derived from G4UserLimits. In these case, fType member 38 // is supposed to be used to identify the clas << 40 // is supposed to be used to identify class. 39 << 41 // 40 // Author: Paul Kent, August 1996 << 42 // Author: Paul Kent August 96 41 // Revisions: << 43 // 42 // - 01-11-1997, H.Kurashige: changed GetMaxAl << 44 // 01-11-97: change GetMaxAllowedStep(), Hisaya Kurashige 43 // - 08-04-1998: M.Maire: new data members << 45 // 08-04-98: new data members, mma 44 // ------------------------------------------- << 46 // 02-16-00: add fType member and accessors, Hisaya Kurashige >> 47 // 45 #ifndef G4USERLIMITS_HH 48 #ifndef G4USERLIMITS_HH 46 #define G4USERLIMITS_HH 1 << 49 #define G4USERLIMITS_HH 47 50 48 #include "globals.hh" 51 #include "globals.hh" 49 52 50 class G4Track; 53 class G4Track; 51 54 52 class G4UserLimits 55 class G4UserLimits 53 { 56 { 54 public: << 57 public: // with description 55 G4UserLimits(G4double ustepMax = DBL_MAX, G4 << 56 G4double utimeMax = DBL_MAX, G4 << 57 G4double urangMin = 0.); << 58 G4UserLimits(const G4String& type, G4double << 59 G4double utrakMax = DBL_MAX, G4 << 60 G4double uekinMin = 0., G4doubl << 61 virtual ~G4UserLimits(); << 62 58 63 virtual G4double GetMaxAllowedStep(const G4T << 59 G4UserLimits(G4double ustepMax = DBL_MAX, 64 // If a logical volume has a G4UserLimits ob << 60 G4double utrakMax = DBL_MAX, 65 // be limited as shorter than MaxAllowedStep << 61 G4double utimeMax = DBL_MAX, >> 62 G4double uekinMin = 0., >> 63 G4double urangMin = 0. ); >> 64 G4UserLimits(const G4String& type, >> 65 G4double ustepMax = DBL_MAX, >> 66 G4double utrakMax = DBL_MAX, >> 67 G4double utimeMax = DBL_MAX, >> 68 G4double uekinMin = 0., >> 69 G4double urangMin = 0. ); >> 70 virtual ~G4UserLimits(); 66 71 67 virtual G4double GetUserMaxTrackLength(const << 72 public: // with description 68 virtual G4double GetUserMaxTime(const G4Trac << 73 >> 74 virtual G4double GetMaxAllowedStep(const G4Track&); >> 75 // If a Logical Volume has a G4UserLimits object, the Step length can >> 76 // be limited as shorter than MaxAllowedStep in the volume. >> 77 >> 78 // >> 79 virtual G4double GetUserMaxTrackLength(const G4Track&) ; >> 80 virtual G4double GetUserMaxTime (const G4Track&); 69 virtual G4double GetUserMinEkine(const G4Tra 81 virtual G4double GetUserMinEkine(const G4Track&); 70 virtual G4double GetUserMinRange(const G4Tra 82 virtual G4double GetUserMinRange(const G4Track&); 71 << 83 72 virtual void SetMaxAllowedStep(G4double uste << 84 virtual void SetMaxAllowedStep(G4double ustepMax); 73 virtual void SetUserMaxTrackLength(G4double 85 virtual void SetUserMaxTrackLength(G4double utrakMax); 74 virtual void SetUserMaxTime(G4double utimeMa 86 virtual void SetUserMaxTime(G4double utimeMax); 75 virtual void SetUserMinEkine(G4double uekinM 87 virtual void SetUserMinEkine(G4double uekinMin); 76 virtual void SetUserMinRange(G4double urangM 88 virtual void SetUserMinRange(G4double urangMin); 77 89 78 const G4String& GetType() const; << 90 const G4String & GetType() const; 79 void SetType(const G4String& type); << 91 void SetType(const G4String& type); 80 // Set/Get type name for UserLimits. 92 // Set/Get type name for UserLimits. 81 // This type member is supposed to be used t 93 // This type member is supposed to be used to check real class types for 82 // each concrete instantiation of G4UserLimi 94 // each concrete instantiation of G4UserLimits. In other words, users who 83 // use special classes derived from this bas << 95 // use special classes derived from this base class should name their class 84 // class with a proper identifier << 96 // with a proper identifier. 85 << 97 86 protected: << 98 protected: // with description 87 G4double fMaxStep = 0.; // max allowed Ste << 99 88 G4double fMaxTrack = 0.; // max total track << 100 G4double fMaxStep; // max allowed Step size in this volume 89 G4double fMaxTime = 0.; // max time << 101 G4double fMaxTrack; // max total track length 90 G4double fMinEkine = 0.; // min kinetic ene << 102 G4double fMaxTime; // max time 91 G4double fMinRange = 0.; // min remaining r << 103 G4double fMinEkine; // min kinetic energy (only for charged particles) >> 104 G4double fMinRange; // min remaining range (only for charged particles) 92 105 93 G4String fType; // type name << 106 G4String fType; // type name 94 }; 107 }; 95 108 96 #include "G4UserLimits.icc" 109 #include "G4UserLimits.icc" 97 110 98 #endif 111 #endif 99 112