CMS 3D CMS Logo

CMSHadronPhysicsFTFP_BERT_ATL.cc
Go to the documentation of this file.
1 //---------------------------------------------------------------------------
2 // Author: Alberto Ribon
3 // Date: April 2016
4 //
5 // Hadron physics for the new physics list FTFP_BERT_ATL.
6 // This is a modified version of the FTFP_BERT hadron physics for ATLAS.
7 // The hadron physics of FTFP_BERT_ATL has the transition between Bertini
8 // (BERT) intra-nuclear cascade model and Fritiof (FTF) string model in the
9 // energy region [9, 12] GeV (instead of [4, 5] GeV as in FTFP_BERT).
10 //---------------------------------------------------------------------------
11 //
12 #include <iomanip>
13 
15 
16 #include "globals.hh"
17 #include "G4ios.hh"
18 #include "G4SystemOfUnits.hh"
19 #include "G4ParticleDefinition.hh"
20 #include "G4ParticleTable.hh"
21 
22 #include "G4MesonConstructor.hh"
23 #include "G4BaryonConstructor.hh"
24 #include "G4ShortLivedConstructor.hh"
25 
26 #include "G4ComponentGGHadronNucleusXsc.hh"
27 #include "G4CrossSectionInelastic.hh"
28 #include "G4HadronCaptureProcess.hh"
29 #include "G4NeutronRadCapture.hh"
30 #include "G4NeutronInelasticXS.hh"
31 #include "G4NeutronCaptureXS.hh"
32 
33 #include "G4CrossSectionDataSetRegistry.hh"
34 
35 #include "G4PhysListUtil.hh"
36 
38 
40  : G4VPhysicsConstructor("hInelastic FTFP_BERT_ATL"), QuasiElastic(false) {}
41 
43  G4double minFTFP = 9.0 * GeV;
44  G4double maxBERT = 12.0 * GeV;
45  G4cout << " CMS_FTFP_BERT_ATL : new threshold between BERT and FTFP"
46  << " is over the interval " << minFTFP / GeV << " to " << maxBERT / GeV << " GeV." << G4endl;
47  QuasiElastic = false;
48 
49  tpdata->theNeutrons = new G4NeutronBuilder;
50  tpdata->theNeutrons->RegisterMe(tpdata->theFTFPNeutron = new G4FTFPNeutronBuilder(QuasiElastic));
51  tpdata->theFTFPNeutron->SetMinEnergy(minFTFP);
52  tpdata->theNeutrons->RegisterMe(tpdata->theBertiniNeutron = new G4BertiniNeutronBuilder);
53  tpdata->theBertiniNeutron->SetMinEnergy(0.0 * GeV);
54  tpdata->theBertiniNeutron->SetMaxEnergy(maxBERT);
55 
56  tpdata->thePro = new G4ProtonBuilder;
57  tpdata->thePro->RegisterMe(tpdata->theFTFPPro = new G4FTFPProtonBuilder(QuasiElastic));
58  tpdata->theFTFPPro->SetMinEnergy(minFTFP);
59  tpdata->thePro->RegisterMe(tpdata->theBertiniPro = new G4BertiniProtonBuilder);
60  tpdata->theBertiniPro->SetMaxEnergy(maxBERT);
61 
62  tpdata->thePiK = new G4PiKBuilder;
63  tpdata->thePiK->RegisterMe(tpdata->theFTFPPiK = new G4FTFPPiKBuilder(QuasiElastic));
64  tpdata->theFTFPPiK->SetMinEnergy(minFTFP);
65  tpdata->thePiK->RegisterMe(tpdata->theBertiniPiK = new G4BertiniPiKBuilder);
66  tpdata->theBertiniPiK->SetMaxEnergy(maxBERT);
67 
68  tpdata->theHyperon = new G4HyperonFTFPBuilder;
69 
70  tpdata->theAntiBaryon = new G4AntiBarionBuilder;
71  tpdata->theAntiBaryon->RegisterMe(tpdata->theFTFPAntiBaryon = new G4FTFPAntiBarionBuilder(QuasiElastic));
72 }
73 
75  if (!tpdata)
76  return;
77 
78  delete tpdata->theNeutrons;
79  delete tpdata->theBertiniNeutron;
80  delete tpdata->theFTFPNeutron;
81 
82  delete tpdata->thePiK;
83  delete tpdata->theBertiniPiK;
84  delete tpdata->theFTFPPiK;
85 
86  delete tpdata->thePro;
87  delete tpdata->theBertiniPro;
88  delete tpdata->theFTFPPro;
89 
90  delete tpdata->theHyperon;
91  delete tpdata->theAntiBaryon;
92  delete tpdata->theFTFPAntiBaryon;
93 
94  //Note that here we need to set to 0 the pointer
95  //since tpdata is static and if thread are "reused"
96  //it can be problematic
97  delete tpdata;
98  tpdata = nullptr;
99 }
100 
102  G4MesonConstructor pMesonConstructor;
103  pMesonConstructor.ConstructParticle();
104 
105  G4BaryonConstructor pBaryonConstructor;
106  pBaryonConstructor.ConstructParticle();
107 
108  G4ShortLivedConstructor pShortLivedConstructor;
109  pShortLivedConstructor.ConstructParticle();
110 }
111 
112 #include "G4ProcessManager.hh"
114  if (tpdata == nullptr)
115  tpdata = new ThreadPrivate;
116  CreateModels();
117  tpdata->theNeutrons->Build();
118  tpdata->thePro->Build();
119  tpdata->thePiK->Build();
120 
121  // --- Kaons ---
122  tpdata->xsKaon = new G4ComponentGGHadronNucleusXsc();
123  G4VCrossSectionDataSet* kaonxs = new G4CrossSectionInelastic(tpdata->xsKaon);
124  G4PhysListUtil::FindInelasticProcess(G4KaonMinus::KaonMinus())->AddDataSet(kaonxs);
125  G4PhysListUtil::FindInelasticProcess(G4KaonPlus::KaonPlus())->AddDataSet(kaonxs);
126  G4PhysListUtil::FindInelasticProcess(G4KaonZeroShort::KaonZeroShort())->AddDataSet(kaonxs);
127  G4PhysListUtil::FindInelasticProcess(G4KaonZeroLong::KaonZeroLong())->AddDataSet(kaonxs);
128 
129  tpdata->theHyperon->Build();
130  tpdata->theAntiBaryon->Build();
131 
132  // --- Neutrons ---
133  tpdata->xsNeutronInelasticXS = new G4NeutronInelasticXS();
134 
135  G4HadronicProcess* capture = nullptr;
136  G4ProcessManager* pmanager = G4Neutron::Neutron()->GetProcessManager();
137  G4ProcessVector* pv = pmanager->GetProcessList();
138  for (size_t i = 0; i < static_cast<size_t>(pv->size()); ++i) {
139  if (fCapture == ((*pv)[i])->GetProcessSubType()) {
140  capture = static_cast<G4HadronicProcess*>((*pv)[i]);
141  }
142  }
143  if (!capture) {
144  capture = new G4HadronCaptureProcess("nCapture");
145  pmanager->AddDiscreteProcess(capture);
146  }
147  tpdata->xsNeutronCaptureXS = new G4NeutronCaptureXS();
148  capture->AddDataSet(tpdata->xsNeutronCaptureXS);
149  capture->RegisterMe(new G4NeutronRadCapture());
150 }
const double GeV
Definition: MathUtil.h:16
def capture(fd, args)
Definition: ztee.py:94
def pv(vc)
Definition: MetAnalyzer.py:7
static G4ThreadLocal ThreadPrivate * tpdata