CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
HadronPhysicsQGSPCMS_FTFP_BERT.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 "G4IonConstructor.hh"
13 
14 #include "G4HadronCaptureProcess.hh"
15 #include "G4NeutronRadCapture.hh"
16 #include "G4NeutronInelasticXS.hh"
17 #include "G4NeutronCaptureXS.hh"
18 
19 #include "G4PhysListUtil.hh"
20 #include "G4SystemOfUnits.hh"
21 
24 
26  : G4VPhysicsConstructor("hInelasticQGSPCMS_FTFP_BERT")
27 {}
28 
30 {
31  // First transition, between BERT and FTF/P
32  G4double minFTFP= 6.0 * GeV; // Was 9.5 for LEP (in FTFP_BERT 6.0 * GeV);
33  G4double maxBERT= 8.0 * GeV; // Was 9.9 for LEP (in FTFP_BERT 8.0 * GeV);
34  // Second transition, between FTF/P and QGS/P
35  G4double minQGSP= 12.0 * GeV;
36  G4double maxFTFP= 25.0 * GeV;
37 
38  G4bool quasiElasFTF= false; // Use built-in quasi-elastic (not add-on)
39  G4bool quasiElasQGS= true; // For QGS, it must use it.
40 
41  G4cout << " New QGSPCMS_FTFP_BERT hadronic inealstic physics" << G4endl;
42  G4cout << " Thresholds: " << G4endl;
43  G4cout << " 1) between BERT and FTFP over the interval "
44  << minFTFP/GeV << " to " << maxBERT/GeV << " GeV. " << G4endl;
45  G4cout << " 2) between FTFP and QGSP over the interval "
46  << minQGSP/GeV << " to " << maxFTFP/GeV << " GeV. " << G4endl;
47  G4cout << " QuasiElastic: " << quasiElasQGS << " for QGS "
48  << " and " << quasiElasFTF << " for FTF " << G4endl;
49 
50  tpdata->theNeutrons=new G4NeutronBuilder;
51  tpdata->theNeutrons->RegisterMe(
52  tpdata->theQGSPNeutron=new G4QGSPNeutronBuilder(quasiElasQGS));
53  tpdata->theQGSPNeutron->SetMinEnergy(minQGSP);
54  tpdata->theNeutrons->RegisterMe(
55  tpdata->theFTFPNeutron=new G4FTFPNeutronBuilder(quasiElasFTF));
56  tpdata->theFTFPNeutron->SetMinEnergy(minFTFP);
57  tpdata->theFTFPNeutron->SetMaxEnergy(maxFTFP);
58 
59  tpdata->theNeutrons->RegisterMe(
60  tpdata->theBertiniNeutron=new G4BertiniNeutronBuilder);
61  tpdata->theBertiniNeutron->SetMinEnergy(0.0*GeV);
62  tpdata->theBertiniNeutron->SetMaxEnergy(maxBERT);
63 
64  tpdata->thePro=new G4ProtonBuilder;
65  tpdata->thePro->RegisterMe(
66  tpdata->theQGSPPro=new G4QGSPProtonBuilder(quasiElasQGS));
67  tpdata->theQGSPPro->SetMinEnergy(minQGSP);
68  tpdata->thePro->RegisterMe(
69  tpdata->theFTFPPro=new G4FTFPProtonBuilder(quasiElasFTF));
70  tpdata->theFTFPPro->SetMinEnergy(minFTFP);
71  tpdata->theFTFPPro->SetMaxEnergy(maxFTFP);
72  tpdata->thePro->RegisterMe(
73  tpdata->theBertiniPro=new G4BertiniProtonBuilder);
74  tpdata->theBertiniPro->SetMaxEnergy(maxBERT);
75 
76  tpdata->thePiK=new G4PiKBuilder;
77  tpdata->thePiK->RegisterMe(
78  tpdata->theQGSPPiK=new G4QGSPPiKBuilder(quasiElasQGS));
79  tpdata->theQGSPPiK->SetMinEnergy(minQGSP);
80  tpdata->thePiK->RegisterMe(
81  tpdata->theFTFPPiK=new G4FTFPPiKBuilder(quasiElasFTF));
82  tpdata->theFTFPPiK->SetMaxEnergy(maxFTFP);
83  tpdata->theFTFPPiK->SetMinEnergy(minFTFP);
84  tpdata->thePiK->RegisterMe(tpdata->theBertiniPiK=new G4BertiniPiKBuilder);
85  tpdata->theBertiniPiK->SetMaxEnergy(maxBERT);
86 
87  // Hyperons use FTF
88  tpdata->theHyperon=new G4HyperonFTFPBuilder;
89 
90  tpdata->theAntiBaryon=new G4AntiBarionBuilder;
91  tpdata->theAntiBaryon->RegisterMe(
92  tpdata->theFTFPAntiBaryon=new G4FTFPAntiBarionBuilder(quasiElasFTF));
93 }
94 
96 {
97  delete tpdata->theQGSPNeutron;
98  delete tpdata->theFTFPNeutron;
99  delete tpdata->theBertiniNeutron;
100  delete tpdata->theNeutrons;
101 
102  delete tpdata->theQGSPPro;
103  delete tpdata->theFTFPPro;
104  delete tpdata->thePro;
105  delete tpdata->theBertiniPro;
106 
107  delete tpdata->theQGSPPiK;
108  delete tpdata->theFTFPPiK;
109  delete tpdata->theBertiniPiK;
110  delete tpdata->thePiK;
111 
112  delete tpdata->theHyperon;
113  delete tpdata->theAntiBaryon;
114  delete tpdata->theFTFPAntiBaryon;
115 
117  delete tpdata->xsNeutronCaptureXS;
118 
119  delete tpdata;
120 }
121 
123 {
124  G4MesonConstructor pMesonConstructor;
125  pMesonConstructor.ConstructParticle();
126 
127  G4BaryonConstructor pBaryonConstructor;
128  pBaryonConstructor.ConstructParticle();
129 
130  G4ShortLivedConstructor pShortLivedConstructor;
131  pShortLivedConstructor.ConstructParticle();
132 
133  G4IonConstructor pIonConstructor;
134  pIonConstructor.ConstructParticle();
135 }
136 
137 #include "G4ProcessManager.hh"
139 {
140  if ( tpdata == 0 ) tpdata = new ThreadPrivate;
141  CreateModels();
142  tpdata->theNeutrons->Build();
143  tpdata->thePro->Build();
144  tpdata->thePiK->Build();
145  tpdata->theHyperon->Build();
146  tpdata->theAntiBaryon->Build();
147 
148  // --- Neutrons ---
149  tpdata->xsNeutronInelasticXS = new G4NeutronInelasticXS();
150  G4PhysListUtil::FindInelasticProcess(G4Neutron::Neutron())
151  ->AddDataSet(tpdata->xsNeutronInelasticXS);
152 
153  G4HadronicProcess* capture = 0;
154  G4ProcessManager* pmanager = G4Neutron::Neutron()->GetProcessManager();
155  G4ProcessVector* pv = pmanager->GetProcessList();
156  for ( size_t i=0; i < static_cast<size_t>(pv->size()); ++i ) {
157  if ( fCapture == ((*pv)[i])->GetProcessSubType() ) {
158  capture = static_cast<G4HadronicProcess*>((*pv)[i]);
159  }
160  }
161  if ( ! capture ) {
162  capture = new G4HadronCaptureProcess("nCapture");
163  pmanager->AddDiscreteProcess(capture);
164  }
165  tpdata->xsNeutronCaptureXS = new G4NeutronCaptureXS();
166  capture->AddDataSet(tpdata->xsNeutronCaptureXS);
167  capture->RegisterMe(new G4NeutronRadCapture());
168 }
169 
int i
Definition: DBlmapReader.cc:9
static G4ThreadLocal ThreadPrivate * tpdata