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 9.6.p3)


  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 //                                             << 
 27 /// \file optical/LXe/src/LXeMainVolume.cc         26 /// \file optical/LXe/src/LXeMainVolume.cc
 28 /// \brief Implementation of the LXeMainVolume     27 /// \brief Implementation of the LXeMainVolume class
 29 //                                                 28 //
 30 //                                                 29 //
 31 #include "LXeMainVolume.hh"                        30 #include "LXeMainVolume.hh"
 32                                                <<  31 #include "globals.hh"
 33 #include "G4Box.hh"                            <<  32 #include "G4SDManager.hh"
 34 #include "G4Colour.hh"                         << 
 35 #include "G4LogicalBorderSurface.hh"           << 
 36 #include "G4LogicalSkinSurface.hh"                 33 #include "G4LogicalSkinSurface.hh"
 37 #include "G4LogicalVolume.hh"                  <<  34 #include "G4LogicalBorderSurface.hh"
 38 #include "G4Material.hh"                       <<  35 #include "LXePMTSD.hh"
 39 #include "G4MaterialPropertiesTable.hh"        <<  36 #include "LXeScintSD.hh"
 40 #include "G4OpticalSurface.hh"                 << 
 41 #include "G4Sphere.hh"                         << 
 42 #include "G4SystemOfUnits.hh"                      37 #include "G4SystemOfUnits.hh"
 43 #include "G4Tubs.hh"                           <<  38 
 44 #include "G4VisAttributes.hh"                  <<  39 LXeScintSD* LXeMainVolume::fScint_SD=NULL;
 45 #include "globals.hh"                          <<  40 LXePMTSD* LXeMainVolume::fPmt_SD=NULL;
                                                   >>  41 
                                                   >>  42 G4LogicalVolume* LXeMainVolume::fHousing_log=NULL;
 46                                                    43 
 47 //....oooOO0OOooo........oooOO0OOooo........oo     44 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
 48                                                    45 
 49 LXeMainVolume::LXeMainVolume(G4RotationMatrix* <<  46 LXeMainVolume::LXeMainVolume(G4RotationMatrix *pRot,
 50                              G4LogicalVolume*  <<  47                              const G4ThreeVector &tlate,
                                                   >>  48                              G4LogicalVolume *pMotherLogical,
                                                   >>  49                              G4bool pMany,
                                                   >>  50                              G4int pCopyNo,
 51                              LXeDetectorConstr     51                              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"),
 57       "housing", pMotherLogical, pMany, pCopyN <<  57                                      "temp",0,0,0),
 58     fConstructor(c)                            <<  58                  "housing",pMotherLogical,pMany,pCopyNo),fConstructor(c)
 59 {                                                  59 {
 60   CopyValues();                                    60   CopyValues();
 61                                                    61 
 62   G4double housing_x = fScint_x + 2. * fD_mtl; <<  62   if(!fHousing_log || fUpdated){
 63   G4double housing_y = fScint_y + 2. * fD_mtl; <<  63  
 64   G4double housing_z = fScint_z + 2. * fD_mtl; <<  64     G4double housing_x=fScint_x+fD_mtl;
 65                                                <<  65     G4double housing_y=fScint_y+fD_mtl;
 66   //*************************** housing and sc <<  66     G4double housing_z=fScint_z+fD_mtl;
 67   fScint_box = new G4Box("scint_box", fScint_x <<  67  
 68   fHousing_box = new G4Box("housing_box", hous <<  68     //*************************** housing and scintillator
 69                                                <<  69     fScint_box = new G4Box("scint_box",fScint_x/2.,fScint_y/2.,fScint_z/2.);
 70   fScint_log = new G4LogicalVolume(fScint_box, <<  70     fHousing_box = new G4Box("housing_box",housing_x/2.,housing_y/2.,
 71   fHousing_log = new G4LogicalVolume(fHousing_ <<  71                             housing_z/2.);
 72                                                <<  72  
 73   new G4PVPlacement(nullptr, G4ThreeVector(),  <<  73     fScint_log = new G4LogicalVolume(fScint_box,G4Material::GetMaterial("LXe"),
 74                                                <<  74                                     "scint_log",0,0,0);
 75   //*************** Miscellaneous sphere to de <<  75     fHousing_log = new G4LogicalVolume(fHousing_box,
 76   fSphere = new G4Sphere("sphere", 0., 2. * cm <<  76                                       G4Material::GetMaterial("Al"),
 77   fSphere_log = new G4LogicalVolume(fSphere, G <<  77                                       "housing_log",0,0,0);
 78   if (fSphereOn)                               <<  78  
 79     new G4PVPlacement(nullptr, G4ThreeVector(5 <<  79     new G4PVPlacement(0,G4ThreeVector(),fScint_log,"scintillator",
 80                       fScint_log, false, 0);   <<  80                                    fHousing_log,false,0);
 81                                                <<  81  
 82   //****************** Build PMTs              <<  82     //*************** Miscellaneous sphere to demonstrate skin surfaces
 83   G4double innerRadius_pmt = 0.;               <<  83     fSphere = new G4Sphere("sphere",0.*mm,2.*cm,0.*deg,360.*deg,0.*deg,
 84   G4double height_pmt = fD_mtl / 2.;           <<  84                           360.*deg);
 85   G4double startAngle_pmt = 0.;                <<  85     fSphere_log = new G4LogicalVolume(fSphere,G4Material::GetMaterial("Al"),
 86   G4double spanningAngle_pmt = 360. * deg;     <<  86                                      "sphere_log");
 87                                                <<  87     if(fSphereOn)
 88   fPmt = new G4Tubs("pmt_tube", innerRadius_pm <<  88       new G4PVPlacement(0,G4ThreeVector(5.*cm,5.*cm,5.*cm),
 89                     spanningAngle_pmt);        <<  89                                       fSphere_log,"sphere",fScint_log,false,0);
 90                                                <<  90  
 91   // the "photocathode" is a metal slab at the <<  91     //****************** Build PMTs
 92   // is only a very rough approximation of the <<  92     G4double innerRadius_pmt = 0.*cm;
 93   // absorbs or detects the photons based on t <<  93     G4double height_pmt = fD_mtl/2.;
 94   fPhotocath = new G4Tubs("photocath_tube", in <<  94     G4double startAngle_pmt = 0.*deg;
 95                           startAngle_pmt, span <<  95     G4double spanningAngle_pmt = 360.*deg;
 96                                                <<  96  
 97   fPmt_log = new G4LogicalVolume(fPmt, G4Mater <<  97     fPmt = new G4Tubs("pmt_tube",innerRadius_pmt,fOuterRadius_pmt,
 98   fPhotocath_log = new G4LogicalVolume(fPhotoc <<  98                      height_pmt,startAngle_pmt,spanningAngle_pmt);
 99                                                <<  99  
100   new G4PVPlacement(nullptr, G4ThreeVector(0., << 100     //the "photocathode" is a metal slab at the back of the glass that
101                     fPmt_log, false, 0);       << 101     //is only a very rough approximation of the real thing since it only
102                                                << 102     //absorbs or detects the photons based on the efficiency set below
103   //***********Arrange pmts around the outside << 103     fPhotocath = new G4Tubs("photocath_tube",innerRadius_pmt,fOuterRadius_pmt,
104                                                << 104                            height_pmt/2,startAngle_pmt,spanningAngle_pmt);
105   G4double dx = fScint_x / fNx;                << 105  
106   G4double dy = fScint_y / fNy;                << 106     fPmt_log = new G4LogicalVolume(fPmt,G4Material::GetMaterial("Glass"),
107   G4double dz = fScint_z / fNz;                << 107                                   "pmt_log");
108                                                << 108     fPhotocath_log = new G4LogicalVolume(fPhotocath,
109   G4double x, y, z;                            << 109                                         G4Material::GetMaterial("Al"),
110   G4double xmin = -fScint_x / 2. - dx / 2.;    << 110                                         "photocath_log");
111   G4double ymin = -fScint_y / 2. - dy / 2.;    << 111  
112   G4double zmin = -fScint_z / 2. - dz / 2.;    << 112     new G4PVPlacement(0,G4ThreeVector(0,0,-height_pmt/2),
113   G4int k = 0;                                 << 113                                        fPhotocath_log,"photocath",
114                                                << 114                                        fPmt_log,false,0);
115   z = -fScint_z / 2. - height_pmt;  // front   << 115  
116   PlacePMTs(fPmt_log, nullptr, x, y, dx, dy, x << 116     //***********Arrange pmts around the outside of housing**********
117                                                << 117     //---pmt sensitive detector
118   auto rm_z = new G4RotationMatrix();          << 118     G4SDManager* SDman = G4SDManager::GetSDMpointer();
119   rm_z->rotateY(180. * deg);                   << 119 
120   z = fScint_z / 2. + height_pmt;  // back     << 120     if(!fPmt_SD){
121   PlacePMTs(fPmt_log, rm_z, x, y, dx, dy, xmin << 121       fPmt_SD = new LXePMTSD("/LXeDet/pmtSD");
122                                                << 122       SDman->AddNewDetector(fPmt_SD);
123   auto rm_y1 = new G4RotationMatrix();         << 123       //Created here so it exists as pmts are being placed
124   rm_y1->rotateY(-90. * deg);                  << 124     }
125   x = -fScint_x / 2. - height_pmt;  // left    << 125     fPmt_SD->InitPMTs((fNx*fNy+fNx*fNz+fNy*fNz)*2); //let pmtSD know # of pmts
126   PlacePMTs(fPmt_log, rm_y1, y, z, dy, dz, ymi << 126     //-------
127                                                << 127  
128   auto rm_y2 = new G4RotationMatrix();         << 128     G4double dx = fScint_x/fNx;
129   rm_y2->rotateY(90. * deg);                   << 129     G4double dy = fScint_y/fNy;
130   x = fScint_x / 2. + height_pmt;  // right    << 130     G4double dz = fScint_z/fNz;
131   PlacePMTs(fPmt_log, rm_y2, y, z, dy, dz, ymi << 131  
132                                                << 132     G4double x,y,z;
133   auto rm_x1 = new G4RotationMatrix();         << 133     G4double xmin = -fScint_x/2. - dx/2.;
134   rm_x1->rotateX(90. * deg);                   << 134     G4double ymin = -fScint_y/2. - dy/2.;
135   y = -fScint_y / 2. - height_pmt;  // bottom  << 135     G4double zmin = -fScint_z/2. - dz/2.;
136   PlacePMTs(fPmt_log, rm_x1, x, z, dx, dz, xmi << 136     G4int k=0;
137                                                << 137  
138   auto rm_x2 = new G4RotationMatrix();         << 138     z = -fScint_z/2. - height_pmt;      //front
139   rm_x2->rotateX(-90. * deg);                  << 139     PlacePMTs(fPmt_log,0,x,y,dx,dy,xmin,ymin,fNx,fNy,x,y,z,k,fPmt_SD);
140   y = fScint_y / 2. + height_pmt;  // top      << 140     G4RotationMatrix* rm_z = new G4RotationMatrix();
141   PlacePMTs(fPmt_log, rm_x2, x, z, dx, dz, xmi << 141     rm_z->rotateY(180*deg);
                                                   >> 142     z = fScint_z/2. + height_pmt;       //back
                                                   >> 143     PlacePMTs(fPmt_log,rm_z,x,y,dx,dy,xmin,ymin,fNx,fNy,x,y,z,k,fPmt_SD);
                                                   >> 144  
                                                   >> 145     G4RotationMatrix* rm_y1 = new G4RotationMatrix();
                                                   >> 146     rm_y1->rotateY(-90*deg);
                                                   >> 147     x = -fScint_x/2. - height_pmt;      //left
                                                   >> 148     PlacePMTs(fPmt_log,rm_y1,y,z,dy,dz,ymin,zmin,fNy,fNz,x,y,z,k,fPmt_SD);
                                                   >> 149     G4RotationMatrix* rm_y2 = new G4RotationMatrix();
                                                   >> 150     rm_y2->rotateY(90*deg);
                                                   >> 151     x = fScint_x/2. + height_pmt;      //right
                                                   >> 152     PlacePMTs(fPmt_log,rm_y2,y,z,dy,dz,ymin,zmin,fNy,fNz,x,y,z,k,fPmt_SD);
                                                   >> 153  
                                                   >> 154     G4RotationMatrix* rm_x1 = new G4RotationMatrix();
                                                   >> 155     rm_x1->rotateX(90*deg);
                                                   >> 156     y = -fScint_y/2. - height_pmt;     //bottom
                                                   >> 157     PlacePMTs(fPmt_log,rm_x1,x,z,dx,dz,xmin,zmin,fNx,fNz,x,y,z,k,fPmt_SD);
                                                   >> 158     G4RotationMatrix* rm_x2 = new G4RotationMatrix();
                                                   >> 159     rm_x2->rotateX(-90*deg);
                                                   >> 160     y = fScint_y/2. + height_pmt;      //top
                                                   >> 161     PlacePMTs(fPmt_log,rm_x2,x,z,dx,dz,xmin,zmin,fNx,fNz,x,y,z,k,fPmt_SD);
                                                   >> 162  
                                                   >> 163     //**********Setup Sensitive Detectors***************
                                                   >> 164     if(!fScint_SD){//determine if it has already been created
                                                   >> 165       fScint_SD = new LXeScintSD("/LXeDet/scintSD");
                                                   >> 166       SDman->AddNewDetector(fScint_SD);
                                                   >> 167     }
                                                   >> 168     fScint_log->SetSensitiveDetector(fScint_SD);
                                                   >> 169  
                                                   >> 170     //sensitive detector is not actually on the photocathode.
                                                   >> 171     //processHits gets done manually by the stepping action.
                                                   >> 172     //It is used to detect when photons hit and get absorbed&detected at the
                                                   >> 173     //boundary to the photocathode (which doesnt get done by attaching it to a
                                                   >> 174     //logical volume.
                                                   >> 175     //It does however need to be attached to something or else it doesnt get
                                                   >> 176     //reset at the begining of events
                                                   >> 177     fPhotocath_log->SetSensitiveDetector(fPmt_SD);
142                                                   178 
143   VisAttributes();                             << 179     VisAttributes();
144   SurfaceProperties();                         << 180     SurfaceProperties();
                                                   >> 181   }
145                                                   182 
146   SetLogicalVolume(fHousing_log);                 183   SetLogicalVolume(fHousing_log);
147 }                                                 184 }
148                                                   185 
149 //....oooOO0OOooo........oooOO0OOooo........oo    186 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
150                                                   187 
151 void LXeMainVolume::CopyValues()               << 188 void LXeMainVolume::CopyValues(){
152 {                                              << 189   fUpdated=fConstructor->GetUpdated();
153   fScint_x = fConstructor->GetScintX();        << 190 
154   fScint_y = fConstructor->GetScintY();        << 191   fScint_x=fConstructor->GetScintX();
155   fScint_z = fConstructor->GetScintZ();        << 192   fScint_y=fConstructor->GetScintY();
156   fD_mtl = fConstructor->GetHousingThickness() << 193   fScint_z=fConstructor->GetScintZ();
157   fNx = fConstructor->GetNX();                 << 194   fD_mtl=fConstructor->GetHousingThickness();
158   fNy = fConstructor->GetNY();                 << 195   fNx=fConstructor->GetNX();
159   fNz = fConstructor->GetNZ();                 << 196   fNy=fConstructor->GetNY();
160   fOuterRadius_pmt = fConstructor->GetPMTRadiu << 197   fNz=fConstructor->GetNZ();
161   fSphereOn = fConstructor->GetSphereOn();     << 198   fOuterRadius_pmt=fConstructor->GetPMTRadius();
162   fRefl = fConstructor->GetHousingReflectivity << 199   fSphereOn=fConstructor->GetSphereOn();
                                                   >> 200   fRefl=fConstructor->GetHousingReflectivity();
163 }                                                 201 }
164                                                   202 
165 //....oooOO0OOooo........oooOO0OOooo........oo    203 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
166                                                   204 
167 void LXeMainVolume::PlacePMTs(G4LogicalVolume* << 205 void LXeMainVolume::PlacePMTs(G4LogicalVolume* pmt_log,
168                               G4double& b, G4d << 206                               G4RotationMatrix *rot,
169                               G4int na, G4int  << 207                               G4double &a, G4double &b, G4double da,
170 {                                              << 208                               G4double db, G4double amin,
171   /*  PlacePMTs : a different way to parameter << 209                               G4double bmin, G4int na, G4int nb,
172    * on calculating the position from the copy << 210                               G4double &x, G4double &y, G4double &z,
173    *                                           << 211                               G4int &k,LXePMTSD* sd){
174    *  pmt_log = logical volume for pmts to be  << 212 /*PlacePMTs : a different way to parameterize placement that does not depend on
175    *  rot = rotation matrix to apply           << 213   calculating the position from the copy number
176    *  a,b = coordinates to vary(ie. if varying << 214 
177    *  da,db = value to increment a,b by        << 215   pmt_log = logical volume for pmts to be placed
178    *  amin,bmin = start values for a,b         << 216   rot = rotation matrix to apply
179    *  na,nb = number of repitions in a and b   << 217   a,b = coordinates to vary(ie. if varying in the xy plane then pass x,y)
180    *  x,y,z = just pass x,y, and z by referenc << 218   da,db = value to increment a,b by
181    *  k = copy number to start with            << 219   amin,bmin = start values for a,b
182    *  sd = sensitive detector for pmts         << 220   na,nb = number of repitions in a and b
183    */                                          << 221   x,y,z = just pass x,y, and z by reference (the same ones passed for a,b)
184   a = amin;                                    << 222   k = copy number to start with
185   for (G4int j = 1; j <= na; ++j) {            << 223   sd = sensitive detector for pmts
186     a += da;                                   << 224 */
187     b = bmin;                                  << 225   a=amin;
188     for (G4int i = 1; i <= nb; ++i) {          << 226   for(G4int j=1;j<=na;j++){
189       b += db;                                 << 227     a+=da;
190       new G4PVPlacement(rot, G4ThreeVector(x,  << 228     b=bmin;
191       fPmtPositions.push_back(G4ThreeVector(x, << 229     for(G4int i=1;i<=nb;i++){
192       ++k;                                     << 230       b+=db;
                                                   >> 231       new G4PVPlacement(rot,G4ThreeVector(x,y,z),pmt_log,"pmt",
                                                   >> 232                         fHousing_log,false,k);
                                                   >> 233       sd->SetPMTPos(k,x,y,z);
                                                   >> 234       k++;
193     }                                             235     }
194   }                                               236   }
195 }                                                 237 }
196                                                   238 
197 //....oooOO0OOooo........oooOO0OOooo........oo    239 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
198                                                   240 
199 void LXeMainVolume::VisAttributes()            << 241 void LXeMainVolume::VisAttributes(){
200 {                                              << 242   G4VisAttributes* housing_va = new G4VisAttributes(G4Colour(0.8,0.8,0.8));
201   auto housing_va = new G4VisAttributes(G4Colo << 
202   fHousing_log->SetVisAttributes(housing_va);     243   fHousing_log->SetVisAttributes(housing_va);
203                                                   244 
204   auto sphere_va = new G4VisAttributes();      << 245   G4VisAttributes* sphere_va = new G4VisAttributes();
205   sphere_va->SetForceSolid(true);                 246   sphere_va->SetForceSolid(true);
206   fSphere_log->SetVisAttributes(sphere_va);       247   fSphere_log->SetVisAttributes(sphere_va);
207 }                                                 248 }
208                                                   249 
209 //....oooOO0OOooo........oooOO0OOooo........oo    250 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
210                                                   251 
211 void LXeMainVolume::SurfaceProperties()        << 252 void LXeMainVolume::SurfaceProperties(){
212 {                                              << 253   const G4int num = 2;
213   std::vector<G4double> ephoton = {7.0 * eV, 7 << 254   G4double ephoton[num] = {7.0*eV, 7.14*eV};
214                                                   255 
215   //**Scintillator housing properties             256   //**Scintillator housing properties
216   std::vector<G4double> reflectivity = {fRefl, << 257   G4double reflectivity[num] = {fRefl, fRefl};
217   std::vector<G4double> efficiency = {0.0, 0.0 << 258   G4double efficiency[num] = {0.0, 0.0};
218   auto scintHsngPT = new G4MaterialPropertiesT << 259   G4MaterialPropertiesTable* scintHsngPT = new G4MaterialPropertiesTable();
219   scintHsngPT->AddProperty("REFLECTIVITY", eph << 260   scintHsngPT->AddProperty("REFLECTIVITY", ephoton, reflectivity, num);
220   scintHsngPT->AddProperty("EFFICIENCY", ephot << 261   scintHsngPT->AddProperty("EFFICIENCY", ephoton, efficiency, num);
221   auto OpScintHousingSurface =                 << 262   G4OpticalSurface* OpScintHousingSurface =
222     new G4OpticalSurface("HousingSurface", uni << 263     new G4OpticalSurface("HousingSurface",unified,polished,dielectric_metal);
223   OpScintHousingSurface->SetMaterialProperties    264   OpScintHousingSurface->SetMaterialPropertiesTable(scintHsngPT);
224                                                << 265  
225   //**Sphere surface properties                   266   //**Sphere surface properties
226   std::vector<G4double> sphereReflectivity = { << 267   G4double sphereReflectivity[num] = {1.0, 1.0};
227   std::vector<G4double> sphereEfficiency = {0. << 268   G4double sphereEfficiency[num] = {0.0, 0.0};
228   auto spherePT = new G4MaterialPropertiesTabl << 269   G4MaterialPropertiesTable* spherePT = new G4MaterialPropertiesTable();
229   spherePT->AddProperty("REFLECTIVITY", ephoto << 270   spherePT->AddProperty("REFLECTIVITY", ephoton, sphereReflectivity, num);
230   spherePT->AddProperty("EFFICIENCY", ephoton, << 271   spherePT->AddProperty("EFFICIENCY", ephoton, sphereEfficiency, num);
231   auto OpSphereSurface = new G4OpticalSurface( << 272   G4OpticalSurface* OpSphereSurface =
                                                   >> 273     new G4OpticalSurface("SphereSurface",unified,polished,dielectric_metal);
232   OpSphereSurface->SetMaterialPropertiesTable(    274   OpSphereSurface->SetMaterialPropertiesTable(spherePT);
233                                                << 275  
234   //**Photocathode surface properties             276   //**Photocathode surface properties
235   std::vector<G4double> photocath_EFF = {1., 1 << 277   G4double photocath_EFF[num]={1.,1.}; //Enables 'detection' of photons
236   std::vector<G4double> photocath_ReR = {1.92, << 278   G4double photocath_ReR[num]={1.92,1.92};
237   std::vector<G4double> photocath_ImR = {1.69, << 279   G4double photocath_ImR[num]={1.69,1.69};
238   auto photocath_mt = new G4MaterialProperties << 280   G4MaterialPropertiesTable* photocath_mt = new G4MaterialPropertiesTable();
239   photocath_mt->AddProperty("EFFICIENCY", epho << 281   photocath_mt->AddProperty("EFFICIENCY",ephoton,photocath_EFF,num);
240   photocath_mt->AddProperty("REALRINDEX", epho << 282   photocath_mt->AddProperty("REALRINDEX",ephoton,photocath_ReR,num);
241   photocath_mt->AddProperty("IMAGINARYRINDEX", << 283   photocath_mt->AddProperty("IMAGINARYRINDEX",ephoton,photocath_ImR,num);
242   auto photocath_opsurf =                      << 284   G4OpticalSurface* photocath_opsurf=
243     new G4OpticalSurface("photocath_opsurf", g << 285     new G4OpticalSurface("photocath_opsurf",glisur,polished,
                                                   >> 286                          dielectric_metal);
244   photocath_opsurf->SetMaterialPropertiesTable    287   photocath_opsurf->SetMaterialPropertiesTable(photocath_mt);
245                                                   288 
246   //**Create logical skin surfaces                289   //**Create logical skin surfaces
247   new G4LogicalSkinSurface("photocath_surf", f << 290   new G4LogicalSkinSurface("photocath_surf",fHousing_log,
248   new G4LogicalSkinSurface("sphere_surface", f << 291                            OpScintHousingSurface);
249   new G4LogicalSkinSurface("photocath_surf", f << 292   new G4LogicalSkinSurface("sphere_surface",fSphere_log,OpSphereSurface);
                                                   >> 293   new G4LogicalSkinSurface("photocath_surf",fPhotocath_log,photocath_opsurf);
250 }                                                 294 }
251                                                   295