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: HadronPhysicsFTFP_BERT.cc,v 1.3 2010/06/03 10:42:44 gunter Exp $ |
---|
27 | // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ |
---|
28 | // |
---|
29 | //--------------------------------------------------------------------------- |
---|
30 | // |
---|
31 | // ClassName: |
---|
32 | // |
---|
33 | // Author: 2007 Gunter Folger |
---|
34 | // created from HadronPhysicsFTFP |
---|
35 | // |
---|
36 | // Modified: |
---|
37 | // |
---|
38 | //---------------------------------------------------------------------------- |
---|
39 | // |
---|
40 | #include "HadronPhysicsFTFP_BERT.hh" |
---|
41 | |
---|
42 | #include "globals.hh" |
---|
43 | #include "G4ios.hh" |
---|
44 | #include <iomanip> |
---|
45 | #include "G4ParticleDefinition.hh" |
---|
46 | #include "G4ParticleTable.hh" |
---|
47 | |
---|
48 | #include "G4MesonConstructor.hh" |
---|
49 | #include "G4BaryonConstructor.hh" |
---|
50 | #include "G4ShortLivedConstructor.hh" |
---|
51 | |
---|
52 | #include "G4QHadronInelasticDataSet.hh" |
---|
53 | |
---|
54 | HadronPhysicsFTFP_BERT::HadronPhysicsFTFP_BERT(G4int) |
---|
55 | : G4VPhysicsConstructor("hInelastic FTFP_BERT") |
---|
56 | , QuasiElastic(false) |
---|
57 | {} |
---|
58 | |
---|
59 | HadronPhysicsFTFP_BERT::HadronPhysicsFTFP_BERT(const G4String& name, G4bool quasiElastic) |
---|
60 | : G4VPhysicsConstructor(name) , QuasiElastic(quasiElastic) |
---|
61 | {} |
---|
62 | |
---|
63 | void HadronPhysicsFTFP_BERT::CreateModels() |
---|
64 | { |
---|
65 | |
---|
66 | theNeutrons=new G4NeutronBuilder; |
---|
67 | theFTFPNeutron=new G4FTFPNeutronBuilder(QuasiElastic); |
---|
68 | theNeutrons->RegisterMe(theFTFPNeutron); |
---|
69 | theNeutrons->RegisterMe(theBertiniNeutron=new G4BertiniNeutronBuilder); |
---|
70 | theBertiniNeutron->SetMinEnergy(0.0*GeV); |
---|
71 | theBertiniNeutron->SetMaxEnergy(5*GeV); |
---|
72 | theNeutrons->RegisterMe(theLEPNeutron=new G4LEPNeutronBuilder); |
---|
73 | theLEPNeutron->SetMinInelasticEnergy(0.0*eV); // no inelastic from LEP |
---|
74 | theLEPNeutron->SetMaxInelasticEnergy(0.0*eV); |
---|
75 | |
---|
76 | thePro=new G4ProtonBuilder; |
---|
77 | theFTFPPro=new G4FTFPProtonBuilder(QuasiElastic); |
---|
78 | thePro->RegisterMe(theFTFPPro); |
---|
79 | thePro->RegisterMe(theBertiniPro=new G4BertiniProtonBuilder); |
---|
80 | theBertiniPro->SetMaxEnergy(5*GeV); |
---|
81 | |
---|
82 | thePiK=new G4PiKBuilder; |
---|
83 | theFTFPPiK=new G4FTFPPiKBuilder(QuasiElastic); |
---|
84 | thePiK->RegisterMe(theFTFPPiK); |
---|
85 | thePiK->RegisterMe(theBertiniPiK=new G4BertiniPiKBuilder); |
---|
86 | theBertiniPiK->SetMaxEnergy(5*GeV); |
---|
87 | |
---|
88 | theMiscCHIPS=new G4MiscCHIPSBuilder; |
---|
89 | } |
---|
90 | |
---|
91 | HadronPhysicsFTFP_BERT::~HadronPhysicsFTFP_BERT() |
---|
92 | { |
---|
93 | delete theNeutrons; |
---|
94 | delete theBertiniNeutron; |
---|
95 | delete theFTFPNeutron; |
---|
96 | |
---|
97 | delete thePiK; |
---|
98 | delete theBertiniPiK; |
---|
99 | delete theFTFPPiK; |
---|
100 | |
---|
101 | delete thePro; |
---|
102 | delete theBertiniPro; |
---|
103 | delete theFTFPPro; |
---|
104 | |
---|
105 | delete theMiscCHIPS; |
---|
106 | delete theCHIPSInelastic; |
---|
107 | } |
---|
108 | |
---|
109 | void HadronPhysicsFTFP_BERT::ConstructParticle() |
---|
110 | { |
---|
111 | G4MesonConstructor pMesonConstructor; |
---|
112 | pMesonConstructor.ConstructParticle(); |
---|
113 | |
---|
114 | G4BaryonConstructor pBaryonConstructor; |
---|
115 | pBaryonConstructor.ConstructParticle(); |
---|
116 | |
---|
117 | G4ShortLivedConstructor pShortLivedConstructor; |
---|
118 | pShortLivedConstructor.ConstructParticle(); |
---|
119 | } |
---|
120 | |
---|
121 | #include "G4ProcessManager.hh" |
---|
122 | void HadronPhysicsFTFP_BERT::ConstructProcess() |
---|
123 | { |
---|
124 | CreateModels(); |
---|
125 | theNeutrons->Build(); |
---|
126 | thePro->Build(); |
---|
127 | thePiK->Build(); |
---|
128 | // use CHIPS cross sections also for Kaons |
---|
129 | theCHIPSInelastic = new G4QHadronInelasticDataSet(); |
---|
130 | |
---|
131 | FindInelasticProcess(G4KaonMinus::KaonMinus())->AddDataSet(theCHIPSInelastic); |
---|
132 | FindInelasticProcess(G4KaonPlus::KaonPlus())->AddDataSet(theCHIPSInelastic); |
---|
133 | FindInelasticProcess(G4KaonZeroShort::KaonZeroShort())->AddDataSet(theCHIPSInelastic); |
---|
134 | FindInelasticProcess(G4KaonZeroLong::KaonZeroLong())->AddDataSet(theCHIPSInelastic); |
---|
135 | |
---|
136 | theMiscCHIPS->Build(); |
---|
137 | } |
---|
138 | G4HadronicProcess* |
---|
139 | HadronPhysicsFTFP_BERT::FindInelasticProcess(const G4ParticleDefinition* p) |
---|
140 | { |
---|
141 | G4HadronicProcess* had = 0; |
---|
142 | if(p) { |
---|
143 | G4ProcessVector* pvec = p->GetProcessManager()->GetProcessList(); |
---|
144 | size_t n = pvec->size(); |
---|
145 | if(0 < n) { |
---|
146 | for(size_t i=0; i<n; ++i) { |
---|
147 | if(fHadronInelastic == ((*pvec)[i])->GetProcessSubType()) { |
---|
148 | had = static_cast<G4HadronicProcess*>((*pvec)[i]); |
---|
149 | break; |
---|
150 | } |
---|
151 | } |
---|
152 | } |
---|
153 | } |
---|
154 | return had; |
---|
155 | } |
---|
156 | |
---|