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 // GEANT4 tag $Name: not supported by cvs2svn $ 00027 // 00028 //--------------------------------------------------------------------------- 00029 // 00030 // ClassName: G4QInelasticCHIPSBuilder 00031 // 00032 // Author: 2009 M. Kosov 00033 // 00034 //---------------------------------------------------------------------------- 00035 // 00036 // Short comment: This is a physics list of only one model G4QInelastic for 00037 // all hadron-nuclear interactions at all energies. There is no model- or 00038 // process-mixing, while it is possible to merge (G4QProcessMixer) the G4_HP 00039 // processes at low energies if the G4QInelastic, which includes all necessary 00040 // nA inelastic processes, is found to be not saficient for some applications. 00041 // In this particular builder the G4QInelastic process is attached to all 00042 // hadrons other than nucleons or pi and K-mesons. Previously it could be done 00043 // only using the LHEP parameterized package or in a temporary form by the 00044 // QGSC model conditionally extended (just not crashing) to low energies. 00045 // *** Important *** As the CHIPS treatment of all hadrons is the same, and 00046 // very simple, this builder with time can be not used in the CHIPS physics list 00047 // 00048 // ----------------------------------------------------------------------------- 00049 #include "G4QInelasticCHIPSBuilder.hh" 00050 00051 G4QInelasticCHIPSBuilder::G4QInelasticCHIPSBuilder(G4int ver): 00052 verbose(ver), wasActivated(false), inelastic(0), nGamma(0) 00053 { 00054 // pointer to the particle table 00055 theParticleTable = G4ParticleTable::GetParticleTable(); 00056 theParticleIterator = theParticleTable->GetIterator(); 00057 } 00058 00059 G4QInelasticCHIPSBuilder::~G4QInelasticCHIPSBuilder() 00060 { 00061 if(wasActivated) delete inelastic; 00062 } 00063 00064 void G4QInelasticCHIPSBuilder::Build() 00065 { 00066 if(wasActivated) return; 00067 wasActivated = true; 00068 theParticleIterator->reset(); 00069 inelastic = new G4QInelastic(); 00070 while( (*theParticleIterator)() ) 00071 { 00072 G4ParticleDefinition* particle = theParticleIterator->value(); 00073 G4String pname = particle->GetParticleName(); 00074 if(pname == "kaon-" || pname == "kaon+" || pname == "kaon0S" || pname == "kaon0L" || 00075 pname == "pi-" || pname == "pi+" || pname == "neutron" || pname == "proton" || 00076 pname == "lambda" || pname == "sigma+" || pname == "sigma0" || 00077 pname == "sigma-" || pname == "xi0" || pname == "xi-" || pname == "omega-" || 00078 pname == "anti_proton" || pname == "anti_neutron" || pname == "anti_lambda" || 00079 pname == "anti_sigma+" || pname == "anti_sigma0" || pname == "anti_sigma-" || 00080 pname == "anti_xi0" || pname == "anti_xi-" || pname == "anti_omega-" ) 00081 { 00082 if(verbose>1)G4cout<< "__G4QInelCHIPSBuilder: "<< pname <<" is defined here"<<G4endl; 00083 G4ProcessManager* pmanager = particle->GetProcessManager(); 00084 pmanager->AddDiscreteProcess(inelastic); 00085 if(verbose>1) G4cout<<"###> G4QInelasticCHIPSBuilder: "<<inelastic->GetProcessName() 00086 <<" is added for "<<pname<<G4endl; 00087 } 00088 } 00089 } 00090 00091 // 2009 by M. Kosov