Geant4-11
G4CascadeFunctions.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//
27// 20100407 M. Kelsey -- Return particle types std::vector<> by const ref,
28// using a static variable in the function as a buffer.
29// 20100505 M. Kelsey -- Use new interpolator class, drop std::pair<>, move
30// sampleFlat(...) from G4CascadeChannel, move functionality
31// to new base class, to allow data-member buffers. Move
32// function definitions to .icc file (needed with templating).
33// 20100510 M. Kelsey -- Use both summed and inclusive cross-sections for
34// multiplicity, as done in G4{Pion,Nucleon}Sampler. Support
35// up to 9-body final states. Add second argument specifying
36// which Sampler is used. Move implementations to .icc file.
37// 20100511 M. Kelsey -- Pass "kinds" buffer as input to getOutputPartTypes
38// 20100803 M. Kelsey -- Add printing function for debugging
39// 20110719 M. Kelsey -- Add inheritance from non-template base for factory,
40// change static's to virtual (no more direct access)
41// 20110725 M. Kelsey -- Move ctor to .icc file for registration in lookup
42// 20110923 M. Kelsey -- Add optional ostream& argument to printTable()
43
44#ifndef G4_CASCADE_FUNCTIONS_HH
45#define G4_CASCADE_FUNCTIONS_HH
46
47#include "G4CascadeChannel.hh"
48#include "globals.hh"
49#include "Randomize.hh"
50#include <vector>
51
52
53template <class DATA, class SAMP>
54class G4CascadeFunctions : public G4CascadeChannel, public SAMP {
55public:
58
59 virtual G4double getCrossSection(double ke) const {
60 return this->findCrossSection(ke, DATA::data.tot);
61 }
62
63 virtual G4double getCrossSectionSum(double ke) const {
64 return this->findCrossSection(ke, DATA::data.sum);
65 }
66
67 virtual G4int getMultiplicity(G4double ke) const;
68
69 virtual void getOutgoingParticleTypes(std::vector<G4int>& kinds,
70 G4int mult, G4double ke) const;
71
72 virtual void printTable(std::ostream& os=G4cout) const;
73};
74
76
77#endif /* G4_CASCADE_FUNCTIONS_HH */
double G4double
Definition: G4Types.hh:83
int G4int
Definition: G4Types.hh:85
G4GLOB_DLL std::ostream G4cout
virtual void printTable(std::ostream &os=G4cout) const
virtual G4double getCrossSectionSum(double ke) const
virtual G4int getMultiplicity(G4double ke) const
virtual G4double getCrossSection(double ke) const
virtual void getOutgoingParticleTypes(std::vector< G4int > &kinds, G4int mult, G4double ke) const