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4.p3 ] [ 10.5 ] [ 10.5.p1 ] [ 10.6 ] [ 10.6.p1 ] [ 10.6.p2 ] [ 10.6.p3 ] [ 10.7 ] [ 10.7.p1 ] [ 10.7.p2 ] [ 10.7.p3 ] [ 10.7.p4 ] [ 11.0 ] [ 11.0.p1 ] [ 11.0.p2 ] [ 11.0.p3, ] [ 11.0.p4 ] [ 11.1 ] [ 11.1.1 ] [ 11.1.2 ] [ 11.1.3 ] [ 11.2 ] [ 11.2.1 ] [ 11.2.2 ] [ 11.3.0 ]

  1 // ********************************************************************
  2 // * License and Disclaimer                                           *
  3 // *                                                                  *
  4 // * The  Geant4 software  is  copyright of the Copyright Holders  of *
  5 // * the Geant4 Collaboration.  It is provided  under  the terms  and *
  6 // * conditions of the Geant4 Software License,  included in the file *
  7 // * LICENSE and available at  http://cern.ch/geant4/license .  These *
  8 // * include a list of copyright holders.                             *
  9 // *                                                                  *
 10 // * Neither the authors of this software system, nor their employing *
 11 // * institutes,nor the agencies providing financial support for this *
 12 // * work  make  any representation or  warranty, express or implied, *
 13 // * regarding  this  software system or assume any liability for its *
 14 // * use.  Please see the license in the file  LICENSE  and URL above *
 15 // * for the full disclaimer and the limitation of liability.         *
 16 // *                                                                  *
 17 // * This  code  implementation is the result of  the  scientific and *
 18 // * technical work of the GEANT4 collaboration.                      *
 19 // * By using,  copying,  modifying or  distributing the software (or *
 20 // * any work based  on the software)  you  agree  to acknowledge its *
 21 // * use  in  resulting  scientific  publications,  and indicate your *
 22 // * acceptance of all terms of the Geant4 Software license.          *
 23 // ********************************************************************
 24 //
 25 /// \file hadronic/Hadr02/include/HadronicInelasticModelCRMC.hh
 26 /// \brief Definition of the HadronicInelasticModelCRMC class
 27 //
 28 //
 29 // ------------------------------------------------------------
 30 //
 31 //              CRMC interface to GEANT4
 32 //              for more details on CRMC, see:
 33 //              https://web.ikp.kit.edu/rulrich/crmc.html
 34 //
 35 //
 36 // Author:      Andrii Tykhonov  (University of Geneva)
 37 // Email:       andrii.tykhonov@cern.ch
 38 // Created:     14.02.2018
 39 //
 40 //
 41 // (
 42 //   A few, trivial modifications made by A. Ribon in May 2021
 43 //   in order to use it inside the Geant4 example Hadr02 :
 44 //   -  Copied here, instead of using the original class
 45 //      G4HadronicInelasticModelCRMC as it is distributed
 46 //      with crmc-svn-geant4, to avoid some problems with CMake
 47 //      which is unable to find the library libGeantCrmc.
 48 //   -  Renamed the class as HadronicInelasticModelCRMC,
 49 //      to follow the Geant4 convention that classes whose
 50 //      names start with "G4" are only those distributed in
 51 //      source/ .
 52 //   -  Fixed a few compilation warnings .
 53 //   -  Set the seed by hand, because the method
 54 //        CLHEP::HepRandom::getTheSeed()
 55 //      returns 0 which is not accepted.
 56 // )
 57 // ------------------------------------------------------------
 58 
 59 #ifndef HadronicInelasticModelCRMC_h
 60 #define HadronicInelasticModelCRMC_h
 61 
 62 #include "CRMCinterface.h"
 63 
 64 #include "G4HadFinalState.hh"
 65 #include "G4HadronicInteraction.hh"
 66 #include "G4SystemOfUnits.hh"
 67 
 68 #include <string>
 69 
 70 extern CRMCdata gCRMC_data;
 71 
 72 class G4HadFinalState;
 73 class G4ParticleTable;
 74 class G4IonTable;
 75 
 76 class G4ParticleDefinition;  // class G4DynamicParticle;
 77 
 78 class HadronicInelasticModelCRMC : public G4HadronicInteraction
 79 {
 80   public:
 81     //! model:
 82     //!         0  :  EPOS LHC
 83     //!         1  :  EPOS 1.99
 84     //!         12 :  DPMJET3
 85     HadronicInelasticModelCRMC(int model, const G4String& modelName);
 86     ~HadronicInelasticModelCRMC();
 87 
 88     G4HadFinalState* ApplyYourself(const G4HadProjectile& aTrack, G4Nucleus& targetNucleus);
 89     G4bool IsApplicable(const G4HadProjectile&, G4Nucleus&);
 90 
 91     void SetPrintDebug(bool printdebug) { fPrintDebug = printdebug; }
 92     G4ParticleDefinition* GetParticleDefinition(long particle_id, int& error_code);
 93     void SplitMultiNeutrons(CRMCdata& CRMC_data);
 94     bool IsMultiNeutron(int Z, int A);
 95 
 96     virtual const std::pair<G4double, G4double> GetFatalEnergyCheckLevels() const
 97     {
 98       // possible energy non-coservations of up to 1 TeV are ignored
 99       return std::pair<G4double, G4double>(10.0 * perCent, 1000.0 * GeV);
100     }
101 
102   private:
103     CRMCinterface* fInterface;
104     // CRMCdata fCRMCdata;
105     int fTypeOutput;
106     G4HadFinalState* finalState;
107     G4ParticleTable* fParticleTable;
108     G4IonTable* fIonTable;
109 
110     // std::vector<G4ParticleDefinition*> fParticleDefinitions;
111     // std::vector<G4DynamicParticle*>    fDynamicParticles;
112     bool fPrintDebug;
113 
114     //
115     std::string GetCrmcParamPath();
116 };
117 
118 #endif
119