00001 /** @file GLG4PMTOpticalModel.hh 00002 Defines a FastSimulationModel class for handling optical photon 00003 interactions with PMT: partial reflection, transmission, absorption, 00004 and hit generation. 00005 00006 This file is part of the GenericLAND software library. 00007 $Id: GLG4PMTOpticalModel.hh,v 1.3 2005/03/29 19:58:06 GLG4sim Exp $ 00008 00009 @author Glenn Horton-Smith, March 20, 2001. 00010 @author Dario Motta, Feb. 23 2005: Formalism light interaction with photocathode. 00011 */ 00012 00013 #ifndef __GLG4PMTOpticalModel_hh__ 00014 #define __GLG4PMTOpticalModel_hh__ 00015 00016 #include "G4VFastSimulationModel.hh" 00017 #include "G4MaterialPropertyVector.hh" 00018 #include "G4VPhysicalVolume.hh" 00019 #include "G4UImessenger.hh" 00020 00021 class G4UIcommand; 00022 class G4UIdirectory; 00023 00024 class GLG4PMTOpticalModel : public G4VFastSimulationModel, 00025 public G4UImessenger 00026 { 00027 public: 00028 //------------------------- 00029 // Constructor, destructor 00030 //------------------------- 00031 GLG4PMTOpticalModel (G4String, G4VPhysicalVolume*); 00032 // Note: There is no GLG4PMTOpticalModel(G4String) constructor. 00033 ~GLG4PMTOpticalModel (); 00034 00035 //------------------------------ 00036 // Virtual methods of the base 00037 // class to be coded by the user 00038 //------------------------------ 00039 00040 G4bool IsApplicable(const G4ParticleDefinition&); 00041 G4bool ModelTrigger(const G4FastTrack &); 00042 void DoIt(const G4FastTrack&, G4FastStep&); 00043 00044 // following two methods are for G4UImessenger 00045 void SetNewValue(G4UIcommand * command,G4String newValues); 00046 G4String GetCurrentValue(G4UIcommand * command); 00047 00048 private: 00049 // material property vector pointers, initialized in constructor, 00050 // so we don't have to look them up every time DoIt is called. 00051 G4MaterialPropertyVector * _rindex_glass; // function of photon energy 00052 G4MaterialPropertyVector * _rindex_photocathode; // function of photon energy 00053 G4MaterialPropertyVector * _kindex_photocathode; // n~ = n+ik, as in M.D.Lay 00054 G4MaterialPropertyVector * _efficiency_photocathode; // necessary? 00055 G4MaterialPropertyVector * _thickness_photocathode; // function of Z (mm) 00056 // interior solid (vacuum), also initialized in constructor, 00057 // so we don't have to look it up each time DoIt is called. 00058 // Note it is implicitly assumed everywhere in the code that this solid 00059 // is vacuum-filled and placed in the body with no offset or rotation. 00060 G4VSolid * _inner1_solid; 00061 G4VPhysicalVolume * _inner1_phys; 00062 00063 // "luxury level" -- how fancy should the optical model be? 00064 G4int _luxlevel; 00065 00066 // verbose level -- how verbose to be (diagnostics and such) 00067 G4int _verbosity; 00068 00069 // directory for commands 00070 static G4UIdirectory* fgCmdDir; 00071 00072 // "current values" of many parameters, for efficiency 00073 // [I claim it is quicker to access these than to 00074 // push them on the stack when calling CalculateCoefficients, Reflect, etc.] 00075 // The following are set by DoIt() prior to any CalculateCoefficients() call. 00076 G4double _photon_energy; // energy of current photon 00077 G4double _wavelength; // wavelength of current photon 00078 G4double _n1; // index of refraction of curr. medium at wavelength 00079 G4double _n2, _k2; // index of refraction of photocathode at wavelength 00080 G4double _n3; // index of refraction of far side at wavelength 00081 G4double _efficiency; // efficiency of photocathode at wavelength (?) 00082 G4double _thickness; // thickness of photocathode at current position 00083 G4double _cos_theta1; // cosine of angle of incidence 00084 // The following are set by CalculateCoefficients() 00085 // and used by DoIt(), Refract(), and Reflect(): 00086 G4double _sin_theta1; // sine of angle of incidence 00087 G4double _sin_theta3; // sine of angle of refraction 00088 G4double _cos_theta3; // cosine of angle of refraction 00089 G4double fR_s; // reflection coefficient for s-polarized light 00090 G4double fT_s; // transmission coefficient for s-polarized light 00091 G4double fR_p; // reflection coefficient for p-polarized light 00092 G4double fT_p; // transmission coefficient for p-polarized light 00093 G4double fR_n; // reference for fR_s/p at normal incidence 00094 G4double fT_n; // reference for fT_s/p at normal incidence 00095 00096 // private methods 00097 void CalculateCoefficients(); // calculate and set fR_s, etc. 00098 void Reflect(G4ThreeVector &dir, G4ThreeVector &pol, G4ThreeVector &norm); 00099 void Refract(G4ThreeVector &dir, G4ThreeVector &pol, G4ThreeVector &norm); 00100 }; 00101 00102 #endif