CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
HadronPhysicsQGSP_BERT_NOLEP2.cc
Go to the documentation of this file.
1 #include "SimG4Core/PhysicsLists/interface/HadronPhysicsQGSP_BERT_NOLEP2.hh"
2 
3 #include "globals.hh"
4 #include "G4ios.hh"
5 #include <iomanip>
6 #include "G4ParticleDefinition.hh"
7 #include "G4ParticleTable.hh"
8 
9 #include "G4MesonConstructor.hh"
10 #include "G4BaryonConstructor.hh"
11 #include "G4ShortLivedConstructor.hh"
12 
13 HadronPhysicsQGSP_BERT_NOLEP2::HadronPhysicsQGSP_BERT_NOLEP2(const G4String& name, G4bool quasiElastic)
14  : G4VPhysicsConstructor(name) , QuasiElastic(quasiElastic) {
15  ProjectileDiffraction=false;
16 }
17 
18 void HadronPhysicsQGSP_BERT_NOLEP2::CreateModels() {
19 
20  theNeutrons=new G4NeutronBuilder;
21  theNeutrons->RegisterMe(theQGSPNeutron=new G4QGSPNeutronBuilder(QuasiElastic, ProjectileDiffraction));
22  theNeutrons->RegisterMe(theLEPNeutron=new G4LEPNeutronBuilder);
23 // do not use LEP for inelastic, but leave capture, etc.
24  theLEPNeutron->SetMinInelasticEnergy(0.*eV);
25  theLEPNeutron->SetMaxInelasticEnergy(0.*eV);
26  theNeutrons->RegisterMe(theBertiniNeutron=new G4BertiniNeutronBuilder);
27  theBertiniNeutron->SetMinEnergy(0.0*GeV);
28  theBertiniNeutron->SetMaxEnergy(14.0*GeV);
29 
30  thePro=new G4ProtonBuilder;
31  thePro->RegisterMe(theQGSPPro=new G4QGSPProtonBuilder(QuasiElastic, ProjectileDiffraction));
32  thePro->RegisterMe(theBertiniPro=new G4BertiniProtonBuilder);
33  theBertiniPro->SetMaxEnergy(14.0*GeV);
34 
35  thePiK=new G4PiKBuilder;
36  thePiK->RegisterMe(theQGSPPiK=new G4QGSPPiKBuilder(QuasiElastic));
37  thePiK->RegisterMe(theBertiniPiK=new G4BertiniPiKBuilder);
38  theBertiniPiK->SetMaxEnergy(14.0*GeV);
39 
40  theMiscLHEP=new G4MiscLHEPBuilder;
41 }
42 
43 HadronPhysicsQGSP_BERT_NOLEP2::~HadronPhysicsQGSP_BERT_NOLEP2() {
44  delete theMiscLHEP;
45  delete theQGSPNeutron;
46  delete theLEPNeutron;
47  delete theBertiniNeutron;
48  delete theQGSPPro;
49  delete thePro;
50  delete theBertiniPro;
51  delete theQGSPPiK;
52  delete theBertiniPiK;
53  delete thePiK;
54 }
55 
56 void HadronPhysicsQGSP_BERT_NOLEP2::ConstructParticle() {
57  G4MesonConstructor pMesonConstructor;
58  pMesonConstructor.ConstructParticle();
59 
60  G4BaryonConstructor pBaryonConstructor;
61  pBaryonConstructor.ConstructParticle();
62 
63  G4ShortLivedConstructor pShortLivedConstructor;
64  pShortLivedConstructor.ConstructParticle();
65 }
66 
67 #include "G4ProcessManager.hh"
68 void HadronPhysicsQGSP_BERT_NOLEP2::ConstructProcess() {
69  CreateModels();
70  theNeutrons->Build();
71  thePro->Build();
72  thePiK->Build();
73  theMiscLHEP->Build();
74 }
75