source: trunk/source/physics_lists/builders/src/G4MiscQGSCBuilder.cc

Last change on this file was 1337, checked in by garnier, 15 years ago

tag geant4.9.4 beta 1 + modifs locales

File size: 4.3 KB
Line 
1//
2// ********************************************************************
3// * License and Disclaimer *
4// * *
5// * The Geant4 software is copyright of the Copyright Holders of *
6// * the Geant4 Collaboration. It is provided under the terms and *
7// * conditions of the Geant4 Software License, included in the file *
8// * LICENSE and available at http://cern.ch/geant4/license . These *
9// * include a list of copyright holders. *
10// * *
11// * Neither the authors of this software system, nor their employing *
12// * institutes,nor the agencies providing financial support for this *
13// * work make any representation or warranty, express or implied, *
14// * regarding this software system or assume any liability for its *
15// * use. Please see the license in the file LICENSE and URL above *
16// * for the full disclaimer and the limitation of liability. *
17// * *
18// * This code implementation is the result of the scientific and *
19// * technical work of the GEANT4 collaboration. *
20// * By using, copying, modifying or distributing the software (or *
21// * any work based on the software) you agree to acknowledge its *
22// * use in resulting scientific publications, and indicate your *
23// * acceptance of all terms of the Geant4 Software license. *
24// ********************************************************************
25//
26// GEANT4 tag $Name: geant4-09-04-beta-01 $
27//
28//---------------------------------------------------------------------------
29//
30// ClassName: G4MiscQGSCBuilder
31//
32// Author: 2009 M. Kosov (on the basis of the G4MiscLHEPBuilder)
33//
34//----------------------------------------------------------------------------
35//
36#include "G4MiscQGSCBuilder.hh"
37
38#include "G4ParticleDefinition.hh"
39#include "G4ParticleTable.hh"
40#include "G4ProcessManager.hh"
41
42G4MiscQGSCBuilder::G4MiscQGSCBuilder(G4int ver): verbose(ver), wasActivated(false)
43{
44 // pointer to the particle table
45 theParticleTable = G4ParticleTable::GetParticleTable();
46 theParticleIterator = theParticleTable->GetIterator();
47}
48
49G4MiscQGSCBuilder::~G4MiscQGSCBuilder() {}
50
51void G4MiscQGSCBuilder::Build()
52{
53 wasActivated = true;
54
55 //QGSC model definition
56 theModel = new G4TheoFSGenerator("QGSC");
57
58 theQGSCModel = new G4QGSModel< G4QGSParticipants >;
59 theQGSCDecay = new G4ExcitedStringDecay(new G4QGSMFragmentation);
60 theQGSCModel->SetFragmentationModel(theQGSCDecay);
61 theModel->SetHighEnergyGenerator(theQGSCModel);
62
63 theCascade = new G4StringChipsParticleLevelInterface;
64 theModel->SetTransport(theCascade);
65
66 theQuasiElastic = new G4QuasiElasticChannel;
67 theModel->SetQuasiElasticChannel(theQuasiElastic);
68
69 theModel->SetMinEnergy(0.);
70 theModel->SetMaxEnergy(100*TeV);
71
72
73 theParticleIterator->reset();
74 while( (*theParticleIterator)() )
75 {
76 G4ParticleDefinition* particle = theParticleIterator->value();
77 G4String pname = particle->GetParticleName();
78 if(pname == "kaon-" || pname == "kaon+" || pname == "kaon0S" || pname == "kaon0L" ||
79 pname == "pi-" || pname == "pi+" || pname == "neutron" || pname == "proton" )
80 {
81 if(verbose>1)G4cout<<"** G4MiscQGSCBuilder: "<<pname<<" already defined"<<G4endl;
82 }
83 else if(
84 pname == "anti_proton" || pname == "anti_neutron" || pname == "anti_lambda" ||
85 pname == "anti_sigma+" || pname == "anti_sigma0" || pname == "anti_sigma-" ||
86 pname == "anti_xi0" || pname == "anti_xi-" || pname == "anti_omega-" ||
87 pname == "lambda" || pname == "sigma+" || pname == "sigma0" ||
88 pname == "sigma-" || pname == "xi0" || pname == "xi-" || pname == "omega-")
89 {
90 if(verbose>1)G4cout<< "__ G4MiscQGSCBuilder: "<< pname <<" is defined here"<<G4endl;
91 G4ProcessManager* pmanager = particle->GetProcessManager();
92 G4HadronInelasticProcess* hp = new G4HadronInelasticProcess("hInelastic", particle);
93 pmanager->AddDiscreteProcess(hp);
94 hp->RegisterMe(theModel);
95 if(verbose>1)
96 G4cout<<"^^ G4MiscQGSCBuilder: "<<hp->GetProcessName()<<" added for "<<pname<<G4endl;
97 }
98 }
99}
100
101// 2009 by M. Kosov
Note: See TracBrowser for help on using the repository browser.