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.5 ] [ 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/G4VContinuousDiscreteProcess.hh (Version 11.3.0) and /processes/management/include/G4VContinuousDiscreteProcess.hh (Version 1.1)


                                                   >>   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 // G4VContinuousDiscreteProcess                <<   8 // $Id: G4VContinuousDiscreteProcess.hh,v 1.3.6.1 1999/12/08 17:35:11 gunter Exp $
                                                   >>   9 // GEANT4 tag $Name: geant4-01-01 $
 27 //                                                 10 //
 28 // Class description:                          << 
 29 //                                                 11 // 
 30 // Abstract class which defines the public beh <<  12 // ------------------------------------------------------------
 31 // discrete physics interactions.              <<  13 //  GEANT 4 class header file 
                                                   >>  14 //
                                                   >>  15 //  For information related to this code contact:
                                                   >>  16 //  CERN, CN Division, ASD group
                                                   >>  17 //  Abstract class which defines the public behavior of
                                                   >>  18 // 
                                                   >>  19 // Class Description 
                                                   >>  20 //  discrete physics interactions.
                                                   >>  21 //
                                                   >>  22 // ------------------------------------------------------------
                                                   >>  23 //   New Physics scheme            8  Mar. 1997  H.Kurahige
                                                   >>  24 // ------------------------------------------------------------
                                                   >>  25 //   modified                     26 Mar. 1997 H.Kurashige
                                                   >>  26 //   modified                     16 Apr. 1997 L.Urban     
                                                   >>  27 //   modified AlongStepGPIL etc.  17 Dec. 1997 H.Kurashige
                                                   >>  28 //   fix bugs in GetGPILSelection() 24 Jan. 1998 H.Kurashige
                                                   >>  29 //   modified for new ParticleChange 12 Mar. 1998  H.Kurashige
 32                                                    30 
 33 // Authors:                                    <<  31 #ifndef G4VContinuousDiscreteProcess_h
 34 // - 2 December 1995, G.Cosmo - First implemen <<  32 #define G4VContinuousDiscreteProcess_h 1
 35 // - 8 January 1997, H.Kurashige - New Physics << 
 36 // ------------------------------------------- << 
 37 #ifndef G4VContinuousDiscreteProcess_hh        << 
 38 #define G4VContinuousDiscreteProcess_hh 1      << 
 39                                                    33 
 40 #include "globals.hh"                              34 #include "globals.hh"
 41 #include "G4ios.hh"                                35 #include "G4ios.hh"
 42                                                    36 
 43 #include "G4VProcess.hh"                           37 #include "G4VProcess.hh"
 44                                                    38 
 45 class G4VContinuousDiscreteProcess : public G4     39 class G4VContinuousDiscreteProcess : public G4VProcess 
 46 {                                                  40 {
                                                   >>  41   //  Abstract class which defines the public behavior of
                                                   >>  42   //  discrete physics interactions.
 47   public:                                          43   public:     
 48                                                    44 
 49     G4VContinuousDiscreteProcess(const G4Strin <<  45       G4VContinuousDiscreteProcess(const G4String& ,
 50                                  G4ProcessType <<  46            G4ProcessType   aType = fNotDefined );
 51     G4VContinuousDiscreteProcess(G4VContinuous <<  47       G4VContinuousDiscreteProcess(G4VContinuousDiscreteProcess &);
 52                                                    48 
 53     virtual ~G4VContinuousDiscreteProcess();   <<  49       virtual ~G4VContinuousDiscreteProcess();
 54                                                    50 
 55     G4VContinuousDiscreteProcess& operator=(co <<  51   public :// with description
 56                                                <<  52       virtual G4double PostStepGetPhysicalInteractionLength(
 57     virtual G4double PostStepGetPhysicalIntera << 
 58                              const G4Track& tr     53                              const G4Track& track,
 59                              G4double   previo <<  54            G4double   previousStepSize,
 60                              G4ForceCondition* <<  55            G4ForceCondition* condition
 61                             );                 <<  56           );
 62                                                <<  57 
 63     virtual G4VParticleChange* PostStepDoIt(   <<  58       virtual G4VParticleChange* PostStepDoIt(
 64                              const G4Track& ,  <<  59            const G4Track& ,
 65                              const G4Step&     <<  60            const G4Step& 
 66                             );                 <<  61           );
 67                                                    62 
 68     virtual G4double AlongStepGetPhysicalInter <<  63       virtual G4double AlongStepGetPhysicalInteractionLength(
 69                              const G4Track&,       64                              const G4Track&,
 70                              G4double  previou     65                              G4double  previousStepSize,
 71                              G4double  current     66                              G4double  currentMinimumStep,
 72                              G4double& current <<  67            G4double& currentSafety,
 73                              G4GPILSelection*      68                              G4GPILSelection* selection
 74                             );                 <<  69           );
 75                                                    70 
 76     virtual G4VParticleChange* AlongStepDoIt(  <<  71       virtual G4VParticleChange* AlongStepDoIt(
 77                              const G4Track& ,  <<  72            const G4Track& ,
 78                              const G4Step&     <<  73            const G4Step& 
 79                             );                 <<  74           );
 80                                                    75  
 81     virtual G4double AtRestGetPhysicalInteract <<  76      //  no operation in  AtRestDoIt
                                                   >>  77       virtual G4double AtRestGetPhysicalInteractionLength(
 82                              const G4Track& ,      78                              const G4Track& ,
 83                              G4ForceCondition* <<  79            G4ForceCondition* 
 84                             ) { return -1.0; } <<  80           ) { return -1.0; };
 85       // No operation in AtRestDoIt            << 
 86                                                    81 
 87     virtual G4VParticleChange* AtRestDoIt(     <<  82      //  no operation in  AtRestDoIt
 88                              const G4Track& ,  <<  83       virtual G4VParticleChange* AtRestDoIt(
 89                              const G4Step&     <<  84            const G4Track& ,
 90                             ) { return 0; }    <<  85            const G4Step&
 91       // No operation in AtRestDoIt            <<  86           ) {return 0;};
 92                                                    87  
 93   protected:                                   <<  88  protected:// with description
 94                                                <<  89      virtual G4double GetMeanFreePath(const G4Track& aTrack,
 95     virtual G4double GetMeanFreePath(const G4T <<  90                              G4double   previousStepSize,
 96                              G4double previous <<  91                              G4ForceCondition* condition
 97                              G4ForceCondition* <<  92                                                                )=0;
 98       // Calculates from the macroscopic cross <<  93       //  Calculates from the macroscopic cross section a mean
 99       // free path, the value is returned in u <<  94       //  free path, the value is returned in units of distance.
100                                                    95 
                                                   >>  96   protected:// with description
101     virtual G4double GetContinuousStepLimit(co     97     virtual G4double GetContinuousStepLimit(const G4Track& aTrack,
102                              G4double  previou     98                              G4double  previousStepSize,
103                              G4double  current     99                              G4double  currentMinimumStep,
104                              G4double& current << 100            G4double& currentSafety
                                                   >> 101                                                              )=0;
                                                   >> 102   private:
                                                   >> 103     // this is the returnd value of  G4GPILSelection in 
                                                   >> 104     // the arguments of AlongStepGPIL()
                                                   >> 105     G4GPILSelection  valueGPILSelection;
                                                   >> 106 
                                                   >> 107   protected:// with description
                                                   >> 108     // these two methods are set/get methods for valueGPILSelection
                                                   >> 109     void SetGPILSelection(G4GPILSelection selection)
                                                   >> 110     { valueGPILSelection = selection;};
                                                   >> 111 
                                                   >> 112     G4GPILSelection GetGPILSelection() const{return valueGPILSelection;};
                                                   >> 113 
                                                   >> 114    private:
                                                   >> 115   // hide default constructor and assignment operator as private 
                                                   >> 116       G4VContinuousDiscreteProcess();
                                                   >> 117       G4VContinuousDiscreteProcess & operator=(const G4VContinuousDiscreteProcess &right);
105                                                   118 
106     inline void SetGPILSelection(G4GPILSelecti << 119 };
107       { valueGPILSelection = selection; }      << 120 // -----------------------------------------
                                                   >> 121 //  inlined function members implementation
                                                   >> 122 // -----------------------------------------
                                                   >> 123 #include "G4Step.hh"
                                                   >> 124 #include "G4Track.hh"
                                                   >> 125 #include "G4MaterialTable.hh"
                                                   >> 126 #include "G4VParticleChange.hh"
108                                                   127 
109     inline G4GPILSelection GetGPILSelection()  << 128 inline G4double G4VContinuousDiscreteProcess::PostStepGetPhysicalInteractionLength(
110       { return valueGPILSelection; }           << 129                              const G4Track& track,
                                                   >> 130            G4double   previousStepSize,
                                                   >> 131            G4ForceCondition* condition
                                                   >> 132           )
                                                   >> 133 {
                                                   >> 134   if ( (previousStepSize <=0.0) || (theNumberOfInteractionLengthLeft<=0.0)) {
                                                   >> 135     // beggining of tracking (or just after DoIt of this process)
                                                   >> 136     ResetNumberOfInteractionLengthLeft();
                                                   >> 137   } else {
                                                   >> 138     // subtract NumberOfInteractionLengthLeft 
                                                   >> 139     SubtractNumberOfInteractionLengthLeft(previousStepSize);
                                                   >> 140     if(theNumberOfInteractionLengthLeft<perMillion)
                                                   >> 141        theNumberOfInteractionLengthLeft=0.;        
                                                   >> 142   }
                                                   >> 143 
                                                   >> 144   // condition is set to "Not Forced"
                                                   >> 145   *condition = NotForced;
                                                   >> 146 
                                                   >> 147   // get mean free path
                                                   >> 148   currentInteractionLength = GetMeanFreePath(track, previousStepSize, condition);
                                                   >> 149 
                                                   >> 150 #ifdef G4VERBOSE
                                                   >> 151   if ((currentInteractionLength <=0.0) || (verboseLevel>2)){
                                                   >> 152     G4cout << "G4VContinuousDiscreteProcess::PostStepGetPhysicalInteractionLength ";
                                                   >> 153     G4cout << "[ " << GetProcessName() << "]" <<G4endl;
                                                   >> 154     track.GetDynamicParticle()->DumpInfo();
                                                   >> 155     G4cout << " in Material  " << track.GetMaterial()->GetName() <<G4endl;
                                                   >> 156     G4cout << "MeanFreePath = " << currentInteractionLength/cm << "[cm]" <<G4endl;
                                                   >> 157   }
                                                   >> 158 #endif
111                                                   159 
112   private:                                     << 160   G4double value = theNumberOfInteractionLengthLeft * currentInteractionLength;
                                                   >> 161 #ifdef G4VERBOSE
                                                   >> 162   if (verboseLevel>1){
                                                   >> 163     G4cout << "G4VContinuousDiscreteProcess::PostStepGetPhysicalInteractionLength ";
                                                   >> 164     G4cout << "[ " << GetProcessName() << "]" <<G4endl;
                                                   >> 165     track.GetDynamicParticle()->DumpInfo();
                                                   >> 166     G4cout << " in Material  " <<  track.GetMaterial()->GetName() <<G4endl;
                                                   >> 167     G4cout << "InteractionLength= " << value/cm <<"[cm] " <<G4endl;
                                                   >> 168   }
                                                   >> 169 #endif
                                                   >> 170   return value;
                                                   >> 171 }
113                                                   172 
114     G4VContinuousDiscreteProcess();            << 
115       // Hidden default constructor            << 
116                                                   173 
117     G4GPILSelection valueGPILSelection = Candi << 174 inline G4VParticleChange* G4VContinuousDiscreteProcess::PostStepDoIt(
118       // This is the returned value of G4GPILS << 175            const G4Track& ,
119       // the arguments of AlongStepGPIL()      << 176            const G4Step&
120 };                                             << 177           )
                                                   >> 178 { 
                                                   >> 179 //  clear  NumberOfInteractionLengthLeft
                                                   >> 180     ClearNumberOfInteractionLengthLeft();
                                                   >> 181     return pParticleChange;
                                                   >> 182 }
                                                   >> 183 
                                                   >> 184 inline G4VParticleChange* G4VContinuousDiscreteProcess::AlongStepDoIt(
                                                   >> 185            const G4Track& ,
                                                   >> 186            const G4Step&
                                                   >> 187           )
                                                   >> 188 { 
                                                   >> 189 //  clear  NumberOfInteractionLengthLeft
                                                   >> 190     ClearNumberOfInteractionLengthLeft();
                                                   >> 191     return pParticleChange;
                                                   >> 192 }
                                                   >> 193 
                                                   >> 194 inline G4double G4VContinuousDiscreteProcess::AlongStepGetPhysicalInteractionLength(
                                                   >> 195                              const G4Track& track,
                                                   >> 196            G4double previousStepSize,
                                                   >> 197            G4double currentMinimumStep,
                                                   >> 198            G4double& currentSafety,
                                                   >> 199                              G4GPILSelection* selection
                                                   >> 200           )
                                                   >> 201 {
                                                   >> 202   // GPILSelection is set to defaule value of CandidateForSelection
                                                   >> 203   valueGPILSelection = CandidateForSelection;
                                                   >> 204 
                                                   >> 205   // get Step limit proposed by the process
                                                   >> 206   G4double steplength = GetContinuousStepLimit(track,previousStepSize,currentMinimumStep, currentSafety);
                                                   >> 207 
                                                   >> 208   // set return value for G4GPILSelection
                                                   >> 209   *selection = valueGPILSelection;
121                                                   210 
                                                   >> 211 #ifdef G4VERBOSE
                                                   >> 212    if (verboseLevel>1){
                                                   >> 213     G4cout << "G4VContinuousDiscreteProcess::AlongStepGetPhysicalInteractionLength ";
                                                   >> 214     G4cout << "[ " << GetProcessName() << "]" <<G4endl;
                                                   >> 215     track.GetDynamicParticle()->DumpInfo();
                                                   >> 216     G4cout << " in Material  " <<  track.GetMaterial()->GetName() <<G4endl;
                                                   >> 217     G4cout << "IntractionLength= " << steplength/cm <<"[cm] " <<G4endl;
                                                   >> 218   }
122 #endif                                            219 #endif
                                                   >> 220   return  steplength ;
                                                   >> 221 }
                                                   >> 222 
                                                   >> 223 #endif
                                                   >> 224 
                                                   >> 225 
                                                   >> 226 
                                                   >> 227 
                                                   >> 228 
                                                   >> 229 
123                                                   230