source: trunk/source/processes/hadronic/models/cascade/cascade/include/G4CascadeFunctions.hh @ 1315

Last change on this file since 1315 was 1315, checked in by garnier, 14 years ago

update geant4-09-04-beta-cand-01 interfaces-V09-03-09 vis-V09-03-08

File size: 3.2 KB
Line 
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// $Id: G4CascadeFunctions.hh,v 1.5 2010/05/14 21:05:03 mkelsey Exp $
26// GEANT4 tag: $Name: geant4-09-04-beta-cand-01 $
27//
28// 20100407  M. Kelsey -- Return particle types std::vector<> by const ref,
29//              using a static variable in the function as a buffer.
30// 20100505  M. Kelsey -- Use new interpolator class, drop std::pair<>, move
31//              sampleFlat(...) from G4CascadeChannel, move functionality
32//              to new base class, to allow data-member buffers.  Move
33//              function definitions to .icc file (needed with templating).
34// 20100510  M. Kelsey -- Use both summed and inclusive cross-sections for
35//              multiplicity, as done in G4{Pion,Nucleon}Sampler.  Support
36//              up to 9-body final states.  Add second argument specifying
37//              which Sampler is used.  Move implementations to .icc file.
38// 20100511  M. Kelsey -- Pass "kinds" buffer as input to getOutputPartTypes
39
40#ifndef G4_CASCADE_FUNCTIONS_HH
41#define G4_CASCADE_FUNCTIONS_HH
42
43#include "globals.hh"
44#include "Randomize.hh"
45#include <vector>
46
47
48template <class DATA, class SAMP>
49class G4CascadeFunctions : public SAMP {
50public:
51  static G4double getCrossSection(double ke) {
52    return instance.findCrossSection(ke, DATA::data.tot);
53  }
54
55  static G4double getCrossSectionSum(double ke) {
56    return instance.findCrossSection(ke, DATA::data.sum);
57  }
58
59  static G4int getMultiplicity(G4double ke);
60
61  static void
62  getOutgoingParticleTypes(std::vector<G4int>& kinds, G4int mult, G4double ke);
63
64private:
65  G4CascadeFunctions() : SAMP() {}
66  static const G4CascadeFunctions<DATA,SAMP> instance;
67};
68
69#include "G4CascadeFunctions.icc"
70
71#endif  /* G4_CASCADE_FUNCTIONS_HH */
Note: See TracBrowser for help on using the repository browser.