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;
33  G4double maxBERT= 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  if(nullptr != tpdata) {
98  delete tpdata->theQGSPNeutron;
99  delete tpdata->theFTFPNeutron;
100  delete tpdata->theBertiniNeutron;
101  delete tpdata->theNeutrons;
102 
103  delete tpdata->theQGSPPro;
104  delete tpdata->theFTFPPro;
105  delete tpdata->thePro;
106  delete tpdata->theBertiniPro;
107 
108  delete tpdata->theQGSPPiK;
109  delete tpdata->theFTFPPiK;
110  delete tpdata->theBertiniPiK;
111  delete tpdata->thePiK;
112 
113  delete tpdata->theHyperon;
114  delete tpdata->theAntiBaryon;
115  delete tpdata->theFTFPAntiBaryon;
116 
117  delete tpdata;
118  tpdata = nullptr;
119  }
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 == nullptr ) { 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  G4PhysListUtil::FindInelasticProcess(G4Neutron::Neutron())
150  ->AddDataSet(new G4NeutronInelasticXS());
151 
152  G4HadronicProcess* capture = nullptr;
153  G4ProcessManager* pmanager = G4Neutron::Neutron()->GetProcessManager();
154  G4ProcessVector* pv = pmanager->GetProcessList();
155  for ( size_t i=0; i < static_cast<size_t>(pv->size()); ++i ) {
156  if ( fCapture == ((*pv)[i])->GetProcessSubType() ) {
157  capture = static_cast<G4HadronicProcess*>((*pv)[i]);
158  }
159  }
160  if ( ! capture ) {
161  capture = new G4HadronCaptureProcess("nCapture");
162  pmanager->AddDiscreteProcess(capture);
163  }
164  capture->AddDataSet(new G4NeutronCaptureXS());
165  capture->RegisterMe(new G4NeutronRadCapture());
166 }
167 
def capture
Definition: ztee.py:94
int i
Definition: DBlmapReader.cc:9
const double GeV
Definition: MathUtil.h:16
static G4ThreadLocal ThreadPrivate * tpdata