14 #ifndef __GLG4PMTOpticalModel_hh__
15 #define __GLG4PMTOpticalModel_hh__
22 #include "G4LogicalBorderSurface.hh"
23 #include "G4LogicalVolume.hh"
24 #include "G4MaterialPropertyVector.hh"
25 #include "G4OpticalSurface.hh"
26 #include "G4UImessenger.hh"
27 #include "G4VFastSimulationModel.hh"
33 G4complex carcsin(G4complex theta);
34 G4complex gfunc(G4complex ni, G4complex nj, G4complex ti, G4complex tj);
35 G4complex rfunc(G4complex ni, G4complex nj, G4complex ti, G4complex tj);
36 G4complex trfunc(G4complex ni, G4complex nj, G4complex ti, G4complex tj, G4complex tk);
45 GLG4PMTOpticalModel(G4String, G4Region *, G4LogicalVolume *body, G4OpticalSurface *op_surface,
46 double efficiency_correction = 1.0,
double dynodeTop = 0.0,
double dynodeRadius = 0.0,
47 double prepulseProb = 0.0,
double photocathode_MINrho = 0.0,
double photocathode_MAXrho = 0.0);
56 G4bool IsApplicable(
const G4ParticleDefinition &);
57 G4bool ModelTrigger(
const G4FastTrack &);
58 void DoIt(
const G4FastTrack &, G4FastStep &);
61 void SetNewValue(G4UIcommand *command, G4String newValues);
62 G4String GetCurrentValue(G4UIcommand *command);
64 void SetEfficiencyCorrection(std::map<int, double> _EffiCorr) {
65 EfficiencyCorrection = _EffiCorr;
66 RAT::info << GetName() <<
": Individual efficiency correction table set" << newline;
68 void DumpEfficiencyCorrectionTable() {
69 RAT::info <<
"Individual correction table for the PMT efficiencies of " << GetName() <<
":\nPMT ID corr. factor"
71 for (std::map<int, double>::iterator iter = EfficiencyCorrection.begin(); iter != EfficiencyCorrection.end();
73 RAT::info << iter->first <<
"," << iter->second << newline;
76 void fillPMTVector(
double code,
double A,
double An,
double T,
double R,
double collection_eff,
double N_pe,
double x,
77 double y,
double z,
double gx,
double gy,
double gz,
double wavelength,
double time) {
78 pmtHitVectorIndex.push_back(code);
79 pmtHitVectorIndex.push_back(A);
80 pmtHitVectorIndex.push_back(An);
81 pmtHitVectorIndex.push_back(T);
82 pmtHitVectorIndex.push_back(R);
83 pmtHitVectorIndex.push_back(collection_eff);
84 pmtHitVectorIndex.push_back(N_pe);
85 pmtHitVectorIndex.push_back(x);
86 pmtHitVectorIndex.push_back(y);
87 pmtHitVectorIndex.push_back(z);
88 pmtHitVectorIndex.push_back(gx);
89 pmtHitVectorIndex.push_back(gy);
90 pmtHitVectorIndex.push_back(gz);
91 pmtHitVectorIndex.push_back(wavelength);
92 pmtHitVectorIndex.push_back(time);
93 pmtHitVector.push_back(pmtHitVectorIndex);
94 pmtHitVectorIndex.resize(0);
96 std::vector<std::vector<double>> GetPMTVector() {
return pmtHitVector; }
97 static std::vector<std::vector<double>> pmtHitVector;
102 G4MaterialPropertyVector *_rindex_glass;
103 G4MaterialPropertyVector *_rindex_photocathode;
104 G4MaterialPropertyVector *_kindex_photocathode;
105 G4MaterialPropertyVector *_efficiency_photocathode;
106 G4MaterialPropertyVector *_thickness_photocathode;
111 G4VSolid *_inner1_solid;
112 G4VPhysicalVolume *_inner1_phys, *_inner2_phys, *_central_gap_phys;
121 G4double _photocathode_MINrho;
122 G4double _photocathode_MAXrho;
123 G4double _efficiency_correction;
125 G4double _dynodeRadius;
126 G4double _prepulseProb;
128 G4bool _applyCorrection;
134 static G4UIdirectory *fgCmdDir;
140 G4double _photon_energy;
141 G4double _wavelength;
145 G4double _efficiency;
147 G4double _cos_theta1;
150 G4double _sin_theta1;
151 G4double _sin_theta3;
152 G4double _cos_theta3;
161 void CalculateCoefficients();
162 void Reflect(G4ThreeVector &dir, G4ThreeVector &pol, G4ThreeVector &norm);
163 void Refract(G4ThreeVector &dir, G4ThreeVector &pol, G4ThreeVector &norm);
164 int GetPMTID(
const G4FastTrack &fastTrack);
166 static double surfaceTolerance;
168 std::map<int, double> EfficiencyCorrection;
169 std::vector<double> pmtHitVectorIndex;
Definition: GLG4PMTOpticalModel.hh:38