G4Decay.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 // ------------------------------------------------------------
00031 //      GEANT 4 class header file
00032 //
00033 //      History: first implementation, based on object model of
00034 //      7 July 1996 H.Kurashige
00035 // ------------------------------------------------------------
00036 //  New Physics scheme           18 Jan. 1997  H.Kurahige
00037 // ------------------------------------------------------------
00038 //   modified                     4  Feb. 1997  H.Kurahige
00039 //   modified                     8  Sep. 1997  H.Kurahige
00040 //   remove BuildPhysicsTable()   27 Nov. 1997   H.Kurashige
00041 //   modified for new ParticleChange 12 Mar. 1998  H.Kurashige
00042 //   added aPhysicsTable          2  Aug. 1998 H.Kurashige
00043 //   PreAssignedDecayTime         18 Jan. 2001 H.Kurashige
00044 //   Add External Decayer         23 Feb. 2001  H.Kurashige
00045 //   Remove PhysicsTable          12 Feb. 2002 H.Kurashige
00046 //   Fixed bug in PostStepGPIL 
00047 //    in case of stopping during AlongStepDoIt 12 Mar. 2004 H.Kurashige
00048 //   Add GetRemainderLifeTime  10 Aug/2004 H.Kurashige
00049 //   Add DaughterPolarization     23 July 2008 H.Kurashige
00050 
00051 
00052 #ifndef G4Decay_h
00053 #define G4Decay_h 1
00054 
00055 #include "G4ios.hh"
00056 #include "globals.hh"
00057 #include "G4VRestDiscreteProcess.hh"
00058 #include "G4ParticleChangeForDecay.hh"
00059 #include "G4DecayProcessType.hh"
00060 
00061 class G4VExtDecayer;
00062 
00063 class G4Decay : public G4VRestDiscreteProcess 
00064 {
00065  // Class Description
00066   //  This class is a decay process
00067 
00068   public:
00069     //  Constructors 
00070     G4Decay(const G4String& processName ="Decay");
00071 
00072     //  Destructor
00073     virtual ~G4Decay();
00074 
00075   private:
00076     //  copy constructor
00077       G4Decay(const G4Decay &right);
00078 
00079     //  Assignment Operation (generated)
00080       G4Decay & operator=(const G4Decay &right);
00081 
00082   public: //With Description
00083      // G4Decay Process has both 
00084      // PostStepDoIt (for decay in flight) 
00085      //   and 
00086      // AtRestDoIt (for decay at rest)
00087   
00088      virtual G4VParticleChange *PostStepDoIt(
00089                              const G4Track& aTrack,
00090                              const G4Step& aStep
00091                             );
00092 
00093      virtual G4VParticleChange* AtRestDoIt(
00094                              const G4Track& aTrack,
00095                              const G4Step&  aStep
00096                             );
00097 
00098      virtual void BuildPhysicsTable(const G4ParticleDefinition&); 
00099      // In G4Decay, thePhysicsTable stores values of
00100     //    beta * std::sqrt( 1 - beta*beta) 
00101     //  as a function of normalized kinetic enregy (=Ekin/mass),
00102     //  becasuse this table is universal for all particle types,
00103 
00104 
00105     virtual G4bool IsApplicable(const G4ParticleDefinition&);
00106     // returns "true" if the decay process can be applied to
00107     // the particle type. 
00108  
00109   protected: // With Description
00110     virtual G4VParticleChange* DecayIt(
00111                              const G4Track& aTrack,
00112                              const G4Step&  aStep
00113                             );
00114     // The DecayIt() method returns by pointer a particle-change object,
00115     // which has information of daughter particles.
00116 
00117     // Set daughter polarization
00118     //  NO OPERATION in the base class of G4Decay 
00119     virtual void DaughterPolarization(const G4Track& aTrack,
00120                               G4DecayProducts* products);
00121 
00122  public:
00123     virtual G4double AtRestGetPhysicalInteractionLength(
00124                              const G4Track& track,
00125                              G4ForceCondition* condition
00126                             );
00127 
00128     virtual G4double PostStepGetPhysicalInteractionLength(
00129                              const G4Track& track,
00130                              G4double   previousStepSize,
00131                              G4ForceCondition* condition
00132                             );
00133 
00134   protected: // With Description
00135     // GetMeanFreePath returns ctau*beta*gamma for decay in flight 
00136     // GetMeanLifeTime returns ctau for decay at rest
00137     virtual G4double GetMeanFreePath(const G4Track& aTrack,
00138                               G4double   previousStepSize,
00139                               G4ForceCondition* condition
00140                              );
00141 
00142     virtual G4double GetMeanLifeTime(const G4Track& aTrack,
00143                               G4ForceCondition* condition
00144                             );
00145 
00146    public: //With Description
00147      virtual void StartTracking(G4Track*);
00148      virtual void EndTracking();
00149       // inform Start/End of tracking for each track to the physics process 
00150 
00151    public: //With Description
00152      void SetExtDecayer(G4VExtDecayer*);
00153      const G4VExtDecayer* GetExtDecayer() const;
00154      // Set/Get External Decayer
00155    
00156     G4double GetRemainderLifeTime() const;  
00157     //Get Remainder of life time at rest decay 
00158 
00159   public:
00160      void  SetVerboseLevel(G4int value);
00161      G4int GetVerboseLevel() const;
00162 
00163   protected:
00164      G4int verboseLevel;
00165      // controle flag for output message
00166      //  0: Silent
00167      //  1: Warning message
00168      //  2: More
00169 
00170   protected:
00171     // HighestValue.
00172     const G4double HighestValue;
00173  
00174     // Remainder of life time at rest
00175     G4double                 fRemainderLifeTime;
00176   
00177     // ParticleChange for decay process
00178     G4ParticleChangeForDecay fParticleChangeForDecay;
00179     
00180     // External Decayer
00181     G4VExtDecayer*    pExtDecayer;
00182 };
00183 
00184 inline
00185  void  G4Decay::SetVerboseLevel(G4int value){ verboseLevel = value; }
00186 
00187 inline
00188  G4int G4Decay::GetVerboseLevel() const { return verboseLevel; }
00189 
00190 inline  
00191   G4VParticleChange* G4Decay::AtRestDoIt(
00192                              const G4Track& aTrack,
00193                              const G4Step&  aStep
00194                             )
00195 {
00196   return DecayIt(aTrack, aStep);
00197 }
00198 
00199 inline  
00200   G4VParticleChange* G4Decay::PostStepDoIt(
00201                              const G4Track& aTrack,
00202                              const G4Step&  aStep
00203                             )
00204 {
00205   return DecayIt(aTrack, aStep);
00206 }
00207 
00208 inline
00209  const G4VExtDecayer* G4Decay::GetExtDecayer() const
00210 {
00211   return pExtDecayer;
00212 }
00213 
00214 inline
00215  G4double G4Decay::GetRemainderLifeTime() const 
00216 {
00217   return fRemainderLifeTime;
00218 }
00219 
00220 #endif
00221 
00222 
00223 
00224 
00225 
00226 
00227 
00228 
00229 
00230 

Generated on Mon May 27 17:47:59 2013 for Geant4 by  doxygen 1.4.7