Geant4.10
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
IonDPMJETPhysics.cc
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 /// \file hadronic/Hadr02/src/IonDPMJETPhysics.cc
27 /// \brief Implementation of the IonDPMJETPhysics class
28 //
29 // $Id: IonABPhysics.cc,v 1.1 2006/10/28 16:00:25 vnivanch Exp $
30 // GRAS tag Name: gras-02-05-02
31 //
32 //---------------------------------------------------------------------------
33 //
34 // Class: IonDPMJETPhysics
35 //
36 // Author: A.Ivanchenko 26.08.2010
37 //
38 // This class was designed under ESA contracts
39 //
40 // Customer:
41 // Contract:
42 //
43 //
44 // Modified:
45 //
46 // ------------------------------------------------------------
47 //
48 
49 #include "IonDPMJETPhysics.hh"
50 #include "G4ParticleDefinition.hh"
51 #include "G4ProcessManager.hh"
52 #include "G4Deuteron.hh"
53 #include "G4Triton.hh"
54 #include "G4He3.hh"
55 #include "G4Alpha.hh"
56 #include "G4GenericIon.hh"
57 
64 
65 #include "G4BuilderType.hh"
66 
67 #ifdef G4_USE_DPMJET
68 #include "G4DPMJET2_5Model.hh"
69 #include "G4DPMJET2_5Interface.hh"
71 #endif
72 
73 #include "G4SystemOfUnits.hh"
74 
75 using namespace std;
76 
77 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
78 
79 #ifdef G4_USE_DPMJET
81  : G4VHadronPhysics("ionInelasticDPMJET"),fIonBC(0) ,fDPM(0),
82  fUseDPMJETXS(val)
83 #else
85  : G4VHadronPhysics("ionInelasticDPMJET"),fIonBC(0)
86 #endif
87 {
88  fTripathi = fTripathiLight = fShen = fIonH = 0;
89  SetPhysicsType(bIons);
90 }
91 
92 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
93 
95 {}
96 
97 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
98 
100 {
101  G4double emax = 1000.*TeV;
102 
103  fIonBC = new G4BinaryLightIonReaction();
104  fIonBC->SetMinEnergy(0.0);
105  fIonBC->SetMaxEnergy(6*GeV);
106 
107  fShen = new G4IonsShenCrossSection();
108  fTripathi = new G4TripathiCrossSection();
109  fTripathiLight = new G4TripathiLightCrossSection();
110  fIonH = new G4IonProtonCrossSection();
111 
112  fShen->SetMaxKinEnergy(emax);
113  fTripathi->SetMaxKinEnergy(emax);
114  fTripathiLight->SetMaxKinEnergy(emax);
115  fIonH->SetMaxKinEnergy(emax);
116 
117 #ifdef G4_USE_DPMJET
118  fDPM = new G4DPMJET2_5Model();
119  fDPM->SetMinEnergy(5*GeV);
120  fDPM->SetMaxEnergy(emax);
121  if(fUseDPMJETXS) { fDpmXS = new G4DPMJET2_5CrossSection; }
122 #endif
123 
124  AddProcess("dInelastic", G4Deuteron::Deuteron(),false);
125  AddProcess("tInelastic",G4Triton::Triton(),false);
126  AddProcess("He3Inelastic",G4He3::He3(),true);
127  AddProcess("alphaInelastic", G4Alpha::Alpha(),true);
128  AddProcess("ionInelastic",G4GenericIon::GenericIon(),true);
129 
130  G4cout << "IonDPMJETPhysics::ConstructProcess done! " << G4endl;
131 }
132 
133 void IonDPMJETPhysics::AddProcess(const G4String& name,
134  G4ParticleDefinition* part,
135  G4bool isIon)
136 {
137  G4HadronInelasticProcess* hadi = new G4HadronInelasticProcess(name, part);
138  G4ProcessManager* pManager = part->GetProcessManager();
139  pManager->AddDiscreteProcess(hadi);
140  hadi->AddDataSet(fShen);
141  //hadi->AddDataSet(fTripathi);
142  //hadi->AddDataSet(fTripathiLight);
143  if(isIon) { hadi->AddDataSet(fIonH); }
144  hadi->RegisterMe(fIonBC);
145 #ifdef G4_USE_DPMJET
146  hadi->RegisterMe(fDPM);
147  if(fUseDPMJETXS) { hadi->AddDataSet(fDpmXS); }
148 #endif
149 }
150 
151 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
152 
153 
154 
virtual ~IonDPMJETPhysics()
G4int AddDiscreteProcess(G4VProcess *aProcess, G4int ord=ordDefault)
const XML_Char * name
G4ProcessManager * GetProcessManager() const
void RegisterMe(G4HadronicInteraction *a)
void AddDataSet(G4VCrossSectionDataSet *aDataSet)
G4GLOB_DLL std::ostream G4cout
bool G4bool
Definition: G4Types.hh:79
static G4Triton * Triton()
Definition: G4Triton.cc:95
static G4Deuteron * Deuteron()
Definition: G4Deuteron.cc:94
static G4GenericIon * GenericIon()
Definition: G4GenericIon.cc:93
Definition of the G4DPMJET2_5Interface class.
virtual void ConstructProcess()
#define G4endl
Definition: G4ios.hh:61
IonDPMJETPhysics(G4bool val)
static G4Alpha * Alpha()
Definition: G4Alpha.cc:89
double G4double
Definition: G4Types.hh:76
static G4He3 * He3()
Definition: G4He3.cc:94
Definition of the IonDPMJETPhysics class.
Definition of the G4DPMJET2_5CrossSection class.
Definition of the G4DPMJET2_5Model class.