Geant4  10.02.p03
F04OpticalPhysics Class Reference

#include <F04OpticalPhysics.hh>

Inheritance diagram for F04OpticalPhysics:
Collaboration diagram for F04OpticalPhysics:

Public Member Functions

 F04OpticalPhysics ()
 
virtual ~F04OpticalPhysics ()
 
virtual void ConstructParticle ()
 
virtual void ConstructProcess ()
 
- 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 39 of file F04OpticalPhysics.hh.

Constructor & Destructor Documentation

◆ F04OpticalPhysics()

F04OpticalPhysics::F04OpticalPhysics ( )

Definition at line 47 of file F04OpticalPhysics.cc.

48  : G4VPhysicsConstructor("Optical") {}
G4VPhysicsConstructor(const G4String &="")

◆ ~F04OpticalPhysics()

F04OpticalPhysics::~F04OpticalPhysics ( )
virtual

Definition at line 52 of file F04OpticalPhysics.cc.

52 {}

Member Function Documentation

◆ ConstructParticle()

void F04OpticalPhysics::ConstructParticle ( void  )
virtual

Implements G4VPhysicsConstructor.

Definition at line 61 of file F04OpticalPhysics.cc.

62 {
64 }
static G4OpticalPhoton * OpticalPhotonDefinition()
Here is the call graph for this function:

◆ ConstructProcess()

void F04OpticalPhysics::ConstructProcess ( void  )
virtual

Implements G4VPhysicsConstructor.

Definition at line 71 of file F04OpticalPhysics.cc.

72 {
73  G4cout << "F04OpticalPhysics:: Add Optical Physics Processes"
74  << G4endl;
75 
76  G4Scintillation* theScintProcess = new G4Scintillation();
77  theScintProcess->SetScintillationYieldFactor(1.);
78  theScintProcess->SetScintillationExcitationRatio(0.0);
79  theScintProcess->SetTrackSecondariesFirst(true);
80 
81  G4Cerenkov* theCerenkovProcess= new G4Cerenkov();
82 
83  G4OpAbsorption* theAbsorptionProcess= new G4OpAbsorption();
84  G4OpRayleigh* theRayleighScattering = new G4OpRayleigh();
85  G4OpMieHG* theMieHGScatteringProcess = new G4OpMieHG();
86  G4OpBoundaryProcess* theBoundaryProcess = new G4OpBoundaryProcess();
87  G4OpWLS* theWLSProcess=new G4OpWLS();
88  theWLSProcess->UseTimeProfile("delta");
89 
90  G4ProcessManager* pManager =
92 
93  if (!pManager) {
94  std::ostringstream o;
95  o << "Optical Photon without a Process Manager";
96  G4Exception("F04OpticalPhysics::ConstructProcess()","",
97  FatalException,o.str().c_str());
98  }
99 
100  pManager->AddDiscreteProcess(theAbsorptionProcess);
101  pManager->AddDiscreteProcess(theRayleighScattering);
102  pManager->AddDiscreteProcess(theMieHGScatteringProcess);
103 
104  pManager->AddDiscreteProcess(theBoundaryProcess);
105 
106  pManager->AddDiscreteProcess(theWLSProcess);
107 
109  particleIterator->reset();
110 
111  while( (*particleIterator)() ){
112 
113  G4ParticleDefinition* particle = particleIterator->value();
114  G4String particleName = particle->GetParticleName();
115 
116  pManager = particle->GetProcessManager();
117  if (!pManager) {
118  std::ostringstream o;
119  o << "Particle " << particleName << "without a Process Manager";
120  G4Exception("F04OpticalPhysics::ConstructProcess()","",
121  FatalException,o.str().c_str());
122  }
123 
124  if(theCerenkovProcess->IsApplicable(*particle)){
125  pManager->AddProcess(theCerenkovProcess);
126  pManager->SetProcessOrdering(theCerenkovProcess,idxPostStep);
127  }
128  if(theScintProcess->IsApplicable(*particle)){
129  pManager->AddProcess(theScintProcess);
130  pManager->SetProcessOrderingToLast(theScintProcess,idxAtRest);
131  pManager->SetProcessOrderingToLast(theScintProcess,idxPostStep);
132  }
133 
134  }
135 }
G4int AddDiscreteProcess(G4VProcess *aProcess, G4int ord=ordDefault)
G4bool IsApplicable(const G4ParticleDefinition &aParticleType)
G4ProcessManager * GetProcessManager() const
void UseTimeProfile(const G4String name)
Definition: G4OpWLS.cc:417
void SetScintillationYieldFactor(const G4double yieldfactor)
const G4String & GetParticleName() const
G4GLOB_DLL std::ostream G4cout
G4int AddProcess(G4VProcess *aProcess, G4int ordAtRestDoIt=ordInActive, G4int ordAlongSteptDoIt=ordInActive, G4int ordPostStepDoIt=ordInActive)
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)
std::vector< G4InuclElementaryParticle >::iterator particleIterator
Definition: G4BigBanger.cc:65
#define G4endl
Definition: G4ios.hh:61
G4ParticleTable::G4PTblDicIterator * GetParticleIterator() const
G4bool IsApplicable(const G4ParticleDefinition &aParticleType)
Definition: G4Cerenkov.cc:135
Here is the call graph for this function:

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