Geant4  10.02.p02
G4PenelopeSamplingData.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: G4PenelopeSamplingData.hh 66241 2012-12-13 18:34:42Z gunter $
27 //
28 // Author: Luciano Pandola
29 //
30 // History:
31 // -----------
32 // 09 Dec 2009 L. Pandola 1st implementation.
33 //
34 // -------------------------------------------------------------------
35 //
36 // Class description:
37 // This is a container of data that are used for sampling algorithm
38 // of Penelope08 Rayleigh scattering
39 // -------------------------------------------------------------------
40 
41 #ifndef G4PENELOPESAMPLINGDATA_HH
42 #define G4PENELOPESAMPLINGDATA_HH 1
43 
44 #include "globals.hh"
45 #include "G4DataVector.hh"
46 //
47 //This is a container of data that are used for sampling algoritm
48 //
50 {
51 
52 public:
53  G4PenelopeSamplingData(G4int npoints=150);
55 
56  void AddPoint(G4double x0,G4double pac0,G4double a0,G4double b0,size_t ITTL0,
57  size_t ITTU0);
58  size_t GetNumberOfStoredPoints();
59  void Clear();
60  void DumpTable();
61 
62  G4double GetX(size_t index);
63  G4double GetPAC(size_t index);
64  G4double GetA(size_t index);
65  G4double GetB(size_t index);
66 
68 
69 private:
72 
73  //G4double xlow;
74  //G4double xhigh;
75 
76  G4DataVector* x; //grid points, in increasing order
77  G4DataVector* pac; //value of the cumulative pdf at x_i
78  G4DataVector* a; // rational inverse cumulative inverse distribution parameters
80 
81  std::vector<size_t> *ITTL; //largest j for which pac(j) < (i-1)/(np-1)
82  std::vector<size_t> *ITTU; //smallest k for which pac(k) > i/(np-1)
83 
84  G4int np; //number of grid points
85 
86 
87 
88 };
89 
90 #endif
91 
const G4double a0
std::vector< size_t > * ITTL
G4double GetB(size_t index)
G4double GetPAC(size_t index)
G4PenelopeSamplingData & operator=(const G4PenelopeSamplingData &right)
int G4int
Definition: G4Types.hh:78
G4double SampleValue(G4double rndm)
G4double GetA(size_t index)
G4double GetX(size_t index)
double G4double
Definition: G4Types.hh:76
void AddPoint(G4double x0, G4double pac0, G4double a0, G4double b0, size_t ITTL0, size_t ITTU0)
G4PenelopeSamplingData(G4int npoints=150)
static const G4double b0
std::vector< size_t > * ITTU