G4UserLimits.hh

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 // class G4UserLimits
00031 //
00032 // Class description:
00033 //
00034 // Simple placeholder for user Step limitations
00035 // In order to activate these limitations, users need to register
00036 // their "special" processes to each particle they want. 
00037 // Sample processes below can be found under processes/transportation 
00038 //   MaxAllowedStep    : UserStepLimit
00039 //   other limitation  : UserSpecialCuts
00040 // In addition, users can add their own Step limitations by creating 
00041 // new class derived from G4UserLimits. In these case, fType member
00042 // is supposed to be used to identify class. 
00043 //  
00044 // Author: Paul Kent August 96
00045 // 
00046 // 01-11-97: change GetMaxAllowedStep(), Hisaya Kurashige
00047 // 08-04-98: new data members, mma
00048 // 02-16-00: add fType member and accessors, Hisaya Kurashige 
00049 //
00050 #ifndef G4USERLIMITS_HH
00051 #define G4USERLIMITS_HH
00052 
00053 #include "globals.hh"
00054 
00055 class G4Track;
00056 
00057 class G4UserLimits
00058 {
00059 public:  // with description
00060 
00061   G4UserLimits(G4double ustepMax = DBL_MAX,
00062                G4double utrakMax = DBL_MAX,
00063                G4double utimeMax = DBL_MAX,
00064                G4double uekinMin = 0.,
00065                G4double urangMin = 0. );
00066   G4UserLimits(const G4String& type,
00067                G4double ustepMax = DBL_MAX,
00068                G4double utrakMax = DBL_MAX,
00069                G4double utimeMax = DBL_MAX,
00070                G4double uekinMin = 0.,
00071                G4double urangMin = 0. );
00072   virtual ~G4UserLimits();
00073 
00074 public:  // with description
00075   
00076   virtual G4double GetMaxAllowedStep(const G4Track&);  
00077   // If a Logical Volume has a G4UserLimits object, the Step length can
00078   // be limited as shorter than MaxAllowedStep in the volume.
00079  
00080   // 
00081   virtual G4double GetUserMaxTrackLength(const G4Track&) ;
00082   virtual G4double GetUserMaxTime (const G4Track&);
00083   virtual G4double GetUserMinEkine(const G4Track&);
00084   virtual G4double GetUserMinRange(const G4Track&);
00085   
00086   virtual void SetMaxAllowedStep(G4double ustepMax);    
00087   virtual void SetUserMaxTrackLength(G4double utrakMax);
00088   virtual void SetUserMaxTime(G4double utimeMax);
00089   virtual void SetUserMinEkine(G4double uekinMin);
00090   virtual void SetUserMinRange(G4double urangMin);
00091 
00092   const G4String & GetType() const;
00093   void  SetType(const G4String& type);
00094   // Set/Get type name for UserLimits.
00095   // This type member is supposed to be used to check real class types for
00096   // each concrete instantiation of G4UserLimits. In other words, users who
00097   // use special classes derived from this base class should name their class
00098   // with a proper identifier.  
00099  
00100 protected:  // with description
00101 
00102   G4double fMaxStep;        // max allowed Step size in this volume 
00103   G4double fMaxTrack;       // max total track length
00104   G4double fMaxTime;        // max time
00105   G4double fMinEkine;       // min kinetic energy  (only for charged particles)
00106   G4double fMinRange;       // min remaining range (only for charged particles)
00107 
00108   G4String fType;           // type name
00109 };
00110 
00111 #include "G4UserLimits.icc"
00112 
00113 #endif

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