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] [ 10.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 // ********************************************************************
  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 
 40 #include "G4HadronPhysicsFTFP_BERT.hh"
 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"
 56 #include "G4BertiniProtonBuilder.hh"
 57 #include "G4FTFPNeutronBuilder.hh"
 58 #include "G4FTFPProtonBuilder.hh"
 59 
 60 #include "G4NeutronBuilder.hh"
 61 #include "G4BertiniNeutronBuilder.hh"
 62 #include "G4FTFPNeutronBuilder.hh"
 63 
 64 #include "G4HyperonBuilder.hh"
 65 #include "G4HyperonFTFPBuilder.hh"
 66 #include "G4AntiBarionBuilder.hh"
 67 #include "G4FTFPAntiBarionBuilder.hh"
 68 
 69 #include "G4MesonConstructor.hh"
 70 #include "G4BaryonConstructor.hh"
 71 #include "G4ShortLivedConstructor.hh"
 72 #include "G4IonConstructor.hh"
 73 
 74 #include "G4NeutronRadCapture.hh"
 75 #include "G4NeutronInelasticXS.hh"
 76 #include "G4NeutronCaptureXS.hh"
 77 
 78 #include "G4PhysListUtil.hh"
 79 #include "G4HadParticles.hh"
 80 #include "G4HadronicParameters.hh"
 81 #include "G4HadronicBuilder.hh"
 82 #include "G4BuilderType.hh"
 83 
 84 // factory
 85 #include "G4PhysicsConstructorFactory.hh"
 86 //
 87 G4_DECLARE_PHYSCONSTR_FACTORY(G4HadronPhysicsFTFP_BERT);
 88 
 89 G4HadronPhysicsFTFP_BERT::G4HadronPhysicsFTFP_BERT(G4int verb) :
 90   G4HadronPhysicsFTFP_BERT("hInelastic FTFP_BERT",false) 
 91 {
 92   G4HadronicParameters::Instance()->SetVerboseLevel(verb);
 93 }
 94 
 95 G4HadronPhysicsFTFP_BERT::G4HadronPhysicsFTFP_BERT(const G4String& name, G4bool qe)
 96   : G4VPhysicsConstructor(name), QuasiElastic(qe)
 97 {
 98   SetPhysicsType(bHadronInelastic);
 99   G4HadronicParameters* param = G4HadronicParameters::Instance();
100   minFTFP_pion = param->GetMinEnergyTransitionFTF_Cascade();
101   maxBERT_pion = param->GetMaxEnergyTransitionFTF_Cascade();
102   minFTFP_kaon = param->GetMinEnergyTransitionFTF_Cascade();
103   maxBERT_kaon = param->GetMaxEnergyTransitionFTF_Cascade();
104   minFTFP_proton = param->GetMinEnergyTransitionFTF_Cascade();
105   maxBERT_proton = param->GetMaxEnergyTransitionFTF_Cascade();
106   minFTFP_neutron = param->GetMinEnergyTransitionFTF_Cascade();
107   maxBERT_neutron = param->GetMaxEnergyTransitionFTF_Cascade();
108   minBERT_proton = minBERT_neutron = 0.0;
109   param->SetEnableBCParticles(true);
110 }
111 
112 G4HadronPhysicsFTFP_BERT::~G4HadronPhysicsFTFP_BERT()
113 {}
114 
115 void G4HadronPhysicsFTFP_BERT::ConstructParticle()
116 {
117   G4MesonConstructor pMesonConstructor;
118   pMesonConstructor.ConstructParticle();
119 
120   G4BaryonConstructor pBaryonConstructor;
121   pBaryonConstructor.ConstructParticle();
122 
123   G4ShortLivedConstructor pShortLivedConstructor;
124   pShortLivedConstructor.ConstructParticle();
125 
126   G4IonConstructor pIonConstructor;
127   pIonConstructor.ConstructParticle();
128 }
129 
130 void G4HadronPhysicsFTFP_BERT::DumpBanner()
131 {
132   G4cout << G4endl
133        << " " << GetPhysicsName() << " : threshold between BERT and FTFP is over the interval " << G4endl
134        << " for pions :   " << minFTFP_pion/GeV << " to " << maxBERT_pion/GeV  << " GeV" << G4endl
135        << " for kaons :   " << minFTFP_kaon/GeV << " to " << maxBERT_kaon/GeV  << " GeV" << G4endl
136        << " for proton :  " << minFTFP_proton/GeV << " to " << maxBERT_proton/GeV  << " GeV" << G4endl
137        << " for neutron : " << minFTFP_neutron/GeV << " to " << maxBERT_neutron/GeV  << " GeV" << G4endl
138        << G4endl;
139 }
140 
141 void G4HadronPhysicsFTFP_BERT::CreateModels()
142 {
143   Neutron();
144   Proton();
145   Pion();
146   Kaon();
147   Others();
148 } 
149 
150 void G4HadronPhysicsFTFP_BERT::Neutron()
151 {
152   G4HadronicParameters* param = G4HadronicParameters::Instance();
153   G4bool useFactorXS = param->ApplyFactorXS();
154   //General schema:
155   // 1) Create a builder
156   // 2) Call AddBuilder
157   // 3) Configure the builder, possibly with sub-builders
158   // 4) Call builder->Build()
159   auto neu = new G4NeutronBuilder;
160   AddBuilder(neu);
161   auto ftfpn = new G4FTFPNeutronBuilder(QuasiElastic);
162   AddBuilder( ftfpn );
163   neu->RegisterMe(ftfpn);
164   ftfpn->SetMinEnergy(minFTFP_neutron);
165   auto bertn = new G4BertiniNeutronBuilder;
166   AddBuilder(bertn);
167   neu->RegisterMe(bertn);
168   bertn->SetMinEnergy(minBERT_neutron);
169   bertn->SetMaxEnergy(maxBERT_neutron);
170   neu->Build();
171 
172   const G4ParticleDefinition* neutron = G4Neutron::Neutron();
173   G4HadronicProcess* inel = G4PhysListUtil::FindInelasticProcess(neutron);
174   if(nullptr != inel) { 
175     inel->AddDataSet(new G4NeutronInelasticXS()); 
176     if( useFactorXS ) inel->MultiplyCrossSectionBy( param->XSFactorNucleonInelastic() );
177   }
178   G4HadronicProcess* capture = G4PhysListUtil::FindCaptureProcess(neutron);
179   if (nullptr != capture) {
180     capture->RegisterMe(new G4NeutronRadCapture());
181   }
182 }
183 
184 void G4HadronPhysicsFTFP_BERT::Proton()
185 {
186   G4HadronicParameters* param = G4HadronicParameters::Instance();
187   G4bool useFactorXS = param->ApplyFactorXS();
188 
189   auto pro = new G4ProtonBuilder;
190   AddBuilder(pro);
191   auto ftfpp = new G4FTFPProtonBuilder(QuasiElastic);
192   AddBuilder(ftfpp);
193   pro->RegisterMe(ftfpp);
194   ftfpp->SetMinEnergy(minFTFP_proton);
195   auto bertp = new G4BertiniProtonBuilder;
196   AddBuilder(bertp);
197   pro->RegisterMe(bertp);
198   bertp->SetMinEnergy(minBERT_proton);
199   bertp->SetMaxEnergy(maxBERT_proton);
200   pro->Build();
201 
202   const G4ParticleDefinition* proton = G4Proton::Proton();
203   G4HadronicProcess* inel = G4PhysListUtil::FindInelasticProcess(proton);
204   if(nullptr != inel) { 
205     if( useFactorXS ) inel->MultiplyCrossSectionBy( param->XSFactorNucleonInelastic() );
206   }
207 }
208 
209 void G4HadronPhysicsFTFP_BERT::Pion()
210 {
211   G4HadronicParameters* param = G4HadronicParameters::Instance();
212   G4bool useFactorXS = param->ApplyFactorXS();
213 
214   auto pi = new G4PionBuilder;
215   AddBuilder(pi);
216   auto ftfppi = new G4FTFPPionBuilder(QuasiElastic);
217   AddBuilder(ftfppi);
218   pi->RegisterMe(ftfppi);
219   ftfppi->SetMinEnergy(minFTFP_pion);
220   auto bertpi = new G4BertiniPionBuilder;
221   AddBuilder(bertpi);
222   pi->RegisterMe(bertpi);
223   bertpi->SetMaxEnergy(maxBERT_pion);
224   pi->Build();
225 
226   // add cross section factor
227   if( useFactorXS ) {
228     const G4ParticleDefinition* pion = G4PionPlus::PionPlus();
229     G4HadronicProcess* inel = G4PhysListUtil::FindInelasticProcess(pion);
230     if(nullptr != inel) {
231       inel->MultiplyCrossSectionBy( param->XSFactorPionInelastic() );
232     }
233     pion = G4PionMinus::PionMinus();
234     inel = G4PhysListUtil::FindInelasticProcess(pion);
235     if(nullptr != inel) { 
236       inel->MultiplyCrossSectionBy( param->XSFactorPionInelastic() );
237     }
238   }
239 }
240 
241 void G4HadronPhysicsFTFP_BERT::Kaon()
242 {
243   G4HadronicParameters* param = G4HadronicParameters::Instance();
244   G4bool useFactorXS = param->ApplyFactorXS();
245 
246   auto k = new G4KaonBuilder;
247   AddBuilder(k);
248   auto ftfpk = new G4FTFPKaonBuilder(QuasiElastic);
249   AddBuilder(ftfpk);
250   k->RegisterMe(ftfpk);
251   ftfpk->SetMinEnergy(minFTFP_kaon);
252   auto bertk  = new G4BertiniKaonBuilder;
253   AddBuilder(bertk);
254   k->RegisterMe(bertk);
255   bertk->SetMaxEnergy(maxBERT_kaon);
256   k->Build();
257 
258   // add cross section factor
259   if( useFactorXS ) {
260     G4ParticleTable* table = G4ParticleTable::GetParticleTable();
261     for( auto & pdg : G4HadParticles::GetKaons() ) {
262       auto part = table->FindParticle( pdg );
263       if ( part == nullptr ) { continue; }
264       G4HadronicProcess* inel = G4PhysListUtil::FindInelasticProcess(part);
265       if(nullptr != inel) { 
266         inel->MultiplyCrossSectionBy( param->XSFactorHadronInelastic() );
267       }
268     }
269   }
270 }
271 
272 void G4HadronPhysicsFTFP_BERT::Others()
273 {
274   G4HadronicParameters* param = G4HadronicParameters::Instance();
275 
276   // high energy particles
277   if( param->GetMaxEnergy() > param->EnergyThresholdForHeavyHadrons() ) {
278 
279     // anti light ions
280     G4HadronicBuilder::BuildAntiLightIonsFTFP();
281 
282     // hyperons
283     G4HadronicBuilder::BuildHyperonsFTFP_BERT();
284 
285     // b-, c- baryons and mesons
286     if( param->EnableBCParticles() ) {
287       G4HadronicBuilder::BuildBCHadronsFTFP_BERT();
288     }
289 
290     // light hypernuclei and anti-hypernuclei
291     if ( param->EnableHyperNuclei() ) {
292       G4HadronicBuilder::BuildHyperNucleiFTFP_BERT();
293       G4HadronicBuilder::BuildHyperAntiNucleiFTFP_BERT();
294     }
295   }
296 }
297 
298 void G4HadronPhysicsFTFP_BERT::ConstructProcess()
299 {
300   G4HadronicParameters* param = G4HadronicParameters::Instance();
301   minFTFP_pion = param->GetMinEnergyTransitionFTF_Cascade();
302   maxBERT_pion = param->GetMaxEnergyTransitionFTF_Cascade();
303   minFTFP_kaon = param->GetMinEnergyTransitionFTF_Cascade();
304   maxBERT_kaon = param->GetMaxEnergyTransitionFTF_Cascade();
305   minFTFP_proton = param->GetMinEnergyTransitionFTF_Cascade();
306   maxBERT_proton = param->GetMaxEnergyTransitionFTF_Cascade();
307   minFTFP_neutron = param->GetMinEnergyTransitionFTF_Cascade();
308   maxBERT_neutron = param->GetMaxEnergyTransitionFTF_Cascade();
309 
310   if(G4Threading::IsMasterThread() &&
311      G4HadronicParameters::Instance()->GetVerboseLevel() > 0) {
312       DumpBanner();
313   }
314   CreateModels();
315 }
316