Geant4  10.03.p01
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
G4DNABornIonisationModel1.hh
Go to the documentation of this file.
1 //
2 // ********************************************************************
3 // * License and Disclaimer *
4 // * *
5 // * The Geant4 software is copyright of the Copyright Holders of *
6 // * the Geant4 Collaboration. It is provided under the terms and *
7 // * conditions of the Geant4 Software License, included in the file *
8 // * LICENSE and available at http://cern.ch/geant4/license . These *
9 // * include a list of copyright holders. *
10 // * *
11 // * Neither the authors of this software system, nor their employing *
12 // * institutes,nor the agencies providing financial support for this *
13 // * work make any representation or warranty, express or implied, *
14 // * regarding this software system or assume any liability for its *
15 // * use. Please see the license in the file LICENSE and URL above *
16 // * for the full disclaimer and the limitation of liability. *
17 // * *
18 // * This code implementation is the result of the scientific and *
19 // * technical work of the GEANT4 collaboration. *
20 // * By using, copying, modifying or distributing the software (or *
21 // * any work based on the software) you agree to acknowledge its *
22 // * use in resulting scientific publications, and indicate your *
23 // * acceptance of all terms of the Geant4 Software license. *
24 // ********************************************************************
25 //
26 // $Id: G4DNABornIonisationModel1.hh 81398 2014-05-28 09:53:02Z vnivanch $
27 //
28 
29 #ifndef G4DNABornIonisationModel1_h
30 #define G4DNABornIonisationModel1_h 1
31 
32 #include "G4VEmModel.hh"
34 #include "G4ProductionCutsTable.hh"
35 
37 #include "G4Electron.hh"
38 #include "G4Proton.hh"
40 
41 #include "G4LogLogInterpolation.hh"
42 
44 #include "G4VAtomDeexcitation.hh"
45 #include "G4NistManager.hh"
46 
47 
49 {
50 
51 public:
52 
54  const G4String& nam = "DNABornIonisationModel");
55 
57 
58  virtual void Initialise(const G4ParticleDefinition*, const G4DataVector& = *(new G4DataVector()));
59 
60  virtual G4double CrossSectionPerVolume( const G4Material* material,
61  const G4ParticleDefinition* p,
62  G4double ekin,
63  G4double emin,
64  G4double emax);
65 
66  virtual void SampleSecondaries(std::vector<G4DynamicParticle*>*,
67  const G4MaterialCutsCouple*,
68  const G4DynamicParticle*,
69  G4double tmin,
70  G4double maxEnergy);
71 
73  G4int /*level*/,
74  const G4ParticleDefinition*,
75  G4double /*kineticEnergy*/);
76 
77  double DifferentialCrossSection(G4ParticleDefinition * aParticleDefinition, G4double k, G4double energyTransfer, G4int shell);
78 
79  G4double TransferedEnergy(G4ParticleDefinition * aParticleDefinition,
80  G4double incomingParticleEnergy, G4int shell, G4double random) ;
81 
82  inline void SelectFasterComputation(G4bool input);
83 
84  inline void SelectStationary(G4bool input);
85 
86  inline void SelectSPScaling(G4bool input);
87 
88 protected:
89 
91 
92 private:
93 
94  G4bool fasterCode;
95  G4bool statCode;
96  G4bool spScaling;
97 
98  // Water density table
99  const std::vector<G4double>* fpMolWaterDensity;
100 
101  // Deexcitation manager to produce fluo photons and e-
102  G4VAtomDeexcitation* fAtomDeexcitation;
103 
104  std::map<G4String,G4double,std::less<G4String> > lowEnergyLimit;
105  std::map<G4String,G4double,std::less<G4String> > highEnergyLimit;
106 
107  // TODO :
108 // std::map<const G4ParticleDefinition*,std::pair<G4double,G4double> > fEnergyLimits;
109 
110 
111  G4bool isInitialised;
112  G4int verboseLevel;
113 
114  // Cross section
115 
116  typedef std::map<G4String,G4String,std::less<G4String> > MapFile;
117  MapFile tableFile; // useful ?
118 
119  typedef std::map<G4String,G4DNACrossSectionDataSet*,std::less<G4String> > MapData;
120  MapData tableData;
121 
122  // Final state
123 
124  G4DNAWaterIonisationStructure waterStructure;
125 
126  G4double RandomizeEjectedElectronEnergy(G4ParticleDefinition * aParticleDefinition, G4double incomingParticleEnergy, G4int shell) ;
127 
128  G4double RandomizeEjectedElectronEnergyFromCumulatedDcs(G4ParticleDefinition * aParticleDefinition, G4double incomingParticleEnergy, G4int shell) ;
129 
130  G4double Interpolate(G4double e1, G4double e2, G4double e, G4double xs1, G4double xs2);
131 
132  G4double QuadInterpolator( G4double e11,
133  G4double e12,
134  G4double e21,
135  G4double e22,
136  G4double x11,
137  G4double x12,
138  G4double x21,
139  G4double x22,
140  G4double t1,
141  G4double t2,
142  G4double t,
143  G4double e);
144 
145  typedef std::map<double, std::map<double, double> > TriDimensionMap;
146 
147  TriDimensionMap eDiffCrossSectionData[6];
148  TriDimensionMap eNrjTransfData[6]; // for cumulated dcs
149 
150  TriDimensionMap pDiffCrossSectionData[6];
151  TriDimensionMap pNrjTransfData[6]; // for cumulated dcs
152 
153  std::vector<double> eTdummyVec;
154  std::vector<double> pTdummyVec;
155 
156  typedef std::map<double, std::vector<double> > VecMap;
157 
158  VecMap eVecm;
159  VecMap pVecm;
160 
161  VecMap eProbaShellMap[6]; // for cumulated dcs
162  VecMap pProbaShellMap[6]; // for cumulated dcs
163 
164  // Partial cross section
165 
166  G4int RandomSelect(G4double energy,const G4String& particle );
167 
168  //
169 
170  G4DNABornIonisationModel1 & operator=(const G4DNABornIonisationModel1 &right);
172 
173 };
174 
176 {
177  fasterCode = input;
178 }
179 
180 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
181 
183 {
184  statCode = input;
185 }
186 
187 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
188 
190 {
191  spScaling = input;
192 }
193 
194 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
195 
196 #endif
const char * p
Definition: xmltok.h:285
int G4int
Definition: G4Types.hh:78
G4ParticleChangeForGamma * fParticleChangeForGamma
G4double TransferedEnergy(G4ParticleDefinition *aParticleDefinition, G4double incomingParticleEnergy, G4int shell, G4double random)
bool G4bool
Definition: G4Types.hh:79
virtual void SampleSecondaries(std::vector< G4DynamicParticle * > *, const G4MaterialCutsCouple *, const G4DynamicParticle *, G4double tmin, G4double maxEnergy)
virtual G4double GetPartialCrossSection(const G4Material *, G4int, const G4ParticleDefinition *, G4double)
virtual void Initialise(const G4ParticleDefinition *, const G4DataVector &=*(new G4DataVector()))
static const G4double emax
G4DNABornIonisationModel1(const G4ParticleDefinition *p=0, const G4String &nam="DNABornIonisationModel")
G4double energy(const ThreeVector &p, const G4double m)
double DifferentialCrossSection(G4ParticleDefinition *aParticleDefinition, G4double k, G4double energyTransfer, G4int shell)
virtual G4double CrossSectionPerVolume(const G4Material *material, const G4ParticleDefinition *p, G4double ekin, G4double emin, G4double emax)
double G4double
Definition: G4Types.hh:76