CMS 3D CMS Logo

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