Geant4  10.00.p02
G4TwoBodyAngularDist.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 // $Id: G4TwoBodyAngularDist.hh 71719 2013-06-21 00:01:54Z mkelsey $
27 // Author: Michael Kelsey (SLAC)
28 // Date: 21 February 2013
29 //
30 // Description: Singleton class to evaluate two-body angular distribution
31 // functions based on intial/final state codes.
32 //
33 // 20130307 M. Kelsey -- Add verbosity interface for contained objects
34 // 20130422 M. Kelsey -- Add three-body distributions, for temporary use
35 // 20130619 Change singleton instance to be thread-local, to avoid collisions.
36 // 20130620 Address Coverity warnings about missing copy actions
37 
38 #ifndef G4TwoBodyAngularDist_h
39 #define G4TwoBodyAngularDist_h 1
40 
41 #include "globals.hh"
42 
43 class G4VTwoBodyAngDst;
44 class G4GamP2NPipAngDst;
45 class G4GamP2PPi0AngDst;
46 class G4PP2PPAngDst;
47 class G4NP2NPAngDst;
48 class G4NuclNuclAngDst;
52 class G4GammaNuclAngDst;
53 
54 class G4HadNucl3BodyAngDst; // TEMPORARY, until migration to GENBOD
56 
57 
59 public:
61 
62  static const G4TwoBodyAngularDist* GetInstance();
63 
64  // Return appropriate generator for initial, final state, and kw flag
65  static const G4VTwoBodyAngDst* GetDist(G4int is, G4int fs, G4int kw) {
66  return GetInstance()->ChooseDist(is,fs,kw);
67  }
68 
69  static const G4VTwoBodyAngDst* GetDist(G4int is) {
70  return GetInstance()->ChooseDist(is,0,0);
71  }
72 
73  // Pass verbosity through to owned objects
74  static void setVerboseLevel(G4int vb=0);
75 
76 private:
77  // Constructor is private for singleton
79  const G4VTwoBodyAngDst* ChooseDist(G4int is, G4int fs, G4int kw) const;
80 
81  void passVerbose(G4int verbose);
82 
84 
85  // Generators for various initial/final state combinations
86  G4GamP2NPipAngDst* gp_npip; // gamma p -> n pi+
87  G4GamP2PPi0AngDst* gp_ppi0; // gamma p -> p pi0
88  G4PP2PPAngDst* ppAngDst; // pp, nn elastic
89  G4NP2NPAngDst* npAngDst; // np and pn elastic
90  G4NuclNuclAngDst* nnAngDst; // Y N elastic and inelastic
91  G4PiNInelasticAngDst* qxAngDst; // pi N charge/strangeness exchange
92  G4HadNElastic1AngDst* hn1AngDst; // pi+p and related elastic scattering
93  G4HadNElastic2AngDst* hn2AngDst; // pi-p and related elastic scattering
94  G4GammaNuclAngDst* gnAngDst; // gamma N inelastic
95 
96  // TEMPORARY generators for three-body final states
97  G4HadNucl3BodyAngDst* hn3BodyDst; // (pi,K,Y,g) N -> XYZ scattering
98  G4NuclNucl3BodyAngDst* nn3BodyDst; // N N -> XYZ scattering
99 
100 private:
101  // Copying of modules is forbidden
104 };
105 
106 #endif /* G4TwoBodyAngularDist_h */
static const G4VTwoBodyAngDst * GetDist(G4int is, G4int fs, G4int kw)
G4NuclNucl3BodyAngDst * nn3BodyDst
static const G4VTwoBodyAngDst * GetDist(G4int is)
static G4ThreadLocal G4TwoBodyAngularDist * theInstance
G4GamP2PPi0AngDst * gp_ppi0
G4PiNInelasticAngDst * qxAngDst
G4TwoBodyAngularDist & operator=(const G4TwoBodyAngularDist &)
static const G4TwoBodyAngularDist * GetInstance()
#define G4ThreadLocal
Definition: tls.hh:52
int G4int
Definition: G4Types.hh:78
G4HadNElastic2AngDst * hn2AngDst
G4NuclNuclAngDst * nnAngDst
G4GamP2NPipAngDst * gp_npip
const G4VTwoBodyAngDst * ChooseDist(G4int is, G4int fs, G4int kw) const
static void setVerboseLevel(G4int vb=0)
G4HadNElastic1AngDst * hn1AngDst
G4GammaNuclAngDst * gnAngDst
G4HadNucl3BodyAngDst * hn3BodyDst
void passVerbose(G4int verbose)