CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
HadronPhysicsCMS.cc
Go to the documentation of this file.
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 HadronPhysicsCMS::HadronPhysicsCMS(const G4String& name, G4bool quasiElastic) :
14  G4VPhysicsConstructor("hadron"), theNeutrons(0), theBertiniNeutron(0),
15  theBinaryNeutron(0), theFTFPNeutron(0),
16  theLHEPNeutron(0), theQGSPNeutron(0), thePiK(0), theBertiniPiK(0),
17  theBinaryPiK(0), theFTFPPiK(0), theLHEPPiK(0),
18  theQGSPPiK(0), thePro(0),theBertiniPro(0),
19  theBinaryPro(0), theFTFPPro(0), theLHEPPro(0),
20  theQGSPPro(0),
21  theMiscLHEP(), theFTFNeutron(0), theFTFPiK(0), theFTFPro(0),
22  modelName(name),
23  QuasiElastic(quasiElastic) {}
24 
26 
27  theNeutrons = new G4NeutronBuilder;
28  thePro = new G4ProtonBuilder;
29  thePiK = new G4PiKBuilder;
30 
31  if (modelName == "Bertini") {
32  theBertiniNeutron = new G4BertiniNeutronBuilder();
33  theBertiniNeutron->SetMaxEnergy(30.0*GeV);
34  theNeutrons->RegisterMe(theBertiniNeutron);
35  theBertiniPro = new G4BertiniProtonBuilder();
36  theBertiniPro->SetMaxEnergy(30.0*GeV);
37  thePro->RegisterMe(theBertiniPro);
38  theBertiniPiK = new G4BertiniPiKBuilder();
39  theBertiniPiK->SetMaxEnergy(30.0*GeV);
40  thePiK->RegisterMe(theBertiniPiK);
41  } else if (modelName == "Binary") {
42  theBinaryNeutron = new G4BinaryNeutronBuilder();
43  theBinaryNeutron->SetMaxEnergy(30.0*GeV);
44  theNeutrons->RegisterMe(theBinaryNeutron);
45  theBinaryPro = new G4BinaryProtonBuilder();
46  theBinaryPro->SetMaxEnergy(30.0*GeV);
47  thePro->RegisterMe(theBinaryPro);
48  theBinaryPiK = new G4BinaryPiKBuilder();
49  theBinaryPiK->SetMaxEnergy(30.0*GeV);
50  thePiK->RegisterMe(theBinaryPiK);
51  } else if (modelName == "FTFP") {
52  theFTFPNeutron = new G4FTFPNeutronBuilder();
53  theFTFPNeutron->SetMinEnergy(0.1*GeV);
54  theNeutrons->RegisterMe(theFTFPNeutron);
55  theFTFPPro = new G4FTFPProtonBuilder();
56  theFTFPPro->SetMinEnergy(0.1*GeV);
57  thePro->RegisterMe(theFTFPPro);
58  theFTFPPiK = new G4FTFPPiKBuilder();
59  theFTFPPiK->SetMinEnergy(0.1*GeV);
60  thePiK->RegisterMe(theFTFPPiK);
61  } else if (modelName == "LHEP") {
62  theLHEPNeutron = new G4LHEPNeutronBuilder();
63  theNeutrons->RegisterMe(theLHEPNeutron);
64  theLHEPPro = new G4LHEPProtonBuilder();
65  thePro->RegisterMe(theLHEPPro);
66  theLHEPPiK = new G4LHEPPiKBuilder();
67  thePiK->RegisterMe(theLHEPPiK);
68  } else if (modelName == "FTF") {
69  theFTFNeutron = new G4FTFBinaryNeutronBuilder();
70  theNeutrons->RegisterMe(theFTFNeutron);
71  theFTFPro = new G4FTFBinaryProtonBuilder();
72  thePro->RegisterMe(theFTFPro);
73  theFTFPiK = new G4FTFBinaryPiKBuilder();
74  thePiK->RegisterMe(theFTFPiK);
75  } else {
76  theQGSPNeutron = new G4QGSPNeutronBuilder(QuasiElastic);
77  theQGSPNeutron->SetMinEnergy(0.1*GeV);
78  theNeutrons->RegisterMe(theQGSPNeutron);
79  theQGSPPro = new G4QGSPProtonBuilder(QuasiElastic);
80  theQGSPPro->SetMinEnergy(0.1*GeV);
81  thePro->RegisterMe(theQGSPPro);
82  theQGSPPiK = new G4QGSPPiKBuilder(QuasiElastic);
83  theQGSPPiK->SetMinEnergy(0.1*GeV);
84  thePiK->RegisterMe(theQGSPPiK);
85  }
86 
87  theMiscLHEP=new G4MiscLHEPBuilder;
88 }
89 
91  delete theMiscLHEP;
94  if (theFTFPNeutron) delete theFTFPNeutron;
95  if (theLHEPNeutron) delete theLHEPNeutron;
96  if (theQGSPNeutron) delete theQGSPNeutron;
97  if (theFTFNeutron) delete theFTFNeutron;
98  delete theNeutrons;
99  if (theBertiniPro) delete theBertiniPro;
100  if (theBinaryPro) delete theBinaryPro;
101  if (theFTFPPro) delete theFTFPPro;
102  if (theLHEPPro) delete theLHEPPro;
103  if (theQGSPPro) delete theQGSPPro;
104  if (theFTFPro) delete theFTFPro;
105  delete thePro;
106  if (theBertiniPiK) delete theBertiniPiK;
107  if (theBinaryPiK) delete theBinaryPiK;
108  if (theFTFPPiK) delete theFTFPPiK;
109  if (theLHEPPiK) delete theLHEPPiK;
110  if (theQGSPPiK) delete theQGSPPiK;
111  if (theFTFPiK) delete theFTFPiK;
112  delete thePiK;
113 }
114 
115 
117 
118  G4MesonConstructor pMesonConstructor;
119  pMesonConstructor.ConstructParticle();
120 
121  G4BaryonConstructor pBaryonConstructor;
122  pBaryonConstructor.ConstructParticle();
123 
124  G4ShortLivedConstructor pShortLivedConstructor;
125  pShortLivedConstructor.ConstructParticle();
126 }
127 
128 #include "G4ProcessManager.hh"
130 
131  CreateModels();
132  theNeutrons->Build();
133  thePro->Build();
134  thePiK->Build();
135  theMiscLHEP->Build();
136 }
137 
G4LHEPProtonBuilder * theLHEPPro
G4MiscLHEPBuilder * theMiscLHEP
G4LHEPNeutronBuilder * theLHEPNeutron
G4QGSPProtonBuilder * theQGSPPro
G4FTFPNeutronBuilder * theFTFPNeutron
G4FTFBinaryNeutronBuilder * theFTFNeutron
virtual void ConstructParticle()
G4BertiniProtonBuilder * theBertiniPro
G4BertiniPiKBuilder * theBertiniPiK
HadronPhysicsCMS(const G4String &name="QGSP", G4bool quasiElastic=true)
G4FTFBinaryPiKBuilder * theFTFPiK
G4FTFBinaryProtonBuilder * theFTFPro
G4FTFPPiKBuilder * theFTFPPiK
G4PiKBuilder * thePiK
virtual ~HadronPhysicsCMS()
G4FTFPProtonBuilder * theFTFPPro
G4BinaryProtonBuilder * theBinaryPro
G4QGSPNeutronBuilder * theQGSPNeutron
G4ProtonBuilder * thePro
G4BertiniNeutronBuilder * theBertiniNeutron
G4NeutronBuilder * theNeutrons
G4BinaryPiKBuilder * theBinaryPiK
G4QGSPPiKBuilder * theQGSPPiK
G4BinaryNeutronBuilder * theBinaryNeutron
virtual void ConstructProcess()
G4LHEPPiKBuilder * theLHEPPiK