BOSS 8.0.0
BESIII Offline Software System
Loading...
Searching...
No Matches
BgsPhysicsList.cc
Go to the documentation of this file.
1//-----------------------------------------------------------------------------
2// File and Version Information:
3// $Id: BgsPhysicsList.cc,v 1.4 2022/01/06 03:49:07 maqm Exp $
4//
5// Description:
6// BgsPhysicsList
7//
8// Environment:
9// Software developed for the BaBar Detector at the SLAC B-Factory.
10//
11// Author List:
12// Torre Wenaus, David Williams, Marc Verderi, Bill Lockman, Dennis
13// Wright
14//
15// Copyright Information:
16// Copyright (C) 2001 SLAC
17//
18// Created:
19// Modification history:
20//
21//-----------------------------------------------------------------------------
22
23#include "PhySim/BgsPhysicsList.hh"
24#include "PhySim/BaBar.hh"
25#include <iomanip>
26#include <math.h>
27// #include "Bogus/BgsPDGEncode.hh"
28// #include "Bogus/BgsControl.hh"
29// #include "Bogus/BgsLooperDeath.hh"
30// #include "Bogus/BgsChargedStepDeath.hh"
31// #include "Bogus/BgsPhysicsRegistrar.hh"
32#include "PhySim/BgsGenocide.hh"
33#include "PhySim/BgsGentleGenocide.hh"
34// #include "Bogus/BgsLimitedTransportation.hh"
35
36// #include "ErrLogger/ErrLog.hh"
37
38#include "G4ComptonScattering.hh"
39#include "G4FastSimulationManagerProcess.hh"
40#include "G4GammaConversion.hh"
41#include "G4ParticleDefinition.hh"
42#include "G4ParticleTable.hh"
43#include "G4ParticleTypes.hh"
44#include "G4ParticleWithCuts.hh"
45#include "G4PhotoElectricEffect.hh"
46#include "G4ProcessManager.hh"
47#include "G4ProcessVector.hh"
48#include "G4VMultipleScattering.hh"
49// #include "G4MultipleScattering.hh"
50#include "G4Decay.hh"
51#include "G4Material.hh"
52#include "G4MaterialCutsCouple.hh"
53#include "G4MuBremsstrahlung.hh"
54#include "G4MuIonisation.hh"
55#include "G4MuPairProduction.hh"
56#include "G4ProductionCuts.hh"
57#include "G4ProductionCutsTable.hh"
58#include "G4eBremsstrahlung.hh"
59#include "G4eIonisation.hh"
60#include "G4eplusAnnihilation.hh"
61#include "G4hIonisation.hh"
62//
63// Gamma- and electro-nuclear models and processes
64//
65// #include "G4GammaNuclearReaction.hh"
66// #include "G4ElectroNuclearReaction.hh"
67#include "G4ElectronNuclearProcess.hh"
68#include "G4ExcitedStringDecay.hh"
69#include "G4GammaParticipants.hh"
70#include "G4GeneratorPrecompoundInterface.hh"
71#include "G4PhotoNuclearProcess.hh"
72#include "G4PositronNuclearProcess.hh"
73#include "G4QGSMFragmentation.hh"
74#include "G4QGSModel.hh"
75#include "G4TheoFSGenerator.hh"
76//
77// Hadronic processes
78//
79#include "G4AlphaInelasticProcess.hh"
80#include "G4AntiLambdaInelasticProcess.hh"
81#include "G4AntiNeutronInelasticProcess.hh"
82#include "G4AntiProtonInelasticProcess.hh"
83#include "G4DeuteronInelasticProcess.hh"
84#include "G4HadronCaptureProcess.hh"
85#include "G4HadronElasticProcess.hh"
86#include "G4HadronFissionProcess.hh"
87#include "G4KaonMinusInelasticProcess.hh"
88#include "G4KaonPlusInelasticProcess.hh"
89#include "G4KaonZeroLInelasticProcess.hh"
90#include "G4KaonZeroSInelasticProcess.hh"
91#include "G4LambdaInelasticProcess.hh"
92#include "G4NeutronInelasticProcess.hh"
93#include "G4PionMinusInelasticProcess.hh"
94#include "G4PionPlusInelasticProcess.hh"
95#include "G4ProtonInelasticProcess.hh"
96#include "G4ShortLivedConstructor.hh"
97#include "G4TritonInelasticProcess.hh"
98//
99// Hadronic interaction models
100// Low energy (E < 20 GeV) part only
101//
102/*#include "G4LElastic.hh"
103#include "G4LEAlphaInelastic.hh"
104#include "G4LEAntiLambdaInelastic.hh"
105#include "G4LEAntiNeutronInelastic.hh"
106#include "G4LEAntiProtonInelastic.hh"
107#include "G4LEDeuteronInelastic.hh"
108#include "G4LETritonInelastic.hh"
109
110#include "G4LCapture.hh"
111#include "G4LFission.hh"
112#include "G4NeutronHPCapture.hh"
113#include "G4NeutronHPCaptureData.hh"
114#include "G4NeutronHPElastic.hh"
115#include "G4NeutronHPElasticData.hh"
116#include "G4NeutronHPFission.hh"
117#include "G4NeutronHPFissionData.hh"
118#include "G4NeutronHPInelastic.hh"
119#include "G4NeutronHPInelasticData.hh"
120*/
121#include "CLHEP/Random/RanecuEngine.h"
122#include "G4CascadeInterface.hh"
123//
124// Pi+/pi- inelastic cross sections
125//
126#include "G4PiNuclearCrossSection.hh"
127using std::ostream;
128
129// BgsPhysicsList::BgsPhysicsList( BgsControl *theControl,
130// BgsPhysicsRegistrar *pr)
132 : G4VUserPhysicsList()
133 , // bes
134 // control(theControl),
135 // first(true),
136 first( false ) // bes
137// physicsRegistrar(pr),
138// theLooperDeath(0) // looperdeath process
139{
140 SetVerboseLevel( 2 );
141 bertini_model = new G4CascadeInterface;
142}
143
145 // delete theLooperDeath;
146}
147
149
150 // In this method, static member functions should be called
151 // for all particles which you want to use.
152 // This ensures that objects of these particle types will be
153 // created in the program.
154
160 /*
161 if (first) {
162 first = false;
163
164 //
165 // Check to make sure our particles have valid PDG encodings
166 //
167 BgsPDGEncode encode(false);
168
169 G4ParticleTable *table = G4ParticleTable::GetParticleTable();
170
171 G4int nProb = 0;
172 G4int n = table->entries();
173 while(n--) {
174 G4ParticleDefinition *part = table->GetParticle(n);
175 if (encode.pdt(part) == 0) {
176 nProb++;
177 std::cerr << "The Geant4 particle \""
178 << part->GetParticleName()
179 << "\" is not recognized by BgsPDGEncode" << std::endl;
180 }
181 }
182
183 if(nProb > 0) std::cerr << "One or more PDG encoding errors" <<
184 std::endl;
185 }
186 */
187 // Add short lived particles for high energy models,
188 // but don't check PDG codes - they are not propagated in Bogus anyway
189
190 G4ShortLivedConstructor shortLived;
191 shortLived.ConstructParticle();
192}
193
195 // pseudo-particles
196 G4Geantino::GeantinoDefinition();
197 G4ChargedGeantino::ChargedGeantinoDefinition();
198
199 // gamma
200 G4Gamma::GammaDefinition();
201
202 // optical photon
203 G4OpticalPhoton::OpticalPhotonDefinition();
204}
205
207 // leptons
208 G4Electron::ElectronDefinition();
209 G4Positron::PositronDefinition();
210 G4MuonPlus::MuonPlusDefinition();
211 G4MuonMinus::MuonMinusDefinition();
212 G4TauPlus::TauPlusDefinition();
213 G4TauMinus::TauMinusDefinition();
214
215 G4NeutrinoE::NeutrinoEDefinition();
216 G4AntiNeutrinoE::AntiNeutrinoEDefinition();
217 G4NeutrinoMu::NeutrinoMuDefinition();
218 G4AntiNeutrinoMu::AntiNeutrinoMuDefinition();
219 G4NeutrinoTau::NeutrinoTauDefinition();
220 G4AntiNeutrinoTau::AntiNeutrinoTauDefinition();
221}
222
224 // mesons
225 G4PionPlus ::PionPlusDefinition();
226 G4PionMinus ::PionMinusDefinition();
227 G4PionZero ::PionZeroDefinition();
228 G4Eta ::EtaDefinition();
229 G4EtaPrime ::EtaPrimeDefinition();
230 // G4RhoZero ::RhoZeroDefinition();
231 G4KaonPlus ::KaonPlusDefinition();
232 G4KaonMinus ::KaonMinusDefinition();
233 G4KaonZero ::KaonZeroDefinition();
234 G4AntiKaonZero ::AntiKaonZeroDefinition();
235 G4KaonZeroLong ::KaonZeroLongDefinition();
236 G4KaonZeroShort::KaonZeroShortDefinition();
237}
238
240 // baryons
241 G4Proton ::ProtonDefinition();
242 G4AntiProton ::AntiProtonDefinition();
243 G4Neutron ::NeutronDefinition();
244 G4AntiNeutron ::AntiNeutronDefinition();
245 G4Lambda ::LambdaDefinition();
246 G4AntiLambda ::AntiLambdaDefinition();
247 G4SigmaPlus ::SigmaPlusDefinition();
248 G4SigmaZero ::SigmaZeroDefinition();
249 G4SigmaMinus ::SigmaMinusDefinition();
250 G4AntiSigmaPlus ::AntiSigmaPlusDefinition();
251 G4AntiSigmaZero ::AntiSigmaZeroDefinition();
252 G4AntiSigmaMinus::AntiSigmaMinusDefinition();
253 G4XiZero ::XiZeroDefinition();
254 G4XiMinus ::XiMinusDefinition();
255 G4AntiXiZero ::AntiXiZeroDefinition();
256 G4AntiXiMinus ::AntiXiMinusDefinition();
257 G4OmegaMinus ::OmegaMinusDefinition();
258 G4AntiOmegaMinus::AntiOmegaMinusDefinition();
259 G4Deuteron ::DeuteronDefinition();
260 G4Triton ::TritonDefinition();
261 G4He3 ::He3Definition();
262 G4Alpha ::AlphaDefinition();
263}
264
265void BgsPhysicsList::ConstructIons() { G4GenericIon::GenericIonDefinition(); }
266
268 // if (control->UseBgsTran()) {
269 /* if(0) {
270 AddBgsTransportation(control->GetMaxTrackingStepSize(),
271 control->GetMaxVacStepSize(),
272 control->GetVacName());
273 std::cout << "+^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^+ " <<
274 std::endl;
275 std::cout << "+v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v+ " <<
276 std::endl;
277 std::cout << " +--- ---+ " <<
278 std::endl;
279 std::cout << " +--- BgsTransportation ---+ " <<
280 std::endl;
281 std::cout << " +--- USED !! ---+ " <<
282 std::endl;
283 std::cout << " +--- ---+ " <<
284 std::endl;
285 std::cout << "+^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^+ " <<
286 std::endl;
287 std::cout << "+v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v+ " <<
288 std::endl;
289
290 }
291 else {
292 */
293 /*
294 AddTransportation();
295 std::cout << "+^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^+ " <<
296 std::endl;
297 std::cout << "+v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v+ " <<
298 std::endl;
299 std::cout << " +--- ---+ " <<
300 std::endl;
301 std::cout << " +--- G4Transportation ---+ " <<
302 std::endl;
303 std::cout << " +--- USED !! ---+ " <<
304 std::endl;
305 std::cout << " +--- ---+ " <<
306 std::endl;
307 std::cout << "+^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^+ " <<
308 std::endl;
309 std::cout << "+v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v+ " <<
310 std::endl;
311// }
312 // AddParameterisation();
313 ConstructEM();
314 ConstructLeptHad();
315 ConstructHad();
316 ConstructGeneral();
317 ConstructNeutrinoGenocide();
318 ConstructIonFix();
319 ConstructNeutronFix();*/
320}
321/*
322void
323BgsPhysicsList::AddBgsTransportation( G4double maxTrackStepSize, G4double
324maxVacStepSize, const G4String& vacName )
325{
326 static const bool beParanoid = false;
327 BgsTransportation *theTransportationProcess =
328 new BgsLimitedTransportation(maxTrackStepSize*mm, maxVacStepSize*mm,
329vacName, beParanoid );
330
331 // loop over all particles in G4ParticleTable
332 theParticleIterator->reset();
333 while( (*theParticleIterator)() ){
334 G4ParticleDefinition* particle = theParticleIterator->value();
335 G4ProcessManager* pmanager = particle->GetProcessManager();
336 if (!particle->IsShortLived()) {
337 // Add transportation process for all particles other than
338"shortlived"
339 if ( pmanager == 0) {
340 // Error !! no process manager
341 ErrMsg(fatal) << "G4VUserPhysicsList::AddTransportation : no process
342manager" << endmsg;
343 } else {
344 // add transportation with ordering = ( -1, "first", "first" )
345 pmanager ->AddProcess(theTransportationProcess);
346 pmanager ->SetProcessOrderingToFirst(theTransportationProcess,
347 idxAlongStep);
348 pmanager ->SetProcessOrderingToFirst(theTransportationProcess,
349 idxPostStep);
350 physicsRegistrar->Register( theTransportationProcess, pmanager,
351 "transport" );
352 }
353 } else {
354 // shortlived particle case
355 }
356 }
357}
358*/
359// **************************** EM Processes********************************
360
362 /* theParticleIterator->reset();
363 while( (*theParticleIterator)() ){
364 G4ParticleDefinition* particle = theParticleIterator->value();
365 G4ProcessManager* pmanager = particle->GetProcessManager();
366 G4String particleName = particle->GetParticleName();
367
368 if (particleName == "gamma") {
369 // gamma
370 // Construct processes for gamma
371
372 pmanager->AddDiscreteProcess( new G4PhotoElectricEffect());
373 pmanager->AddDiscreteProcess( new G4ComptonScattering());
374 pmanager->AddDiscreteProcess( new G4GammaConversion());
375
376 } else if (particleName == "e-") {
377 //electron
378 // Construct processes for electron
379 //change for geant4.9.0.p01
380 //G4MultipleScattering* ms = new G4MultipleScattering();
381 ms->MscStepLimitation(false,0.02);
382 ms->SetRangeFactor(0.02);
383
384 // ms->SetLateralDisplasmentFlag(false);
385
386 G4eIonisation *ionizationProcess = new G4eIonisation();
387 // ionizationProcess->SetLinearLossLimit(1.0);
388
389 pmanager->AddProcess( ms, -1, 1,1);
390 pmanager->AddProcess( ionizationProcess, -1, 2,2);
391 pmanager->AddProcess( new G4eBremsstrahlung(), -1,-1,3);
392
393 } else if (particleName == "e+") {
394 //positron
395 // Construct processes for positron
396
397 //change for geant4.9.p01
398 G4MultipleScattering* ms = new G4MultipleScattering();
399 //ms->MscStepLimitation(false,0.02);
400 ms->SetRangeFactor(0.02);
401
402 // ms->SetLateralDisplasmentFlag(false);
403
404 G4eIonisation *ionizationProcess = new G4eIonisation();
405 // ionizationProcess->SetLinearLossLimit(1.0);
406
407 pmanager->AddProcess( ms, -1, 1,1);
408 pmanager->AddProcess( ionizationProcess, -1, 2,2);
409 pmanager->AddProcess( new G4eBremsstrahlung(), -1,-1,3);
410 pmanager->AddProcess( new G4eplusAnnihilation(), 0,-1,4);
411
412 } else if( particleName == "mu+" ||
413 particleName == "mu-" ) {
414 //muon
415 // Construct processes for muon+
416
417 //change for geant4.9.0.p01
418 G4MultipleScattering* ms = new G4MultipleScattering();
419 //ms->MscStepLimitation(false,0.02);
420 ms->SetRangeFactor(0.02);
421
422 // ms->SetLateralDisplasmentFlag(false);
423
424 G4MuIonisation *ionizationProcess = new G4MuIonisation();
425 // ionizationProcess->SetLinearLossLimit(1.0);
426
427 pmanager->AddProcess( ms, -1, 1,1);
428 pmanager->AddProcess( ionizationProcess, -1, 2,2);
429 pmanager->AddProcess( new G4MuBremsstrahlung(), -1,-1,3);
430 pmanager->AddProcess( new G4MuPairProduction(), -1,-1,4);
431
432 } else if ((!particle->IsShortLived()) &&
433 (particle->GetPDGCharge() != 0.0) &&
434 (particle->GetParticleName() != "chargedgeantino")) {
435 // all others charged particles except geantino
436 G4int AP=1;
437 if (particle->GetParticleName() == "GenericIon") {
438 //ostream& o = ErrMsg(warning);
439 std::cerr
440 <<"*********************************************************************" <<std::endl;
441 std::cerr << "*** Disabling G4MultipleScattering process for particle "
442 <<particle->GetParticleName() << std::endl; std::cerr
443 <<"*********************************************************************" <<std::endl; }
444 else {
445 //change for Geant4.9.0.p01
446 G4MultipleScattering* ms = new G4MultipleScattering();
447 //ms->MscStepLimitation(false,0.02);
448 ms->SetRangeFactor(0.02);
449
450 // ms->SetLateralDisplasmentFlag(false);
451 pmanager->AddProcess( ms, -1,AP,AP);
452 AP++;
453 }
454 G4hIonisation *ionizationProcess = new G4hIonisation();
455 // ionizationProcess->SetLinearLossLimit(1.0);
456
457 pmanager->AddProcess( ionizationProcess, -1,AP,AP);
458 }
459 }*/
460}
461
462/*
463void BgsPhysicsList::AddProcess( G4VProcess *process,
464 G4int ordAtRestDoIt,
465 G4int ordAlongStepDoIt,
466 G4int ordPostStepDoIt,
467 G4ProcessManager *manager,
468 const char *category,
469 GVertex::Cause cause )
470{
471 manager->AddProcess( process, ordAtRestDoIt, ordAlongStepDoIt,
472 ordPostStepDoIt );
473 physicsRegistrar->Register( process, manager, category, cause );
474}
475
476
477void BgsPhysicsList::AddDiscreteProcess( G4VProcess *process,
478 G4ProcessManager *manager,
479 const char *category,
480 GVertex::Cause cause )
481{
482 manager->AddDiscreteProcess( process );
483 physicsRegistrar->Register( process, manager, category, cause );
484}
485
486
487void BgsPhysicsList::AddElasticHadronProcess(G4HadronElasticProcess
488*process,
489 G4LElastic *model,
490 G4ProcessManager *manager,
491 const char *category,
492 GVertex::Cause cause )
493{
494 process->RegisterMe(model); // Register interaction model with process
495 manager->AddDiscreteProcess(process);
496 physicsRegistrar->Register(process,manager,category,cause);
497}
498*/
499
501
502// ************************** Parameterisation******************************
503/*
504void
505BgsPhysicsList::AddParameterisation()
506{
507 G4FastSimulationManagerProcess* theFastSimulationManagerProcess =
508 new G4FastSimulationManagerProcess();
509 theParticleIterator->reset();
510 while( (*theParticleIterator)() ){
511 G4ParticleDefinition* particle = theParticleIterator->value();
512 G4ProcessManager* pmanager = particle->GetProcessManager();
513 pmanager->AddDiscreteProcess( theFastSimulationManagerProcess );
514 }
515}
516*/
517// ************************** Generic Processes******************************
518
520 /* // Add Decay Process
521 G4Decay* theDecayProcess = new G4Decay();
522 theParticleIterator->reset();
523 while( (*theParticleIterator)() ){
524 G4ParticleDefinition* particle = theParticleIterator->value();
525 G4ProcessManager* pmanager = particle->GetProcessManager();
526 if (theDecayProcess->IsApplicable(*particle)) {
527 pmanager ->AddProcess( theDecayProcess );
528 // set ordering for PostStepDoIt and AtRestDoIt
529 pmanager ->SetProcessOrdering(theDecayProcess, idxPostStep);
530 pmanager ->SetProcessOrdering(theDecayProcess, idxAtRest);
531 // physicsRegistrar->
532 // Register( theDecayProcess, pmanager, "dcay", GVertex::decay );
533 }
534 }*/
535 /*
536 if (control->GetLooperCut()>0) {
537
538 // Set special process to kill loopers
539 theLooperDeath = new BgsLooperDeath( control->GetLooperCut()*MeV );
540 theParticleIterator->reset();
541 while( (*theParticleIterator)() ){
542 G4ParticleDefinition* particle = theParticleIterator->value();
543 if (theLooperDeath->IsApplicable(*particle)) {
544 G4ProcessManager* pmanager = particle->GetProcessManager();
545 pmanager->AddProcess(theLooperDeath, -1, -1, 5);
546 physicsRegistrar->
547 Register( theLooperDeath, pmanager, "loop", GVertex::looperDeath
548 );
549 }
550 }
551 ErrMsg(warning) << "Loopers with pt < " << control->GetLooperCut()
552 << " MeV will be killed" << endmsg;
553 }
554
555 if (control->GetMaxNumberOfSteps()>0) {
556
557 //
558 // Set special process to kill runaway particles
559 // Only needed if dE/dx is turned off!
560 //
561 // Do not abuse!
562 //
563 theStepDeath = new BgsChargedStepDeath( control->GetMaxNumberOfSteps()
564 );
565
566 theParticleIterator->reset();
567 while( (*theParticleIterator)() ){
568 G4ParticleDefinition* particle = theParticleIterator->value();
569 if (theStepDeath->IsApplicable(*particle)) {
570 G4ProcessManager* pmanager = particle->GetProcessManager();
571 pmanager->AddProcess(theStepDeath, -1, -1, 5);
572 physicsRegistrar->
573 Register( theStepDeath, pmanager, "maxStep", GVertex::runAway );
574 }
575 }
576 ErrMsg(warning)
577 << "\n Charged particles will be killed if they take more than "
578 << control->GetMaxNumberOfSteps() << " steps.\n"
579 << " If you do not understand this message, you should be very
580 concerned.\n"
581 << " If this message appears in production, you should be very
582 upset." << endmsg;
583 }
584 */
585}
586
587// ************************** Hadronic Processes******************************
588
590 //
591 // Gamma-nuclear process
592 //
593
594 // low energy part
595 /* G4GammaNuclearReaction* lowEGammaModel = new G4GammaNuclearReaction();
596 lowEGammaModel->SetMaxEnergy(3.5*GeV);
597 G4PhotoNuclearProcess* thePhotoNuclearProcess = new
598 G4PhotoNuclearProcess();
599 thePhotoNuclearProcess->RegisterMe(lowEGammaModel);
600 */
601 // bias the cross section
602 //
603 /* double thePhotoNuclearBias = control->GetPhotoNuclearBias();
604 if (thePhotoNuclearBias != 1.) {
605 thePhotoNuclearProcess->BiasCrossSectionByFactor(thePhotoNuclearBias);
606
607 // print out a warning if biasing
608 //
609 ErrMsg(warning) << "*** Biasing the photo-nuclear process by factor "
610 << thePhotoNuclearBias << endmsg;
611 }
612 */
613 // high energy part
614 /*G4TheoFSGenerator* highEGammaModel = new G4TheoFSGenerator();
615 G4GeneratorPrecompoundInterface* preComModel =
616 new G4GeneratorPrecompoundInterface();
617 highEGammaModel->SetTransport(preComModel);
618
619 G4QGSModel<G4GammaParticipants>* theStringModel =
620 new G4QGSModel<G4GammaParticipants>;
621 G4QGSMFragmentation* fragModel = new G4QGSMFragmentation();
622 G4ExcitedStringDecay* stringDecay =
623 new G4ExcitedStringDecay(fragModel);
624 theStringModel->SetFragmentationModel(stringDecay);
625
626 highEGammaModel->SetHighEnergyGenerator(theStringModel);
627 highEGammaModel->SetMinEnergy(3.*GeV);
628 highEGammaModel->SetMaxEnergy(20.*GeV);
629
630 thePhotoNuclearProcess->RegisterMe(highEGammaModel);
631
632 G4ProcessManager* gamMan = G4Gamma::Gamma()->GetProcessManager();
633
634 gamMan->AddDiscreteProcess(thePhotoNuclearProcess);
635 //
636 // Electron-nuclear process
637 //
638 G4ElectroNuclearReaction* theElectronReaction =
639 new G4ElectroNuclearReaction();
640 G4ElectronNuclearProcess* theElectronNuclearProcess =
641 new G4ElectronNuclearProcess();
642 theElectronNuclearProcess->RegisterMe(theElectronReaction);
643
644 G4ProcessManager* electronMan =
645G4Electron::Electron()->GetProcessManager();
646
647 electronMan->AddProcess(theElectronNuclearProcess, -1, -1, 4);
648*/
649 // bias the cross section
650 //
651 /*
652 G4double theElectroNuclearBias = control->GetElectroNuclearBias();
653 if (theElectroNuclearBias != 1.) {
654
655 theElectronNuclearProcess->BiasCrossSectionByFactor(theElectroNuclearBias);
656
657 // print out a warning if biasing
658 //
659 ErrMsg(warning) << "*** Biasing the electron-nuclear process by factor "
660 << theElectroNuclearBias << endmsg;
661 }
662 */
663 //
664 // Positron-nuclear process
665 //
666 /*G4PositronNuclearProcess* thePositronNuclearProcess =
667 new G4PositronNuclearProcess();
668 thePositronNuclearProcess->RegisterMe(theElectronReaction);
669
670 G4ProcessManager* positronMan =
671G4Positron::Positron()->GetProcessManager();
672 positronMan->AddProcess(thePositronNuclearProcess, -1, -1, 5);
673*/
674 // bias the cross section
675 //
676 /*
677 if (theElectroNuclearBias != 1.) {
678
679 thePositronNuclearProcess->BiasCrossSectionByFactor(theElectroNuclearBias);
680 ErrMsg(warning) << "*** Biasing the positron-nuclear process by factor "
681 << theElectroNuclearBias << endmsg;
682 }
683 */
684}
685
687 // One process handles hadronic elastic processes for all hadrons.
688 // However hadronic inelastic processes are unique to each hadron.
689
690 // For pi+ and pi- only, substitute pi-Nuclear cross sections
691 /* G4PiNuclearCrossSection* piNucCS = new G4PiNuclearCrossSection();
692
693 theParticleIterator->reset();
694 while( (*theParticleIterator)() ){
695 G4ParticleDefinition* particle = theParticleIterator->value();
696 G4ProcessManager* pmanager = particle->GetProcessManager();
697 G4String particleName = particle->GetParticleName();
698 // *******
699 // * pi+ *
700 // *******
701 if (particleName == "pi+") {
702
703 // Elastic process
704 G4HadronElasticProcess *process = new G4HadronElasticProcess();
705 G4LElastic *model = new G4LElastic();
706 process->RegisterMe(model);
707 pmanager->AddDiscreteProcess(process);
708
709 // Inelastic process
710
711 G4PionPlusInelasticProcess *inel_process = new
712 G4PionPlusInelasticProcess();
713 inel_process->AddDataSet(piNucCS);
714 inel_process->RegisterMe(bertini_model);
715 pmanager->AddDiscreteProcess(inel_process);
716 // physicsRegistrar->Register(inel_process,pmanager,"hadi",
717 // GVertex::hadronInelastic);
718 // *******
719 // * pi- *
720 // *******
721 } else if (particleName == "pi-") {
722
723 // Elastic process
724 G4HadronElasticProcess *process = new G4HadronElasticProcess();
725 G4LElastic *model = new G4LElastic();
726 process->RegisterMe(model);
727 pmanager->AddDiscreteProcess(process);
728
729 // Inelastic process
730
731 G4PionMinusInelasticProcess *inel_process = new
732 G4PionMinusInelasticProcess();
733 inel_process->AddDataSet(piNucCS);
734 inel_process->RegisterMe(bertini_model);
735 pmanager->AddDiscreteProcess(inel_process);
736 // physicsRegistrar->Register(inel_process,pmanager,"hadi",
737 // GVertex::hadronInelastic);
738 // *******
739 // * K+ *
740 // *******
741 } else if (particleName == "kaon+") {
742
743 // Elastic process
744 G4HadronElasticProcess *process = new G4HadronElasticProcess();
745 G4LElastic *model = new G4LElastic();
746 process->RegisterMe(model);
747 pmanager->AddDiscreteProcess(process);
748
749 // Inelastic process
750
751 G4KaonPlusInelasticProcess* inel_process = new
752 G4KaonPlusInelasticProcess();
753 inel_process->RegisterMe(bertini_model);
754 pmanager->AddDiscreteProcess(inel_process);
755 // physicsRegistrar->Register(inel_process,pmanager,"hadi",
756 // GVertex::hadronInelastic);
757 // *******
758 // * K- *
759 // *******
760 } else if (particleName == "kaon-") {
761
762 // Elastic process
763 G4HadronElasticProcess *process = new G4HadronElasticProcess();
764 G4LElastic *model = new G4LElastic();
765 process->RegisterMe(model);
766 pmanager->AddDiscreteProcess(process);
767
768 // Inelastic process
769
770 G4KaonMinusInelasticProcess* inel_process = new
771 G4KaonMinusInelasticProcess();
772 inel_process->RegisterMe(bertini_model);
773 pmanager->AddDiscreteProcess(inel_process);
774 // physicsRegistrar->Register(inel_process,pmanager,"hadi",
775 // GVertex::hadronInelastic);
776 // *******
777 // * K0L *
778 // *******
779 } else if (particleName == "kaon0L") {
780
781 // Elastic process
782 G4HadronElasticProcess *process = new G4HadronElasticProcess();
783 G4LElastic *model = new G4LElastic();
784 process->RegisterMe(model);
785 pmanager->AddDiscreteProcess(process);
786
787 // Inelastic process
788
789 G4KaonZeroLInelasticProcess* inel_process = new
790 G4KaonZeroLInelasticProcess();
791 inel_process->RegisterMe(bertini_model);
792 pmanager->AddDiscreteProcess(inel_process);
793 // physicsRegistrar->Register(inel_process,pmanager,"hadi",
794 // GVertex::hadronInelastic);
795 // *******
796 // * K0S *
797 // *******
798 } else if (particleName == "kaon0S") {
799
800 // Elastic process
801 G4HadronElasticProcess *process = new G4HadronElasticProcess();
802 G4LElastic *model = new G4LElastic();
803 process->RegisterMe(model);
804 pmanager->AddDiscreteProcess(process);
805
806 // Inelastic process
807
808 G4KaonZeroSInelasticProcess* inel_process =
809 new G4KaonZeroSInelasticProcess();
810 inel_process->RegisterMe(bertini_model);
811 pmanager->AddDiscreteProcess(inel_process);
812 // physicsRegistrar->Register(inel_process,pmanager,"hadi",
813 // GVertex::hadronInelastic);
814 // *******
815 // * p *
816 // *******
817 } else if (particleName == "proton") {
818
819 // Elastic process
820 G4HadronElasticProcess *process = new G4HadronElasticProcess();
821 G4LElastic *model = new G4LElastic();
822 process->RegisterMe(model);
823 pmanager->AddDiscreteProcess(process);
824
825 // Inelastic process
826
827 G4ProtonInelasticProcess *inel_process = new
828 G4ProtonInelasticProcess();
829 inel_process->RegisterMe(bertini_model);
830 pmanager->AddDiscreteProcess(inel_process);
831 // physicsRegistrar->Register(inel_process,pmanager,"hadi",
832 // GVertex::hadronInelastic);
833 // *********
834 // * p-bar *
835 // *********
836 } else if (particleName == "anti_proton") {
837
838 // Elastic process
839 G4HadronElasticProcess *process = new G4HadronElasticProcess();
840 G4LElastic *model = new G4LElastic();
841 process->RegisterMe(model);
842 pmanager->AddDiscreteProcess(process);
843
844 // Inelastic process
845
846 G4AntiProtonInelasticProcess *inel_process =
847 new G4AntiProtonInelasticProcess();
848 G4LEAntiProtonInelastic *inel_model = new G4LEAntiProtonInelastic();
849 inel_process->RegisterMe(inel_model);
850 pmanager->AddDiscreteProcess(inel_process);
851 // physicsRegistrar->Register(inel_process,pmanager,"hadi",
852 // GVertex::hadronInelastic);
853 // *******
854 // * n *
855 // *******
856 } else if (particleName == "neutron") {
857
858 //if (control->UseHPNeutrons()) {
859 if(1){
860 G4cout << "High precision neutron models chosen" << G4endl;
861
862 putenv("G4NEUTRONHPDATA=/afs/ihep.ac.cn/bes3/offline/sw/packages/geant4/4.9.0/slc4_ia32_gcc346/geant4.9.0.p01/data/G4NDL3.11/");
863
864 // Elastic process
865 G4HadronElasticProcess* el_process = new G4HadronElasticProcess();
866
867 // High precision model and data below 20 MeV
868 G4NeutronHPElastic* hpel_model = new G4NeutronHPElastic();
869 G4NeutronHPElasticData* el_data = new G4NeutronHPElasticData();
870 el_process->AddDataSet(el_data);
871 el_process->RegisterMe(hpel_model);
872
873 // LEP model above 20 MeV
874 G4LElastic* el_model = new G4LElastic();
875 el_model->SetMinEnergy(19.9*MeV);
876 el_process->RegisterMe(el_model);
877
878 pmanager->AddDiscreteProcess(el_process);
879 //physicsRegistrar->Register(el_process,pmanager,"hade",
880 // GVertex::hadronElastic);
881
882 // Inelastic process
883 G4NeutronInelasticProcess* inel_process =
884 new G4NeutronInelasticProcess();
885
886 // High precision model and data below 20 MeV
887 G4NeutronHPInelastic* hpinel_model = new G4NeutronHPInelastic();
888 G4NeutronHPInelasticData* hpinel_data = new
889 G4NeutronHPInelasticData();
890 inel_process->AddDataSet(hpinel_data);
891 inel_process->RegisterMe(hpinel_model);
892
893 // Bertini model above 20 MeV
894 G4CascadeInterface* neutron_bertini = new G4CascadeInterface;
895 neutron_bertini->SetMinEnergy(19.9*MeV);
896 inel_process->RegisterMe(neutron_bertini);
897
898 pmanager->AddDiscreteProcess(inel_process);
899 //physicsRegistrar->Register(inel_process,pmanager,"hadi",
900 // GVertex::hadronInelastic);
901
902 // Capture process
903 G4HadronCaptureProcess* cap_process = new G4HadronCaptureProcess();
904
905 // High precision model and data below 20 MeV
906 G4NeutronHPCapture* hpcap_model = new G4NeutronHPCapture();
907 G4NeutronHPCaptureData* hpcap_data = new G4NeutronHPCaptureData();
908 cap_process->AddDataSet(hpcap_data);
909 cap_process->RegisterMe(hpcap_model);
910
911 // LEP model above 20 MeV - default cross sections are used here
912 // hence no need to explicitly invoke AddDataSet method
913 G4LCapture* cap_model = new G4LCapture();
914 cap_model->SetMinEnergy(19.9*MeV);
915 cap_process->RegisterMe(cap_model);
916
917 pmanager->AddDiscreteProcess(cap_process);
918 // Note: need to update GVertex to include hadronCapture
919 // physicsRegistrar->Register(cap_process,pmanager,"hadi",
920 // GVertex::hadronInelastic);
921
922 // Fission process
923 G4HadronFissionProcess* fis_process = new G4HadronFissionProcess();
924
925 // High precision model and data below 20 MeV
926 G4NeutronHPFission* hpfis_model = new G4NeutronHPFission();
927 G4NeutronHPFissionData* hpfis_data = new G4NeutronHPFissionData();
928 fis_process->AddDataSet(hpfis_data);
929 fis_process->RegisterMe(hpfis_model);
930
931 // LEP model above 20 MeV - default cross sections are used here
932 // hence no need to explicitly invoke AddDataSet method
933 G4LFission* fis_model = new G4LFission();
934 fis_model->SetMinEnergy(19.9*MeV);
935 fis_process->RegisterMe(fis_model);
936
937 pmanager->AddDiscreteProcess(fis_process);
938 // Note: need to update GVertex to include hadronFission
939 // physicsRegistrar->Register(fis_process,pmanager,"hadi",
940 // GVertex::hadronInelastic);
941
942 } else {
943
944 // Elastic process
945 G4HadronElasticProcess *process = new G4HadronElasticProcess();
946 G4LElastic *model = new G4LElastic();
947 process->RegisterMe(model);
948 pmanager->AddDiscreteProcess(process);
949
950 // Inelastic process
951 G4NeutronInelasticProcess *inel_process =
952 new G4NeutronInelasticProcess();
953 inel_process->RegisterMe(bertini_model);
954 pmanager->AddDiscreteProcess(inel_process);
955 // physicsRegistrar->Register(inel_process,pmanager,"hadi",
956 // GVertex::hadronInelastic);
957 }
958 // *********
959 // * n-bar *
960 // *********
961 } else if (particleName == "anti_neutron") {
962
963 // Elastic process
964 G4HadronElasticProcess *process = new G4HadronElasticProcess();
965 G4LElastic *model = new G4LElastic();
966 process->RegisterMe(model);
967 pmanager->AddDiscreteProcess(process);
968
969 // Inelastic process
970
971 G4AntiNeutronInelasticProcess *inel_process =
972 new G4AntiNeutronInelasticProcess();
973 G4LEAntiNeutronInelastic *inel_model = new G4LEAntiNeutronInelastic();
974 inel_process->RegisterMe(inel_model);
975 pmanager->AddDiscreteProcess(inel_process);
976 // physicsRegistrar->Register(inel_process,pmanager,"hadi",
977 // GVertex::hadronInelastic);
978 // **********
979 // * lambda *
980 // **********
981 } else if (particleName == "lambda") {
982
983 // Elastic process
984 G4HadronElasticProcess *process = new G4HadronElasticProcess();
985 G4LElastic *model = new G4LElastic();
986 process->RegisterMe(model);
987 pmanager->AddDiscreteProcess(process);
988
989 // Inelastic process
990
991 G4LambdaInelasticProcess* inel_process = new
992 G4LambdaInelasticProcess();
993 inel_process->RegisterMe(bertini_model);
994 pmanager->AddDiscreteProcess(inel_process);
995 // physicsRegistrar->Register(inel_process,pmanager,"hadi",
996 // GVertex::hadronInelastic);
997 // **************
998 // * lambda-bar *
999 // **************
1000 } else if (particleName == "anti_lambda") {
1001
1002 // Elastic process
1003 G4HadronElasticProcess *process = new G4HadronElasticProcess();
1004 G4LElastic *model = new G4LElastic();
1005 process->RegisterMe(model);
1006 pmanager->AddDiscreteProcess(process);
1007
1008 // Inelastic process
1009
1010 G4AntiLambdaInelasticProcess *inel_process =
1011 new G4AntiLambdaInelasticProcess();
1012 G4LEAntiLambdaInelastic *inel_model = new G4LEAntiLambdaInelastic();
1013 inel_process->RegisterMe(inel_model);
1014 pmanager->AddDiscreteProcess(inel_process);
1015 // physicsRegistrar->Register(inel_process,pmanager,"hadi",
1016 // GVertex::hadronInelastic);
1017 // **************
1018 // * deuteron *
1019 // **************
1020 } else if (particleName == "deuteron") {
1021
1022 // Elastic process
1023 G4HadronElasticProcess *process = new G4HadronElasticProcess();
1024 G4LElastic *model = new G4LElastic();
1025 process->RegisterMe(model);
1026 pmanager->AddDiscreteProcess(process);
1027
1028 // Inelastic process
1029
1030 G4DeuteronInelasticProcess *inel_process =
1031 new G4DeuteronInelasticProcess();
1032 G4LEDeuteronInelastic *inel_model = new G4LEDeuteronInelastic();
1033 inel_process->RegisterMe(inel_model);
1034 pmanager->AddDiscreteProcess(inel_process);
1035 // physicsRegistrar->Register(inel_process,pmanager,"hadi",
1036 // GVertex::hadronInelastic);
1037 // **************
1038 // * triton *
1039 // **************
1040 } else if (particleName == "triton") {
1041
1042 // Elastic process
1043 G4HadronElasticProcess *process = new G4HadronElasticProcess();
1044 G4LElastic *model = new G4LElastic();
1045 process->RegisterMe(model);
1046 pmanager->AddDiscreteProcess(process);
1047
1048 // Inelastic process
1049
1050 G4TritonInelasticProcess *inel_process =
1051 new G4TritonInelasticProcess();
1052 G4LETritonInelastic *inel_model = new G4LETritonInelastic();
1053 inel_process->RegisterMe(inel_model);
1054 pmanager->AddDiscreteProcess(inel_process);
1055 // physicsRegistrar->Register(inel_process,pmanager,"hadi",
1056 // GVertex::hadronInelastic);
1057 // **************
1058 // * alpha *
1059 // **************
1060 } else if (particleName == "alpha") {
1061
1062 // Elastic process
1063 G4HadronElasticProcess *process = new G4HadronElasticProcess();
1064 G4LElastic *model = new G4LElastic();
1065 process->RegisterMe(model);
1066 pmanager->AddDiscreteProcess(process);
1067
1068 // Inelastic process
1069
1070 G4AlphaInelasticProcess *inel_process = new G4AlphaInelasticProcess();
1071 G4LEAlphaInelastic *inel_model = new G4LEAlphaInelastic();
1072 inel_process->RegisterMe(inel_model);
1073 pmanager->AddDiscreteProcess(inel_process);
1074 // physicsRegistrar->Register(inel_process,pmanager,"hadi",
1075 // GVertex::hadronInelastic);
1076 }
1077 } // while */
1078}
1079
1080//
1081// ConstructNeutrinoGenocide
1082//
1084 /* BgsGenocide *genocide = new BgsGenocide();
1085
1086 theParticleIterator->reset();
1087 while( (*theParticleIterator)() ){
1088 G4ParticleDefinition* particle = theParticleIterator->value();
1089 G4ProcessManager* pmanager = particle->GetProcessManager();
1090 G4String particleName = particle->GetParticleName();
1091
1092 if (particleName == "nu_e" ||
1093 particleName == "nu_mu" ||
1094 particleName == "nu_tau" ||
1095 particleName == "anti_nu_e" ||
1096 particleName == "anti_nu_mu" ||
1097 particleName == "anti_nu_tau" ||
1098
1099 // temporary fix for K0, K0bar until CHIPS photonuclear model isfixed
1100
1101 particleName == "kaon0" ||
1102 particleName == "anti_kaon0" ) {
1103
1104 pmanager->AddProcess(genocide, -1, -1, 5);
1105 // physicsRegistrar->Register( genocide, pmanager, "neutrinoDeath",
1106 // GVertex::neutrino );
1107 }
1108 }*/
1109}
1110
1111//
1112// ConstructIonFix
1113//
1115 BgsGenocide *genocide = new
1116 //BgsGentleGenocide(control->GetIonEnergyCut()*MeV,
1117 // 60);
1118 BgsGentleGenocide(0.01*MeV,
1119 60);
1120
1121 theParticleIterator->reset();
1122 while( (*theParticleIterator)() ){
1123 G4ParticleDefinition* particle =
1124 theParticleIterator->value(); G4ProcessManager*
1125 pmanager = particle->GetProcessManager(); G4String
1126 particleName = particle->GetParticleName();
1127
1128 if ( particleName == "triton" ||
1129 particleName == "alpha" ||
1130 particleName == "proton" ||
1131 particleName == "deuteron" ) {
1132
1133 pmanager->AddProcess(genocide, -1, -1, 5);
1134 // physicsRegistrar->Register( genocide,
1135 pmanager, "ionFix",
1136 // GVertex::minimumEnergy );
1137 }
1138 }*/
1139}
1140
1141//
1142// ConstructNeutronFix
1143//
1145 BgsGenocide *genocide = new
1146 BgsGentleGenocide(0.01*MeV,0);
1147
1148 theParticleIterator->reset();
1149 while( (*theParticleIterator)() ){
1150 G4ParticleDefinition* particle =
1151 theParticleIterator->value(); G4ProcessManager*
1152 pmanager = particle->GetProcessManager(); G4String
1153 particleName = particle->GetParticleName();
1154
1155 if ( particleName == "neutron" ) {
1156
1157 pmanager->AddProcess(genocide, -1, -1, 1);
1158 // physicsRegistrar->Register( genocide,
1159 pmanager, "neutronFix",
1160 // GVertex::minimumEnergy );
1161 }
1162 }*/
1163}
1164
1165// ****************************** Cuts***************************************
1166
1168 // Set default cuts, all volumes
1169
1170 SetDefaultCutValue(0.7*mm);
1171 SetCutsWithDefault();
1172 */
1173 // Enable print out of cuts after tables are built
1174 // This is now done in BgsRunAction
1175 //
1176 // if (verboseLevel > 1) DumpCutValuesTable();
1177}
virtual ~BgsPhysicsList()
void ConstructNeutrinoGenocide()