|
||||
File indexing completed on 2025-01-18 09:58:54
0001 // 0002 // ******************************************************************** 0003 // * License and Disclaimer * 0004 // * * 0005 // * The Geant4 software is copyright of the Copyright Holders of * 0006 // * the Geant4 Collaboration. It is provided under the terms and * 0007 // * conditions of the Geant4 Software License, included in the file * 0008 // * LICENSE and available at http://cern.ch/geant4/license . These * 0009 // * include a list of copyright holders. * 0010 // * * 0011 // * Neither the authors of this software system, nor their employing * 0012 // * institutes,nor the agencies providing financial support for this * 0013 // * work make any representation or warranty, express or implied, * 0014 // * regarding this software system or assume any liability for its * 0015 // * use. Please see the license in the file LICENSE and URL above * 0016 // * for the full disclaimer and the limitation of liability. * 0017 // * * 0018 // * This code implementation is the result of the scientific and * 0019 // * technical work of the GEANT4 collaboration. * 0020 // * By using, copying, modifying or distributing the software (or * 0021 // * any work based on the software) you agree to acknowledge its * 0022 // * use in resulting scientific publications, and indicate your * 0023 // * acceptance of all terms of the Geant4 Software license. * 0024 // ******************************************************************** 0025 // 0026 // 0027 // Author: Luciano Pandola 0028 // 0029 // History: 0030 // ----------- 0031 // 09 Dec 2009 L. Pandola 1st implementation. 0032 // 0033 // ------------------------------------------------------------------- 0034 // 0035 // Class description: 0036 // This is a container of data that are used for sampling algorithm 0037 // of Penelope08 Rayleigh scattering 0038 // ------------------------------------------------------------------- 0039 0040 #ifndef G4PENELOPESAMPLINGDATA_HH 0041 #define G4PENELOPESAMPLINGDATA_HH 1 0042 0043 #include "globals.hh" 0044 #include "G4DataVector.hh" 0045 // 0046 //This is a container of data that are used for sampling algoritm 0047 // 0048 class G4PenelopeSamplingData 0049 { 0050 public: 0051 explicit G4PenelopeSamplingData(G4int npoints=150); 0052 ~G4PenelopeSamplingData(); 0053 0054 void AddPoint(G4double x0,G4double pac0,G4double a0,G4double b0,size_t ITTL0, 0055 size_t ITTU0); 0056 size_t GetNumberOfStoredPoints(); 0057 void Clear(); 0058 void DumpTable(); 0059 0060 G4double GetX(size_t index); 0061 G4double GetPAC(size_t index); 0062 G4double GetA(size_t index); 0063 G4double GetB(size_t index); 0064 0065 G4double SampleValue(G4double rndm); 0066 0067 G4PenelopeSamplingData & operator=(const G4PenelopeSamplingData &right) = delete; 0068 G4PenelopeSamplingData(const G4PenelopeSamplingData&) = delete; 0069 0070 private: 0071 G4DataVector* fX; //grid points, in increasing order 0072 G4DataVector* fPAC; //value of the cumulative pdf at x_i 0073 G4DataVector* fA; // rational inverse cumulative inverse distribution parameters 0074 G4DataVector* fB; 0075 0076 std::vector<size_t> *fITTL; //largest j for which pac(j) < (i-1)/(np-1) 0077 std::vector<size_t> *fITTU; //smallest k for which pac(k) > i/(np-1) 0078 0079 G4int fNP; //number of grid points 0080 }; 0081 0082 #endif 0083
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |