#include <G4QInelasticCHIPS_HPBuilder.hh>
Public Member Functions | |
G4QInelasticCHIPS_HPBuilder (G4int verbose) | |
virtual | ~G4QInelasticCHIPS_HPBuilder () |
void | Build () |
Protected Attributes | |
G4ParticleTable * | theParticleTable |
G4ParticleTable::G4PTblDicIterator * | theParticleIterator |
Definition at line 72 of file G4QInelasticCHIPS_HPBuilder.hh.
G4QInelasticCHIPS_HPBuilder::G4QInelasticCHIPS_HPBuilder | ( | G4int | verbose | ) |
Definition at line 51 of file G4QInelasticCHIPS_HPBuilder.cc.
References G4ParticleTable::GetIterator(), G4ParticleTable::GetParticleTable(), theParticleIterator, and theParticleTable.
00051 : 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 // pointer to the particle table 00066 theParticleTable = G4ParticleTable::GetParticleTable(); 00067 theParticleIterator = theParticleTable->GetIterator(); 00068 }
G4QInelasticCHIPS_HPBuilder::~G4QInelasticCHIPS_HPBuilder | ( | ) | [virtual] |
Definition at line 70 of file G4QInelasticCHIPS_HPBuilder.cc.
00071 { 00072 if(wasActivated) 00073 { 00074 delete inelastic; 00075 delete theCHIPSInelastic; 00076 delete theCHIPSNGamma; 00077 //delete theCHIPSFission; 00078 delete theNeutronInelastic; 00079 delete theNeutronCapture; 00080 delete theNeutronFission; 00081 delete theHPNeutron; 00082 delete theInProcessMixer; 00083 delete theNgProcessMixer; 00084 delete theFiProcessMixer; 00085 } 00086 }
void G4QInelasticCHIPS_HPBuilder::Build | ( | ) |
Definition at line 88 of file G4QInelasticCHIPS_HPBuilder.cc.
References G4QDiscProcessMixer::AddDiscreteProcess(), G4ProcessManager::AddDiscreteProcess(), G4NeutronHPBuilder::Build(), G4cout, G4endl, G4ParticleDefinition::GetParticleName(), G4ParticleDefinition::GetProcessManager(), G4VProcess::GetProcessName(), G4ParticleTableIterator< K, V >::reset(), theParticleIterator, and G4ParticleTableIterator< K, V >::value().
Referenced by HadronPhysicsCHIPS_HP::ConstructProcess().
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 //pname == "pi-" || pname == "pi+" || pname == "neutron" || pname == "proton" || 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 // The model definition for neutrons (needed for HP implementation) 00120 #ifdef debug 00121 G4cout<<"G4QInelasticCHIPS_HPBuilder::Build: before NeutronBuild"<<G4endl; 00122 #endif 00123 theCHIPSInelastic = new G4QInelastic(); 00124 theCHIPSNGamma = new G4QNGamma(); 00125 //theCHIPSFission = new G4QFission(); 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 //theFiProcessMixer->AddDiscreteProcess(theCHIPSFission, 1.E8*megaelectronvolt); 00158 //theFiProcessMixer->AddDiscreteProcess(theNeutronFission, 19.9*megaelectronvolt); 00159 00160 #ifdef debug 00161 G4cout<<"G4QInelasticCHIPS_HPBuilder::Build: before ProcessAdd"<<G4endl; 00162 #endif 00163 pmanager->AddDiscreteProcess(theInProcessMixer); // Mix CHIPS+HP for neutronInelastic 00164 if(verbose>1) 00165 G4cout<<"###>G4QInelasticCHIPS_HPBuilder: "<<theCHIPSInelastic->GetProcessName() 00166 <<" is added for "<<pname<<G4endl; 00167 pmanager->AddDiscreteProcess(theNgProcessMixer); // Mix CHIPS+HP for (n,gamma) 00168 if(verbose>1) 00169 G4cout<<"###>G4QInelasticCHIPS_HPBuilder: "<<theCHIPSNGamma->GetProcessName() 00170 <<" is added for "<<pname<<G4endl; 00171 pmanager->AddDiscreteProcess(theNeutronFission); // Only HP for fission 00172 //pmanager->AddDiscreteProcess(theFiProcessMixer); // Mix CHIPS+HP for fission 00173 if(verbose>1) 00174 G4cout<<"###>G4QInelasticCHIPS_HPBuilder: "<<theNeutronFission->GetProcessName() 00175 <<" is added for "<<pname<<G4endl; 00176 } 00177 } 00178 }
Definition at line 84 of file G4QInelasticCHIPS_HPBuilder.hh.
Referenced by Build(), and G4QInelasticCHIPS_HPBuilder().
Definition at line 83 of file G4QInelasticCHIPS_HPBuilder.hh.
Referenced by G4QInelasticCHIPS_HPBuilder().