[807] | 1 | // |
---|
| 2 | // ******************************************************************** |
---|
| 3 | // * License and Disclaimer * |
---|
| 4 | // * * |
---|
| 5 | // * The Geant4 software is copyright of the Copyright Holders of * |
---|
| 6 | // * the Geant4 Collaboration. It is provided under the terms and * |
---|
| 7 | // * conditions of the Geant4 Software License, included in the file * |
---|
| 8 | // * LICENSE and available at http://cern.ch/geant4/license . These * |
---|
| 9 | // * include a list of copyright holders. * |
---|
| 10 | // * * |
---|
| 11 | // * Neither the authors of this software system, nor their employing * |
---|
| 12 | // * institutes,nor the agencies providing financial support for this * |
---|
| 13 | // * work make any representation or warranty, express or implied, * |
---|
| 14 | // * regarding this software system or assume any liability for its * |
---|
| 15 | // * use. Please see the license in the file LICENSE and URL above * |
---|
| 16 | // * for the full disclaimer and the limitation of liability. * |
---|
| 17 | // * * |
---|
| 18 | // * This code implementation is the result of the scientific and * |
---|
| 19 | // * technical work of the GEANT4 collaboration. * |
---|
| 20 | // * By using, copying, modifying or distributing the software (or * |
---|
| 21 | // * any work based on the software) you agree to acknowledge its * |
---|
| 22 | // * use in resulting scientific publications, and indicate your * |
---|
| 23 | // * acceptance of all terms of the Geant4 Software license. * |
---|
| 24 | // ******************************************************************** |
---|
| 25 | // |
---|
| 26 | #include "LXeOpticalPhysics.hh" |
---|
| 27 | #include "LXeOpPhysMessenger.hh" |
---|
| 28 | |
---|
| 29 | #include "globals.hh" |
---|
| 30 | #include "G4ios.hh" |
---|
| 31 | #include <iomanip> |
---|
| 32 | |
---|
| 33 | #include "G4OpAbsorption.hh" |
---|
| 34 | #include "G4OpRayleigh.hh" |
---|
| 35 | #include "G4OpBoundaryProcess.hh" |
---|
| 36 | #include "G4OpWLS.hh" |
---|
| 37 | |
---|
| 38 | LXeOpticalPhysics::LXeOpticalPhysics(const G4String& name) |
---|
| 39 | : G4VPhysicsConstructor(name) |
---|
| 40 | { |
---|
| 41 | // new LXeOpPhysMessenger(this); |
---|
| 42 | } |
---|
| 43 | |
---|
| 44 | LXeOpticalPhysics::~LXeOpticalPhysics() |
---|
| 45 | { |
---|
| 46 | } |
---|
| 47 | |
---|
| 48 | #include "G4ParticleDefinition.hh" |
---|
| 49 | #include "G4ParticleTable.hh" |
---|
| 50 | |
---|
| 51 | #include "G4OpticalPhoton.hh" |
---|
| 52 | |
---|
| 53 | void LXeOpticalPhysics::ConstructParticle() |
---|
| 54 | { |
---|
| 55 | G4OpticalPhoton::OpticalPhotonDefinition(); |
---|
| 56 | } |
---|
| 57 | |
---|
| 58 | |
---|
| 59 | #include "G4ProcessManager.hh" |
---|
| 60 | |
---|
| 61 | void LXeOpticalPhysics::ConstructProcess() |
---|
| 62 | { |
---|
| 63 | theScintProcess = new G4Scintillation(); |
---|
| 64 | theCerenkovProcess=new G4Cerenkov(); |
---|
| 65 | theAbsorptionProcess=new G4OpAbsorption(); |
---|
| 66 | theRayleighScattering=new G4OpRayleigh(); |
---|
| 67 | theBoundaryProcess=new G4OpBoundaryProcess(); |
---|
| 68 | theWLSProcess=new G4OpWLS(); |
---|
| 69 | |
---|
| 70 | theWLSProcess->UseTimeProfile("delta"); |
---|
| 71 | //theWLSProcess->UseTimeProfile("exponential"); |
---|
| 72 | |
---|
| 73 | G4ProcessManager * pManager = 0; |
---|
| 74 | |
---|
| 75 | pManager = G4OpticalPhoton::OpticalPhoton()->GetProcessManager(); |
---|
| 76 | pManager->AddDiscreteProcess(theAbsorptionProcess); |
---|
| 77 | pManager->AddDiscreteProcess(theRayleighScattering); |
---|
| 78 | theBoundaryProcess->SetModel(unified); |
---|
| 79 | pManager->AddDiscreteProcess(theBoundaryProcess); |
---|
| 80 | pManager->AddDiscreteProcess(theWLSProcess); |
---|
| 81 | |
---|
| 82 | theScintProcess->SetScintillationYieldFactor(1.); |
---|
| 83 | theScintProcess->SetScintillationExcitationRatio(0.0); |
---|
| 84 | theScintProcess->SetTrackSecondariesFirst(true); |
---|
| 85 | |
---|
| 86 | theParticleIterator->reset(); |
---|
| 87 | while( (*theParticleIterator)() ){ |
---|
| 88 | G4ParticleDefinition* particle = theParticleIterator->value(); |
---|
| 89 | pManager = particle->GetProcessManager(); |
---|
| 90 | if(theCerenkovProcess->IsApplicable(*particle)){ |
---|
| 91 | pManager->AddProcess(theCerenkovProcess); |
---|
| 92 | pManager->SetProcessOrdering(theCerenkovProcess,idxPostStep); |
---|
| 93 | } |
---|
| 94 | if(theScintProcess->IsApplicable(*particle)){ |
---|
| 95 | pManager->AddProcess(theScintProcess); |
---|
| 96 | pManager->SetProcessOrderingToLast(theScintProcess,idxAtRest); |
---|
| 97 | pManager->SetProcessOrderingToLast(theScintProcess,idxPostStep); |
---|
| 98 | } |
---|
| 99 | |
---|
| 100 | } |
---|
| 101 | } |
---|
| 102 | |
---|
| 103 | void LXeOpticalPhysics::SetScintYieldFactor(G4double yf){ |
---|
| 104 | if(theScintProcess) |
---|
| 105 | theScintProcess->SetScintillationYieldFactor(yf); |
---|
| 106 | } |
---|
| 107 | |
---|
| 108 | |
---|