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

void ConstructParticle () override
 construct Optical Photons More...
 
void ConstructProcess () override
 construct Optical Processes More...
 
 LaserOpticalPhysicsList (const G4String &name="optical")
 constructor More...
 
 ~LaserOpticalPhysicsList () override
 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 24 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, and HFPhase1Reconstructor_cfi::verboseLevel.

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

destructor

Definition at line 36 of file LaserOpticalPhysicsList.cc.

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

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

Member Function Documentation

void LaserOpticalPhysicsList::ConstructParticle ( )
override

construct Optical Photons

Definition at line 62 of file LaserOpticalPhysicsList.cc.

References gather_cfg::cout, and HFPhase1Reconstructor_cfi::verboseLevel.

62  {
63  if (verboseLevel > 0)
64  std::cout << "<LaserOpticalPhysicsList::ConstructParticle()>: constructing "
65  "the optical photon ... "
66  << std::endl;
67 
68  // optical photon
69  G4OpticalPhoton::OpticalPhotonDefinition();
70 }
void LaserOpticalPhysicsList::ConstructProcess ( )
override

construct Optical Processes

Definition at line 72 of file LaserOpticalPhysicsList.cc.

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

72  {
73  if (verboseLevel > 0)
74  std::cout << "<LaserOpticalPhysicsList::ConstructProcess()>: constructing "
75  "the physics ... "
76  << std::endl;
77 
78  theScintProcess = new G4Scintillation();
79  // theCerenkovProcess=new G4Cerenkov();
80  theAbsorptionProcess = new G4OpAbsorption();
81  theRayleighScattering = new G4OpRayleigh();
82  theBoundaryProcess = new G4OpBoundaryProcess("OpBoundary");
83  theWLSProcess = new G4OpWLS();
84 
85  // set the verbosity level
86  theAbsorptionProcess->SetVerboseLevel(verboseLevel);
87  theBoundaryProcess->SetVerboseLevel(verboseLevel);
88 
89  G4ProcessManager *pManager = nullptr;
90 
91  pManager = G4OpticalPhoton::OpticalPhoton()->GetProcessManager();
92  pManager->AddDiscreteProcess(theAbsorptionProcess);
93  pManager->AddDiscreteProcess(theRayleighScattering);
94  // theBoundaryProcess->SetModel(unified);
95  pManager->AddDiscreteProcess(theBoundaryProcess);
96  pManager->AddDiscreteProcess(theWLSProcess);
97 
98  theScintProcess->SetScintillationYieldFactor(1.);
99  theScintProcess->SetScintillationExcitationRatio(0.0);
100  theScintProcess->SetTrackSecondariesFirst(true);
101 
102  G4ParticleTable *table = G4ParticleTable::GetParticleTable();
103  EmParticleList emList;
104  for (const auto &particleName : emList.PartNames()) {
105  G4ParticleDefinition *particle = table->FindParticle(particleName);
106  pManager = particle->GetProcessManager();
107  if (theScintProcess->IsApplicable(*particle)) {
108  pManager->AddProcess(theScintProcess);
109  pManager->SetProcessOrderingToLast(theScintProcess, idxAtRest);
110  pManager->SetProcessOrderingToLast(theScintProcess, idxPostStep);
111  }
112  }
113 
114  wasActivated = true;
115 }
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().