Geant4  9.6.p02
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
G4MiscQGSCBuilder.cc
Go to the documentation of this file.
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: not supported by cvs2svn $
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 "G4SystemOfUnits.hh"
39 #include "G4ParticleDefinition.hh"
40 #include "G4ParticleTable.hh"
41 #include "G4ProcessManager.hh"
42 
44  theModel(0),theCascade(0),theQGSCModel(0),
45  theQGSCDecay(0),theQuasiElastic(0),
46  verbose(ver), wasActivated(false)
47 {
48  // pointer to the particle table
51 }
52 
54 
56 {
57  wasActivated = true;
58 
59  //QGSC model definition
60  theModel = new G4TheoFSGenerator("QGSC");
61 
62  theQGSCModel = new G4QGSModel< G4QGSParticipants >;
63  theQGSCDecay = new G4ExcitedStringDecay(new G4QGSMFragmentation);
64  theQGSCModel->SetFragmentationModel(theQGSCDecay);
65  theModel->SetHighEnergyGenerator(theQGSCModel);
66 
67  theCascade = new G4StringChipsParticleLevelInterface;
68  theModel->SetTransport(theCascade);
69 
70  theQuasiElastic = new G4QuasiElasticChannel;
71  theModel->SetQuasiElasticChannel(theQuasiElastic);
72 
73  theModel->SetMinEnergy(0.);
74  theModel->SetMaxEnergy(100*TeV);
75 
76 
78  while( (*theParticleIterator)() )
79  {
81  G4String pname = particle->GetParticleName();
82  if(pname == "kaon-" || pname == "kaon+" || pname == "kaon0S" || pname == "kaon0L" ||
83  pname == "pi-" || pname == "pi+" || pname == "neutron" || pname == "proton" )
84  {
85  if(verbose>1)G4cout<<"** G4MiscQGSCBuilder: "<<pname<<" already defined"<<G4endl;
86  }
87  else if(
88  pname == "anti_proton" || pname == "anti_neutron" || pname == "anti_lambda" ||
89  pname == "anti_sigma+" || pname == "anti_sigma0" || pname == "anti_sigma-" ||
90  pname == "anti_xi0" || pname == "anti_xi-" || pname == "anti_omega-" ||
91  pname == "lambda" || pname == "sigma+" || pname == "sigma0" ||
92  pname == "sigma-" || pname == "xi0" || pname == "xi-" || pname == "omega-")
93  {
94  if(verbose>1)G4cout<< "__ G4MiscQGSCBuilder: "<< pname <<" is defined here"<<G4endl;
95  G4ProcessManager* pmanager = particle->GetProcessManager();
96  G4HadronInelasticProcess* hp = new G4HadronInelasticProcess("hInelastic", particle);
97  pmanager->AddDiscreteProcess(hp);
98  hp->RegisterMe(theModel);
99  if(verbose>1)
100  G4cout<<"^^ G4MiscQGSCBuilder: "<<hp->GetProcessName()<<" added for "<<pname<<G4endl;
101  }
102  }
103 }
104 
105 // 2009 by M. Kosov