All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Private Attributes | List of all members
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
< OpFastScintillation
fTheScintillationProcess
 
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  }
then echo fcl name

Member Function Documentation

void larg4::FastOpticalPhysics::ConstructParticle ( )
override

Definition at line 92 of file FastOpticalPhysics.cxx.

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

Definition at line 127 of file FastOpticalPhysics.cxx.

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

Member Data Documentation

G4OpAbsorption* larg4::FastOpticalPhysics::fTheAbsorptionProcess
private

Definition at line 89 of file FastOpticalPhysics.h.

OpBoundaryProcessSimple* larg4::FastOpticalPhysics::fTheBoundaryProcess
private

Definition at line 91 of file FastOpticalPhysics.h.

G4Cerenkov* larg4::FastOpticalPhysics::fTheCerenkovProcess
private

Definition at line 87 of file FastOpticalPhysics.h.

G4OpRayleigh* larg4::FastOpticalPhysics::fTheRayleighScatteringProcess
private

Definition at line 90 of file FastOpticalPhysics.h.

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

Definition at line 88 of file FastOpticalPhysics.h.

G4OpWLS* larg4::FastOpticalPhysics::fTheWLSProcess
private

Definition at line 92 of file FastOpticalPhysics.h.


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