Geant4 Cross Reference |
1 // 1 // 2 // ******************************************* 2 // ******************************************************************** 3 // * License and Disclaimer << 3 // * DISCLAIMER * 4 // * 4 // * * 5 // * The Geant4 software is copyright of th << 5 // * The following disclaimer summarizes all the specific disclaimers * 6 // * the Geant4 Collaboration. It is provided << 6 // * of contributors to this software. The specific disclaimers,which * 7 // * conditions of the Geant4 Software License << 7 // * govern, are listed with their locations in: * 8 // * LICENSE and available at http://cern.ch/ << 8 // * http://cern.ch/geant4/license * 9 // * include a list of copyright holders. << 10 // * 9 // * * 11 // * Neither the authors of this software syst 10 // * Neither the authors of this software system, nor their employing * 12 // * institutes,nor the agencies providing fin 11 // * institutes,nor the agencies providing financial support for this * 13 // * work make any representation or warran 12 // * work make any representation or warranty, express or implied, * 14 // * regarding this software system or assum 13 // * regarding this software system or assume any liability for its * 15 // * use. Please see the license in the file << 14 // * use. * 16 // * for the full disclaimer and the limitatio << 17 // * 15 // * * 18 // * This code implementation is the result << 16 // * This code implementation is the intellectual property of the * 19 // * technical work of the GEANT4 collaboratio << 17 // * GEANT4 collaboration. * 20 // * By using, copying, modifying or distri << 18 // * By copying, distributing or modifying the Program (or any work * 21 // * any work based on the software) you ag << 19 // * based on the Program) you indicate your acceptance of this * 22 // * use in resulting scientific publicati << 20 // * statement, and all its terms. * 23 // * acceptance of all terms of the Geant4 Sof << 24 // ******************************************* 21 // ******************************************************************** 25 // 22 // 26 // 23 // 27 // ------------------------------------------- << 24 // $Id: G4eplusAnnihilation.hh,v 1.15 2004/11/10 08:53:19 vnivanch Exp $ >> 25 // GEANT4 tag $Name: geant4-07-00-patch-01 $ 28 // 26 // 29 // GEANT4 Class header file << 27 30 // << 28 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 31 // << 29 32 // File name: G4eplusAnnihilation << 30 // 10-01-97, crossection table + meanfreepath table, M.Maire 33 // << 31 // 17-03-97, merge 'in fly' and 'at rest', M.Maire 34 // Author: Vladimir Ivanchenko on base << 32 // 31-08-98, new methods SetBining() and PrintInfo() 35 // << 33 // 03-08-01, new methods Store/Retrieve PhysicsTable (mma) 36 // Creation date: 02.08.2004 << 34 // 06-08-01, BuildThePhysicsTable() called from constructor (mma) 37 // << 35 // 20-09-01, DoIt: fminimalEnergy = 1*eV (mma) 38 // Modifications: << 36 // 01-10-01, come back to BuildPhysicsTable(const G4ParticleDefinition&) 39 // 08-11-04 Migration to new interface of Stor << 37 // 05-08-04, suppress .icc file 40 // 15-03-05 Update interface according to chan << 38 // 13-08-04, public ComputeCrossSectionPerAtom() and ComputeMeanFreePath() 41 // in G4VEmProcess (V.Ivanchenko) << 39 // 09-11-04, Remove Store/Retrieve tables (V.Ivantchenko) 42 // 08-04-05 Major optimisation of internal int << 43 // 04-05-05 Make class to be default (V.Ivanch << 44 // 04-12-05 SetProposedKineticEnergy(0.) for a << 45 // 09-08-06 add SetModel(G4VEmModel*) (mma) << 46 // 12-09-06, move SetModel(G4VEmModel*) in G4V << 47 // << 48 // << 49 // Class Description: << 50 // 40 // 51 // This class manages the process of e+ annihi << 41 52 // It is possible to enable ApplyCuts and Enta << 42 // class description 53 // G4EmParameters class using UI commands or C << 54 // EM splitting or Russian roulette are allowe << 55 // are enabled. << 56 // 43 // 57 // ------------------------------------------- << 44 // e+ e- ---> gamma gamma >> 45 // inherit from G4VRestDiscreteProcess 58 // 46 // 59 47 >> 48 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... >> 49 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... >> 50 60 #ifndef G4eplusAnnihilation_h 51 #ifndef G4eplusAnnihilation_h 61 #define G4eplusAnnihilation_h 1 52 #define G4eplusAnnihilation_h 1 62 53 63 #include "G4VEmProcess.hh" << 54 #include "G4ios.hh" >> 55 #include "globals.hh" >> 56 #include "Randomize.hh" >> 57 #include "G4VRestDiscreteProcess.hh" >> 58 #include "G4PhysicsTable.hh" >> 59 #include "G4PhysicsLogVector.hh" >> 60 #include "G4ElementTable.hh" >> 61 #include "G4Gamma.hh" >> 62 #include "G4Positron.hh" >> 63 #include "G4Step.hh" 64 64 65 class G4ParticleDefinition; << 65 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 66 class G4VPositronAtRestModel; << 67 << 68 class G4eplusAnnihilation : public G4VEmProces << 69 { << 70 << 71 public: << 72 << 73 explicit G4eplusAnnihilation(const G4String& << 74 << 75 ~G4eplusAnnihilation() override; << 76 << 77 G4bool IsApplicable(const G4ParticleDefiniti << 78 << 79 G4VParticleChange* AtRestDoIt( << 80 const G4Track& tr << 81 const G4Step& ste << 82 << 83 G4double AtRestGetPhysicalInteractionLength( << 84 const G4Track& tr << 85 G4ForceCondition* << 86 ) override; << 87 << 88 // print documentation in html format << 89 void ProcessDescription(std::ostream&) const << 90 << 91 G4eplusAnnihilation & operator=(const G4eplu << 92 G4eplusAnnihilation(const G4eplusAnnihilatio << 93 << 94 protected: << 95 << 96 void InitialiseProcess(const G4ParticleDefin << 97 << 98 // Print out of the class parameters << 99 void StreamProcessInfo(std::ostream& outFile << 100 66 101 private: << 67 class G4eplusAnnihilation : public G4VRestDiscreteProcess 102 68 103 G4VPositronAtRestModel* f2GammaAtRestModel{n << 69 { 104 G4VPositronAtRestModel* f3GammaAtRestModel{n << 70 public: // with description 105 G4int fEntanglementModelID; << 71 106 G4bool isInitialised{false}; << 72 G4eplusAnnihilation(const G4String& processName ="annihil", 107 G4bool fEntangled{false}; << 73 G4ProcessType type = fElectromagnetic); 108 G4bool fApplyCuts{false}; << 74 >> 75 ~G4eplusAnnihilation(); >> 76 >> 77 G4bool IsApplicable(const G4ParticleDefinition&); >> 78 // true for positron only. >> 79 >> 80 void SetPhysicsTableBining(G4double lowE, G4double highE, G4int nBins); >> 81 // Allows to define the binning of the PhysicsTables, >> 82 // before to build them. >> 83 >> 84 void BuildPhysicsTable(const G4ParticleDefinition&); >> 85 // It builds the total CrossSectionPerAtom table, for e+, >> 86 // and for every element contained in the elementTable. >> 87 // It builds the MeanFreePath table, for e+, >> 88 // and for every material contained in the materialTable. >> 89 >> 90 G4bool StorePhysicsTable(const G4ParticleDefinition* , >> 91 const G4String& directory, G4bool); >> 92 // store CrossSection and MeanFreePath tables into an external file >> 93 // specified by 'directory' (must exist before invokation) >> 94 >> 95 //G4bool RetrievePhysicsTable(const G4ParticleDefinition* , >> 96 // const G4String& directory, G4bool); >> 97 // retrieve CrossSection and MeanFreePath tables from an external file >> 98 // specified by 'directory' >> 99 >> 100 void PrintInfoDefinition(); >> 101 // Print few lines of informations about the process: validity range, >> 102 // origine ..etc.. >> 103 // Invoked by BuildThePhysicsTable(). >> 104 >> 105 G4double GetMeanFreePath(const G4Track& aTrack, >> 106 G4double previousStepSize, >> 107 G4ForceCondition* condition); >> 108 // It returns the MeanFreePath of the process for the current track : >> 109 // (energy, material) >> 110 // The previousStepSize and G4ForceCondition* are not used. >> 111 // This function overloads a virtual function of the base class. >> 112 // It is invoked by the ProcessManager of the Particle. >> 113 >> 114 G4double GetCrossSectionPerAtom(G4DynamicParticle* aDynamicPositron, >> 115 G4Element* anElement); >> 116 // It returns the total CrossSectionPerAtom of the process, >> 117 // for the current DynamicPositron (energy), in anElement. >> 118 >> 119 G4VParticleChange* PostStepDoIt(const G4Track& aTrack, >> 120 const G4Step& aStep); >> 121 // It computes the final state of the process (at end of step), >> 122 // returned as a ParticleChange object. >> 123 // This function overloads a virtual function of the base class. >> 124 // It is invoked by the ProcessManager of the Particle. >> 125 >> 126 G4double GetMeanLifeTime(const G4Track& aTrack, >> 127 G4ForceCondition* condition); >> 128 // It is invoked by the ProcessManager of the Positron if this >> 129 // e+ has a kinetic energy null. Then it return 0 to force the >> 130 // call of AtRestDoIt. >> 131 // This function overloads a virtual function of the base class. >> 132 >> 133 G4VParticleChange* AtRestDoIt(const G4Track& aTrack, >> 134 const G4Step& aStep); >> 135 // It computes the final state of the process: >> 136 // e+ (at rest) e- (at rest) ---> gamma gamma, >> 137 // returned as a ParticleChange object. >> 138 // This function overloads a virtual function of the base class. >> 139 // It is invoked by the ProcessManager of the Particle. >> 140 >> 141 virtual >> 142 G4double ComputeCrossSectionPerAtom(G4double PositKinEnergy, >> 143 G4double AtomicNumber); >> 144 >> 145 G4double ComputeMeanFreePath(G4double PositKinEnergy, >> 146 G4Material* aMaterial); >> 147 >> 148 private: >> 149 >> 150 // hide assignment operator as private >> 151 G4eplusAnnihilation& operator=(const G4eplusAnnihilation& right); >> 152 G4eplusAnnihilation(const G4eplusAnnihilation& ); >> 153 >> 154 private: >> 155 >> 156 G4PhysicsTable* theCrossSectionTable; >> 157 G4PhysicsTable* theMeanFreePathTable; >> 158 >> 159 G4double LowestEnergyLimit; // low energy limit of the tables >> 160 G4double HighestEnergyLimit; // high energy limit of the tables >> 161 G4int NumbBinTable; // number of bins in the tables >> 162 G4double fminimalEnergy; // minimalEnergy of produced particles 109 }; 163 }; 110 164 111 //....oooOO0OOooo........oooOO0OOooo........oo 165 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 112 << 166 113 #endif 167 #endif >> 168 114 169