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.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/decay/include/G4Decay.hh (Version 11.3.0) and /processes/decay/include/G4Decay.hh (Version 8.2.p1)


  1 //                                                  1 //
  2 // *******************************************      2 // ********************************************************************
  3 // * License and Disclaimer                         3 // * License and Disclaimer                                           *
  4 // *                                                4 // *                                                                  *
  5 // * The  Geant4 software  is  copyright of th      5 // * The  Geant4 software  is  copyright of the Copyright Holders  of *
  6 // * the Geant4 Collaboration.  It is provided      6 // * the Geant4 Collaboration.  It is provided  under  the terms  and *
  7 // * conditions of the Geant4 Software License      7 // * conditions of the Geant4 Software License,  included in the file *
  8 // * LICENSE and available at  http://cern.ch/      8 // * LICENSE and available at  http://cern.ch/geant4/license .  These *
  9 // * include a list of copyright holders.           9 // * include a list of copyright holders.                             *
 10 // *                                               10 // *                                                                  *
 11 // * Neither the authors of this software syst     11 // * Neither the authors of this software system, nor their employing *
 12 // * institutes,nor the agencies providing fin     12 // * institutes,nor the agencies providing financial support for this *
 13 // * work  make  any representation or  warran     13 // * work  make  any representation or  warranty, express or implied, *
 14 // * regarding  this  software system or assum     14 // * regarding  this  software system or assume any liability for its *
 15 // * use.  Please see the license in the file      15 // * use.  Please see the license in the file  LICENSE  and URL above *
 16 // * for the full disclaimer and the limitatio     16 // * for the full disclaimer and the limitation of liability.         *
 17 // *                                               17 // *                                                                  *
 18 // * This  code  implementation is the result      18 // * This  code  implementation is the result of  the  scientific and *
 19 // * technical work of the GEANT4 collaboratio     19 // * technical work of the GEANT4 collaboration.                      *
 20 // * By using,  copying,  modifying or  distri     20 // * By using,  copying,  modifying or  distributing the software (or *
 21 // * any work based  on the software)  you  ag     21 // * any work based  on the software)  you  agree  to acknowledge its *
 22 // * use  in  resulting  scientific  publicati     22 // * use  in  resulting  scientific  publications,  and indicate your *
 23 // * acceptance of all terms of the Geant4 Sof     23 // * acceptance of all terms of the Geant4 Software license.          *
 24 // *******************************************     24 // ********************************************************************
 25 //                                                 25 //
 26 //                                                 26 //
                                                   >>  27 // $Id: G4Decay.hh,v 1.15 2006/06/29 19:30:34 gunter Exp $
                                                   >>  28 // GEANT4 tag $Name: geant4-08-01-patch-01 $
 27 //                                                 29 //
 28 //                                                 30 //
 29 // -------------------------------------------     31 // ------------------------------------------------------------
 30 //      GEANT 4 class header file                  32 //      GEANT 4 class header file
 31 //                                                 33 //
 32 //      History: first implementation, based o     34 //      History: first implementation, based on object model of
 33 //      7 July 1996 H.Kurashige                    35 //      7 July 1996 H.Kurashige
 34 // -------------------------------------------     36 // ------------------------------------------------------------
 35 //  New Physics scheme           18 Jan. 1997      37 //  New Physics scheme           18 Jan. 1997  H.Kurahige
 36 // -------------------------------------------     38 // ------------------------------------------------------------
 37 //   modified                     4  Feb. 1997     39 //   modified                     4  Feb. 1997  H.Kurahige
 38 //   modified                     8  Sep. 1997     40 //   modified                     8  Sep. 1997  H.Kurahige
 39 //   remove BuildPhysicsTable()   27 Nov. 1997     41 //   remove BuildPhysicsTable()   27 Nov. 1997   H.Kurashige
 40 //   modified for new ParticleChange 12 Mar. 1     42 //   modified for new ParticleChange 12 Mar. 1998  H.Kurashige
 41 //   added aPhysicsTable          2  Aug. 1998     43 //   added aPhysicsTable          2  Aug. 1998 H.Kurashige
 42 //   PreAssignedDecayTime         18 Jan. 2001     44 //   PreAssignedDecayTime         18 Jan. 2001 H.Kurashige
 43 //   Add External Decayer         23 Feb. 2001     45 //   Add External Decayer         23 Feb. 2001  H.Kurashige
 44 //   Remove PhysicsTable          12 Feb. 2002     46 //   Remove PhysicsTable          12 Feb. 2002 H.Kurashige
 45 //   Fixed bug in PostStepGPIL                     47 //   Fixed bug in PostStepGPIL 
 46 //    in case of stopping during AlongStepDoIt     48 //    in case of stopping during AlongStepDoIt 12 Mar. 2004 H.Kurashige
 47 //   Add GetRemainderLifeTime  10 Aug/2004 H.K     49 //   Add GetRemainderLifeTime  10 Aug/2004 H.Kurashige
 48 //   Add DaughterPolarization     23 July 2008 << 
 49                                                << 
 50                                                    50 
 51 #ifndef G4Decay_h                                  51 #ifndef G4Decay_h
 52 #define G4Decay_h 1                                52 #define G4Decay_h 1
 53                                                    53 
 54 #include "G4ios.hh"                                54 #include "G4ios.hh"
 55 #include "globals.hh"                              55 #include "globals.hh"
 56 #include "G4VRestDiscreteProcess.hh"               56 #include "G4VRestDiscreteProcess.hh"
 57 #include "G4ParticleChangeForDecay.hh"             57 #include "G4ParticleChangeForDecay.hh"
 58 #include "G4DecayProcessType.hh"               << 
 59                                                << 
 60 class G4VExtDecayer;                               58 class G4VExtDecayer;
 61                                                    59 
 62 class G4Decay : public G4VRestDiscreteProcess      60 class G4Decay : public G4VRestDiscreteProcess 
 63 {                                                  61 {
 64  // Class Description                              62  // Class Description
 65   //  This class is a decay process                63   //  This class is a decay process
 66                                                    64 
 67   public:                                          65   public:
 68     //  Constructors                               66     //  Constructors 
 69     G4Decay(const G4String& processName ="Deca     67     G4Decay(const G4String& processName ="Decay");
 70                                                    68 
 71     //  Destructor                                 69     //  Destructor
 72     virtual ~G4Decay();                            70     virtual ~G4Decay();
 73                                                    71 
 74   private:                                         72   private:
 75     //  copy constructor                           73     //  copy constructor
 76       G4Decay(const G4Decay &right);               74       G4Decay(const G4Decay &right);
 77                                                    75 
 78     //  Assignment Operation (generated)           76     //  Assignment Operation (generated)
 79       G4Decay & operator=(const G4Decay &right     77       G4Decay & operator=(const G4Decay &right);
 80                                                    78 
 81   public: //With Description                       79   public: //With Description
 82      // G4Decay Process has both                   80      // G4Decay Process has both 
 83      // PostStepDoIt (for decay in flight)         81      // PostStepDoIt (for decay in flight) 
 84      //   and                                      82      //   and 
 85      // AtRestDoIt (for decay at rest)             83      // AtRestDoIt (for decay at rest)
 86                                                    84   
 87      virtual G4VParticleChange *PostStepDoIt(      85      virtual G4VParticleChange *PostStepDoIt(
 88            const G4Track& aTrack,                  86            const G4Track& aTrack,
 89                              const G4Step& aSt     87                              const G4Step& aStep
 90                             ) override;        <<  88                             );
 91                                                    89 
 92      virtual G4VParticleChange* AtRestDoIt(        90      virtual G4VParticleChange* AtRestDoIt(
 93            const G4Track& aTrack,                  91            const G4Track& aTrack,
 94            const G4Step&  aStep                    92            const G4Step&  aStep
 95           ) override;                          <<  93           );
 96                                                    94 
 97      virtual void BuildPhysicsTable(const G4Pa <<  95      virtual void BuildPhysicsTable(const G4ParticleDefinition&); 
 98      // In G4Decay, thePhysicsTable stores val     96      // In G4Decay, thePhysicsTable stores values of
 99     //    beta * std::sqrt( 1 - beta*beta)         97     //    beta * std::sqrt( 1 - beta*beta) 
100     //  as a function of normalized kinetic en     98     //  as a function of normalized kinetic enregy (=Ekin/mass),
101     //  becasuse this table is universal for a     99     //  becasuse this table is universal for all particle types,
102                                                   100 
103                                                   101 
104     virtual G4bool IsApplicable(const G4Partic << 102     virtual G4bool IsApplicable(const G4ParticleDefinition&);
105     // returns "true" if the decay process can    103     // returns "true" if the decay process can be applied to
106     // the particle type.                         104     // the particle type. 
107                                                   105  
108   protected: // With Description                  106   protected: // With Description
109     virtual G4VParticleChange* DecayIt(           107     virtual G4VParticleChange* DecayIt(
110            const G4Track& aTrack,                 108            const G4Track& aTrack,
111            const G4Step&  aStep                   109            const G4Step&  aStep
112           );                                      110           );
113     // The DecayIt() method returns by pointer    111     // The DecayIt() method returns by pointer a particle-change object,
114     // which has information of daughter parti    112     // which has information of daughter particles.
115                                                   113 
116     // Set daughter polarization               << 114   public:
117     //  NO OPERATION in the base class of G4De << 
118     virtual void DaughterPolarization(const G4 << 
119             G4DecayProducts* products);        << 
120                                                << 
121  public:                                       << 
122     virtual G4double AtRestGetPhysicalInteract    115     virtual G4double AtRestGetPhysicalInteractionLength(
123                              const G4Track& tr    116                              const G4Track& track,
124                              G4ForceCondition*    117                              G4ForceCondition* condition
125                             ) override;        << 118                             );
126                                                   119 
127     virtual G4double PostStepGetPhysicalIntera    120     virtual G4double PostStepGetPhysicalInteractionLength(
128                              const G4Track& tr    121                              const G4Track& track,
129                              G4double   previo    122                              G4double   previousStepSize,
130                              G4ForceCondition*    123                              G4ForceCondition* condition
131                             ) override;        << 124                             );
132                                                   125 
133   protected: // With Description                  126   protected: // With Description
134     // GetMeanFreePath returns ctau*beta*gamma    127     // GetMeanFreePath returns ctau*beta*gamma for decay in flight 
135     // GetMeanLifeTime returns ctau for decay     128     // GetMeanLifeTime returns ctau for decay at rest
136     virtual G4double GetMeanFreePath(const G4T    129     virtual G4double GetMeanFreePath(const G4Track& aTrack,
137                               G4double   previ    130                               G4double   previousStepSize,
138                               G4ForceCondition    131                               G4ForceCondition* condition
139                              ) override;       << 132                              );
140                                                   133 
141     virtual G4double GetMeanLifeTime(const G4T    134     virtual G4double GetMeanLifeTime(const G4Track& aTrack,
142                               G4ForceCondition    135                               G4ForceCondition* condition
143                             ) override;        << 136                             );
144                                                   137 
145    public: //With Description                     138    public: //With Description
146      virtual void StartTracking(G4Track*) over << 139      virtual void StartTracking(G4Track*);
147      virtual void EndTracking() override;      << 140      virtual void EndTracking();
148       // inform Start/End of tracking for each    141       // inform Start/End of tracking for each track to the physics process 
149                                                   142 
150    public: //With Description                     143    public: //With Description
151      void SetExtDecayer(G4VExtDecayer*);          144      void SetExtDecayer(G4VExtDecayer*);
152      const G4VExtDecayer* GetExtDecayer() cons    145      const G4VExtDecayer* GetExtDecayer() const;
153      // Set/Get External Decayer                  146      // Set/Get External Decayer
154                                                   147    
155     G4double GetRemainderLifeTime() const;        148     G4double GetRemainderLifeTime() const;  
156     //Get Remainder of life time at rest decay    149     //Get Remainder of life time at rest decay 
157                                                   150 
158     virtual void ProcessDescription(std::ostre << 151   public:
159     //                                         << 152      void  SetVerboseLevel(G4int value);
                                                   >> 153      G4int GetVerboseLevel() const;
160                                                   154 
161   protected:                                      155   protected:
162      G4int verboseLevel;                          156      G4int verboseLevel;
163      // controle flag for output message          157      // controle flag for output message
164      //  0: Silent                                158      //  0: Silent
165      //  1: Warning message                       159      //  1: Warning message
166      //  2: More                                  160      //  2: More
167                                                   161 
168   protected:                                      162   protected:
169     // HighestValue.                              163     // HighestValue.
170     const G4double HighestValue;                  164     const G4double HighestValue;
171                                                   165  
172     // Remainder of life time at rest             166     // Remainder of life time at rest
173     G4double                 fRemainderLifeTim    167     G4double                 fRemainderLifeTime;
174                                                   168   
175     // ParticleChange for decay process           169     // ParticleChange for decay process
176     G4ParticleChangeForDecay fParticleChangeFo    170     G4ParticleChangeForDecay fParticleChangeForDecay;
177                                                   171     
178     // External Decayer                           172     // External Decayer
179     G4VExtDecayer*    pExtDecayer;                173     G4VExtDecayer*    pExtDecayer;
180 };                                                174 };
181                                                   175 
                                                   >> 176 inline
                                                   >> 177  void  G4Decay::SetVerboseLevel(G4int value){ verboseLevel = value; }
                                                   >> 178 
                                                   >> 179 inline
                                                   >> 180  G4int G4Decay::GetVerboseLevel() const { return verboseLevel; }
                                                   >> 181 
182 inline                                            182 inline  
183   G4VParticleChange* G4Decay::AtRestDoIt(         183   G4VParticleChange* G4Decay::AtRestDoIt(
184            const G4Track& aTrack,                 184            const G4Track& aTrack,
185            const G4Step&  aStep                   185            const G4Step&  aStep
186           )                                       186           )
187 {                                                 187 {
188   return DecayIt(aTrack, aStep);                  188   return DecayIt(aTrack, aStep);
189 }                                                 189 }
190                                                   190 
                                                   >> 191 inline  
                                                   >> 192   G4VParticleChange* G4Decay::PostStepDoIt(
                                                   >> 193            const G4Track& aTrack,
                                                   >> 194            const G4Step&  aStep
                                                   >> 195           )
                                                   >> 196 {
                                                   >> 197   return DecayIt(aTrack, aStep);
                                                   >> 198 }
                                                   >> 199 
                                                   >> 200 inline
                                                   >> 201  void G4Decay::SetExtDecayer(G4VExtDecayer* val)
                                                   >> 202 {
                                                   >> 203   pExtDecayer = val;
                                                   >> 204 }
191                                                   205 
192 inline                                            206 inline
193  const G4VExtDecayer* G4Decay::GetExtDecayer()    207  const G4VExtDecayer* G4Decay::GetExtDecayer() const
194 {                                                 208 {
195   return pExtDecayer;                             209   return pExtDecayer;
196 }                                                 210 }
197                                                   211 
198 inline                                            212 inline
199  G4double G4Decay::GetRemainderLifeTime() cons    213  G4double G4Decay::GetRemainderLifeTime() const 
200 {                                                 214 {
201   return fRemainderLifeTime;                      215   return fRemainderLifeTime;
202 }                                                 216 }
203                                                   217 
204 #endif                                            218 #endif
205                                                   219 
206                                                   220 
207                                                   221 
208                                                   222 
209                                                   223 
210                                                   224 
211                                                   225 
212                                                   226 
213                                                   227 
214                                                   228 
215                                                   229