40 #include "Test30Physics.hh"
42 #include "G4SystemOfUnits.hh"
43 #include "G4UnitsTable.hh"
44 #include "Test30VSecondaryGenerator.hh"
45 #include "G4PhysicsTable.hh"
46 #include "G4ProcessManager.hh"
47 #include "G4ProcessVector.hh"
48 #include "G4ParticleTypes.hh"
50 #include "G4ProcessManager.hh"
51 #include "G4ParticleDefinition.hh"
52 #include "G4DecayPhysics.hh"
54 #include "G4PreCompoundModel.hh"
55 #include "G4ExcitationHandler.hh"
56 #include "G4BinaryCascade.hh"
57 #include "G4BinaryLightIonReaction.hh"
58 #include "G4CascadeInterface.hh"
59 #include "G4WilsonAbrasionModel.hh"
60 #include "G4QMDReaction.hh"
61 #include "G4INCLXXInterface.hh"
63 #include "G4TheoFSGenerator.hh"
64 #include "G4FTFModel.hh"
65 #include "G4ExcitedStringDecay.hh"
66 #include "G4LundStringFragmentation.hh"
68 #include "G4QGSModel.hh"
69 #include "G4QGSParticipants.hh"
70 #include "G4QGSMFragmentation.hh"
71 #include "G4QuasiElasticChannel.hh"
73 #include "G4GeneratorPrecompoundInterface.hh"
77 Test30Physics::Test30Physics()
84 Test30Physics::~Test30Physics()
89 void Test30Physics::Initialise()
92 dp.ConstructParticle();
102 G4VProcess* Test30Physics::GetProcess(
const G4String& gen_name,
103 const G4ParticleDefinition* part,
106 G4cout <<
"Test30Physics entry" << G4endl;
107 if(theProcess) { G4cout<<
"AAHHH theProcess is there and will be destroyed! " << theProcess<<G4endl;
delete theProcess; }
110 G4String part_name = part->GetParticleName();
111 G4ProcessManager* man =
new G4ProcessManager(part);
112 if(!man) { G4cout<<
"Test30Physics::GetProcess(): ERROR G4ProcessManager is not there!"<< G4endl;
return 0; }
114 theProcess =
new Test30HadronProduction();
116 G4cout <<
"Process is created ("<<theProcess<<
"); gen= " << gen_name << G4endl;
118 if(!theDeExcitation) {
119 theDeExcitation =
new G4ExcitationHandler();
120 G4cout <<
"New deexcitation" << G4endl;
122 if(!thePreCompound) {
123 thePreCompound =
new G4PreCompoundModel(theDeExcitation);
124 G4cout <<
"New pre-compound" << G4endl;
128 Test30VSecondaryGenerator* sg = 0;
131 if(gen_name ==
"preco") {
132 sg =
new Test30VSecondaryGenerator(thePreCompound,mat);
133 theProcess->SetSecondaryGenerator(sg);
134 man->AddDiscreteProcess(theProcess);
136 }
else if(gen_name ==
"binary") {
137 G4BinaryCascade* hkm =
new G4BinaryCascade();
138 hkm->SetDeExcitation(thePreCompound);
139 sg =
new Test30VSecondaryGenerator(hkm, mat);
140 theProcess->SetSecondaryGenerator(sg);
141 man->AddDiscreteProcess(theProcess);
143 }
else if(gen_name ==
"binary_ion") {
144 G4BinaryLightIonReaction* hkm =
new G4BinaryLightIonReaction();
147 sg =
new Test30VSecondaryGenerator(hkm, mat);
148 theProcess->SetSecondaryGenerator(sg);
149 man->AddDiscreteProcess(theProcess);
151 }
else if(gen_name ==
"ftfp") {
153 G4TheoFSGenerator* theModel =
new G4TheoFSGenerator;
154 G4FTFModel* theStringModel =
new G4FTFModel();
155 G4GeneratorPrecompoundInterface* theCascade =
156 new G4GeneratorPrecompoundInterface;
157 theCascade->SetDeExcitation(thePreCompound);
158 G4ExcitedStringDecay* theStringDecay =
159 new G4ExcitedStringDecay(
new G4LundStringFragmentation());
160 theStringModel->SetFragmentationModel(theStringDecay);
162 theModel->SetTransport(theCascade);
163 theModel->SetHighEnergyGenerator(theStringModel);
164 theModel->SetMinEnergy(GeV);
166 sg =
new Test30VSecondaryGenerator(theModel, mat);
167 theProcess->SetSecondaryGenerator(sg);
168 man->AddDiscreteProcess(theProcess);
170 }
else if(gen_name ==
"ftfb") {
172 G4TheoFSGenerator* theModel =
new G4TheoFSGenerator();
173 G4FTFModel* theStringModel=
new G4FTFModel();
174 G4BinaryCascade* theCascade =
new G4BinaryCascade();
175 theCascade->SetDeExcitation(thePreCompound);
176 G4ExcitedStringDecay * theStringDecay =
177 new G4ExcitedStringDecay(
new G4LundStringFragmentation());
178 theModel->SetHighEnergyGenerator(theStringModel);
179 theStringModel->SetFragmentationModel(theStringDecay);
181 theModel->SetTransport(theCascade);
182 theModel->SetHighEnergyGenerator(theStringModel);
183 theModel->SetMinEnergy(GeV);
185 sg =
new Test30VSecondaryGenerator(theModel, mat);
186 theProcess->SetSecondaryGenerator(sg);
187 man->AddDiscreteProcess(theProcess);
189 }
else if(gen_name ==
"qgsp") {
190 G4TheoFSGenerator* theModel =
new G4TheoFSGenerator();
191 G4GeneratorPrecompoundInterface* theCascade =
192 new G4GeneratorPrecompoundInterface();
193 theCascade->SetDeExcitation(thePreCompound);
194 G4QGSModel< G4QGSParticipants > * theStringModel =
195 new G4QGSModel< G4QGSParticipants >;
196 G4ExcitedStringDecay* theQGStringDecay =
197 new G4ExcitedStringDecay(
new G4QGSMFragmentation());
198 theStringModel->SetFragmentationModel(theQGStringDecay);
199 theModel->SetTransport(theCascade);
200 theModel->SetHighEnergyGenerator(theStringModel);
201 G4QuasiElasticChannel* quasiElastic =
new G4QuasiElasticChannel;
202 theModel->SetQuasiElasticChannel(quasiElastic);
203 theModel->SetMinEnergy(0.5*GeV);
204 theModel->SetMaxEnergy(100*TeV);
205 sg =
new Test30VSecondaryGenerator(theModel, mat);
206 theProcess->SetSecondaryGenerator(sg);
207 man->AddDiscreteProcess(theProcess);
209 }
else if(gen_name ==
"qgsb") {
210 G4TheoFSGenerator* theModel =
new G4TheoFSGenerator();
211 G4BinaryCascade* theCascade =
new G4BinaryCascade();
212 theCascade->SetDeExcitation(thePreCompound);
213 G4QGSModel< G4QGSParticipants > * theStringModel =
214 new G4QGSModel< G4QGSParticipants >;
215 G4ExcitedStringDecay* theQGStringDecay =
216 new G4ExcitedStringDecay(
new G4QGSMFragmentation());
217 theStringModel->SetFragmentationModel(theQGStringDecay);
218 theModel->SetTransport(theCascade);
219 theModel->SetHighEnergyGenerator(theStringModel);
220 G4QuasiElasticChannel* quasiElastic =
new G4QuasiElasticChannel;
221 theModel->SetQuasiElasticChannel(quasiElastic);
222 theModel->SetMinEnergy(0.5*GeV);
223 theModel->SetMaxEnergy(100*TeV);
224 sg =
new Test30VSecondaryGenerator(theModel, mat);
225 theProcess->SetSecondaryGenerator(sg);
226 man->AddDiscreteProcess(theProcess);
228 }
else if(gen_name ==
"bertini") {
229 G4CascadeInterface* hkm =
new G4CascadeInterface();
230 sg =
new Test30VSecondaryGenerator(hkm, mat);
231 theProcess->SetSecondaryGenerator(sg);
232 man->AddDiscreteProcess(theProcess);
234 }
else if(gen_name ==
"bertini_preco") {
235 G4CascadeInterface* hkm =
new G4CascadeInterface();
236 hkm->usePreCompoundDeexcitation();
237 sg =
new Test30VSecondaryGenerator(hkm, mat);
238 theProcess->SetSecondaryGenerator(sg);
239 man->AddDiscreteProcess(theProcess);
241 }
else if(gen_name ==
"incl") {
242 G4INCLXXInterface* hkm =
new G4INCLXXInterface();
243 sg =
new Test30VSecondaryGenerator(hkm, mat);
244 theProcess->SetSecondaryGenerator(sg);
245 man->AddDiscreteProcess(theProcess);
247 }
else if(gen_name ==
"incl_ion") {
248 G4INCLXXInterface* hkm =
new G4INCLXXInterface();
249 sg =
new Test30VSecondaryGenerator(hkm, mat);
250 theProcess->SetSecondaryGenerator(sg);
251 man->AddDiscreteProcess(theProcess);
253 }
else if(gen_name ==
"abrasion") {
254 G4WilsonAbrasionModel* wam =
new G4WilsonAbrasionModel();
255 size_t ne = mat->GetNumberOfElements();
256 const G4ElementVector*
ev = mat->GetElementVector();
257 for(
size_t i=0;
i<
ne;
i++) {
258 G4Element* elm = (*ev)[
i];
259 wam->ActivateFor(elm);
261 sg =
new Test30VSecondaryGenerator(wam, mat);
262 theProcess->SetSecondaryGenerator(sg);
263 man->AddDiscreteProcess(theProcess);
265 }
else if(gen_name ==
"qmd") {
266 G4QMDReaction* qmd =
new G4QMDReaction();
267 sg =
new Test30VSecondaryGenerator(qmd, mat);
268 theProcess->SetSecondaryGenerator(sg);
269 man->AddDiscreteProcess(theProcess);
272 G4cout <<
"WARNING: <" << gen_name <<
"> generator is unknown" << G4endl;
275 G4cout <<
"Secondary generator <"
276 << gen_name <<
"> is initialized"