All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Private Member Functions | Private Attributes | List of all members
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.

86  : G4VPhysicsConstructor(name), fSimpleBoundary{detProp.SimpleBoundary()}
87  {
88  G4LossTableManager::Instance();
89  mf::LogInfo("OpticalPhysics") << "OBJECT BEING CONSTRUCTED IN OPTICAL PHYSICS";
90  }
then echo fcl name
auto const detProp

Member Function Documentation

void larg4::OpticalPhysics::ConstructParticle ( )
overrideprivate

Definition at line 94 of file OpticalPhysics.cxx.

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

Definition at line 129 of file OpticalPhysics.cxx.

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

Member Data Documentation

bool larg4::OpticalPhysics::fSimpleBoundary
private

Definition at line 88 of file OpticalPhysics.hh.

G4OpAbsorption* larg4::OpticalPhysics::fTheAbsorptionProcess
private

Definition at line 91 of file OpticalPhysics.hh.

OpBoundaryProcessSimple* larg4::OpticalPhysics::fTheBoundaryProcess
private

Definition at line 93 of file OpticalPhysics.hh.

G4OpBoundaryProcess* larg4::OpticalPhysics::fTheBoundaryProcess_g4
private

Definition at line 94 of file OpticalPhysics.hh.

G4Cerenkov* larg4::OpticalPhysics::fTheCerenkovProcess
private

Definition at line 89 of file OpticalPhysics.hh.

G4OpRayleigh* larg4::OpticalPhysics::fTheRayleighScatteringProcess
private

Definition at line 92 of file OpticalPhysics.hh.

G4Scintillation* larg4::OpticalPhysics::fTheScintillationProcess
private

Definition at line 90 of file OpticalPhysics.hh.

G4OpWLS* larg4::OpticalPhysics::fTheWLSProcess
private

Definition at line 95 of file OpticalPhysics.hh.


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