LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
MyG4NeutronPHPBuilder.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 //
27 //---------------------------------------------------------------------------
28 //
29 // 19.01.2021 D.Rivera: imported into artg4tk based on :
30 // geant4.10.06.p01/source/physics_lists/builder/src/G4NeutronPHPBuilder.cc
31 //
32 //----------------------------------------------------------------------------
33 //
34 // -- artg4tk includes
36 
37 //#include "Geant4/G4NeutronPHPBuilder.hh"
38 #include "Geant4/G4ParticleDefinition.hh"
39 #include "Geant4/G4ParticleTable.hh"
40 #include "Geant4/G4ProcessManager.hh"
41 #include "Geant4/G4SystemOfUnits.hh"
42 
44 {
45  theHPElastic = 0;
46  theHPElasticData = 0;
47 
48  theHPFission = 0;
49  theHPFissionData = 0;
50 
51  theHPCapture = 0;
52  theHPCaptureData = 0;
53 
54  theHPInelastic = 0;
56 
57  theMin = 0;
58  theIMin = theMin;
59  theMax = 20 * MeV;
60  theIMax = theMax;
61 }
62 
63 void
64 MyG4NeutronPHPBuilder::Build(G4HadronElasticProcess* aP)
65 {
66  if (theHPElastic == 0)
67  theHPElastic = new G4ParticleHPElastic;
68  theHPElastic->SetMinEnergy(theMin);
69  theHPElastic->SetMaxEnergy(theMax);
70  if (theHPElasticData == 0)
71  theHPElasticData = new G4ParticleHPElasticData;
72  aP->AddDataSet(theHPElasticData);
73  aP->RegisterMe(theHPElastic);
74 }
75 
76 void
77 MyG4NeutronPHPBuilder::Build(G4HadronFissionProcess* aP)
78 {
79  if (theHPFission == 0)
80  theHPFission = new G4ParticleHPFission;
81  theHPFission->SetMinEnergy(theMin);
82  theHPFission->SetMaxEnergy(theMax);
83  if (theHPFissionData == 0)
84  theHPFissionData = new G4ParticleHPFissionData;
85  aP->AddDataSet(theHPFissionData);
86  aP->RegisterMe(theHPFission);
87 }
88 
89 void
90 MyG4NeutronPHPBuilder::Build(G4HadronCaptureProcess* aP)
91 {
92  if (theHPCapture == 0)
94  theHPCapture->SetMinEnergy(theMin);
95  theHPCapture->SetMaxEnergy(theMax);
96  if (theHPCaptureData == 0)
97  theHPCaptureData = new G4ParticleHPCaptureData;
98  aP->AddDataSet(theHPCaptureData);
99  aP->RegisterMe(theHPCapture);
100 }
101 
102 void
103 MyG4NeutronPHPBuilder::Build(G4NeutronInelasticProcess* aP)
104 {
105  if (theHPInelastic == 0)
106  theHPInelastic = new G4ParticleHPInelastic(G4Neutron::Neutron(), "NeutronHPInelastic");
107  theHPInelastic->SetMinEnergy(theIMin);
108  theHPInelastic->SetMaxEnergy(theIMax);
109  if (theHPInelasticData == 0)
110  theHPInelasticData = new G4ParticleHPInelasticData(G4Neutron::Neutron());
111  aP->AddDataSet(theHPInelasticData);
112  aP->RegisterMe(theHPInelastic);
113 }
G4ParticleHPFission * theHPFission
void Build(G4HadronElasticProcess *aP) final override
G4ParticleHPCaptureData * theHPCaptureData
G4ParticleHPInelasticData * theHPInelasticData
G4ParticleHPFissionData * theHPFissionData
G4ParticleHPElasticData * theHPElasticData
G4ParticleHPInelastic * theHPInelastic
ArParticleHPCapture * theHPCapture
G4ParticleHPElastic * theHPElastic