ECCE @ EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
G4HadronPhysicsNuBeam.cc
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file G4HadronPhysicsNuBeam.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 //
30 // ClassName: HadronPhysicsNuBeam
31 //
32 // Author: Julia Yarba, FNAL/CD (2013)
33 // created from (molded after) HadronPhysicsFTFP_BERT
34 //
35 // Modified:
36 //
37 //----------------------------------------------------------------------------
38 //
39 #include <iomanip>
40 
41 #include "G4HadronPhysicsNuBeam.hh"
43 #include "G4PiKBuilder.hh"
44 #include "G4FTFPPiKBuilder.hh"
45 #include "G4BertiniPiKBuilder.hh"
46 #include "G4ProtonBuilder.hh"
47 #include "G4FTFPProtonBuilder.hh"
49 #include "globals.hh"
50 #include "G4ios.hh"
51 #include "G4SystemOfUnits.hh"
52 
53 //#include "G4ParticleDefinition.hh"
54 //#include "G4ParticleTable.hh"
55 //
56 //#include "G4MesonConstructor.hh"
57 //#include "G4BaryonConstructor.hh"
58 //#include "G4ShortLivedConstructor.hh"
59 //
60 //#include "G4ComponentGGHadronNucleusXsc.hh"
61 //#include "G4CrossSectionInelastic.hh"
62 //#include "G4HadronCaptureProcess.hh"
63 //#include "G4NeutronRadCapture.hh"
64 //#include "G4NeutronInelasticXS.hh"
65 //#include "G4NeutronCaptureXS.hh"
66 //
67 //#include "G4CrossSectionDataSetRegistry.hh"
68 //
69 //#include "G4PhysListUtil.hh"
70 
71 // factory
73 //
75 
76 //G4ThreadLocal G4HadronPhysicsNuBeam::ThreadPrivate* G4HadronPhysicsNuBeam::tpdata=0;
77 
79  G4HadronPhysicsNuBeam("hInelasticNuBeam",false)
80 {}
81 
83  : G4HadronPhysicsFTFP_BERT(name,quasiElastic)
84 {
85  minFTFP_neutron = 4.0*GeV;
86  maxBERT_neutron = 5.0*GeV;
87  minFTFP_proton = 3.0*GeV;
88  maxBERT_proton = 3.5*GeV;
89  maxFTFP_proton = 101*GeV;
92 
93 }
94 
96 {
97  auto pro = new G4ProtonBuilder;
98  AddBuilder(pro);
99  // this is the new "custom" proton builder, tentatively for NuBeam
100  //
101  // no need to set the min energy because it's set in the ProBuilder (at 100GeV)
102  // ... and theMax will be set via Build()
103  //
104  // also explicitly set quasi-elastic key ON for QGS
105  // (it should be OFF for FTF, controlled by QuasiElastic)
106  //
107  auto qgsppro = new G4QGSPLundStrFragmProtonBuilder( true );
108  AddBuilder(qgsppro);
109  pro->RegisterMe(qgsppro);
110  //
111  // standard FTFP builder, but energy range is adjusted
112  //
113  auto ftfppro = new G4FTFPProtonBuilder(QuasiElastic);
114  AddBuilder(ftfppro);
115  pro->RegisterMe(ftfppro);
116  ftfppro->SetMinEnergy(minFTFP_proton);
117  ftfppro->SetMaxEnergy(maxFTFP_proton);
118  //
119  // standard Bertini builder, but the validity limit in energy has been moved higher
120  //
121  auto bertpro = new G4BertiniProtonBuilder;
122  AddBuilder(bertpro);
123  pro->RegisterMe(bertpro);
124  bertpro->SetMaxEnergy(maxBERT_proton);
125  pro->Build();
126 }
127 
129 {
130  // this one has energy ranges different from FTFP_BERT,
131  // namely, Bertini is extended up to 10GeV, and FTFP starts at 7GeV
132  //
133  auto pik = new G4PiKBuilder;
134  AddBuilder(pik);
135  auto ftfppik = new G4FTFPPiKBuilder(QuasiElastic);
136  AddBuilder(ftfppik);
137  ftfppik->SetMinEnergy(minFTFP_pion);
138  pik->RegisterMe(ftfppik);
139  auto bertpik = new G4BertiniPiKBuilder();
140  AddBuilder(bertpik);
141  bertpik->SetMaxEnergy(maxBERT_pion);
142  pik->RegisterMe(bertpik);
143  pik->Build();
144 }
145 
147  //Use combined with pions
148 }
149 
150 //void G4HadronPhysicsNuBeam::CreateModels()
151 //{
152 // // this one has energy ranges different from FTFP_BERT,
153 // // namely, Bertini is extended up to 10GeV, and FTFP starts at 7GeV
154 // //
155 // tpdata->thePiK=new G4PiKBuilder;
156 // tpdata->theFTFPPiK=new G4FTFPPiKBuilder(QuasiElastic);
157 // tpdata->thePiK->RegisterMe(tpdata->theFTFPPiK);
158 // tpdata->theFTFPPiK->SetMinEnergy(3.*GeV);
159 // tpdata->thePiK->RegisterMe(tpdata->theBertiniPiK=new G4BertiniPiKBuilder);
160 // tpdata->theBertiniPiK->SetMaxEnergy(3.5*GeV);
161 //
162 // // this is "standard" and is the same as in FTFP_BERT
163 // //
164 // tpdata->theHyperon=new G4HyperonFTFPBuilder;
165 // tpdata->theAntiBaryon=new G4AntiBarionBuilder;
166 // tpdata->theAntiBaryon->RegisterMe(tpdata->theFTFPAntiBaryon=new G4FTFPAntiBarionBuilder(QuasiElastic));
167 //
168 // return;
169 //
170 //}
171 
172 //G4HadronPhysicsNuBeam::~G4HadronPhysicsNuBeam()
173 //{
174 // if (!tpdata) return;
175 //
176 // delete tpdata->theNeutrons;
177 // delete tpdata->theBertiniNeutron;
178 // delete tpdata->theFTFPNeutron;
179 //
180 // delete tpdata->thePiK;
181 // delete tpdata->theBertiniPiK;
182 // delete tpdata->theFTFPPiK;
183 //
184 // delete tpdata->thePro;
185 // delete tpdata->theBertiniPro;
186 // delete tpdata->theFTFPPro;
187 // delete tpdata->theQGSPPro;
188 //
189 // delete tpdata->theHyperon;
190 // delete tpdata->theAntiBaryon;
191 // delete tpdata->theFTFPAntiBaryon;
192 //
193 //}
194 
195 //void G4HadronPhysicsNuBeam::ConstructParticle()
196 //{
197 //
198 // G4MesonConstructor pMesonConstructor;
199 // pMesonConstructor.ConstructParticle();
200 //
201 // G4BaryonConstructor pBaryonConstructor;
202 // pBaryonConstructor.ConstructParticle();
203 //
204 // G4ShortLivedConstructor pShortLivedConstructor;
205 // pShortLivedConstructor.ConstructParticle();
206 //
207 // return;
208 //
209 //}
210 //
211 //#include "G4ProcessManager.hh"
212 //void G4HadronPhysicsNuBeam::ConstructProcess()
213 //{
214 //
215 // if ( tpdata == 0 ) tpdata = new ThreadPrivate;
216 //
217 // CreateModels();
218 //
219 // tpdata->theNeutrons->Build();
220 // tpdata->thePro->Build();
221 // tpdata->thePiK->Build();
222 //
223 // // --- Kaons ---
224 // tpdata->xsKaon = new G4ComponentGGHadronNucleusXsc();
225 // G4VCrossSectionDataSet * kaonxs = new G4CrossSectionInelastic(tpdata->xsKaon);
226 // G4PhysListUtil::FindInelasticProcess(G4KaonMinus::KaonMinus())->AddDataSet(kaonxs);
227 // G4PhysListUtil::FindInelasticProcess(G4KaonPlus::KaonPlus())->AddDataSet(kaonxs);
228 // G4PhysListUtil::FindInelasticProcess(G4KaonZeroShort::KaonZeroShort())->AddDataSet(kaonxs);
229 // G4PhysListUtil::FindInelasticProcess(G4KaonZeroLong::KaonZeroLong())->AddDataSet(kaonxs);
230 //
231 // tpdata->theHyperon->Build();
232 // tpdata->theAntiBaryon->Build();
233 //
234 // // --- Neutrons ---
235 // //
236 // tpdata->xsNeutronInelasticXS = (G4NeutronInelasticXS*)G4CrossSectionDataSetRegistry::Instance()->GetCrossSectionDataSet(G4NeutronInelasticXS::Default_Name());
237 // G4PhysListUtil::FindInelasticProcess(G4Neutron::Neutron())->AddDataSet(tpdata->xsNeutronInelasticXS);
238 //
239 // G4HadronicProcess* capture = 0;
240 // G4ProcessManager* pmanager = G4Neutron::Neutron()->GetProcessManager();
241 // G4ProcessVector* pv = pmanager->GetProcessList();
242 // for ( size_t i=0; i < static_cast<size_t>(pv->size()); ++i )
243 // {
244 // if ( fCapture == ((*pv)[i])->GetProcessSubType() )
245 // {
246 // capture = static_cast<G4HadronicProcess*>((*pv)[i]);
247 // }
248 // }
249 // if ( ! capture ) {
250 // capture = new G4HadronCaptureProcess("nCapture");
251 // pmanager->AddDiscreteProcess(capture);
252 // }
253 // tpdata->xsNeutronCaptureXS = (G4NeutronCaptureXS*)G4CrossSectionDataSetRegistry::Instance()->GetCrossSectionDataSet(G4NeutronCaptureXS::Default_Name());
254 // capture->AddDataSet(tpdata->xsNeutronCaptureXS);
255 // capture->RegisterMe(new G4NeutronRadCapture());
256 //
257 // return;
258 //
259 //}
260