ECCE @ EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
G4HadronPhysicsQGSP_BERT.cc
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file G4HadronPhysicsQGSP_BERT.cc
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 //
27 //---------------------------------------------------------------------------
28 //
29 // ClassName: G4HadronPhysicsQGSP_BERT
30 //
31 // Author: 2002 J.P. Wellisch
32 //
33 // Modified:
34 // 23.11.2005 G.Folger: migration to non static particles
35 // 08.06.2006 V.Ivanchenko: remove stopping
36 // 20.06.2006 G.Folger: Bertini applies to Kaons, i.e. use SetMinEnergy instead of SetMinPionEnergy
37 // 25.04.2007 G.Folger: Add code for quasielastic
38 // 10.12.2007 G.Folger: Add projectilediffrative option for proton/neutron, off by default
39 // 31.10.2012 A.Ribon: Use G4MiscBuilder
40 // 19.03.2013 A.Ribon: Replace LEP with FTFP
41 //
42 //----------------------------------------------------------------------------
43 //
44 #include <iomanip>
45 
47 
48 #include "globals.hh"
49 #include "G4ios.hh"
50 #include "G4SystemOfUnits.hh"
51 #include "G4ParticleDefinition.hh"
52 #include "G4ParticleTable.hh"
53 
54 #include "G4PiKBuilder.hh"
55 #include "G4FTFPPiKBuilder.hh"
56 #include "G4QGSPPiKBuilder.hh"
57 #include "G4BertiniPiKBuilder.hh"
58 
59 #include "G4ProtonBuilder.hh"
60 #include "G4FTFPProtonBuilder.hh"
61 #include "G4QGSPProtonBuilder.hh"
63 
64 #include "G4NeutronBuilder.hh"
65 #include "G4FTFPNeutronBuilder.hh"
66 #include "G4QGSPNeutronBuilder.hh"
68 
69 #include "G4HyperonFTFPBuilder.hh"
70 #include "G4AntiBarionBuilder.hh"
72 #include "G4MesonConstructor.hh"
73 #include "G4BaryonConstructor.hh"
75 #include "G4IonConstructor.hh"
76 
78 #include "G4NeutronRadCapture.hh"
79 #include "G4NeutronInelasticXS.hh"
80 #include "G4NeutronCaptureXS.hh"
82 
83 #include "G4PhysListUtil.hh"
84 #include "G4ProcessManager.hh"
85 #include "G4HadronicParameters.hh"
86 
88 //
90 
92  : G4HadronPhysicsQGSP_BERT("hInelastic QGSP_BERT",true) {}
93 
95  : G4VPhysicsConstructor(name)
96 {
97  QuasiElasticFTF= false; // Use built-in quasi-elastic (not add-on)
98  QuasiElasticQGS= true; // For QGS, it must use it.
108 
109 }
110 
112 {
113  Neutron();
114  Proton();
115  Pion();
116  Kaon();
117  Others();
118 }
119 
121 {
122  //General schema:
123  // 1) Create a builder
124  // 2) Call AddBuilder
125  // 3) Configure the builder, possibly with sub-builders
126  // 4) Call builder->Build()
127  auto neu = new G4NeutronBuilder;
128  AddBuilder(neu);
129  auto qgs = new G4QGSPNeutronBuilder(QuasiElasticQGS);
130  AddBuilder(qgs);
131  qgs->SetMinEnergy(minQGSP_neutron);
132  neu->RegisterMe(qgs);
133  auto ftf = new G4FTFPNeutronBuilder(QuasiElasticFTF);
134  AddBuilder(ftf);
135  ftf->SetMinEnergy(minFTFP_neutron);
136  ftf->SetMaxEnergy(maxFTFP_neutron);
137  neu->RegisterMe(ftf);
138  auto bert = new G4BertiniNeutronBuilder;
139  AddBuilder(bert);
140  bert->SetMinEnergy(minBERT_neutron);
141  bert->SetMaxEnergy(maxBERT_neutron);
142  neu->RegisterMe(bert);
143  neu->Build();
144 }
145 
147 {
148  auto pro = new G4ProtonBuilder;
149  AddBuilder(pro);
150  auto qgs = new G4QGSPProtonBuilder(QuasiElasticQGS);
151  AddBuilder(qgs);
152  qgs->SetMinEnergy(minQGSP_proton);
153  pro->RegisterMe(qgs);
154  auto ftf = new G4FTFPProtonBuilder(QuasiElasticFTF);
155  AddBuilder(ftf);
156  ftf->SetMinEnergy(minFTFP_proton);
157  ftf->SetMaxEnergy(maxFTFP_proton);
158  pro->RegisterMe(ftf);
159  auto bert = new G4BertiniProtonBuilder;
160  AddBuilder(bert);
161  bert->SetMinEnergy(minBERT_proton);
162  bert->SetMaxEnergy(maxBERT_proton);
163  pro->RegisterMe(bert);
164  pro->Build();
165 }
166 
168 {
169  auto pik = new G4PiKBuilder;
170  AddBuilder(pik);
171  auto qgs = new G4QGSPPiKBuilder(QuasiElasticQGS);
172  AddBuilder(qgs);
173  qgs->SetMinEnergy(minQGSP_pik);
174  pik->RegisterMe(qgs);
175  auto ftf = new G4FTFPPiKBuilder(QuasiElasticFTF);
176  AddBuilder(ftf);
177  ftf->SetMinEnergy(minFTFP_pik);
178  ftf->SetMaxEnergy(maxFTFP_pik);
179  pik->RegisterMe(ftf);
180  auto bert = new G4BertiniPiKBuilder;
181  AddBuilder(bert);
182  bert->SetMinEnergy(minBERT_pik);
183  bert->SetMaxEnergy(maxBERT_pik);
184  pik->RegisterMe(bert);
185  pik->Build();
186 }
187 
189 {
190  auto hyp = new G4HyperonFTFPBuilder;
191  AddBuilder(hyp);
192  hyp->Build();
193 
194  auto abar = new G4AntiBarionBuilder;
195  AddBuilder(abar);
197  AddBuilder(ftf);
198  abar->RegisterMe(ftf);
199  abar->Build();
200 }
201 
203 {}
204 
206 {
207  G4MesonConstructor pMesonConstructor;
208  pMesonConstructor.ConstructParticle();
209 
210  G4BaryonConstructor pBaryonConstructor;
211  pBaryonConstructor.ConstructParticle();
212 
213  G4ShortLivedConstructor pShortLivedConstructor;
214  pShortLivedConstructor.ConstructParticle();
215 
216  G4IonConstructor pIonConstructor;
217  pIonConstructor.ConstructParticle();
218 }
219 
221 {
222  //Modify Neutrons
225  if(inel) { inel->AddDataSet(new G4NeutronInelasticXS()); }
227  if (capture) {
228  capture->RegisterMe(new G4NeutronRadCapture());
229  }
230 }
231 
233 {
235  DumpBanner();
236  }
237  CreateModels();
239 }
240