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 // $Id$ 00027 // 00028 //--------------------------------------------------------------------------- 00029 // 00030 // ClassName: G4HadronElasticPhysicsLHEP 00031 // 00032 // Author: 3 June 2010 V. Ivanchenko 00033 // 00034 // Modified: 00035 // 00036 //---------------------------------------------------------------------------- 00037 // 00038 // LHEP x-sectios and sampling 00039 00040 #include "G4HadronElasticPhysicsLHEP.hh" 00041 00042 #include "G4HadronicProcess.hh" 00043 #include "G4HadronElasticProcess.hh" 00044 #include "G4HadronicInteraction.hh" 00045 #include "G4LElastic.hh" 00046 00047 #include "G4ParticleDefinition.hh" 00048 #include "G4ProcessManager.hh" 00049 00050 #include "G4MesonConstructor.hh" 00051 #include "G4BaryonConstructor.hh" 00052 #include "G4IonConstructor.hh" 00053 #include "G4Neutron.hh" 00054 00055 // factory 00056 #include "G4PhysicsConstructorFactory.hh" 00057 // 00058 G4_DECLARE_PHYSCONSTR_FACTORY(G4HadronElasticPhysicsLHEP); 00059 00060 00061 G4HadronElasticPhysicsLHEP::G4HadronElasticPhysicsLHEP(G4int ver) 00062 : G4VPhysicsConstructor("hElasticLHEP"), verbose(ver), 00063 wasActivated(false) 00064 { 00065 if(verbose > 1) { 00066 G4cout << "### G4HadronElasticPhysicsLHEP: " << GetPhysicsName() 00067 << G4endl; 00068 } 00069 } 00070 00071 G4HadronElasticPhysicsLHEP::~G4HadronElasticPhysicsLHEP() 00072 {} 00073 00074 void G4HadronElasticPhysicsLHEP::ConstructParticle() 00075 { 00076 // G4cout << "G4HadronElasticPhysicsLHEP::ConstructParticle" << G4endl; 00077 G4MesonConstructor pMesonConstructor; 00078 pMesonConstructor.ConstructParticle(); 00079 00080 G4BaryonConstructor pBaryonConstructor; 00081 pBaryonConstructor.ConstructParticle(); 00082 00083 // Construct light ions 00084 G4IonConstructor pConstructor; 00085 pConstructor.ConstructParticle(); 00086 } 00087 00088 void G4HadronElasticPhysicsLHEP::ConstructProcess() 00089 { 00090 if(wasActivated) return; 00091 wasActivated = true; 00092 00093 if(verbose > 1) { 00094 G4cout << "### HadronElasticPhysicsLHEP Construct Processes" 00095 << G4endl; 00096 } 00097 G4HadronicProcess* hel = 0; 00098 G4HadronicInteraction* model = new G4LElastic(); 00099 00100 theParticleIterator->reset(); 00101 while( (*theParticleIterator)() ) 00102 { 00103 G4ParticleDefinition* particle = theParticleIterator->value(); 00104 G4ProcessManager* pmanager = particle->GetProcessManager(); 00105 G4String pname = particle->GetParticleName(); 00106 if(pname == "anti_lambda" || 00107 pname == "anti_neutron" || 00108 pname == "anti_omega-" || 00109 pname == "anti_proton" || 00110 pname == "anti_sigma-" || 00111 pname == "anti_sigma+" || 00112 pname == "anti_xi-" || 00113 pname == "anti_xi0" || 00114 pname == "kaon-" || 00115 pname == "kaon+" || 00116 pname == "kaon0S" || 00117 pname == "kaon0L" || 00118 pname == "lambda" || 00119 pname == "omega-" || 00120 pname == "sigma-" || 00121 pname == "sigma+" || 00122 pname == "xi-" || 00123 pname == "neutron" || 00124 pname == "proton" || 00125 pname == "pi+" || 00126 pname == "pi-" || 00127 pname == "alpha" || 00128 pname == "deuteron" || 00129 pname == "triton") { 00130 00131 hel = new G4HadronElasticProcess(); 00132 hel->RegisterMe(model); 00133 pmanager->AddDiscreteProcess(hel); 00134 if(verbose > 1) { 00135 G4cout << "### HadronElasticPhysicsLHEP added for " 00136 << particle->GetParticleName() << G4endl; 00137 } 00138 } 00139 } 00140 } 00141 00142