CMS 3D CMS Logo

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 #include "G4SystemOfUnits.hh"
13 
14 HadronPhysicsCMS::HadronPhysicsCMS(const G4String& name, G4bool quasiElastic) :
15  G4VPhysicsConstructor("hadron"), theNeutrons(nullptr), theBertiniNeutron(nullptr),
16  theBinaryNeutron(nullptr), theFTFPNeutron(nullptr),
17  theQGSPNeutron(nullptr), thePiK(nullptr), theBertiniPiK(nullptr),
18  theBinaryPiK(nullptr), theFTFPPiK(nullptr),
19  theQGSPPiK(nullptr), thePro(nullptr),theBertiniPro(nullptr),
20  theBinaryPro(nullptr), theFTFPPro(nullptr),
21  theQGSPPro(nullptr),
22  theFTFNeutron(nullptr), theFTFPiK(nullptr), theFTFPro(nullptr),
23  modelName(name),
24  QuasiElastic(quasiElastic)
25 {}
26 
28 
29  theNeutrons = new G4NeutronBuilder;
30  thePro = new G4ProtonBuilder;
31  thePiK = new G4PiKBuilder;
32 
33  if (modelName == "Bertini") {
34  theBertiniNeutron = new G4BertiniNeutronBuilder();
35  theBertiniNeutron->SetMaxEnergy(30.0*GeV);
36  theNeutrons->RegisterMe(theBertiniNeutron);
37  theBertiniPro = new G4BertiniProtonBuilder();
38  theBertiniPro->SetMaxEnergy(30.0*GeV);
39  thePro->RegisterMe(theBertiniPro);
40  theBertiniPiK = new G4BertiniPiKBuilder();
41  theBertiniPiK->SetMaxEnergy(30.0*GeV);
42  thePiK->RegisterMe(theBertiniPiK);
43  } else if (modelName == "Binary") {
44  theBinaryNeutron = new G4BinaryNeutronBuilder();
45  theBinaryNeutron->SetMaxEnergy(30.0*GeV);
46  theNeutrons->RegisterMe(theBinaryNeutron);
47  theBinaryPro = new G4BinaryProtonBuilder();
48  theBinaryPro->SetMaxEnergy(30.0*GeV);
49  thePro->RegisterMe(theBinaryPro);
50  theBinaryPiK = new G4BinaryPiKBuilder();
51  theBinaryPiK->SetMaxEnergy(30.0*GeV);
52  thePiK->RegisterMe(theBinaryPiK);
53  } else if (modelName == "FTFP") {
54  theFTFPNeutron = new G4FTFPNeutronBuilder();
55  theFTFPNeutron->SetMinEnergy(0.1*GeV);
56  theNeutrons->RegisterMe(theFTFPNeutron);
57  theFTFPPro = new G4FTFPProtonBuilder();
58  theFTFPPro->SetMinEnergy(0.1*GeV);
59  thePro->RegisterMe(theFTFPPro);
60  theFTFPPiK = new G4FTFPPiKBuilder();
61  theFTFPPiK->SetMinEnergy(0.1*GeV);
62  thePiK->RegisterMe(theFTFPPiK);
63  } else if (modelName == "FTF") {
64  theFTFNeutron = new G4FTFBinaryNeutronBuilder();
65  theNeutrons->RegisterMe(theFTFNeutron);
66  theFTFPro = new G4FTFBinaryProtonBuilder();
67  thePro->RegisterMe(theFTFPro);
68  theFTFPiK = new G4FTFBinaryPiKBuilder();
69  thePiK->RegisterMe(theFTFPiK);
70  } else {
71  theQGSPNeutron = new G4QGSPNeutronBuilder(QuasiElastic);
72  theQGSPNeutron->SetMinEnergy(0.1*GeV);
73  theNeutrons->RegisterMe(theQGSPNeutron);
74  theQGSPPro = new G4QGSPProtonBuilder(QuasiElastic);
75  theQGSPPro->SetMinEnergy(0.1*GeV);
76  thePro->RegisterMe(theQGSPPro);
77  theQGSPPiK = new G4QGSPPiKBuilder(QuasiElastic);
78  theQGSPPiK->SetMinEnergy(0.1*GeV);
79  thePiK->RegisterMe(theQGSPPiK);
80  }
81 
82 }
83 
87  if (theFTFPNeutron) delete theFTFPNeutron;
88  if (theQGSPNeutron) delete theQGSPNeutron;
89  if (theFTFNeutron) delete theFTFNeutron;
90  delete theNeutrons;
91  if (theBertiniPro) delete theBertiniPro;
92  if (theBinaryPro) delete theBinaryPro;
93  if (theFTFPPro) delete theFTFPPro;
94  if (theQGSPPro) delete theQGSPPro;
95  if (theFTFPro) delete theFTFPro;
96  delete thePro;
97  if (theBertiniPiK) delete theBertiniPiK;
98  if (theBinaryPiK) delete theBinaryPiK;
99  if (theFTFPPiK) delete theFTFPPiK;
100  if (theQGSPPiK) delete theQGSPPiK;
101  if (theFTFPiK) delete theFTFPiK;
102  delete thePiK;
103 }
104 
105 
107 
108  G4MesonConstructor pMesonConstructor;
109  pMesonConstructor.ConstructParticle();
110 
111  G4BaryonConstructor pBaryonConstructor;
112  pBaryonConstructor.ConstructParticle();
113 
114  G4ShortLivedConstructor pShortLivedConstructor;
115  pShortLivedConstructor.ConstructParticle();
116 }
117 
118 #include "G4ProcessManager.hh"
120 
121  CreateModels();
122  theNeutrons->Build();
123  thePro->Build();
124  thePiK->Build();
125  // theMiscLHEP->Build();
126 }
127 
const double GeV
Definition: MathUtil.h:16
G4QGSPProtonBuilder * theQGSPPro
G4FTFPNeutronBuilder * theFTFPNeutron
G4FTFBinaryNeutronBuilder * theFTFNeutron
G4BertiniProtonBuilder * theBertiniPro
~HadronPhysicsCMS() override
G4BertiniPiKBuilder * theBertiniPiK
HadronPhysicsCMS(const G4String &name="QGSP", G4bool quasiElastic=true)
#define nullptr
G4FTFBinaryPiKBuilder * theFTFPiK
G4FTFBinaryProtonBuilder * theFTFPro
G4FTFPPiKBuilder * theFTFPPiK
G4PiKBuilder * thePiK
G4FTFPProtonBuilder * theFTFPPro
G4BinaryProtonBuilder * theBinaryPro
G4QGSPNeutronBuilder * theQGSPNeutron
G4ProtonBuilder * thePro
G4BertiniNeutronBuilder * theBertiniNeutron
G4NeutronBuilder * theNeutrons
void ConstructParticle() override
G4BinaryPiKBuilder * theBinaryPiK
G4QGSPPiKBuilder * theQGSPPiK
G4BinaryNeutronBuilder * theBinaryNeutron
void ConstructProcess() override