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: G4MiscQGSCBuilder 00031 // 00032 // Author: 2009 M. Kosov (on the basis of the G4MiscLHEPBuilder) 00033 // 00034 //---------------------------------------------------------------------------- 00035 // 00036 #include "G4MiscQGSCBuilder.hh" 00037 00038 #include "G4SystemOfUnits.hh" 00039 #include "G4ParticleDefinition.hh" 00040 #include "G4ParticleTable.hh" 00041 #include "G4ProcessManager.hh" 00042 00043 G4MiscQGSCBuilder::G4MiscQGSCBuilder(G4int ver): 00044 theModel(0),theCascade(0),theQGSCModel(0), 00045 theQGSCDecay(0),theQuasiElastic(0), 00046 verbose(ver), wasActivated(false) 00047 { 00048 // pointer to the particle table 00049 theParticleTable = G4ParticleTable::GetParticleTable(); 00050 theParticleIterator = theParticleTable->GetIterator(); 00051 } 00052 00053 G4MiscQGSCBuilder::~G4MiscQGSCBuilder() {} 00054 00055 void G4MiscQGSCBuilder::Build() 00056 { 00057 wasActivated = true; 00058 00059 //QGSC model definition 00060 theModel = new G4TheoFSGenerator("QGSC"); 00061 00062 theQGSCModel = new G4QGSModel< G4QGSParticipants >; 00063 theQGSCDecay = new G4ExcitedStringDecay(new G4QGSMFragmentation); 00064 theQGSCModel->SetFragmentationModel(theQGSCDecay); 00065 theModel->SetHighEnergyGenerator(theQGSCModel); 00066 00067 theCascade = new G4StringChipsParticleLevelInterface; 00068 theModel->SetTransport(theCascade); 00069 00070 theQuasiElastic = new G4QuasiElasticChannel; 00071 theModel->SetQuasiElasticChannel(theQuasiElastic); 00072 00073 theModel->SetMinEnergy(0.); 00074 theModel->SetMaxEnergy(100*TeV); 00075 00076 00077 theParticleIterator->reset(); 00078 while( (*theParticleIterator)() ) 00079 { 00080 G4ParticleDefinition* particle = theParticleIterator->value(); 00081 G4String pname = particle->GetParticleName(); 00082 if(pname == "kaon-" || pname == "kaon+" || pname == "kaon0S" || pname == "kaon0L" || 00083 pname == "pi-" || pname == "pi+" || pname == "neutron" || pname == "proton" ) 00084 { 00085 if(verbose>1)G4cout<<"** G4MiscQGSCBuilder: "<<pname<<" already defined"<<G4endl; 00086 } 00087 else if( 00088 pname == "anti_proton" || pname == "anti_neutron" || pname == "anti_lambda" || 00089 pname == "anti_sigma+" || pname == "anti_sigma0" || pname == "anti_sigma-" || 00090 pname == "anti_xi0" || pname == "anti_xi-" || pname == "anti_omega-" || 00091 pname == "lambda" || pname == "sigma+" || pname == "sigma0" || 00092 pname == "sigma-" || pname == "xi0" || pname == "xi-" || pname == "omega-") 00093 { 00094 if(verbose>1)G4cout<< "__ G4MiscQGSCBuilder: "<< pname <<" is defined here"<<G4endl; 00095 G4ProcessManager* pmanager = particle->GetProcessManager(); 00096 G4HadronInelasticProcess* hp = new G4HadronInelasticProcess("hInelastic", particle); 00097 pmanager->AddDiscreteProcess(hp); 00098 hp->RegisterMe(theModel); 00099 if(verbose>1) 00100 G4cout<<"^^ G4MiscQGSCBuilder: "<<hp->GetProcessName()<<" added for "<<pname<<G4endl; 00101 } 00102 } 00103 } 00104 00105 // 2009 by M. Kosov