Geant4  10.03.p01
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
G4HadronHElasticPhysics.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 // $Id: G4HadronHElasticPhysics.cc 99978 2016-10-13 07:28:13Z gcosmo $
27 //
28 //---------------------------------------------------------------------------
29 //
30 // ClassName: G4HadronHElasticPhysics
31 //
32 // Author: 23 November 2006 V. Ivanchenko
33 //
34 // Modified:
35 // 21.03.07 (V.Ivanchenko) Use G4BGGNucleonElasticXS and G4BGGPionElasticXS;
36 // Reduce thresholds for HE and Q-models to zero
37 // 03.06.2010 V.Ivanchenko cleanup constructors and ConstructProcess method
38 // 06.06.2014 A.Ribon Use the current best elastic models.
39 //
40 //----------------------------------------------------------------------------
41 //
42 // CHIPS for sampling scattering for p and n
43 // Glauber model for samplimg of high energy pi+- (E > 1GeV)
44 // LHEP sampling model for the other particle
45 // BBG cross sections for p, n and pi+-
46 // LHEP cross sections for other particles
47 
49 
50 #include "G4SystemOfUnits.hh"
51 #include "G4ParticleDefinition.hh"
52 #include "G4ProcessManager.hh"
53 
54 #include "G4MesonConstructor.hh"
55 #include "G4BaryonConstructor.hh"
56 #include "G4IonConstructor.hh"
57 #include "G4Neutron.hh"
58 
60 #include "G4HadronElastic.hh"
61 #include "G4ChipsElasticModel.hh"
62 #include "G4AntiNuclElastic.hh"
63 #include "G4DiffuseElastic.hh"
65 
66 #include "G4CrossSectionElastic.hh"
67 #include "G4BGGNucleonElasticXS.hh"
68 #include "G4BGGPionElasticXS.hh"
69 #include "G4NeutronElasticXS.hh"
77 
78 #include "G4LMsdGenerator.hh"
79 #include "G4DiffElasticRatio.hh"
80 #include "G4AutoDelete.hh"
81 
82 // factory
84 //
86 
87 G4ThreadLocal G4DiffElasticRatio* G4HadronHElasticPhysics::diffRatio = 0;
88 
90  : G4VPhysicsConstructor( "hElastic_BEST" ), verbose( ver ),
91  fDiffraction(diffraction)
92 {
93  if ( verbose > 1 ) {
94  G4cout << "### G4HadronHElasticPhysics: " << GetPhysicsName()
95  << " low-mass diffraction: " << fDiffraction << G4endl;
96  }
97 }
98 
100 
101 
103  // G4cout << "G4HadronElasticPhysics::ConstructParticle" << G4endl;
104  G4MesonConstructor pMesonConstructor;
105  pMesonConstructor.ConstructParticle();
106 
107  G4BaryonConstructor pBaryonConstructor;
108  pBaryonConstructor.ConstructParticle();
109 
110  // Construct light ions
111  G4IonConstructor pConstructor;
112  pConstructor.ConstructParticle();
113 }
114 
116 
117  const G4double elimitDiffuse = 0.0;
118  const G4double elimitAntiNuc = 100.0*MeV;
119  const G4double delta = 0.1*MeV;
120 
121  if ( verbose > 1 ) {
122  G4cout << "### HadronHElasticPhysics::ConstructProcess: lower energy limit for DiffuseElastic : "
123  << elimitDiffuse/GeV << " GeV" << G4endl
124  << " transition energy for anti-nuclei : "
125  << elimitAntiNuc/GeV << " GeV" << G4endl;
126  }
127 
128  G4AntiNuclElastic* anuc = new G4AntiNuclElastic();
129  anuc->SetMinEnergy( elimitAntiNuc );
130  G4CrossSectionElastic* anucxs =
132 
133  G4HadronElastic* lhep = new G4HadronElastic();
134  lhep->SetMaxEnergy( elimitAntiNuc + delta );
135 
136  // Three instances of Chips elastic model: one used everywhere,
137  // one used below a energy threshold, and one used only for the
138  // hydrogen element.
141  chips2->SetMaxEnergy( elimitAntiNuc + delta );
143  const G4ElementTable* theElementTable = G4Element::GetElementTable();
144  for ( size_t i_ele = 0; i_ele < theElementTable->size(); i_ele++ ) {
145  G4Element* element = (*theElementTable)[ i_ele ];
146  if ( element->GetZ() > 1.0 ) chipsH->DeActivateFor( element );
147  }
148 
149  G4NuclNuclDiffuseElastic* diffuseNuclNuclElastic = new G4NuclNuclDiffuseElastic();
150  diffuseNuclNuclElastic->SetMinEnergy( elimitDiffuse );
151 
152  G4VCrossSectionDataSet* theComponentGGNuclNuclData =
154 
155  G4LMsdGenerator* diffGen = 0;
156  if(fDiffraction) {
157  diffGen = new G4LMsdGenerator("LMsdDiffraction");
158  diffRatio = new G4DiffElasticRatio();
159  G4AutoDelete::Register(diffRatio);
160  }
161 
162  auto myParticleIterator=GetParticleIterator();
163  myParticleIterator->reset();
164  while( (*myParticleIterator)() ) {
165 
166  G4ParticleDefinition* particle = myParticleIterator->value();
167  G4ProcessManager* pmanager = particle->GetProcessManager();
168  G4String pname = particle->GetParticleName();
169 
170  if ( pname == "anti_lambda" ||
171  pname == "anti_sigma-" ||
172  pname == "anti_sigma0" ||
173  pname == "anti_sigma+" ||
174  pname == "anti_xi-" ||
175  pname == "anti_xi0" ||
176  pname == "anti_omega-"
177  ) {
180  hel->RegisterMe( chips1 );
181  pmanager->AddDiscreteProcess( hel );
182  if ( verbose > 1 ) {
183  G4cout << "### HadronElasticPhysics: " << hel->GetProcessName()
184  << " added for " << particle->GetParticleName() << G4endl;
185  }
186 
187  } else if ( pname == "lambda" ||
188  pname == "sigma-" ||
189  pname == "sigma0" ||
190  pname == "sigma+" ||
191  pname == "xi-" ||
192  pname == "xi0" ||
193  pname == "omega-"
194  ) {
197  hel->RegisterMe( chips1 );
198  pmanager->AddDiscreteProcess( hel );
199  if ( verbose > 1 ) {
200  G4cout << "### HadronElasticPhysics: " << hel->GetProcessName()
201  << " added for " << particle->GetParticleName() << G4endl;
202  }
203 
204  } else if ( pname == "proton" ) {
206  hel->AddDataSet( new G4BGGNucleonElasticXS( particle ) );
207  // To preserve reproducibility, a different instance of
208  // G4DiffuseElastic must be used for each particle type.
209  G4DiffuseElastic* protonDiffuseElastic = new G4DiffuseElastic();
210  protonDiffuseElastic->SetMinEnergy( elimitDiffuse );
211  hel->RegisterMe( chipsH ); // Use Chips only for Hydrogen element
212  hel->RegisterMe( protonDiffuseElastic );
213  pmanager->AddDiscreteProcess( hel );
214  if(fDiffraction) { hel->SetDiffraction(diffGen, diffRatio); }
215  if ( verbose > 1 ) {
216  G4cout << "### HadronElasticPhysics: " << hel->GetProcessName()
217  << " added for " << particle->GetParticleName() << G4endl;
218  }
219 
220  } else if ( pname == "neutron" ) {
223  // To preserve reproducibility, a different instance of
224  // G4DiffuseElastic must be used for each particle type.
225  G4DiffuseElastic* neutronDiffuseElastic = new G4DiffuseElastic();
226  neutronDiffuseElastic->SetMinEnergy( elimitDiffuse );
227  hel->RegisterMe( chipsH ); // Use Chips only for Hydrogen element
228  hel->RegisterMe( neutronDiffuseElastic );
229  pmanager->AddDiscreteProcess( hel );
230  if(fDiffraction) { hel->SetDiffraction(diffGen, diffRatio); }
231  if ( verbose > 1 ) {
232  G4cout << "### HadronElasticPhysics: "
233  << hel->GetProcessName()
234  << " added for " << particle->GetParticleName() << G4endl;
235  }
236 
237  } else if ( pname == "pi-" ) {
239  hel->AddDataSet( new G4BGGPionElasticXS( particle ) );
240  // To preserve reproducibility, a different instance of
241  // G4DiffuseElastic must be used for each particle type.
242  G4DiffuseElastic* pionMinusDiffuseElastic = new G4DiffuseElastic();
243  pionMinusDiffuseElastic->SetMinEnergy( elimitDiffuse );
244  hel->RegisterMe( chipsH ); // Use Chips only for Hydrogen element
245  hel->RegisterMe( pionMinusDiffuseElastic );
246  pmanager->AddDiscreteProcess( hel );
247  if(fDiffraction) { hel->SetDiffraction(diffGen, diffRatio); }
248  if ( verbose > 1 ) {
249  G4cout << "### HadronElasticPhysics: " << hel->GetProcessName()
250  << " added for " << particle->GetParticleName() << G4endl;
251  }
252 
253  } else if ( pname == "pi+" ) {
255  hel->AddDataSet( new G4BGGPionElasticXS( particle ) );
256  // To preserve reproducibility, a different instance of
257  // G4DiffuseElastic must be used for each particle type.
258  G4DiffuseElastic* pionPlusDiffuseElastic = new G4DiffuseElastic();
259  hel->RegisterMe( chipsH ); // Use Chips only for Hydrogen element
260  pionPlusDiffuseElastic->SetMinEnergy( elimitDiffuse );
261  hel->RegisterMe( pionPlusDiffuseElastic );
262  pmanager->AddDiscreteProcess( hel );
263  if(fDiffraction) { hel->SetDiffraction(diffGen, diffRatio); }
264  if ( verbose > 1 ) {
265  G4cout << "### HadronElasticPhysics: " << hel->GetProcessName()
266  << " added for " << particle->GetParticleName() << G4endl;
267  }
268 
269  } else if ( pname == "kaon-" ||
270  pname == "kaon+" ||
271  pname == "kaon0S" ||
272  pname == "kaon0L"
273  ) {
275  if ( pname == "kaon-" ) {
277  } else if ( pname == "kaon+" ) {
279  } else {
281  }
282  hel->RegisterMe( chips1 );
283  pmanager->AddDiscreteProcess( hel );
284  if(fDiffraction) { hel->SetDiffraction(diffGen, diffRatio); }
285  if ( verbose > 1 ) {
286  G4cout << "### HadronElasticPhysics: " << hel->GetProcessName()
287  << " added for " << particle->GetParticleName() << G4endl;
288  }
289 
290  } else if (
291  pname == "deuteron" ||
292  pname == "triton" ||
293  pname == "He3" ||
294  pname == "alpha"
295  ) {
297  hel->AddDataSet( theComponentGGNuclNuclData );
298  // To preserve reproducibility, replace temporarily
299  // G4NuclNuclDiffuseElastic with the Gheisha elastic model.
300  //hel->RegisterMe( diffuseNuclNuclElastic );
301  G4HadronElastic* lhepLightIon = new G4HadronElastic();
302  hel->RegisterMe( lhepLightIon );
303  pmanager->AddDiscreteProcess( hel );
304  if ( verbose > 1 ) {
305  G4cout << "### HadronElasticPhysics: " << hel->GetProcessName()
306  << " added for " << particle->GetParticleName() << G4endl;
307  }
308 
309  } else if ( pname == "anti_proton" || pname == "anti_neutron" ) {
311  hel->AddDataSet( anucxs );
312  hel->RegisterMe( chips2 );
313  hel->RegisterMe( anuc );
314  pmanager->AddDiscreteProcess( hel );
315  if ( verbose > 1 ) {
316  G4cout << "### HadronElasticPhysics: " << hel->GetProcessName()
317  << " added for " << particle->GetParticleName() << G4endl;
318  }
319 
320  } else if ( pname == "anti_deuteron" ||
321  pname == "anti_triton" ||
322  pname == "anti_He3" ||
323  pname == "anti_alpha"
324  ) {
326  hel->AddDataSet( anucxs );
327  hel->RegisterMe( lhep );
328  hel->RegisterMe( anuc );
329  pmanager->AddDiscreteProcess( hel );
330  if ( verbose > 1 ) {
331  G4cout << "### HadronElasticPhysics: " << hel->GetProcessName()
332  << " added for " << particle->GetParticleName() << G4endl;
333  }
334 
335  } else if ( pname == "GenericIon" ) {
336  // To preserve reproducibility, disable temporarily
337  // G4NuclNuclDiffuseElastic.
338  //G4HadronElasticProcess* hel = new G4HadronElasticProcess();
339  //hel->AddDataSet( theComponentGGNuclNuclData );
340  //hel->RegisterMe( diffuseNuclNuclElastic );
341  //pmanager->AddDiscreteProcess( hel );
342  //if ( verbose > 1 ) {
343  // G4cout << "### HadronElasticPhysics: " << hel->GetProcessName()
344  // << " added for " << particle->GetParticleName() << G4endl;
345  //}
346 
347  }
348 
349  }
350 
351 }
G4double GetZ() const
Definition: G4Element.hh:131
G4int AddDiscreteProcess(G4VProcess *aProcess, G4int ord=ordDefault)
static void ConstructParticle()
#define G4ThreadLocal
Definition: tls.hh:89
void SetDiffraction(G4HadronicInteraction *, G4VCrossSectionRatio *)
static void ConstructParticle()
int G4int
Definition: G4Types.hh:78
G4ComponentAntiNuclNuclearXS * GetComponentCrossSection()
const G4String & GetParticleName() const
static void ConstructParticle()
void RegisterMe(G4HadronicInteraction *a)
static const char * Default_Name()
G4ParticleTable::G4PTblDicIterator * GetParticleIterator() const
void SetMinEnergy(G4double anEnergy)
void AddDataSet(G4VCrossSectionDataSet *aDataSet)
void Register(T *inst)
Definition: G4AutoDelete.hh:65
G4GLOB_DLL std::ostream G4cout
bool G4bool
Definition: G4Types.hh:79
static G4CrossSectionDataSetRegistry * Instance()
static const char * Default_Name()
const G4String & GetPhysicsName() const
const G4String & GetProcessName() const
Definition: G4VProcess.hh:408
G4ProcessManager * GetProcessManager() const
G4HadronHElasticPhysics(G4int ver=0, G4bool diffraction=false)
static constexpr double GeV
Definition: G4SIunits.hh:217
static const char * Default_Name()
void SetMaxEnergy(const G4double anEnergy)
#define G4endl
Definition: G4ios.hh:61
static constexpr double MeV
Definition: G4SIunits.hh:214
static const char * Default_Name()
std::vector< G4Element * > G4ElementTable
double G4double
Definition: G4Types.hh:76
static G4ElementTable * GetElementTable()
Definition: G4Element.cc:398
#define G4_DECLARE_PHYSCONSTR_FACTORY(physics_constructor)
void DeActivateFor(const G4Material *aMaterial)