Geant4.10
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
G4AdjointCSMatrix.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: G4AdjointCSMatrix.hh 66892 2013-01-17 10:57:59Z gunter $
27 //
28 /////////////////////////////////////////////////////////////////////////////////
29 // Class: G4AdjointCSMatrix.hh
30 // Author: L. Desorgher
31 // Organisation: SpaceIT GmbH
32 // Contract: ESA contract 21435/08/NL/AT
33 // Customer: ESA/ESTEC
34 /////////////////////////////////////////////////////////////////////////////////
35 //
36 // CHANGE HISTORY
37 // --------------
38 // ChangeHistory:
39 // 1st April 2007 creation by L. Desorgher
40 //
41 //-------------------------------------------------------------
42 // Documentation:
43 // An adjoint CS matrix is used by the model of a reverse process to sample an adjoint secondary (being equivalent to a forward primary).
44 // It represents the integration over the energy of the adjoint secondary (therefore the forward primary) of the differential cross section
45 // of the equiavlent forward discrete process (Ionisation, Brem, PE effect, Compton,..) . Each reverse model has its own cross section matrix for a given cut,
46 // material couple. It is therefore recompute after a modification of the cuts by the user.
47 //
48 //
49 //
50 
51 #ifndef G4AdjointCSMatrix_h
52 #define G4AdjointCSMatrix_h 1
53 
54 #include"globals.hh"
55 #include<vector>
57 
58 ////////////////////////////////////////////////////////////////////////////////
59 //
61 {
62  ////////////////////////////////
63  // Constructors and Destructor
64  ////////////////////////////////
65 public:
68 
69  //////////////
70  // Methods //
71  //////////////
72  void Clear();
73  void AddData(G4double aPrimEnergy,G4double aCS, std::vector< double>* aLogSecondEnergyVector,
74  std::vector< double>* aLogProbVector,size_t n_pro_decade=0);
75 
76  G4bool GetData(unsigned int i, G4double& aPrimEnergy,G4double& aCS,G4double& log0, std::vector< double>*& aLogSecondEnergyVector,
77  std::vector< double>*& aLogProbVector,
78  std::vector< size_t>*& aLogProbVectorIndex);
79 
80  inline std::vector< double>* GetLogPrimEnergyVector(){return &theLogPrimEnergyVector;}
81  inline std::vector< double>* GetLogCrossSectionvector(){return &theLogCrossSectionVector;}
82  inline G4double GetDlog(){return dlog;}
83  inline G4bool IsScatProjToProjCase(){return is_scat_proj_to_proj_case;}
84  void Write(G4String file_name);
85  void Read(G4String file_name);
86 
87 private:
88 
89  // we did first try to use G4PhysicsOrderedVector but they are not general enough for our purpose
90 
91  std::vector< double> theLogPrimEnergyVector;
92  std::vector< double> theLogCrossSectionVector; //Adjoint Cross sections in function of primary energy
93  std::vector< std::vector< double>* > theLogSecondEnergyMatrix;
94  std::vector< std::vector< double>* > theLogProbMatrix; //Each column represents the integrated probability of getting a secondary
95  // in function of their energy
96  std::vector< std::vector< size_t >* > theLogProbMatrixIndex; //index of equidistant LogProb
97  std::vector< double> log0Vector;
98 
99  unsigned int nb_of_PrimEnergy;
100  G4bool is_scat_proj_to_proj_case;
101  G4double dlog;
102 
103 
104 };
105 #endif
G4bool GetData(unsigned int i, G4double &aPrimEnergy, G4double &aCS, G4double &log0, std::vector< double > *&aLogSecondEnergyVector, std::vector< double > *&aLogProbVector, std::vector< size_t > *&aLogProbVectorIndex)
void Read(G4String file_name)
void AddData(G4double aPrimEnergy, G4double aCS, std::vector< double > *aLogSecondEnergyVector, std::vector< double > *aLogProbVector, size_t n_pro_decade=0)
bool G4bool
Definition: G4Types.hh:79
std::vector< double > * GetLogPrimEnergyVector()
std::vector< double > * GetLogCrossSectionvector()
G4AdjointCSMatrix(G4bool aBool)
void Write(G4String file_name)
double G4double
Definition: G4Types.hh:76