CMS 3D CMS Logo

Public Member Functions | Protected Attributes

LaserOpticalPhysicsList Class Reference

#include <LaserOpticalPhysicsList.h>

List of all members.

Public Member Functions

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

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/12/04 23:53:05
Revision:
1.4
Author:
Maarten Thomas

Definition at line 23 of file LaserOpticalPhysicsList.h.


Constructor & Destructor Documentation

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

constructor

Definition at line 18 of file LaserOpticalPhysicsList.cc.

References gather_cfg::cout.

  :  G4VPhysicsConstructor(name),
     wasActivated(false),
     theScintProcess(), 
     theCerenkovProcess(), 
     theAbsorptionProcess(),
     theRayleighScattering(), 
     theBoundaryProcess(), 
     theWLSProcess()
{
  if (verboseLevel > 0)
    std::cout << "<LaserOpticalPhysicsList::LaserOpticalPhysicsList(...)> entering constructor ..." << std::endl;
}
LaserOpticalPhysicsList::~LaserOpticalPhysicsList ( ) [virtual]

destructor

Definition at line 32 of file LaserOpticalPhysicsList.cc.

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

{
  if (verboseLevel > 0)
    {
      std::cout << "<LaserOpticalPhysicsList::~LaserOpticalPhysicsList()> entering destructor ... " << std::endl;
      std::cout << "  deleting the processes ... ";
    }
  if ( theWLSProcess != 0 )         { delete theWLSProcess; }
  if ( theBoundaryProcess != 0 )    { delete theBoundaryProcess; }
  if ( theRayleighScattering != 0 ) { delete theRayleighScattering; }
  if ( theAbsorptionProcess != 0 )  { delete theAbsorptionProcess; }
//  if ( theCerenkovProcess != 0 )    { delete theCerenkovProcess; }
  if ( theScintProcess != 0 )       { delete theScintProcess; }
  if (verboseLevel > 0)
    std::cout << " done " << std::endl;
}

Member Function Documentation

void LaserOpticalPhysicsList::ConstructParticle ( ) [virtual]

construct Optical Photons

Definition at line 49 of file LaserOpticalPhysicsList.cc.

References gather_cfg::cout.

{
  if (verboseLevel > 0)
    std::cout << "<LaserOpticalPhysicsList::ConstructParticle()>: constructing the optical photon ... " << std::endl;

  // optical photon
  G4OpticalPhoton::OpticalPhotonDefinition();
}
void LaserOpticalPhysicsList::ConstructProcess ( ) [virtual]

construct Optical Processes

Definition at line 58 of file LaserOpticalPhysicsList.cc.

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

{
  if (verboseLevel > 0)
    std::cout << "<LaserOpticalPhysicsList::ConstructProcess()>: constructing the physics ... " << std::endl;

  theScintProcess = new G4Scintillation();
//  theCerenkovProcess=new G4Cerenkov();
  theAbsorptionProcess=new G4OpAbsorption();
  theRayleighScattering=new G4OpRayleigh();
  theBoundaryProcess=new G4OpBoundaryProcess("OpBoundary");
  theWLSProcess=new G4OpWLS();
  
  // set the verbosity level
  theAbsorptionProcess->SetVerboseLevel(verboseLevel);
  theBoundaryProcess->SetVerboseLevel(verboseLevel);

  G4ProcessManager * pManager = 0;
  
  pManager = G4OpticalPhoton::OpticalPhoton()->GetProcessManager();
  pManager->AddDiscreteProcess(theAbsorptionProcess);
  pManager->AddDiscreteProcess(theRayleighScattering);
  theBoundaryProcess->SetModel(unified);
  pManager->AddDiscreteProcess(theBoundaryProcess);
  pManager->AddDiscreteProcess(theWLSProcess);
  
  theScintProcess->SetScintillationYieldFactor(1.);
  theScintProcess->SetScintillationExcitationRatio(0.0);
  theScintProcess->SetTrackSecondariesFirst(true);
  
  theParticleIterator->reset();
  while( (*theParticleIterator)() )
    {
      G4ParticleDefinition* particle = theParticleIterator->value();
      pManager = particle->GetProcessManager();
//      if(theCerenkovProcess->IsApplicable(*particle))
//      {
//        pManager->AddContinuousProcess(theCerenkovProcess);
//      }
      if(theScintProcess->IsApplicable(*particle))
        {
          pManager->AddProcess(theScintProcess);
          pManager->SetProcessOrderingToLast(theScintProcess,idxAtRest);
          pManager->SetProcessOrderingToLast(theScintProcess,idxPostStep);
        }
    }

  wasActivated = true;
}

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().

Definition at line 41 of file LaserOpticalPhysicsList.h.

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().

Definition at line 45 of file LaserOpticalPhysicsList.h.

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

Definition at line 38 of file LaserOpticalPhysicsList.h.

Referenced by ConstructProcess().