Geant4 Cross Reference

Cross-Referencing   Geant4
Geant4/examples/extended/optical/LXe/src/LXeMainVolume.cc

Version: [ ReleaseNotes ] [ 1.0 ] [ 1.1 ] [ 2.0 ] [ 3.0 ] [ 3.1 ] [ 3.2 ] [ 4.0 ] [ 4.0.p1 ] [ 4.0.p2 ] [ 4.1 ] [ 4.1.p1 ] [ 5.0 ] [ 5.0.p1 ] [ 5.1 ] [ 5.1.p1 ] [ 5.2 ] [ 5.2.p1 ] [ 5.2.p2 ] [ 6.0 ] [ 6.0.p1 ] [ 6.1 ] [ 6.2 ] [ 6.2.p1 ] [ 6.2.p2 ] [ 7.0 ] [ 7.0.p1 ] [ 7.1 ] [ 7.1.p1 ] [ 8.0 ] [ 8.0.p1 ] [ 8.1 ] [ 8.1.p1 ] [ 8.1.p2 ] [ 8.2 ] [ 8.2.p1 ] [ 8.3 ] [ 8.3.p1 ] [ 8.3.p2 ] [ 9.0 ] [ 9.0.p1 ] [ 9.0.p2 ] [ 9.1 ] [ 9.1.p1 ] [ 9.1.p2 ] [ 9.1.p3 ] [ 9.2 ] [ 9.2.p1 ] [ 9.2.p2 ] [ 9.2.p3 ] [ 9.2.p4 ] [ 9.3 ] [ 9.3.p1 ] [ 9.3.p2 ] [ 9.4 ] [ 9.4.p1 ] [ 9.4.p2 ] [ 9.4.p3 ] [ 9.4.p4 ] [ 9.5 ] [ 9.5.p1 ] [ 9.5.p2 ] [ 9.6 ] [ 9.6.p1 ] [ 9.6.p2 ] [ 9.6.p3 ] [ 9.6.p4 ] [ 10.0 ] [ 10.0.p1 ] [ 10.0.p2 ] [ 10.0.p3 ] [ 10.0.p4 ] [ 10.1 ] [ 10.1.p1 ] [ 10.1.p2 ] [ 10.1.p3 ] [ 10.2 ] [ 10.2.p1 ] [ 10.2.p2 ] [ 10.2.p3 ] [ 10.3 ] [ 10.3.p1 ] [ 10.3.p2 ] [ 10.3.p3 ] [ 10.4 ] [ 10.4.p1 ] [ 10.4.p2 ] [ 10.4.p3 ] [ 10.5 ] [ 10.5.p1 ] [ 10.6 ] [ 10.6.p1 ] [ 10.6.p2 ] [ 10.6.p3 ] [ 10.7 ] [ 10.7.p1 ] [ 10.7.p2 ] [ 10.7.p3 ] [ 10.7.p4 ] [ 11.0 ] [ 11.0.p1 ] [ 11.0.p2 ] [ 11.0.p3, ] [ 11.0.p4 ] [ 11.1 ] [ 11.1.1 ] [ 11.1.2 ] [ 11.1.3 ] [ 11.2 ] [ 11.2.1 ] [ 11.2.2 ] [ 11.3.0 ]

Diff markup

Differences between /examples/extended/optical/LXe/src/LXeMainVolume.cc (Version 11.3.0) and /examples/extended/optical/LXe/src/LXeMainVolume.cc (Version 10.7)


  1 //                                                  1 //
  2 // *******************************************      2 // ********************************************************************
  3 // * License and Disclaimer                         3 // * License and Disclaimer                                           *
  4 // *                                                4 // *                                                                  *
  5 // * The  Geant4 software  is  copyright of th      5 // * The  Geant4 software  is  copyright of the Copyright Holders  of *
  6 // * the Geant4 Collaboration.  It is provided      6 // * the Geant4 Collaboration.  It is provided  under  the terms  and *
  7 // * conditions of the Geant4 Software License      7 // * conditions of the Geant4 Software License,  included in the file *
  8 // * LICENSE and available at  http://cern.ch/      8 // * LICENSE and available at  http://cern.ch/geant4/license .  These *
  9 // * include a list of copyright holders.           9 // * include a list of copyright holders.                             *
 10 // *                                               10 // *                                                                  *
 11 // * Neither the authors of this software syst     11 // * Neither the authors of this software system, nor their employing *
 12 // * institutes,nor the agencies providing fin     12 // * institutes,nor the agencies providing financial support for this *
 13 // * work  make  any representation or  warran     13 // * work  make  any representation or  warranty, express or implied, *
 14 // * regarding  this  software system or assum     14 // * regarding  this  software system or assume any liability for its *
 15 // * use.  Please see the license in the file      15 // * use.  Please see the license in the file  LICENSE  and URL above *
 16 // * for the full disclaimer and the limitatio     16 // * for the full disclaimer and the limitation of liability.         *
 17 // *                                               17 // *                                                                  *
 18 // * This  code  implementation is the result      18 // * This  code  implementation is the result of  the  scientific and *
 19 // * technical work of the GEANT4 collaboratio     19 // * technical work of the GEANT4 collaboration.                      *
 20 // * By using,  copying,  modifying or  distri     20 // * By using,  copying,  modifying or  distributing the software (or *
 21 // * any work based  on the software)  you  ag     21 // * any work based  on the software)  you  agree  to acknowledge its *
 22 // * use  in  resulting  scientific  publicati     22 // * use  in  resulting  scientific  publications,  and indicate your *
 23 // * acceptance of all terms of the Geant4 Sof     23 // * acceptance of all terms of the Geant4 Software license.          *
 24 // *******************************************     24 // ********************************************************************
 25 //                                                 25 //
 26 //                                                 26 //
 27 /// \file optical/LXe/src/LXeMainVolume.cc         27 /// \file optical/LXe/src/LXeMainVolume.cc
 28 /// \brief Implementation of the LXeMainVolume     28 /// \brief Implementation of the LXeMainVolume class
 29 //                                                 29 //
 30 //                                                 30 //
 31 #include "LXeMainVolume.hh"                        31 #include "LXeMainVolume.hh"
 32                                                    32 
                                                   >>  33 #include "globals.hh"
 33 #include "G4Box.hh"                                34 #include "G4Box.hh"
 34 #include "G4Colour.hh"                             35 #include "G4Colour.hh"
 35 #include "G4LogicalBorderSurface.hh"           << 
 36 #include "G4LogicalSkinSurface.hh"                 36 #include "G4LogicalSkinSurface.hh"
                                                   >>  37 #include "G4LogicalBorderSurface.hh"
 37 #include "G4LogicalVolume.hh"                      38 #include "G4LogicalVolume.hh"
 38 #include "G4Material.hh"                           39 #include "G4Material.hh"
 39 #include "G4MaterialPropertiesTable.hh"            40 #include "G4MaterialPropertiesTable.hh"
 40 #include "G4OpticalSurface.hh"                     41 #include "G4OpticalSurface.hh"
 41 #include "G4Sphere.hh"                             42 #include "G4Sphere.hh"
 42 #include "G4SystemOfUnits.hh"                      43 #include "G4SystemOfUnits.hh"
 43 #include "G4Tubs.hh"                               44 #include "G4Tubs.hh"
 44 #include "G4VisAttributes.hh"                      45 #include "G4VisAttributes.hh"
 45 #include "globals.hh"                          << 
 46                                                    46 
 47 //....oooOO0OOooo........oooOO0OOooo........oo     47 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
 48                                                    48 
 49 LXeMainVolume::LXeMainVolume(G4RotationMatrix*     49 LXeMainVolume::LXeMainVolume(G4RotationMatrix* pRot, const G4ThreeVector& tlate,
 50                              G4LogicalVolume*  <<  50                              G4LogicalVolume* pMotherLogical, G4bool pMany,
 51                              LXeDetectorConstr <<  51                              G4int pCopyNo, LXeDetectorConstruction* c)
 52   // Pass info to the G4PVPlacement constructo     52   // Pass info to the G4PVPlacement constructor
 53   : G4PVPlacement(                             <<  53   : G4PVPlacement(pRot, tlate,
 54       pRot, tlate,                             <<  54                   // Temp logical volume must be created here
 55       // Temp logical volume must be created h <<  55                   new G4LogicalVolume(new G4Box("temp", 1, 1, 1),
 56       new G4LogicalVolume(new G4Box("temp", 1, <<  56                                       G4Material::GetMaterial("Vacuum"), "temp",
 57       "housing", pMotherLogical, pMany, pCopyN <<  57                                       0, 0, 0),
 58     fConstructor(c)                            <<  58                   "housing", pMotherLogical, pMany, pCopyNo)
                                                   >>  59   , fConstructor(c)
 59 {                                                  60 {
 60   CopyValues();                                    61   CopyValues();
 61                                                    62 
 62   G4double housing_x = fScint_x + 2. * fD_mtl;     63   G4double housing_x = fScint_x + 2. * fD_mtl;
 63   G4double housing_y = fScint_y + 2. * fD_mtl;     64   G4double housing_y = fScint_y + 2. * fD_mtl;
 64   G4double housing_z = fScint_z + 2. * fD_mtl;     65   G4double housing_z = fScint_z + 2. * fD_mtl;
 65                                                    66 
 66   //*************************** housing and sc     67   //*************************** housing and scintillator
 67   fScint_box = new G4Box("scint_box", fScint_x <<  68   fScint_box =
 68   fHousing_box = new G4Box("housing_box", hous <<  69     new G4Box("scint_box", fScint_x / 2., fScint_y / 2., fScint_z / 2.);
 69                                                <<  70   fHousing_box =
 70   fScint_log = new G4LogicalVolume(fScint_box, <<  71     new G4Box("housing_box", housing_x / 2., housing_y / 2., housing_z / 2.);
 71   fHousing_log = new G4LogicalVolume(fHousing_ <<  72 
                                                   >>  73   fScint_log   = new G4LogicalVolume(fScint_box, G4Material::GetMaterial("LXe"),
                                                   >>  74                                    "scint_log", 0, 0, 0);
                                                   >>  75   fHousing_log = new G4LogicalVolume(
                                                   >>  76     fHousing_box, G4Material::GetMaterial("Al"), "housing_log", 0, 0, 0);
 72                                                    77 
 73   new G4PVPlacement(nullptr, G4ThreeVector(),  <<  78   new G4PVPlacement(0, G4ThreeVector(), fScint_log, "scintillator",
                                                   >>  79                     fHousing_log, false, 0);
 74                                                    80 
 75   //*************** Miscellaneous sphere to de     81   //*************** Miscellaneous sphere to demonstrate skin surfaces
 76   fSphere = new G4Sphere("sphere", 0., 2. * cm <<  82   fSphere = new G4Sphere("sphere", 0., 2. * cm, 0. * deg, 360. * deg, 0. * deg,
 77   fSphere_log = new G4LogicalVolume(fSphere, G <<  83                          360. * deg);
 78   if (fSphereOn)                               <<  84   fSphere_log =
 79     new G4PVPlacement(nullptr, G4ThreeVector(5 <<  85     new G4LogicalVolume(fSphere, G4Material::GetMaterial("Al"), "sphere_log");
 80                       fScint_log, false, 0);   <<  86   if(fSphereOn)
                                                   >>  87     new G4PVPlacement(0, G4ThreeVector(5. * cm, 5. * cm, 5. * cm), fSphere_log,
                                                   >>  88                       "sphere", fScint_log, false, 0);
 81                                                    89 
 82   //****************** Build PMTs                  90   //****************** Build PMTs
 83   G4double innerRadius_pmt = 0.;               <<  91   G4double innerRadius_pmt   = 0.;
 84   G4double height_pmt = fD_mtl / 2.;           <<  92   G4double height_pmt        = fD_mtl / 2.;
 85   G4double startAngle_pmt = 0.;                <<  93   G4double startAngle_pmt    = 0.;
 86   G4double spanningAngle_pmt = 360. * deg;         94   G4double spanningAngle_pmt = 360. * deg;
 87                                                    95 
 88   fPmt = new G4Tubs("pmt_tube", innerRadius_pm <<  96   fPmt = new G4Tubs("pmt_tube", innerRadius_pmt, fOuterRadius_pmt, height_pmt,
 89                     spanningAngle_pmt);        <<  97                     startAngle_pmt, spanningAngle_pmt);
 90                                                    98 
 91   // the "photocathode" is a metal slab at the     99   // the "photocathode" is a metal slab at the back of the glass that
 92   // is only a very rough approximation of the    100   // is only a very rough approximation of the real thing since it only
 93   // absorbs or detects the photons based on t    101   // absorbs or detects the photons based on the efficiency set below
 94   fPhotocath = new G4Tubs("photocath_tube", in << 102   fPhotocath = new G4Tubs("photocath_tube", innerRadius_pmt, fOuterRadius_pmt,
 95                           startAngle_pmt, span << 103                           height_pmt / 2., startAngle_pmt, spanningAngle_pmt);
 96                                                   104 
 97   fPmt_log = new G4LogicalVolume(fPmt, G4Mater << 105   fPmt_log =
 98   fPhotocath_log = new G4LogicalVolume(fPhotoc << 106     new G4LogicalVolume(fPmt, G4Material::GetMaterial("Glass"), "pmt_log");
                                                   >> 107   fPhotocath_log = new G4LogicalVolume(
                                                   >> 108     fPhotocath, G4Material::GetMaterial("Al"), "photocath_log");
 99                                                   109 
100   new G4PVPlacement(nullptr, G4ThreeVector(0., << 110   new G4PVPlacement(0, G4ThreeVector(0., 0., -height_pmt / 2.), fPhotocath_log,
101                     fPmt_log, false, 0);       << 111                     "photocath", fPmt_log, false, 0);
102                                                   112 
103   //***********Arrange pmts around the outside    113   //***********Arrange pmts around the outside of housing**********
104                                                   114 
105   G4double dx = fScint_x / fNx;                   115   G4double dx = fScint_x / fNx;
106   G4double dy = fScint_y / fNy;                   116   G4double dy = fScint_y / fNy;
107   G4double dz = fScint_z / fNz;                   117   G4double dz = fScint_z / fNz;
108                                                   118 
109   G4double x, y, z;                               119   G4double x, y, z;
110   G4double xmin = -fScint_x / 2. - dx / 2.;       120   G4double xmin = -fScint_x / 2. - dx / 2.;
111   G4double ymin = -fScint_y / 2. - dy / 2.;       121   G4double ymin = -fScint_y / 2. - dy / 2.;
112   G4double zmin = -fScint_z / 2. - dz / 2.;       122   G4double zmin = -fScint_z / 2. - dz / 2.;
113   G4int k = 0;                                 << 123   G4int k       = 0;
114                                                   124 
115   z = -fScint_z / 2. - height_pmt;  // front      125   z = -fScint_z / 2. - height_pmt;  // front
116   PlacePMTs(fPmt_log, nullptr, x, y, dx, dy, x    126   PlacePMTs(fPmt_log, nullptr, x, y, dx, dy, xmin, ymin, fNx, fNy, x, y, z, k);
117                                                   127 
118   auto rm_z = new G4RotationMatrix();          << 128   G4RotationMatrix* rm_z = new G4RotationMatrix();
119   rm_z->rotateY(180. * deg);                      129   rm_z->rotateY(180. * deg);
120   z = fScint_z / 2. + height_pmt;  // back        130   z = fScint_z / 2. + height_pmt;  // back
121   PlacePMTs(fPmt_log, rm_z, x, y, dx, dy, xmin    131   PlacePMTs(fPmt_log, rm_z, x, y, dx, dy, xmin, ymin, fNx, fNy, x, y, z, k);
122                                                   132 
123   auto rm_y1 = new G4RotationMatrix();         << 133   G4RotationMatrix* rm_y1 = new G4RotationMatrix();
124   rm_y1->rotateY(-90. * deg);                     134   rm_y1->rotateY(-90. * deg);
125   x = -fScint_x / 2. - height_pmt;  // left       135   x = -fScint_x / 2. - height_pmt;  // left
126   PlacePMTs(fPmt_log, rm_y1, y, z, dy, dz, ymi    136   PlacePMTs(fPmt_log, rm_y1, y, z, dy, dz, ymin, zmin, fNy, fNz, x, y, z, k);
127                                                   137 
128   auto rm_y2 = new G4RotationMatrix();         << 138   G4RotationMatrix* rm_y2 = new G4RotationMatrix();
129   rm_y2->rotateY(90. * deg);                      139   rm_y2->rotateY(90. * deg);
130   x = fScint_x / 2. + height_pmt;  // right       140   x = fScint_x / 2. + height_pmt;  // right
131   PlacePMTs(fPmt_log, rm_y2, y, z, dy, dz, ymi    141   PlacePMTs(fPmt_log, rm_y2, y, z, dy, dz, ymin, zmin, fNy, fNz, x, y, z, k);
132                                                   142 
133   auto rm_x1 = new G4RotationMatrix();         << 143   G4RotationMatrix* rm_x1 = new G4RotationMatrix();
134   rm_x1->rotateX(90. * deg);                      144   rm_x1->rotateX(90. * deg);
135   y = -fScint_y / 2. - height_pmt;  // bottom     145   y = -fScint_y / 2. - height_pmt;  // bottom
136   PlacePMTs(fPmt_log, rm_x1, x, z, dx, dz, xmi    146   PlacePMTs(fPmt_log, rm_x1, x, z, dx, dz, xmin, zmin, fNx, fNz, x, y, z, k);
137                                                   147 
138   auto rm_x2 = new G4RotationMatrix();         << 148   G4RotationMatrix* rm_x2 = new G4RotationMatrix();
139   rm_x2->rotateX(-90. * deg);                     149   rm_x2->rotateX(-90. * deg);
140   y = fScint_y / 2. + height_pmt;  // top         150   y = fScint_y / 2. + height_pmt;  // top
141   PlacePMTs(fPmt_log, rm_x2, x, z, dx, dz, xmi    151   PlacePMTs(fPmt_log, rm_x2, x, z, dx, dz, xmin, zmin, fNx, fNz, x, y, z, k);
142                                                   152 
143   VisAttributes();                                153   VisAttributes();
144   SurfaceProperties();                            154   SurfaceProperties();
145                                                   155 
146   SetLogicalVolume(fHousing_log);                 156   SetLogicalVolume(fHousing_log);
147 }                                                 157 }
148                                                   158 
149 //....oooOO0OOooo........oooOO0OOooo........oo    159 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
150                                                   160 
151 void LXeMainVolume::CopyValues()                  161 void LXeMainVolume::CopyValues()
152 {                                                 162 {
153   fScint_x = fConstructor->GetScintX();        << 163   fScint_x         = fConstructor->GetScintX();
154   fScint_y = fConstructor->GetScintY();        << 164   fScint_y         = fConstructor->GetScintY();
155   fScint_z = fConstructor->GetScintZ();        << 165   fScint_z         = fConstructor->GetScintZ();
156   fD_mtl = fConstructor->GetHousingThickness() << 166   fD_mtl           = fConstructor->GetHousingThickness();
157   fNx = fConstructor->GetNX();                 << 167   fNx              = fConstructor->GetNX();
158   fNy = fConstructor->GetNY();                 << 168   fNy              = fConstructor->GetNY();
159   fNz = fConstructor->GetNZ();                 << 169   fNz              = fConstructor->GetNZ();
160   fOuterRadius_pmt = fConstructor->GetPMTRadiu    170   fOuterRadius_pmt = fConstructor->GetPMTRadius();
161   fSphereOn = fConstructor->GetSphereOn();     << 171   fSphereOn        = fConstructor->GetSphereOn();
162   fRefl = fConstructor->GetHousingReflectivity << 172   fRefl            = fConstructor->GetHousingReflectivity();
163 }                                                 173 }
164                                                   174 
165 //....oooOO0OOooo........oooOO0OOooo........oo    175 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
166                                                   176 
167 void LXeMainVolume::PlacePMTs(G4LogicalVolume* << 177 void LXeMainVolume::PlacePMTs(G4LogicalVolume* pmt_log, G4RotationMatrix* rot,
168                               G4double& b, G4d << 178                               G4double& a, G4double& b, G4double da,
169                               G4int na, G4int  << 179                               G4double db, G4double amin, G4double bmin,
                                                   >> 180                               G4int na, G4int nb, G4double& x, G4double& y,
                                                   >> 181                               G4double& z, G4int& k)
170 {                                                 182 {
171   /*  PlacePMTs : a different way to parameter    183   /*  PlacePMTs : a different way to parameterize placement that does not depend
172    * on calculating the position from the copy    184    * on calculating the position from the copy number
173    *                                              185    *
174    *  pmt_log = logical volume for pmts to be     186    *  pmt_log = logical volume for pmts to be placed
175    *  rot = rotation matrix to apply              187    *  rot = rotation matrix to apply
176    *  a,b = coordinates to vary(ie. if varying    188    *  a,b = coordinates to vary(ie. if varying in the xy plane then pass x,y)
177    *  da,db = value to increment a,b by           189    *  da,db = value to increment a,b by
178    *  amin,bmin = start values for a,b            190    *  amin,bmin = start values for a,b
179    *  na,nb = number of repitions in a and b      191    *  na,nb = number of repitions in a and b
180    *  x,y,z = just pass x,y, and z by referenc    192    *  x,y,z = just pass x,y, and z by reference (the same ones passed for a,b)
181    *  k = copy number to start with               193    *  k = copy number to start with
182    *  sd = sensitive detector for pmts            194    *  sd = sensitive detector for pmts
183    */                                             195    */
184   a = amin;                                       196   a = amin;
185   for (G4int j = 1; j <= na; ++j) {            << 197   for(G4int j = 1; j <= na; ++j)
                                                   >> 198   {
186     a += da;                                      199     a += da;
187     b = bmin;                                     200     b = bmin;
188     for (G4int i = 1; i <= nb; ++i) {          << 201     for(G4int i = 1; i <= nb; ++i)
                                                   >> 202     {
189       b += db;                                    203       b += db;
190       new G4PVPlacement(rot, G4ThreeVector(x,  << 204       new G4PVPlacement(rot, G4ThreeVector(x, y, z), pmt_log, "pmt",
                                                   >> 205                         fHousing_log, false, k);
191       fPmtPositions.push_back(G4ThreeVector(x,    206       fPmtPositions.push_back(G4ThreeVector(x, y, z));
192       ++k;                                        207       ++k;
193     }                                             208     }
194   }                                               209   }
195 }                                                 210 }
196                                                   211 
197 //....oooOO0OOooo........oooOO0OOooo........oo    212 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
198                                                   213 
199 void LXeMainVolume::VisAttributes()               214 void LXeMainVolume::VisAttributes()
200 {                                                 215 {
201   auto housing_va = new G4VisAttributes(G4Colo << 216   G4VisAttributes* housing_va = new G4VisAttributes(G4Colour(0.8, 0.8, 0.8));
202   fHousing_log->SetVisAttributes(housing_va);     217   fHousing_log->SetVisAttributes(housing_va);
203                                                   218 
204   auto sphere_va = new G4VisAttributes();      << 219   G4VisAttributes* sphere_va = new G4VisAttributes();
205   sphere_va->SetForceSolid(true);                 220   sphere_va->SetForceSolid(true);
206   fSphere_log->SetVisAttributes(sphere_va);       221   fSphere_log->SetVisAttributes(sphere_va);
207 }                                                 222 }
208                                                   223 
209 //....oooOO0OOooo........oooOO0OOooo........oo    224 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
210                                                   225 
211 void LXeMainVolume::SurfaceProperties()           226 void LXeMainVolume::SurfaceProperties()
212 {                                                 227 {
213   std::vector<G4double> ephoton = {7.0 * eV, 7 << 228   std::vector<G4double> ephoton = { 7.0 * eV, 7.14 * eV };
214                                                   229 
215   //**Scintillator housing properties             230   //**Scintillator housing properties
216   std::vector<G4double> reflectivity = {fRefl, << 231   std::vector<G4double> reflectivity     = { fRefl, fRefl };
217   std::vector<G4double> efficiency = {0.0, 0.0 << 232   std::vector<G4double> efficiency       = { 0.0, 0.0 };
218   auto scintHsngPT = new G4MaterialPropertiesT << 233   G4MaterialPropertiesTable* scintHsngPT = new G4MaterialPropertiesTable();
219   scintHsngPT->AddProperty("REFLECTIVITY", eph    234   scintHsngPT->AddProperty("REFLECTIVITY", ephoton, reflectivity);
220   scintHsngPT->AddProperty("EFFICIENCY", ephot    235   scintHsngPT->AddProperty("EFFICIENCY", ephoton, efficiency);
221   auto OpScintHousingSurface =                 << 236   G4OpticalSurface* OpScintHousingSurface =
222     new G4OpticalSurface("HousingSurface", uni    237     new G4OpticalSurface("HousingSurface", unified, polished, dielectric_metal);
223   OpScintHousingSurface->SetMaterialProperties    238   OpScintHousingSurface->SetMaterialPropertiesTable(scintHsngPT);
224                                                   239 
225   //**Sphere surface properties                   240   //**Sphere surface properties
226   std::vector<G4double> sphereReflectivity = { << 241   std::vector<G4double> sphereReflectivity = { 1.0, 1.0 };
227   std::vector<G4double> sphereEfficiency = {0. << 242   std::vector<G4double> sphereEfficiency   = { 0.0, 0.0 };
228   auto spherePT = new G4MaterialPropertiesTabl << 243   G4MaterialPropertiesTable* spherePT      = new G4MaterialPropertiesTable();
229   spherePT->AddProperty("REFLECTIVITY", ephoto    244   spherePT->AddProperty("REFLECTIVITY", ephoton, sphereReflectivity);
230   spherePT->AddProperty("EFFICIENCY", ephoton,    245   spherePT->AddProperty("EFFICIENCY", ephoton, sphereEfficiency);
231   auto OpSphereSurface = new G4OpticalSurface( << 246   G4OpticalSurface* OpSphereSurface =
                                                   >> 247     new G4OpticalSurface("SphereSurface", unified, polished, dielectric_metal);
232   OpSphereSurface->SetMaterialPropertiesTable(    248   OpSphereSurface->SetMaterialPropertiesTable(spherePT);
233                                                   249 
234   //**Photocathode surface properties             250   //**Photocathode surface properties
235   std::vector<G4double> photocath_EFF = {1., 1 << 251   std::vector<G4double> photocath_EFF     = { 1., 1. };
236   std::vector<G4double> photocath_ReR = {1.92, << 252   std::vector<G4double> photocath_ReR     = { 1.92, 1.92 };
237   std::vector<G4double> photocath_ImR = {1.69, << 253   std::vector<G4double> photocath_ImR     = { 1.69, 1.69 };
238   auto photocath_mt = new G4MaterialProperties << 254   G4MaterialPropertiesTable* photocath_mt = new G4MaterialPropertiesTable();
239   photocath_mt->AddProperty("EFFICIENCY", epho    255   photocath_mt->AddProperty("EFFICIENCY", ephoton, photocath_EFF);
240   photocath_mt->AddProperty("REALRINDEX", epho    256   photocath_mt->AddProperty("REALRINDEX", ephoton, photocath_ReR);
241   photocath_mt->AddProperty("IMAGINARYRINDEX",    257   photocath_mt->AddProperty("IMAGINARYRINDEX", ephoton, photocath_ImR);
242   auto photocath_opsurf =                      << 258   G4OpticalSurface* photocath_opsurf = new G4OpticalSurface(
243     new G4OpticalSurface("photocath_opsurf", g << 259     "photocath_opsurf", glisur, polished, dielectric_metal);
244   photocath_opsurf->SetMaterialPropertiesTable    260   photocath_opsurf->SetMaterialPropertiesTable(photocath_mt);
245                                                   261 
246   //**Create logical skin surfaces                262   //**Create logical skin surfaces
247   new G4LogicalSkinSurface("photocath_surf", f << 263   new G4LogicalSkinSurface("photocath_surf", fHousing_log,
                                                   >> 264                            OpScintHousingSurface);
248   new G4LogicalSkinSurface("sphere_surface", f    265   new G4LogicalSkinSurface("sphere_surface", fSphere_log, OpSphereSurface);
249   new G4LogicalSkinSurface("photocath_surf", f    266   new G4LogicalSkinSurface("photocath_surf", fPhotocath_log, photocath_opsurf);
250 }                                                 267 }
251                                                   268