|
|
|||
File indexing completed on 2026-04-05 07:50:49
0001 // 0002 // ******************************************************************** 0003 // * License and Disclaimer * 0004 // * * 0005 // * The Geant4 software is copyright of the Copyright Holders of * 0006 // * the Geant4 Collaboration. It is provided under the terms and * 0007 // * conditions of the Geant4 Software License, included in the file * 0008 // * LICENSE and available at http://cern.ch/geant4/license . These * 0009 // * include a list of copyright holders. * 0010 // * * 0011 // * Neither the authors of this software system, nor their employing * 0012 // * institutes,nor the agencies providing financial support for this * 0013 // * work make any representation or warranty, express or implied, * 0014 // * regarding this software system or assume any liability for its * 0015 // * use. Please see the license in the file LICENSE and URL above * 0016 // * for the full disclaimer and the limitation of liability. * 0017 // * * 0018 // * This code implementation is the result of the scientific and * 0019 // * technical work of the GEANT4 collaboration. * 0020 // * By using, copying, modifying or distributing the software (or * 0021 // * any work based on the software) you agree to acknowledge its * 0022 // * use in resulting scientific publications, and indicate your * 0023 // * acceptance of all terms of the Geant4 Software license. * 0024 // ******************************************************************** 0025 // 0026 /// \file HadronElasticPhysicsHP.cc 0027 /// \brief Implementation of the HadronElasticPhysicsHP class 0028 0029 // HP models for neutron < 20 MeV 0030 0031 #include "HadronElasticPhysicsHP.hh" 0032 0033 #include "G4GenericMessenger.hh" 0034 #include "G4HadronicProcess.hh" 0035 #include "G4ParticleHPElastic.hh" 0036 #include "G4ParticleHPElasticData.hh" 0037 #include "G4ParticleHPThermalScattering.hh" 0038 #include "G4ParticleHPThermalScatteringData.hh" 0039 #include "G4SystemOfUnits.hh" 0040 0041 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 0042 0043 HadronElasticPhysicsHP::HadronElasticPhysicsHP(G4int ver) : G4HadronElasticPhysics(ver) 0044 { 0045 // define commands for this class 0046 DefineCommands(); 0047 } 0048 0049 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 0050 0051 HadronElasticPhysicsHP::~HadronElasticPhysicsHP() 0052 { 0053 delete fMessenger; 0054 } 0055 0056 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 0057 0058 void HadronElasticPhysicsHP::ConstructProcess() 0059 { 0060 G4HadronElasticPhysics::ConstructProcess(); 0061 GetNeutronModel()->SetMinEnergy(19.5 * MeV); 0062 0063 G4HadronicProcess* process = GetNeutronProcess(); 0064 G4ParticleHPElastic* model1 = new G4ParticleHPElastic(); 0065 process->RegisterMe(model1); 0066 process->AddDataSet(new G4ParticleHPElasticData()); 0067 0068 if (fThermal) { 0069 model1->SetMinEnergy(4 * eV); 0070 G4ParticleHPThermalScattering* model2 = new G4ParticleHPThermalScattering(); 0071 process->RegisterMe(model2); 0072 process->AddDataSet(new G4ParticleHPThermalScatteringData()); 0073 } 0074 } 0075 0076 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 0077 0078 void HadronElasticPhysicsHP::DefineCommands() 0079 { 0080 // Define /testhadr/phys command directory using generic messenger class 0081 fMessenger = new G4GenericMessenger(this, "/testhadr/phys/", "physics list commands"); 0082 0083 // thermal scattering command 0084 auto& thermalCmd = fMessenger->DeclareProperty("thermalScattering", fThermal); 0085 0086 thermalCmd.SetGuidance("set thermal scattering model"); 0087 thermalCmd.SetParameterName("thermal", false); 0088 thermalCmd.SetDefaultValue("false"); 0089 thermalCmd.SetStates(G4State_PreInit); 0090 } 0091 0092 //..oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
| [ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
|
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
|