Geant4-11
G4UserLimits.hh
Go to the documentation of this file.
1//
2// ********************************************************************
3// * License and Disclaimer *
4// * *
5// * The Geant4 software is copyright of the Copyright Holders of *
6// * the Geant4 Collaboration. It is provided under the terms and *
7// * conditions of the Geant4 Software License, included in the file *
8// * LICENSE and available at http://cern.ch/geant4/license . These *
9// * include a list of copyright holders. *
10// * *
11// * Neither the authors of this software system, nor their employing *
12// * institutes,nor the agencies providing financial support for this *
13// * work make any representation or warranty, express or implied, *
14// * regarding this software system or assume any liability for its *
15// * use. Please see the license in the file LICENSE and URL above *
16// * for the full disclaimer and the limitation of liability. *
17// * *
18// * This code implementation is the result of the scientific and *
19// * technical work of the GEANT4 collaboration. *
20// * By using, copying, modifying or distributing the software (or *
21// * any work based on the software) you agree to acknowledge its *
22// * use in resulting scientific publications, and indicate your *
23// * acceptance of all terms of the Geant4 Software license. *
24// ********************************************************************
25//
26// G4UserLimits
27//
28// Class description:
29//
30// Simple placeholder for user Step limitations
31// In order to activate these limitations, users need to register
32// their "special" processes to each particle wanted.
33// Sample processes below can be found under processes/transportation
34// MaxAllowedStep : UserStepLimit
35// other limitation : UserSpecialCuts
36// In addition, users can add their own Step limitations by creating
37// a new class derived from G4UserLimits. In these case, 'fType' member
38// is supposed to be used to identify the class.
39
40// Author: Paul Kent, August 1996
41// Revisions:
42// - 01-11-1997, H.Kurashige: changed GetMaxAllowedStep()
43// - 08-04-1998: M.Maire: new data members
44// --------------------------------------------------------------------
45#ifndef G4USERLIMITS_HH
46#define G4USERLIMITS_HH 1
47
48#include "globals.hh"
49
50class G4Track;
51
53{
54 public:
56 G4double utimeMax = DBL_MAX, G4double uekinMin = 0.,
57 G4double urangMin = 0.);
58 G4UserLimits(const G4String& type, G4double ustepMax = DBL_MAX,
59 G4double utrakMax = DBL_MAX, G4double utimeMax = DBL_MAX,
60 G4double uekinMin = 0., G4double urangMin = 0.);
61 virtual ~G4UserLimits();
62
64 // If a logical volume has a G4UserLimits object, the Step length can
65 // be limited as shorter than MaxAllowedStep in the volume
66
71
72 virtual void SetMaxAllowedStep(G4double ustepMax);
73 virtual void SetUserMaxTrackLength(G4double utrakMax);
74 virtual void SetUserMaxTime(G4double utimeMax);
75 virtual void SetUserMinEkine(G4double uekinMin);
76 virtual void SetUserMinRange(G4double urangMin);
77
78 const G4String& GetType() const;
79 void SetType(const G4String& type);
80 // Set/Get type name for UserLimits.
81 // This type member is supposed to be used to check real class types for
82 // each concrete instantiation of G4UserLimits. In other words, users who
83 // use special classes derived from this base class should name their
84 // class with a proper identifier
85
86 protected:
87 G4double fMaxStep = 0.; // max allowed Step size in this volume
88 G4double fMaxTrack = 0.; // max total track length
89 G4double fMaxTime = 0.; // max time
90 G4double fMinEkine = 0.; // min kinetic energy (only for charged particles)
91 G4double fMinRange = 0.; // min remaining range (only for charged particles)
92
93 G4String fType; // type name
94};
95
96#include "G4UserLimits.icc"
97
98#endif
double G4double
Definition: G4Types.hh:83
G4String fType
Definition: G4UserLimits.hh:93
G4double fMaxTime
Definition: G4UserLimits.hh:89
virtual G4double GetUserMinEkine(const G4Track &)
virtual void SetUserMinRange(G4double urangMin)
virtual G4double GetUserMinRange(const G4Track &)
G4double fMaxStep
Definition: G4UserLimits.hh:87
G4double fMinRange
Definition: G4UserLimits.hh:91
virtual ~G4UserLimits()
void SetType(const G4String &type)
virtual G4double GetMaxAllowedStep(const G4Track &)
const G4String & GetType() const
virtual void SetMaxAllowedStep(G4double ustepMax)
virtual void SetUserMinEkine(G4double uekinMin)
G4double fMinEkine
Definition: G4UserLimits.hh:90
virtual void SetUserMaxTime(G4double utimeMax)
G4UserLimits(const G4String &type, G4double ustepMax=DBL_MAX, G4double utrakMax=DBL_MAX, G4double utimeMax=DBL_MAX, G4double uekinMin=0., G4double urangMin=0.)
virtual G4double GetUserMaxTrackLength(const G4Track &)
virtual G4double GetUserMaxTime(const G4Track &)
G4double fMaxTrack
Definition: G4UserLimits.hh:88
G4UserLimits(G4double ustepMax=DBL_MAX, G4double utrakMax=DBL_MAX, G4double utimeMax=DBL_MAX, G4double uekinMin=0., G4double urangMin=0.)
virtual void SetUserMaxTrackLength(G4double utrakMax)
#define DBL_MAX
Definition: templates.hh:62