379 theParticleIterator->reset();
380 while( (*theParticleIterator)() ){
381 G4ParticleDefinition* particle = theParticleIterator->value();
382 G4ProcessManager* pmanager = particle->GetProcessManager();
383 G4String particleName = particle->GetParticleName();
385 if (particleName ==
"gamma") {
389 pmanager->AddDiscreteProcess(
new G4PhotoElectricEffect());
390 pmanager->AddDiscreteProcess(
new G4ComptonScattering());
391 pmanager->AddDiscreteProcess(
new G4GammaConversion());
393 }
else if (particleName ==
"e-") {
397 G4MultipleScattering* ms =
new G4MultipleScattering();
399 ms->SetRangeFactor(0.02);
403 G4eIonisation *ionizationProcess =
new G4eIonisation();
406 pmanager->AddProcess( ms, -1, 1,1);
407 pmanager->AddProcess( ionizationProcess, -1, 2,2);
408 pmanager->AddProcess(
new G4eBremsstrahlung(), -1,-1,3);
410 }
else if (particleName ==
"e+") {
415 G4MultipleScattering* ms =
new G4MultipleScattering();
417 ms->SetRangeFactor(0.02);
421 G4eIonisation *ionizationProcess =
new G4eIonisation();
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);
429 }
else if( particleName ==
"mu+" ||
430 particleName ==
"mu-" ) {
435 G4MultipleScattering* ms =
new G4MultipleScattering();
437 ms->SetRangeFactor(0.02);
441 G4MuIonisation *ionizationProcess =
new G4MuIonisation();
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);
449 }
else if ((!particle->IsShortLived()) &&
450 (particle->GetPDGCharge() != 0.0) &&
451 (particle->GetParticleName() !=
"chargedgeantino")) {
454 if (particle->GetParticleName() ==
"GenericIon") {
456 std::cerr <<
"*********************************************************************" <<std::endl;
457 std::cerr <<
"*** Disabling G4MultipleScattering process for particle " <<particle->GetParticleName() << std::endl;
458 std::cerr <<
"*********************************************************************" <<std::endl;
461 G4MultipleScattering* ms =
new G4MultipleScattering();
463 ms->SetRangeFactor(0.02);
466 pmanager->AddProcess( ms, -1,AP,AP);
469 G4hIonisation *ionizationProcess =
new G4hIonisation();
472 pmanager->AddProcess( ionizationProcess, -1,AP,AP);
618 G4GammaNuclearReaction* lowEGammaModel =
new G4GammaNuclearReaction();
619 lowEGammaModel->SetMaxEnergy(3.5*GeV);
620 G4PhotoNuclearProcess* thePhotoNuclearProcess =
new
621G4PhotoNuclearProcess();
622 thePhotoNuclearProcess->RegisterMe(lowEGammaModel);
637 G4TheoFSGenerator* highEGammaModel =
new G4TheoFSGenerator();
638 G4GeneratorPrecompoundInterface* preComModel =
639 new G4GeneratorPrecompoundInterface();
640 highEGammaModel->SetTransport(preComModel);
642 G4QGSModel<G4GammaParticipants>* theStringModel =
643 new G4QGSModel<G4GammaParticipants>;
644 G4QGSMFragmentation* fragModel =
new G4QGSMFragmentation();
645 G4ExcitedStringDecay* stringDecay =
646 new G4ExcitedStringDecay(fragModel);
647 theStringModel->SetFragmentationModel(stringDecay);
649 highEGammaModel->SetHighEnergyGenerator(theStringModel);
650 highEGammaModel->SetMinEnergy(3.*GeV);
651 highEGammaModel->SetMaxEnergy(20.*GeV);
653 thePhotoNuclearProcess->RegisterMe(highEGammaModel);
655 G4ProcessManager* gamMan = G4Gamma::Gamma()->GetProcessManager();
657 gamMan->AddDiscreteProcess(thePhotoNuclearProcess);
661 G4ElectroNuclearReaction* theElectronReaction =
662 new G4ElectroNuclearReaction();
663 G4ElectronNuclearProcess* theElectronNuclearProcess =
664 new G4ElectronNuclearProcess();
665 theElectronNuclearProcess->RegisterMe(theElectronReaction);
667 G4ProcessManager* electronMan =
668G4Electron::Electron()->GetProcessManager();
670 electronMan->AddProcess(theElectronNuclearProcess, -1, -1, 4);
689 G4PositronNuclearProcess* thePositronNuclearProcess =
690 new G4PositronNuclearProcess();
691 thePositronNuclearProcess->RegisterMe(theElectronReaction);
693 G4ProcessManager* positronMan =
694G4Positron::Positron()->GetProcessManager();
695 positronMan->AddProcess(thePositronNuclearProcess, -1, -1, 5);
716 G4PiNuclearCrossSection* piNucCS =
new G4PiNuclearCrossSection();
718 theParticleIterator->reset();
719 while( (*theParticleIterator)() ){
720 G4ParticleDefinition* particle = theParticleIterator->value();
721 G4ProcessManager* pmanager = particle->GetProcessManager();
722 G4String particleName = particle->GetParticleName();
726 if (particleName ==
"pi+") {
729 G4HadronElasticProcess *process =
new G4HadronElasticProcess();
730 G4LElastic *model =
new G4LElastic();
731 process->RegisterMe(model);
732 pmanager->AddDiscreteProcess(process);
736 G4PionPlusInelasticProcess *inel_process =
new
737G4PionPlusInelasticProcess();
738 inel_process->AddDataSet(piNucCS);
739 inel_process->RegisterMe(bertini_model);
740 pmanager->AddDiscreteProcess(inel_process);
746 }
else if (particleName ==
"pi-") {
749 G4HadronElasticProcess *process =
new G4HadronElasticProcess();
750 G4LElastic *model =
new G4LElastic();
751 process->RegisterMe(model);
752 pmanager->AddDiscreteProcess(process);
756 G4PionMinusInelasticProcess *inel_process =
new
757G4PionMinusInelasticProcess();
758 inel_process->AddDataSet(piNucCS);
759 inel_process->RegisterMe(bertini_model);
760 pmanager->AddDiscreteProcess(inel_process);
766 }
else if (particleName ==
"kaon+") {
769 G4HadronElasticProcess *process =
new G4HadronElasticProcess();
770 G4LElastic *model =
new G4LElastic();
771 process->RegisterMe(model);
772 pmanager->AddDiscreteProcess(process);
776 G4KaonPlusInelasticProcess* inel_process =
new
777G4KaonPlusInelasticProcess();
778 inel_process->RegisterMe(bertini_model);
779 pmanager->AddDiscreteProcess(inel_process);
785 }
else if (particleName ==
"kaon-") {
788 G4HadronElasticProcess *process =
new G4HadronElasticProcess();
789 G4LElastic *model =
new G4LElastic();
790 process->RegisterMe(model);
791 pmanager->AddDiscreteProcess(process);
795 G4KaonMinusInelasticProcess* inel_process =
new
796G4KaonMinusInelasticProcess();
797 inel_process->RegisterMe(bertini_model);
798 pmanager->AddDiscreteProcess(inel_process);
804 }
else if (particleName ==
"kaon0L") {
807 G4HadronElasticProcess *process =
new G4HadronElasticProcess();
808 G4LElastic *model =
new G4LElastic();
809 process->RegisterMe(model);
810 pmanager->AddDiscreteProcess(process);
814 G4KaonZeroLInelasticProcess* inel_process =
new
815G4KaonZeroLInelasticProcess();
816 inel_process->RegisterMe(bertini_model);
817 pmanager->AddDiscreteProcess(inel_process);
823 }
else if (particleName ==
"kaon0S") {
826 G4HadronElasticProcess *process =
new G4HadronElasticProcess();
827 G4LElastic *model =
new G4LElastic();
828 process->RegisterMe(model);
829 pmanager->AddDiscreteProcess(process);
833 G4KaonZeroSInelasticProcess* inel_process =
834 new G4KaonZeroSInelasticProcess();
835 inel_process->RegisterMe(bertini_model);
836 pmanager->AddDiscreteProcess(inel_process);
842 }
else if (particleName ==
"proton") {
845 G4HadronElasticProcess *process =
new G4HadronElasticProcess();
846 G4LElastic *model =
new G4LElastic();
847 process->RegisterMe(model);
848 pmanager->AddDiscreteProcess(process);
852 G4ProtonInelasticProcess *inel_process =
new
853G4ProtonInelasticProcess();
854 inel_process->RegisterMe(bertini_model);
855 pmanager->AddDiscreteProcess(inel_process);
861 }
else if (particleName ==
"anti_proton") {
864 G4HadronElasticProcess *process =
new G4HadronElasticProcess();
865 G4LElastic *model =
new G4LElastic();
866 process->RegisterMe(model);
867 pmanager->AddDiscreteProcess(process);
871 G4AntiProtonInelasticProcess *inel_process =
872 new G4AntiProtonInelasticProcess();
873 G4LEAntiProtonInelastic *inel_model =
new G4LEAntiProtonInelastic();
874 inel_process->RegisterMe(inel_model);
875 pmanager->AddDiscreteProcess(inel_process);
881 }
else if (particleName ==
"neutron") {
885 G4cout <<
"High precision neutron models chosen" << G4endl;
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/");
890 G4HadronElasticProcess* el_process =
new G4HadronElasticProcess();
893 G4NeutronHPElastic* hpel_model =
new G4NeutronHPElastic();
894 G4NeutronHPElasticData* el_data =
new G4NeutronHPElasticData();
895 el_process->AddDataSet(el_data);
896 el_process->RegisterMe(hpel_model);
899 G4LElastic* el_model =
new G4LElastic();
900 el_model->SetMinEnergy(19.9*MeV);
901 el_process->RegisterMe(el_model);
903 pmanager->AddDiscreteProcess(el_process);
908 G4NeutronInelasticProcess* inel_process =
909 new G4NeutronInelasticProcess();
912 G4NeutronHPInelastic* hpinel_model =
new G4NeutronHPInelastic();
913 G4NeutronHPInelasticData* hpinel_data =
new
914G4NeutronHPInelasticData();
915 inel_process->AddDataSet(hpinel_data);
916 inel_process->RegisterMe(hpinel_model);
919 G4CascadeInterface* neutron_bertini =
new G4CascadeInterface;
920 neutron_bertini->SetMinEnergy(19.9*MeV);
921 inel_process->RegisterMe(neutron_bertini);
923 pmanager->AddDiscreteProcess(inel_process);
928 G4HadronCaptureProcess* cap_process =
new G4HadronCaptureProcess();
931 G4NeutronHPCapture* hpcap_model =
new G4NeutronHPCapture();
932 G4NeutronHPCaptureData* hpcap_data =
new G4NeutronHPCaptureData();
933 cap_process->AddDataSet(hpcap_data);
934 cap_process->RegisterMe(hpcap_model);
938 G4LCapture* cap_model =
new G4LCapture();
939 cap_model->SetMinEnergy(19.9*MeV);
940 cap_process->RegisterMe(cap_model);
942 pmanager->AddDiscreteProcess(cap_process);
948 G4HadronFissionProcess* fis_process =
new G4HadronFissionProcess();
951 G4NeutronHPFission* hpfis_model =
new G4NeutronHPFission();
952 G4NeutronHPFissionData* hpfis_data =
new G4NeutronHPFissionData();
953 fis_process->AddDataSet(hpfis_data);
954 fis_process->RegisterMe(hpfis_model);
958 G4LFission* fis_model =
new G4LFission();
959 fis_model->SetMinEnergy(19.9*MeV);
960 fis_process->RegisterMe(fis_model);
962 pmanager->AddDiscreteProcess(fis_process);
970 G4HadronElasticProcess *process =
new G4HadronElasticProcess();
971 G4LElastic *model =
new G4LElastic();
972 process->RegisterMe(model);
973 pmanager->AddDiscreteProcess(process);
976 G4NeutronInelasticProcess *inel_process =
977 new G4NeutronInelasticProcess();
978 inel_process->RegisterMe(bertini_model);
979 pmanager->AddDiscreteProcess(inel_process);
986 }
else if (particleName ==
"anti_neutron") {
989 G4HadronElasticProcess *process =
new G4HadronElasticProcess();
990 G4LElastic *model =
new G4LElastic();
991 process->RegisterMe(model);
992 pmanager->AddDiscreteProcess(process);
996 G4AntiNeutronInelasticProcess *inel_process =
997 new G4AntiNeutronInelasticProcess();
998 G4LEAntiNeutronInelastic *inel_model =
new G4LEAntiNeutronInelastic();
999 inel_process->RegisterMe(inel_model);
1000 pmanager->AddDiscreteProcess(inel_process);
1006 }
else if (particleName ==
"lambda") {
1009 G4HadronElasticProcess *process =
new G4HadronElasticProcess();
1010 G4LElastic *model =
new G4LElastic();
1011 process->RegisterMe(model);
1012 pmanager->AddDiscreteProcess(process);
1016 G4LambdaInelasticProcess* inel_process =
new
1017G4LambdaInelasticProcess();
1018 inel_process->RegisterMe(bertini_model);
1019 pmanager->AddDiscreteProcess(inel_process);
1025 }
else if (particleName ==
"anti_lambda") {
1028 G4HadronElasticProcess *process =
new G4HadronElasticProcess();
1029 G4LElastic *model =
new G4LElastic();
1030 process->RegisterMe(model);
1031 pmanager->AddDiscreteProcess(process);
1035 G4AntiLambdaInelasticProcess *inel_process =
1036 new G4AntiLambdaInelasticProcess();
1037 G4LEAntiLambdaInelastic *inel_model =
new G4LEAntiLambdaInelastic();
1038 inel_process->RegisterMe(inel_model);
1039 pmanager->AddDiscreteProcess(inel_process);
1045 }
else if (particleName ==
"deuteron") {
1048 G4HadronElasticProcess *process =
new G4HadronElasticProcess();
1049 G4LElastic *model =
new G4LElastic();
1050 process->RegisterMe(model);
1051 pmanager->AddDiscreteProcess(process);
1055 G4DeuteronInelasticProcess *inel_process =
1056 new G4DeuteronInelasticProcess();
1057 G4LEDeuteronInelastic *inel_model =
new G4LEDeuteronInelastic();
1058 inel_process->RegisterMe(inel_model);
1059 pmanager->AddDiscreteProcess(inel_process);
1065 }
else if (particleName ==
"triton") {
1068 G4HadronElasticProcess *process =
new G4HadronElasticProcess();
1069 G4LElastic *model =
new G4LElastic();
1070 process->RegisterMe(model);
1071 pmanager->AddDiscreteProcess(process);
1075 G4TritonInelasticProcess *inel_process =
1076 new G4TritonInelasticProcess();
1077 G4LETritonInelastic *inel_model =
new G4LETritonInelastic();
1078 inel_process->RegisterMe(inel_model);
1079 pmanager->AddDiscreteProcess(inel_process);
1085 }
else if (particleName ==
"alpha") {
1088 G4HadronElasticProcess *process =
new G4HadronElasticProcess();
1089 G4LElastic *model =
new G4LElastic();
1090 process->RegisterMe(model);
1091 pmanager->AddDiscreteProcess(process);
1095 G4AlphaInelasticProcess *inel_process =
new G4AlphaInelasticProcess();
1096 G4LEAlphaInelastic *inel_model =
new G4LEAlphaInelastic();
1097 inel_process->RegisterMe(inel_model);
1098 pmanager->AddDiscreteProcess(inel_process);