00001 // 00002 // ******************************************************************** 00003 // * License and Disclaimer * 00004 // * * 00005 // * The Geant4 software is copyright of the Copyright Holders of * 00006 // * the Geant4 Collaboration. It is provided under the terms and * 00007 // * conditions of the Geant4 Software License, included in the file * 00008 // * LICENSE and available at http://cern.ch/geant4/license . These * 00009 // * include a list of copyright holders. * 00010 // * * 00011 // * Neither the authors of this software system, nor their employing * 00012 // * institutes,nor the agencies providing financial support for this * 00013 // * work make any representation or warranty, express or implied, * 00014 // * regarding this software system or assume any liability for its * 00015 // * use. Please see the license in the file LICENSE and URL above * 00016 // * for the full disclaimer and the limitation of liability. * 00017 // * * 00018 // * This code implementation is the result of the scientific and * 00019 // * technical work of the GEANT4 collaboration. * 00020 // * By using, copying, modifying or distributing the software (or * 00021 // * any work based on the software) you agree to acknowledge its * 00022 // * use in resulting scientific publications, and indicate your * 00023 // * acceptance of all terms of the Geant4 Software license. * 00024 // ******************************************************************** 00025 // 00026 #include "G4NeutronHPBuilder.hh" 00027 #include "G4SystemOfUnits.hh" 00028 #include "G4ParticleDefinition.hh" 00029 #include "G4ParticleTable.hh" 00030 #include "G4ProcessManager.hh" 00031 00032 G4NeutronHPBuilder:: 00033 G4NeutronHPBuilder() 00034 { 00035 theHPElastic = 0; 00036 theHPElasticData = 0; 00037 00038 theHPFission = 0; 00039 theHPFissionData = 0; 00040 00041 theHPCapture = 0; 00042 theHPCaptureData = 0; 00043 00044 theHPInelastic = 0; 00045 theHPInelasticData = 0; 00046 00047 theMin = 0; 00048 theIMin = theMin; 00049 theMax = 20*MeV; 00050 theIMax = theMax; 00051 00052 } 00053 00054 G4NeutronHPBuilder:: 00055 ~G4NeutronHPBuilder() 00056 { 00057 delete theHPElasticData; 00058 delete theHPFissionData; 00059 delete theHPCaptureData; 00060 delete theHPInelasticData; 00061 } 00062 00063 void G4NeutronHPBuilder:: 00064 Build(G4HadronElasticProcess * aP) 00065 { 00066 if(theHPElastic==0) theHPElastic = new G4NeutronHPElastic; 00067 theHPElastic->SetMinEnergy(theMin); 00068 theHPElastic->SetMaxEnergy(theMax); 00069 if(theHPElasticData == 0) theHPElasticData = new G4NeutronHPElasticData; 00070 aP->AddDataSet(theHPElasticData); 00071 aP->RegisterMe(theHPElastic); 00072 } 00073 00074 void G4NeutronHPBuilder:: 00075 Build(G4HadronFissionProcess * aP) 00076 { 00077 if(theHPFission == 0) theHPFission = new G4NeutronHPFission; 00078 theHPFission->SetMinEnergy(theMin); 00079 theHPFission->SetMaxEnergy(theMax); 00080 if(theHPFissionData==0) theHPFissionData=new G4NeutronHPFissionData; 00081 aP->AddDataSet(theHPFissionData); 00082 aP->RegisterMe(theHPFission); 00083 } 00084 00085 void G4NeutronHPBuilder:: 00086 Build(G4HadronCaptureProcess * aP) 00087 { 00088 if(theHPCapture==0) theHPCapture = new G4NeutronHPCapture; 00089 theHPCapture->SetMinEnergy(theMin); 00090 theHPCapture->SetMaxEnergy(theMax); 00091 if(theHPCaptureData==0) theHPCaptureData = new G4NeutronHPCaptureData; 00092 aP->AddDataSet(theHPCaptureData); 00093 aP->RegisterMe(theHPCapture); 00094 } 00095 00096 void G4NeutronHPBuilder:: 00097 Build(G4NeutronInelasticProcess * aP) 00098 { 00099 if(theHPInelastic==0) theHPInelastic = new G4NeutronHPInelastic; 00100 theHPInelastic->SetMinEnergy(theIMin); 00101 theHPInelastic->SetMaxEnergy(theIMax); 00102 if(theHPInelasticData==0) theHPInelasticData = new G4NeutronHPInelasticData; 00103 aP->AddDataSet(theHPInelasticData); 00104 aP->RegisterMe(theHPInelastic); 00105 } 00106 // 2002 by J.P. Wellisch