CMS 3D CMS Logo

List of all members | Classes | Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes
CMSHadronPhysicsFTFP_BERT_ATL Class Reference

#include <CMSHadronPhysicsFTFP_BERT_ATL.h>

Inheritance diagram for CMSHadronPhysicsFTFP_BERT_ATL:

Classes

struct  ThreadPrivate
 

Public Member Functions

 CMSHadronPhysicsFTFP_BERT_ATL (G4int verbose=1)
 
void ConstructParticle () override
 
void ConstructProcess () override
 
 ~CMSHadronPhysicsFTFP_BERT_ATL () override
 

Private Member Functions

void CreateModels ()
 

Private Attributes

G4bool QuasiElastic
 

Static Private Attributes

static G4ThreadLocal ThreadPrivatetpdata = nullptr
 

Detailed Description

Definition at line 39 of file CMSHadronPhysicsFTFP_BERT_ATL.h.

Constructor & Destructor Documentation

CMSHadronPhysicsFTFP_BERT_ATL::CMSHadronPhysicsFTFP_BERT_ATL ( G4int  verbose = 1)

Definition at line 39 of file CMSHadronPhysicsFTFP_BERT_ATL.cc.

40  : G4VPhysicsConstructor("hInelastic FTFP_BERT_ATL"), QuasiElastic(false) {}
CMSHadronPhysicsFTFP_BERT_ATL::~CMSHadronPhysicsFTFP_BERT_ATL ( )
override

Definition at line 74 of file CMSHadronPhysicsFTFP_BERT_ATL.cc.

References CMSHadronPhysicsFTFP_BERT_ATL::ThreadPrivate::theAntiBaryon, CMSHadronPhysicsFTFP_BERT_ATL::ThreadPrivate::theBertiniNeutron, CMSHadronPhysicsFTFP_BERT_ATL::ThreadPrivate::theBertiniPiK, CMSHadronPhysicsFTFP_BERT_ATL::ThreadPrivate::theBertiniPro, CMSHadronPhysicsFTFP_BERT_ATL::ThreadPrivate::theFTFPAntiBaryon, CMSHadronPhysicsFTFP_BERT_ATL::ThreadPrivate::theFTFPNeutron, CMSHadronPhysicsFTFP_BERT_ATL::ThreadPrivate::theFTFPPiK, CMSHadronPhysicsFTFP_BERT_ATL::ThreadPrivate::theFTFPPro, CMSHadronPhysicsFTFP_BERT_ATL::ThreadPrivate::theHyperon, CMSHadronPhysicsFTFP_BERT_ATL::ThreadPrivate::theNeutrons, CMSHadronPhysicsFTFP_BERT_ATL::ThreadPrivate::thePiK, CMSHadronPhysicsFTFP_BERT_ATL::ThreadPrivate::thePro, and tpdata.

74  {
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 }
static G4ThreadLocal ThreadPrivate * tpdata

Member Function Documentation

void CMSHadronPhysicsFTFP_BERT_ATL::ConstructParticle ( )
override

Definition at line 101 of file CMSHadronPhysicsFTFP_BERT_ATL.cc.

101  {
102  G4MesonConstructor pMesonConstructor;
103  pMesonConstructor.ConstructParticle();
104 
105  G4BaryonConstructor pBaryonConstructor;
106  pBaryonConstructor.ConstructParticle();
107 
108  G4ShortLivedConstructor pShortLivedConstructor;
109  pShortLivedConstructor.ConstructParticle();
110 }
void CMSHadronPhysicsFTFP_BERT_ATL::ConstructProcess ( )
override

Definition at line 113 of file CMSHadronPhysicsFTFP_BERT_ATL.cc.

References ztee::capture(), CreateModels(), mps_fire::i, MetAnalyzer::pv(), CMSHadronPhysicsFTFP_BERT_ATL::ThreadPrivate::theAntiBaryon, CMSHadronPhysicsFTFP_BERT_ATL::ThreadPrivate::theHyperon, CMSHadronPhysicsFTFP_BERT_ATL::ThreadPrivate::theNeutrons, CMSHadronPhysicsFTFP_BERT_ATL::ThreadPrivate::thePiK, CMSHadronPhysicsFTFP_BERT_ATL::ThreadPrivate::thePro, tpdata, CMSHadronPhysicsFTFP_BERT_ATL::ThreadPrivate::xsKaon, CMSHadronPhysicsFTFP_BERT_ATL::ThreadPrivate::xsNeutronCaptureXS, and CMSHadronPhysicsFTFP_BERT_ATL::ThreadPrivate::xsNeutronInelasticXS.

113  {
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 }
def capture(fd, args)
Definition: ztee.py:94
def pv(vc)
Definition: MetAnalyzer.py:7
static G4ThreadLocal ThreadPrivate * tpdata
void CMSHadronPhysicsFTFP_BERT_ATL::CreateModels ( )
private

Definition at line 42 of file CMSHadronPhysicsFTFP_BERT_ATL.cc.

References ecalTB2006H4_GenSimDigiReco_cfg::G4cout, GeV, QuasiElastic, CMSHadronPhysicsFTFP_BERT_ATL::ThreadPrivate::theAntiBaryon, CMSHadronPhysicsFTFP_BERT_ATL::ThreadPrivate::theBertiniNeutron, CMSHadronPhysicsFTFP_BERT_ATL::ThreadPrivate::theBertiniPiK, CMSHadronPhysicsFTFP_BERT_ATL::ThreadPrivate::theBertiniPro, CMSHadronPhysicsFTFP_BERT_ATL::ThreadPrivate::theFTFPAntiBaryon, CMSHadronPhysicsFTFP_BERT_ATL::ThreadPrivate::theFTFPNeutron, CMSHadronPhysicsFTFP_BERT_ATL::ThreadPrivate::theFTFPPiK, CMSHadronPhysicsFTFP_BERT_ATL::ThreadPrivate::theFTFPPro, CMSHadronPhysicsFTFP_BERT_ATL::ThreadPrivate::theHyperon, CMSHadronPhysicsFTFP_BERT_ATL::ThreadPrivate::theNeutrons, CMSHadronPhysicsFTFP_BERT_ATL::ThreadPrivate::thePiK, CMSHadronPhysicsFTFP_BERT_ATL::ThreadPrivate::thePro, and tpdata.

Referenced by ConstructProcess().

42  {
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 }
const double GeV
Definition: MathUtil.h:16
static G4ThreadLocal ThreadPrivate * tpdata

Member Data Documentation

G4bool CMSHadronPhysicsFTFP_BERT_ATL::QuasiElastic
private

Definition at line 49 of file CMSHadronPhysicsFTFP_BERT_ATL.h.

Referenced by CreateModels().

G4ThreadLocal CMSHadronPhysicsFTFP_BERT_ATL::ThreadPrivate * CMSHadronPhysicsFTFP_BERT_ATL::tpdata = nullptr
staticprivate