Geant4 10.7.0
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 SetSubCutoff (G4bool val, 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 324 of file G4EmExtraParameters.cc.

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

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

◆ ActivateSecondaryBiasing()

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

Definition at line 353 of file G4EmExtraParameters.cc.

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

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

◆ AddPAIModel()

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

Definition at line 223 of file G4EmExtraParameters.cc.

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

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

◆ AddPhysics()

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

Definition at line 263 of file G4EmExtraParameters.cc.

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

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

◆ DefineRegParamForEM()

void G4EmExtraParameters::DefineRegParamForEM ( G4VEmProcess ptr) const

Definition at line 417 of file G4EmExtraParameters.cc.

418{
419 G4int n = m_procBiasedXS.size();
420 for(G4int i=0; i<n; ++i) {
421 if(ptr->GetProcessName() == m_procBiasedXS[i]) {
422 ptr->SetCrossSectionBiasingFactor(m_factBiasedXS[i],
423 m_weightBiasedXS[i]);
424 break;
425 }
426 }
427 n = m_procForced.size();
428 for(G4int i=0; i<n; ++i) {
429 if(ptr->GetProcessName() == m_procForced[i]) {
430 ptr->ActivateForcedInteraction(m_lengthForced[i],
431 m_regnamesForced[i],
432 m_weightForced[i]);
433 break;
434 }
435 }
436 n = m_procBiasedSec.size();
437 for(G4int i=0; i<n; ++i) {
438 if(ptr->GetProcessName() == m_procBiasedSec[i]) {
439 ptr->ActivateSecondaryBiasing(m_regnamesBiasedSec[i],
440 m_factBiasedSec[i],
441 m_elimBiasedSec[i]);
442 break;
443 }
444 }
445}
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:382

Referenced by G4EmParameters::DefineRegParamForEM().

◆ DefineRegParamForLoss()

void G4EmExtraParameters::DefineRegParamForLoss ( G4VEnergyLossProcess ptr) const

Definition at line 381 of file G4EmExtraParameters.cc.

382{
384 G4int n = m_regnamesSubCut.size();
385 for(G4int i=0; i<n; ++i) {
386 const G4Region* reg = regionStore->GetRegion(m_regnamesSubCut[i], false);
387 if(reg) { ptr->ActivateSubCutoff(m_subCuts[i], reg); }
388 }
389 n = m_procBiasedXS.size();
390 for(G4int i=0; i<n; ++i) {
391 if(ptr->GetProcessName() == m_procBiasedXS[i]) {
392 ptr->SetCrossSectionBiasingFactor(m_factBiasedXS[i],
393 m_weightBiasedXS[i]);
394 break;
395 }
396 }
397 n = m_procForced.size();
398 for(G4int i=0; i<n; ++i) {
399 if(ptr->GetProcessName() == m_procForced[i]) {
400 ptr->ActivateForcedInteraction(m_lengthForced[i],
401 m_regnamesForced[i],
402 m_weightForced[i]);
403 break;
404 }
405 }
406 n = m_procBiasedSec.size();
407 for(G4int i=0; i<n; ++i) {
408 if(ptr->GetProcessName() == m_procBiasedSec[i]) {
409 ptr->ActivateSecondaryBiasing(m_regnamesBiasedSec[i],
410 m_factBiasedSec[i],
411 m_elimBiasedSec[i]);
412 break;
413 }
414 }
415}
static G4RegionStore * GetInstance()
G4Region * GetRegion(const G4String &name, G4bool verbose=true) const
void ActivateSubCutoff(G4bool val, const G4Region *region=nullptr)
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)

Referenced by G4EmParameters::DefineRegParamForLoss().

◆ FillStepFunction()

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

Definition at line 203 of file G4EmExtraParameters.cc.

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

Referenced by G4EmParameters::FillStepFunction().

◆ GetDirectionalSplitting()

G4bool G4EmExtraParameters::GetDirectionalSplitting ( )

Definition at line 457 of file G4EmExtraParameters.cc.

457 {
458 return directionalSplitting;
459}

Referenced by G4EmParameters::GetDirectionalSplitting().

◆ GetDirectionalSplittingRadius()

G4double G4EmExtraParameters::GetDirectionalSplittingRadius ( )

Definition at line 482 of file G4EmExtraParameters.cc.

483{
484 return directionalSplittingRadius;
485}

Referenced by G4EmParameters::GetDirectionalSplittingRadius().

◆ GetDirectionalSplittingTarget()

G4ThreeVector G4EmExtraParameters::GetDirectionalSplittingTarget ( ) const

Definition at line 472 of file G4EmExtraParameters.cc.

473{
474 return directionalSplittingTarget;
475}

Referenced by G4EmParameters::GetDirectionalSplittingTarget().

◆ GetStepFunctionIonsP1()

G4double G4EmExtraParameters::GetStepFunctionIonsP1 ( ) const

Definition at line 193 of file G4EmExtraParameters.cc.

194{
195 return dRoverRangeIons;
196}

Referenced by G4EmParameters::StreamInfo().

◆ GetStepFunctionIonsP2()

G4double G4EmExtraParameters::GetStepFunctionIonsP2 ( ) const

Definition at line 198 of file G4EmExtraParameters.cc.

199{
200 return finalRangeIons;
201}

Referenced by G4EmParameters::StreamInfo().

◆ GetStepFunctionLightIonsP1()

G4double G4EmExtraParameters::GetStepFunctionLightIonsP1 ( ) const

Definition at line 170 of file G4EmExtraParameters.cc.

171{
172 return dRoverRangeLIons;
173}

Referenced by G4EmParameters::StreamInfo().

◆ GetStepFunctionLightIonsP2()

G4double G4EmExtraParameters::GetStepFunctionLightIonsP2 ( ) const

Definition at line 175 of file G4EmExtraParameters.cc.

176{
177 return finalRangeLIons;
178}

Referenced by G4EmParameters::StreamInfo().

◆ GetStepFunctionMuHadP1()

G4double G4EmExtraParameters::GetStepFunctionMuHadP1 ( ) const

Definition at line 147 of file G4EmExtraParameters.cc.

148{
149 return dRoverRangeMuHad;
150}

Referenced by G4EmParameters::StreamInfo().

◆ GetStepFunctionMuHadP2()

G4double G4EmExtraParameters::GetStepFunctionMuHadP2 ( ) const

Definition at line 152 of file G4EmExtraParameters.cc.

153{
154 return finalRangeMuHad;
155}

Referenced by G4EmParameters::StreamInfo().

◆ GetStepFunctionP1()

G4double G4EmExtraParameters::GetStepFunctionP1 ( ) const

Definition at line 124 of file G4EmExtraParameters.cc.

125{
126 return dRoverRange;
127}

Referenced by G4EmParameters::StreamInfo().

◆ GetStepFunctionP2()

G4double G4EmExtraParameters::GetStepFunctionP2 ( ) const

Definition at line 129 of file G4EmExtraParameters.cc.

130{
131 return finalRange;
132}

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 m_subCuts.clear();
92}
void set(double x, double y, double z)

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

◆ operator=()

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

◆ ParticlesPAI()

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

Definition at line 248 of file G4EmExtraParameters.cc.

249{
250 return m_particlesPAI;
251}

Referenced by G4EmParameters::ParticlesPAI().

◆ QuantumEntanglement()

G4bool G4EmExtraParameters::QuantumEntanglement ( )

Definition at line 447 of file G4EmExtraParameters.cc.

448{
449 return quantumEntanglement;
450}

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

◆ RegionsPAI()

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

Definition at line 253 of file G4EmExtraParameters.cc.

254{
255 return m_regnamesPAI;
256}

Referenced by G4EmParameters::RegionsPAI().

◆ RegionsPhysics()

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

Definition at line 275 of file G4EmExtraParameters.cc.

276{
277 return m_regnamesPhys;
278}

Referenced by G4EmParameters::RegionsPhysics().

◆ SetDirectionalSplitting()

void G4EmExtraParameters::SetDirectionalSplitting ( G4bool  v)

Definition at line 461 of file G4EmExtraParameters.cc.

462{
463 directionalSplitting = v;
464}

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

◆ SetDirectionalSplittingRadius()

void G4EmExtraParameters::SetDirectionalSplittingRadius ( G4double  r)

Definition at line 477 of file G4EmExtraParameters.cc.

478{
479 directionalSplittingRadius = r;
480}

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

◆ SetDirectionalSplittingTarget()

void G4EmExtraParameters::SetDirectionalSplittingTarget ( const G4ThreeVector v)

Definition at line 467 of file G4EmExtraParameters.cc.

468{
469 directionalSplittingTarget = v;
470}

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

◆ SetProcessBiasingFactor()

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

Definition at line 300 of file G4EmExtraParameters.cc.

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

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

◆ SetQuantumEntanglement()

void G4EmExtraParameters::SetQuantumEntanglement ( G4bool  v)

Definition at line 452 of file G4EmExtraParameters.cc.

453{
454 quantumEntanglement = v;
455}

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

◆ SetStepFunction()

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

Definition at line 111 of file G4EmExtraParameters.cc.

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

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

◆ SetStepFunctionIons()

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

Definition at line 180 of file G4EmExtraParameters.cc.

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

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

◆ SetStepFunctionLightIons()

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

Definition at line 157 of file G4EmExtraParameters.cc.

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

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

◆ SetStepFunctionMuHad()

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

Definition at line 134 of file G4EmExtraParameters.cc.

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

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

◆ SetSubCutoff()

void G4EmExtraParameters::SetSubCutoff ( G4bool  val,
const G4String region = "" 
)

Definition at line 285 of file G4EmExtraParameters.cc.

286{
287 G4String r = CheckRegion(region);
288 G4int nreg = m_regnamesSubCut.size();
289 for(G4int i=0; i<nreg; ++i) {
290 if(r == m_regnamesSubCut[i]) {
291 m_subCuts[i] = val;
292 return;
293 }
294 }
295 m_regnamesSubCut.push_back(r);
296 m_subCuts.push_back(val);
297}

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

◆ TypesPAI()

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

Definition at line 258 of file G4EmExtraParameters.cc.

259{
260 return m_typesPAI;
261}

Referenced by G4EmParameters::TypesPAI().

◆ TypesPhysics()

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

Definition at line 280 of file G4EmExtraParameters.cc.

281{
282 return m_typesPhys;
283}

Referenced by G4EmParameters::TypesPhysics().


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