test
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 #include "G4SystemOfUnits.hh"
13 
14 HadronPhysicsCMS::HadronPhysicsCMS(const G4String& name, G4bool quasiElastic) :
15  G4VPhysicsConstructor("hadron"), theNeutrons(0), theBertiniNeutron(0),
16  theBinaryNeutron(0), theFTFPNeutron(0),
17  theQGSPNeutron(0), thePiK(0), theBertiniPiK(0),
18  theBinaryPiK(0), theFTFPPiK(0),
19  theQGSPPiK(0), thePro(0),theBertiniPro(0),
20  theBinaryPro(0), theFTFPPro(0),
21  theQGSPPro(0),
22  theFTFNeutron(0), theFTFPiK(0), theFTFPro(0),
23  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 == "FTFP") {
53  theFTFPNeutron = new G4FTFPNeutronBuilder();
54  theFTFPNeutron->SetMinEnergy(0.1*GeV);
55  theNeutrons->RegisterMe(theFTFPNeutron);
56  theFTFPPro = new G4FTFPProtonBuilder();
57  theFTFPPro->SetMinEnergy(0.1*GeV);
58  thePro->RegisterMe(theFTFPPro);
59  theFTFPPiK = new G4FTFPPiKBuilder();
60  theFTFPPiK->SetMinEnergy(0.1*GeV);
61  thePiK->RegisterMe(theFTFPPiK);
62  } else if (modelName == "FTF") {
63  theFTFNeutron = new G4FTFBinaryNeutronBuilder();
64  theNeutrons->RegisterMe(theFTFNeutron);
65  theFTFPro = new G4FTFBinaryProtonBuilder();
66  thePro->RegisterMe(theFTFPro);
67  theFTFPiK = new G4FTFBinaryPiKBuilder();
68  thePiK->RegisterMe(theFTFPiK);
69  } else {
70  theQGSPNeutron = new G4QGSPNeutronBuilder(QuasiElastic);
71  theQGSPNeutron->SetMinEnergy(0.1*GeV);
72  theNeutrons->RegisterMe(theQGSPNeutron);
73  theQGSPPro = new G4QGSPProtonBuilder(QuasiElastic);
74  theQGSPPro->SetMinEnergy(0.1*GeV);
75  thePro->RegisterMe(theQGSPPro);
76  theQGSPPiK = new G4QGSPPiKBuilder(QuasiElastic);
77  theQGSPPiK->SetMinEnergy(0.1*GeV);
78  thePiK->RegisterMe(theQGSPPiK);
79  }
80 
81 }
82 
86  if (theFTFPNeutron) delete theFTFPNeutron;
87  if (theQGSPNeutron) delete theQGSPNeutron;
88  if (theFTFNeutron) delete theFTFNeutron;
89  delete theNeutrons;
90  if (theBertiniPro) delete theBertiniPro;
91  if (theBinaryPro) delete theBinaryPro;
92  if (theFTFPPro) delete theFTFPPro;
93  if (theQGSPPro) delete theQGSPPro;
94  if (theFTFPro) delete theFTFPro;
95  delete thePro;
96  if (theBertiniPiK) delete theBertiniPiK;
97  if (theBinaryPiK) delete theBinaryPiK;
98  if (theFTFPPiK) delete theFTFPPiK;
99  if (theQGSPPiK) delete theQGSPPiK;
100  if (theFTFPiK) delete theFTFPiK;
101  delete thePiK;
102 }
103 
104 
106 
107  G4MesonConstructor pMesonConstructor;
108  pMesonConstructor.ConstructParticle();
109 
110  G4BaryonConstructor pBaryonConstructor;
111  pBaryonConstructor.ConstructParticle();
112 
113  G4ShortLivedConstructor pShortLivedConstructor;
114  pShortLivedConstructor.ConstructParticle();
115 }
116 
117 #include "G4ProcessManager.hh"
119 
120  CreateModels();
121  theNeutrons->Build();
122  thePro->Build();
123  thePiK->Build();
124  // theMiscLHEP->Build();
125 }
126 
const double GeV
Definition: MathUtil.h:16
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()