Go to the documentation of this file.00001 #include "SimG4Core/PhysicsLists/interface/CMSNeutronXS.h"
00002
00003 #include "G4NeutronInelasticXS.hh"
00004 #include "G4NeutronCaptureXS.hh"
00005
00006 #include "G4ParticleDefinition.hh"
00007 #include "G4HadronicProcess.hh"
00008 #include "G4ProcessManager.hh"
00009 #include "G4ProcessVector.hh"
00010 #include "G4HadronicProcessType.hh"
00011
00012 #include "G4Neutron.hh"
00013
00014 CMSNeutronXS::CMSNeutronXS(const G4String&, G4int ver) :
00015 G4VPhysicsConstructor("Neutron XS"), verbose(ver) {}
00016
00017 CMSNeutronXS::~CMSNeutronXS() {}
00018
00019 void CMSNeutronXS::ConstructParticle() {}
00020
00021 void CMSNeutronXS::ConstructProcess() {
00022
00023 G4NeutronInelasticXS* xinel = new G4NeutronInelasticXS();
00024 G4NeutronCaptureXS* xcap = new G4NeutronCaptureXS();
00025
00026 const G4ParticleDefinition* neutron = G4Neutron::Neutron();
00027 if(verbose > 1) {
00028 G4cout << "### CMSNeutronXS: use alternative neutron X-sections"
00029 << G4endl;
00030 }
00031
00032 G4ProcessVector* pv = neutron->GetProcessManager()->GetProcessList();
00033 G4int n = pv->size();
00034 G4HadronicProcess* had = 0;
00035 for(G4int i=0; i<n; i++) {
00036 if(fHadronInelastic == ((*pv)[i])->GetProcessSubType()) {
00037 had = static_cast<G4HadronicProcess*>((*pv)[i]);
00038 had->AddDataSet(xinel);
00039 } else if(fCapture == ((*pv)[i])->GetProcessSubType()) {
00040 had = static_cast<G4HadronicProcess*>((*pv)[i]);
00041 had->AddDataSet(xcap);
00042 }
00043 }
00044 }