Geant4 Cross Reference

Cross-Referencing   Geant4
Geant4/examples/extended/optical/LXe/src/LXeDetectorConstruction.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/LXeDetectorConstruction.cc (Version 11.3.0) and /examples/extended/optical/LXe/src/LXeDetectorConstruction.cc (Version 10.2.p1)


  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 // $Id: LXeDetectorConstruction.cc 82853 2014-07-14 09:07:11Z gcosmo $
 26 //                                                 27 //
 27 /// \file optical/LXe/src/LXeDetectorConstruct     28 /// \file optical/LXe/src/LXeDetectorConstruction.cc
 28 /// \brief Implementation of the LXeDetectorCo     29 /// \brief Implementation of the LXeDetectorConstruction class
 29 //                                                 30 //
 30 //                                                 31 //
 31 #include "LXeDetectorConstruction.hh"              32 #include "LXeDetectorConstruction.hh"
 32                                                << 
 33 #include "LXeDetectorMessenger.hh"             << 
 34 #include "LXeMainVolume.hh"                    << 
 35 #include "LXePMTSD.hh"                             33 #include "LXePMTSD.hh"
 36 #include "LXeScintSD.hh"                           34 #include "LXeScintSD.hh"
                                                   >>  35 #include "LXeDetectorMessenger.hh"
                                                   >>  36 #include "LXeMainVolume.hh"
 37 #include "LXeWLSSlab.hh"                           37 #include "LXeWLSSlab.hh"
 38                                                    38 
 39 #include "G4Box.hh"                            <<  39 #include "G4SDManager.hh"
                                                   >>  40 #include "G4RunManager.hh"
                                                   >>  41 
 40 #include "G4GeometryManager.hh"                    42 #include "G4GeometryManager.hh"
                                                   >>  43 #include "G4SolidStore.hh"
                                                   >>  44 #include "G4LogicalVolumeStore.hh"
                                                   >>  45 #include "G4PhysicalVolumeStore.hh"
 41 #include "G4LogicalBorderSurface.hh"               46 #include "G4LogicalBorderSurface.hh"
 42 #include "G4LogicalSkinSurface.hh"                 47 #include "G4LogicalSkinSurface.hh"
 43 #include "G4LogicalVolume.hh"                  <<  48 
 44 #include "G4LogicalVolumeStore.hh"             << 
 45 #include "G4Material.hh"                       << 
 46 #include "G4MaterialTable.hh"                  << 
 47 #include "G4OpticalSurface.hh"                     49 #include "G4OpticalSurface.hh"
 48 #include "G4PVPlacement.hh"                    <<  50 #include "G4MaterialTable.hh"
 49 #include "G4PhysicalConstants.hh"              <<  51 #include "G4VisAttributes.hh"
 50 #include "G4PhysicalVolumeStore.hh"            <<  52 #include "G4Material.hh"
 51 #include "G4RunManager.hh"                     <<  53 #include "G4Box.hh"
 52 #include "G4SDManager.hh"                      <<  54 #include "G4Tubs.hh"
 53 #include "G4SolidStore.hh"                     << 
 54 #include "G4Sphere.hh"                             55 #include "G4Sphere.hh"
 55 #include "G4SystemOfUnits.hh"                  <<  56 #include "G4LogicalVolume.hh"
 56 #include "G4ThreeVector.hh"                        57 #include "G4ThreeVector.hh"
 57 #include "G4Tubs.hh"                           <<  58 #include "G4PVPlacement.hh"
 58 #include "G4UImanager.hh"                      << 
 59 #include "G4VisAttributes.hh"                  << 
 60 #include "globals.hh"                              59 #include "globals.hh"
                                                   >>  60 #include "G4UImanager.hh"
                                                   >>  61 #include "G4PhysicalConstants.hh"
                                                   >>  62 #include "G4SystemOfUnits.hh"
 61                                                    63 
 62 G4bool LXeDetectorConstruction::fSphereOn = tr     64 G4bool LXeDetectorConstruction::fSphereOn = true;
 63                                                    65 
 64 //....oooOO0OOooo........oooOO0OOooo........oo     66 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
 65                                                    67 
 66 LXeDetectorConstruction::LXeDetectorConstructi     68 LXeDetectorConstruction::LXeDetectorConstruction()
                                                   >>  69 : fLXe_mt(NULL), fMPTPStyrene(NULL)
 67 {                                                  70 {
                                                   >>  71   fExperimentalHall_box = NULL;
                                                   >>  72   fExperimentalHall_log = NULL;
                                                   >>  73   fExperimentalHall_phys = NULL;
                                                   >>  74 
                                                   >>  75   fLXe = fAl = fAir = fVacuum = fGlass = NULL;
                                                   >>  76   fPstyrene = fPMMA = fPethylene1 = fPethylene2 = NULL;
                                                   >>  77 
                                                   >>  78   fN = fO = fC = fH = NULL;
                                                   >>  79 
 68   SetDefaults();                                   80   SetDefaults();
 69   DefineMaterials();                           <<  81 
 70   fDetectorMessenger = new LXeDetectorMessenge     82   fDetectorMessenger = new LXeDetectorMessenger(this);
 71 }                                                  83 }
 72                                                    84 
 73 //....oooOO0OOooo........oooOO0OOooo........oo     85 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
 74                                                    86 
 75 LXeDetectorConstruction::~LXeDetectorConstruct <<  87 LXeDetectorConstruction::~LXeDetectorConstruction() {}
 76 {                                              << 
 77   delete fMainVolume;                          << 
 78   delete fLXe_mt;                              << 
 79   delete fDetectorMessenger;                   << 
 80   delete fMPTPStyrene;                         << 
 81 }                                              << 
 82                                                    88 
 83 //....oooOO0OOooo........oooOO0OOooo........oo     89 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
 84                                                    90 
 85 void LXeDetectorConstruction::DefineMaterials( <<  91 void LXeDetectorConstruction::DefineMaterials(){
 86 {                                              << 
 87   G4double a;  // atomic mass                      92   G4double a;  // atomic mass
 88   G4double z;  // atomic number                    93   G4double z;  // atomic number
 89   G4double density;                                94   G4double density;
 90                                                    95 
 91   G4int polyPMMA = 1;                              96   G4int polyPMMA = 1;
 92   G4int nC_PMMA = 3 + 2 * polyPMMA;            <<  97   G4int nC_PMMA = 3+2*polyPMMA;
 93   G4int nH_PMMA = 6 + 2 * polyPMMA;            <<  98   G4int nH_PMMA = 6+2*polyPMMA;
 94                                                    99 
 95   G4int polyeth = 1;                              100   G4int polyeth = 1;
 96   G4int nC_eth = 2 * polyeth;                  << 101   G4int nC_eth = 2*polyeth;
 97   G4int nH_eth = 4 * polyeth;                  << 102   G4int nH_eth = 4*polyeth;
 98                                                   103 
 99   //***Elements                                   104   //***Elements
100   fH = new G4Element("H", "H", z = 1., a = 1.0 << 105   fH = new G4Element("H", "H", z=1., a=1.01*g/mole);
101   fC = new G4Element("C", "C", z = 6., a = 12. << 106   fC = new G4Element("C", "C", z=6., a=12.01*g/mole);
102   fN = new G4Element("N", "N", z = 7., a = 14. << 107   fN = new G4Element("N", "N", z=7., a= 14.01*g/mole);
103   fO = new G4Element("O", "O", z = 8., a = 16. << 108   fO = new G4Element("O"  , "O", z=8., a= 16.00*g/mole);
104                                                   109 
105   //***Materials                                  110   //***Materials
106   // Liquid Xenon                              << 111   //Liquid Xenon
107   fLXe = new G4Material("LXe", z = 54., a = 13 << 112   fLXe = new G4Material("LXe",z=54.,a=131.29*g/mole,density=3.020*g/cm3);
108   // Aluminum                                  << 113   //Aluminum
109   fAl = new G4Material("Al", z = 13., a = 26.9 << 114   fAl = new G4Material("Al",z=13.,a=26.98*g/mole,density=2.7*g/cm3);
110   // Vacuum                                    << 115   //Vacuum
111   fVacuum = new G4Material("Vacuum", z = 1., a << 116   fVacuum = new G4Material("Vacuum",z=1.,a=1.01*g/mole,
112                            kStateGas, 0.1 * ke << 117                           density=universe_mean_density,kStateGas,0.1*kelvin,
113   // Air                                       << 118                           1.e-19*pascal);
114   fAir = new G4Material("Air", density = 1.29  << 119   //Air
115   fAir->AddElement(fN, 70 * perCent);          << 120   fAir = new G4Material("Air", density= 1.29*mg/cm3, 2);
116   fAir->AddElement(fO, 30 * perCent);          << 121   fAir->AddElement(fN, 70*perCent);
117   // Glass                                     << 122   fAir->AddElement(fO, 30*perCent);
118   fGlass = new G4Material("Glass", density = 1 << 123   //Glass
119   fGlass->AddElement(fC, 91.533 * perCent);    << 124   fGlass = new G4Material("Glass", density=1.032*g/cm3,2);
120   fGlass->AddElement(fH, 8.467 * perCent);     << 125   fGlass->AddElement(fC,91.533*perCent);
121   // Polystyrene                               << 126   fGlass->AddElement(fH,8.467*perCent);
122   fPstyrene = new G4Material("Polystyrene", de << 127   //Polystyrene
                                                   >> 128   fPstyrene = new G4Material("Polystyrene", density= 1.03*g/cm3, 2);
123   fPstyrene->AddElement(fC, 8);                   129   fPstyrene->AddElement(fC, 8);
124   fPstyrene->AddElement(fH, 8);                   130   fPstyrene->AddElement(fH, 8);
125   // Fiber(PMMA)                               << 131   //Fiber(PMMA)
126   fPMMA = new G4Material("PMMA", density = 119 << 132   fPMMA = new G4Material("PMMA", density=1190*kg/m3,3);
127   fPMMA->AddElement(fH, nH_PMMA);              << 133   fPMMA->AddElement(fH,nH_PMMA);
128   fPMMA->AddElement(fC, nC_PMMA);              << 134   fPMMA->AddElement(fC,nC_PMMA);
129   fPMMA->AddElement(fO, 2);                    << 135   fPMMA->AddElement(fO,2);
130   // Cladding(polyethylene)                    << 136   //Cladding(polyethylene)
131   fPethylene1 = new G4Material("Pethylene1", d << 137   fPethylene1 = new G4Material("Pethylene1", density=1200*kg/m3,2);
132   fPethylene1->AddElement(fH, nH_eth);         << 138   fPethylene1->AddElement(fH,nH_eth);
133   fPethylene1->AddElement(fC, nC_eth);         << 139   fPethylene1->AddElement(fC,nC_eth);
134   // Double cladding(flourinated polyethylene) << 140   //Double cladding(flourinated polyethylene)
135   fPethylene2 = new G4Material("Pethylene2", d << 141   fPethylene2 = new G4Material("Pethylene2", density=1400*kg/m3,2);
136   fPethylene2->AddElement(fH, nH_eth);         << 142   fPethylene2->AddElement(fH,nH_eth);
137   fPethylene2->AddElement(fC, nC_eth);         << 143   fPethylene2->AddElement(fC,nC_eth);
138                                                << 144  
139   //***Material properties tables                 145   //***Material properties tables
140                                                   146 
141   std::vector<G4double> lxe_Energy = {7.0 * eV << 147   G4double lxe_Energy[]    = { 7.0*eV , 7.07*eV, 7.14*eV };
                                                   >> 148   const G4int lxenum = sizeof(lxe_Energy)/sizeof(G4double);
142                                                   149 
143   std::vector<G4double> lxe_SCINT = {0.1, 1.0, << 150   G4double lxe_SCINT[] = { 0.1, 1.0, 0.1 };
144   std::vector<G4double> lxe_RIND = {1.59, 1.57 << 151   assert(sizeof(lxe_SCINT) == sizeof(lxe_Energy));
145   std::vector<G4double> lxe_ABSL = {35. * cm,  << 152   G4double lxe_RIND[]  = { 1.59 , 1.57, 1.54 };
                                                   >> 153   assert(sizeof(lxe_RIND) == sizeof(lxe_Energy));
                                                   >> 154   G4double lxe_ABSL[]  = { 35.*cm, 35.*cm, 35.*cm};
                                                   >> 155   assert(sizeof(lxe_ABSL) == sizeof(lxe_Energy));
146   fLXe_mt = new G4MaterialPropertiesTable();      156   fLXe_mt = new G4MaterialPropertiesTable();
147   fLXe_mt->AddProperty("SCINTILLATIONCOMPONENT << 157   fLXe_mt->AddProperty("FASTCOMPONENT", lxe_Energy, lxe_SCINT, lxenum);
148   fLXe_mt->AddProperty("SCINTILLATIONCOMPONENT << 158   fLXe_mt->AddProperty("SLOWCOMPONENT", lxe_Energy, lxe_SCINT, lxenum);
149   fLXe_mt->AddProperty("RINDEX", lxe_Energy, l << 159   fLXe_mt->AddProperty("RINDEX",        lxe_Energy, lxe_RIND,  lxenum);
150   fLXe_mt->AddProperty("ABSLENGTH", lxe_Energy << 160   fLXe_mt->AddProperty("ABSLENGTH",     lxe_Energy, lxe_ABSL,  lxenum);
151   fLXe_mt->AddConstProperty("SCINTILLATIONYIEL << 161   fLXe_mt->AddConstProperty("SCINTILLATIONYIELD",12000./MeV);
152   fLXe_mt->AddConstProperty("RESOLUTIONSCALE", << 162   fLXe_mt->AddConstProperty("RESOLUTIONSCALE",1.0);
153   fLXe_mt->AddConstProperty("SCINTILLATIONTIME << 163   fLXe_mt->AddConstProperty("FASTTIMECONSTANT",20.*ns);
154   fLXe_mt->AddConstProperty("SCINTILLATIONTIME << 164   fLXe_mt->AddConstProperty("SLOWTIMECONSTANT",45.*ns);
155   fLXe_mt->AddConstProperty("SCINTILLATIONYIEL << 165   fLXe_mt->AddConstProperty("YIELDRATIO",1.0);
156   fLXe_mt->AddConstProperty("SCINTILLATIONYIEL << 
157   fLXe->SetMaterialPropertiesTable(fLXe_mt);      166   fLXe->SetMaterialPropertiesTable(fLXe_mt);
158                                                   167 
159   // Set the Birks Constant for the LXe scinti    168   // Set the Birks Constant for the LXe scintillator
160   fLXe->GetIonisation()->SetBirksConstant(0.12 << 
161                                                   169 
162   std::vector<G4double> glass_AbsLength = {420 << 170   fLXe->GetIonisation()->SetBirksConstant(0.126*mm/MeV);
163   auto glass_mt = new G4MaterialPropertiesTabl << 171  
164   glass_mt->AddProperty("ABSLENGTH", lxe_Energ << 172   G4double glass_RIND[]={1.49,1.49,1.49};
165   glass_mt->AddProperty("RINDEX", "Fused Silic << 173   assert(sizeof(glass_RIND) == sizeof(lxe_Energy));
                                                   >> 174   G4double glass_AbsLength[]={420.*cm,420.*cm,420.*cm};
                                                   >> 175   assert(sizeof(glass_AbsLength) == sizeof(lxe_Energy));
                                                   >> 176   G4MaterialPropertiesTable *glass_mt = new G4MaterialPropertiesTable();
                                                   >> 177   glass_mt->AddProperty("ABSLENGTH",lxe_Energy,glass_AbsLength,lxenum);
                                                   >> 178   glass_mt->AddProperty("RINDEX",lxe_Energy,glass_RIND,lxenum);
166   fGlass->SetMaterialPropertiesTable(glass_mt)    179   fGlass->SetMaterialPropertiesTable(glass_mt);
167                                                   180 
168   auto vacuum_mt = new G4MaterialPropertiesTab << 181   G4double vacuum_Energy[]={2.0*eV,7.0*eV,7.14*eV};
169   vacuum_mt->AddProperty("RINDEX", "Air");     << 182   const G4int vacnum = sizeof(vacuum_Energy)/sizeof(G4double);
                                                   >> 183   G4double vacuum_RIND[]={1.,1.,1.};
                                                   >> 184   assert(sizeof(vacuum_RIND) == sizeof(vacuum_Energy));
                                                   >> 185   G4MaterialPropertiesTable *vacuum_mt = new G4MaterialPropertiesTable();
                                                   >> 186   vacuum_mt->AddProperty("RINDEX", vacuum_Energy, vacuum_RIND,vacnum);
170   fVacuum->SetMaterialPropertiesTable(vacuum_m    187   fVacuum->SetMaterialPropertiesTable(vacuum_mt);
171   fAir->SetMaterialPropertiesTable(vacuum_mt); << 188   fAir->SetMaterialPropertiesTable(vacuum_mt);//Give air the same rindex
172                                                << 
173   std::vector<G4double> wls_Energy = {2.00 * e << 
174                                                   189 
175   std::vector<G4double> rIndexPstyrene = {1.5, << 190   G4double wls_Energy[] = {2.00*eV,2.87*eV,2.90*eV,3.47*eV};
176   std::vector<G4double> absorption1 = {2. * cm << 191   const G4int wlsnum = sizeof(wls_Energy)/sizeof(G4double);
177   std::vector<G4double> scintilFast = {0.0, 0. << 192  
                                                   >> 193   G4double rIndexPstyrene[]={ 1.5, 1.5, 1.5, 1.5};
                                                   >> 194   assert(sizeof(rIndexPstyrene) == sizeof(wls_Energy));
                                                   >> 195   G4double absorption1[]={2.*cm, 2.*cm, 2.*cm, 2.*cm};
                                                   >> 196   assert(sizeof(absorption1) == sizeof(wls_Energy));
                                                   >> 197   G4double scintilFast[]={0.00, 0.00, 1.00, 1.00};
                                                   >> 198   assert(sizeof(scintilFast) == sizeof(wls_Energy));
178   fMPTPStyrene = new G4MaterialPropertiesTable    199   fMPTPStyrene = new G4MaterialPropertiesTable();
179   fMPTPStyrene->AddProperty("RINDEX", wls_Ener << 200   fMPTPStyrene->AddProperty("RINDEX",wls_Energy,rIndexPstyrene,wlsnum);
180   fMPTPStyrene->AddProperty("ABSLENGTH", wls_E << 201   fMPTPStyrene->AddProperty("ABSLENGTH",wls_Energy,absorption1,wlsnum);
181   fMPTPStyrene->AddProperty("SCINTILLATIONCOMP << 202   fMPTPStyrene->AddProperty("FASTCOMPONENT",wls_Energy, scintilFast,wlsnum);
182   fMPTPStyrene->AddConstProperty("SCINTILLATIO << 203   fMPTPStyrene->AddConstProperty("SCINTILLATIONYIELD",10./keV);
183   fMPTPStyrene->AddConstProperty("RESOLUTIONSC << 204   fMPTPStyrene->AddConstProperty("RESOLUTIONSCALE",1.0);
184   fMPTPStyrene->AddConstProperty("SCINTILLATIO << 205   fMPTPStyrene->AddConstProperty("FASTTIMECONSTANT", 10.*ns);
185   fPstyrene->SetMaterialPropertiesTable(fMPTPS    206   fPstyrene->SetMaterialPropertiesTable(fMPTPStyrene);
186                                                   207 
187   // Set the Birks Constant for the Polystyren    208   // Set the Birks Constant for the Polystyrene scintillator
188   fPstyrene->GetIonisation()->SetBirksConstant << 
189                                                   209 
190   std::vector<G4double> AbsFiber = {9.0 * m, 9 << 210   fPstyrene->GetIonisation()->SetBirksConstant(0.126*mm/MeV);
191   std::vector<G4double> EmissionFib = {1.0, 1. << 211 
192   auto fiberProperty = new G4MaterialPropertie << 212   G4double RefractiveIndexFiber[]={ 1.60, 1.60, 1.60, 1.60};
193   fiberProperty->AddProperty("RINDEX", "PMMA") << 213   assert(sizeof(RefractiveIndexFiber) == sizeof(wls_Energy));
194   fiberProperty->AddProperty("WLSABSLENGTH", w << 214   G4double AbsFiber[]={9.00*m,9.00*m,0.1*mm,0.1*mm};
195   fiberProperty->AddProperty("WLSCOMPONENT", w << 215   assert(sizeof(AbsFiber) == sizeof(wls_Energy));
196   fiberProperty->AddConstProperty("WLSTIMECONS << 216   G4double EmissionFib[]={1.0, 1.0, 0.0, 0.0};
                                                   >> 217   assert(sizeof(EmissionFib) == sizeof(wls_Energy));
                                                   >> 218   G4MaterialPropertiesTable* fiberProperty = new G4MaterialPropertiesTable();
                                                   >> 219   fiberProperty->AddProperty("RINDEX",wls_Energy,RefractiveIndexFiber,wlsnum);
                                                   >> 220   fiberProperty->AddProperty("WLSABSLENGTH",wls_Energy,AbsFiber,wlsnum);
                                                   >> 221   fiberProperty->AddProperty("WLSCOMPONENT",wls_Energy,EmissionFib,wlsnum);
                                                   >> 222   fiberProperty->AddConstProperty("WLSTIMECONSTANT", 0.5*ns);
197   fPMMA->SetMaterialPropertiesTable(fiberPrope    223   fPMMA->SetMaterialPropertiesTable(fiberProperty);
198                                                   224 
199   std::vector<G4double> RefractiveIndexClad1 = << 225   G4double RefractiveIndexClad1[]={ 1.49, 1.49, 1.49, 1.49};
200   auto clad1Property = new G4MaterialPropertie << 226   assert(sizeof(RefractiveIndexClad1) == sizeof(wls_Energy));
201   clad1Property->AddProperty("RINDEX", wls_Ene << 227   G4MaterialPropertiesTable* clad1Property = new G4MaterialPropertiesTable();
202   clad1Property->AddProperty("ABSLENGTH", wls_ << 228   clad1Property->AddProperty("RINDEX",wls_Energy,RefractiveIndexClad1,wlsnum);
                                                   >> 229   clad1Property->AddProperty("ABSLENGTH",wls_Energy,AbsFiber,wlsnum);
203   fPethylene1->SetMaterialPropertiesTable(clad    230   fPethylene1->SetMaterialPropertiesTable(clad1Property);
204                                                   231 
205   std::vector<G4double> RefractiveIndexClad2 = << 232   G4double RefractiveIndexClad2[]={ 1.42, 1.42, 1.42, 1.42};
206   auto clad2Property = new G4MaterialPropertie << 233   assert(sizeof(RefractiveIndexClad2) == sizeof(wls_Energy));
207   clad2Property->AddProperty("RINDEX", wls_Ene << 234   G4MaterialPropertiesTable* clad2Property = new G4MaterialPropertiesTable();
208   clad2Property->AddProperty("ABSLENGTH", wls_ << 235   clad2Property->AddProperty("RINDEX",wls_Energy,RefractiveIndexClad2,wlsnum);
                                                   >> 236   clad2Property->AddProperty("ABSLENGTH",wls_Energy,AbsFiber,wlsnum);
209   fPethylene2->SetMaterialPropertiesTable(clad    237   fPethylene2->SetMaterialPropertiesTable(clad2Property);
210 }                                                 238 }
211                                                   239 
212 //....oooOO0OOooo........oooOO0OOooo........oo    240 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
213                                                   241 
214 G4VPhysicalVolume* LXeDetectorConstruction::Co << 242 G4VPhysicalVolume* LXeDetectorConstruction::Construct(){
215 {                                              << 243 
216   // The experimental hall walls are all 1m aw << 244   if (fExperimentalHall_phys) {
217   G4double expHall_x = fScint_x + fD_mtl + 1.  << 245      G4GeometryManager::GetInstance()->OpenGeometry();
218   G4double expHall_y = fScint_y + fD_mtl + 1.  << 246      G4PhysicalVolumeStore::GetInstance()->Clean();
219   G4double expHall_z = fScint_z + fD_mtl + 1.  << 247      G4LogicalVolumeStore::GetInstance()->Clean();
220                                                << 248      G4SolidStore::GetInstance()->Clean();
221   // Create experimental hall                  << 249      G4LogicalSkinSurface::CleanSurfaceTable();
222   fExperimentalHall_box = new G4Box("expHall_b << 250      G4LogicalBorderSurface::CleanSurfaceTable();
223   fExperimentalHall_log = new G4LogicalVolume( << 
224   fExperimentalHall_phys = new G4PVPlacement(n << 
225                                              " << 
226                                                << 
227   fExperimentalHall_log->SetVisAttributes(G4Vi << 
228                                                << 
229   // Place the main volume                     << 
230   if (fMainVolumeOn) {                         << 
231     fMainVolume =                              << 
232       new LXeMainVolume(nullptr, G4ThreeVector << 
233   }                                               251   }
234                                                   252 
235   // Place the WLS slab                        << 253   DefineMaterials();
236   if (fWLSslab) {                              << 254   return ConstructDetector();
237     G4VPhysicalVolume* slab =                  << 255 }
238       new LXeWLSSlab(nullptr, G4ThreeVector(0. << 256 
239                      fExperimentalHall_log, fa << 257 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
                                                   >> 258 
                                                   >> 259 G4VPhysicalVolume* LXeDetectorConstruction::ConstructDetector()
                                                   >> 260 {
                                                   >> 261   //The experimental hall walls are all 1m away from housing walls
                                                   >> 262   G4double expHall_x = fScint_x+fD_mtl+1.*m;
                                                   >> 263   G4double expHall_y = fScint_y+fD_mtl+1.*m;
                                                   >> 264   G4double expHall_z = fScint_z+fD_mtl+1.*m;
                                                   >> 265 
                                                   >> 266   //Create experimental hall
                                                   >> 267   fExperimentalHall_box
                                                   >> 268     = new G4Box("expHall_box",expHall_x,expHall_y,expHall_z);
                                                   >> 269   fExperimentalHall_log = new G4LogicalVolume(fExperimentalHall_box,
                                                   >> 270                                              fVacuum,"expHall_log",0,0,0);
                                                   >> 271   fExperimentalHall_phys = new G4PVPlacement(0,G4ThreeVector(),
                                                   >> 272                               fExperimentalHall_log,"expHall",0,false,0);
240                                                   273 
241     // Surface properties for the WLS slab     << 274   fExperimentalHall_log->SetVisAttributes(G4VisAttributes::Invisible);
242     auto scintWrap = new G4OpticalSurface("Sci << 
243                                                   275 
244     new G4LogicalBorderSurface("ScintWrap", sl << 276   //Place the main volume
                                                   >> 277   if(fMainVolumeOn){
                                                   >> 278     fMainVolume
                                                   >> 279       = new LXeMainVolume(0,G4ThreeVector(),fExperimentalHall_log,false,0,this);
                                                   >> 280   }
245                                                   281 
                                                   >> 282   //Place the WLS slab
                                                   >> 283   if(fWLSslab){
                                                   >> 284     G4VPhysicalVolume* slab = new LXeWLSSlab(0,G4ThreeVector(0.,0.,
                                                   >> 285                                              -fScint_z/2.-fSlab_z-1.*cm),
                                                   >> 286                                              fExperimentalHall_log,false,0,
                                                   >> 287                                              this);
                                                   >> 288 
                                                   >> 289     //Surface properties for the WLS slab
                                                   >> 290     G4OpticalSurface* scintWrap = new G4OpticalSurface("ScintWrap");
                                                   >> 291  
                                                   >> 292     new G4LogicalBorderSurface("ScintWrap", slab,
                                                   >> 293                                fExperimentalHall_phys,
                                                   >> 294                                scintWrap);
                                                   >> 295  
246     scintWrap->SetType(dielectric_metal);         296     scintWrap->SetType(dielectric_metal);
247     scintWrap->SetFinish(polished);               297     scintWrap->SetFinish(polished);
248     scintWrap->SetModel(glisur);                  298     scintWrap->SetModel(glisur);
249                                                   299 
250     std::vector<G4double> pp = {2.0 * eV, 3.5  << 300     G4double pp[] = {2.0*eV, 3.5*eV};
251     std::vector<G4double> reflectivity = {1.0, << 301     const G4int num = sizeof(pp)/sizeof(G4double);
252     std::vector<G4double> efficiency = {0.0, 0 << 302     G4double reflectivity[] = {1., 1.};
                                                   >> 303     assert(sizeof(reflectivity) == sizeof(pp));
                                                   >> 304     G4double efficiency[] = {0.0, 0.0};
                                                   >> 305     assert(sizeof(efficiency) == sizeof(pp));
                                                   >> 306     
                                                   >> 307     G4MaterialPropertiesTable* scintWrapProperty 
                                                   >> 308       = new G4MaterialPropertiesTable();
253                                                   309 
254     auto scintWrapProperty = new G4MaterialPro << 310     scintWrapProperty->AddProperty("REFLECTIVITY",pp,reflectivity,num);
255                                                << 311     scintWrapProperty->AddProperty("EFFICIENCY",pp,efficiency,num);
256     scintWrapProperty->AddProperty("REFLECTIVI << 
257     scintWrapProperty->AddProperty("EFFICIENCY << 
258     scintWrap->SetMaterialPropertiesTable(scin    312     scintWrap->SetMaterialPropertiesTable(scintWrapProperty);
259   }                                               313   }
260                                                   314 
261   return fExperimentalHall_phys;                  315   return fExperimentalHall_phys;
262 }                                                 316 }
263                                                   317 
264 //....oooOO0OOooo........oooOO0OOooo........oo    318 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
265                                                   319 
266 void LXeDetectorConstruction::ConstructSDandFi << 320 void LXeDetectorConstruction::ConstructSDandField() {
267 {                                              << 321 
268   if (!fMainVolume) return;                       322   if (!fMainVolume) return;
269                                                   323 
270   // PMT SD                                       324   // PMT SD
271                                                   325 
272   LXePMTSD* pmt = fPmt_SD.Get();               << 326   if (!fPmt_SD.Get()) {
273   if (!pmt) {                                  << 327     //Created here so it exists as pmts are being placed
274     // Created here so it exists as pmts are b << 
275     G4cout << "Construction /LXeDet/pmtSD" <<     328     G4cout << "Construction /LXeDet/pmtSD" << G4endl;
276     auto pmt_SD = new LXePMTSD("/LXeDet/pmtSD" << 329     LXePMTSD* pmt_SD = new LXePMTSD("/LXeDet/pmtSD");
277     fPmt_SD.Put(pmt_SD);                          330     fPmt_SD.Put(pmt_SD);
278                                                   331 
279     pmt_SD->InitPMTs();                        << 332     pmt_SD->InitPMTs((fNx*fNy+fNx*fNz+fNy*fNz)*2); //let pmtSD know # of pmts
280     pmt_SD->SetPmtPositions(fMainVolume->GetPm    333     pmt_SD->SetPmtPositions(fMainVolume->GetPmtPositions());
281   }                                               334   }
282   else {                                       << 335 
283     pmt->InitPMTs();                           << 336   //sensitive detector is not actually on the photocathode.
284     pmt->SetPmtPositions(fMainVolume->GetPmtPo << 337   //processHits gets done manually by the stepping action.
285   }                                            << 338   //It is used to detect when photons hit and get absorbed&detected at the
286   G4SDManager::GetSDMpointer()->AddNewDetector << 339   //boundary to the photocathode (which doesnt get done by attaching it to a
287   // sensitive detector is not actually on the << 340   //logical volume.
288   // processHits gets done manually by the ste << 341   //It does however need to be attached to something or else it doesnt get
289   // It is used to detect when photons hit and << 342   //reset at the begining of events
290   // boundary to the photocathode (which doesn << 
291   // logical volume.                           << 
292   // It does however need to be attached to so << 
293   // reset at the begining of events           << 
294                                                   343 
295   SetSensitiveDetector(fMainVolume->GetLogPhot    344   SetSensitiveDetector(fMainVolume->GetLogPhotoCath(), fPmt_SD.Get());
296                                                   345 
297   // Scint SD                                     346   // Scint SD
298                                                   347 
299   if (!fScint_SD.Get()) {                         348   if (!fScint_SD.Get()) {
300     G4cout << "Construction /LXeDet/scintSD" <    349     G4cout << "Construction /LXeDet/scintSD" << G4endl;
301     auto scint_SD = new LXeScintSD("/LXeDet/sc << 350     LXeScintSD* scint_SD = new LXeScintSD("/LXeDet/scintSD");
302     fScint_SD.Put(scint_SD);                      351     fScint_SD.Put(scint_SD);
303   }                                               352   }
304   G4SDManager::GetSDMpointer()->AddNewDetector << 
305   SetSensitiveDetector(fMainVolume->GetLogScin    353   SetSensitiveDetector(fMainVolume->GetLogScint(), fScint_SD.Get());
306 }                                                 354 }
307                                                   355 
308 //....oooOO0OOooo........oooOO0OOooo........oo    356 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
309                                                   357 
310 void LXeDetectorConstruction::SetDimensions(G4 << 358 void LXeDetectorConstruction::SetDimensions(G4ThreeVector dims) {
311 {                                              << 359   this->fScint_x=dims[0];
312   fScint_x = dims[0];                          << 360   this->fScint_y=dims[1];
313   fScint_y = dims[1];                          << 361   this->fScint_z=dims[2];
314   fScint_z = dims[2];                          << 
315   G4RunManager::GetRunManager()->ReinitializeG    362   G4RunManager::GetRunManager()->ReinitializeGeometry();
316 }                                                 363 }
317                                                << 364  
318 //....oooOO0OOooo........oooOO0OOooo........oo    365 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
319                                                   366 
320 void LXeDetectorConstruction::SetHousingThickn << 367 void LXeDetectorConstruction::SetHousingThickness(G4double d_mtl) {
321 {                                              << 368   this->fD_mtl=d_mtl;
322   fD_mtl = d_mtl;                              << 
323   G4RunManager::GetRunManager()->ReinitializeG    369   G4RunManager::GetRunManager()->ReinitializeGeometry();
324 }                                                 370 }
325                                                   371 
326 //....oooOO0OOooo........oooOO0OOooo........oo    372 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
327                                                   373 
328 void LXeDetectorConstruction::SetNX(G4int nx)  << 374 void LXeDetectorConstruction::SetNX(G4int nx) {
329 {                                              << 375   this->fNx=nx;
330   fNx = nx;                                    << 
331   G4RunManager::GetRunManager()->ReinitializeG    376   G4RunManager::GetRunManager()->ReinitializeGeometry();
332 }                                                 377 }
333                                                   378 
334 //....oooOO0OOooo........oooOO0OOooo........oo    379 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
335                                                   380 
336 void LXeDetectorConstruction::SetNY(G4int ny)  << 381 void LXeDetectorConstruction::SetNY(G4int ny) {
337 {                                              << 382   this->fNy=ny;
338   fNy = ny;                                    << 
339   G4RunManager::GetRunManager()->ReinitializeG    383   G4RunManager::GetRunManager()->ReinitializeGeometry();
340 }                                                 384 }
341                                                   385 
342 //....oooOO0OOooo........oooOO0OOooo........oo    386 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
343                                                   387 
344 void LXeDetectorConstruction::SetNZ(G4int nz)  << 388 void LXeDetectorConstruction::SetNZ(G4int nz) {
345 {                                              << 389   this->fNz=nz;
346   fNz = nz;                                    << 
347   G4RunManager::GetRunManager()->ReinitializeG    390   G4RunManager::GetRunManager()->ReinitializeGeometry();
348 }                                                 391 }
349                                                   392 
350 //....oooOO0OOooo........oooOO0OOooo........oo    393 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
351                                                   394 
352 void LXeDetectorConstruction::SetPMTRadius(G4d << 395 void LXeDetectorConstruction::SetPMTRadius(G4double outerRadius_pmt) {
353 {                                              << 396   this->fOuterRadius_pmt=outerRadius_pmt;
354   fOuterRadius_pmt = outerRadius_pmt;          << 
355   G4RunManager::GetRunManager()->ReinitializeG    397   G4RunManager::GetRunManager()->ReinitializeGeometry();
356 }                                                 398 }
357                                                   399 
358 //....oooOO0OOooo........oooOO0OOooo........oo    400 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
359                                                   401 
360 void LXeDetectorConstruction::SetDefaults()    << 402 void LXeDetectorConstruction::SetDefaults() {
361 {                                              << 403 
362   // Resets to default values                  << 404   //Resets to default values
363   fD_mtl = 0.0635 * cm;                        << 405   fD_mtl=0.0635*cm;
364                                                   406 
365   fScint_x = 17.8 * cm;                        << 407   fScint_x = 17.8*cm;
366   fScint_y = 17.8 * cm;                        << 408   fScint_y = 17.8*cm;
367   fScint_z = 22.6 * cm;                        << 409   fScint_z = 22.6*cm;
368                                                   410 
369   fNx = 2;                                        411   fNx = 2;
370   fNy = 2;                                        412   fNy = 2;
371   fNz = 3;                                        413   fNz = 3;
372                                                   414 
373   fOuterRadius_pmt = 2.3 * cm;                 << 415   fOuterRadius_pmt = 2.3*cm;
374                                                   416 
375   fSphereOn = true;                               417   fSphereOn = true;
376   fRefl = 1.0;                                 << 418   fRefl=1.0;
377                                                   419 
378   fNfibers = 15;                               << 420   fNfibers=15;
379   fWLSslab = false;                            << 421   fWLSslab=false;
380   fMainVolumeOn = true;                        << 422   fMainVolumeOn=true;
381   fMainVolume = nullptr;                       << 423   fMainVolume=NULL;
382   fSlab_z = 2.5 * mm;                          << 424   fSlab_z=2.5*mm;
383                                                   425 
384   G4UImanager::GetUIpointer()->ApplyCommand("/ << 426   G4UImanager::GetUIpointer()
                                                   >> 427     ->ApplyCommand("/LXe/detector/scintYieldFactor 1.");
385                                                   428 
386   if (fLXe_mt) fLXe_mt->AddConstProperty("SCIN << 429   if(fLXe_mt)fLXe_mt->AddConstProperty("SCINTILLATIONYIELD",12000./MeV);
387   if (fMPTPStyrene) fMPTPStyrene->AddConstProp << 430   if(fMPTPStyrene)fMPTPStyrene->AddConstProperty("SCINTILLATIONYIELD",10./keV);
388 }                                              << 
389                                                << 
390 //....oooOO0OOooo........oooOO0OOooo........oo << 
391                                                   431 
392 void LXeDetectorConstruction::SetSphereOn(G4bo << 
393 {                                              << 
394   fSphereOn = b;                               << 
395   G4RunManager::GetRunManager()->ReinitializeG    432   G4RunManager::GetRunManager()->ReinitializeGeometry();
396 }                                                 433 }
397                                                   434 
398 //....oooOO0OOooo........oooOO0OOooo........oo    435 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
399                                                   436 
400 void LXeDetectorConstruction::SetHousingReflec << 437 void LXeDetectorConstruction::SetSphereOn(G4bool b) {
401 {                                              << 438   fSphereOn=b;
402   fRefl = r;                                   << 
403   G4RunManager::GetRunManager()->ReinitializeG    439   G4RunManager::GetRunManager()->ReinitializeGeometry();
404 }                                                 440 }
405                                                   441 
406 //....oooOO0OOooo........oooOO0OOooo........oo    442 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
407                                                   443 
408 void LXeDetectorConstruction::SetWLSSlabOn(G4b << 444 void LXeDetectorConstruction::SetHousingReflectivity(G4double r) {
409 {                                              << 445   fRefl=r;
410   fWLSslab = b;                                << 
411   G4RunManager::GetRunManager()->ReinitializeG    446   G4RunManager::GetRunManager()->ReinitializeGeometry();
412 }                                                 447 }
413                                                   448 
414 //....oooOO0OOooo........oooOO0OOooo........oo    449 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
415                                                   450 
416 void LXeDetectorConstruction::SetMainVolumeOn( << 451 void LXeDetectorConstruction::SetWLSSlabOn(G4bool b) {
417 {                                              << 452   fWLSslab=b;
418   fMainVolumeOn = b;                           << 
419   G4RunManager::GetRunManager()->ReinitializeG    453   G4RunManager::GetRunManager()->ReinitializeGeometry();
420 }                                                 454 }
421                                                   455 
422 //....oooOO0OOooo........oooOO0OOooo........oo    456 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
423                                                   457 
424 void LXeDetectorConstruction::SetNFibers(G4int << 458 void LXeDetectorConstruction::SetMainVolumeOn(G4bool b) {
425 {                                              << 459   fMainVolumeOn=b;
426   fNfibers = n;                                << 
427   G4RunManager::GetRunManager()->ReinitializeG    460   G4RunManager::GetRunManager()->ReinitializeGeometry();
428 }                                                 461 }
429                                                   462 
430 //....oooOO0OOooo........oooOO0OOooo........oo    463 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
431                                                   464 
432 void LXeDetectorConstruction::SetMainScintYiel << 465 void LXeDetectorConstruction::SetNFibers(G4int n) {
433 {                                              << 466   fNfibers=n;
434   fLXe_mt->AddConstProperty("SCINTILLATIONYIEL << 467   G4RunManager::GetRunManager()->ReinitializeGeometry();
435 }                                                 468 }
436                                                   469 
437 //....oooOO0OOooo........oooOO0OOooo........oo    470 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
438                                                   471 
439 void LXeDetectorConstruction::SetWLSScintYield << 472 void LXeDetectorConstruction::SetMainScintYield(G4double y) {
440 {                                              << 473   fLXe_mt->AddConstProperty("SCINTILLATIONYIELD",y/MeV);
441   fMPTPStyrene->AddConstProperty("SCINTILLATIO << 
442 }                                                 474 }
443                                                   475 
444 //....oooOO0OOooo........oooOO0OOooo........oo    476 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
445                                                << 477  
446 void LXeDetectorConstruction::SetSaveThreshold << 478 void LXeDetectorConstruction::SetWLSScintYield(G4double y) {
447 {                                              << 479   fMPTPStyrene->AddConstProperty("SCINTILLATIONYIELD",y/MeV);
448   // Sets the save threshold for the random nu << 
449   // photons generated in an event is lower th << 
450   // this event in a file called run###evt###. << 
451                                                << 
452   fSaveThreshold = save;                       << 
453   G4RunManager::GetRunManager()->SetRandomNumb << 
454 }                                                 480 }
455                                                << 
456 //....oooOO0OOooo........oooOO0OOooo........oo << 
457                                                   481