- Timestamp:
- Nov 5, 2010, 3:45:55 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/processes/electromagnetic/utils/include/G4ElectronIonPair.hh
r1337 r1340 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4ElectronIonPair.hh,v 1. 2 2008/10/17 14:46:16vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-04-beta-01$26 // $Id: G4ElectronIonPair.hh,v 1.5 2010/10/25 17:23:01 vnivanch Exp $ 27 // GEANT4 tag $Name: emutils-V09-03-23 $ 28 28 // 29 29 // … … 62 62 #include "G4ParticleDefinition.hh" 63 63 #include "G4ThreeVector.hh" 64 #include "G4TrackVector.hh"65 64 #include "G4VProcess.hh" 66 65 #include <vector> … … 86 85 inline G4double MeanNumberOfIonsAlongStep(const G4Step*); 87 86 87 inline G4int SampleNumberOfIonsAlongStep(const G4Step*); 88 88 89 // returns pointer to the new vector of positions of 89 90 // ionisation points in the World coordinate system 90 std::vector<G4ThreeVector>*91 SampleIonsAlongStep(const G4ThreeVector& prePosition,92 const G4ThreeVector& postPosition,93 G4double numberOfIonisations);94 95 91 std::vector<G4ThreeVector>* SampleIonsAlongStep(const G4Step*); 96 92 … … 115 111 private: 116 112 113 void Initialise(); 114 115 G4double FindMeanEnergyPerIonPair(const G4Material*); 116 117 117 // hide assignment operator 118 118 G4ElectronIonPair & operator=(const G4ElectronIonPair &right); 119 119 G4ElectronIonPair(const G4ElectronIonPair&); 120 120 121 G4double FindMeanEnergyPerIonPair(const G4Material*); 121 // cash 122 const G4Material* curMaterial; 123 G4double curMeanEnergy; 122 124 123 void Initialise(); 124 125 const G4ParticleDefinition* gamma; 126 127 // cash 128 const G4Material* curMaterial; 129 G4double curMeanEnergy; 130 125 G4double FanoFactor; 126 131 127 G4int verbose; 132 128 G4int nMaterials; 133 129 134 130 // list of G4 NIST materials with mean energy per ion defined 135 std::vector<G4double> g4MatData; 136 std::vector<G4String> g4MatNames; 137 131 std::vector<G4double> g4MatData; 132 std::vector<G4String> g4MatNames; 138 133 }; 139 134 … … 141 136 G4ElectronIonPair::MeanNumberOfIonsAlongStep(const G4Step* step) 142 137 { 143 return MeanNumberOfIonsAlongStep(step->GetTrack()->Get Definition(),138 return MeanNumberOfIonsAlongStep(step->GetTrack()->GetParticleDefinition(), 144 139 step->GetPreStepPoint()->GetMaterial(), 145 140 step->GetTotalEnergyDeposit(), … … 147 142 } 148 143 149 inline std::vector<G4ThreeVector>*150 G4 ElectronIonPair::SampleIonsAlongStep(const G4Step* step)144 inline 145 G4int G4ElectronIonPair::SampleNumberOfIonsAlongStep(const G4Step* step) 151 146 { 152 return SampleIonsAlongStep(step->GetPreStepPoint()->GetPosition(), 153 step->GetPostStepPoint()->GetPosition(), 154 MeanNumberOfIonsAlongStep(step)); 155 } 147 G4double meanion = MeanNumberOfIonsAlongStep(step); 148 G4double sig = FanoFactor*std::sqrt(meanion); 149 G4int nion = G4int(G4RandGauss::shoot(meanion,sig) + 0.5); 150 return nion; 151 } 156 152 157 153 inline … … 160 156 G4int subtype = -1; 161 157 const G4VProcess* proc = step->GetPostStepPoint()->GetProcessDefinedStep(); 162 if(proc) subtype = proc->GetProcessSubType();163 return ResidualeChargePostStep(step->GetTrack()->Get Definition(),158 if(proc) { subtype = proc->GetProcessSubType(); } 159 return ResidualeChargePostStep(step->GetTrack()->GetParticleDefinition(), 164 160 step->GetSecondary(), 165 161 subtype);
Note: See TracChangeset
for help on using the changeset viewer.