G4VAtomDeexcitation.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 // $Id$
00027 //
00028 // -------------------------------------------------------------------
00029 //
00030 // GEANT4 Class header file
00031 //
00032 //
00033 // File name:     G4VAtomDeexcitation
00034 //
00035 // Author:        Alfonso Mantero & Vladimir Ivanchenko
00036 //
00037 // Creation date: 30.06.2009
00038 //
00039 // Modifications:
00040 // 15 Mar 2011  ALF   stripped G4AtomicShellEnumerator to its own file
00041 //
00042 // Class Description:
00043 //
00044 // Abstract interface to energy loss models
00045 
00046 // -------------------------------------------------------------------
00047 //
00048 
00049 #ifndef G4VAtomDeexcitation_h
00050 #define G4VAtomDeexcitation_h 1
00051 
00052 #include "globals.hh"
00053 #include "G4AtomicShell.hh"
00054 #include "G4AtomicShellEnumerator.hh"
00055 #include "G4ProductionCutsTable.hh"
00056 #include "G4Track.hh"
00057 #include <vector>
00058 
00059 class G4ParticleDefinition;
00060 class G4DynamicParticle;
00061 class G4MaterialCutsCouple;
00062 
00063 class G4VAtomDeexcitation {
00064 public:
00065 
00066   G4VAtomDeexcitation(const G4String& modname = "Deexcitation", 
00067                       const G4String& pixename = "");
00068 
00069   virtual ~G4VAtomDeexcitation();
00070 
00071   //========== initialization ==========
00072 
00073   // Overall initialisation before new run
00074   void InitialiseAtomicDeexcitation();
00075 
00076   // Initialisation of deexcitation at the beginning of run 
00077   virtual void InitialiseForNewRun() = 0;
00078 
00079   // Initialisation for a concrete atom 
00080   // May be called at run time 
00081   virtual void InitialiseForExtraAtom(G4int Z) = 0;
00082 
00083   // Activation of deexcitation per detector region
00084   void SetDeexcitationActiveRegion(const G4String& rname, 
00085                                    G4bool valDeexcitation,
00086                                    G4bool valAuger,
00087                                    G4bool valPIXE);
00088 
00089   // Activation of deexcitation
00090   inline void SetFluo(G4bool);
00091   inline G4bool IsFluoActive() const;
00092 
00093   // Activation of Auger electron production
00094   inline void SetAuger(G4bool);
00095   inline G4bool IsAugerActive() const;
00096 
00097   // Activation of PIXE simulation
00098   inline void SetPIXE(G4bool);
00099   //  inline void SetPIXEActive(G4bool);
00100   inline G4bool IsPIXEActive() const;
00101 
00102   // Deexcitation model name
00103   inline const G4String& GetName() const;
00104 
00105   // PIXE model name
00106   inline void SetPIXECrossSectionModel(const G4String&);
00107   inline const G4String& PIXECrossSectionModel() const;
00108 
00109   // PIXE model name for e+e-
00110   inline void SetPIXEElectronCrossSectionModel(const G4String&);
00111   inline const G4String& PIXEElectronCrossSectionModel() const;
00112 
00113   // Access to the list of atoms active for deexcitation
00114   inline const std::vector<G4bool>& GetListOfActiveAtoms() const;
00115 
00116   // Verbosity level
00117   inline void SetVerboseLevel(G4int);
00118   inline G4int GetVerboseLevel() const;
00119 
00120   //========== Run time methods ==========
00121 
00122   // Check if deexcitation is active for a given geometry volume
00123   inline G4bool CheckDeexcitationActiveRegion(G4int coupleIndex);
00124   inline G4bool CheckAugerActiveRegion(G4int coupleIndex);
00125 
00126   // Get atomic shell by shell index, used by discrete processes 
00127   // (for example, photoelectric), when shell vacancy sampled by the model
00128   virtual 
00129   const G4AtomicShell* GetAtomicShell(G4int Z, 
00130                                       G4AtomicShellEnumerator shell) = 0;
00131 
00132   // generation of deexcitation for given atom and shell vacancy
00133   inline void GenerateParticles(std::vector<G4DynamicParticle*>* secVect,  
00134                                 const G4AtomicShell*, 
00135                                 G4int Z,
00136                                 G4int coupleIndex);
00137 
00138   // generation of deexcitation for given atom and shell vacancy
00139   virtual void GenerateParticles(std::vector<G4DynamicParticle*>* secVect,  
00140                                  const G4AtomicShell*, 
00141                                  G4int Z,
00142                                  G4double gammaCut,
00143                                  G4double eCut) = 0;
00144 
00145   // access or compute PIXE cross section 
00146   virtual G4double 
00147   GetShellIonisationCrossSectionPerAtom(const G4ParticleDefinition*, 
00148                                         G4int Z, 
00149                                         G4AtomicShellEnumerator shell,
00150                                         G4double kinE,
00151                                         const G4Material* mat = 0) = 0;
00152 
00153   // access or compute PIXE cross section 
00154   virtual G4double 
00155   ComputeShellIonisationCrossSectionPerAtom(const G4ParticleDefinition*, 
00156                                             G4int Z, 
00157                                             G4AtomicShellEnumerator shell,
00158                                             G4double kinE,
00159                                             const G4Material* mat = 0) = 0;
00160 
00161   // Sampling of PIXE for ionisation processes
00162   void AlongStepDeexcitation(std::vector<G4Track*>& tracks,  
00163                              const G4Step& step, 
00164                              G4double& eLoss,
00165                              G4int coupleIndex);
00166 
00167 private:
00168 
00169   // copy constructor and hide assignment operator
00170   G4VAtomDeexcitation(G4VAtomDeexcitation &);
00171   G4VAtomDeexcitation & operator=(const G4VAtomDeexcitation &right);
00172 
00173   G4ProductionCutsTable* theCoupleTable;
00174   G4double lowestKinEnergy;
00175   G4int    verbose;
00176   G4String name;
00177   G4String namePIXE;
00178   G4String nameElectronPIXE;
00179   G4bool   isActive;
00180   G4bool   flagAuger;
00181   G4bool   flagPIXE;
00182   std::vector<G4bool>   activeZ;
00183   std::vector<G4bool>   activeDeexcitationMedia;
00184   std::vector<G4bool>   activeAugerMedia;
00185   std::vector<G4bool>   activePIXEMedia;
00186   std::vector<G4String> activeRegions;
00187   std::vector<G4bool>   deRegions;
00188   std::vector<G4bool>   AugerRegions;
00189   std::vector<G4bool>   PIXERegions;
00190   std::vector<G4DynamicParticle*> vdyn;
00191 };
00192 
00193 inline void G4VAtomDeexcitation::SetFluo(G4bool val)
00194 {
00195   isActive = val;
00196 }
00197 
00198 inline G4bool G4VAtomDeexcitation::IsFluoActive() const
00199 {
00200   return isActive;
00201 }
00202 
00203 inline void G4VAtomDeexcitation::SetAuger(G4bool val)
00204 {
00205   flagAuger = val;
00206   if(val) { isActive = true; }
00207 }
00208 
00209 inline G4bool G4VAtomDeexcitation::IsAugerActive() const
00210 {
00211   return flagAuger;
00212 }
00213 
00214 inline void G4VAtomDeexcitation::SetPIXE(G4bool val)
00215 {
00216   flagPIXE = val;
00217   if(val) { isActive = true; }
00218 }
00219 
00220 inline G4bool G4VAtomDeexcitation::IsPIXEActive() const
00221 {
00222   return flagPIXE;
00223 }
00224 
00225 inline const G4String& G4VAtomDeexcitation::GetName() const
00226 {
00227   return name;
00228 }
00229 
00230 inline 
00231 void G4VAtomDeexcitation::SetPIXECrossSectionModel(const G4String& n)
00232 {
00233   namePIXE = n;
00234 }
00235 
00236 inline void 
00237 G4VAtomDeexcitation::SetPIXEElectronCrossSectionModel(const G4String& n)
00238 {
00239   nameElectronPIXE = n;
00240 }
00241 
00242 inline 
00243 const G4String& G4VAtomDeexcitation::PIXECrossSectionModel() const
00244 {
00245   return namePIXE;
00246 }
00247 
00248 inline 
00249 const G4String& G4VAtomDeexcitation::PIXEElectronCrossSectionModel() const
00250 {
00251   return nameElectronPIXE;
00252 }
00253 
00254 inline const std::vector<G4bool>& 
00255 G4VAtomDeexcitation::GetListOfActiveAtoms() const
00256 {
00257   return activeZ;
00258 }
00259 
00260 inline void G4VAtomDeexcitation::SetVerboseLevel(G4int val)
00261 {
00262   verbose = val;
00263 }
00264 
00265 inline G4int G4VAtomDeexcitation::GetVerboseLevel() const
00266 {
00267   return verbose;
00268 }
00269 
00270 inline G4bool 
00271 G4VAtomDeexcitation::CheckDeexcitationActiveRegion(G4int coupleIndex)
00272 {
00273   return (isActive || activeDeexcitationMedia[coupleIndex]);
00274 }
00275 
00276 inline G4bool 
00277 G4VAtomDeexcitation::CheckAugerActiveRegion(G4int coupleIndex)
00278 {
00279 
00280   return (flagAuger || activeAugerMedia[coupleIndex]);
00281 }
00282 
00283 inline void 
00284 G4VAtomDeexcitation::GenerateParticles(std::vector<G4DynamicParticle*>* v,  
00285                                        const G4AtomicShell* as, 
00286                                        G4int Z,
00287                                        G4int idx)
00288 {
00289   G4double gCut = DBL_MAX;
00290   if (theCoupleTable) {
00291     gCut = (*(theCoupleTable->GetEnergyCutsVector(0)))[idx];
00292   }
00293   if(gCut < as->BindingEnergy()) {
00294     G4double eCut = DBL_MAX;
00295     if(CheckAugerActiveRegion(idx)) {
00296       if (theCoupleTable) {
00297         eCut = (*(theCoupleTable->GetEnergyCutsVector(1)))[idx];
00298       }
00299     }
00300     GenerateParticles(v, as, Z, gCut, eCut);
00301   }
00302 }
00303 
00304 #endif
00305 

Generated on Mon May 27 17:50:09 2013 for Geant4 by  doxygen 1.4.7