LArSoft  v06_85_00
Liquid Argon Software toolkit - http://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")
 
virtual ~FastOpticalPhysics ()
 
virtual void ConstructParticle ()
 
virtual void ConstructProcess ()
 

Private Attributes

G4int verbose
 
G4Cerenkov * fTheCerenkovProcess
 
OpFastScintillationfTheScintillationProcess
 
G4OpAbsorption * fTheAbsorptionProcess
 
G4OpRayleigh * fTheRayleighScatteringProcess
 
OpBoundaryProcessSimplefTheBoundaryProcess
 
G4OpWLS * fTheWLSProcess
 

Detailed Description

Definition at line 82 of file FastOpticalPhysics.h.

Constructor & Destructor Documentation

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

Definition at line 121 of file FastOpticalPhysics.cxx.

122  : G4VPhysicsConstructor(name), verbose(ver)
123  {
124  G4LossTableManager::Instance();
125  mf::LogInfo("FastOpticalPhysics") << "OBJECT BEING CONSTRUCTED IN OPTICAL PHYSICS";
126  }
MaybeLogger_< ELseverityLevel::ELsev_info, false > LogInfo
larg4::FastOpticalPhysics::~FastOpticalPhysics ( )
virtual

Definition at line 130 of file FastOpticalPhysics.cxx.

131  {}

Member Function Documentation

void larg4::FastOpticalPhysics::ConstructParticle ( )
virtual

Definition at line 134 of file FastOpticalPhysics.cxx.

References LOG_DEBUG.

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

Definition at line 168 of file FastOpticalPhysics.cxx.

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

169  {
170  // Add standard EM Processes
171  LOG_DEBUG("FastOpticalPhysics") << "PROCESSES BEING CONSTRUCTED IN OPTICAL PHYSICS";
172 
173  fTheCerenkovProcess = new G4Cerenkov("Cerenkov");
174  fTheAbsorptionProcess = new G4OpAbsorption();
175  fTheRayleighScatteringProcess = new G4OpRayleigh();
176  fTheBoundaryProcess = new OpBoundaryProcessSimple();
177  fTheWLSProcess = new G4OpWLS();
178  fTheScintillationProcess = new OpFastScintillation("FastScintillation");
179 
180  fTheCerenkovProcess->SetMaxNumPhotonsPerStep(700);
181  fTheCerenkovProcess->SetMaxBetaChangePerStep(10.0);
182  fTheCerenkovProcess->SetTrackSecondariesFirst(false);
183 
184  const detinfo::LArProperties* larp = lar::providerFrom<detinfo::LArPropertiesService>();
185  bool CerenkovEnabled = larp->CerenkovLightEnabled();
186 
187  mf::LogInfo("FastOpticalPhysics") << "Cerenkov enabled : " << CerenkovEnabled;
188  static G4ParticleTable* fParticleTable = G4ParticleTable::GetParticleTable();
189  G4ParticleTable::G4PTblDicIterator* aParticleIterator;
190  aParticleIterator=fParticleTable->GetIterator();
191  aParticleIterator->reset();
192  while( (*aParticleIterator)() ){
193  G4ParticleDefinition* particle = aParticleIterator->value();
194  G4ProcessManager* pmanager = particle->GetProcessManager();
195  G4String particleName = particle->GetParticleName();
196 
197  if (fTheCerenkovProcess->IsApplicable(*particle)&&CerenkovEnabled) {
198  pmanager->AddProcess(fTheCerenkovProcess);
199  pmanager->SetProcessOrdering(fTheCerenkovProcess,idxPostStep);
200 
201  }
202  if (fTheScintillationProcess->IsApplicable(*particle)) {
203  pmanager->AddProcess(fTheScintillationProcess);
204  pmanager->SetProcessOrderingToLast(fTheScintillationProcess, idxAtRest);
205  pmanager->SetProcessOrderingToLast(fTheScintillationProcess, idxPostStep);
206 
207  }
208 
209  if (particleName == "opticalphoton") {
210  mf::LogInfo("FastOptical") << " AddDiscreteProcess to OpticalPhoton ";
211  pmanager->AddDiscreteProcess(fTheAbsorptionProcess);
212  pmanager->AddDiscreteProcess(fTheRayleighScatteringProcess);
213  pmanager->AddDiscreteProcess(fTheBoundaryProcess);
214  pmanager->AddDiscreteProcess(fTheWLSProcess);
215  }
216  }
217 
218  }
virtual bool CerenkovLightEnabled() const =0
MaybeLogger_< ELseverityLevel::ELsev_info, false > LogInfo
G4OpAbsorption * fTheAbsorptionProcess
virtual G4bool IsApplicable(const G4ParticleDefinition &aParticleType)
OpBoundaryProcessSimple * fTheBoundaryProcess
G4OpRayleigh * fTheRayleighScatteringProcess
OpFastScintillation * fTheScintillationProcess
#define LOG_DEBUG(id)

Member Data Documentation

G4OpAbsorption* larg4::FastOpticalPhysics::fTheAbsorptionProcess
private

Definition at line 95 of file FastOpticalPhysics.h.

Referenced by ConstructProcess().

OpBoundaryProcessSimple* larg4::FastOpticalPhysics::fTheBoundaryProcess
private

Definition at line 97 of file FastOpticalPhysics.h.

Referenced by ConstructProcess().

G4Cerenkov* larg4::FastOpticalPhysics::fTheCerenkovProcess
private

Definition at line 93 of file FastOpticalPhysics.h.

Referenced by ConstructProcess().

G4OpRayleigh* larg4::FastOpticalPhysics::fTheRayleighScatteringProcess
private

Definition at line 96 of file FastOpticalPhysics.h.

Referenced by ConstructProcess().

OpFastScintillation* larg4::FastOpticalPhysics::fTheScintillationProcess
private

Definition at line 94 of file FastOpticalPhysics.h.

Referenced by ConstructProcess().

G4OpWLS* larg4::FastOpticalPhysics::fTheWLSProcess
private

Definition at line 98 of file FastOpticalPhysics.h.

Referenced by ConstructProcess().

G4int larg4::FastOpticalPhysics::verbose
private

Definition at line 92 of file FastOpticalPhysics.h.


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