Public Member Functions | Private Attributes | List of all members
EDepSim::ExtraPhysics Class Reference

#include <EDepSimExtraPhysics.hh>

Inheritance diagram for EDepSim::ExtraPhysics:

Public Member Functions

 ExtraPhysics ()
 
virtual ~ExtraPhysics ()
 
virtual void ConstructParticle ()
 
virtual void ConstructProcess ()
 
void SetIonizationModel (int m)
 

Private Attributes

int fIonizationModel
 

Detailed Description

Definition at line 20 of file EDepSimExtraPhysics.hh.

Constructor & Destructor Documentation

EDepSim::ExtraPhysics::ExtraPhysics ( )
explicit

Construct the extra physics lists. The argument is the default recombination for argon. If the value is negative, then use NEST.

Definition at line 23 of file EDepSimExtraPhysics.cc.

24  : G4VPhysicsConstructor("EDepSimExtra"), fIonizationModel(1) { }
EDepSim::ExtraPhysics::~ExtraPhysics ( )
virtual

Definition at line 26 of file EDepSimExtraPhysics.cc.

26 { }

Member Function Documentation

void EDepSim::ExtraPhysics::ConstructParticle ( )
virtual

Definition at line 28 of file EDepSimExtraPhysics.cc.

28  {
30 }
static G4ThermalElectron * Definition()
void EDepSim::ExtraPhysics::ConstructProcess ( )
virtual

Definition at line 32 of file EDepSimExtraPhysics.cc.

32  {
33  EDepSimLog("EDepSim::ExtraPhysics:: Add Extra Physics Processes");
34 
35  G4ParticleTable::G4PTblDicIterator* theParticleIterator
36  = theParticleTable->GetIterator();
37 
38  theParticleIterator->reset();
39  while ((*theParticleIterator)()) {
40  G4ParticleDefinition* particle = theParticleIterator->value();
41  G4ProcessManager* pman = particle->GetProcessManager();
42  G4String particleName = particle->GetParticleName();
43  G4String particleType = particle->GetParticleType();
44  double charge = particle->GetPDGCharge();
45 
46  if (!pman) {
47  EDepSimError("Particle "
48  << particleName
49  << " without a Process Manager.");
50  EDepSimThrow("Particle without a Process Manager.");
51  }
52 
53  // All charged particles should have a step limiter to make sure that
54  // the steps do not get too long.
55  if (std::abs(charge) > 0.1) {
56  pman->AddDiscreteProcess(new G4StepLimiter("Step Limit"));
57  }
58 
59  switch (fIonizationModel) {
60  case 0: {
61  // Add nest to any applicable particle.
62  G4S1Light* scintProcess = new G4S1Light();
63  scintProcess->SetScintillationYieldFactor(1.0);
64  if (scintProcess->IsApplicable(*particle)) {
65  pman->AddProcess(scintProcess,ordDefault,
66  ordInActive,ordDefault);
67  }
68  break;
69  }
70  case 1: default: {
71  // Add EDepSim::DokeBirks to any applicable particle.
72  EDepSim::DokeBirks* scintProcess = new EDepSim::DokeBirks();
73  if (scintProcess->IsApplicable(*particle)) {
74  pman->AddProcess(scintProcess,ordDefault,
75  ordInActive,ordDefault);
76  }
77  break;
78  }
79  }
80  }
81 }
#define EDepSimLog(outStream)
Definition: EDepSimLog.hh:717
G4bool IsApplicable(const G4ParticleDefinition &aParticleType)
Determine which particles this process should be applied too.
#define EDepSimThrow(message)
Print an error message, and then throw an exception.
T abs(T value)
G4bool IsApplicable(const G4ParticleDefinition &aParticleType)
Definition: G4S1Light.hh:124
void SetScintillationYieldFactor(const G4double yieldfactor)
Definition: G4S1Light.hh:150
#define EDepSimError(outStream)
Definition: EDepSimLog.hh:503
void EDepSim::ExtraPhysics::SetIonizationModel ( int  m)
inline

Set the ionization model to be use. The ionization model calculates the amount of total deposited energy that will be visible as ionization. Because of how G4 works, the total energy deposited and the non-ionization energy are tabulated. The implemented models are: 0) Use NEST to make a detailed calculation. 1) Use EDepSim::SimpleScintillation to make a quick calculation.

Definition at line 37 of file EDepSimExtraPhysics.hh.

Member Data Documentation

int EDepSim::ExtraPhysics::fIonizationModel
private

Definition at line 41 of file EDepSimExtraPhysics.hh.


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