CMS 3D CMS Logo

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 
23 
25  : G4VPhysicsConstructor("hInelasticQGSPCMS_FTFP_BERT") {}
26 
28  // First transition, between BERT and FTF/P
29  G4double minFTFP = 6.0 * GeV;
30  G4double maxBERT = 8.0 * GeV;
31  // Second transition, between FTF/P and QGS/P
32  G4double minQGSP = 12.0 * GeV;
33  G4double maxFTFP = 25.0 * GeV;
34 
35  G4bool quasiElasFTF = false; // Use built-in quasi-elastic (not add-on)
36  G4bool quasiElasQGS = true; // For QGS, it must use it.
37 
38  G4cout << " New QGSPCMS_FTFP_BERT hadronic inealstic physics" << G4endl;
39  G4cout << " Thresholds: " << G4endl;
40  G4cout << " 1) between BERT and FTFP over the interval " << minFTFP / GeV << " to " << maxBERT / GeV << " GeV. "
41  << G4endl;
42  G4cout << " 2) between FTFP and QGSP over the interval " << minQGSP / GeV << " to " << maxFTFP / GeV << " GeV. "
43  << G4endl;
44  G4cout << " QuasiElastic: " << quasiElasQGS << " for QGS "
45  << " and " << quasiElasFTF << " for FTF " << G4endl;
46 
47  tpdata->theNeutrons = new G4NeutronBuilder;
48  tpdata->theNeutrons->RegisterMe(tpdata->theQGSPNeutron = new G4QGSPNeutronBuilder(quasiElasQGS));
49  tpdata->theQGSPNeutron->SetMinEnergy(minQGSP);
50  tpdata->theNeutrons->RegisterMe(tpdata->theFTFPNeutron = new G4FTFPNeutronBuilder(quasiElasFTF));
51  tpdata->theFTFPNeutron->SetMinEnergy(minFTFP);
52  tpdata->theFTFPNeutron->SetMaxEnergy(maxFTFP);
53 
54  tpdata->theNeutrons->RegisterMe(tpdata->theBertiniNeutron = new G4BertiniNeutronBuilder);
55  tpdata->theBertiniNeutron->SetMinEnergy(0.0 * GeV);
56  tpdata->theBertiniNeutron->SetMaxEnergy(maxBERT);
57 
58  tpdata->thePro = new G4ProtonBuilder;
59  tpdata->thePro->RegisterMe(tpdata->theQGSPPro = new G4QGSPProtonBuilder(quasiElasQGS));
60  tpdata->theQGSPPro->SetMinEnergy(minQGSP);
61  tpdata->thePro->RegisterMe(tpdata->theFTFPPro = new G4FTFPProtonBuilder(quasiElasFTF));
62  tpdata->theFTFPPro->SetMinEnergy(minFTFP);
63  tpdata->theFTFPPro->SetMaxEnergy(maxFTFP);
64  tpdata->thePro->RegisterMe(tpdata->theBertiniPro = new G4BertiniProtonBuilder);
65  tpdata->theBertiniPro->SetMaxEnergy(maxBERT);
66 
67  tpdata->thePiK = new G4PiKBuilder;
68  tpdata->thePiK->RegisterMe(tpdata->theQGSPPiK = new G4QGSPPiKBuilder(quasiElasQGS));
69  tpdata->theQGSPPiK->SetMinEnergy(minQGSP);
70  tpdata->thePiK->RegisterMe(tpdata->theFTFPPiK = new G4FTFPPiKBuilder(quasiElasFTF));
71  tpdata->theFTFPPiK->SetMaxEnergy(maxFTFP);
72  tpdata->theFTFPPiK->SetMinEnergy(minFTFP);
73  tpdata->thePiK->RegisterMe(tpdata->theBertiniPiK = new G4BertiniPiKBuilder);
74  tpdata->theBertiniPiK->SetMaxEnergy(maxBERT);
75 
76  // Hyperons use FTF
77  tpdata->theHyperon = new G4HyperonFTFPBuilder;
78 
79  tpdata->theAntiBaryon = new G4AntiBarionBuilder;
80  tpdata->theAntiBaryon->RegisterMe(tpdata->theFTFPAntiBaryon = new G4FTFPAntiBarionBuilder(quasiElasFTF));
81 }
82 
84  if (nullptr != tpdata) {
85  delete tpdata->theQGSPNeutron;
86  delete tpdata->theFTFPNeutron;
87  delete tpdata->theBertiniNeutron;
88  delete tpdata->theNeutrons;
89 
90  delete tpdata->theQGSPPro;
91  delete tpdata->theFTFPPro;
92  delete tpdata->thePro;
93  delete tpdata->theBertiniPro;
94 
95  delete tpdata->theQGSPPiK;
96  delete tpdata->theFTFPPiK;
97  delete tpdata->theBertiniPiK;
98  delete tpdata->thePiK;
99 
100  delete tpdata->theHyperon;
101  delete tpdata->theAntiBaryon;
102  delete tpdata->theFTFPAntiBaryon;
103 
104  delete tpdata;
105  tpdata = nullptr;
106  }
107 }
108 
110  G4MesonConstructor pMesonConstructor;
111  pMesonConstructor.ConstructParticle();
112 
113  G4BaryonConstructor pBaryonConstructor;
114  pBaryonConstructor.ConstructParticle();
115 
116  G4ShortLivedConstructor pShortLivedConstructor;
117  pShortLivedConstructor.ConstructParticle();
118 
119  G4IonConstructor pIonConstructor;
120  pIonConstructor.ConstructParticle();
121 }
122 
123 #include "G4ProcessManager.hh"
125  if (tpdata == nullptr) {
126  tpdata = new ThreadPrivate;
127  }
128  CreateModels();
129  tpdata->theNeutrons->Build();
130  tpdata->thePro->Build();
131  tpdata->thePiK->Build();
132  tpdata->theHyperon->Build();
133  tpdata->theAntiBaryon->Build();
134 
135  // --- Neutrons ---
136  G4PhysListUtil::FindInelasticProcess(G4Neutron::Neutron())->AddDataSet(new G4NeutronInelasticXS());
137 
138  G4HadronicProcess* capture = nullptr;
139  G4ProcessManager* pmanager = G4Neutron::Neutron()->GetProcessManager();
140  G4ProcessVector* pv = pmanager->GetProcessList();
141  for (size_t i = 0; i < static_cast<size_t>(pv->size()); ++i) {
142  if (fCapture == ((*pv)[i])->GetProcessSubType()) {
143  capture = static_cast<G4HadronicProcess*>((*pv)[i]);
144  }
145  }
146  if (!capture) {
147  capture = new G4HadronCaptureProcess("nCapture");
148  pmanager->AddDiscreteProcess(capture);
149  }
150  capture->AddDataSet(new G4NeutronCaptureXS());
151  capture->RegisterMe(new G4NeutronRadCapture());
152 }
const double GeV
Definition: MathUtil.h:16
def capture(fd, args)
Definition: ztee.py:94
static G4ThreadLocal ThreadPrivate * tpdata
def pv(vc)
Definition: MetAnalyzer.py:7