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), theFTFCNeutron(0), theFTFPNeutron(0), theLEPNeutron(0),
16  theLHEPNeutron(0), thePrecoNeutron(0), theQGSCEflowNeutron(0),
17  theQGSCNeutron(0), theQGSPNeutron(0), thePiK(0), theBertiniPiK(0),
18  theBinaryPiK(0), theFTFCPiK(0), theFTFPPiK(0), theLEPPiK(0), theLHEPPiK(0),
19  theQGSCEflowPiK(0), theQGSCPiK(0), theQGSPPiK(0), thePro(0),theBertiniPro(0),
20  theBinaryPro(0), theFTFCPro(0), theFTFPPro(0), theLEPPro(0), theLHEPPro(0),
21  thePrecoPro(0), theQGSCEflowPro(0), theQGSCPro(0), theQGSPPro(0),
22  theMiscLHEP(), theFTFNeutron(0), theFTFPiK(0), theFTFPro(0),
23  theRPGNeutron(0), theRPGPiK(0), theRPGPro(0), modelName(name),
24  QuasiElastic(quasiElastic) {}
25 
27 
28  theNeutrons = new G4NeutronBuilder;
29  thePro = new G4ProtonBuilder;
30  thePiK = new G4PiKBuilder;
31 
32  if (modelName == "Bertini") {
33  theBertiniNeutron = new G4BertiniNeutronBuilder();
34  theBertiniNeutron->SetMaxEnergy(30.0*GeV);
35  theNeutrons->RegisterMe(theBertiniNeutron);
36  theBertiniPro = new G4BertiniProtonBuilder();
37  theBertiniPro->SetMaxEnergy(30.0*GeV);
38  thePro->RegisterMe(theBertiniPro);
39  theBertiniPiK = new G4BertiniPiKBuilder();
40  theBertiniPiK->SetMaxEnergy(30.0*GeV);
41  thePiK->RegisterMe(theBertiniPiK);
42  } else if (modelName == "Binary") {
43  theBinaryNeutron = new G4BinaryNeutronBuilder();
44  theBinaryNeutron->SetMaxEnergy(30.0*GeV);
45  theNeutrons->RegisterMe(theBinaryNeutron);
46  theBinaryPro = new G4BinaryProtonBuilder();
47  theBinaryPro->SetMaxEnergy(30.0*GeV);
48  thePro->RegisterMe(theBinaryPro);
49  theBinaryPiK = new G4BinaryPiKBuilder();
50  theBinaryPiK->SetMaxEnergy(30.0*GeV);
51  thePiK->RegisterMe(theBinaryPiK);
52  } else if (modelName == "FTFC") {
53  theFTFCNeutron = new G4FTFCNeutronBuilder();
54  theFTFCNeutron->SetMinEnergy(0.1*GeV);
55  theNeutrons->RegisterMe(theFTFCNeutron);
56  theFTFCPro = new G4FTFCProtonBuilder();
57  theFTFCPro->SetMinEnergy(0.1*GeV);
58  thePro->RegisterMe(theFTFCPro);
59  theFTFCPiK = new G4FTFCPiKBuilder();
60  theFTFCPiK->SetMinEnergy(0.1*GeV);
61  thePiK->RegisterMe(theFTFCPiK);
62  } else if (modelName == "FTFP") {
63  theFTFPNeutron = new G4FTFPNeutronBuilder();
64  theFTFPNeutron->SetMinEnergy(0.1*GeV);
65  theNeutrons->RegisterMe(theFTFPNeutron);
66  theFTFPPro = new G4FTFPProtonBuilder();
67  theFTFPPro->SetMinEnergy(0.1*GeV);
68  thePro->RegisterMe(theFTFPPro);
69  theFTFPPiK = new G4FTFPPiKBuilder();
70  theFTFPPiK->SetMinEnergy(0.1*GeV);
71  thePiK->RegisterMe(theFTFPPiK);
72  } else if (modelName == "LEP") {
73  theLEPNeutron = new G4LEPNeutronBuilder();
74  theNeutrons->RegisterMe(theLEPNeutron);
75  theLEPPro = new G4LEPProtonBuilder();
76  thePro->RegisterMe(theLEPPro);
77  theLEPPiK = new G4LEPPiKBuilder();
78  thePiK->RegisterMe(theLEPPiK);
79  } else if (modelName == "LHEP") {
80  theLHEPNeutron = new G4LHEPNeutronBuilder();
81  theNeutrons->RegisterMe(theLHEPNeutron);
82  theLHEPPro = new G4LHEPProtonBuilder();
83  thePro->RegisterMe(theLHEPPro);
84  theLHEPPiK = new G4LHEPPiKBuilder();
85  thePiK->RegisterMe(theLHEPPiK);
86  } else if (modelName == "Preco") {
87  thePrecoNeutron = new G4PrecoNeutronBuilder();
88  theNeutrons->RegisterMe(thePrecoNeutron);
89  thePrecoPro = new G4PrecoProtonBuilder();
90  thePro->RegisterMe(thePrecoPro);
91  theLHEPPiK = new G4LHEPPiKBuilder();
92  thePiK->RegisterMe(theLHEPPiK);
93  } else if (modelName == "QGSCEflow") {
94  theQGSCEflowNeutron = new G4QGSCEflowNeutronBuilder();
95  theQGSCEflowNeutron->SetMinEnergy(0.1*GeV);
96  theNeutrons->RegisterMe(theQGSCEflowNeutron);
97  theQGSCEflowPro = new G4QGSCEflowProtonBuilder();
98  theQGSCEflowPro->SetMinEnergy(0.1*GeV);
99  thePro->RegisterMe(theQGSCEflowPro);
100  theQGSCEflowPiK = new G4QGSCEflowPiKBuilder();
101  theQGSCEflowPiK->SetMinEnergy(0.1*GeV);
102  thePiK->RegisterMe(theQGSCEflowPiK);
103  } else if (modelName == "QGSC") {
104  theQGSCNeutron = new G4QGSCNeutronBuilder();
105  theQGSCNeutron->SetMinEnergy(0.1*GeV);
106  theNeutrons->RegisterMe(theQGSCNeutron);
107  theQGSCPro = new G4QGSCProtonBuilder();
108  theQGSCPro->SetMinEnergy(0.1*GeV);
109  thePro->RegisterMe(theQGSCPro);
110  theQGSCPiK = new G4QGSCPiKBuilder();
111  theQGSCPiK->SetMinEnergy(0.1*GeV);
112  thePiK->RegisterMe(theQGSCPiK);
113  } else if (modelName == "RPG") {
114  theRPGNeutron = new G4RPGNeutronBuilder();
115  theNeutrons->RegisterMe(theRPGNeutron);
116  theRPGPro = new G4RPGProtonBuilder();
117  thePro->RegisterMe(theRPGPro);
118  theRPGPiK = new G4RPGPiKBuilder();
119  thePiK->RegisterMe(theRPGPiK);
120  } else if (modelName == "FTF") {
121  theFTFNeutron = new G4FTFBinaryNeutronBuilder();
122  theNeutrons->RegisterMe(theFTFNeutron);
123  theFTFPro = new G4FTFBinaryProtonBuilder();
124  thePro->RegisterMe(theFTFPro);
125  theFTFPiK = new G4FTFBinaryPiKBuilder();
126  thePiK->RegisterMe(theFTFPiK);
127  } else {
128  theQGSPNeutron = new G4QGSPNeutronBuilder(QuasiElastic);
129  theQGSPNeutron->SetMinEnergy(0.1*GeV);
130  theNeutrons->RegisterMe(theQGSPNeutron);
131  theQGSPPro = new G4QGSPProtonBuilder(QuasiElastic);
132  theQGSPPro->SetMinEnergy(0.1*GeV);
133  thePro->RegisterMe(theQGSPPro);
134  theQGSPPiK = new G4QGSPPiKBuilder(QuasiElastic);
135  theQGSPPiK->SetMinEnergy(0.1*GeV);
136  thePiK->RegisterMe(theQGSPPiK);
137  }
138 
139  theMiscLHEP=new G4MiscLHEPBuilder;
140 }
141 
143  delete theMiscLHEP;
146  if (theFTFCNeutron) delete theFTFCNeutron;
147  if (theFTFPNeutron) delete theFTFPNeutron;
148  if (theLEPNeutron) delete theLEPNeutron;
149  if (theLHEPNeutron) delete theLHEPNeutron;
150  if (thePrecoNeutron) delete thePrecoNeutron;
152  if (theQGSCNeutron) delete theQGSCNeutron;
153  if (theQGSPNeutron) delete theQGSPNeutron;
154  if (theFTFNeutron) delete theFTFNeutron;
155  if (theRPGNeutron) delete theRPGNeutron;
156  delete theNeutrons;
157  if (theBertiniPro) delete theBertiniPro;
158  if (theBinaryPro) delete theBinaryPro;
159  if (theFTFCPro) delete theFTFCPro;
160  if (theFTFPPro) delete theFTFPPro;
161  if (theLEPPro) delete theLEPPro;
162  if (theLHEPPro) delete theLHEPPro;
163  if (thePrecoPro) delete thePrecoPro;
164  if (theQGSCEflowPro) delete theQGSCEflowPro;
165  if (theQGSCPro) delete theQGSCPro;
166  if (theQGSPPro) delete theQGSPPro;
167  if (theFTFPro) delete theFTFPro;
168  if (theRPGPro) delete theRPGPro;
169  delete thePro;
170  if (theBertiniPiK) delete theBertiniPiK;
171  if (theBinaryPiK) delete theBinaryPiK;
172  if (theFTFCPiK) delete theFTFCPiK;
173  if (theFTFPPiK) delete theFTFPPiK;
174  if (theLEPPiK) delete theLEPPiK;
175  if (theLHEPPiK) delete theLHEPPiK;
176  if (theQGSCEflowPiK) delete theQGSCEflowPiK;
177  if (theQGSPPiK) delete theQGSPPiK;
178  if (theFTFPiK) delete theFTFPiK;
179  if (theRPGPiK) delete theRPGPiK;
180  delete thePiK;
181 }
182 
183 
185 
186  G4MesonConstructor pMesonConstructor;
187  pMesonConstructor.ConstructParticle();
188 
189  G4BaryonConstructor pBaryonConstructor;
190  pBaryonConstructor.ConstructParticle();
191 
192  G4ShortLivedConstructor pShortLivedConstructor;
193  pShortLivedConstructor.ConstructParticle();
194 }
195 
196 #include "G4ProcessManager.hh"
198 
199  CreateModels();
200  theNeutrons->Build();
201  thePro->Build();
202  thePiK->Build();
203  theMiscLHEP->Build();
204 }
205 
G4LHEPProtonBuilder * theLHEPPro
G4RPGNeutronBuilder * theRPGNeutron
G4MiscLHEPBuilder * theMiscLHEP
G4LHEPNeutronBuilder * theLHEPNeutron
G4FTFCNeutronBuilder * theFTFCNeutron
G4FTFCPiKBuilder * theFTFCPiK
G4QGSPProtonBuilder * theQGSPPro
G4FTFPNeutronBuilder * theFTFPNeutron
G4FTFBinaryNeutronBuilder * theFTFNeutron
G4RPGProtonBuilder * theRPGPro
virtual void ConstructParticle()
G4BertiniProtonBuilder * theBertiniPro
G4QGSCEflowProtonBuilder * theQGSCEflowPro
G4BertiniPiKBuilder * theBertiniPiK
HadronPhysicsCMS(const G4String &name="QGSP", G4bool quasiElastic=true)
G4QGSCEflowNeutronBuilder * theQGSCEflowNeutron
G4FTFBinaryPiKBuilder * theFTFPiK
G4LEPNeutronBuilder * theLEPNeutron
G4FTFBinaryProtonBuilder * theFTFPro
G4LEPProtonBuilder * theLEPPro
G4FTFPPiKBuilder * theFTFPPiK
G4PiKBuilder * thePiK
virtual ~HadronPhysicsCMS()
G4FTFPProtonBuilder * theFTFPPro
G4BinaryProtonBuilder * theBinaryPro
G4QGSPNeutronBuilder * theQGSPNeutron
G4ProtonBuilder * thePro
G4BertiniNeutronBuilder * theBertiniNeutron
G4NeutronBuilder * theNeutrons
G4LEPPiKBuilder * theLEPPiK
G4BinaryPiKBuilder * theBinaryPiK
G4QGSPPiKBuilder * theQGSPPiK
G4QGSCProtonBuilder * theQGSCPro
G4PrecoNeutronBuilder * thePrecoNeutron
G4BinaryNeutronBuilder * theBinaryNeutron
virtual void ConstructProcess()
G4RPGPiKBuilder * theRPGPiK
G4FTFCProtonBuilder * theFTFCPro
G4PrecoProtonBuilder * thePrecoPro
G4QGSCPiKBuilder * theQGSCPiK
G4LHEPPiKBuilder * theLHEPPiK
G4QGSCEflowPiKBuilder * theQGSCEflowPiK
G4QGSCNeutronBuilder * theQGSCNeutron