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.11 2004/03/10 16:48:45 vnivanch Exp $ >> 25 // GEANT4 tag $Name: geant4-06-01 $ 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 G4ProcessType type = fElectromagnetic); >> 71 >> 72 ~G4eplusAnnihilation(); >> 73 >> 74 G4bool IsApplicable(const G4ParticleDefinition&); >> 75 // true for positron only. >> 76 >> 77 void SetPhysicsTableBining(G4double lowE, G4double highE, G4int nBins); >> 78 // Allows to define the binning of the PhysicsTables, >> 79 // before to build them. >> 80 >> 81 void BuildPhysicsTable(const G4ParticleDefinition&); >> 82 // It builds the total CrossSectionPerAtom table, for e+, >> 83 // and for every element contained in the elementTable. >> 84 // It builds the MeanFreePath table, for e+, >> 85 // and for every material contained in the materialTable. >> 86 >> 87 G4bool StorePhysicsTable(G4ParticleDefinition* , >> 88 const G4String& directory, G4bool); >> 89 // store CrossSection and MeanFreePath tables into an external file >> 90 // specified by 'directory' (must exist before invokation) >> 91 >> 92 G4bool RetrievePhysicsTable(G4ParticleDefinition* , >> 93 const G4String& directory, G4bool); >> 94 // retrieve CrossSection and MeanFreePath tables from an external file >> 95 // specified by 'directory' >> 96 >> 97 void PrintInfoDefinition(); >> 98 // Print few lines of informations about the process: validity range, >> 99 // origine ..etc.. >> 100 // Invoked by BuildThePhysicsTable(). >> 101 >> 102 G4double GetMeanFreePath(const G4Track& aTrack, >> 103 G4double previousStepSize, >> 104 G4ForceCondition* condition); >> 105 // It returns the MeanFreePath of the process for the current track : >> 106 // (energy, material) >> 107 // The previousStepSize and G4ForceCondition* are not used. >> 108 // This function overloads a virtual function of the base class. >> 109 // It is invoked by the ProcessManager of the Particle. >> 110 >> 111 G4double GetCrossSectionPerAtom(G4DynamicParticle* aDynamicPositron, >> 112 G4Element* anElement); >> 113 // It returns the total CrossSectionPerAtom of the process, >> 114 // for the current DynamicPositron (energy), in anElement. >> 115 >> 116 G4VParticleChange* PostStepDoIt(const G4Track& aTrack, >> 117 const G4Step& aStep); >> 118 // It computes the final state of the process (at end of step), >> 119 // returned as a ParticleChange object. >> 120 // This function overloads a virtual function of the base class. >> 121 // It is invoked by the ProcessManager of the Particle. >> 122 >> 123 G4double GetMeanLifeTime(const G4Track& aTrack, >> 124 G4ForceCondition* condition); >> 125 // It is invoked by the ProcessManager of the Positron if this >> 126 // e+ has a kinetic energy null. Then it return 0 to force the >> 127 // call of AtRestDoIt. >> 128 // This function overloads a virtual function of the base class. >> 129 >> 130 G4VParticleChange* AtRestDoIt(const G4Track& aTrack, >> 131 const G4Step& aStep); >> 132 // It computes the final state of the process: >> 133 // e+ (at rest) e- (at rest) ---> gamma gamma, >> 134 // returned as a ParticleChange object. >> 135 // This function overloads a virtual function of the base class. >> 136 // It is invoked by the ProcessManager of the Particle. >> 137 >> 138 protected: >> 139 >> 140 virtual G4double ComputeCrossSectionPerAtom(G4double PositKinEnergy, >> 141 G4double AtomicNumber); >> 142 >> 143 virtual G4double ComputeMeanFreePath(G4double PositKinEnergy, >> 144 G4Material* aMaterial); >> 145 >> 146 private: >> 147 >> 148 // hide assignment operator as private >> 149 G4eplusAnnihilation& operator=(const G4eplusAnnihilation& right); >> 150 G4eplusAnnihilation(const G4eplusAnnihilation& ); >> 151 >> 152 private: >> 153 >> 154 G4PhysicsTable* theCrossSectionTable; >> 155 G4PhysicsTable* theMeanFreePathTable; >> 156 >> 157 G4double LowestEnergyLimit; // low energy limit of the tables >> 158 G4double HighestEnergyLimit; // high energy limit of the tables >> 159 G4int NumbBinTable; // number of bins in the tables >> 160 G4double fminimalEnergy; // minimalEnergy of produced particles 109 }; 161 }; 110 162 111 //....oooOO0OOooo........oooOO0OOooo........oo 163 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 112 164 >> 165 #include "G4eplusAnnihilation.icc" >> 166 113 #endif 167 #endif >> 168 114 169