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: G4hIonisation.hh,v 1.21 2003/01/17 18:55:43 vnivanch Exp $ >> 25 // GEANT4 tag $Name: geant4-05-01 $ 28 // 26 // 29 // GEANT4 Class header file << 27 // --------------- G4hIonisation physics process ------------------------------- 30 // << 28 // by Laszlo Urban, 30 May 1997 31 // << 29 // ----------------------------------------------------------------------------- 32 // File name: G4hIonisation << 33 // << 34 // Author: Laszlo Urban << 35 // << 36 // Creation date: 30.05.1997 << 37 // << 38 // Modifications: << 39 // 30 // 40 // corrected by L.Urban on 24/09/97 31 // corrected by L.Urban on 24/09/97 41 // corrected by L.Urban on 13/01/98 32 // corrected by L.Urban on 13/01/98 42 // bugs fixed by L.Urban on 02/02/99 33 // bugs fixed by L.Urban on 02/02/99 43 // 10/02/00 modifications , new e.m. structure 34 // 10/02/00 modifications , new e.m. structure, L.Urban 44 // 10-08-01 new methods Store/Retrieve Physics 35 // 10-08-01 new methods Store/Retrieve PhysicsTable (mma) 45 // 14-08-01 new function ComputeRestrictedMean 36 // 14-08-01 new function ComputeRestrictedMeandEdx() + 'cleanup' (mma) 46 // 19-09-01 come back to previous process name 37 // 19-09-01 come back to previous process name "hIoni" 47 // 29-10-01 all static functions no more inlin 38 // 29-10-01 all static functions no more inlined 48 // 07-01-02 new design of em processes (V.Ivan << 39 // 15-01-03 Migrade to cut per region (V.Ivanchenko) 49 // 26-12-02 secondary production moved to deri << 50 // 24-01-03 Make models region aware (V.Ivanch << 51 // 05-02-03 Fix compilation warnings (V.Ivanch << 52 // 13-02-03 SubCutoff regime is assigned to a << 53 // 15-02-03 Add control on delta pointer (V.Iv << 54 // 23-05-03 Add fluctuation model as a member << 55 // 03-06-03 Fix initialisation problem for STD << 56 // 16-06-03 ShortLived are not applicable any << 57 // 08-08-03 STD substitute standard (V.Ivanch << 58 // 12-11-03 G4EnergyLossSTD -> G4EnergyLossPro << 59 // 21-01-04 Migrade to G4ParticleChangeForLoss << 60 // 08-11-04 Migration to new interface of Stor << 61 // 08-04-05 Major optimisation of internal int << 62 // 11-04-04 Move MaxSecondaryEnergy to models << 63 // 12-09-08 Removed CorrectionsAlongStep (VI) << 64 // 40 // 65 // Class Description: << 41 // ----------------------------------------------------------------------------- >> 42 >> 43 // Class description 66 // 44 // 67 // This class manages the ionisation process f 45 // This class manages the ionisation process for hadrons. 68 // it inherites from G4VContinuousDiscreteProc << 46 // it inherites from G4VContinuousDiscreteProcess via G4VhEnergyLoss. 69 // 47 // >> 48 // Class description - end 70 49 71 // ------------------------------------------- << 50 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 72 // << 51 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 73 52 74 #ifndef G4hIonisation_h 53 #ifndef G4hIonisation_h 75 #define G4hIonisation_h 1 54 #define G4hIonisation_h 1 76 55 77 #include "G4VEnergyLossProcess.hh" << 56 #include "G4VhEnergyLoss.hh" 78 #include "G4Electron.hh" << 57 #include "G4MaterialCutsCouple.hh" 79 #include "G4Positron.hh" << 80 #include "globals.hh" << 81 58 82 class G4Material; << 59 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... >> 60 >> 61 class G4hIonisation : public G4VhEnergyLoss 83 62 84 class G4hIonisation : public G4VEnergyLossProc << 85 { 63 { >> 64 public: // with description >> 65 >> 66 G4hIonisation(const G4String& processName = "hIoni"); >> 67 >> 68 ~G4hIonisation(); >> 69 >> 70 G4bool IsApplicable(const G4ParticleDefinition&); >> 71 // return true for charged particles, false otherwise >> 72 >> 73 void BuildPhysicsTable(const G4ParticleDefinition& aParticleType); >> 74 // this function overloads a virtual function of the base class. >> 75 // It is invoked by the G4ParticleWithCuts::SetCut() method. >> 76 // It invokes BuildLambdaTable(), BuildLossTable(), BuildDEDXTable() >> 77 >> 78 void BuildLossTable(const G4ParticleDefinition& aParticleType); >> 79 // build the dE/dx tables due to the ionisation, for every materials. >> 80 // (restricted stopping power, Bethe-Bloch formula) >> 81 >> 82 void BuildLambdaTable(const G4ParticleDefinition& aParticleType); >> 83 // build mean free path tables for the delta rays production. >> 84 // the tables are built for every materials. >> 85 >> 86 G4bool StorePhysicsTable(G4ParticleDefinition* , >> 87 const G4String& directory, G4bool); >> 88 // store eLoss 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 eLoss and MeanFreePath tables from an external file >> 94 // specified by 'directory' >> 95 >> 96 virtual void PrintInfoDefinition(); >> 97 // Print few lines of informations about the process: validity range, >> 98 // origine ..etc.. >> 99 // Invoked by BuildPhysicsTable(). 86 100 87 public: << 101 G4double GetMeanFreePath(const G4Track& track, >> 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. 88 109 89 explicit G4hIonisation(const G4String& name << 110 G4VParticleChange *PostStepDoIt(const G4Track& track, >> 111 const G4Step& Step ); >> 112 // It computes the final state of the process (at end of step), >> 113 // returned as a ParticleChange object. >> 114 // This function overloads a virtual function of the base class. >> 115 // It is invoked by the ProcessManager of the Particle. 90 116 91 ~G4hIonisation() override = default; << 92 117 93 G4bool IsApplicable(const G4ParticleDefiniti << 118 protected: // with description 94 119 95 G4double MinPrimaryEnergy(const G4ParticleDe << 120 virtual G4double ComputeRestrictedMeandEdx( 96 const G4Material*, G4double cut) fin << 121 const G4ParticleDefinition& aParticleType, >> 122 G4double KineticEnergy, >> 123 const G4Material* material, >> 124 G4double DeltaThreshold); >> 125 // computes restricted mean dE/dx in Geant4 internal units. 97 126 98 // print documentation in html format << 127 virtual G4double ComputeCrossSectionPerAtom( 99 void ProcessDescription(std::ostream&) const << 128 const G4ParticleDefinition& aParticleType, >> 129 G4double KineticEnergy, >> 130 G4double AtomicNumber, >> 131 G4double DeltaThreshold); >> 132 // computes total cross section per atom in Geant4 internal units. 100 133 101 // hide assignment operator << 134 protected: 102 G4hIonisation & operator=(const G4hIonisatio << 103 G4hIonisation(const G4hIonisation&) = delete << 104 135 105 protected: << 136 virtual G4double SecondaryEnergyThreshold(size_t index); 106 137 107 void InitialiseEnergyLossProcess(const G4Par << 138 G4PhysicsTable* theMeanFreePathTable; 108 const G4ParticleDefinition*) overri << 109 139 110 private: << 140 private: 111 141 112 G4bool isInitialised = false; << 142 // hide assignment operator 113 G4double mass = 0.0; << 143 G4hIonisation & operator=(const G4hIonisation &right); 114 G4double ratio = 0.0; << 144 G4hIonisation(const G4hIonisation&); 115 G4double eth; << 145 >> 146 private: >> 147 >> 148 static G4double LowerBoundLambda; // bining for lambda table >> 149 static G4double UpperBoundLambda; >> 150 static G4int NbinLambda; >> 151 >> 152 G4double LowestKineticEnergy; // binning for dE/dx table >> 153 G4double HighestKineticEnergy; >> 154 G4int TotBin; >> 155 >> 156 G4double Tmincut; // min energy of d-rays >> 157 G4double initialMass; // mass for Lambda table >> 158 >> 159 const G4std::vector<G4double>* secondaryEnergyCuts; >> 160 >> 161 public: // with description >> 162 >> 163 static void SetLowerBoundLambda(G4double val); >> 164 static void SetUpperBoundLambda(G4double val); >> 165 static void SetNbinLambda(G4int n); >> 166 // set the parameters of the mean free path table. >> 167 >> 168 static G4double GetLowerBoundLambda(); >> 169 static G4double GetUpperBoundLambda(); >> 170 static G4int GetNbinLambda(); >> 171 // get the parameters of the mean free path table. 116 }; 172 }; 117 173 118 //....oooOO0OOooo........oooOO0OOooo........oo << 174 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... >> 175 >> 176 #include "G4hIonisation.icc" 119 177 120 #endif 178 #endif >> 179 >> 180 >> 181 >> 182 >> 183 >> 184 >> 185 >> 186 121 187