ECCE @ EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
G4CRMCModel.hh
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file G4CRMCModel.hh
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 // * *
21 // * Parts of this code which have been developed by Abdel-Waged *
22 // * et al under contract (31-465) to the King Abdul-Aziz City for *
23 // * Science and Technology (KACST), the National Centre of *
24 // * Mathematics and Physics (NCMP), Saudi Arabia. *
25 // * *
26 // * By using, copying, modifying or distributing the software (or *
27 // * any work based on the software) you agree to acknowledge its *
28 // * use in resulting scientific publications, and indicate your *
29 // * acceptance of all terms of the Geant4 Software license. *
30 // ********************************************************************
31 //
34 //
35 //---------------------------------------------------------------------------
36 //
37 // ClassName: G4CRMCModel
38 //
39 // Author: 2018 Alberto Ribon
40 //
41 // Geant4 wrapper hadronic model around CRMC.
42 // By changing a single number (model) it is possible to use one of the
43 // following 4 CRMC generators: 0 : EPOS LHC
44 // 1 : EPOS 1.99
45 // 6 : SIBYLL 2.3c
46 // 12 : DPMJET 3
47 //
48 // We are pleased to acknowledge the contribution of Andrii Tykhonov
49 // (Universite' de Geneve, and member of the DAMPE Collaboration)
50 // who made the first prototype interface between Geant4 and CRMC,
51 // and shared his expertise and implementation with us.
52 //
53 // Modified:
54 //
55 //----------------------------------------------------------------------------
56 //
57 #ifndef G4CRMCModel_hh
58 #define G4CRMCModel_hh
59 
60 #include "G4Nucleus.hh"
61 #include "G4HadronicInteraction.hh"
62 #include "G4HadFinalState.hh"
63 
64 #include <fstream>
65 #include <string>
66 
67 class G4IonTable;
68 
69 #ifdef G4_USE_CRMC
70  #include "CRMCinterface.h"
71  extern CRMCdata gCRMC_data;
72 #else
73  class CRMCinterface;
74 #endif
75 
76 
78  public:
79  // ***LOOKHERE*** Select default model:
80  // EPOS LHC (0), EPOS 1.99 (1), SIBYLL 2.3c (6), DPMJET 3 (12)
81  G4CRMCModel( const G4int model = 0 );
82  virtual ~G4CRMCModel ();
83  G4HadFinalState* ApplyYourself( const G4HadProjectile &theProjectile, G4Nucleus &theNucleus );
84  G4ParticleDefinition* GetParticleDefinition( long particle_id );
85 
86  // The following virtual method can be used to override the default check levels
87  // (relative energy violation value of 2% and absolute energy violation value of 1 GeV)
88  // used to check (by the hadronic process, in the method G4HadronicProcess::CheckResult)
89  // whether the (inelastic) final state is acceptable or not in terms of energy
90  // conservation. If it is not, then the final-state is rejected, a "JustWarning"
91  // exception is thrown, and another attempt is done to find an acceptable final-state.
92  // Only in the case of 100 consecutive failed attempts, the program crashes.
93  // In the case of EPOS-LHC, there are some cases of final-states that are rejected
94  // because they do not pass the default energy conservation. The number of these
95  // cases is relatively low and harmless (because these final-states are rejected),
96  // therefore we suggest to keep using the default. If you want instead to keep
97  // more final-states, i.e. be more tolerant on the energy violations, then uncomment
98  // the following line and its implementation (in the source file).
99  //virtual const std::pair< G4double, G4double > GetFatalEnergyCheckLevels() const;
100 
101  private:
103  G4bool operator!=( G4CRMCModel& right );
104  void WelcomeMessage () const;
109  CRMCinterface* fInterface;
112 };
113 
114 #endif
115