00001 // 00003 // // 00004 // Title: Optical physics for a Linear Collider Detector // 00005 // Date: // 00006 // Author: // 00007 // // 00009 // 00010 00011 #include "LCOpticalPhysics.hh" 00012 00013 // #include "globals.hh" 00014 // #include "G4ios.hh" 00015 // #include <iomanip> 00016 00017 LCOpticalPhysics::LCOpticalPhysics(const G4String& name) 00018 : G4VPhysicsConstructor(name) 00019 { 00020 } 00021 00022 LCOpticalPhysics::~LCOpticalPhysics() 00023 { 00024 } 00025 00026 00027 00028 void LCOpticalPhysics::ConstructParticle() 00029 { 00030 00031 // G4cout << "Inside LCOpticalPhysics::ConstructParticle()" << G4endl; 00032 00033 // optical photon 00034 G4OpticalPhoton::OpticalPhotonDefinition(); 00035 } 00036 00037 void LCOpticalPhysics::ConstructProcess() 00038 { 00039 ConstructOp(); 00040 00041 } 00042 00043 void LCOpticalPhysics::ConstructOp() 00044 { 00045 theCerenkovProcess = new G4Cerenkov("Cerenkov"); 00046 theScintillationProcess = new G4Scintillation("Scintillation"); 00047 theAbsorptionProcess = new G4OpAbsorption(); 00048 theRayleighScatteringProcess = new G4OpRayleigh(); 00049 theBoundaryProcess = new G4OpBoundaryProcess(); 00050 00051 // theCerenkovProcess->DumpPhysicsTable(); 00052 // theScintillationProcess->DumpPhysicsTable(); 00053 // theAbsorptionProcess->DumpPhysicsTable(); 00054 // theRayleighScatteringProcess->DumpPhysicsTable(); 00055 00056 00057 00058 //#ifdef debug 00059 // G4cout << "VERBOSE = " << theCerenkovProcess->GetVerboseLevel() << G4endl; 00060 // G4cout << "Inside LCOpticalPhysics::ConstructOp()" << G4endl; 00061 //#endif 00062 00063 00064 theCerenkovProcess->SetMaxNumPhotonsPerStep(300); 00065 theCerenkovProcess->SetTrackSecondariesFirst(true); 00066 00067 theScintillationProcess->SetScintillationYieldFactor(1.); 00068 theScintillationProcess->SetTrackSecondariesFirst(true); 00069 00070 G4OpticalSurfaceModel themodel = unified; 00071 theBoundaryProcess->SetModel(themodel); 00072 00073 theParticleIterator->reset(); 00074 while( (*theParticleIterator)() ){ 00075 00076 G4ParticleDefinition* particle = theParticleIterator->value(); 00077 G4ProcessManager* pmanager = particle->GetProcessManager(); 00078 G4String particleName = particle->GetParticleName(); 00079 if (theCerenkovProcess->IsApplicable(*particle)) { 00080 //#ifdef debug 00081 //G4cout << "applicable to Cerenkov" << G4endl; 00082 //#endif 00083 pmanager->AddContinuousProcess(theCerenkovProcess); 00084 } 00085 if (theScintillationProcess->IsApplicable(*particle)) { 00086 //#ifdef debug 00087 //G4cout << "applicable to Scintillator" << G4endl; 00088 //#endif 00089 pmanager->AddProcess(theScintillationProcess); 00090 pmanager->SetProcessOrderingToLast(theScintillationProcess, idxAtRest); 00091 pmanager->SetProcessOrderingToLast(theScintillationProcess, idxPostStep); 00092 } 00093 if (particleName == "opticalphoton") { 00094 //#ifdef debug 00095 //G4cout << " AddDiscreteProcess to OpticalPhoton " << G4endl; 00096 //#endif 00097 pmanager->AddDiscreteProcess(theAbsorptionProcess); 00098 pmanager->AddDiscreteProcess(theRayleighScatteringProcess); 00099 pmanager->AddDiscreteProcess(theBoundaryProcess); 00100 } 00101 } 00102 }
1.5.4