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 // >> 23 // $Id: G4hIonisation.hh,v 1.32 2005/05/12 11:06:43 vnivanch Exp $ >> 24 // GEANT4 tag $Name: geant4-08-00 $ 26 // 25 // 27 // ------------------------------------------- 26 // ------------------------------------------------------------------- 28 // 27 // 29 // GEANT4 Class header file 28 // GEANT4 Class header file 30 // 29 // 31 // 30 // 32 // File name: G4hIonisation 31 // File name: G4hIonisation 33 // 32 // 34 // Author: Laszlo Urban 33 // Author: Laszlo Urban 35 // 34 // 36 // Creation date: 30.05.1997 35 // Creation date: 30.05.1997 37 // 36 // 38 // Modifications: 37 // Modifications: 39 // 38 // 40 // corrected by L.Urban on 24/09/97 39 // corrected by L.Urban on 24/09/97 41 // corrected by L.Urban on 13/01/98 40 // corrected by L.Urban on 13/01/98 42 // bugs fixed by L.Urban on 02/02/99 41 // bugs fixed by L.Urban on 02/02/99 43 // 10/02/00 modifications , new e.m. structure 42 // 10/02/00 modifications , new e.m. structure, L.Urban 44 // 10-08-01 new methods Store/Retrieve Physics 43 // 10-08-01 new methods Store/Retrieve PhysicsTable (mma) 45 // 14-08-01 new function ComputeRestrictedMean 44 // 14-08-01 new function ComputeRestrictedMeandEdx() + 'cleanup' (mma) 46 // 19-09-01 come back to previous process name 45 // 19-09-01 come back to previous process name "hIoni" 47 // 29-10-01 all static functions no more inlin 46 // 29-10-01 all static functions no more inlined 48 // 07-01-02 new design of em processes (V.Ivan 47 // 07-01-02 new design of em processes (V.Ivanchenko) 49 // 26-12-02 secondary production moved to deri 48 // 26-12-02 secondary production moved to derived classes (VI) 50 // 24-01-03 Make models region aware (V.Ivanch 49 // 24-01-03 Make models region aware (V.Ivanchenko) 51 // 05-02-03 Fix compilation warnings (V.Ivanch 50 // 05-02-03 Fix compilation warnings (V.Ivanchenko) 52 // 13-02-03 SubCutoff regime is assigned to a 51 // 13-02-03 SubCutoff regime is assigned to a region (V.Ivanchenko) 53 // 15-02-03 Add control on delta pointer (V.Iv 52 // 15-02-03 Add control on delta pointer (V.Ivanchenko) 54 // 23-05-03 Add fluctuation model as a member 53 // 23-05-03 Add fluctuation model as a member function (V.Ivanchenko) 55 // 03-06-03 Fix initialisation problem for STD 54 // 03-06-03 Fix initialisation problem for STD ionisation (V.Ivanchenko) 56 // 16-06-03 ShortLived are not applicable any 55 // 16-06-03 ShortLived are not applicable any more (V.Ivanchenko) 57 // 08-08-03 STD substitute standard (V.Ivanch 56 // 08-08-03 STD substitute standard (V.Ivanchenko) 58 // 12-11-03 G4EnergyLossSTD -> G4EnergyLossPro 57 // 12-11-03 G4EnergyLossSTD -> G4EnergyLossProcess (V.Ivanchenko) 59 // 21-01-04 Migrade to G4ParticleChangeForLoss 58 // 21-01-04 Migrade to G4ParticleChangeForLoss (V.Ivanchenko) 60 // 08-11-04 Migration to new interface of Stor 59 // 08-11-04 Migration to new interface of Store/Retrieve tables (V.Ivantchenko) 61 // 08-04-05 Major optimisation of internal int 60 // 08-04-05 Major optimisation of internal interfaces (V.Ivantchenko) 62 // 11-04-04 Move MaxSecondaryEnergy to models 61 // 11-04-04 Move MaxSecondaryEnergy to models (V.Ivanchenko) 63 // 12-09-08 Removed CorrectionsAlongStep (VI) << 64 // 62 // 65 // Class Description: 63 // Class Description: 66 // 64 // 67 // This class manages the ionisation process f 65 // This class manages the ionisation process for hadrons. 68 // it inherites from G4VContinuousDiscreteProc 66 // it inherites from G4VContinuousDiscreteProcess via G4VEnergyLoss. 69 // 67 // 70 68 71 // ------------------------------------------- 69 // ------------------------------------------------------------------- 72 // 70 // 73 71 74 #ifndef G4hIonisation_h 72 #ifndef G4hIonisation_h 75 #define G4hIonisation_h 1 73 #define G4hIonisation_h 1 76 74 77 #include "G4VEnergyLossProcess.hh" 75 #include "G4VEnergyLossProcess.hh" 78 #include "G4Electron.hh" 76 #include "G4Electron.hh" 79 #include "G4Positron.hh" 77 #include "G4Positron.hh" 80 #include "globals.hh" 78 #include "globals.hh" >> 79 #include "G4VEmModel.hh" 81 80 82 class G4Material; 81 class G4Material; >> 82 class G4VEmFluctuationModel; 83 83 84 class G4hIonisation : public G4VEnergyLossProc 84 class G4hIonisation : public G4VEnergyLossProcess 85 { 85 { 86 86 87 public: 87 public: 88 88 89 explicit G4hIonisation(const G4String& name << 89 G4hIonisation(const G4String& name = "hIoni"); 90 90 91 ~G4hIonisation() override = default; << 91 virtual ~G4hIonisation(); 92 92 93 G4bool IsApplicable(const G4ParticleDefiniti << 93 G4bool IsApplicable(const G4ParticleDefinition& p); 94 94 95 G4double MinPrimaryEnergy(const G4ParticleDe 95 G4double MinPrimaryEnergy(const G4ParticleDefinition* p, 96 const G4Material*, G4double cut) fin << 96 const G4Material*, G4double cut); 97 97 98 // print documentation in html format << 98 // Print out of the class parameters 99 void ProcessDescription(std::ostream&) const << 99 virtual void PrintInfo(); 100 << 101 // hide assignment operator << 102 G4hIonisation & operator=(const G4hIonisatio << 103 G4hIonisation(const G4hIonisation&) = delete << 104 100 105 protected: 101 protected: 106 102 107 void InitialiseEnergyLossProcess(const G4Par << 103 std::vector<G4DynamicParticle*>* SecondariesPostStep( 108 const G4ParticleDefinition*) overri << 104 G4VEmModel*, >> 105 const G4MaterialCutsCouple*, >> 106 const G4DynamicParticle*, >> 107 G4double&); >> 108 >> 109 virtual void InitialiseEnergyLossProcess(const G4ParticleDefinition*, >> 110 const G4ParticleDefinition*); 109 111 110 private: 112 private: 111 113 112 G4bool isInitialised = false; << 114 // hide assignment operator 113 G4double mass = 0.0; << 115 G4hIonisation & operator=(const G4hIonisation &right); 114 G4double ratio = 0.0; << 116 G4hIonisation(const G4hIonisation&); 115 G4double eth; << 117 >> 118 G4double mass; >> 119 G4double ratio; >> 120 >> 121 const G4ParticleDefinition* theParticle; >> 122 const G4ParticleDefinition* theBaseParticle; >> 123 G4VEmFluctuationModel* flucModel; >> 124 >> 125 G4bool isInitialised; >> 126 >> 127 G4double eth; >> 128 116 }; 129 }; >> 130 >> 131 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... >> 132 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... >> 133 >> 134 inline G4bool G4hIonisation::IsApplicable(const G4ParticleDefinition& p) >> 135 { >> 136 return (p.GetPDGCharge() != 0.0 && p.GetPDGMass() > 10.0*MeV && >> 137 !p.IsShortLived()); >> 138 } >> 139 >> 140 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... >> 141 >> 142 inline G4double G4hIonisation::MinPrimaryEnergy(const G4ParticleDefinition*, >> 143 const G4Material*, >> 144 G4double cut) >> 145 { >> 146 G4double x = 0.5*cut/electron_mass_c2; >> 147 G4double y = electron_mass_c2/mass; >> 148 G4double g = x*y + std::sqrt((1. + x)*(1. + x*y*y)); >> 149 return mass*(g - 1.0); >> 150 } >> 151 >> 152 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... >> 153 >> 154 inline std::vector<G4DynamicParticle*>* G4hIonisation::SecondariesPostStep( >> 155 G4VEmModel* model, >> 156 const G4MaterialCutsCouple* couple, >> 157 const G4DynamicParticle* dp, >> 158 G4double& tcut) >> 159 { >> 160 return model->SampleSecondaries(couple, dp, tcut); >> 161 } 117 162 118 //....oooOO0OOooo........oooOO0OOooo........oo 163 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 119 164 120 #endif 165 #endif 121 166