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.9 2001/10/01 15:00:28 maire Exp $ >> 25 // GEANT4 tag $Name: geant4-04-00 $ 28 // 26 // 29 // GEANT4 Class header file << 30 // << 31 // << 32 // File name: G4eplusAnnihilation << 33 // << 34 // Author: Vladimir Ivanchenko on base << 35 // << 36 // Creation date: 02.08.2004 << 37 // << 38 // Modifications: << 39 // 08-11-04 Migration to new interface of Stor << 40 // 15-03-05 Update interface according to chan << 41 // in G4VEmProcess (V.Ivanchenko) << 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 // << 51 // This class manages the process of e+ annihi << 52 // It is possible to enable ApplyCuts and Enta << 53 // G4EmParameters class using UI commands or C << 54 // EM splitting or Russian roulette are allowe << 55 // are enabled. << 56 // << 57 // ------------------------------------------- << 58 // << 59 << 60 #ifndef G4eplusAnnihilation_h << 61 #define G4eplusAnnihilation_h 1 << 62 << 63 #include "G4VEmProcess.hh" << 64 << 65 class G4ParticleDefinition; << 66 class G4VPositronAtRestModel; << 67 27 68 class G4eplusAnnihilation : public G4VEmProces << 28 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 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 29 88 // print documentation in html format << 30 // 10-01-97, crossection table + meanfreepath table, M.Maire 89 void ProcessDescription(std::ostream&) const << 31 // 17-03-97, merge 'in fly' and 'at rest', M.Maire >> 32 // 31-08-98, new methods SetBining() and PrintInfo() >> 33 // 03-08-01, new methods Store/Retrieve PhysicsTable (mma) >> 34 // 06-08-01, BuildThePhysicsTable() called from constructor (mma) >> 35 // 20-09-01, DoIt: fminimalEnergy = 1*eV (mma) >> 36 // 01-10-01, come back to BuildPhysicsTable(const G4ParticleDefinition&) >> 37 // 90 38 91 G4eplusAnnihilation & operator=(const G4eplu << 39 // class description 92 G4eplusAnnihilation(const G4eplusAnnihilatio << 40 // >> 41 // e+ e- ---> gamma gamma >> 42 // inherit from G4VRestDiscreteProcess >> 43 // 93 44 94 protected: << 45 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... >> 46 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 95 47 96 void InitialiseProcess(const G4ParticleDefin << 48 #ifndef G4eplusAnnihilation_h >> 49 #define G4eplusAnnihilation_h 1 97 50 98 // Print out of the class parameters << 51 #include "G4ios.hh" 99 void StreamProcessInfo(std::ostream& outFile << 52 #include "globals.hh" >> 53 #include "Randomize.hh" >> 54 #include "G4VRestDiscreteProcess.hh" >> 55 #include "G4PhysicsTable.hh" >> 56 #include "G4PhysicsLogVector.hh" >> 57 #include "G4ElementTable.hh" >> 58 #include "G4Gamma.hh" >> 59 #include "G4Positron.hh" >> 60 #include "G4Step.hh" 100 61 101 private: << 62 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 102 63 103 G4VPositronAtRestModel* f2GammaAtRestModel{n << 64 class G4eplusAnnihilation : public G4VRestDiscreteProcess 104 G4VPositronAtRestModel* f3GammaAtRestModel{n << 65 105 G4int fEntanglementModelID; << 66 { 106 G4bool isInitialised{false}; << 67 public: // with description 107 G4bool fEntangled{false}; << 68 108 G4bool fApplyCuts{false}; << 69 G4eplusAnnihilation(const G4String& processName ="annihil"); >> 70 >> 71 ~G4eplusAnnihilation(); >> 72 >> 73 G4bool IsApplicable(const G4ParticleDefinition&); >> 74 // true for positron only. >> 75 >> 76 void SetPhysicsTableBining(G4double lowE, G4double highE, G4int nBins); >> 77 // Allows to define the binning of the PhysicsTables, >> 78 // before to build them. >> 79 >> 80 void BuildPhysicsTable(const G4ParticleDefinition&); >> 81 // It builds the total CrossSectionPerAtom table, for e+, >> 82 // and for every element contained in the elementTable. >> 83 // It builds the MeanFreePath table, for e+, >> 84 // and for every material contained in the materialTable. >> 85 >> 86 G4bool StorePhysicsTable(G4ParticleDefinition* , >> 87 const G4String& directory, G4bool); >> 88 // store CrossSection and MeanFreePath tables into an external file >> 89 // specified by 'directory' (must exist before invokation) >> 90 >> 91 G4bool RetrievePhysicsTable(G4ParticleDefinition* , >> 92 const G4String& directory, G4bool); >> 93 // retrieve CrossSection and MeanFreePath tables from an external file >> 94 // specified by 'directory' >> 95 >> 96 void PrintInfoDefinition(); >> 97 // Print few lines of informations about the process: validity range, >> 98 // origine ..etc.. >> 99 // Invoked by BuildThePhysicsTable(). >> 100 >> 101 G4double GetMeanFreePath(const G4Track& aTrack, >> 102 G4double previousStepSize, >> 103 G4ForceCondition* condition); >> 104 // It returns the MeanFreePath of the process for the current track : >> 105 // (energy, material) >> 106 // The previousStepSize and G4ForceCondition* are not used. >> 107 // This function overloads a virtual function of the base class. >> 108 // It is invoked by the ProcessManager of the Particle. >> 109 >> 110 G4double GetCrossSectionPerAtom(G4DynamicParticle* aDynamicPositron, >> 111 G4Element* anElement); >> 112 // It returns the total CrossSectionPerAtom of the process, >> 113 // for the current DynamicPositron (energy), in anElement. >> 114 >> 115 G4VParticleChange* PostStepDoIt(const G4Track& aTrack, >> 116 const G4Step& aStep); >> 117 // It computes the final state of the process (at end of step), >> 118 // returned as a ParticleChange object. >> 119 // This function overloads a virtual function of the base class. >> 120 // It is invoked by the ProcessManager of the Particle. >> 121 >> 122 G4double GetMeanLifeTime(const G4Track& aTrack, >> 123 G4ForceCondition* condition); >> 124 // It is invoked by the ProcessManager of the Positron if this >> 125 // e+ has a kinetic energy null. Then it return 0 to force the >> 126 // call of AtRestDoIt. >> 127 // This function overloads a virtual function of the base class. >> 128 >> 129 G4VParticleChange* AtRestDoIt(const G4Track& aTrack, >> 130 const G4Step& aStep); >> 131 // It computes the final state of the process: >> 132 // e+ (at rest) e- (at rest) ---> gamma gamma, >> 133 // returned as a ParticleChange object. >> 134 // This function overloads a virtual function of the base class. >> 135 // It is invoked by the ProcessManager of the Particle. >> 136 >> 137 protected: >> 138 >> 139 virtual G4double ComputeCrossSectionPerAtom(G4double PositKinEnergy, >> 140 G4double AtomicNumber); >> 141 >> 142 virtual G4double ComputeMeanFreePath(G4double PositKinEnergy, >> 143 G4Material* aMaterial); >> 144 >> 145 private: >> 146 >> 147 // hide assignment operator as private >> 148 G4eplusAnnihilation& operator=(const G4eplusAnnihilation& right); >> 149 G4eplusAnnihilation(const G4eplusAnnihilation& ); >> 150 >> 151 private: >> 152 >> 153 G4PhysicsTable* theCrossSectionTable; >> 154 G4PhysicsTable* theMeanFreePathTable; >> 155 >> 156 G4double LowestEnergyLimit; // low energy limit of the tables >> 157 G4double HighestEnergyLimit; // high energy limit of the tables >> 158 G4int NumbBinTable; // number of bins in the tables >> 159 G4double fminimalEnergy; // minimalEnergy of produced particles 109 }; 160 }; 110 161 111 //....oooOO0OOooo........oooOO0OOooo........oo 162 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 112 163 >> 164 #include "G4eplusAnnihilation.icc" >> 165 113 #endif 166 #endif >> 167 114 168