LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
larg4::OpticalPhysics Class Reference

#include "OpticalPhysics.hh"

Inheritance diagram for larg4::OpticalPhysics:

Public Member Functions

 OpticalPhysics (detinfo::DetectorPropertiesData const &detProp, G4int ver=0, G4String const &name="G4Optical")
 

Private Member Functions

void ConstructParticle () override
 
void ConstructProcess () override
 

Private Attributes

bool fSimpleBoundary
 
G4Cerenkov * fTheCerenkovProcess
 
G4Scintillation * fTheScintillationProcess
 
G4OpAbsorption * fTheAbsorptionProcess
 
G4OpRayleigh * fTheRayleighScatteringProcess
 
OpBoundaryProcessSimplefTheBoundaryProcess
 
G4OpBoundaryProcess * fTheBoundaryProcess_g4
 
G4OpWLS * fTheWLSProcess
 

Detailed Description

Definition at line 78 of file OpticalPhysics.hh.

Constructor & Destructor Documentation

larg4::OpticalPhysics::OpticalPhysics ( detinfo::DetectorPropertiesData const &  detProp,
G4int  ver = 0,
G4String const &  name = "G4Optical" 
)

Definition at line 83 of file OpticalPhysics.cxx.

References detinfo::DetectorPropertiesData::SimpleBoundary().

86  : G4VPhysicsConstructor(name), fSimpleBoundary{detProp.SimpleBoundary()}
87  {
88  G4LossTableManager::Instance();
89  mf::LogInfo("OpticalPhysics") << "OBJECT BEING CONSTRUCTED IN OPTICAL PHYSICS";
90  }
MaybeLogger_< ELseverityLevel::ELsev_info, false > LogInfo

Member Function Documentation

void larg4::OpticalPhysics::ConstructParticle ( )
overrideprivate

Definition at line 93 of file OpticalPhysics.cxx.

References MF_LOG_DEBUG.

94  {
95  MF_LOG_DEBUG("OpticalPhysics") << "PARTICLES BEING CONSTRUCTED IN OPTICAL PHYSICS";
96  // optical photon
97  G4OpticalPhoton::OpticalPhotonDefinition();
98 
99  // gamma
100  G4Gamma::Gamma();
101 
102  // leptons
103  G4Electron::Electron();
104  G4Positron::Positron();
105  G4MuonPlus::MuonPlus();
106  G4MuonMinus::MuonMinus();
107 
108  // mesons
109  G4PionPlus::PionPlusDefinition();
110  G4PionMinus::PionMinusDefinition();
111  G4KaonPlus::KaonPlusDefinition();
112  G4KaonMinus::KaonMinusDefinition();
113 
114  // barions
115  G4Proton::Proton();
116  G4AntiProton::AntiProton();
117 
118  // ions
119  G4Deuteron::Deuteron();
120  G4Triton::Triton();
121  G4He3::He3();
122  G4Alpha::Alpha();
123  G4GenericIon::GenericIonDefinition();
124  }
#define MF_LOG_DEBUG(id)
void larg4::OpticalPhysics::ConstructProcess ( )
overrideprivate

Definition at line 127 of file OpticalPhysics.cxx.

References detinfo::LArProperties::CerenkovLightEnabled(), fSimpleBoundary, fTheAbsorptionProcess, fTheBoundaryProcess, fTheBoundaryProcess_g4, fTheCerenkovProcess, fTheRayleighScatteringProcess, fTheScintillationProcess, fTheWLSProcess, and MF_LOG_DEBUG.

128  {
129  const detinfo::LArProperties* larp = lar::providerFrom<detinfo::LArPropertiesService>();
130 
131  // Add standard EM Processes
132  MF_LOG_DEBUG("OpticalPhysics") << "PROCESSES BEING CONSTRUCTED IN OPTICAL PHYSICS";
133 
134  fTheCerenkovProcess = new G4Cerenkov("Cerenkov");
135  fTheScintillationProcess = new G4Scintillation("Scintillation");
136  fTheAbsorptionProcess = new G4OpAbsorption();
137  fTheRayleighScatteringProcess = new G4OpRayleigh();
138  if (fSimpleBoundary)
139  fTheBoundaryProcess = new OpBoundaryProcessSimple();
140  else
141  fTheBoundaryProcess_g4 = new G4OpBoundaryProcess();
142  fTheWLSProcess = new G4OpWLS();
143 
144  fTheCerenkovProcess->SetMaxNumPhotonsPerStep(700);
145  fTheCerenkovProcess->SetMaxBetaChangePerStep(10.0);
146  fTheCerenkovProcess->SetTrackSecondariesFirst(false);
147 
148  fTheScintillationProcess->SetScintillationYieldFactor(1.);
149  fTheScintillationProcess->SetTrackSecondariesFirst(false);
150 
151  // Use Birks Correction in the Scintillation process
152 
153  G4EmSaturation* emSaturation = G4LossTableManager::Instance()->EmSaturation();
154  fTheScintillationProcess->AddSaturation(emSaturation);
155 
156  bool CerenkovLightEnabled = larp->CerenkovLightEnabled();
157 
158  mf::LogInfo("OpticalPhysics") << "Cerenkov light enabled : " << CerenkovLightEnabled;
159  static G4ParticleTable* fParticleTable = G4ParticleTable::GetParticleTable();
160  G4ParticleTable::G4PTblDicIterator* aParticleIterator;
161  aParticleIterator = fParticleTable->GetIterator();
162 
163  aParticleIterator->reset();
164  while ((*aParticleIterator)()) {
165  G4ParticleDefinition* particle = aParticleIterator->value();
166  G4ProcessManager* pmanager = particle->GetProcessManager();
167  G4String particleName = particle->GetParticleName();
168  if (fTheCerenkovProcess->IsApplicable(*particle) && CerenkovLightEnabled) {
169  pmanager->AddProcess(fTheCerenkovProcess);
170  pmanager->SetProcessOrdering(fTheCerenkovProcess, idxPostStep);
171  }
172  if (fTheScintillationProcess->IsApplicable(*particle)) {
173  pmanager->AddProcess(fTheScintillationProcess);
174  pmanager->SetProcessOrderingToLast(fTheScintillationProcess, idxAtRest);
175  pmanager->SetProcessOrderingToLast(fTheScintillationProcess, idxPostStep);
176  }
177 
178  if (particleName == "opticalphoton") {
179  mf::LogInfo("OpticalPhysics") << " AddDiscreteProcess to OpticalPhoton ";
180  pmanager->AddDiscreteProcess(fTheAbsorptionProcess);
181  pmanager->AddDiscreteProcess(fTheRayleighScatteringProcess);
182  if (fSimpleBoundary)
183  pmanager->AddDiscreteProcess(fTheBoundaryProcess);
184  else
185  pmanager->AddDiscreteProcess(fTheBoundaryProcess_g4);
186  pmanager->AddDiscreteProcess(fTheWLSProcess);
187  }
188  }
189  }
virtual bool CerenkovLightEnabled() const =0
MaybeLogger_< ELseverityLevel::ELsev_info, false > LogInfo
OpBoundaryProcessSimple * fTheBoundaryProcess
G4Cerenkov * fTheCerenkovProcess
G4OpBoundaryProcess * fTheBoundaryProcess_g4
#define MF_LOG_DEBUG(id)
G4OpAbsorption * fTheAbsorptionProcess
G4OpRayleigh * fTheRayleighScatteringProcess
G4Scintillation * fTheScintillationProcess

Member Data Documentation

bool larg4::OpticalPhysics::fSimpleBoundary
private

Definition at line 88 of file OpticalPhysics.hh.

Referenced by ConstructProcess().

G4OpAbsorption* larg4::OpticalPhysics::fTheAbsorptionProcess
private

Definition at line 91 of file OpticalPhysics.hh.

Referenced by ConstructProcess().

OpBoundaryProcessSimple* larg4::OpticalPhysics::fTheBoundaryProcess
private

Definition at line 93 of file OpticalPhysics.hh.

Referenced by ConstructProcess().

G4OpBoundaryProcess* larg4::OpticalPhysics::fTheBoundaryProcess_g4
private

Definition at line 94 of file OpticalPhysics.hh.

Referenced by ConstructProcess().

G4Cerenkov* larg4::OpticalPhysics::fTheCerenkovProcess
private

Definition at line 89 of file OpticalPhysics.hh.

Referenced by ConstructProcess().

G4OpRayleigh* larg4::OpticalPhysics::fTheRayleighScatteringProcess
private

Definition at line 92 of file OpticalPhysics.hh.

Referenced by ConstructProcess().

G4Scintillation* larg4::OpticalPhysics::fTheScintillationProcess
private

Definition at line 90 of file OpticalPhysics.hh.

Referenced by ConstructProcess().

G4OpWLS* larg4::OpticalPhysics::fTheWLSProcess
private

Definition at line 95 of file OpticalPhysics.hh.

Referenced by ConstructProcess().


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