Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:59:15

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 // Author:  Michael Kelsey (SLAC)
0027 // Date:    21 February 2013
0028 //
0029 // Description: Singleton class to evaluate two-body angular distribution
0030 //      functions based on initial/final state codes.
0031 //
0032 // 20130307  M. Kelsey -- Add verbosity interface for contained objects
0033 // 20130422  M. Kelsey -- Add three-body distributions, for temporary use
0034 // 20130619  Change singleton instance to be thread-local, to avoid collisions.
0035 // 20130620  Address Coverity warnings about missing copy actions
0036 
0037 #ifndef G4TwoBodyAngularDist_h
0038 #define G4TwoBodyAngularDist_h 1
0039 
0040 #include "globals.hh"
0041 
0042 class G4VTwoBodyAngDst;
0043 class G4GamP2NPipAngDst;
0044 class G4GamP2PPi0AngDst;
0045 class G4PP2PPAngDst;
0046 class G4NP2NPAngDst;
0047 class G4NuclNuclAngDst;
0048 class G4Pi0P2Pi0PAngDst;
0049 class G4PimP2Pi0NAngDst;
0050 class G4PimP2PimPAngDst;
0051 class G4PipP2PipPAngDst;
0052 class G4PiNInelasticAngDst;
0053 class G4HadNElastic1AngDst;
0054 class G4HadNElastic2AngDst;
0055 class G4GammaNuclAngDst;
0056 
0057 class G4HadNucl3BodyAngDst; // TEMPORARY, until migration to GENBOD
0058 class G4NuclNucl3BodyAngDst;
0059 
0060 
0061 class G4TwoBodyAngularDist {
0062 public:
0063   ~G4TwoBodyAngularDist();
0064 
0065   static const G4TwoBodyAngularDist* GetInstance();
0066 
0067   // Return appropriate generator for initial, final state, and kw flag
0068   static const G4VTwoBodyAngDst* GetDist(G4int is, G4int fs, G4int kw) {
0069     return GetInstance()->ChooseDist(is,fs,kw);
0070   }
0071 
0072   static const G4VTwoBodyAngDst* GetDist(G4int is) {
0073     return GetInstance()->ChooseDist(is,0,0);
0074   }
0075 
0076   // Pass verbosity through to owned objects
0077   static void setVerboseLevel(G4int vb=0);
0078 
0079 private:
0080   // Constructor is private for singleton
0081   G4TwoBodyAngularDist();
0082   const G4VTwoBodyAngDst* ChooseDist(G4int is, G4int fs, G4int kw) const;
0083 
0084   void passVerbose(G4int verbose);
0085 
0086   static G4ThreadLocal G4TwoBodyAngularDist* theInstance;   // Per thread
0087 
0088   // Generators for various initial/final state combinations
0089   G4GamP2NPipAngDst* gp_npip;       // gamma p -> n pi+
0090   G4GamP2PPi0AngDst* gp_ppi0;       // gamma p -> p pi0
0091   G4PP2PPAngDst* ppAngDst;              // pp, nn elastic
0092   G4NP2NPAngDst* npAngDst;              // np and pn elastic
0093   G4NuclNuclAngDst* nnAngDst;       // Y N elastic and inelastic
0094   G4Pi0P2Pi0PAngDst* pi0pAngDst;        // pi0 p, pi0 n elastic
0095   G4PimP2Pi0NAngDst* pipCXAngDst;       // pi- p, pi+ n, pi0 p, pi0 n charge exchange
0096   G4PimP2PimPAngDst* pimpAngDst;        // pi- p, pi+ n elastic
0097   G4PipP2PipPAngDst* pippAngDst;        // pi+ p, pi- n elastic
0098 
0099   G4PiNInelasticAngDst* qxAngDst;   // pi N charge/strangeness exchange
0100   G4HadNElastic1AngDst* hn1AngDst;  // pi+p and related elastic scattering
0101   G4HadNElastic2AngDst* hn2AngDst;  // pi-p and related elastic scattering
0102   G4GammaNuclAngDst* gnAngDst;      // gamma N inelastic
0103 
0104   // TEMPORARY generators for three-body final states
0105   G4HadNucl3BodyAngDst* hn3BodyDst; // (pi,K,Y,g) N -> XYZ scattering
0106   G4NuclNucl3BodyAngDst* nn3BodyDst;    // N N -> XYZ scattering
0107 
0108 private:
0109   // Copying of modules is forbidden
0110   G4TwoBodyAngularDist(const G4TwoBodyAngularDist&);
0111   G4TwoBodyAngularDist& operator=(const G4TwoBodyAngularDist&);
0112 };
0113 
0114 #endif  /* G4TwoBodyAngularDist_h */