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: G4QElasticPhysics 00031 // 00032 // Author: 3 Nov 2010 M. Kosov 00033 // 00034 // Modified: 00035 // 00036 //---------------------------------------------------------------------------- 00037 // 00038 00039 #include "G4QElasticPhysics.hh" 00040 00041 #include "G4HadronicInteraction.hh" 00042 #include "G4HadronElastic.hh" 00043 #include "G4QElastic.hh" 00044 00045 #include "G4VQCrossSection.hh" 00046 00047 #include "G4ParticleDefinition.hh" 00048 #include "G4ProcessManager.hh" 00049 00050 #include "G4MesonConstructor.hh" 00051 #include "G4BaryonConstructor.hh" 00052 #include "G4IonConstructor.hh" 00053 00054 G4QElasticPhysics::G4QElasticPhysics(const G4String& name, G4int ver) 00055 : G4VPhysicsConstructor(name), process(0), verbose(ver), wasActivated(false) 00056 { 00057 if(verbose > 1) G4cout << "### QElasticPhysics is initialized" << G4endl; 00058 model = 0; 00059 } 00060 00061 void G4QElasticPhysics::ConstructParticle() 00062 { 00063 G4MesonConstructor pMesonConstructor; 00064 pMesonConstructor.ConstructParticle(); 00065 00066 G4BaryonConstructor pBaryonConstructor; 00067 pBaryonConstructor.ConstructParticle(); 00068 00069 // Construct light ions 00070 G4IonConstructor pConstructor; 00071 pConstructor.ConstructParticle(); 00072 } 00073 00074 void G4QElasticPhysics::ConstructProcess() 00075 { 00076 if(wasActivated) return; 00077 wasActivated = true; 00078 00079 process = new G4QElastic(); 00080 00081 theParticleIterator->reset(); 00082 while( (*theParticleIterator)() ) 00083 { 00084 G4ParticleDefinition* particle = theParticleIterator->value(); 00085 G4String pname = particle->GetParticleName(); 00086 G4ProcessManager* pmanager = particle->GetProcessManager(); 00087 if(pname == "anti_neutron" || 00088 pname == "anti_proton" || 00089 pname == "anti_lambda" || 00090 pname == "anti_sigma-" || 00091 pname == "anti_sigma0" || 00092 pname == "anti_sigma+" || 00093 pname == "anti_xi-" || 00094 pname == "anti_xi0" || 00095 pname == "anti_omega-" || 00096 pname == "pi-" || 00097 pname == "pi+" || 00098 pname == "kaon-" || 00099 pname == "kaon+" || 00100 pname == "kaon0S" || 00101 pname == "kaon0L" || 00102 pname == "lambda" || 00103 pname == "sigma-" || 00104 pname == "sigma0" || 00105 pname == "sigma+" || 00106 pname == "xi-" || 00107 pname == "xi0" || 00108 pname == "omega-" ) 00109 { 00110 pmanager->AddDiscreteProcess(process); 00111 if(verbose>0) G4cout<<"### G4QElastic process is added for particle="<<pname<<G4endl; 00112 } 00113 } 00114 } 00115 00116