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

#include "FastOpticalPhysics.h"

Inheritance diagram for larg4::FastOpticalPhysics:

Public Member Functions

 FastOpticalPhysics (G4int ver=0, const G4String &name="FastOptical")
 
void ConstructParticle () override
 
void ConstructProcess () override
 

Private Attributes

G4Cerenkov * fTheCerenkovProcess
 
std::unique_ptr< OpFastScintillationfTheScintillationProcess
 
G4OpAbsorption * fTheAbsorptionProcess
 
G4OpRayleigh * fTheRayleighScatteringProcess
 
OpBoundaryProcessSimplefTheBoundaryProcess
 
G4OpWLS * fTheWLSProcess
 

Detailed Description

Definition at line 79 of file FastOpticalPhysics.h.

Constructor & Destructor Documentation

larg4::FastOpticalPhysics::FastOpticalPhysics ( G4int  ver = 0,
const G4String name = "FastOptical" 
)

Definition at line 83 of file FastOpticalPhysics.cxx.

84  : G4VPhysicsConstructor(name)
85  {
86  G4LossTableManager::Instance();
87  mf::LogInfo("FastOpticalPhysics") << "OBJECT BEING CONSTRUCTED IN OPTICAL PHYSICS";
88  }
MaybeLogger_< ELseverityLevel::ELsev_info, false > LogInfo

Member Function Documentation

void larg4::FastOpticalPhysics::ConstructParticle ( )
override

Definition at line 91 of file FastOpticalPhysics.cxx.

References MF_LOG_DEBUG.

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

Definition at line 125 of file FastOpticalPhysics.cxx.

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

126  {
127  // Add standard EM Processes
128  MF_LOG_DEBUG("FastOpticalPhysics") << "PROCESSES BEING CONSTRUCTED IN OPTICAL PHYSICS";
129 
130  fTheCerenkovProcess = new G4Cerenkov("Cerenkov");
131  fTheAbsorptionProcess = new G4OpAbsorption();
132  fTheRayleighScatteringProcess = new G4OpRayleigh();
133  fTheBoundaryProcess = new OpBoundaryProcessSimple();
134  fTheWLSProcess = new G4OpWLS();
135  fTheScintillationProcess = std::make_unique<OpFastScintillation>("FastScintillation");
136 
137  fTheCerenkovProcess->SetMaxNumPhotonsPerStep(700);
138  fTheCerenkovProcess->SetMaxBetaChangePerStep(10.0);
139  fTheCerenkovProcess->SetTrackSecondariesFirst(false);
140 
141  const detinfo::LArProperties* larp = lar::providerFrom<detinfo::LArPropertiesService>();
142  bool CerenkovEnabled = larp->CerenkovLightEnabled();
143 
144  mf::LogInfo("FastOpticalPhysics") << "Cerenkov enabled : " << CerenkovEnabled;
145  static G4ParticleTable* fParticleTable = G4ParticleTable::GetParticleTable();
146  G4ParticleTable::G4PTblDicIterator* aParticleIterator;
147  aParticleIterator = fParticleTable->GetIterator();
148  aParticleIterator->reset();
149  while ((*aParticleIterator)()) {
150  G4ParticleDefinition* particle = aParticleIterator->value();
151  G4ProcessManager* pmanager = particle->GetProcessManager();
152  G4String particleName = particle->GetParticleName();
153 
154  if (fTheCerenkovProcess->IsApplicable(*particle) && CerenkovEnabled) {
155  pmanager->AddProcess(fTheCerenkovProcess);
156  pmanager->SetProcessOrdering(fTheCerenkovProcess, idxPostStep);
157  }
158  if (fTheScintillationProcess->IsApplicable(*particle)) {
159  auto ptr = fTheScintillationProcess.get();
160  pmanager->AddProcess(ptr);
161  pmanager->SetProcessOrderingToLast(ptr, idxAtRest);
162  pmanager->SetProcessOrderingToLast(ptr, idxPostStep);
163  }
164 
165  if (particleName == "opticalphoton") {
166  mf::LogInfo("FastOptical") << " AddDiscreteProcess to OpticalPhoton ";
167  pmanager->AddDiscreteProcess(fTheAbsorptionProcess);
168  pmanager->AddDiscreteProcess(fTheRayleighScatteringProcess);
169  pmanager->AddDiscreteProcess(fTheBoundaryProcess);
170  pmanager->AddDiscreteProcess(fTheWLSProcess);
171  }
172  }
173  }
virtual bool CerenkovLightEnabled() const =0
MaybeLogger_< ELseverityLevel::ELsev_info, false > LogInfo
G4OpAbsorption * fTheAbsorptionProcess
std::unique_ptr< OpFastScintillation > fTheScintillationProcess
OpBoundaryProcessSimple * fTheBoundaryProcess
G4OpRayleigh * fTheRayleighScatteringProcess
#define MF_LOG_DEBUG(id)

Member Data Documentation

G4OpAbsorption* larg4::FastOpticalPhysics::fTheAbsorptionProcess
private

Definition at line 89 of file FastOpticalPhysics.h.

Referenced by ConstructProcess().

OpBoundaryProcessSimple* larg4::FastOpticalPhysics::fTheBoundaryProcess
private

Definition at line 91 of file FastOpticalPhysics.h.

Referenced by ConstructProcess().

G4Cerenkov* larg4::FastOpticalPhysics::fTheCerenkovProcess
private

Definition at line 87 of file FastOpticalPhysics.h.

Referenced by ConstructProcess().

G4OpRayleigh* larg4::FastOpticalPhysics::fTheRayleighScatteringProcess
private

Definition at line 90 of file FastOpticalPhysics.h.

Referenced by ConstructProcess().

std::unique_ptr<OpFastScintillation> larg4::FastOpticalPhysics::fTheScintillationProcess
private

Definition at line 88 of file FastOpticalPhysics.h.

Referenced by ConstructProcess().

G4OpWLS* larg4::FastOpticalPhysics::fTheWLSProcess
private

Definition at line 92 of file FastOpticalPhysics.h.

Referenced by ConstructProcess().


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