00001 // 00002 // ******************************************************************** 00003 // * License and Disclaimer * 00004 // * * 00005 // * The Geant4 software is copyright of the Copyright Holders of * 00006 // * the Geant4 Collaboration. It is provided under the terms and * 00007 // * conditions of the Geant4 Software License, included in the file * 00008 // * LICENSE and available at http://cern.ch/geant4/license . These * 00009 // * include a list of copyright holders. * 00010 // * * 00011 // * Neither the authors of this software system, nor their employing * 00012 // * institutes,nor the agencies providing financial support for this * 00013 // * work make any representation or warranty, express or implied, * 00014 // * regarding this software system or assume any liability for its * 00015 // * use. Please see the license in the file LICENSE and URL above * 00016 // * for the full disclaimer and the limitation of liability. * 00017 // * * 00018 // * This code implementation is the result of the scientific and * 00019 // * technical work of the GEANT4 collaboration. * 00020 // * By using, copying, modifying or distributing the software (or * 00021 // * any work based on the software) you agree to acknowledge its * 00022 // * use in resulting scientific publications, and indicate your * 00023 // * acceptance of all terms of the Geant4 Software license. * 00024 // ******************************************************************** 00025 // 00026 // 00027 // 00028 //--------------------------------------------------------------------------- 00029 // 00030 // ClassName: G4OpticalPhysics 00031 // 00032 // Author: P.Gumplinger 30.09.2009 00033 // 00034 // Modified: P.Gumplinger 29.09.2011 00035 // (based on code from I. Hrivnacova) 00036 // 00037 //---------------------------------------------------------------------------- 00038 // 00039 // This class provides construction of default optical physics 00040 // 00041 00042 #ifndef G4OpticalPhysics_h 00043 #define G4OpticalPhysics_h 1 00044 00045 #include "globals.hh" 00046 00047 #include "G4VPhysicsConstructor.hh" 00048 00049 #include "G4OpticalProcessIndex.hh" 00050 #include "G4OpticalPhysicsMessenger.hh" 00051 00052 #include "G4OpWLS.hh" 00053 #include "G4Scintillation.hh" 00054 #include "G4Cerenkov.hh" 00055 00056 #include "G4OpAbsorption.hh" 00057 #include "G4OpRayleigh.hh" 00058 #include "G4OpMieHG.hh" 00059 #include "G4OpBoundaryProcess.hh" 00060 00061 #include "G4OpticalSurface.hh" 00062 00063 #include <vector> 00064 00065 class G4VProcess; 00066 00067 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 00068 00069 class G4OpticalPhysics : public G4VPhysicsConstructor 00070 { 00071 public: 00072 00073 G4OpticalPhysics(G4int verbose = 0, const G4String& name = "Optical"); 00074 virtual ~G4OpticalPhysics(); 00075 00076 protected: 00077 00078 // construct particle and physics 00079 virtual void ConstructParticle(); 00080 virtual void ConstructProcess(); 00081 00082 private: 00083 00085 G4OpticalPhysics(const G4OpticalPhysics& right); 00087 G4OpticalPhysics& operator=(const G4OpticalPhysics& right); 00088 00089 public: 00090 00091 // configure G4OpticalPhysics builder 00092 void Configure(G4OpticalProcessIndex, G4bool ); 00093 00094 // get methods 00095 virtual G4Scintillation* GetScintillationProcess() 00096 { return fScintillationProcess; } 00097 virtual G4Cerenkov* GetCerenkovProcess() 00098 { return fCerenkovProcess; } 00099 virtual G4OpWLS* GetOpWLSProcess() { return fOpWLSProcess; } 00100 00101 virtual G4OpAbsorption* GetOpAbsorptionProcess() 00102 { return fOpAbsorptionProcess; } 00103 virtual G4OpRayleigh* GetOpRayleighProcess() 00104 { return fOpRayleighScatteringProcess; } 00105 virtual G4OpMieHG* GetOpMieHGProcess() 00106 { return fOpMieHGScatteringProcess; } 00107 virtual G4OpBoundaryProcess* GetOpBoundaryProcess() 00108 { return fOpBoundaryProcess; } 00109 00110 // set methods 00111 void SetProcessVerbose(G4int , G4int ); 00112 00113 void SetMaxNumPhotonsPerStep(G4int ); 00114 void SetMaxBetaChangePerStep(G4double ); 00115 void SetScintillationYieldFactor(G4double ); 00116 void SetScintillationExcitationRatio(G4double ); 00117 00118 void SetWLSTimeProfile(G4String ); 00119 void SetScintillationByParticleType(G4bool ); 00120 void AddScintillationSaturation(G4EmSaturation* ); 00121 00122 void SetTrackSecondariesFirst(G4OpticalProcessIndex, G4bool ); 00123 void SetFiniteRiseTime(G4bool ); 00124 00125 private: 00126 00127 // methods 00128 void PrintStatistics() const; 00129 00130 // data members 00131 00132 G4bool wasActivated; 00133 00134 // messenger 00135 G4OpticalPhysicsMessenger* fMessenger; 00136 00137 // The vector of optical processes 00138 std::vector<G4VProcess*> fProcesses; 00139 00140 // The vector of process configuration 00141 std::vector<G4bool> fProcessUse; 00142 00143 // The vector of process verbose level 00144 std::vector<G4int> fProcessVerbose; 00145 00146 // The vector of track secondaries options; 00147 // the option to track secondaries before finishing their parent track 00148 std::vector<G4bool> fProcessTrackSecondariesFirst; 00149 00150 G4Scintillation* fScintillationProcess; 00151 G4Cerenkov* fCerenkovProcess; 00152 G4OpWLS* fOpWLSProcess; 00153 00154 G4OpAbsorption* fOpAbsorptionProcess; 00155 G4OpRayleigh* fOpRayleighScatteringProcess; 00156 G4OpMieHG* fOpMieHGScatteringProcess; 00157 G4OpBoundaryProcess* fOpBoundaryProcess; 00158 00160 G4int fMaxNumPhotons; 00161 00163 G4double fMaxBetaChange; 00164 00166 G4double fYieldFactor; 00167 00169 G4double fExcitationRatio; 00170 00172 G4String fProfile; 00173 00177 G4bool fFiniteRiseTime; 00178 00182 G4bool fScintillationByParticleType; 00183 00184 }; 00185 00186 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 00187 00188 #endif // G4OpticalPhysics_h