Geant4.10
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
G4DNABornIonisationModel.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: G4DNABornIonisationModel.hh 70823 2013-06-06 08:26:50Z gcosmo $
27 //
28 
29 #ifndef G4DNABornIonisationModel_h
30 #define G4DNABornIonisationModel_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 
56  virtual ~G4DNABornIonisationModel();
57 
58  virtual void Initialise(const G4ParticleDefinition*, const G4DataVector& = *(new G4DataVector()));
59 
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 
72  double DifferentialCrossSection(G4ParticleDefinition * aParticleDefinition, G4double k, G4double energyTransfer, G4int shell);
73 
74  inline void SelectFasterComputation(G4bool input);
75 
76 protected:
77 
79 
80 private:
81 
82  G4bool fasterCode;
83 
84  // Water density table
85  const std::vector<G4double>* fpMolWaterDensity;
86 
87  // Deexcitation manager to produce fluo photons and e-
88  G4VAtomDeexcitation* fAtomDeexcitation;
89 
90  std::map<G4String,G4double,std::less<G4String> > lowEnergyLimit;
91  std::map<G4String,G4double,std::less<G4String> > highEnergyLimit;
92 
93  G4bool isInitialised;
94  G4int verboseLevel;
95 
96  // Cross section
97 
98  typedef std::map<G4String,G4String,std::less<G4String> > MapFile;
99  MapFile tableFile;
100 
101  typedef std::map<G4String,G4DNACrossSectionDataSet*,std::less<G4String> > MapData;
102  MapData tableData;
103 
104  // Final state
105 
106  G4DNAWaterIonisationStructure waterStructure;
107 
108  G4double RandomizeEjectedElectronEnergy(G4ParticleDefinition * aParticleDefinition, G4double incomingParticleEnergy, G4int shell) ;
109 
110  G4double RandomizeEjectedElectronEnergyFromCumulatedDcs(G4ParticleDefinition * aParticleDefinition, G4double incomingParticleEnergy, G4int shell) ;
111 
112  G4double RandomTransferedEnergy(G4ParticleDefinition * aParticleDefinition, G4double incomingParticleEnergy, G4int shell) ;
113 
114  void RandomizeEjectedElectronDirection(G4ParticleDefinition * aParticleDefinition, G4double incomingParticleEnergy, G4double
115  outgoingParticleEnergy, G4double & cosTheta, G4double & phi );
116 
117  G4double Interpolate(G4double e1, G4double e2, G4double e, G4double xs1, G4double xs2);
118 
119  G4double QuadInterpolator( G4double e11,
120  G4double e12,
121  G4double e21,
122  G4double e22,
123  G4double x11,
124  G4double x12,
125  G4double x21,
126  G4double x22,
127  G4double t1,
128  G4double t2,
129  G4double t,
130  G4double e);
131 
132  typedef std::map<double, std::map<double, double> > TriDimensionMap;
133 
134  TriDimensionMap eDiffCrossSectionData[6];
135  TriDimensionMap eNrjTransfData[6]; // for cumulated dcs
136 
137  TriDimensionMap pDiffCrossSectionData[6];
138  TriDimensionMap pNrjTransfData[6]; // for cumulated dcs
139 
140  std::vector<double> eTdummyVec;
141  std::vector<double> pTdummyVec;
142 
143  typedef std::map<double, std::vector<double> > VecMap;
144 
145  VecMap eVecm;
146  VecMap pVecm;
147 
148  VecMap eProbaShellMap[6]; // for cumulated dcs
149  VecMap pProbaShellMap[6]; // for cumulated dcs
150 
151  // Partial cross section
152 
153  G4int RandomSelect(G4double energy,const G4String& particle );
154 
155  //
156 
159 
160 };
161 
163 {
164  fasterCode = input;
165 }
166 
167 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
168 
169 #endif
virtual void SampleSecondaries(std::vector< G4DynamicParticle * > *, const G4MaterialCutsCouple *, const G4DynamicParticle *, G4double tmin, G4double maxEnergy)
const char * p
Definition: xmltok.h:285
virtual G4double CrossSectionPerVolume(const G4Material *material, const G4ParticleDefinition *p, G4double ekin, G4double emin, G4double emax)
int G4int
Definition: G4Types.hh:78
string material
Definition: eplot.py:19
double precision function energy(A, Z)
Definition: dpm25nuc6.f:4106
bool G4bool
Definition: G4Types.hh:79
G4DNABornIonisationModel(const G4ParticleDefinition *p=0, const G4String &nam="DNABornIonisationModel")
tuple t1
Definition: plottest35.py:33
void SelectFasterComputation(G4bool input)
G4ParticleChangeForGamma * fParticleChangeForGamma
double DifferentialCrossSection(G4ParticleDefinition *aParticleDefinition, G4double k, G4double energyTransfer, G4int shell)
double G4double
Definition: G4Types.hh:76
virtual void Initialise(const G4ParticleDefinition *, const G4DataVector &=*(new G4DataVector()))