Geant4  10.02.p03
G4IonBinaryCascadePhysics Class Reference

#include <G4IonBinaryCascadePhysics.hh>

Inheritance diagram for G4IonBinaryCascadePhysics:
Collaboration diagram for G4IonBinaryCascadePhysics:

Public Member Functions

 G4IonBinaryCascadePhysics (G4int ver=0)
 
 G4IonBinaryCascadePhysics (const G4String &name, G4int ver=0)
 
virtual ~G4IonBinaryCascadePhysics ()
 
virtual void ConstructParticle ()
 
virtual void ConstructProcess ()
 
- Public Member Functions inherited from G4VPhysicsConstructor
 G4VPhysicsConstructor (const G4String &="")
 
 G4VPhysicsConstructor (const G4String &name, G4int physics_type)
 
virtual ~G4VPhysicsConstructor ()
 
void SetPhysicsName (const G4String &="")
 
const G4StringGetPhysicsName () const
 
void SetPhysicsType (G4int)
 
G4int GetPhysicsType () const
 
void SetVerboseLevel (G4int value)
 
G4int GetVerboseLevel () const
 
G4int GetInstanceID () const
 

Private Member Functions

void AddProcess (const G4String &, G4ParticleDefinition *)
 

Private Attributes

G4int verbose
 

Static Private Attributes

static G4ThreadLocal std::vector< G4HadronInelasticProcess * > * G4MT_p_list = 0
 
static G4ThreadLocal std::vector< G4HadronicInteraction * > * G4MT_model_list = 0
 
static G4ThreadLocal G4VCrossSectionDataSettheNuclNuclData = 0
 
static G4ThreadLocal G4VComponentCrossSectiontheGGNuclNuclXS = 0
 
static G4ThreadLocal G4BinaryLightIonReaction * theIonBC = 0
 
static G4ThreadLocal G4HadronicInteractiontheFTFP = 0
 
static G4ThreadLocal G4FTFBuildertheBuilder = 0
 
static G4ThreadLocal G4bool wasActivated = false
 

Additional Inherited Members

- Static Public Member Functions inherited from G4VPhysicsConstructor
static const G4VPCManagerGetSubInstanceManager ()
 
- Protected Member Functions inherited from G4VPhysicsConstructor
G4bool RegisterProcess (G4VProcess *process, G4ParticleDefinition *particle)
 
G4ParticleTable::G4PTblDicIteratorGetParticleIterator () const
 
- Protected Attributes inherited from G4VPhysicsConstructor
G4int verboseLevel
 
G4String namePhysics
 
G4int typePhysics
 
G4ParticleTabletheParticleTable
 
G4int g4vpcInstanceID
 
- Static Protected Attributes inherited from G4VPhysicsConstructor
static G4RUN_DLL G4VPCManager subInstanceManager
 

Detailed Description

Definition at line 54 of file G4IonBinaryCascadePhysics.hh.

Constructor & Destructor Documentation

◆ G4IonBinaryCascadePhysics() [1/2]

G4IonBinaryCascadePhysics::G4IonBinaryCascadePhysics ( G4int  ver = 0)

Definition at line 81 of file G4IonBinaryCascadePhysics.cc.

82  : G4VPhysicsConstructor("IonBinaryCascade"), verbose(ver)
83 {
84  theNuclNuclData = 0;
85  theGGNuclNuclXS = 0;
86  theIonBC = 0;
87  theFTFP = 0;
88  theBuilder = 0;
90  if(verbose > 1) G4cout << "### G4IonBinaryCascadePhysics" << G4endl;
91 }
static G4ThreadLocal G4FTFBuilder * theBuilder
static G4ThreadLocal G4HadronicInteraction * theFTFP
static G4ThreadLocal G4BinaryLightIonReaction * theIonBC
G4GLOB_DLL std::ostream G4cout
static G4ThreadLocal G4VComponentCrossSection * theGGNuclNuclXS
G4VPhysicsConstructor(const G4String &="")
#define G4endl
Definition: G4ios.hh:61
static G4ThreadLocal G4VCrossSectionDataSet * theNuclNuclData
Here is the call graph for this function:

◆ G4IonBinaryCascadePhysics() [2/2]

G4IonBinaryCascadePhysics::G4IonBinaryCascadePhysics ( const G4String name,
G4int  ver = 0 
)

Definition at line 94 of file G4IonBinaryCascadePhysics.cc.

96  : G4VPhysicsConstructor(name), verbose(ver)
97 {
98  theNuclNuclData = 0;
99  theGGNuclNuclXS = 0;
100  theIonBC = 0;
101  theFTFP = 0;
102  theBuilder = 0;
104  if(verbose > 1) G4cout << "### G4IonBinaryCascadePhysics" << G4endl;
105 }
static G4ThreadLocal G4FTFBuilder * theBuilder
static G4ThreadLocal G4HadronicInteraction * theFTFP
static G4ThreadLocal G4BinaryLightIonReaction * theIonBC
G4GLOB_DLL std::ostream G4cout
static G4ThreadLocal G4VComponentCrossSection * theGGNuclNuclXS
G4VPhysicsConstructor(const G4String &="")
#define G4endl
Definition: G4ios.hh:61
static G4ThreadLocal G4VCrossSectionDataSet * theNuclNuclData
Here is the call graph for this function:

◆ ~G4IonBinaryCascadePhysics()

G4IonBinaryCascadePhysics::~G4IonBinaryCascadePhysics ( )
virtual

Definition at line 108 of file G4IonBinaryCascadePhysics.cc.

109 {
110  //Explicitly setting pointers TLS to 0 is
111  //needed, in case I create a new thread
112  //this variable is static!
113  if(wasActivated) {
114  delete theBuilder; theBuilder = 0;
115  delete theGGNuclNuclXS; theGGNuclNuclXS = 0;
116  delete theNuclNuclData; theNuclNuclData = 0;
117  G4int i;
118  if ( G4MT_p_list ) {
119  G4int n = G4MT_p_list->size();
120  for(i=0; i<n; i++) {delete (*G4MT_p_list)[i];}
121  delete G4MT_p_list;
122  G4MT_p_list = 0;
123  }
124  if ( G4MT_model_list ) {
125  G4int n = G4MT_model_list->size();
126  for(i=0; i<n; i++) {delete (*G4MT_model_list)[i];}
127  delete G4MT_model_list;
128  G4MT_model_list = 0;
129  }
130  }
131 }
static G4ThreadLocal G4FTFBuilder * theBuilder
static G4ThreadLocal std::vector< G4HadronicInteraction * > * G4MT_model_list
static G4ThreadLocal std::vector< G4HadronInelasticProcess * > * G4MT_p_list
int G4int
Definition: G4Types.hh:78
static G4ThreadLocal G4bool wasActivated
Char_t n[5]
static G4ThreadLocal G4VComponentCrossSection * theGGNuclNuclXS
static G4ThreadLocal G4VCrossSectionDataSet * theNuclNuclData

Member Function Documentation

◆ AddProcess()

void G4IonBinaryCascadePhysics::AddProcess ( const G4String name,
G4ParticleDefinition part 
)
private

Definition at line 166 of file G4IonBinaryCascadePhysics.cc.

168 {
169  if ( G4MT_p_list == 0 ) G4MT_p_list = new std::vector<G4HadronInelasticProcess*>;
170  G4HadronInelasticProcess* hadi = new G4HadronInelasticProcess(name, part);
171  G4MT_p_list->push_back(hadi);
172  G4ProcessManager* pManager = part->GetProcessManager();
173  pManager->AddDiscreteProcess(hadi);
174 
176 
177  hadi->RegisterMe(theIonBC);
178  hadi->RegisterMe(theFTFP);
179 }
static G4ThreadLocal G4HadronicInteraction * theFTFP
G4int AddDiscreteProcess(G4VProcess *aProcess, G4int ord=ordDefault)
static G4ThreadLocal G4BinaryLightIonReaction * theIonBC
static G4ThreadLocal std::vector< G4HadronInelasticProcess * > * G4MT_p_list
G4ProcessManager * GetProcessManager() const
void RegisterMe(G4HadronicInteraction *a)
void AddDataSet(G4VCrossSectionDataSet *aDataSet)
static G4ThreadLocal G4VCrossSectionDataSet * theNuclNuclData
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ConstructParticle()

void G4IonBinaryCascadePhysics::ConstructParticle ( void  )
virtual

Implements G4VPhysicsConstructor.

Definition at line 182 of file G4IonBinaryCascadePhysics.cc.

183 {
184  // Construct light ions
185  G4IonConstructor pConstructor;
186  pConstructor.ConstructParticle();
187 }
static void ConstructParticle()
Here is the call graph for this function:

◆ ConstructProcess()

void G4IonBinaryCascadePhysics::ConstructProcess ( void  )
virtual

Implements G4VPhysicsConstructor.

Definition at line 134 of file G4IonBinaryCascadePhysics.cc.

135 {
136  if(wasActivated) { return; }
137  wasActivated = true;
138 
141  G4PreCompoundModel* thePreCompound = static_cast<G4PreCompoundModel*>(p);
142  if(!thePreCompound) { thePreCompound = new G4PreCompoundModel; }
143 
144  theIonBC = new G4BinaryLightIonReaction(thePreCompound);
145  theIonBC->SetMinEnergy(0.0);
146  theIonBC->SetMaxEnergy(4.0*GeV);
147  if ( G4MT_model_list == 0 ) G4MT_model_list = new std::vector<G4HadronicInteraction*>;
148  G4MT_model_list->push_back(theIonBC);
149 
150  theBuilder = new G4FTFBuilder("FTFP",thePreCompound);
152  theFTFP->SetMinEnergy(2.0*GeV);
153  theFTFP->SetMaxEnergy(100.0*TeV);
154  G4MT_model_list->push_back(theFTFP);
155 
157 
158  AddProcess("dInelastic", G4Deuteron::Deuteron());
159  AddProcess("tInelastic", G4Triton::Triton());
160  AddProcess("He3Inelastic", G4He3::He3());
161  AddProcess("alphaInelastic", G4Alpha::Alpha());
162  AddProcess("ionInelastic", G4GenericIon::GenericIon());
163 }
static G4ThreadLocal G4FTFBuilder * theBuilder
static G4ThreadLocal G4HadronicInteraction * theFTFP
static G4ThreadLocal G4BinaryLightIonReaction * theIonBC
void AddProcess(const G4String &, G4ParticleDefinition *)
static G4ThreadLocal std::vector< G4HadronicInteraction * > * G4MT_model_list
G4HadronicInteraction * GetModel()
static G4ThreadLocal G4bool wasActivated
void SetMinEnergy(G4double anEnergy)
static G4ThreadLocal G4VComponentCrossSection * theGGNuclNuclXS
static G4Triton * Triton()
Definition: G4Triton.cc:95
static const double GeV
Definition: G4SIunits.hh:214
static G4Deuteron * Deuteron()
Definition: G4Deuteron.cc:94
G4HadronicInteraction * FindModel(const G4String &name)
static G4GenericIon * GenericIon()
Definition: G4GenericIon.cc:93
static G4HadronicInteractionRegistry * Instance()
void SetMaxEnergy(const G4double anEnergy)
static const double TeV
Definition: G4SIunits.hh:215
static G4Alpha * Alpha()
Definition: G4Alpha.cc:89
static G4ThreadLocal G4VCrossSectionDataSet * theNuclNuclData
static G4He3 * He3()
Definition: G4He3.cc:94
Here is the call graph for this function:

Member Data Documentation

◆ G4MT_model_list

G4ThreadLocal std::vector< G4HadronicInteraction * > * G4IonBinaryCascadePhysics::G4MT_model_list = 0
staticprivate

Definition at line 75 of file G4IonBinaryCascadePhysics.hh.

◆ G4MT_p_list

G4ThreadLocal std::vector< G4HadronInelasticProcess * > * G4IonBinaryCascadePhysics::G4MT_p_list = 0
staticprivate

Definition at line 74 of file G4IonBinaryCascadePhysics.hh.

◆ theBuilder

G4ThreadLocal G4FTFBuilder * G4IonBinaryCascadePhysics::theBuilder = 0
staticprivate

Definition at line 82 of file G4IonBinaryCascadePhysics.hh.

◆ theFTFP

G4ThreadLocal G4HadronicInteraction * G4IonBinaryCascadePhysics::theFTFP = 0
staticprivate

Definition at line 81 of file G4IonBinaryCascadePhysics.hh.

◆ theGGNuclNuclXS

G4ThreadLocal G4VComponentCrossSection * G4IonBinaryCascadePhysics::theGGNuclNuclXS = 0
staticprivate

Definition at line 78 of file G4IonBinaryCascadePhysics.hh.

◆ theIonBC

G4ThreadLocal G4BinaryLightIonReaction * G4IonBinaryCascadePhysics::theIonBC = 0
staticprivate

Definition at line 80 of file G4IonBinaryCascadePhysics.hh.

◆ theNuclNuclData

G4ThreadLocal G4VCrossSectionDataSet * G4IonBinaryCascadePhysics::theNuclNuclData = 0
staticprivate

Definition at line 77 of file G4IonBinaryCascadePhysics.hh.

◆ verbose

G4int G4IonBinaryCascadePhysics::verbose
private

Definition at line 84 of file G4IonBinaryCascadePhysics.hh.

◆ wasActivated

G4ThreadLocal G4bool G4IonBinaryCascadePhysics::wasActivated = false
staticprivate

Definition at line 85 of file G4IonBinaryCascadePhysics.hh.


The documentation for this class was generated from the following files: