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