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  theQGSPNeutron(0), thePiK(0), theBertiniPiK(0),
17  theBinaryPiK(0), theFTFPPiK(0),
18  theQGSPPiK(0), thePro(0),theBertiniPro(0),
19  theBinaryPro(0), theFTFPPro(0),
20  theQGSPPro(0),
21  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 == "FTF") {
62  theFTFNeutron = new G4FTFBinaryNeutronBuilder();
63  theNeutrons->RegisterMe(theFTFNeutron);
64  theFTFPro = new G4FTFBinaryProtonBuilder();
65  thePro->RegisterMe(theFTFPro);
66  theFTFPiK = new G4FTFBinaryPiKBuilder();
67  thePiK->RegisterMe(theFTFPiK);
68  } else {
69  theQGSPNeutron = new G4QGSPNeutronBuilder(QuasiElastic);
70  theQGSPNeutron->SetMinEnergy(0.1*GeV);
71  theNeutrons->RegisterMe(theQGSPNeutron);
72  theQGSPPro = new G4QGSPProtonBuilder(QuasiElastic);
73  theQGSPPro->SetMinEnergy(0.1*GeV);
74  thePro->RegisterMe(theQGSPPro);
75  theQGSPPiK = new G4QGSPPiKBuilder(QuasiElastic);
76  theQGSPPiK->SetMinEnergy(0.1*GeV);
77  thePiK->RegisterMe(theQGSPPiK);
78  }
79 
80 }
81 
85  if (theFTFPNeutron) delete theFTFPNeutron;
86  if (theQGSPNeutron) delete theQGSPNeutron;
87  if (theFTFNeutron) delete theFTFNeutron;
88  delete theNeutrons;
89  if (theBertiniPro) delete theBertiniPro;
90  if (theBinaryPro) delete theBinaryPro;
91  if (theFTFPPro) delete theFTFPPro;
92  if (theQGSPPro) delete theQGSPPro;
93  if (theFTFPro) delete theFTFPro;
94  delete thePro;
95  if (theBertiniPiK) delete theBertiniPiK;
96  if (theBinaryPiK) delete theBinaryPiK;
97  if (theFTFPPiK) delete theFTFPPiK;
98  if (theQGSPPiK) delete theQGSPPiK;
99  if (theFTFPiK) delete theFTFPiK;
100  delete thePiK;
101 }
102 
103 
105 
106  G4MesonConstructor pMesonConstructor;
107  pMesonConstructor.ConstructParticle();
108 
109  G4BaryonConstructor pBaryonConstructor;
110  pBaryonConstructor.ConstructParticle();
111 
112  G4ShortLivedConstructor pShortLivedConstructor;
113  pShortLivedConstructor.ConstructParticle();
114 }
115 
116 #include "G4ProcessManager.hh"
118 
119  CreateModels();
120  theNeutrons->Build();
121  thePro->Build();
122  thePiK->Build();
123  // theMiscLHEP->Build();
124 }
125 
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()