LArSoft  v07_13_02
Liquid Argon Software toolkit - http://larsoft.org/
larg4::OpticalPhysics Class Reference

#include "OpticalPhysics.hh"

Inheritance diagram for larg4::OpticalPhysics:

Public Member Functions

 OpticalPhysics (G4int ver=0, const G4String &name="G4Optical")
 
virtual ~OpticalPhysics ()
 
virtual void ConstructParticle ()
 
virtual void ConstructProcess ()
 

Private Attributes

G4int verbose
 
G4Cerenkov * fTheCerenkovProcess
 
G4Scintillation * fTheScintillationProcess
 
G4OpAbsorption * fTheAbsorptionProcess
 
G4OpRayleigh * fTheRayleighScatteringProcess
 
OpBoundaryProcessSimplefTheBoundaryProcess
 
G4OpBoundaryProcess * fTheBoundaryProcess_g4
 
G4OpWLS * fTheWLSProcess
 

Detailed Description

Definition at line 81 of file OpticalPhysics.hh.

Constructor & Destructor Documentation

larg4::OpticalPhysics::OpticalPhysics ( G4int  ver = 0,
const G4String name = "G4Optical" 
)

Definition at line 116 of file OpticalPhysics.cxx.

117  : G4VPhysicsConstructor(name), verbose(ver)
118  {
119  G4LossTableManager::Instance();
120  mf::LogInfo("OpticalPhysics") << "OBJECT BEING CONSTRUCTED IN OPTICAL PHYSICS";
121  }
MaybeLogger_< ELseverityLevel::ELsev_info, false > LogInfo
larg4::OpticalPhysics::~OpticalPhysics ( )
virtual

Definition at line 125 of file OpticalPhysics.cxx.

126  {}

Member Function Documentation

void larg4::OpticalPhysics::ConstructParticle ( )
virtual

Definition at line 129 of file OpticalPhysics.cxx.

References LOG_DEBUG.

130  {
131  LOG_DEBUG("OpticalPhysics") << "PARTICLES BEING CONSTRUCTED IN OPTICAL PHYSICS";
132  // optical photon
133  G4OpticalPhoton::OpticalPhotonDefinition();
134 
135  // gamma
136  G4Gamma::Gamma();
137 
138  // leptons
139  G4Electron::Electron();
140  G4Positron::Positron();
141  G4MuonPlus::MuonPlus();
142  G4MuonMinus::MuonMinus();
143 
144  // mesons
145  G4PionPlus::PionPlusDefinition();
146  G4PionMinus::PionMinusDefinition();
147  G4KaonPlus::KaonPlusDefinition();
148  G4KaonMinus::KaonMinusDefinition();
149 
150  // barions
151  G4Proton::Proton();
152  G4AntiProton::AntiProton();
153 
154  // ions
155  G4Deuteron::Deuteron();
156  G4Triton::Triton();
157  G4He3::He3();
158  G4Alpha::Alpha();
159  G4GenericIon::GenericIonDefinition();
160  }
#define LOG_DEBUG(id)
void larg4::OpticalPhysics::ConstructProcess ( )
virtual

Definition at line 163 of file OpticalPhysics.cxx.

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

164  {
165 
166  const detinfo::LArProperties* larp = lar::providerFrom<detinfo::LArPropertiesService>();
167  const detinfo::DetectorProperties* detp = lar::providerFrom<detinfo::DetectorPropertiesService>();
168 
169  // Add standard EM Processes
170  LOG_DEBUG("OpticalPhysics") << "PROCESSES BEING CONSTRUCTED IN OPTICAL PHYSICS";
171 
172  fTheCerenkovProcess = new G4Cerenkov("Cerenkov");
173  fTheScintillationProcess = new G4Scintillation("Scintillation");
174  fTheAbsorptionProcess = new G4OpAbsorption();
175  fTheRayleighScatteringProcess = new G4OpRayleigh();
176  if(detp->SimpleBoundary())
177  fTheBoundaryProcess = new OpBoundaryProcessSimple();
178  else
179  fTheBoundaryProcess_g4 = new G4OpBoundaryProcess();
180  fTheWLSProcess = new G4OpWLS();
181 
182 
183 
184  fTheCerenkovProcess->SetMaxNumPhotonsPerStep(700);
185  fTheCerenkovProcess->SetMaxBetaChangePerStep(10.0);
186  fTheCerenkovProcess->SetTrackSecondariesFirst(false);
187 
188  fTheScintillationProcess->SetScintillationYieldFactor(1.);
189  fTheScintillationProcess->SetTrackSecondariesFirst(false);
190 
191  // Use Birks Correction in the Scintillation process
192 
193  G4EmSaturation* emSaturation = G4LossTableManager::Instance()->EmSaturation();
194  fTheScintillationProcess->AddSaturation(emSaturation);
195 
196 
197  bool CerenkovLightEnabled = larp->CerenkovLightEnabled();
198 
199  mf::LogInfo("OpticalPhysics")<<"Cerenkov light enabled : " << CerenkovLightEnabled;
200  static G4ParticleTable* fParticleTable = G4ParticleTable::GetParticleTable();
201  G4ParticleTable::G4PTblDicIterator* aParticleIterator;
202  aParticleIterator=fParticleTable->GetIterator();
203 
204  aParticleIterator->reset();
205  while( (*aParticleIterator)() ){
206  G4ParticleDefinition* particle = aParticleIterator->value();
207  G4ProcessManager* pmanager = particle->GetProcessManager();
208  G4String particleName = particle->GetParticleName();
209  if (fTheCerenkovProcess->IsApplicable(*particle)&&CerenkovLightEnabled) {
210  pmanager->AddProcess(fTheCerenkovProcess);
211  pmanager->SetProcessOrdering(fTheCerenkovProcess,idxPostStep);
212  // mf::LogInfo("OpticalPhysics")<<"OpticalPhysics : Cerenkov applicable : " << particleName;
213  }
214  if (fTheScintillationProcess->IsApplicable(*particle)) {
215  pmanager->AddProcess(fTheScintillationProcess);
216  pmanager->SetProcessOrderingToLast(fTheScintillationProcess, idxAtRest);
217  pmanager->SetProcessOrderingToLast(fTheScintillationProcess, idxPostStep);
218  // mf::LogInfo("OpticalPhysics")<<"OpticalPhysics : Scintillation applicable : " << particleName;
219  }
220 
221  if (particleName == "opticalphoton") {
222  mf::LogInfo("OpticalPhysics") << " AddDiscreteProcess to OpticalPhoton ";
223  pmanager->AddDiscreteProcess(fTheAbsorptionProcess);
224  pmanager->AddDiscreteProcess(fTheRayleighScatteringProcess);
225  if(detp->SimpleBoundary())
226  pmanager->AddDiscreteProcess(fTheBoundaryProcess);
227  else
228  pmanager->AddDiscreteProcess(fTheBoundaryProcess_g4);
229  pmanager->AddDiscreteProcess(fTheWLSProcess);
230  }
231  }
232 
233  }
virtual bool CerenkovLightEnabled() const =0
MaybeLogger_< ELseverityLevel::ELsev_info, false > LogInfo
OpBoundaryProcessSimple * fTheBoundaryProcess
G4Cerenkov * fTheCerenkovProcess
G4OpBoundaryProcess * fTheBoundaryProcess_g4
#define LOG_DEBUG(id)
G4OpAbsorption * fTheAbsorptionProcess
G4OpRayleigh * fTheRayleighScatteringProcess
G4Scintillation * fTheScintillationProcess

Member Data Documentation

G4OpAbsorption* larg4::OpticalPhysics::fTheAbsorptionProcess
private

Definition at line 94 of file OpticalPhysics.hh.

Referenced by ConstructProcess().

OpBoundaryProcessSimple* larg4::OpticalPhysics::fTheBoundaryProcess
private

Definition at line 96 of file OpticalPhysics.hh.

Referenced by ConstructProcess().

G4OpBoundaryProcess* larg4::OpticalPhysics::fTheBoundaryProcess_g4
private

Definition at line 97 of file OpticalPhysics.hh.

Referenced by ConstructProcess().

G4Cerenkov* larg4::OpticalPhysics::fTheCerenkovProcess
private

Definition at line 92 of file OpticalPhysics.hh.

Referenced by ConstructProcess().

G4OpRayleigh* larg4::OpticalPhysics::fTheRayleighScatteringProcess
private

Definition at line 95 of file OpticalPhysics.hh.

Referenced by ConstructProcess().

G4Scintillation* larg4::OpticalPhysics::fTheScintillationProcess
private

Definition at line 93 of file OpticalPhysics.hh.

Referenced by ConstructProcess().

G4OpWLS* larg4::OpticalPhysics::fTheWLSProcess
private

Definition at line 98 of file OpticalPhysics.hh.

Referenced by ConstructProcess().

G4int larg4::OpticalPhysics::verbose
private

Definition at line 91 of file OpticalPhysics.hh.


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