CMS 3D CMS Logo

List of all members | Public Member Functions | Protected Attributes
LaserOpticalPhysicsList Class Reference

#include <LaserOpticalPhysicsList.h>

Inheritance diagram for LaserOpticalPhysicsList:

Public Member Functions

virtual void ConstructParticle ()
 construct Optical Photons More...
 
virtual void ConstructProcess ()
 construct Optical Processes More...
 
 LaserOpticalPhysicsList (const G4String &name="optical")
 constructor More...
 
virtual ~LaserOpticalPhysicsList ()
 destructor More...
 

Protected Attributes

G4OpAbsorption * theAbsorptionProcess
 
G4OpBoundaryProcess * theBoundaryProcess
 
G4Cerenkov * theCerenkovProcess
 
G4OpRayleigh * theRayleighScattering
 
G4Scintillation * theScintProcess
 
G4OpWLS * theWLSProcess
 
G4bool wasActivated
 

Detailed Description

Define the Optical processes for the Simulation of the Laser Alignment System

Date
2007/06/11 14:44:28
Revision
1.3
Author
Maarten Thomas

Definition at line 23 of file LaserOpticalPhysicsList.h.

Constructor & Destructor Documentation

LaserOpticalPhysicsList::LaserOpticalPhysicsList ( const G4String &  name = "optical")

constructor

Definition at line 21 of file LaserOpticalPhysicsList.cc.

References gather_cfg::cout.

22  : G4VPhysicsConstructor(name),
23  wasActivated(false),
24  theScintProcess(),
30 {
31  if (verboseLevel > 0)
32  std::cout << "<LaserOpticalPhysicsList::LaserOpticalPhysicsList(...)> entering constructor ..." << std::endl;
33 }
G4OpBoundaryProcess * theBoundaryProcess
G4OpAbsorption * theAbsorptionProcess
LaserOpticalPhysicsList::~LaserOpticalPhysicsList ( )
virtual

destructor

Definition at line 35 of file LaserOpticalPhysicsList.cc.

References gather_cfg::cout, theAbsorptionProcess, theBoundaryProcess, theRayleighScattering, theScintProcess, and theWLSProcess.

36 {
37  if (verboseLevel > 0)
38  {
39  std::cout << "<LaserOpticalPhysicsList::~LaserOpticalPhysicsList()> entering destructor ... " << std::endl;
40  std::cout << " deleting the processes ... ";
41  }
42  if ( theWLSProcess != 0 ) { delete theWLSProcess; }
43  if ( theBoundaryProcess != 0 ) { delete theBoundaryProcess; }
44  if ( theRayleighScattering != 0 ) { delete theRayleighScattering; }
45  if ( theAbsorptionProcess != 0 ) { delete theAbsorptionProcess; }
46  if ( theScintProcess != 0 ) { delete theScintProcess; }
47  if (verboseLevel > 0)
48  std::cout << " done " << std::endl;
49 }
G4OpBoundaryProcess * theBoundaryProcess
G4OpAbsorption * theAbsorptionProcess

Member Function Documentation

void LaserOpticalPhysicsList::ConstructParticle ( )
virtual

construct Optical Photons

Definition at line 51 of file LaserOpticalPhysicsList.cc.

References gather_cfg::cout.

52 {
53  if (verboseLevel > 0)
54  std::cout << "<LaserOpticalPhysicsList::ConstructParticle()>: constructing the optical photon ... " << std::endl;
55 
56  // optical photon
57  G4OpticalPhoton::OpticalPhotonDefinition();
58 }
void LaserOpticalPhysicsList::ConstructProcess ( )
virtual

construct Optical Processes

Definition at line 60 of file LaserOpticalPhysicsList.cc.

References gather_cfg::cout, HiggsValidation_cfi::particleName, EmParticleList::PartNames(), theAbsorptionProcess, theBoundaryProcess, theRayleighScattering, theScintProcess, theWLSProcess, and wasActivated.

61 {
62  if (verboseLevel > 0)
63  std::cout << "<LaserOpticalPhysicsList::ConstructProcess()>: constructing the physics ... " << std::endl;
64 
65  theScintProcess = new G4Scintillation();
66 // theCerenkovProcess=new G4Cerenkov();
67  theAbsorptionProcess=new G4OpAbsorption();
68  theRayleighScattering=new G4OpRayleigh();
69  theBoundaryProcess=new G4OpBoundaryProcess("OpBoundary");
70  theWLSProcess=new G4OpWLS();
71 
72  // set the verbosity level
73  theAbsorptionProcess->SetVerboseLevel(verboseLevel);
74  theBoundaryProcess->SetVerboseLevel(verboseLevel);
75 
76  G4ProcessManager * pManager = 0;
77 
78  pManager = G4OpticalPhoton::OpticalPhoton()->GetProcessManager();
79  pManager->AddDiscreteProcess(theAbsorptionProcess);
80  pManager->AddDiscreteProcess(theRayleighScattering);
81  //theBoundaryProcess->SetModel(unified);
82  pManager->AddDiscreteProcess(theBoundaryProcess);
83  pManager->AddDiscreteProcess(theWLSProcess);
84 
85  theScintProcess->SetScintillationYieldFactor(1.);
86  theScintProcess->SetScintillationExcitationRatio(0.0);
87  theScintProcess->SetTrackSecondariesFirst(true);
88 
89  G4ParticleTable* table = G4ParticleTable::GetParticleTable();
90  EmParticleList emList;
91  for(const auto& particleName : emList.PartNames()) {
92  G4ParticleDefinition* particle = table->FindParticle(particleName);
93  pManager = particle->GetProcessManager();
94  if(theScintProcess->IsApplicable(*particle))
95  {
96  pManager->AddProcess(theScintProcess);
97  pManager->SetProcessOrderingToLast(theScintProcess,idxAtRest);
98  pManager->SetProcessOrderingToLast(theScintProcess,idxPostStep);
99  }
100  }
101 
102  wasActivated = true;
103 }
const std::vector< G4String > & PartNames() const
G4OpBoundaryProcess * theBoundaryProcess
G4OpAbsorption * theAbsorptionProcess

Member Data Documentation

G4OpAbsorption* LaserOpticalPhysicsList::theAbsorptionProcess
protected

Definition at line 42 of file LaserOpticalPhysicsList.h.

Referenced by ConstructProcess(), and ~LaserOpticalPhysicsList().

G4OpBoundaryProcess* LaserOpticalPhysicsList::theBoundaryProcess
protected

Definition at line 44 of file LaserOpticalPhysicsList.h.

Referenced by ConstructProcess(), and ~LaserOpticalPhysicsList().

G4Cerenkov* LaserOpticalPhysicsList::theCerenkovProcess
protected

Definition at line 41 of file LaserOpticalPhysicsList.h.

G4OpRayleigh* LaserOpticalPhysicsList::theRayleighScattering
protected

Definition at line 43 of file LaserOpticalPhysicsList.h.

Referenced by ConstructProcess(), and ~LaserOpticalPhysicsList().

G4Scintillation* LaserOpticalPhysicsList::theScintProcess
protected

Definition at line 40 of file LaserOpticalPhysicsList.h.

Referenced by ConstructProcess(), and ~LaserOpticalPhysicsList().

G4OpWLS* LaserOpticalPhysicsList::theWLSProcess
protected

Definition at line 45 of file LaserOpticalPhysicsList.h.

Referenced by ConstructProcess(), and ~LaserOpticalPhysicsList().

G4bool LaserOpticalPhysicsList::wasActivated
protected

Definition at line 38 of file LaserOpticalPhysicsList.h.

Referenced by ConstructProcess().