Geant4  10.03.p03
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
WLSOpticalPhysics Class Reference

#include <WLSOpticalPhysics.hh>

Inheritance diagram for WLSOpticalPhysics:
Collaboration diagram for WLSOpticalPhysics:

Public Member Functions

 WLSOpticalPhysics (G4bool toggle=true)
 
virtual ~WLSOpticalPhysics ()
 
virtual void ConstructParticle ()
 
virtual void ConstructProcess ()
 
G4OpWLSGetWLSProcess ()
 
G4CerenkovGetCerenkovProcess ()
 
G4ScintillationGetScintillationProcess ()
 
G4OpAbsorptionGetAbsorptionProcess ()
 
G4OpRayleighGetRayleighScatteringProcess ()
 
G4OpMieHGGetMieHGScatteringProcess ()
 
G4OpBoundaryProcessGetBoundaryProcess ()
 
void SetNbOfPhotonsCerenkov (G4int)
 
- Public Member Functions inherited from G4VPhysicsConstructor
 G4VPhysicsConstructor (const G4String &="")
 
 G4VPhysicsConstructor (const G4String &name, G4int physics_type)
 
virtual ~G4VPhysicsConstructor ()
 
void SetPhysicsName (const G4String &="")
 
const G4StringGetPhysicsName () const
 
void SetPhysicsType (G4int)
 
G4int GetPhysicsType () const
 
void SetVerboseLevel (G4int value)
 
G4int GetVerboseLevel () const
 
G4int GetInstanceID () const
 

Additional Inherited Members

- Static Public Member Functions inherited from G4VPhysicsConstructor
static const G4VPCManagerGetSubInstanceManager ()
 
- Protected Member Functions inherited from G4VPhysicsConstructor
G4bool RegisterProcess (G4VProcess *process, G4ParticleDefinition *particle)
 
G4ParticleTable::G4PTblDicIteratorGetParticleIterator () const
 
- Protected Attributes inherited from G4VPhysicsConstructor
G4int verboseLevel
 
G4String namePhysics
 
G4int typePhysics
 
G4ParticleTabletheParticleTable
 
G4int g4vpcInstanceID
 
- Static Protected Attributes inherited from G4VPhysicsConstructor
static G4RUN_DLL G4VPCManager subInstanceManager
 

Detailed Description

Definition at line 51 of file WLSOpticalPhysics.hh.

Constructor & Destructor Documentation

WLSOpticalPhysics::WLSOpticalPhysics ( G4bool  toggle = true)

Definition at line 40 of file WLSOpticalPhysics.cc.

41  : G4VPhysicsConstructor("Optical")
42 {
43  fWLSProcess = NULL;
44  fScintProcess = NULL;
45  fCerenkovProcess = NULL;
46  fBoundaryProcess = NULL;
47  fAbsorptionProcess = NULL;
48  fRayleighScattering = NULL;
49  fMieHGScatteringProcess = NULL;
50 
51  fAbsorptionOn = toggle;
52 }
G4VPhysicsConstructor(const G4String &="")
WLSOpticalPhysics::~WLSOpticalPhysics ( )
virtual

Definition at line 54 of file WLSOpticalPhysics.cc.

54 { }

Member Function Documentation

void WLSOpticalPhysics::ConstructParticle ( void  )
virtual

Implements G4VPhysicsConstructor.

Definition at line 58 of file WLSOpticalPhysics.cc.

59 {
61 }
static G4OpticalPhoton * OpticalPhotonDefinition()

Here is the call graph for this function:

void WLSOpticalPhysics::ConstructProcess ( void  )
virtual

Implements G4VPhysicsConstructor.

Definition at line 65 of file WLSOpticalPhysics.cc.

66 {
67  G4cout << "WLSOpticalPhysics:: Add Optical Physics Processes"
68  << G4endl;
69 
70  fWLSProcess = new G4OpWLS();
71 
72  fScintProcess = new G4Scintillation();
73  fScintProcess->SetScintillationYieldFactor(1.);
74  fScintProcess->SetTrackSecondariesFirst(true);
75 
76  fCerenkovProcess = new G4Cerenkov();
77  fCerenkovProcess->SetMaxNumPhotonsPerStep(300);
78  fCerenkovProcess->SetTrackSecondariesFirst(true);
79 
80  fAbsorptionProcess = new G4OpAbsorption();
81  fRayleighScattering = new G4OpRayleigh();
82  fMieHGScatteringProcess = new G4OpMieHG();
83  fBoundaryProcess = new G4OpBoundaryProcess();
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 
95  if (fAbsorptionOn) pManager->AddDiscreteProcess(fAbsorptionProcess);
96 
97  //pManager->AddDiscreteProcess(fRayleighScattering);
98  //pManager->AddDiscreteProcess(fMieHGScatteringProcess);
99 
100  pManager->AddDiscreteProcess(fBoundaryProcess);
101 
102  fWLSProcess->UseTimeProfile("delta");
103  //fWLSProcess->UseTimeProfile("exponential");
104 
105  pManager->AddDiscreteProcess(fWLSProcess);
106 
107  fScintProcess->SetScintillationYieldFactor(1.);
108  fScintProcess->SetScintillationExcitationRatio(0.0);
109  fScintProcess->SetTrackSecondariesFirst(true);
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);
133  pManager->SetProcessOrdering(fCerenkovProcess,idxPostStep);
134  }
135  if(fScintProcess->IsApplicable(*particle)){
136  pManager->AddProcess(fScintProcess);
137  pManager->SetProcessOrderingToLast(fScintProcess,idxAtRest);
138  pManager->SetProcessOrderingToLast(fScintProcess,idxPostStep);
139  }
140 
141  }
142 }
static G4LossTableManager * Instance()
void SetTrackSecondariesFirst(const G4bool state)
Definition: G4Cerenkov.cc:145
G4int AddDiscreteProcess(G4VProcess *aProcess, G4int ord=ordDefault)
const G4String & GetParticleName() const
void UseTimeProfile(const G4String name)
Definition: G4OpWLS.cc:417
G4ParticleTable::G4PTblDicIterator * GetParticleIterator() const
void SetScintillationYieldFactor(const G4double yieldfactor)
G4GLOB_DLL std::ostream G4cout
G4int AddProcess(G4VProcess *aProcess, G4int ordAtRestDoIt=ordInActive, G4int ordAlongSteptDoIt=ordInActive, G4int ordPostStepDoIt=ordInActive)
G4EmSaturation * EmSaturation()
void SetMaxNumPhotonsPerStep(const G4int NumPhotons)
Definition: G4Cerenkov.cc:155
void SetProcessOrdering(G4VProcess *aProcess, G4ProcessVectorDoItIndex idDoIt, G4int ordDoIt=ordDefault)
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
Definition: G4Exception.cc:41
void SetScintillationExcitationRatio(const G4double ratio)
static G4OpticalPhoton * OpticalPhoton()
void SetTrackSecondariesFirst(const G4bool state)
void SetProcessOrderingToLast(G4VProcess *aProcess, G4ProcessVectorDoItIndex idDoIt)
G4ProcessManager * GetProcessManager() const
G4bool IsApplicable(const G4ParticleDefinition &aParticleType) override
Definition: G4Cerenkov.cc:133
std::vector< G4InuclElementaryParticle >::iterator particleIterator
Definition: G4BigBanger.cc:65
#define G4endl
Definition: G4ios.hh:61
G4bool IsApplicable(const G4ParticleDefinition &aParticleType) override
void AddSaturation(G4EmSaturation *sat)

Here is the call graph for this function:

Here is the caller graph for this function:

G4OpAbsorption* WLSOpticalPhysics::GetAbsorptionProcess ( )
inline

Definition at line 64 of file WLSOpticalPhysics.hh.

64 {return fAbsorptionProcess;}

Here is the caller graph for this function:

G4OpBoundaryProcess* WLSOpticalPhysics::GetBoundaryProcess ( )
inline

Definition at line 67 of file WLSOpticalPhysics.hh.

67 { return fBoundaryProcess;}

Here is the caller graph for this function:

G4Cerenkov* WLSOpticalPhysics::GetCerenkovProcess ( )
inline

Definition at line 62 of file WLSOpticalPhysics.hh.

62 {return fCerenkovProcess;}

Here is the caller graph for this function:

G4OpMieHG* WLSOpticalPhysics::GetMieHGScatteringProcess ( )
inline

Definition at line 66 of file WLSOpticalPhysics.hh.

66 {return fMieHGScatteringProcess;}

Here is the caller graph for this function:

G4OpRayleigh* WLSOpticalPhysics::GetRayleighScatteringProcess ( )
inline

Definition at line 65 of file WLSOpticalPhysics.hh.

65 {return fRayleighScattering;}

Here is the caller graph for this function:

G4Scintillation* WLSOpticalPhysics::GetScintillationProcess ( )
inline

Definition at line 63 of file WLSOpticalPhysics.hh.

63 {return fScintProcess;}

Here is the caller graph for this function:

G4OpWLS* WLSOpticalPhysics::GetWLSProcess ( )
inline

Definition at line 61 of file WLSOpticalPhysics.hh.

61 {return fWLSProcess;}
void WLSOpticalPhysics::SetNbOfPhotonsCerenkov ( G4int  maxNumber)

Definition at line 144 of file WLSOpticalPhysics.cc.

145 {
146  fCerenkovProcess->SetMaxNumPhotonsPerStep(maxNumber);
147 }
void SetMaxNumPhotonsPerStep(const G4int NumPhotons)
Definition: G4Cerenkov.cc:155

Here is the call graph for this function:

Here is the caller graph for this function:


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