Geant4 11.4.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4ChargeExchangePhysics Class Reference

#include <G4ChargeExchangePhysics.hh>

Inheritance diagram for G4ChargeExchangePhysics:

Public Member Functions

 G4ChargeExchangePhysics (G4int ver=1)
 ~G4ChargeExchangePhysics () override
void ConstructParticle () override
void ConstructProcess () override
void SetLowEnergyLimit (G4double val)
void SetCrossSectionFactor (G4double val)
G4ChargeExchangePhysicsoperator= (const G4ChargeExchangePhysics &right)=delete
 G4ChargeExchangePhysics (const G4ChargeExchangePhysics &)=delete
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
G4int GetInstanceID () const
virtual void TerminateWorker ()
void SetVerboseLevel (G4int value)
G4int GetVerboseLevel () const

Additional Inherited Members

Static Public Member Functions inherited from G4VPhysicsConstructor
static const G4VPCManagerGetSubInstanceManager ()
Protected Types inherited from G4VPhysicsConstructor
using PhysicsBuilder_V = G4VPCData::PhysicsBuilders_V
Protected Member Functions inherited from G4VPhysicsConstructor
G4bool RegisterProcess (G4VProcess *process, G4ParticleDefinition *particle)
G4ParticleTable::G4PTblDicIteratorGetParticleIterator () const
PhysicsBuilder_V GetBuilders () const
void AddBuilder (G4PhysicsBuilderInterface *bld)
Protected Attributes inherited from G4VPhysicsConstructor
G4int verboseLevel = 0
G4String namePhysics = ""
G4int typePhysics = 0
G4ParticleTabletheParticleTable = nullptr
G4int g4vpcInstanceID = 0
Static Protected Attributes inherited from G4VPhysicsConstructor
static G4RUN_DLL G4VPCManager subInstanceManager

Detailed Description

Definition at line 46 of file G4ChargeExchangePhysics.hh.

Constructor & Destructor Documentation

◆ G4ChargeExchangePhysics() [1/2]

G4ChargeExchangePhysics::G4ChargeExchangePhysics ( G4int ver = 1)
explicit

Definition at line 65 of file G4ChargeExchangePhysics.cc.

66 : G4VPhysicsConstructor("chargeExchange"),
67 fLowEnergyLimit(12*CLHEP::GeV)
68{
69 // because it is an addition, the type of this constructor is 0
71 theMessenger = new G4ChargeExchangeMessenger(this);
72 if (ver > 1) {
73 G4cout << "### ChargeExchangePhysics above "
74 << fLowEnergyLimit/CLHEP::GeV << " GeV." << G4endl;
75 }
76}
#define G4endl
Definition G4ios.hh:67
G4GLOB_DLL std::ostream G4cout
static G4HadronicParameters * Instance()
void SetVerboseLevel(const G4int val)
G4VPhysicsConstructor(const G4String &="")

Referenced by G4ChargeExchangePhysics(), and operator=().

◆ ~G4ChargeExchangePhysics()

G4ChargeExchangePhysics::~G4ChargeExchangePhysics ( )
override

Definition at line 78 of file G4ChargeExchangePhysics.cc.

79{
80 delete theMessenger;
81}

◆ G4ChargeExchangePhysics() [2/2]

G4ChargeExchangePhysics::G4ChargeExchangePhysics ( const G4ChargeExchangePhysics & )
delete

Member Function Documentation

◆ ConstructParticle()

void G4ChargeExchangePhysics::ConstructParticle ( )
overridevirtual

Implements G4VPhysicsConstructor.

Definition at line 83 of file G4ChargeExchangePhysics.cc.

84{
85 G4MesonConstructor pMesonConstructor;
86 pMesonConstructor.ConstructParticle();
87
88 G4BaryonConstructor pBaryonConstructor;
89 pBaryonConstructor.ConstructParticle();
90
91 G4ShortLivedConstructor pShortLivedConstructor;
92 pShortLivedConstructor.ConstructParticle();
93}
static void ConstructParticle()
static void ConstructParticle()

◆ ConstructProcess()

void G4ChargeExchangePhysics::ConstructProcess ( )
overridevirtual

Implements G4VPhysicsConstructor.

Definition at line 95 of file G4ChargeExchangePhysics.cc.

96{
97 auto xs = new G4ChargeExchangeXS();
98 xs->SetEnergyLimit(fLowEnergyLimit);
99 xs->SetCrossSectionFactor(fXSFactor);
100
101 auto model = new G4ChargeExchange(xs);
102
104 G4cout << "### ChargeExchangePhysics Construct Processes with the model <"
105 << model->GetModelName() << "> and x-section <"
106 << xs->GetName() << "> XSFactor=" << fXSFactor
107 << G4endl;
108 }
109
110 // pi-
111 G4ParticleDefinition* part = G4PionMinus::PionMinus();
112 auto proc =
113 new G4HadronInelasticProcess(part->GetParticleName()+"ChargeEx", part);
114 proc->AddDataSet( xs );
115 proc->RegisterMe( model );
116 G4ProcessManager* pman = part->GetProcessManager();
117 pman->AddDiscreteProcess(proc);
118
119 // pi+
120 part = G4PionPlus::PionPlus();
121 proc = new G4HadronInelasticProcess(part->GetParticleName()+"ChargeEx", part);
122 proc->AddDataSet( xs );
123 proc->RegisterMe( model );
124 pman = part->GetProcessManager();
125 pman->AddDiscreteProcess(proc);
126
127 // kaon-
128 part = G4KaonMinus::KaonMinus();
129 proc = new G4HadronInelasticProcess(part->GetParticleName()+"ChargeEx", part);
130 proc->AddDataSet( xs );
131 proc->RegisterMe( model );
132 pman = part->GetProcessManager();
133 pman->AddDiscreteProcess(proc);
134
135
136 // kaon+
137 part = G4KaonPlus::KaonPlus();
138 proc = new G4HadronInelasticProcess(part->GetParticleName()+"ChargeEx", part);
139 proc->AddDataSet( xs );
140 proc->RegisterMe( model );
141 pman = part->GetProcessManager();
142 pman->AddDiscreteProcess(proc);
143
144 // KL
146 proc = new G4HadronInelasticProcess(part->GetParticleName()+"ChargeEx", part);
147 proc->AddDataSet( xs );
148 proc->RegisterMe( model );
149 pman = part->GetProcessManager();
150 pman->AddDiscreteProcess(proc);
151}
static G4KaonMinus * KaonMinus()
static G4KaonPlus * KaonPlus()
static G4KaonZeroLong * KaonZeroLong()
G4ProcessManager * GetProcessManager() const
const G4String & GetParticleName() const
static G4PionMinus * PionMinus()
static G4PionPlus * PionPlus()
Definition G4PionPlus.cc:93
G4int AddDiscreteProcess(G4VProcess *aProcess, G4int ord=ordDefault)

◆ operator=()

G4ChargeExchangePhysics & G4ChargeExchangePhysics::operator= ( const G4ChargeExchangePhysics & right)
delete

◆ SetCrossSectionFactor()

void G4ChargeExchangePhysics::SetCrossSectionFactor ( G4double val)
inline

Definition at line 58 of file G4ChargeExchangePhysics.hh.

58{ fXSFactor = val; }

◆ SetLowEnergyLimit()

void G4ChargeExchangePhysics::SetLowEnergyLimit ( G4double val)
inline

Definition at line 56 of file G4ChargeExchangePhysics.hh.

56{ fLowEnergyLimit = val; }

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