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