Geant4  v4-10.4-release
 모두 클래스 네임스페이스들 파일들 함수 변수 타입정의 열거형 타입 열거형 멤버 Friends 매크로 그룹들 페이지들
WLSOpticalPhysics.cc
이 파일의 문서화 페이지로 가기
1 //
2 // ********************************************************************
3 // * License and Disclaimer *
4 // * *
5 // * The Geant4 software is copyright of the Copyright Holders of *
6 // * the Geant4 Collaboration. It is provided under the terms and *
7 // * conditions of the Geant4 Software License, included in the file *
8 // * LICENSE and available at http://cern.ch/geant4/license . These *
9 // * include a list of copyright holders. *
10 // * *
11 // * Neither the authors of this software system, nor their employing *
12 // * institutes,nor the agencies providing financial support for this *
13 // * work make any representation or warranty, express or implied, *
14 // * regarding this software system or assume any liability for its *
15 // * use. Please see the license in the file LICENSE and URL above *
16 // * for the full disclaimer and the limitation of liability. *
17 // * *
18 // * This code implementation is the result of the scientific and *
19 // * technical work of the GEANT4 collaboration. *
20 // * By using, copying, modifying or distributing the software (or *
21 // * any work based on the software) you agree to acknowledge its *
22 // * use in resulting scientific publications, and indicate your *
23 // * acceptance of all terms of the Geant4 Software license. *
24 // ********************************************************************
25 //
26 // $Id: WLSOpticalPhysics.cc 100260 2016-10-17 08:03:33Z gcosmo $
27 //
30 //
31 
32 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
33 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
34 
35 #include "G4LossTableManager.hh"
36 #include "G4EmSaturation.hh"
37 
38 #include "WLSOpticalPhysics.hh"
39 
41  : G4VPhysicsConstructor("Optical")
42 {
43  fWLSProcess = NULL;
44  fScintProcess = NULL;
45  fCerenkovProcess = NULL;
46  fBoundaryProcess = NULL;
47  fAbsorptionProcess = NULL;
48  fRayleighScattering = NULL;
50 
51  fAbsorptionOn = toggle;
52 }
53 
55 
56 #include "G4OpticalPhoton.hh"
57 
59 {
61 }
62 
63 #include "G4ProcessManager.hh"
64 
66 {
67  G4cout << "WLSOpticalPhysics:: Add Optical Physics Processes"
68  << G4endl;
69 
70  fWLSProcess = new G4OpWLS();
71 
75 
79 
84 
85  G4ProcessManager* pManager =
87 
88  if (!pManager) {
89  std::ostringstream o;
90  o << "Optical Photon without a Process Manager";
91  G4Exception("WLSOpticalPhysics::ConstructProcess()","",
92  FatalException,o.str().c_str());
93  }
94 
96 
97  //pManager->AddDiscreteProcess(fRayleighScattering);
98  //pManager->AddDiscreteProcess(fMieHGScatteringProcess);
99 
101 
102  fWLSProcess->UseTimeProfile("delta");
103  //fWLSProcess->UseTimeProfile("exponential");
104 
105  pManager->AddDiscreteProcess(fWLSProcess);
106 
110 
111  // Use Birks Correction in the Scintillation process
112 
114  fScintProcess->AddSaturation(emSaturation);
115 
117  particleIterator->reset();
118  while ( (*particleIterator)() ){
119 
120  G4ParticleDefinition* particle = particleIterator->value();
121  G4String particleName = particle->GetParticleName();
122 
123  pManager = particle->GetProcessManager();
124  if (!pManager) {
125  std::ostringstream o;
126  o << "Particle " << particleName << "without a Process Manager";
127  G4Exception("WLSOpticalPhysics::ConstructProcess()","",
128  FatalException,o.str().c_str());
129  }
130 
131  if(fCerenkovProcess->IsApplicable(*particle)){
132  pManager->AddProcess(fCerenkovProcess);
134  }
135  if(fScintProcess->IsApplicable(*particle)){
136  pManager->AddProcess(fScintProcess);
139  }
140 
141  }
142 }
143 
145 {
147 }
void SetScintillationExcitationRatio(const G4double ratio)
G4Scintillation * fScintProcess
void SetNbOfPhotonsCerenkov(G4int)
G4Cerenkov * fCerenkovProcess
void SetProcessOrderingToLast(G4VProcess *aProcess, G4ProcessVectorDoItIndex idDoIt)
G4int AddDiscreteProcess(G4VProcess *aProcess, G4int ord=ordDefault)
#define G4endl
Definition: G4ios.hh:61
G4OpRayleigh * fRayleighScattering
const G4String & GetParticleName() const
void SetTrackSecondariesFirst(const G4bool state)
void SetMaxNumPhotonsPerStep(const G4int NumPhotons)
Definition: G4Cerenkov.cc:155
void SetProcessOrdering(G4VProcess *aProcess, G4ProcessVectorDoItIndex idDoIt, G4int ordDoIt=ordDefault)
void SetTrackSecondariesFirst(const G4bool state)
Definition: G4Cerenkov.cc:145
void UseTimeProfile(const G4String name)
Definition: G4OpWLS.cc:417
bool G4bool
Definition: G4Types.hh:79
G4int AddProcess(G4VProcess *aProcess, G4int ordAtRestDoIt=ordInActive, G4int ordAlongSteptDoIt=ordInActive, G4int ordPostStepDoIt=ordInActive)
G4OpBoundaryProcess * fBoundaryProcess
G4OpAbsorption * fAbsorptionProcess
WLSOpticalPhysics(G4bool toggle=true)
static G4OpticalPhoton * OpticalPhoton()
static G4OpticalPhoton * OpticalPhotonDefinition()
virtual ~WLSOpticalPhysics()
G4OpMieHG * fMieHGScatteringProcess
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
Definition: G4Exception.hh:65
virtual void ConstructParticle()
int G4int
Definition: G4Types.hh:78
G4EmSaturation * EmSaturation()
void AddSaturation(G4EmSaturation *sat)
G4ProcessManager * GetProcessManager() const
Definition of the WLSOpticalPhysics class.
std::vector< G4InuclElementaryParticle >::iterator particleIterator
Definition: G4BigBanger.cc:65
G4GLOB_DLL std::ostream G4cout
static G4LossTableManager * Instance()
G4ParticleTable::G4PTblDicIterator * GetParticleIterator() const
G4bool IsApplicable(const G4ParticleDefinition &aParticleType) override
void SetScintillationYieldFactor(const G4double yieldfactor)
virtual void ConstructProcess()
G4bool IsApplicable(const G4ParticleDefinition &aParticleType) override
Definition: G4Cerenkov.cc:133