G4CascadeFunctions.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 // 20100407  M. Kelsey -- Return particle types std::vector<> by const ref,
00029 //              using a static variable in the function as a buffer.
00030 // 20100505  M. Kelsey -- Use new interpolator class, drop std::pair<>, move
00031 //              sampleFlat(...) from G4CascadeChannel, move functionality
00032 //              to new base class, to allow data-member buffers.  Move
00033 //              function definitions to .icc file (needed with templating).
00034 // 20100510  M. Kelsey -- Use both summed and inclusive cross-sections for
00035 //              multiplicity, as done in G4{Pion,Nucleon}Sampler.  Support
00036 //              up to 9-body final states.  Add second argument specifying
00037 //              which Sampler is used.  Move implementations to .icc file.
00038 // 20100511  M. Kelsey -- Pass "kinds" buffer as input to getOutputPartTypes
00039 // 20100803  M. Kelsey -- Add printing function for debugging
00040 // 20110719  M. Kelsey -- Add inheritance from non-template base for factory,
00041 //              change static's to virtual (no more direct access)
00042 // 20110725  M. Kelsey -- Move ctor to .icc file for registration in lookup
00043 // 20110923  M. Kelsey -- Add optional ostream& argument to printTable()
00044 
00045 #ifndef G4_CASCADE_FUNCTIONS_HH
00046 #define G4_CASCADE_FUNCTIONS_HH
00047 
00048 #include "G4CascadeChannel.hh"
00049 #include "globals.hh"
00050 #include "Randomize.hh"
00051 #include <vector>
00052 
00053 
00054 template <class DATA, class SAMP>
00055 class G4CascadeFunctions : public G4CascadeChannel, public SAMP {
00056 public:
00057   G4CascadeFunctions();
00058   virtual ~G4CascadeFunctions() {}
00059 
00060   virtual G4double getCrossSection(double ke) const {
00061     return this->findCrossSection(ke, DATA::data.tot);
00062   }
00063 
00064   virtual G4double getCrossSectionSum(double ke) const {
00065     return this->findCrossSection(ke, DATA::data.sum);
00066   }
00067 
00068   virtual G4int getMultiplicity(G4double ke) const;
00069 
00070   virtual void getOutgoingParticleTypes(std::vector<G4int>& kinds,
00071                                        G4int mult, G4double ke) const;
00072 
00073   virtual void printTable(std::ostream& os=G4cout) const;
00074 };
00075 
00076 #include "G4CascadeFunctions.icc"
00077 
00078 #endif  /* G4_CASCADE_FUNCTIONS_HH */

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