]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - TGeant4/TG4PhysicsConstructorOptical.cxx
Common vertex related code moved to base class AliGenerator.
[u/mrichter/AliRoot.git] / TGeant4 / TG4PhysicsConstructorOptical.cxx
index 884ff6044115bf456b9d6ca0e927bd1e2f40af05..1c4481defd8e58d8e1c5df7fdd7c57c2102d7c52 100644 (file)
@@ -1,9 +1,16 @@
 // $Id$
 // Category: physics
 //
+// Author: I. Hrivnacova
+//
+// Class TG4PhysicsConstructorOptical
+// ----------------------------------
+// See the class description in the header file.
 // According to ExN06PhysicsList (geant4 1.1)
 
 #include "TG4PhysicsConstructorOptical.h"
+#include "TG4ProcessControlMap.h"
+#include "TG4ProcessMCMap.h"
 
 #include <G4ParticleDefinition.hh>
 #include <G4ProcessManager.hh>
@@ -30,9 +37,11 @@ TG4PhysicsConstructorOptical::~TG4PhysicsConstructorOptical() {
 //_____________________________________________________________________________
 void TG4PhysicsConstructorOptical::ConstructParticle()
 {
-// The particles are constructed in the 
-// TG4ModularPhysicsList.
+// Instantiates particles.
 // ---
+
+  // optical photon
+  G4OpticalPhoton::OpticalPhotonDefinition();
 }
 
 //_____________________________________________________________________________
@@ -53,10 +62,10 @@ void TG4PhysicsConstructorOptical::ConstructProcess()
   //theRayleighScatteringProcess->DumpPhysicsTable();
 
   // add verbose 
-  //theCerenkovProcess->SetVerboseLevel(1);
-  //theAbsorptionProcess->SetVerboseLevel(1);
-  //theRayleighScatteringProcess->SetVerboseLevel(1);
-  //theBoundaryProcess->SetVerboseLevel(1);
+  theCerenkovProcess->SetVerboseLevel(0);
+  theAbsorptionProcess->SetVerboseLevel(0);
+  theRayleighScatteringProcess->SetVerboseLevel(0);
+  theBoundaryProcess->SetVerboseLevel(0);
 
   G4int maxNumPhotons = 300;
 
@@ -84,6 +93,20 @@ void TG4PhysicsConstructorOptical::ConstructProcess()
     }
   }
 
+  // map to G3 controls
+  TG4ProcessControlMap* controlMap = TG4ProcessControlMap::Instance();
+  controlMap->Add(theCerenkovProcess, kCKOV); 
+  controlMap->Add(theAbsorptionProcess, kLABS); 
+  controlMap->Add(theRayleighScatteringProcess, kRAYL); 
+  controlMap->Add(theBoundaryProcess, kLABS); 
+
+  // map to AliMCProcess codes
+  TG4ProcessMCMap* mcMap = TG4ProcessMCMap::Instance();
+  mcMap->Add(theCerenkovProcess, kPCerenkov); 
+  mcMap->Add(theAbsorptionProcess, kPLightAbsorption); 
+  mcMap->Add(theRayleighScatteringProcess, kPRayleigh); 
+  mcMap->Add(theBoundaryProcess, kPLightScattering); 
+
   if (verboseLevel>0)
     G4cout << "### " << namePhysics << " physics constructed." << G4endl;
 }