00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048 #include "G4QInelasticCHIPS_HPBuilder.hh"
00049 #include "G4SystemOfUnits.hh"
00050
00051 G4QInelasticCHIPS_HPBuilder::G4QInelasticCHIPS_HPBuilder(G4int ver):
00052 verbose(ver)
00053 , wasActivated(false)
00054 , inelastic(0)
00055 , theInProcessMixer(0)
00056 , theNgProcessMixer(0)
00057 , theFiProcessMixer(0)
00058 , theNeutronInelastic(0)
00059 , theNeutronFission(0)
00060 , theNeutronCapture(0)
00061 , theCHIPSInelastic(0)
00062 , theCHIPSNGamma(0)
00063 , theHPNeutron(0)
00064 {
00065
00066 theParticleTable = G4ParticleTable::GetParticleTable();
00067 theParticleIterator = theParticleTable->GetIterator();
00068 }
00069
00070 G4QInelasticCHIPS_HPBuilder::~G4QInelasticCHIPS_HPBuilder()
00071 {
00072 if(wasActivated)
00073 {
00074 delete inelastic;
00075 delete theCHIPSInelastic;
00076 delete theCHIPSNGamma;
00077
00078 delete theNeutronInelastic;
00079 delete theNeutronCapture;
00080 delete theNeutronFission;
00081 delete theHPNeutron;
00082 delete theInProcessMixer;
00083 delete theNgProcessMixer;
00084 delete theFiProcessMixer;
00085 }
00086 }
00087
00088 void G4QInelasticCHIPS_HPBuilder::Build()
00089 {
00090 if(wasActivated) return;
00091 wasActivated = true;
00092 theParticleIterator->reset();
00093 inelastic = new G4QInelastic();
00094 while( (*theParticleIterator)() )
00095 {
00096 G4ParticleDefinition* particle = theParticleIterator->value();
00097 G4String pname = particle->GetParticleName();
00098 if(pname == "kaon-" || pname == "kaon+" || pname == "kaon0S" || pname == "kaon0L" ||
00099
00100 pname == "pi-" || pname == "pi+" || pname == "proton" ||
00101 pname == "lambda" || pname == "sigma+" || pname == "sigma0" ||
00102 pname == "sigma-" || pname == "xi0" || pname == "xi-" || pname == "omega-" ||
00103 pname == "anti_proton" || pname == "anti_neutron" || pname == "anti_lambda" ||
00104 pname == "anti_sigma+" || pname == "anti_sigma0" || pname == "anti_sigma-" ||
00105 pname == "anti_xi0" || pname == "anti_xi-" || pname == "anti_omega-" )
00106 {
00107 if(verbose>1)
00108 G4cout<< "__G4QInelCHIPS_HPBuilder: "<< pname <<" is defined here"<<G4endl;
00109 G4ProcessManager* pmanager = particle->GetProcessManager();
00110 pmanager->AddDiscreteProcess(inelastic);
00111 if(verbose>1)G4cout<<"###>G4QInelasticCHIPS_HPBuilder: "<<inelastic->GetProcessName()
00112 <<" is added for "<<pname<<G4endl;
00113 }
00114 else if(pname == "neutron")
00115 {
00116 if(verbose>1)
00117 G4cout<< "__G4QInelCHIPS_HPBuilder: "<< pname <<" is defined here"<<G4endl;
00118 G4ProcessManager* pmanager = particle->GetProcessManager();
00119
00120 #ifdef debug
00121 G4cout<<"G4QInelasticCHIPS_HPBuilder::Build: before NeutronBuild"<<G4endl;
00122 #endif
00123 theCHIPSInelastic = new G4QInelastic();
00124 theCHIPSNGamma = new G4QNGamma();
00125
00126 theNeutronInelastic = new G4NeutronInelasticProcess();
00127 theNeutronCapture = new G4HadronCaptureProcess();
00128 theNeutronFission = new G4HadronFissionProcess();
00129 theInProcessMixer = new G4QDiscProcessMixer("Mixed NeutronInelastic", particle);
00130 theNgProcessMixer = new G4QDiscProcessMixer("Mixed NGamma", particle);
00131 theFiProcessMixer = new G4QDiscProcessMixer("Mixed NFission", particle);
00132 #ifdef debug
00133 G4cout<<"G4QInelasticCHIPS_HPBuilder::Build: before Build HP processes"<<G4endl;
00134 #endif
00135 theHPNeutron = new G4NeutronHPBuilder;
00136 theHPNeutron->Build(theNeutronInelastic);
00137 theHPNeutron->Build(theNeutronCapture);
00138 theHPNeutron->Build(theNeutronFission);
00139 #ifdef debug
00140 G4cout<<"G4QInelasticCHIPS_HPBuilder::Build: before QIn="<<theCHIPSInelastic<<G4endl;
00141 #endif
00142 theInProcessMixer->AddDiscreteProcess(theCHIPSInelastic, 1.E8*megaelectronvolt);
00143 #ifdef debug
00144 G4cout<<"G4QInelasticCHIPS_HPBuilder::Build: befr HPI="<<theNeutronInelastic<<G4endl;
00145 #endif
00146 theInProcessMixer->AddDiscreteProcess(theNeutronInelastic, 19.9*megaelectronvolt);
00147
00148 #ifdef debug
00149 G4cout<<"G4QInelasticCHIPS_HPBuilder::Build: before QNG="<<theCHIPSNGamma<<G4endl;
00150 #endif
00151 theNgProcessMixer->AddDiscreteProcess(theCHIPSNGamma, 1.E8*megaelectronvolt);
00152 #ifdef debug
00153 G4cout<<"G4QInelasticCHIPS_HPBuilder::Build: before HPC="<<theNeutronCapture<<G4endl;
00154 #endif
00155 theNgProcessMixer->AddDiscreteProcess(theNeutronCapture, 19.9*megaelectronvolt);
00156
00157
00158
00159
00160 #ifdef debug
00161 G4cout<<"G4QInelasticCHIPS_HPBuilder::Build: before ProcessAdd"<<G4endl;
00162 #endif
00163 pmanager->AddDiscreteProcess(theInProcessMixer);
00164 if(verbose>1)
00165 G4cout<<"###>G4QInelasticCHIPS_HPBuilder: "<<theCHIPSInelastic->GetProcessName()
00166 <<" is added for "<<pname<<G4endl;
00167 pmanager->AddDiscreteProcess(theNgProcessMixer);
00168 if(verbose>1)
00169 G4cout<<"###>G4QInelasticCHIPS_HPBuilder: "<<theCHIPSNGamma->GetProcessName()
00170 <<" is added for "<<pname<<G4endl;
00171 pmanager->AddDiscreteProcess(theNeutronFission);
00172
00173 if(verbose>1)
00174 G4cout<<"###>G4QInelasticCHIPS_HPBuilder: "<<theNeutronFission->GetProcessName()
00175 <<" is added for "<<pname<<G4endl;
00176 }
00177 }
00178 }
00179
00180