00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012 const int DEBUG = 0;
00013
00014 #include "BDSGlobalConstants.hh"
00015 #include "BDSPhysicsList.hh"
00016
00017 #include "globals.hh"
00018 #include "G4ParticleDefinition.hh"
00019 #include "G4ParticleWithCuts.hh"
00020 #include "G4ProcessManager.hh"
00021 #include "G4ProcessVector.hh"
00022 #include "G4ParticleTypes.hh"
00023 #include "G4ParticleTable.hh"
00024
00025 #include "G4Material.hh"
00026 #include "G4MaterialTable.hh"
00027 #include "G4ios.hh"
00028 #include <iomanip>
00029
00030
00031
00032
00033
00034 #include "HadronPhysicsLHEP.hh"
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046 #include "G4ComptonScattering.hh"
00047 #include "G4GammaConversion.hh"
00048 #include "G4PhotoElectricEffect.hh"
00049 #include "BDSGammaConversionToMuons.hh"
00050
00051
00052 #include "G4MultipleScattering.hh"
00053 #include "G4Cerenkov.hh"
00054
00055
00056 #include "G4eIonisation.hh"
00057 #include "G4eBremsstrahlung.hh"
00058 #include "G4eplusAnnihilation.hh"
00059
00060
00061 #include "G4MuIonisation.hh"
00062 #include "G4MuBremsstrahlung.hh"
00063 #include "G4MuPairProduction.hh"
00064 #include "G4MuonNucleusProcess.hh"
00065
00066
00067 #include "G4hIonisation.hh"
00068 #include "G4ionIonisation.hh"
00069
00070
00071
00072
00073
00074
00075
00076 #include "G4LowEnergyRayleigh.hh"
00077 #include "G4LowEnergyPhotoElectric.hh"
00078 #include "G4LowEnergyCompton.hh"
00079 #include "G4LowEnergyGammaConversion.hh"
00080
00081
00082 #include "G4LowEnergyIonisation.hh"
00083 #include "G4LowEnergyBremsstrahlung.hh"
00084 #include "G4AnnihiToMuPair.hh"
00085
00086
00087 #include "G4hLowEnergyIonisation.hh"
00088
00089
00090
00091 #include "BDSLaserCompton.hh"
00092
00093 #include "BDSSynchrotronRadiation.hh"
00094 #include "BDSContinuousSR.hh"
00095
00096
00097
00098
00099
00100
00101 #include "G4StepLimiter.hh"
00102
00103
00104
00105
00106
00107 #include "G4TheoFSGenerator.hh"
00108 #include "G4GeneratorPrecompoundInterface.hh"
00109 #include "G4QGSModel.hh"
00110 #include "G4GammaParticipants.hh"
00111 #include "G4QGSMFragmentation.hh"
00112 #include "G4ExcitedStringDecay.hh"
00113
00114 #include "G4GammaNuclearReaction.hh"
00115 #include "G4ElectroNuclearReaction.hh"
00116 #include "G4PhotoNuclearProcess.hh"
00117 #include "G4ElectronNuclearProcess.hh"
00118 #include "G4PositronNuclearProcess.hh"
00119
00120
00121
00122
00123
00124
00125
00126 #include "G4ChargedGeantino.hh"
00127 #include "G4Geantino.hh"
00128 #include "G4Gamma.hh"
00129 #include "G4OpticalPhoton.hh"
00130
00131
00132 #include "G4MuonPlus.hh"
00133 #include "G4MuonMinus.hh"
00134 #include "G4NeutrinoMu.hh"
00135 #include "G4AntiNeutrinoMu.hh"
00136
00137 #include "G4Electron.hh"
00138 #include "G4Positron.hh"
00139 #include "G4NeutrinoE.hh"
00140 #include "G4AntiNeutrinoE.hh"
00141
00142
00143 #include "G4MesonConstructor.hh"
00144 #include "G4BaryonConstructor.hh"
00145 #include "G4IonConstructor.hh"
00146
00147
00148 #include "G4ShortLivedConstructor.hh"
00149
00150
00151 extern G4bool verbose;
00152
00153 BDSPhysicsList::BDSPhysicsList(): G4VUserPhysicsList()
00154 {
00155
00156
00157 defaultCutValue = 0.7*mm;
00158
00159 SetVerboseLevel(1);
00160
00161 }
00162
00163 BDSPhysicsList::~BDSPhysicsList()
00164 {
00165 }
00166
00167 void BDSPhysicsList::ConstructProcess()
00168 {
00169
00170 AddTransportation();
00171
00172
00173 if(BDSGlobals->GetPhysListName() == "em_standard")
00174 {
00175 ConstructEM();
00176 if(BDSGlobals->GetSynchRadOn()) ConstructSR();
00177 return;
00178 }
00179
00180 if(BDSGlobals->GetPhysListName() == "merlin")
00181 {
00182 ConstructMerlin();
00183 if(BDSGlobals->GetSynchRadOn()) ConstructSR();
00184 return;
00185 }
00186
00187
00188 if(BDSGlobals->GetPhysListName() == "em_low")
00189 {
00190 ConstructEM_Low_Energy();
00191 if(BDSGlobals->GetSynchRadOn()) ConstructSR();
00192 return;
00193 }
00194
00195
00196 if(BDSGlobals->GetPhysListName() == "em_muon")
00197 {
00198 ConstructMuon();
00199 return;
00200 }
00201
00202
00203 if(BDSGlobals->GetPhysListName() == "hadronic_standard")
00204 {
00205 ConstructEM();
00206 ConstructHadronic();
00207 return;
00208 }
00209
00210
00211
00212
00213 if(BDSGlobals->GetPhysListName() == "lw")
00214 {
00215 ConstructEM();
00216 ConstructLaserWire();
00217 return;
00218 }
00219
00220
00221
00222 if(BDSGlobals->GetPhysListName() != "standard")
00223 {
00224 G4cerr<<"WARNING : Unknown physics list "<<BDSGlobals->GetPhysListName()<<
00225 " using transportation only (standard) "<<G4endl;
00226 }
00227
00228
00229 theParticleIterator->reset();
00230 while( (*theParticleIterator)() ){
00231 G4ParticleDefinition* particle = theParticleIterator->value();
00232 G4ProcessManager* pmanager = particle->GetProcessManager();
00233 pmanager->AddProcess(new G4StepLimiter,-1,-1,1);
00234 }
00235 }
00236
00237 void BDSPhysicsList::ConstructParticle()
00238 {
00239
00240
00241 G4Geantino::GeantinoDefinition();
00242 G4ChargedGeantino::ChargedGeantinoDefinition();
00243
00244
00245 G4Gamma::GammaDefinition();
00246
00247
00248 G4OpticalPhoton::OpticalPhotonDefinition();
00249
00250
00251 G4Electron::ElectronDefinition();
00252 G4Positron::PositronDefinition();
00253 G4MuonPlus::MuonPlusDefinition();
00254 G4MuonMinus::MuonMinusDefinition();
00255
00256 G4NeutrinoE::NeutrinoEDefinition();
00257 G4AntiNeutrinoE::AntiNeutrinoEDefinition();
00258 G4NeutrinoMu::NeutrinoMuDefinition();
00259 G4AntiNeutrinoMu::AntiNeutrinoMuDefinition();
00260
00261
00262 G4MesonConstructor mConstructor;
00263 mConstructor.ConstructParticle();
00264
00265
00266 G4BaryonConstructor bConstructor;
00267 bConstructor.ConstructParticle();
00268
00269
00270 G4IonConstructor iConstructor;
00271 iConstructor.ConstructParticle();
00272
00273
00274 G4ShortLivedConstructor pShortLivedConstructor;
00275 pShortLivedConstructor.ConstructParticle();
00276
00277
00278
00279
00280
00281
00282
00283
00284
00285 G4ParticleTable* particleTable = G4ParticleTable::GetParticleTable();
00286 BDSGlobals->SetParticleDefinition(particleTable->
00287 FindParticle(BDSGlobals->tmpParticleName) );
00288
00289 if(!BDSGlobals->GetParticleDefinition())
00290 {
00291 G4Exception("Particle not found, quitting!");
00292 exit(1);
00293 }
00294
00295
00296
00297 BDSGlobals->SetBeamMomentum( sqrt(pow(BDSGlobals->GetBeamTotalEnergy(),2)-
00298 pow(BDSGlobals->GetParticleDefinition()->GetPDGMass(),2)) );
00299
00300 BDSGlobals->SetBeamKineticEnergy(BDSGlobals->GetBeamTotalEnergy() -
00301 BDSGlobals->GetParticleDefinition()->GetPDGMass() );
00302
00303 G4cout<<"Beam properties:"<<G4endl;
00304 G4cout<<" Particle : "<<BDSGlobals->tmpParticleName<<G4endl;
00305 G4cout<<" Mass : "<<BDSGlobals->GetParticleDefinition()->GetPDGMass()/GeV<< " GeV"<<G4endl;
00306 G4cout<<" Charge : "<<BDSGlobals->GetParticleDefinition()->GetPDGCharge()<< " e"<<G4endl;
00307 G4cout<<" Total Energy : "<< BDSGlobals->GetBeamTotalEnergy()/GeV<<" GeV"<<G4endl;
00308 G4cout<<" Kinetic Energy : "<< BDSGlobals->GetBeamKineticEnergy()/GeV<<" GeV"<<G4endl;
00309 G4cout<<" Momentum : "<< BDSGlobals->GetBeamMomentum()/GeV<<" GeV"<<G4endl;
00310 }
00311
00312
00313 #include "G4Region.hh"
00314 #include "G4ProductionCuts.hh"
00315 void BDSPhysicsList::SetCuts()
00316 {
00317 if (verbose){
00318 G4cout << "BDSPhysicsList:: setting cuts\n";
00319
00320 }
00321
00322 SetCutsWithDefault();
00323
00324 if(BDSGlobals->GetProdCutPhotons()>0)
00325 SetCutValue(BDSGlobals->GetProdCutPhotons(),"gamma");
00326
00327 if(BDSGlobals->GetProdCutElectrons()>0)
00328 SetCutValue(BDSGlobals->GetProdCutElectrons(),"e-");
00329
00330 if(BDSGlobals->GetProdCutPositrons()>0)
00331 SetCutValue(BDSGlobals->GetProdCutPositrons(),"e+");
00332
00333
00334 if(verbose)
00335 DumpCutValuesTable();
00336
00337 }
00338
00339
00340
00341
00342 void BDSPhysicsList::ConstructEM()
00343 {
00344 theParticleIterator->reset();
00345 while( (*theParticleIterator)() ){
00346 G4ParticleDefinition* particle = theParticleIterator->value();
00347 G4ProcessManager* pmanager = particle->GetProcessManager();
00348 G4String particleName = particle->GetParticleName();
00349
00350 if (particleName == "gamma") {
00351
00352 pmanager->AddDiscreteProcess(new G4PhotoElectricEffect);
00353 pmanager->AddDiscreteProcess(new G4ComptonScattering);
00354 pmanager->AddDiscreteProcess(new G4GammaConversion);
00355
00356
00357 } else if (particleName == "e-") {
00358
00359 pmanager->AddProcess(new G4MultipleScattering,-1, 1,1);
00360 pmanager->AddProcess(new G4eIonisation, -1, 2,2);
00361 pmanager->AddProcess(new G4eBremsstrahlung, -1, 3,3);
00362
00363 pmanager->AddProcess(new G4StepLimiter, -1,-1,5);
00364
00365 } else if (particleName == "e+") {
00366
00367 pmanager->AddProcess(new G4MultipleScattering,-1, 1,1);
00368 pmanager->AddProcess(new G4eIonisation, -1, 2,2);
00369 pmanager->AddProcess(new G4eBremsstrahlung, -1, 3,3);
00370
00371 pmanager->AddProcess(new G4eplusAnnihilation, 0,-1,5);
00372
00373 } else if( particleName == "mu+" ||
00374 particleName == "mu-" ) {
00375
00376
00377
00378
00379
00380
00381
00382 } else if ((!particle->IsShortLived()) &&
00383 (particle->GetPDGCharge() != 0.0) &&
00384 (particle->GetParticleName() != "chargedgeantino")) {
00385
00386 pmanager->AddProcess(new G4MultipleScattering,-1, 1,1);
00387 pmanager->AddProcess(new G4hIonisation, -1, 2,2);
00388
00389
00390
00392 }
00393 }
00394 }
00395
00396 void BDSPhysicsList::ConstructMuon()
00397 {
00398 theParticleIterator->reset();
00399 while( (*theParticleIterator)() ){
00400 G4ParticleDefinition* particle = theParticleIterator->value();
00401 G4ProcessManager* pmanager = particle->GetProcessManager();
00402 G4String particleName = particle->GetParticleName();
00403
00404 if (particleName == "gamma") {
00405
00406 pmanager->AddDiscreteProcess(new G4PhotoElectricEffect);
00407 pmanager->AddDiscreteProcess(new G4ComptonScattering);
00408 pmanager->AddDiscreteProcess(new G4GammaConversion);
00409 pmanager->AddDiscreteProcess(new BDSGammaConversionToMuons);
00410
00411 } else if (particleName == "e-") {
00412
00413 pmanager->AddProcess(new G4MultipleScattering,-1, 1,1);
00414 pmanager->AddProcess(new G4eIonisation, -1, 2,2);
00415 pmanager->AddProcess(new G4eBremsstrahlung, -1, 3,3);
00416
00417
00418
00419
00420 } else if (particleName == "e+") {
00421
00422 pmanager->AddProcess(new G4MultipleScattering,-1, 1,1);
00423 pmanager->AddProcess(new G4eIonisation, -1, 2,2);
00424 pmanager->AddProcess(new G4eBremsstrahlung, -1, 3,3);
00425
00426 pmanager->AddProcess(new G4eplusAnnihilation, 0,-1,5);
00427
00428 } else if( particleName == "mu+" ||
00429 particleName == "mu-" ) {
00430
00431 pmanager->AddProcess(new G4MultipleScattering,-1, 1,1);
00432 pmanager->AddProcess(new G4MuIonisation, -1, 2,2);
00433 pmanager->AddProcess(new G4MuBremsstrahlung, -1, 3,3);
00434 pmanager->AddProcess(new G4MuPairProduction, -1, 4,4);
00435
00436 pmanager->AddDiscreteProcess(new G4MuonNucleusProcess);
00437
00438 } else if ((!particle->IsShortLived()) &&
00439 (particle->GetPDGCharge() != 0.0) &&
00440 (particle->GetParticleName() != "chargedgeantino")) {
00441
00442 pmanager->AddProcess(new G4MultipleScattering,-1, 1,1);
00443 pmanager->AddProcess(new G4hIonisation, -1, 2,2);
00444
00445
00446
00448 }
00449 }
00450 }
00451
00452
00453 void BDSPhysicsList::ConstructMerlin()
00454 {
00455 theParticleIterator->reset();
00456 while( (*theParticleIterator)() ){
00457 G4ParticleDefinition* particle = theParticleIterator->value();
00458 G4ProcessManager* pmanager = particle->GetProcessManager();
00459 G4String particleName = particle->GetParticleName();
00460
00461 if (particleName == "gamma") {
00462
00463
00464
00465
00466
00467 } else if (particleName == "e-") {
00468
00469 pmanager->AddProcess(new G4MultipleScattering,-1, 1,1);
00470 pmanager->AddProcess(new G4eIonisation, -1, 2,2);
00471 pmanager->AddProcess(new G4eBremsstrahlung, -1, 3,3);
00472
00473 } else if (particleName == "e+") {
00474
00475
00476
00477
00478
00479
00480 } else if( particleName == "mu+" ||
00481 particleName == "mu-" ) {
00482
00483
00484
00485
00486
00487
00488 } else if ((!particle->IsShortLived()) &&
00489 (particle->GetPDGCharge() != 0.0) &&
00490 (particle->GetParticleName() != "chargedgeantino")) {
00491
00492
00493
00494
00495
00497 }
00498 }
00499 }
00500
00501
00502 void BDSPhysicsList::ConstructEM_Low_Energy()
00503 {
00504
00505 theParticleIterator->reset();
00506 while( (*theParticleIterator)() ){
00507 G4ParticleDefinition* particle = theParticleIterator->value();
00508 G4ProcessManager* pmanager = particle->GetProcessManager();
00509 G4String particleName = particle->GetParticleName();
00510
00511 if (particleName == "gamma") {
00512
00513 pmanager->AddDiscreteProcess(new G4LowEnergyRayleigh());
00514 pmanager->AddDiscreteProcess(new G4LowEnergyPhotoElectric);
00515 pmanager->AddDiscreteProcess(new G4LowEnergyCompton);
00516 pmanager->AddDiscreteProcess(new G4LowEnergyGammaConversion);
00517
00518 } else if (particleName == "e-") {
00519
00520 pmanager->AddProcess(new G4MultipleScattering, -1, 1,1);
00521 pmanager->AddProcess(new G4LowEnergyIonisation, -1, 2,2);
00522 pmanager->AddProcess(new G4LowEnergyBremsstrahlung, -1, 3,3);
00523
00524 } else if (particleName == "e+") {
00525
00526 pmanager->AddProcess(new G4MultipleScattering, -1, 1,1);
00527 pmanager->AddProcess(new G4eIonisation, -1, 2,2);
00528 pmanager->AddProcess(new G4eBremsstrahlung, -1, 3,3);
00529 pmanager->AddProcess(new G4eplusAnnihilation, 0,-1,4);
00530
00531 } else if( particleName == "mu+" ||
00532 particleName == "mu-" ) {
00533
00534 pmanager->AddProcess(new G4MultipleScattering,-1, 1,1);
00535 pmanager->AddProcess(new G4MuIonisation, -1, 2,2);
00536 pmanager->AddProcess(new G4MuBremsstrahlung, -1, 3,3);
00537 pmanager->AddProcess(new G4MuPairProduction, -1, 4,4);
00538
00539 } else if (particleName == "GenericIon") {
00540
00541 pmanager->AddProcess(new G4MultipleScattering, -1, 1,1);
00542 pmanager->AddProcess(new G4hLowEnergyIonisation, -1,2,2);
00543
00544
00545 } else if ((!particle->IsShortLived()) &&
00546 (particle->GetPDGCharge() != 0.0) &&
00547 (particle->GetParticleName() != "chargedgeantino")) {
00548
00549 pmanager->AddProcess(new G4MultipleScattering,-1,1,1);
00550 pmanager->AddProcess(new G4hLowEnergyIonisation, -1,2,2);
00551 }
00552 }
00553 }
00554
00555
00556 void BDSPhysicsList::ConstructLaserWire()
00557 {
00558
00559 theParticleIterator->reset();
00560
00561 BDSLaserCompton* lwProcess = new BDSLaserCompton;
00562
00563 while( (*theParticleIterator)() ){
00564 G4ParticleDefinition* particle = theParticleIterator->value();
00565 G4ProcessManager* pmanager = particle->GetProcessManager();
00566 G4String particleName = particle->GetParticleName();
00567
00568 if (particleName == "e-") {
00569 pmanager->AddProcess(lwProcess);
00570 pmanager->SetProcessOrderingToLast(lwProcess,idxPostStep);
00571 }
00572
00573 if (particleName == "e+") {
00574 pmanager->AddProcess(lwProcess);
00575 pmanager->SetProcessOrderingToLast(lwProcess,idxPostStep);
00576 }
00577
00578 }
00579
00580 }
00581
00582
00583
00584 void BDSPhysicsList::ConstructHadronic()
00585 {
00586
00587
00588
00589
00590
00591
00592
00593
00594
00595
00596
00597
00598
00599
00600
00601
00602
00603
00604
00605
00606
00607
00608
00609
00610 G4PhotoNuclearProcess * thePhotoNuclearProcess;
00611 G4ElectronNuclearProcess * theElectronNuclearProcess;
00612 G4PositronNuclearProcess * thePositronNuclearProcess;
00613 G4ElectroNuclearReaction * theElectroReaction;
00614 G4GammaNuclearReaction * theGammaReaction;
00615
00616 G4TheoFSGenerator * theModel;
00617 G4GeneratorPrecompoundInterface * theCascade;
00618 G4QGSModel< G4GammaParticipants > * theStringModel;
00619 G4QGSMFragmentation * theFragmentation;
00620 G4ExcitedStringDecay * theStringDecay;
00621
00622
00623
00624 thePhotoNuclearProcess = new G4PhotoNuclearProcess;
00625 theGammaReaction = new G4GammaNuclearReaction;
00626 theElectronNuclearProcess = new G4ElectronNuclearProcess;
00627 thePositronNuclearProcess = new G4PositronNuclearProcess;
00628 theElectroReaction = new G4ElectroNuclearReaction;
00629
00630 theModel = new G4TheoFSGenerator;
00631
00632 theStringModel = new G4QGSModel< G4GammaParticipants >;
00633 theStringDecay = new G4ExcitedStringDecay(theFragmentation=new G4QGSMFragmentation);
00634 theStringModel->SetFragmentationModel(theStringDecay);
00635
00636 theCascade = new G4GeneratorPrecompoundInterface;
00637
00638 theModel->SetTransport(theCascade);
00639 theModel->SetHighEnergyGenerator(theStringModel);
00640
00641
00642 G4ProcessManager * aProcMan = 0;
00643
00644 aProcMan = G4Gamma::Gamma()->GetProcessManager();
00645 theGammaReaction->SetMaxEnergy(3.5*GeV);
00646 thePhotoNuclearProcess->RegisterMe(theGammaReaction);
00647 theModel->SetMinEnergy(3.*GeV);
00648 theModel->SetMaxEnergy(100*TeV);
00649 thePhotoNuclearProcess->RegisterMe(theModel);
00650 aProcMan->AddDiscreteProcess(thePhotoNuclearProcess);
00651
00652 aProcMan = G4Electron::Electron()->GetProcessManager();
00653 theElectronNuclearProcess->RegisterMe(theElectroReaction);
00654 aProcMan->AddDiscreteProcess(theElectronNuclearProcess);
00655
00656 aProcMan = G4Positron::Positron()->GetProcessManager();
00657 thePositronNuclearProcess->RegisterMe(theElectroReaction);
00658 aProcMan->AddDiscreteProcess(thePositronNuclearProcess);
00659
00660 }
00661
00662 void BDSPhysicsList::ConstructSR()
00663 {
00664
00665
00666 BDSSynchrotronRadiation* srProcess = new BDSSynchrotronRadiation;
00667
00668
00669
00670
00671
00672
00673
00674 theParticleIterator->reset();
00675
00676 while( (*theParticleIterator)() ){
00677 G4ParticleDefinition* particle = theParticleIterator->value();
00678 G4ProcessManager* pmanager = particle->GetProcessManager();
00679 G4String particleName = particle->GetParticleName();
00680
00681 if (particleName == "e-") {
00682 pmanager->AddProcess(srProcess);
00683 pmanager->SetProcessOrderingToLast(srProcess,idxPostStep);
00684
00685
00686
00687
00688 }
00689
00690 if (particleName == "e+") {
00691 pmanager->AddProcess(srProcess);
00692 pmanager->SetProcessOrderingToLast(srProcess,idxPostStep);
00693
00694
00695
00696
00697 }
00698
00699 }
00700 return;
00701 }