G4PenelopeSamplingData.hh

Go to the documentation of this file.
00001 //
00002 // ********************************************************************
00003 // * License and Disclaimer                                           *
00004 // *                                                                  *
00005 // * The  Geant4 software  is  copyright of the Copyright Holders  of *
00006 // * the Geant4 Collaboration.  It is provided  under  the terms  and *
00007 // * conditions of the Geant4 Software License,  included in the file *
00008 // * LICENSE and available at  http://cern.ch/geant4/license .  These *
00009 // * include a list of copyright holders.                             *
00010 // *                                                                  *
00011 // * Neither the authors of this software system, nor their employing *
00012 // * institutes,nor the agencies providing financial support for this *
00013 // * work  make  any representation or  warranty, express or implied, *
00014 // * regarding  this  software system or assume any liability for its *
00015 // * use.  Please see the license in the file  LICENSE  and URL above *
00016 // * for the full disclaimer and the limitation of liability.         *
00017 // *                                                                  *
00018 // * This  code  implementation is the result of  the  scientific and *
00019 // * technical work of the GEANT4 collaboration.                      *
00020 // * By using,  copying,  modifying or  distributing the software (or *
00021 // * any work based  on the software)  you  agree  to acknowledge its *
00022 // * use  in  resulting  scientific  publications,  and indicate your *
00023 // * acceptance of all terms of the Geant4 Software license.          *
00024 // ********************************************************************
00025 //
00026 // $Id$
00027 //
00028 // Author: Luciano Pandola
00029 //
00030 // History:
00031 // -----------
00032 // 09 Dec 2009   L. Pandola   1st implementation. 
00033 //
00034 // -------------------------------------------------------------------
00035 //
00036 // Class description:
00037 // This is a container of data that are used for sampling algorithm
00038 // of Penelope08 Rayleigh scattering
00039 // -------------------------------------------------------------------
00040 
00041 #ifndef G4PENELOPESAMPLINGDATA_HH
00042 #define G4PENELOPESAMPLINGDATA_HH 1
00043 
00044 #include "globals.hh"
00045 #include "G4DataVector.hh"
00046 //
00047 //This is a container of data that are used for sampling algoritm
00048 //
00049 class G4PenelopeSamplingData
00050 {
00051 
00052 public:
00053   G4PenelopeSamplingData(G4int npoints=150);
00054   ~G4PenelopeSamplingData();
00055 
00056   void AddPoint(G4double x0,G4double pac0,G4double a0,G4double b0,size_t ITTL0,
00057                 size_t ITTU0);
00058   size_t GetNumberOfStoredPoints();
00059   void Clear();
00060   void DumpTable();
00061   
00062   G4double GetX(size_t index);
00063   G4double GetPAC(size_t index);
00064   G4double GetA(size_t index);
00065   G4double GetB(size_t index);
00066 
00067   G4double SampleValue(G4double rndm);
00068 
00069 private:
00070   G4PenelopeSamplingData & operator=(const G4PenelopeSamplingData &right);
00071   G4PenelopeSamplingData(const G4PenelopeSamplingData&);
00072   
00073   //G4double xlow;
00074   //G4double xhigh;
00075   
00076   G4DataVector* x; //grid points, in increasing order
00077   G4DataVector* pac; //value of the cumulative pdf at x_i
00078   G4DataVector* a; // rational inverse cumulative inverse distribution parameters
00079   G4DataVector* b;
00080   
00081   std::vector<size_t> *ITTL; //largest j for which pac(j) < (i-1)/(np-1)
00082   std::vector<size_t> *ITTU; //smallest k for which pac(k) > i/(np-1)
00083 
00084   G4int np; //number of grid points
00085 
00086   
00087 
00088 };
00089 
00090 #endif
00091 

Generated on Mon May 27 17:49:18 2013 for Geant4 by  doxygen 1.4.7