ECCE @ EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
G4HadronPhysicsFTFP_BERT.cc
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file G4HadronPhysicsFTFP_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:
30 //
31 // Author: 2007 Gunter Folger
32 // created from G4HadronPhysicsFTFP
33 //
34 // Modified:
35 //
36 //----------------------------------------------------------------------------
37 //
38 #include <iomanip>
39 
41 
42 #include "globals.hh"
43 #include "G4ios.hh"
44 #include "G4SystemOfUnits.hh"
45 #include "G4ParticleDefinition.hh"
46 #include "G4ParticleTable.hh"
47 #include "G4PionBuilder.hh"
48 #include "G4BertiniPionBuilder.hh"
49 #include "G4FTFPPionBuilder.hh"
50 
51 #include "G4KaonBuilder.hh"
52 #include "G4BertiniKaonBuilder.hh"
53 #include "G4FTFPKaonBuilder.hh"
54 
55 #include "G4ProtonBuilder.hh"
57 #include "G4FTFPNeutronBuilder.hh"
58 #include "G4FTFPProtonBuilder.hh"
59 
60 #include "G4NeutronBuilder.hh"
62 #include "G4FTFPNeutronBuilder.hh"
63 
64 #include "G4HyperonFTFPBuilder.hh"
65 #include "G4AntiBarionBuilder.hh"
67 
68 #include "G4MesonConstructor.hh"
69 #include "G4BaryonConstructor.hh"
71 
73 #include "G4NeutronRadCapture.hh"
74 #include "G4NeutronInelasticXS.hh"
75 #include "G4NeutronCaptureXS.hh"
76 
77 #include "G4PhysListUtil.hh"
78 #include "G4Threading.hh"
79 
80 #include "G4HadronicParameters.hh"
81 
82 // factory
84 //
86 
87 
89  G4HadronPhysicsFTFP_BERT("hInelastic FTFP_BERT",false) {}
90 
92  : G4VPhysicsConstructor(name)
93  , QuasiElastic(quasiElastic)
94 {
103 }
104 
106 {}
107 
109 {
110  G4MesonConstructor pMesonConstructor;
111  pMesonConstructor.ConstructParticle();
112 
113  G4BaryonConstructor pBaryonConstructor;
114  pBaryonConstructor.ConstructParticle();
115 
116  G4ShortLivedConstructor pShortLivedConstructor;
117  pShortLivedConstructor.ConstructParticle();
118 }
119 
121 {
122  G4cout << G4endl
123  << " FTFP_BERT : new threshold between BERT and FTFP is over the interval " << G4endl
124  << " for pions : " << minFTFP_pion/GeV << " to " << maxBERT_pion/GeV << " GeV" << G4endl
125  << " for kaons : " << minFTFP_kaon/GeV << " to " << maxBERT_kaon/GeV << " GeV" << G4endl
126  << " for proton : " << minFTFP_proton/GeV << " to " << maxBERT_proton/GeV << " GeV" << G4endl
127  << " for neutron : " << minFTFP_neutron/GeV << " to " << maxBERT_neutron/GeV << " GeV" << G4endl
128  << G4endl;
129 }
130 
132 {
133  Neutron();
134  Proton();
135  Pion();
136  Kaon();
137  Others();
138 }
139 
141 {
142  //General schema:
143  // 1) Create a builder
144  // 2) Call AddBuilder
145  // 3) Configure the builder, possibly with sub-builders
146  // 4) Call builder->Build()
147  auto neu = new G4NeutronBuilder;
148  AddBuilder(neu);
149  auto ftfpn = new G4FTFPNeutronBuilder(QuasiElastic);
150  AddBuilder( ftfpn );
151  neu->RegisterMe(ftfpn);
152  ftfpn->SetMinEnergy(minFTFP_neutron);
153  auto bertn = new G4BertiniNeutronBuilder;
154  AddBuilder(bertn);
155  neu->RegisterMe(bertn);
156  bertn->SetMinEnergy(0.0);
157  bertn->SetMaxEnergy(maxBERT_neutron);
158  neu->Build();
159 }
160 
162 {
163  auto pro = new G4ProtonBuilder;
164  AddBuilder(pro);
165  auto ftfpp = new G4FTFPProtonBuilder(QuasiElastic);
166  AddBuilder(ftfpp);
167  pro->RegisterMe(ftfpp);
168  ftfpp->SetMinEnergy(minFTFP_proton);
169  auto bertp = new G4BertiniProtonBuilder;
170  AddBuilder(bertp);
171  pro->RegisterMe(bertp);
172  bertp->SetMaxEnergy(maxBERT_proton);
173  pro->Build();
174 }
175 
177 {
178  auto pi = new G4PionBuilder;
179  AddBuilder(pi);
180  auto ftfppi = new G4FTFPPionBuilder(QuasiElastic);
181  AddBuilder(ftfppi);
182  pi->RegisterMe(ftfppi);
183  ftfppi->SetMinEnergy(minFTFP_pion);
184  auto bertpi = new G4BertiniPionBuilder;
185  AddBuilder(bertpi);
186  pi->RegisterMe(bertpi);
187  bertpi->SetMaxEnergy(maxBERT_pion);
188  pi->Build();
189 }
190 
192 {
193  auto k = new G4KaonBuilder;
194  AddBuilder(k);
195  auto ftfpk = new G4FTFPKaonBuilder(QuasiElastic);
196  AddBuilder(ftfpk);
197  k->RegisterMe(ftfpk);
198  ftfpk->SetMinEnergy(minFTFP_kaon);
199  auto bertk = new G4BertiniKaonBuilder;
200  AddBuilder(bertk);
201  k->RegisterMe(bertk);
202  bertk->SetMaxEnergy(maxBERT_kaon);
203  k->Build();
204 }
205 
207 {
208  //===== Hyperons ====== //
209  auto hyp = new G4HyperonFTFPBuilder;
210  AddBuilder( hyp );
211  hyp->Build();
212 
214  auto abar = new G4AntiBarionBuilder;
215  AddBuilder(abar);
216  auto ftfpabar = new G4FTFPAntiBarionBuilder(QuasiElastic);
217  AddBuilder(ftfpabar);
218  abar->RegisterMe(ftfpabar);
219  abar->Build();
220 }
221 
223 {
225  DumpBanner();
226  }
227  CreateModels();
229 }
230 
231 #include "G4ProcessManager.hh"
233 {
234  //Modify Neutrons
237  if(inel) { inel->AddDataSet(new G4NeutronInelasticXS()); }
239  if (capture) {
240  capture->RegisterMe(new G4NeutronRadCapture());
241  }
242 }