CMS 3D CMS Logo

List of all members | Public Member Functions | Protected Member Functions | Protected Attributes
CMSHadronPhysicsFTFP_BERT Class Reference

#include <CMSHadronPhysicsFTFP_BERT.h>

Inheritance diagram for CMSHadronPhysicsFTFP_BERT:

Public Member Functions

 CMSHadronPhysicsFTFP_BERT (G4int verbose=1)
 
void ConstructParticle () override
 
void ConstructProcess () override
 
void TerminateWorker () override
 
 ~CMSHadronPhysicsFTFP_BERT () override
 

Protected Member Functions

virtual void CreateModels ()
 
virtual void DumpBanner ()
 
virtual void ExtraConfiguration ()
 
virtual void Kaon ()
 
virtual void Neutron ()
 
virtual void Others ()
 
virtual void Pion ()
 
virtual void Proton ()
 

Protected Attributes

G4double maxBERT_kaon
 
G4double maxBERT_neutron
 
G4double maxBERT_pion
 
G4double maxBERT_proton
 
G4double minFTFP_kaon
 
G4double minFTFP_neutron
 
G4double minFTFP_pion
 
G4double minFTFP_proton
 
G4bool QuasiElastic
 
G4VectorCache< G4VCrossSectionDataSet * > xs_ds
 
G4Cache< G4ComponentGGHadronNucleusXsc * > xs_k
 

Detailed Description

Definition at line 24 of file CMSHadronPhysicsFTFP_BERT.h.

Constructor & Destructor Documentation

CMSHadronPhysicsFTFP_BERT::CMSHadronPhysicsFTFP_BERT ( G4int  verbose = 1)
explicit

Definition at line 49 of file CMSHadronPhysicsFTFP_BERT.cc.

References GeV, maxBERT_kaon, maxBERT_neutron, maxBERT_pion, maxBERT_proton, minFTFP_kaon, minFTFP_neutron, minFTFP_pion, and minFTFP_proton.

50  : G4VPhysicsConstructor("hInelastic CMS FTFP_BERT"), QuasiElastic(false) {
51  minFTFP_pion = 4.0 * GeV;
52  maxBERT_pion = 5.0 * GeV;
53  minFTFP_kaon = 4.0 * GeV;
54  maxBERT_kaon = 5.0 * GeV;
55  minFTFP_proton = 4.0 * GeV;
56  maxBERT_proton = 5.0 * GeV;
57  minFTFP_neutron = 4.0 * GeV;
58  maxBERT_neutron = 5.0 * GeV;
59 }
const double GeV
Definition: MathUtil.h:16
CMSHadronPhysicsFTFP_BERT::~CMSHadronPhysicsFTFP_BERT ( )
override

Definition at line 61 of file CMSHadronPhysicsFTFP_BERT.cc.

References xs_ds, and xs_k.

61  {
62  //Detele master-owned stuff
63  delete xs_k.Get();
64  std::for_each(xs_ds.Begin(), xs_ds.End(), [](G4VCrossSectionDataSet* el) { delete el; });
65 }
G4Cache< G4ComponentGGHadronNucleusXsc * > xs_k
G4VectorCache< G4VCrossSectionDataSet * > xs_ds

Member Function Documentation

void CMSHadronPhysicsFTFP_BERT::ConstructParticle ( )
override

Definition at line 67 of file CMSHadronPhysicsFTFP_BERT.cc.

67  {
68  G4MesonConstructor pMesonConstructor;
69  pMesonConstructor.ConstructParticle();
70 
71  G4BaryonConstructor pBaryonConstructor;
72  pBaryonConstructor.ConstructParticle();
73 
74  G4ShortLivedConstructor pShortLivedConstructor;
75  pShortLivedConstructor.ConstructParticle();
76 }
void CMSHadronPhysicsFTFP_BERT::ConstructProcess ( )
override

Definition at line 178 of file CMSHadronPhysicsFTFP_BERT.cc.

References CreateModels(), DumpBanner(), and ExtraConfiguration().

178  {
179  if (G4Threading::IsMasterThread()) {
180  DumpBanner();
181  }
182  CreateModels();
184 }
void CMSHadronPhysicsFTFP_BERT::CreateModels ( )
protectedvirtual

Definition at line 93 of file CMSHadronPhysicsFTFP_BERT.cc.

References Kaon(), Neutron(), Others(), Pion(), and Proton().

Referenced by ConstructProcess().

void CMSHadronPhysicsFTFP_BERT::DumpBanner ( )
protectedvirtual

Definition at line 85 of file CMSHadronPhysicsFTFP_BERT.cc.

References ecalTB2006H4_GenSimDigiReco_cfg::G4cout, GeV, maxBERT_kaon, maxBERT_neutron, maxBERT_pion, maxBERT_proton, minFTFP_kaon, minFTFP_neutron, minFTFP_pion, and minFTFP_proton.

Referenced by ConstructProcess().

85  {
86  G4cout << G4endl << " FTFP_BERT : new threshold between BERT and FTFP is over the interval " << G4endl
87  << " for pions : " << minFTFP_pion / GeV << " to " << maxBERT_pion / GeV << " GeV" << G4endl
88  << " for kaons : " << minFTFP_kaon / GeV << " to " << maxBERT_kaon / GeV << " GeV" << G4endl
89  << " for proton : " << minFTFP_proton / GeV << " to " << maxBERT_proton / GeV << " GeV" << G4endl
90  << " for neutron : " << minFTFP_neutron / GeV << " to " << maxBERT_neutron / GeV << " GeV" << G4endl << G4endl;
91 }
const double GeV
Definition: MathUtil.h:16
void CMSHadronPhysicsFTFP_BERT::ExtraConfiguration ( )
protectedvirtual

Definition at line 186 of file CMSHadronPhysicsFTFP_BERT.cc.

References ztee::capture(), mps_fire::i, MetAnalyzer::pv(), xs_ds, and xs_k.

Referenced by ConstructProcess().

186  {
187  //Modify XS for kaons
188  auto xsk = new G4ComponentGGHadronNucleusXsc();
189  xs_k.Put(xsk);
190  G4VCrossSectionDataSet* kaonxs = new G4CrossSectionInelastic(xsk);
191  xs_ds.Push_back(kaonxs);
192  G4PhysListUtil::FindInelasticProcess(G4KaonMinus::KaonMinus())->AddDataSet(kaonxs);
193  G4PhysListUtil::FindInelasticProcess(G4KaonPlus::KaonPlus())->AddDataSet(kaonxs);
194  G4PhysListUtil::FindInelasticProcess(G4KaonZeroShort::KaonZeroShort())->AddDataSet(kaonxs);
195  G4PhysListUtil::FindInelasticProcess(G4KaonZeroLong::KaonZeroLong())->AddDataSet(kaonxs);
196 
197  //Modify Neutrons
198  auto xs_n_in = (G4NeutronInelasticXS*)G4CrossSectionDataSetRegistry::Instance()->GetCrossSectionDataSet(
199  G4NeutronInelasticXS::Default_Name());
200  xs_ds.Push_back(xs_n_in); //TODO: Is this needed? Who owns the pointer?
201  G4PhysListUtil::FindInelasticProcess(G4Neutron::Neutron())->AddDataSet(xs_n_in);
202  G4HadronicProcess* capture = nullptr;
203  G4ProcessManager* pmanager = G4Neutron::Neutron()->GetProcessManager();
204  G4ProcessVector* pv = pmanager->GetProcessList();
205  for (size_t i = 0; i < static_cast<size_t>(pv->size()); ++i) {
206  if (fCapture == ((*pv)[i])->GetProcessSubType()) {
207  capture = static_cast<G4HadronicProcess*>((*pv)[i]);
208  }
209  }
210  if (!capture) {
211  capture = new G4HadronCaptureProcess("nCapture");
212  pmanager->AddDiscreteProcess(capture);
213  }
214  auto xs_n_c = (G4NeutronCaptureXS*)G4CrossSectionDataSetRegistry::Instance()->GetCrossSectionDataSet(
215  G4NeutronCaptureXS::Default_Name());
216  xs_ds.Push_back(xs_n_c);
217  capture->AddDataSet(xs_n_c);
218  capture->RegisterMe(new G4NeutronRadCapture());
219 }
G4Cache< G4ComponentGGHadronNucleusXsc * > xs_k
def capture(fd, args)
Definition: ztee.py:94
G4VectorCache< G4VCrossSectionDataSet * > xs_ds
def pv(vc)
Definition: MetAnalyzer.py:7
void CMSHadronPhysicsFTFP_BERT::Kaon ( )
protectedvirtual

Definition at line 149 of file CMSHadronPhysicsFTFP_BERT.cc.

References gen::k, maxBERT_kaon, minFTFP_kaon, and QuasiElastic.

Referenced by CreateModels().

149  {
150  auto k = new G4KaonBuilder;
151  AddBuilder(k);
152  auto ftfpk = new G4FTFPKaonBuilder(QuasiElastic);
153  AddBuilder(ftfpk);
154  k->RegisterMe(ftfpk);
155  ftfpk->SetMinEnergy(minFTFP_kaon);
156  auto bertk = new G4BertiniKaonBuilder;
157  AddBuilder(bertk);
158  k->RegisterMe(bertk);
159  bertk->SetMaxEnergy(maxBERT_kaon);
160  k->Build();
161 }
int k[5][pyjets_maxn]
void CMSHadronPhysicsFTFP_BERT::Neutron ( )
protectedvirtual

Definition at line 101 of file CMSHadronPhysicsFTFP_BERT.cc.

References GeV, maxBERT_neutron, minFTFP_neutron, and QuasiElastic.

Referenced by CreateModels().

101  {
102  //General schema:
103  // 1) Create a builder
104  // 2) Call AddBuilder
105  // 3) Configure the builder, possibly with sub-builders
106  // 4) Call builder->Build()
107  auto neu = new G4NeutronBuilder;
108  AddBuilder(neu);
109  auto ftfpn = new G4FTFPNeutronBuilder(QuasiElastic);
110  AddBuilder(ftfpn);
111  neu->RegisterMe(ftfpn);
112  ftfpn->SetMinEnergy(minFTFP_neutron);
113  auto bertn = new G4BertiniNeutronBuilder;
114  AddBuilder(bertn);
115  neu->RegisterMe(bertn);
116  bertn->SetMinEnergy(0. * GeV);
117  bertn->SetMaxEnergy(maxBERT_neutron);
118  neu->Build();
119 }
const double GeV
Definition: MathUtil.h:16
void CMSHadronPhysicsFTFP_BERT::Others ( )
protectedvirtual

===== Anti-barions==== //

Definition at line 163 of file CMSHadronPhysicsFTFP_BERT.cc.

References QuasiElastic.

Referenced by CreateModels().

163  {
164  //===== Hyperons ====== //
165  auto hyp = new G4HyperonFTFPBuilder;
166  AddBuilder(hyp);
167  hyp->Build();
168 
170  auto abar = new G4AntiBarionBuilder;
171  AddBuilder(abar);
172  auto ftfpabar = new G4FTFPAntiBarionBuilder(QuasiElastic);
173  AddBuilder(ftfpabar);
174  abar->RegisterMe(ftfpabar);
175  abar->Build();
176 }
void CMSHadronPhysicsFTFP_BERT::Pion ( )
protectedvirtual

Definition at line 135 of file CMSHadronPhysicsFTFP_BERT.cc.

References maxBERT_pion, minFTFP_pion, pi, and QuasiElastic.

Referenced by CreateModels().

135  {
136  auto pi = new G4PionBuilder;
137  AddBuilder(pi);
138  auto ftfppi = new G4FTFPPionBuilder(QuasiElastic);
139  AddBuilder(ftfppi);
140  pi->RegisterMe(ftfppi);
141  ftfppi->SetMinEnergy(minFTFP_pion);
142  auto bertpi = new G4BertiniPionBuilder;
143  AddBuilder(bertpi);
144  pi->RegisterMe(bertpi);
145  bertpi->SetMaxEnergy(maxBERT_pion);
146  pi->Build();
147 }
const Double_t pi
void CMSHadronPhysicsFTFP_BERT::Proton ( )
protectedvirtual

Definition at line 121 of file CMSHadronPhysicsFTFP_BERT.cc.

References maxBERT_proton, minFTFP_proton, and QuasiElastic.

Referenced by CreateModels().

121  {
122  auto pro = new G4ProtonBuilder;
123  AddBuilder(pro);
124  auto ftfpp = new G4FTFPProtonBuilder(QuasiElastic);
125  AddBuilder(ftfpp);
126  pro->RegisterMe(ftfpp);
127  ftfpp->SetMinEnergy(minFTFP_proton);
128  auto bertp = new G4BertiniProtonBuilder;
129  AddBuilder(bertp);
130  pro->RegisterMe(bertp);
131  bertp->SetMaxEnergy(maxBERT_proton);
132  pro->Build();
133 }
void CMSHadronPhysicsFTFP_BERT::TerminateWorker ( )
override

Definition at line 78 of file CMSHadronPhysicsFTFP_BERT.cc.

References xs_ds, and xs_k.

78  {
79  delete xs_k.Get();
80  std::for_each(xs_ds.Begin(), xs_ds.End(), [](G4VCrossSectionDataSet* el) { delete el; });
81  xs_ds.Clear();
82  G4VPhysicsConstructor::TerminateWorker();
83 }
G4Cache< G4ComponentGGHadronNucleusXsc * > xs_k
G4VectorCache< G4VCrossSectionDataSet * > xs_ds

Member Data Documentation

G4double CMSHadronPhysicsFTFP_BERT::maxBERT_kaon
protected

Definition at line 54 of file CMSHadronPhysicsFTFP_BERT.h.

Referenced by CMSHadronPhysicsFTFP_BERT(), DumpBanner(), and Kaon().

G4double CMSHadronPhysicsFTFP_BERT::maxBERT_neutron
protected

Definition at line 58 of file CMSHadronPhysicsFTFP_BERT.h.

Referenced by CMSHadronPhysicsFTFP_BERT(), DumpBanner(), and Neutron().

G4double CMSHadronPhysicsFTFP_BERT::maxBERT_pion
protected

Definition at line 52 of file CMSHadronPhysicsFTFP_BERT.h.

Referenced by CMSHadronPhysicsFTFP_BERT(), DumpBanner(), and Pion().

G4double CMSHadronPhysicsFTFP_BERT::maxBERT_proton
protected

Definition at line 56 of file CMSHadronPhysicsFTFP_BERT.h.

Referenced by CMSHadronPhysicsFTFP_BERT(), DumpBanner(), and Proton().

G4double CMSHadronPhysicsFTFP_BERT::minFTFP_kaon
protected

Definition at line 53 of file CMSHadronPhysicsFTFP_BERT.h.

Referenced by CMSHadronPhysicsFTFP_BERT(), DumpBanner(), and Kaon().

G4double CMSHadronPhysicsFTFP_BERT::minFTFP_neutron
protected

Definition at line 57 of file CMSHadronPhysicsFTFP_BERT.h.

Referenced by CMSHadronPhysicsFTFP_BERT(), DumpBanner(), and Neutron().

G4double CMSHadronPhysicsFTFP_BERT::minFTFP_pion
protected

Definition at line 51 of file CMSHadronPhysicsFTFP_BERT.h.

Referenced by CMSHadronPhysicsFTFP_BERT(), DumpBanner(), and Pion().

G4double CMSHadronPhysicsFTFP_BERT::minFTFP_proton
protected

Definition at line 55 of file CMSHadronPhysicsFTFP_BERT.h.

Referenced by CMSHadronPhysicsFTFP_BERT(), DumpBanner(), and Proton().

G4bool CMSHadronPhysicsFTFP_BERT::QuasiElastic
protected

Definition at line 39 of file CMSHadronPhysicsFTFP_BERT.h.

Referenced by Kaon(), Neutron(), Others(), Pion(), and Proton().

G4VectorCache<G4VCrossSectionDataSet*> CMSHadronPhysicsFTFP_BERT::xs_ds
protected
G4Cache<G4ComponentGGHadronNucleusXsc*> CMSHadronPhysicsFTFP_BERT::xs_k
protected