Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:58:00

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 // 20100407  M. Kelsey -- Return particle types std::vector<> by const ref,
0028 //      using a static variable in the function as a buffer.
0029 // 20100505  M. Kelsey -- Use new interpolator class, drop std::pair<>, move
0030 //      sampleFlat(...) from G4CascadeChannel, move functionality
0031 //      to new base class, to allow data-member buffers.  Move
0032 //      function definitions to .icc file (needed with templating).
0033 // 20100510  M. Kelsey -- Use both summed and inclusive cross-sections for
0034 //      multiplicity, as done in G4{Pion,Nucleon}Sampler.  Support
0035 //      up to 9-body final states.  Add second argument specifying
0036 //      which Sampler is used.  Move implementations to .icc file.
0037 // 20100511  M. Kelsey -- Pass "kinds" buffer as input to getOutputPartTypes
0038 // 20100803  M. Kelsey -- Add printing function for debugging
0039 // 20110719  M. Kelsey -- Add inheritance from non-template base for factory,
0040 //      change static's to virtual (no more direct access)
0041 // 20110725  M. Kelsey -- Move ctor to .icc file for registration in lookup
0042 // 20110923  M. Kelsey -- Add optional ostream& argument to printTable()
0043 
0044 #ifndef G4_CASCADE_FUNCTIONS_HH
0045 #define G4_CASCADE_FUNCTIONS_HH
0046 
0047 #include "G4CascadeChannel.hh"
0048 #include "globals.hh"
0049 #include "Randomize.hh"
0050 #include <vector>
0051 
0052 
0053 template <class DATA, class SAMP>
0054 class G4CascadeFunctions : public G4CascadeChannel, public SAMP {
0055 public:
0056   G4CascadeFunctions();
0057   virtual ~G4CascadeFunctions() {}
0058 
0059   virtual G4double getCrossSection(double ke) const {
0060     return this->findCrossSection(ke, DATA::data.tot);
0061   }
0062 
0063   virtual G4double getCrossSectionSum(double ke) const {
0064     return this->findCrossSection(ke, DATA::data.sum);
0065   }
0066 
0067   virtual G4int getMultiplicity(G4double ke) const;
0068 
0069   virtual void getOutgoingParticleTypes(std::vector<G4int>& kinds,
0070                        G4int mult, G4double ke) const;
0071 
0072   virtual void printTable(std::ostream& os=G4cout) const;
0073 };
0074 
0075 #include "G4CascadeFunctions.icc"
0076 
0077 #endif  /* G4_CASCADE_FUNCTIONS_HH */