Back to home page

EIC code displayed by LXR

 
 

    


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

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:    7 March 2013
0028 //
0029 // Description: Singleton class to evaluate multi-body momentum distribution
0030 //      functions based on initial state codes and multiplicity.
0031 //
0032 // NOTE:  Separate multiplicity-3 generators are not used, per V.Uzhinsky
0033 //
0034 // 20130619  Change singleton instance to be thread-local, to avoid collisions.
0035 // 20130620  Address Coverity warnings about missing copy actions
0036 
0037 #ifndef G4MultiBodyMomentumDist_h
0038 #define G4MultiBodyMomentumDist_h 1
0039 
0040 #include "globals.hh"
0041 
0042 class G4VMultiBodyMomDst;
0043 class G4NuclNucl3BodyMomDst;
0044 class G4NuclNucl4BodyMomDst;
0045 class G4HadNucl3BodyMomDst;
0046 class G4HadNucl4BodyMomDst;
0047 
0048 
0049 class G4MultiBodyMomentumDist {
0050 public:
0051   ~G4MultiBodyMomentumDist();
0052 
0053   static const G4MultiBodyMomentumDist* GetInstance();
0054 
0055   // Return appropriate generator for initial state and multiplicity
0056   static const G4VMultiBodyMomDst* GetDist(G4int is, G4int mult) {
0057     return GetInstance()->ChooseDist(is, mult);
0058   }
0059 
0060   // Pass verbosity through to owned objects
0061   static void setVerboseLevel(G4int vb=0);
0062 
0063 private:
0064   // Constructor is private for singleton
0065   G4MultiBodyMomentumDist();
0066   const G4VMultiBodyMomDst* ChooseDist(G4int is, G4int mult) const;
0067 
0068   void passVerbose(G4int verbose);  // Pass verbosity through instance
0069 
0070   static G4ThreadLocal G4MultiBodyMomentumDist* theInstance;    // Per thread
0071 
0072   // Generators for various initial/final state combinations
0073   G4NuclNucl3BodyMomDst* nn3BodyDst;    // N N to X Y Z
0074   G4NuclNucl4BodyMomDst* nn4BodyDst;    // N N to X Y Z W ...
0075   G4HadNucl3BodyMomDst*  hn3BodyDst;    // pi,K,Y,gamma N to X Y Z
0076   G4HadNucl4BodyMomDst*  hn4BodyDst;    // pi,K,Y,gamma N to X Y Z W ...
0077 
0078 private:
0079   // Copying of modules is forbidden
0080   G4MultiBodyMomentumDist(const G4MultiBodyMomentumDist&);
0081   G4MultiBodyMomentumDist& operator=(const G4MultiBodyMomentumDist&);
0082 };
0083 
0084 #endif  /* G4MultiBodyMomentumDist_h */