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] [ 10.5.p1 ] [ 10.6 ] [ 10.6.p1 ] [ 10.6.p2 ] [ 10.6.p3 ] [ 10.7 ] [ 10.7.p1 ] [ 10.7.p2 ] [ 10.7.p3 ] [ 10.7.p4 ] [ 11.0 ] [ 11.0.p1 ] [ 11.0.p2 ] [ 11.0.p3, ] [ 11.0.p4 ] [ 11.1 ] [ 11.1.1 ] [ 11.1.2 ] [ 11.1.3 ] [ 11.2 ] [ 11.2.1 ] [ 11.2.2 ] [ 11.3.0 ]

Diff markup

Differences between /processes/transportation/include/G4TransportationParameters.hh (Version 11.3.0) and /processes/transportation/include/G4TransportationParameters.hh (Version 3.0)


  1 //                                                  1 
  2 // *******************************************    
  3 // * License and Disclaimer                       
  4 // *                                              
  5 // * The  Geant4 software  is  copyright of th    
  6 // * the Geant4 Collaboration.  It is provided    
  7 // * conditions of the Geant4 Software License    
  8 // * LICENSE and available at  http://cern.ch/    
  9 // * include a list of copyright holders.         
 10 // *                                              
 11 // * Neither the authors of this software syst    
 12 // * institutes,nor the agencies providing fin    
 13 // * work  make  any representation or  warran    
 14 // * regarding  this  software system or assum    
 15 // * use.  Please see the license in the file     
 16 // * for the full disclaimer and the limitatio    
 17 // *                                              
 18 // * This  code  implementation is the result     
 19 // * technical work of the GEANT4 collaboratio    
 20 // * By using,  copying,  modifying or  distri    
 21 // * any work based  on the software)  you  ag    
 22 // * use  in  resulting  scientific  publicati    
 23 // * acceptance of all terms of the Geant4 Sof    
 24 // *******************************************    
 25 //                                                
 26 // Class Description:                             
 27 //                                                
 28 // A utility static class, responsable for kee    
 29 // for all transportation processes.  These pa    
 30 // to some types of particles, e.g. only stabl    
 31 //                                                
 32 // Constraints (creation/update):                 
 33 // - It must initialized only by the master th    
 34 // - It should be updated before the transport    
 35 // Note: It can be updated only if the state o    
 36 //                                                
 37 //  Only those instances of G4Transportation (    
 38 //    *after* G4TransportationParameters will     
 39 //    the values of its parameters.               
 40 //  (So in a multithreaded application, runs t    
 41 //                                                
 42 // Use: Parameters may be used in run time or     
 43 //                                                
 44 // Meaning of parameters:                         
 45 // - Warning   energy: below this, looping tra    
 46 // - Important energy: between warning E and t    
 47 // - Number of Trials: above 'important energy    
 48                                                   
 49 // Author:  J. Apostolakis Nov 2022               
 50 //          Inspired by G4EmParameters by V. I    
 51 // -------------------------------------------    
 52 //                                                
 53                                                   
 54 #ifndef G4TransportationParameters_hh             
 55 #define G4TransportationParameters_hh             
 56                                                   
 57 #include "globals.hh"                             
 58                                                   
 59 class G4TransportationParameters                  
 60 {                                                 
 61 public:                                           
 62   static   G4TransportationParameters* Instanc    
 63                                                   
 64   ~G4TransportationParameters() = default;        
 65                                                   
 66   G4bool   SetNumberOfTrials(  G4int val );       
 67                                                   
 68    // All three methods below enforce the rela    
 69   G4bool   SetWarningEnergy(   G4double val );    
 70   G4bool   SetImportantEnergy( G4double val );    
 71    //  If the relation fails, the methods abov    
 72   G4bool   SetWarningAndImportantEnergies( G4d    
 73    //  If the relation does *not* hold, it war    
 74    //     uses the smaller as the 'warning Ene    
 75    //     and  the larger  as the 'important e    
 76                                                   
 77   G4int    GetNumberOfTrials() const { return     
 78   G4double GetWarningEnergy() const { return f    
 79   G4double GetImportantEnergy() const { return    
 80   G4bool   IsMagneticMomentEnabled() const { r    
 81                                                   
 82   G4bool   EnableUseOfMagneticMoment(G4bool us    
 83    // Whether to deflect particles with force     
 84                                                   
 85   G4bool   SetHighLooperThresholds(); // Short    
 86   G4bool   SetIntermediateLooperThresholds();     
 87   G4bool   SetLowLooperThresholds();  // Set l    
 88   G4bool   SetSilenceAllLooperWarnings(G4bool     
 89   // return value = success or failure of sett    
 90                                                   
 91   G4bool   GetSilenceAllLooperWarnings(){ retu    
 92                                                   
 93   void     ReportLockError(G4String methodName    
 94    // Report error - in case the state of G4 i    
 95                                                   
 96   // Probe whether the 'default' instance exis    
 97   static G4bool  Exists() { return theInstance    
 98                                                   
 99    // printing                                    
100   void StreamInfo(std::ostream& os) const;        
101   void Dump() const;                              
102   friend std::ostream& operator<< (std::ostrea    
103                                                   
104 private:                                          
105   G4TransportationParameters();                   
106   //  Currently private - but potentially will    
107                                                   
108   // void   Initialise();                         
109                                                   
110   G4bool IsLocked() const;                        
111                                                   
112   void   PrintWarning(G4ExceptionDescription&     
113                                                   
114 private:                                          
115   static   G4TransportationParameters* theInst    
116                                                   
117   // STATE                                        
118   // Values for initialising 'loopers' paramet    
119   G4double fWarningEnergy   =  -1.0;  //  Warn    
120   G4double fImportantEnergy =  -1.0;  //  Give    
121   G4int    fNumberOfTrials  =    10;  //  Numb    
122                                                   
123   // Flags for use of gravity field(s) or fiel    
124   G4bool   fUseMagneticMoment = false;            
125   G4bool   fUseGravity        = false;            
126                                                   
127   // Flag to *Supress* all 'looper' warnings      
128   G4bool   fSilenceLooperWarnings= false;         
129 };                                                
130                                                   
131 #endif                                            
132