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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/management/include/G4VRestContinuousProcess.hh (Version 11.3.0) and /processes/management/include/G4VRestContinuousProcess.hh (Version 1.0)


                                                   >>   1 // This code implementation is the intellectual property of
                                                   >>   2 // the GEANT4 collaboration.
  1 //                                                  3 //
  2 // ******************************************* <<   4 // By copying, distributing or modifying the Program (or any work
  3 // * License and Disclaimer                    <<   5 // based on the Program) you indicate your acceptance of this statement,
  4 // *                                           <<   6 // and all its terms.
  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 //                                                  7 //
 26 // G4VRestContinuousProcess                    <<   8 // $Id: G4VRestContinuousProcess.hh,v 1.3 1999/11/07 17:11:47 kurasige Exp $
                                                   >>   9 // GEANT4 tag $Name: geant4-01-00 $
 27 //                                                 10 //
 28 // Class description:                          <<  11 // 
                                                   >>  12 // ------------------------------------------------------------
                                                   >>  13 //  GEANT 4 class header file 
 29 //                                                 14 //
 30 // Abstract class which defines the public beh <<  15 //  For information related to this code contact:
 31 // discrete physics interactions.              <<  16 //  CERN, CN Division, ASD group
                                                   >>  17 // 
                                                   >>  18 // Class Description 
                                                   >>  19 //  Abstract class which defines the public behavior of
                                                   >>  20 //  discrete physics interactions.
                                                   >>  21 //
                                                   >>  22 // ------------------------------------------------------------
                                                   >>  23 //   New Physics scheme            8  Mar. 1997  H.Kurahige
                                                   >>  24 // ------------------------------------------------------------
                                                   >>  25 //   modified                     26  Mar. 1997  H.Kurahige
                                                   >>  26 //   modified                     16  Apr. 1997  L.Urban    
                                                   >>  27 //   modified                     18  Sep. 1997  H.Kurashige    
                                                   >>  28 //   modified AlongStepGPIL etc.  17 Dec. 1997 H.Kurashige
                                                   >>  29 //   fix bugs in GetGPILSelection() 24 Jan. 1998 H.Kurashige
                                                   >>  30 //   modified for new ParticleChange 12 Mar. 1998  H.Kurashige
 32                                                    31 
 33 // Authors:                                    <<  32 #ifndef G4VRestContinuousProcess_h
 34 // - 2 December 1995, G.Cosmo - First implemen <<  33 #define G4VRestContinuousProcess_h 1
 35 // - 8 January 1997, H.Kurashige - New Physics << 
 36 // ------------------------------------------- << 
 37 #ifndef G4VRestContinuousProcess_hh            << 
 38 #define G4VRestContinuousProcess_hh 1          << 
 39                                                    34 
 40 #include "globals.hh"                              35 #include "globals.hh"
 41 #include "G4ios.hh"                                36 #include "G4ios.hh"
 42                                                    37 
 43 #include "G4VProcess.hh"                           38 #include "G4VProcess.hh"
 44                                                    39 
 45 class G4VRestContinuousProcess : public G4VPro     40 class G4VRestContinuousProcess : public G4VProcess 
 46 {                                                  41 {
                                                   >>  42   //  Abstract class which defines the public behavior of
                                                   >>  43   //  discrete physics interactions.
 47   public:                                          44   public:     
 48                                                    45 
 49     G4VRestContinuousProcess(const G4String& , <<  46       G4VRestContinuousProcess(const G4String& ,
 50                              G4ProcessType aTy <<  47              G4ProcessType   aType = fNotDefined );
 51     G4VRestContinuousProcess(G4VRestContinuous <<  48       G4VRestContinuousProcess(G4VRestContinuousProcess &);
 52                                                    49 
 53     virtual ~G4VRestContinuousProcess();       <<  50       virtual ~G4VRestContinuousProcess();
 54                                                    51 
 55     G4VRestContinuousProcess& operator=(const  <<  52   public:   //  with description
 56                                                    53 
 57     virtual G4double AtRestGetPhysicalInteract <<  54       virtual G4double AtRestGetPhysicalInteractionLength(
 58                              const G4Track& ,      55                              const G4Track& ,
 59                              G4ForceCondition* <<  56            G4ForceCondition* 
 60                             );                 <<  57           );
 61                                                    58 
 62     virtual G4VParticleChange* AtRestDoIt(     <<  59       virtual G4VParticleChange* AtRestDoIt(
 63                              const G4Track& ,  <<  60            const G4Track& ,
 64                              const G4Step&     <<  61            const G4Step&
 65                             );                 <<  62           );
 66                                                    63 
 67     virtual G4double AlongStepGetPhysicalInter <<  64       virtual G4double AlongStepGetPhysicalInteractionLength(
 68                              const G4Track& tr     65                              const G4Track& track,
 69                              G4double previous <<  66            G4double previousStepSize,
 70                              G4double currentM <<  67            G4double currentMinimumStep,
 71                              G4double& current <<  68            G4double& currentSafety,
 72                              G4GPILSelection*      69                              G4GPILSelection* selection
 73                             );                 <<  70           );
 74                                                    71 
 75     virtual G4VParticleChange* AlongStepDoIt(  <<  72       virtual G4VParticleChange* AlongStepDoIt(
 76                              const G4Track& ,  <<  73            const G4Track& ,
 77                              const G4Step&     <<  74            const G4Step& 
 78                             );                 <<  75           );
 79                                                    76  
 80     virtual G4double PostStepGetPhysicalIntera <<  77      //  no operation in  PostStepDoIt
                                                   >>  78       virtual G4double PostStepGetPhysicalInteractionLength(
 81                              const G4Track& ,      79                              const G4Track& ,
 82                              G4double ,        <<  80            G4double ,
 83                              G4ForceCondition* <<  81            G4ForceCondition*
 84                             ) { return -1.0; } <<  82           ){ return -1.0; };
 85       // No operation in  PostStepDoIt         <<  83 
                                                   >>  84      //  no operation in PostStepDoIt
                                                   >>  85       virtual G4VParticleChange* PostStepDoIt(
                                                   >>  86            const G4Track& ,
                                                   >>  87            const G4Step& 
                                                   >>  88           ) {return 0;};
 86                                                    89 
 87     virtual G4VParticleChange* PostStepDoIt(   <<  90   protected: //  with description
 88                              const G4Track& ,  <<  91     virtual G4double GetContinuousStepLimit(const G4Track& aTrack,
 89                              const G4Step&     <<  92                              G4double  previousStepSize,
 90                             ) { return 0; }    <<  93                              G4double currentMinimumStep,
 91       // No operation in PostStepDoIt          <<  94            G4double& currentSafety
                                                   >>  95                                                              )=0;
                                                   >>  96    // This pure virtual function is used to calculate step limit
                                                   >>  97     // for AlongStep in the derived processes  
 92                                                    98 
 93   protected:                                   <<  99   private:
                                                   >> 100     // this is the returnd value of  G4GPILSelection in 
                                                   >> 101     // the arguments of AlongStepGPIL()
                                                   >> 102     G4GPILSelection  valueGPILSelection;
                                                   >> 103 
                                                   >> 104   protected://  with description
                                                   >> 105     // these two methods are set/get methods for valueGPILSelection
                                                   >> 106     void SetGPILSelection(G4GPILSelection selection)
                                                   >> 107     { valueGPILSelection = selection;};
                                                   >> 108 
                                                   >> 109     G4GPILSelection GetGPILSelection() const{return valueGPILSelection;};
                                                   >> 110 
                                                   >> 111   protected: //  with description
                                                   >> 112 
                                                   >> 113       virtual G4double GetMeanLifeTime(const G4Track& aTrack,G4ForceCondition* condition)=0;
                                                   >> 114       //  Calculates the mean life-time (i.e. for decays) of the
                                                   >> 115       //  particle at rest due to the occurence of the given process,
                                                   >> 116       //  or converts the probability of interaction (i.e. for
                                                   >> 117       //  annihilation) into the life-time of the particle for the
                                                   >> 118       //  occurence of the given process.
 94                                                   119 
 95     virtual G4double GetContinuousStepLimit(co << 120   private:
 96                                             G4 << 121   // hide default constructor and assignment operator as private 
 97                                             G4 << 122       G4VRestContinuousProcess();
 98                                             G4 << 123       G4VRestContinuousProcess & operator=(const G4VRestContinuousProcess &right);
 99       // This pure virtual function is used to << 124 
100       // for AlongStep in the derived processe << 125 };
101                                                << 
102     virtual G4double GetMeanLifeTime(const G4T << 
103                                      G4ForceCo << 
104       // Calculates the mean life-time (i.e. f << 
105       // particle at rest due to the occurrenc << 
106       // converts the probability of interacti << 
107       // the life-time of the particle for the << 
108                                                   126 
109     inline void SetGPILSelection(G4GPILSelecti << 127 // -----------------------------------------
110       { valueGPILSelection = selection; }      << 128 //  inlined function members implementation
                                                   >> 129 // -----------------------------------------
                                                   >> 130 #include "G4Step.hh"
                                                   >> 131 #include "G4Track.hh"
                                                   >> 132 #include "G4MaterialTable.hh"
                                                   >> 133 #include "G4VParticleChange.hh"
                                                   >> 134 inline G4double G4VRestContinuousProcess::AlongStepGetPhysicalInteractionLength(
                                                   >> 135                              const G4Track& track,
                                                   >> 136            G4double previousStepSize,
                                                   >> 137            G4double currentMinimumStep,
                                                   >> 138            G4double& currentSafety,
                                                   >> 139                              G4GPILSelection* selection
                                                   >> 140           )
                                                   >> 141 {
                                                   >> 142   // GPILSelection is set to defaule value of CandidateForSelection
                                                   >> 143   valueGPILSelection = CandidateForSelection;
111                                                   144 
112     inline G4GPILSelection GetGPILSelection()  << 145   // get Step limit proposed by the process
113       { return valueGPILSelection; }           << 146   G4double steplength = GetContinuousStepLimit(track,previousStepSize,currentMinimumStep, currentSafety);
114                                                   147 
                                                   >> 148   // set return value for G4GPILSelection
                                                   >> 149   *selection = valueGPILSelection;
                                                   >> 150 #ifdef G4VERBOSE
                                                   >> 151    if (verboseLevel>1){
                                                   >> 152     G4cout << "G4VRestContinuousProcess::AlongStepGetPhysicalInteractionLength ";
                                                   >> 153     G4cout << "[ " << GetProcessName() << "]" <<endl;
                                                   >> 154     track.GetDynamicParticle()->DumpInfo();
                                                   >> 155     G4cout << " in Material  " <<  track.GetMaterial()->GetName() <<endl;
                                                   >> 156     G4cout << "IntractionLength= " << steplength/cm <<"[cm] " <<endl;
                                                   >> 157   }
                                                   >> 158 #endif
                                                   >> 159    return  steplength ;
                                                   >> 160 }
115                                                   161 
116   private:                                     << 162 inline G4double G4VRestContinuousProcess::AtRestGetPhysicalInteractionLength(
                                                   >> 163                              const G4Track& track,
                                                   >> 164            G4ForceCondition* condition
                                                   >> 165           )
                                                   >> 166 {
                                                   >> 167   // beggining of tracking 
                                                   >> 168   ResetNumberOfInteractionLengthLeft();
117                                                   169 
118     G4VRestContinuousProcess();                << 170   // condition is set to "Not Forced"
119       // Hidden default constructor            << 171   *condition = NotForced;
120                                                   172 
121     G4GPILSelection valueGPILSelection = Candi << 173   // get mean life time
122       // This is the returned value of  G4GPIL << 174   currentInteractionLength = GetMeanLifeTime(track, condition);
123       // the arguments of AlongStepGPIL()      << 
124 };                                             << 
125                                                   175 
                                                   >> 176 #ifdef G4VERBOSE
                                                   >> 177    if ((currentInteractionLength <0.0) || (verboseLevel>2)){
                                                   >> 178     G4cout << "G4VRestContinuousProcess::AtRestGetPhysicalInteractionLength ";
                                                   >> 179     G4cout << "[ " << GetProcessName() << "]" <<endl;
                                                   >> 180     track.GetDynamicParticle()->DumpInfo();
                                                   >> 181     G4cout << " in Material  " << track.GetMaterial()->GetName() <<endl;
                                                   >> 182     G4cout << "MeanLifeTime = " << currentInteractionLength/ns << "[ns]" <<endl;
                                                   >> 183   }
126 #endif                                            184 #endif
                                                   >> 185 
                                                   >> 186   return theNumberOfInteractionLengthLeft * currentInteractionLength;
                                                   >> 187 }
                                                   >> 188 
                                                   >> 189 
                                                   >> 190 inline G4VParticleChange* G4VRestContinuousProcess::AtRestDoIt( 
                                                   >> 191            const G4Track&,
                                                   >> 192            const G4Step& 
                                                   >> 193           )
                                                   >> 194 {
                                                   >> 195 //  clear NumberOfInteractionLengthLeft
                                                   >> 196     ClearNumberOfInteractionLengthLeft();
                                                   >> 197 
                                                   >> 198     return pParticleChange;
                                                   >> 199 }
                                                   >> 200 
                                                   >> 201 inline G4VParticleChange* G4VRestContinuousProcess::AlongStepDoIt(
                                                   >> 202            const G4Track& ,
                                                   >> 203            const G4Step& 
                                                   >> 204           )
                                                   >> 205 { 
                                                   >> 206     return pParticleChange;
                                                   >> 207 }
                                                   >> 208 
                                                   >> 209 #endif
                                                   >> 210 
                                                   >> 211 
                                                   >> 212 
                                                   >> 213 
                                                   >> 214 
                                                   >> 215 
127                                                   216