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