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

#include <G4EmExtraParameters.hh>

Public Member Functions

 G4EmExtraParameters ()
 
 ~G4EmExtraParameters ()
 
void Initialise ()
 
G4bool GetDirectionalSplitting ()
 
void SetDirectionalSplitting (G4bool v)
 
G4bool QuantumEntanglement ()
 
void SetQuantumEntanglement (G4bool v)
 
void SetDirectionalSplittingRadius (G4double r)
 
G4double GetDirectionalSplittingRadius ()
 
void SetDirectionalSplittingTarget (const G4ThreeVector &v)
 
G4ThreeVector GetDirectionalSplittingTarget () const
 
void SetStepFunction (G4double v1, G4double v2)
 
G4double GetStepFunctionP1 () const
 
G4double GetStepFunctionP2 () const
 
void SetStepFunctionMuHad (G4double v1, G4double v2)
 
G4double GetStepFunctionMuHadP1 () const
 
G4double GetStepFunctionMuHadP2 () const
 
void SetStepFunctionLightIons (G4double v1, G4double v2)
 
G4double GetStepFunctionLightIonsP1 () const
 
G4double GetStepFunctionLightIonsP2 () const
 
void SetStepFunctionIons (G4double v1, G4double v2)
 
G4double GetStepFunctionIonsP1 () const
 
G4double GetStepFunctionIonsP2 () const
 
void FillStepFunction (const G4ParticleDefinition *, G4VEnergyLossProcess *) const
 
void AddPAIModel (const G4String &particle, const G4String &region, const G4String &type)
 
const std::vector< G4String > & ParticlesPAI () const
 
const std::vector< G4String > & RegionsPAI () const
 
const std::vector< G4String > & TypesPAI () const
 
void AddPhysics (const G4String &region, const G4String &type)
 
const std::vector< G4String > & RegionsPhysics () const
 
const std::vector< G4String > & TypesPhysics () const
 
void SetSubCutRegion (const G4String &region)
 
void SetProcessBiasingFactor (const G4String &procname, G4double val, G4bool wflag)
 
void ActivateForcedInteraction (const G4String &procname, const G4String &region, G4double length, G4bool wflag)
 
void ActivateSecondaryBiasing (const G4String &name, const G4String &region, G4double factor, G4double energyLimit)
 
void DefineRegParamForLoss (G4VEnergyLossProcess *) const
 
void DefineRegParamForEM (G4VEmProcess *) const
 
 G4EmExtraParameters (G4EmExtraParameters &)=delete
 
G4EmExtraParametersoperator= (const G4EmExtraParameters &right)=delete
 

Detailed Description

Definition at line 62 of file G4EmExtraParameters.hh.

Constructor & Destructor Documentation

◆ G4EmExtraParameters() [1/2]

G4EmExtraParameters::G4EmExtraParameters ( )
explicit

◆ ~G4EmExtraParameters()

G4EmExtraParameters::~G4EmExtraParameters ( )

Definition at line 63 of file G4EmExtraParameters.cc.

64{
65 delete theMessenger;
66}

◆ G4EmExtraParameters() [2/2]

G4EmExtraParameters::G4EmExtraParameters ( G4EmExtraParameters )
delete

Member Function Documentation

◆ ActivateForcedInteraction()

void G4EmExtraParameters::ActivateForcedInteraction ( const G4String procname,
const G4String region,
G4double  length,
G4bool  wflag 
)

Definition at line 321 of file G4EmExtraParameters.cc.

325{
326 const G4String& r = CheckRegion(region);
327 if(length >= 0.0) {
328 std::size_t n = m_procForced.size();
329 for(std::size_t i=0; i<n; ++i) {
330 if(procname == m_procForced[i] && r == m_regnamesForced[i] ) {
331 m_lengthForced[i] = length;
332 m_weightForced[i] = wflag;
333 return;
334 }
335 }
336 m_regnamesForced.push_back(r);
337 m_procForced.push_back(procname);
338 m_lengthForced.push_back(length);
339 m_weightForced.push_back(wflag);
340 } else {
342 ed << "Process: " << procname << " in region " << r
343 << " : forced interacttion length= "
344 << length << " is negative - ignored";
345 PrintWarning(ed);
346 }
347}
std::ostringstream G4ExceptionDescription
Definition: G4Exception.hh:40

Referenced by G4EmParameters::ActivateForcedInteraction(), and G4EmExtraParametersMessenger::SetNewValue().

◆ ActivateSecondaryBiasing()

void G4EmExtraParameters::ActivateSecondaryBiasing ( const G4String name,
const G4String region,
G4double  factor,
G4double  energyLimit 
)

Definition at line 350 of file G4EmExtraParameters.cc.

354{
355 const G4String& r = CheckRegion(region);
356 if(factor >= 0.0 && energyLim >= 0.0) {
357 std::size_t n = m_procBiasedSec.size();
358 for(std::size_t i=0; i<n; ++i) {
359 if(procname == m_procBiasedSec[i] && r == m_regnamesBiasedSec[i] ) {
360 m_factBiasedSec[i] = factor;
361 m_elimBiasedSec[i] = energyLim;
362 return;
363 }
364 }
365 m_regnamesBiasedSec.push_back(r);
366 m_procBiasedSec.push_back(procname);
367 m_factBiasedSec.push_back(factor);
368 m_elimBiasedSec.push_back(energyLim);
369 } else {
371 ed << "Process: " << procname << " in region " << r
372 << " : secondary bised factor= "
373 << factor << ", Elim= " << energyLim << " - ignored";
374 PrintWarning(ed);
375 }
376}

Referenced by G4EmParameters::ActivateSecondaryBiasing(), and G4EmExtraParametersMessenger::SetNewValue().

◆ AddPAIModel()

void G4EmExtraParameters::AddPAIModel ( const G4String particle,
const G4String region,
const G4String type 
)

Definition at line 222 of file G4EmExtraParameters.cc.

225{
226 G4String r = CheckRegion(region);
227 std::size_t nreg = m_regnamesPAI.size();
228 for(std::size_t i=0; i<nreg; ++i) {
229 if((m_particlesPAI[i] == particle ||
230 m_particlesPAI[i] == "all" ||
231 particle == "all") &&
232 (m_regnamesPAI[i] == r ||
233 m_regnamesPAI[i] == "DefaultRegionForTheWorld" ||
234 r == "DefaultRegionForTheWorld") ) {
235
236 m_typesPAI[i] = type;
237 if(particle == "all") { m_particlesPAI[i] = particle; }
238 if(r == "DefaultRegionForTheWorld") { m_regnamesPAI[i] = r; }
239 return;
240 }
241 }
242 m_particlesPAI.push_back(particle);
243 m_regnamesPAI.push_back(r);
244 m_typesPAI.push_back(type);
245}

Referenced by G4EmParameters::AddPAIModel(), and G4EmExtraParametersMessenger::SetNewValue().

◆ AddPhysics()

void G4EmExtraParameters::AddPhysics ( const G4String region,
const G4String type 
)

Definition at line 262 of file G4EmExtraParameters.cc.

264{
265 G4String r = CheckRegion(region);
266 std::size_t nreg = m_regnamesPhys.size();
267 for(std::size_t i=0; i<nreg; ++i) {
268 if(r == m_regnamesPhys[i]) { return; }
269 }
270 m_regnamesPhys.push_back(r);
271 m_typesPhys.push_back(type);
272}

Referenced by G4EmParameters::AddPhysics(), and G4EmExtraParametersMessenger::SetNewValue().

◆ DefineRegParamForEM()

void G4EmExtraParameters::DefineRegParamForEM ( G4VEmProcess ptr) const

Definition at line 414 of file G4EmExtraParameters.cc.

415{
416 std::size_t n = m_procBiasedXS.size();
417 for(std::size_t i=0; i<n; ++i) {
418 if(ptr->GetProcessName() == m_procBiasedXS[i]) {
419 ptr->SetCrossSectionBiasingFactor(m_factBiasedXS[i],
420 m_weightBiasedXS[i]);
421 break;
422 }
423 }
424 n = m_procForced.size();
425 for(std::size_t i=0; i<n; ++i) {
426 if(ptr->GetProcessName() == m_procForced[i]) {
427 ptr->ActivateForcedInteraction(m_lengthForced[i],
428 m_regnamesForced[i],
429 m_weightForced[i]);
430 break;
431 }
432 }
433 n = m_procBiasedSec.size();
434 for(std::size_t i=0; i<n; ++i) {
435 if(ptr->GetProcessName() == m_procBiasedSec[i]) {
436 ptr->ActivateSecondaryBiasing(m_regnamesBiasedSec[i],
437 m_factBiasedSec[i],
438 m_elimBiasedSec[i]);
439 break;
440 }
441 }
442}
void SetCrossSectionBiasingFactor(G4double f, G4bool flag=true)
void ActivateForcedInteraction(G4double length=0.0, const G4String &r="", G4bool flag=true)
void ActivateSecondaryBiasing(const G4String &region, G4double factor, G4double energyLimit)
const G4String & GetProcessName() const
Definition: G4VProcess.hh:386

Referenced by G4EmParameters::DefineRegParamForEM().

◆ DefineRegParamForLoss()

void G4EmExtraParameters::DefineRegParamForLoss ( G4VEnergyLossProcess ptr) const

Definition at line 378 of file G4EmExtraParameters.cc.

379{
380 const G4RegionStore* regionStore = G4RegionStore::GetInstance();
381 std::size_t n = m_regnamesSubCut.size();
382 for(std::size_t i=0; i<n; ++i) {
383 const G4Region* reg = regionStore->GetRegion(m_regnamesSubCut[i], false);
384 if(nullptr != reg) { ptr->ActivateSubCutoff(reg); }
385 }
386 n = m_procBiasedXS.size();
387 for(std::size_t i=0; i<n; ++i) {
388 if(ptr->GetProcessName() == m_procBiasedXS[i]) {
389 ptr->SetCrossSectionBiasingFactor(m_factBiasedXS[i],
390 m_weightBiasedXS[i]);
391 break;
392 }
393 }
394 n = m_procForced.size();
395 for(std::size_t i=0; i<n; ++i) {
396 if(ptr->GetProcessName() == m_procForced[i]) {
397 ptr->ActivateForcedInteraction(m_lengthForced[i],
398 m_regnamesForced[i],
399 m_weightForced[i]);
400 break;
401 }
402 }
403 n = m_procBiasedSec.size();
404 for(std::size_t i=0; i<n; ++i) {
405 if(ptr->GetProcessName() == m_procBiasedSec[i]) {
406 ptr->ActivateSecondaryBiasing(m_regnamesBiasedSec[i],
407 m_factBiasedSec[i],
408 m_elimBiasedSec[i]);
409 break;
410 }
411 }
412}
static G4RegionStore * GetInstance()
G4Region * GetRegion(const G4String &name, G4bool verbose=true) const
void ActivateSecondaryBiasing(const G4String &region, G4double factor, G4double energyLimit)
void SetCrossSectionBiasingFactor(G4double f, G4bool flag=true)
void ActivateForcedInteraction(G4double length, const G4String &region, G4bool flag=true)
void ActivateSubCutoff(const G4Region *region)

Referenced by G4EmParameters::DefineRegParamForLoss().

◆ FillStepFunction()

void G4EmExtraParameters::FillStepFunction ( const G4ParticleDefinition part,
G4VEnergyLossProcess proc 
) const

Definition at line 202 of file G4EmExtraParameters.cc.

203{
204 // electron and positron
205 if (11 == std::abs(part->GetPDGEncoding())) {
206 proc->SetStepFunction(dRoverRange, finalRange);
207
208 // all heavy ions
209 } else if ("GenericIon" == part->GetParticleName()) {
210 proc->SetStepFunction(dRoverRangeIons, finalRangeIons);
211
212 // light nucleus and anti-nucleus
213 } else if (part->GetParticleType() == "nucleus" || part->GetParticleType() == "anti_nucleus") {
214 proc->SetStepFunction(dRoverRangeLIons, finalRangeLIons);
215
216 // other particles
217 } else {
218 proc->SetStepFunction(dRoverRangeMuHad, finalRangeMuHad);
219 }
220}
const G4String & GetParticleType() const
const G4String & GetParticleName() const
void SetStepFunction(G4double v1, G4double v2)

Referenced by G4EmParameters::FillStepFunction().

◆ GetDirectionalSplitting()

G4bool G4EmExtraParameters::GetDirectionalSplitting ( )

Definition at line 454 of file G4EmExtraParameters.cc.

454 {
455 return directionalSplitting;
456}

Referenced by G4EmParameters::GetDirectionalSplitting().

◆ GetDirectionalSplittingRadius()

G4double G4EmExtraParameters::GetDirectionalSplittingRadius ( )

Definition at line 479 of file G4EmExtraParameters.cc.

480{
481 return directionalSplittingRadius;
482}

Referenced by G4EmParameters::GetDirectionalSplittingRadius().

◆ GetDirectionalSplittingTarget()

G4ThreeVector G4EmExtraParameters::GetDirectionalSplittingTarget ( ) const

Definition at line 469 of file G4EmExtraParameters.cc.

470{
471 return directionalSplittingTarget;
472}

Referenced by G4EmParameters::GetDirectionalSplittingTarget().

◆ GetStepFunctionIonsP1()

G4double G4EmExtraParameters::GetStepFunctionIonsP1 ( ) const

Definition at line 192 of file G4EmExtraParameters.cc.

193{
194 return dRoverRangeIons;
195}

Referenced by G4EmParameters::StreamInfo().

◆ GetStepFunctionIonsP2()

G4double G4EmExtraParameters::GetStepFunctionIonsP2 ( ) const

Definition at line 197 of file G4EmExtraParameters.cc.

198{
199 return finalRangeIons;
200}

Referenced by G4EmParameters::StreamInfo().

◆ GetStepFunctionLightIonsP1()

G4double G4EmExtraParameters::GetStepFunctionLightIonsP1 ( ) const

Definition at line 169 of file G4EmExtraParameters.cc.

170{
171 return dRoverRangeLIons;
172}

Referenced by G4EmParameters::StreamInfo().

◆ GetStepFunctionLightIonsP2()

G4double G4EmExtraParameters::GetStepFunctionLightIonsP2 ( ) const

Definition at line 174 of file G4EmExtraParameters.cc.

175{
176 return finalRangeLIons;
177}

Referenced by G4EmParameters::StreamInfo().

◆ GetStepFunctionMuHadP1()

G4double G4EmExtraParameters::GetStepFunctionMuHadP1 ( ) const

Definition at line 146 of file G4EmExtraParameters.cc.

147{
148 return dRoverRangeMuHad;
149}

Referenced by G4EmParameters::StreamInfo().

◆ GetStepFunctionMuHadP2()

G4double G4EmExtraParameters::GetStepFunctionMuHadP2 ( ) const

Definition at line 151 of file G4EmExtraParameters.cc.

152{
153 return finalRangeMuHad;
154}

Referenced by G4EmParameters::StreamInfo().

◆ GetStepFunctionP1()

G4double G4EmExtraParameters::GetStepFunctionP1 ( ) const

Definition at line 123 of file G4EmExtraParameters.cc.

124{
125 return dRoverRange;
126}

Referenced by G4EmParameters::StreamInfo().

◆ GetStepFunctionP2()

G4double G4EmExtraParameters::GetStepFunctionP2 ( ) const

Definition at line 128 of file G4EmExtraParameters.cc.

129{
130 return finalRange;
131}

Referenced by G4EmParameters::StreamInfo().

◆ Initialise()

void G4EmExtraParameters::Initialise ( )

Definition at line 70 of file G4EmExtraParameters.cc.

71{
72 quantumEntanglement = false;
73 directionalSplitting = false;
74 directionalSplittingTarget.set(0.,0.,0.);
75 directionalSplittingRadius = 0.;
76
77 dRoverRange = 0.2;
78 finalRange = CLHEP::mm;
79 dRoverRangeMuHad = 0.2;
80 finalRangeMuHad = 0.1*CLHEP::mm;
81 dRoverRangeLIons = 0.2;
82 finalRangeLIons = 0.1*CLHEP::mm;
83 dRoverRangeIons = 0.2;
84 finalRangeIons = 0.1*CLHEP::mm;
85
86 m_regnamesForced.clear();
87 m_procForced.clear();
88 m_lengthForced.clear();
89 m_weightForced.clear();
90 m_regnamesSubCut.clear();
91}
void set(double x, double y, double z)

Referenced by G4EmExtraParameters(), and G4EmParameters::SetDefaults().

◆ operator=()

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

◆ ParticlesPAI()

const std::vector< G4String > & G4EmExtraParameters::ParticlesPAI ( ) const

Definition at line 247 of file G4EmExtraParameters.cc.

248{
249 return m_particlesPAI;
250}

Referenced by G4EmParameters::ParticlesPAI().

◆ QuantumEntanglement()

G4bool G4EmExtraParameters::QuantumEntanglement ( )

Definition at line 444 of file G4EmExtraParameters.cc.

445{
446 return quantumEntanglement;
447}

Referenced by G4EmParameters::QuantumEntanglement(), and G4EmParameters::StreamInfo().

◆ RegionsPAI()

const std::vector< G4String > & G4EmExtraParameters::RegionsPAI ( ) const

Definition at line 252 of file G4EmExtraParameters.cc.

253{
254 return m_regnamesPAI;
255}

Referenced by G4EmParameters::RegionsPAI().

◆ RegionsPhysics()

const std::vector< G4String > & G4EmExtraParameters::RegionsPhysics ( ) const

Definition at line 274 of file G4EmExtraParameters.cc.

275{
276 return m_regnamesPhys;
277}

Referenced by G4EmParameters::RegionsPhysics().

◆ SetDirectionalSplitting()

void G4EmExtraParameters::SetDirectionalSplitting ( G4bool  v)

Definition at line 458 of file G4EmExtraParameters.cc.

459{
460 directionalSplitting = v;
461}

Referenced by G4EmParameters::SetDirectionalSplitting(), and G4EmExtraParametersMessenger::SetNewValue().

◆ SetDirectionalSplittingRadius()

void G4EmExtraParameters::SetDirectionalSplittingRadius ( G4double  r)

Definition at line 474 of file G4EmExtraParameters.cc.

475{
476 directionalSplittingRadius = r;
477}

Referenced by G4EmParameters::SetDirectionalSplittingRadius(), and G4EmExtraParametersMessenger::SetNewValue().

◆ SetDirectionalSplittingTarget()

void G4EmExtraParameters::SetDirectionalSplittingTarget ( const G4ThreeVector v)

Definition at line 464 of file G4EmExtraParameters.cc.

465{
466 directionalSplittingTarget = v;
467}

Referenced by G4EmParameters::SetDirectionalSplittingTarget(), and G4EmExtraParametersMessenger::SetNewValue().

◆ SetProcessBiasingFactor()

void G4EmExtraParameters::SetProcessBiasingFactor ( const G4String procname,
G4double  val,
G4bool  wflag 
)

Definition at line 297 of file G4EmExtraParameters.cc.

299{
300 if(val > 0.0) {
301 std::size_t n = m_procBiasedXS.size();
302 for(std::size_t i=0; i<n; ++i) {
303 if(procname == m_procBiasedXS[i]) {
304 m_factBiasedXS[i] = val;
305 m_weightBiasedXS[i]= wflag;
306 return;
307 }
308 }
309 m_procBiasedXS.push_back(procname);
310 m_factBiasedXS.push_back(val);
311 m_weightBiasedXS.push_back(wflag);
312 } else {
314 ed << "Process: " << procname << " XS biasing factor "
315 << val << " is negative - ignored";
316 PrintWarning(ed);
317 }
318}

Referenced by G4EmExtraParametersMessenger::SetNewValue(), and G4EmParameters::SetProcessBiasingFactor().

◆ SetQuantumEntanglement()

void G4EmExtraParameters::SetQuantumEntanglement ( G4bool  v)

Definition at line 449 of file G4EmExtraParameters.cc.

450{
451 quantumEntanglement = v;
452}

Referenced by G4EmExtraParametersMessenger::SetNewValue(), and G4EmParameters::SetQuantumEntanglement().

◆ SetStepFunction()

void G4EmExtraParameters::SetStepFunction ( G4double  v1,
G4double  v2 
)

Definition at line 110 of file G4EmExtraParameters.cc.

111{
112 if(v1 > 0.0 && v1 <= 1.0 && v2 > 0.0) {
113 dRoverRange = v1;
114 finalRange = v2;
115 } else {
117 ed << "Values of step function are out of range: "
118 << v1 << ", " << v2/CLHEP::mm << " mm - are ignored";
119 PrintWarning(ed);
120 }
121}

Referenced by G4EmExtraParametersMessenger::SetNewValue(), and G4EmParameters::SetStepFunction().

◆ SetStepFunctionIons()

void G4EmExtraParameters::SetStepFunctionIons ( G4double  v1,
G4double  v2 
)

Definition at line 179 of file G4EmExtraParameters.cc.

180{
181 if(v1 > 0.0 && v1 <= 1.0 && v2 > 0.0) {
182 dRoverRangeIons = v1;
183 finalRangeIons = v2;
184 } else {
186 ed << "Values of step function are out of range: "
187 << v1 << ", " << v2/CLHEP::mm << " mm - are ignored";
188 PrintWarning(ed);
189 }
190}

Referenced by G4EmExtraParametersMessenger::SetNewValue(), and G4EmParameters::SetStepFunctionIons().

◆ SetStepFunctionLightIons()

void G4EmExtraParameters::SetStepFunctionLightIons ( G4double  v1,
G4double  v2 
)

Definition at line 156 of file G4EmExtraParameters.cc.

157{
158 if(v1 > 0.0 && v1 <= 1.0 && v2 > 0.0) {
159 dRoverRangeLIons = v1;
160 finalRangeLIons = v2;
161 } else {
163 ed << "Values of step function are out of range: "
164 << v1 << ", " << v2/CLHEP::mm << " mm - are ignored";
165 PrintWarning(ed);
166 }
167}

Referenced by G4EmExtraParametersMessenger::SetNewValue(), and G4EmParameters::SetStepFunctionLightIons().

◆ SetStepFunctionMuHad()

void G4EmExtraParameters::SetStepFunctionMuHad ( G4double  v1,
G4double  v2 
)

Definition at line 133 of file G4EmExtraParameters.cc.

134{
135 if(v1 > 0.0 && v1 <= 1.0 && v2 > 0.0) {
136 dRoverRangeMuHad = v1;
137 finalRangeMuHad = v2;
138 } else {
140 ed << "Values of step function are out of range: "
141 << v1 << ", " << v2/CLHEP::mm << " mm - are ignored";
142 PrintWarning(ed);
143 }
144}

Referenced by G4EmExtraParametersMessenger::SetNewValue(), and G4EmParameters::SetStepFunctionMuHad().

◆ SetSubCutRegion()

void G4EmExtraParameters::SetSubCutRegion ( const G4String region)

Definition at line 284 of file G4EmExtraParameters.cc.

285{
286 const G4String& r = CheckRegion(region);
287 std::size_t nreg = m_regnamesSubCut.size();
288 for(std::size_t i=0; i<nreg; ++i) {
289 if(r == m_regnamesSubCut[i]) {
290 return;
291 }
292 }
293 m_regnamesSubCut.push_back(r);
294}

Referenced by G4EmExtraParametersMessenger::SetNewValue(), and G4EmParameters::SetSubCutRegion().

◆ TypesPAI()

const std::vector< G4String > & G4EmExtraParameters::TypesPAI ( ) const

Definition at line 257 of file G4EmExtraParameters.cc.

258{
259 return m_typesPAI;
260}

Referenced by G4EmParameters::TypesPAI().

◆ TypesPhysics()

const std::vector< G4String > & G4EmExtraParameters::TypesPhysics ( ) const

Definition at line 279 of file G4EmExtraParameters.cc.

280{
281 return m_typesPhys;
282}

Referenced by G4EmParameters::TypesPhysics().


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