Geant4 Cross Reference

Cross-Referencing   Geant4
Geant4/examples/extended/optical/wls/src/WLSMaterials.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/wls/src/WLSMaterials.cc (Version 11.3.0) and /examples/extended/optical/wls/src/WLSMaterials.cc (Version 10.1.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 // $Id: WLSMaterials.cc 82854 2014-07-14 09:08:25Z gcosmo $
 26 //                                                 27 //
 27 /// \file optical/wls/src/WLSMaterials.cc          28 /// \file optical/wls/src/WLSMaterials.cc
 28 /// \brief Implementation of the WLSMaterials      29 /// \brief Implementation of the WLSMaterials class
 29 //                                                 30 //
 30 //                                                 31 //
 31 #include "WLSMaterials.hh"                         32 #include "WLSMaterials.hh"
 32                                                    33 
 33 #include "G4NistManager.hh"                    << 
 34 #include "G4SystemOfUnits.hh"                      34 #include "G4SystemOfUnits.hh"
 35                                                    35 
 36 WLSMaterials* WLSMaterials::fInstance = nullpt <<  36 WLSMaterials* WLSMaterials::fInstance = 0;
 37                                                    37 
 38 //....oooOO0OOooo........oooOO0OOooo........oo     38 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
 39                                                    39 
 40 WLSMaterials::WLSMaterials()                       40 WLSMaterials::WLSMaterials()
 41 {                                                  41 {
 42   fNistMan = G4NistManager::Instance();            42   fNistMan = G4NistManager::Instance();
                                                   >>  43 
 43   fNistMan->SetVerbose(2);                         44   fNistMan->SetVerbose(2);
 44                                                    45 
 45   CreateMaterials();                               46   CreateMaterials();
 46 }                                                  47 }
 47                                                    48 
 48 //....oooOO0OOooo........oooOO0OOooo........oo     49 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
 49                                                    50 
 50 WLSMaterials::~WLSMaterials()                      51 WLSMaterials::~WLSMaterials()
 51 {                                                  52 {
 52   delete fAir;                                 <<  53   delete    fPMMA;
 53   delete fPMMA;                                <<  54   delete    fPethylene;
 54   delete fPethylene;                           <<  55   delete    fFPethylene;
 55   delete fFPethylene;                          <<  56   delete    fPolystyrene;
 56   delete fPolystyrene;                         <<  57   delete    fSilicone;
 57   delete fSilicone;                            << 
 58   delete fCoating;                             << 
 59 }                                                  58 }
 60                                                    59 
 61 //....oooOO0OOooo........oooOO0OOooo........oo     60 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
 62                                                    61 
 63 WLSMaterials* WLSMaterials::GetInstance()          62 WLSMaterials* WLSMaterials::GetInstance()
 64 {                                                  63 {
 65   if (!fInstance) {                            <<  64   if (fInstance == 0)
 66     fInstance = new WLSMaterials();            <<  65     {
 67   }                                            <<  66       fInstance = new WLSMaterials();
                                                   >>  67     }
 68   return fInstance;                                68   return fInstance;
 69 }                                                  69 }
 70                                                    70 
 71 //....oooOO0OOooo........oooOO0OOooo........oo     71 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
 72                                                    72 
 73 G4Material* WLSMaterials::GetMaterial(const G4     73 G4Material* WLSMaterials::GetMaterial(const G4String material)
 74 {                                                  74 {
 75   G4Material* mat = fNistMan->FindOrBuildMater <<  75   G4Material* mat =  fNistMan->FindOrBuildMaterial(material);
 76                                                    76 
 77   if (!mat) mat = G4Material::GetMaterial(mate     77   if (!mat) mat = G4Material::GetMaterial(material);
 78   if (!mat) {                                      78   if (!mat) {
 79     G4ExceptionDescription ed;                 <<  79      std::ostringstream o;
 80     ed << "Material " << material << " not fou <<  80      o << "Material " << material << " not found!";
 81     G4Exception("WLSMaterials::GetMaterial", " <<  81      G4Exception("WLSMaterials::GetMaterial","",
                                                   >>  82                  FatalException,o.str().c_str());
 82   }                                                83   }
 83                                                    84 
 84   return mat;                                      85   return mat;
 85 }                                                  86 }
 86                                                    87 
 87 //....oooOO0OOooo........oooOO0OOooo........oo     88 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
 88                                                    89 
 89 void WLSMaterials::CreateMaterials()               90 void WLSMaterials::CreateMaterials()
 90 {                                                  91 {
 91   G4double density;                                92   G4double density;
 92   G4int ncomponents;                               93   G4int ncomponents;
 93   G4double fractionmass;                           94   G4double fractionmass;
 94   std::vector<G4int> natoms;                       95   std::vector<G4int> natoms;
 95   std::vector<G4double> fractionMass;              96   std::vector<G4double> fractionMass;
 96   std::vector<G4String> elements;                  97   std::vector<G4String> elements;
 97                                                    98 
 98   // Materials Definitions                         99   // Materials Definitions
 99   // =====================                        100   // =====================
100                                                   101 
101   //------------------------------------------    102   //--------------------------------------------------
102   // Vacuum                                       103   // Vacuum
103   //------------------------------------------    104   //--------------------------------------------------
104                                                   105 
105   fNistMan->FindOrBuildMaterial("G4_Galactic")    106   fNistMan->FindOrBuildMaterial("G4_Galactic");
106                                                   107 
107   //------------------------------------------    108   //--------------------------------------------------
108   // Air                                          109   // Air
109   //------------------------------------------    110   //--------------------------------------------------
110                                                   111 
111   fAir = fNistMan->FindOrBuildMaterial("G4_AIR    112   fAir = fNistMan->FindOrBuildMaterial("G4_AIR");
112                                                   113 
113   //------------------------------------------    114   //--------------------------------------------------
114   // WLSfiber PMMA                                115   // WLSfiber PMMA
115   //------------------------------------------    116   //--------------------------------------------------
116                                                   117 
117   elements.push_back("C");                     << 118   elements.push_back("C");     natoms.push_back(5);
118   natoms.push_back(5);                         << 119   elements.push_back("H");     natoms.push_back(8);
119   elements.push_back("H");                     << 120   elements.push_back("O");     natoms.push_back(2);
120   natoms.push_back(8);                         << 
121   elements.push_back("O");                     << 
122   natoms.push_back(2);                         << 
123                                                   121 
124   density = 1.190 * g / cm3;                   << 122   density = 1.190*g/cm3;
125                                                   123 
126   fPMMA = fNistMan->ConstructNewMaterial("PMMA << 124   fPMMA = fNistMan->
                                                   >> 125           ConstructNewMaterial("PMMA", elements, natoms, density);
127                                                   126 
128   elements.clear();                               127   elements.clear();
129   natoms.clear();                                 128   natoms.clear();
130                                                   129 
131   //------------------------------------------    130   //--------------------------------------------------
132   // Cladding (polyethylene)                      131   // Cladding (polyethylene)
133   //------------------------------------------    132   //--------------------------------------------------
134                                                   133 
135   elements.push_back("C");                     << 134   elements.push_back("C");     natoms.push_back(2);
136   natoms.push_back(2);                         << 135   elements.push_back("H");     natoms.push_back(4);
137   elements.push_back("H");                     << 
138   natoms.push_back(4);                         << 
139                                                   136 
140   density = 1.200 * g / cm3;                   << 137   density = 1.200*g/cm3;
141                                                   138 
142   fPethylene = fNistMan->ConstructNewMaterial( << 139   fPethylene = fNistMan->
                                                   >> 140           ConstructNewMaterial("Pethylene", elements, natoms, density);
143                                                   141 
144   elements.clear();                               142   elements.clear();
145   natoms.clear();                                 143   natoms.clear();
146                                                   144 
147   //------------------------------------------    145   //--------------------------------------------------
148   // Double Cladding (fluorinated polyethylene    146   // Double Cladding (fluorinated polyethylene)
149   //------------------------------------------    147   //--------------------------------------------------
150                                                   148 
151   elements.push_back("C");                     << 149   elements.push_back("C");     natoms.push_back(2);
152   natoms.push_back(2);                         << 150   elements.push_back("H");     natoms.push_back(4);
153   elements.push_back("H");                     << 
154   natoms.push_back(4);                         << 
155                                                   151 
156   density = 1.400 * g / cm3;                   << 152   density = 1.400*g/cm3;
157                                                   153 
158   fFPethylene = fNistMan->ConstructNewMaterial << 154   fFPethylene = fNistMan->
                                                   >> 155           ConstructNewMaterial("FPethylene", elements, natoms, density);
159                                                   156 
160   elements.clear();                               157   elements.clear();
161   natoms.clear();                                 158   natoms.clear();
162                                                   159 
163   //------------------------------------------    160   //--------------------------------------------------
164   // Polystyrene                                  161   // Polystyrene
165   //------------------------------------------    162   //--------------------------------------------------
                                                   >> 163  
                                                   >> 164   elements.push_back("C");     natoms.push_back(8);
                                                   >> 165   elements.push_back("H");     natoms.push_back(8);
166                                                   166 
167   elements.push_back("C");                     << 167   density = 1.050*g/cm3;
168   natoms.push_back(8);                         << 
169   elements.push_back("H");                     << 
170   natoms.push_back(8);                         << 
171                                                << 
172   density = 1.050 * g / cm3;                   << 
173                                                   168 
174   fPolystyrene = fNistMan->ConstructNewMateria << 169   fPolystyrene = fNistMan->
                                                   >> 170           ConstructNewMaterial("Polystyrene", elements, natoms, density);
175                                                   171 
176   elements.clear();                               172   elements.clear();
177   natoms.clear();                                 173   natoms.clear();
178                                                   174 
179   //------------------------------------------    175   //--------------------------------------------------
180   // Silicone (Template for Optical Grease)       176   // Silicone (Template for Optical Grease)
181   //------------------------------------------    177   //--------------------------------------------------
182                                                   178 
183   elements.push_back("C");                     << 179   elements.push_back("C");     natoms.push_back(2);
184   natoms.push_back(2);                         << 180   elements.push_back("H");     natoms.push_back(6);
185   elements.push_back("H");                     << 181   
186   natoms.push_back(6);                         << 182   density = 1.060*g/cm3;
187                                                   183 
188   density = 1.060 * g / cm3;                   << 184   fSilicone = fNistMan->
189                                                << 185           ConstructNewMaterial("Silicone", elements, natoms, density);
190   fSilicone = fNistMan->ConstructNewMaterial(" << 
191                                                   186 
192   elements.clear();                               187   elements.clear();
193   natoms.clear();                                 188   natoms.clear();
194                                                   189 
195   //------------------------------------------    190   //--------------------------------------------------
196   // Aluminium                                    191   // Aluminium
197   //------------------------------------------    192   //--------------------------------------------------
198                                                   193 
199   fNistMan->FindOrBuildMaterial("G4_Al");         194   fNistMan->FindOrBuildMaterial("G4_Al");
200                                                   195 
201   //------------------------------------------    196   //--------------------------------------------------
202   // TiO2                                         197   // TiO2
203   //------------------------------------------    198   //--------------------------------------------------
204                                                   199 
205   elements.push_back("Ti");                    << 200   elements.push_back("Ti");     natoms.push_back(1);
206   natoms.push_back(1);                         << 201   elements.push_back("O");      natoms.push_back(2);
207   elements.push_back("O");                     << 
208   natoms.push_back(2);                         << 
209                                                   202 
210   density = 4.26 * g / cm3;                    << 203   density     = 4.26*g/cm3;
211                                                   204 
212   G4Material* TiO2 = fNistMan->ConstructNewMat << 205   G4Material* TiO2 = fNistMan->
                                                   >> 206           ConstructNewMaterial("TiO2", elements, natoms, density);
213                                                   207 
214   elements.clear();                               208   elements.clear();
215   natoms.clear();                                 209   natoms.clear();
216                                                   210 
217   //------------------------------------------    211   //--------------------------------------------------
218   // Scintillator Coating - 15% TiO2 and 85% p    212   // Scintillator Coating - 15% TiO2 and 85% polystyrene by weight.
219   //------------------------------------------    213   //--------------------------------------------------
220                                                   214 
221   density = 1.52 * g / cm3;                    << 215   density = 1.52*g/cm3;
222                                                   216 
223   fCoating = new G4Material("Coating", density << 217   fCoating =
                                                   >> 218           new G4Material("Coating", density, ncomponents=2);
224                                                   219 
225   fCoating->AddMaterial(TiO2, fractionmass = 1 << 220   fCoating->AddMaterial(TiO2,         fractionmass = 15*perCent);
226   fCoating->AddMaterial(fPolystyrene, fraction << 221   fCoating->AddMaterial(fPolystyrene, fractionmass = 85*perCent);
227                                                   222 
228   //                                              223   //
229   // ------------ Generate & Add Material Prop    224   // ------------ Generate & Add Material Properties Table ------------
230   //                                              225   //
231                                                   226 
232   std::vector<G4double> energy = {             << 227   G4double photonEnergy[] =
233     2.00 * eV, 2.03 * eV, 2.06 * eV, 2.09 * eV << 228   {2.00*eV,2.03*eV,2.06*eV,2.09*eV,2.12*eV,
234     2.24 * eV, 2.27 * eV, 2.30 * eV, 2.33 * eV << 229    2.15*eV,2.18*eV,2.21*eV,2.24*eV,2.27*eV,
235     2.48 * eV, 2.51 * eV, 2.54 * eV, 2.57 * eV << 230    2.30*eV,2.33*eV,2.36*eV,2.39*eV,2.42*eV,
236     2.72 * eV, 2.75 * eV, 2.78 * eV, 2.81 * eV << 231    2.45*eV,2.48*eV,2.51*eV,2.54*eV,2.57*eV,
237     2.96 * eV, 2.99 * eV, 3.02 * eV, 3.05 * eV << 232    2.60*eV,2.63*eV,2.66*eV,2.69*eV,2.72*eV,
238     3.20 * eV, 3.23 * eV, 3.26 * eV, 3.29 * eV << 233    2.75*eV,2.78*eV,2.81*eV,2.84*eV,2.87*eV,
239     3.44 * eV, 3.47 * eV};                     << 234    2.90*eV,2.93*eV,2.96*eV,2.99*eV,3.02*eV,
                                                   >> 235    3.05*eV,3.08*eV,3.11*eV,3.14*eV,3.17*eV,
                                                   >> 236    3.20*eV,3.23*eV,3.26*eV,3.29*eV,3.32*eV,
                                                   >> 237    3.35*eV,3.38*eV,3.41*eV,3.44*eV,3.47*eV};
240                                                   238 
241   std::vector<G4double> energySmall = {2.0 * e << 239   const G4int nEntries = sizeof(photonEnergy)/sizeof(G4double);
242                                                   240 
243   //------------------------------------------    241   //--------------------------------------------------
244   // Air                                          242   // Air
245   //------------------------------------------    243   //--------------------------------------------------
246                                                   244 
247   std::vector<G4double> refractiveIndex = {1.0 << 245   G4double refractiveIndex[] =
                                                   >> 246   { 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00,
                                                   >> 247     1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00,
                                                   >> 248     1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00,
                                                   >> 249     1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00,
                                                   >> 250     1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00};
                                                   >> 251 
                                                   >> 252   assert(sizeof(refractiveIndex) == sizeof(photonEnergy));
248                                                   253 
249   auto mpt = new G4MaterialPropertiesTable();  << 254   G4MaterialPropertiesTable* mpt = new G4MaterialPropertiesTable();
250   mpt->AddProperty("RINDEX", energySmall, refr << 255   mpt->AddProperty("RINDEX", photonEnergy, refractiveIndex, nEntries);
251                                                   256 
252   fAir->SetMaterialPropertiesTable(mpt);          257   fAir->SetMaterialPropertiesTable(mpt);
253                                                   258 
254   //------------------------------------------    259   //--------------------------------------------------
255   //  PMMA for WLSfibers                          260   //  PMMA for WLSfibers
256   //------------------------------------------    261   //--------------------------------------------------
257                                                   262 
258   std::vector<G4double> refractiveIndexWLSfibe << 263   G4double refractiveIndexWLSfiber[] =
                                                   >> 264   { 1.60, 1.60, 1.60, 1.60, 1.60, 1.60, 1.60, 1.60, 1.60, 1.60,
                                                   >> 265     1.60, 1.60, 1.60, 1.60, 1.60, 1.60, 1.60, 1.60, 1.60, 1.60,
                                                   >> 266     1.60, 1.60, 1.60, 1.60, 1.60, 1.60, 1.60, 1.60, 1.60, 1.60,
                                                   >> 267     1.60, 1.60, 1.60, 1.60, 1.60, 1.60, 1.60, 1.60, 1.60, 1.60,
                                                   >> 268     1.60, 1.60, 1.60, 1.60, 1.60, 1.60, 1.60, 1.60, 1.60, 1.60};
                                                   >> 269 
                                                   >> 270   assert(sizeof(refractiveIndexWLSfiber) == sizeof(photonEnergy));
                                                   >> 271 
                                                   >> 272   G4double absWLSfiber[] =
                                                   >> 273   {5.40*m,5.40*m,5.40*m,5.40*m,5.40*m,5.40*m,5.40*m,5.40*m,5.40*m,5.40*m,
                                                   >> 274    5.40*m,5.40*m,5.40*m,5.40*m,5.40*m,5.40*m,5.40*m,5.40*m,5.40*m,5.40*m,
                                                   >> 275    5.40*m,5.40*m,5.40*m,5.40*m,5.40*m,5.40*m,5.40*m,5.40*m,5.40*m,1.10*m,
                                                   >> 276    1.10*m,1.10*m,1.10*m,1.10*m,1.10*m,1.10*m, 1.*mm, 1.*mm, 1.*mm, 1.*mm,
                                                   >> 277     1.*mm, 1.*mm, 1.*mm, 1.*mm, 1.*mm, 1.*mm, 1.*mm, 1.*mm, 1.*mm, 1.*mm};
                                                   >> 278 
                                                   >> 279   assert(sizeof(absWLSfiber) == sizeof(photonEnergy));
                                                   >> 280 
                                                   >> 281   G4double emissionFib[] =
                                                   >> 282   {0.05, 0.10, 0.30, 0.50, 0.75, 1.00, 1.50, 1.85, 2.30, 2.75,
                                                   >> 283    3.25, 3.80, 4.50, 5.20, 6.00, 7.00, 8.50, 9.50, 11.1, 12.4,
                                                   >> 284    12.9, 13.0, 12.8, 12.3, 11.1, 11.0, 12.0, 11.0, 17.0, 16.9,
                                                   >> 285    15.0, 9.00, 2.50, 1.00, 0.05, 0.00, 0.00, 0.00, 0.00, 0.00,
                                                   >> 286    0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00};
259                                                   287 
260   std::vector<G4double> absWLSfiber = {        << 288   assert(sizeof(emissionFib) == sizeof(photonEnergy));
261     5.40 * m, 5.40 * m, 5.40 * m, 5.40 * m, 5. << 
262     5.40 * m, 5.40 * m, 5.40 * m, 5.40 * m, 5. << 
263     5.40 * m, 5.40 * m, 5.40 * m, 5.40 * m, 5. << 
264     5.40 * m, 5.40 * m, 1.10 * m, 1.10 * m, 1. << 
265     1. * mm,  1. * mm,  1. * mm,  1. * mm,  1. << 
266     1. * mm,  1. * mm,  1. * mm,  1. * mm,  1. << 
267                                                << 
268   std::vector<G4double> emissionFib = {0.05, 0 << 
269                                        3.25, 3 << 
270                                        12.9, 1 << 
271                                        15.0, 9 << 
272                                        0.00, 0 << 
273                                                   289 
274   // Add entries into properties table            290   // Add entries into properties table
275   auto mptWLSfiber = new G4MaterialPropertiesT << 291   G4MaterialPropertiesTable* mptWLSfiber = new G4MaterialPropertiesTable();
276   mptWLSfiber->AddProperty("RINDEX", energySma << 292   mptWLSfiber->
277   mptWLSfiber->AddProperty("WLSABSLENGTH", ene << 293            AddProperty("RINDEX",photonEnergy,refractiveIndexWLSfiber,nEntries);
278   mptWLSfiber->AddProperty("WLSCOMPONENT", ene << 294   // mptWLSfiber->AddProperty("ABSLENGTH",photonEnergy,absWLSfiber,nEntries);
279   mptWLSfiber->AddConstProperty("WLSTIMECONSTA << 295   mptWLSfiber->AddProperty("WLSABSLENGTH",photonEnergy,absWLSfiber,nEntries);
                                                   >> 296   mptWLSfiber->AddProperty("WLSCOMPONENT",photonEnergy,emissionFib,nEntries);
                                                   >> 297   mptWLSfiber->AddConstProperty("WLSTIMECONSTANT", 0.5*ns);
280                                                   298 
281   fPMMA->SetMaterialPropertiesTable(mptWLSfibe    299   fPMMA->SetMaterialPropertiesTable(mptWLSfiber);
282                                                   300 
283   //------------------------------------------    301   //--------------------------------------------------
284   //  Polyethylene                                302   //  Polyethylene
285   //------------------------------------------    303   //--------------------------------------------------
286                                                   304 
287   std::vector<G4double> refractiveIndexClad1 = << 305   G4double refractiveIndexClad1[] =
                                                   >> 306   { 1.49, 1.49, 1.49, 1.49, 1.49, 1.49, 1.49, 1.49, 1.49, 1.49,
                                                   >> 307     1.49, 1.49, 1.49, 1.49, 1.49, 1.49, 1.49, 1.49, 1.49, 1.49,
                                                   >> 308     1.49, 1.49, 1.49, 1.49, 1.49, 1.49, 1.49, 1.49, 1.49, 1.49,
                                                   >> 309     1.49, 1.49, 1.49, 1.49, 1.49, 1.49, 1.49, 1.49, 1.49, 1.49,
                                                   >> 310     1.49, 1.49, 1.49, 1.49, 1.49, 1.49, 1.49, 1.49, 1.49, 1.49};
                                                   >> 311 
                                                   >> 312   assert(sizeof(refractiveIndexClad1) == sizeof(photonEnergy));
                                                   >> 313 
                                                   >> 314   G4double absClad[] =
                                                   >> 315   {20.0*m,20.0*m,20.0*m,20.0*m,20.0*m,20.0*m,20.0*m,20.0*m,20.0*m,20.0*m,
                                                   >> 316    20.0*m,20.0*m,20.0*m,20.0*m,20.0*m,20.0*m,20.0*m,20.0*m,20.0*m,20.0*m,
                                                   >> 317    20.0*m,20.0*m,20.0*m,20.0*m,20.0*m,20.0*m,20.0*m,20.0*m,20.0*m,20.0*m,
                                                   >> 318    20.0*m,20.0*m,20.0*m,20.0*m,20.0*m,20.0*m,20.0*m,20.0*m,20.0*m,20.0*m,
                                                   >> 319    20.0*m,20.0*m,20.0*m,20.0*m,20.0*m,20.0*m,20.0*m,20.0*m,20.0*m,20.0*m};
288                                                   320 
289   std::vector<G4double> absClad = {20.0 * m, 2 << 321   assert(sizeof(absClad) == sizeof(photonEnergy));
290                                                   322 
291   // Add entries into properties table            323   // Add entries into properties table
292   auto mptClad1 = new G4MaterialPropertiesTabl << 324   G4MaterialPropertiesTable* mptClad1 = new G4MaterialPropertiesTable();
293   mptClad1->AddProperty("RINDEX", energySmall, << 325   mptClad1->AddProperty("RINDEX",photonEnergy,refractiveIndexClad1,nEntries);
294   mptClad1->AddProperty("ABSLENGTH", energySma << 326   mptClad1->AddProperty("ABSLENGTH",photonEnergy,absClad,nEntries);
295                                                   327 
296   fPethylene->SetMaterialPropertiesTable(mptCl    328   fPethylene->SetMaterialPropertiesTable(mptClad1);
297                                                   329 
298   //------------------------------------------    330   //--------------------------------------------------
299   // Fluorinated Polyethylene                     331   // Fluorinated Polyethylene
300   //------------------------------------------    332   //--------------------------------------------------
301                                                   333 
302   std::vector<G4double> refractiveIndexClad2 = << 334    G4double refractiveIndexClad2[] =
                                                   >> 335    { 1.42, 1.42, 1.42, 1.42, 1.42, 1.42, 1.42, 1.42, 1.42, 1.42,
                                                   >> 336      1.42, 1.42, 1.42, 1.42, 1.42, 1.42, 1.42, 1.42, 1.42, 1.42,
                                                   >> 337      1.42, 1.42, 1.42, 1.42, 1.42, 1.42, 1.42, 1.42, 1.42, 1.42,
                                                   >> 338      1.42, 1.42, 1.42, 1.42, 1.42, 1.42, 1.42, 1.42, 1.42, 1.42,
                                                   >> 339      1.42, 1.42, 1.42, 1.42, 1.42, 1.42, 1.42, 1.42, 1.42, 1.42};
                                                   >> 340 
                                                   >> 341    assert(sizeof(refractiveIndexClad2) == sizeof(photonEnergy));
303                                                   342 
304   // Add entries into properties table            343   // Add entries into properties table
305   auto mptClad2 = new G4MaterialPropertiesTabl << 344   G4MaterialPropertiesTable* mptClad2 = new G4MaterialPropertiesTable();
306   mptClad2->AddProperty("RINDEX", energySmall, << 345   mptClad2->AddProperty("RINDEX",photonEnergy,refractiveIndexClad2,nEntries);
307   mptClad2->AddProperty("ABSLENGTH", energySma << 346   mptClad2->AddProperty("ABSLENGTH",photonEnergy,absClad,nEntries);
308                                                   347 
309   fFPethylene->SetMaterialPropertiesTable(mptC    348   fFPethylene->SetMaterialPropertiesTable(mptClad2);
310                                                   349 
311   //------------------------------------------    350   //--------------------------------------------------
312   // Silicone                                     351   // Silicone
313   //------------------------------------------    352   //--------------------------------------------------
314                                                   353 
315   std::vector<G4double> refractiveIndexSilicon << 354    G4double refractiveIndexSilicone[] =
                                                   >> 355    { 1.46, 1.46, 1.46, 1.46, 1.46, 1.46, 1.46, 1.46, 1.46, 1.46,
                                                   >> 356      1.46, 1.46, 1.46, 1.46, 1.46, 1.46, 1.46, 1.46, 1.46, 1.46,
                                                   >> 357      1.46, 1.46, 1.46, 1.46, 1.46, 1.46, 1.46, 1.46, 1.46, 1.46,
                                                   >> 358      1.46, 1.46, 1.46, 1.46, 1.46, 1.46, 1.46, 1.46, 1.46, 1.46,
                                                   >> 359      1.46, 1.46, 1.46, 1.46, 1.46, 1.46, 1.46, 1.46, 1.46, 1.46};
                                                   >> 360 
                                                   >> 361    assert(sizeof(refractiveIndexSilicone) == sizeof(photonEnergy));
316                                                   362 
317   // Add entries into properties table            363   // Add entries into properties table
318   auto mptSilicone = new G4MaterialPropertiesT << 364   G4MaterialPropertiesTable* mptSilicone = new G4MaterialPropertiesTable();
319   mptSilicone->AddProperty("RINDEX", energySma << 365   mptSilicone->
320   mptSilicone->AddProperty("ABSLENGTH", energy << 366            AddProperty("RINDEX",photonEnergy,refractiveIndexSilicone,nEntries);
                                                   >> 367   mptSilicone->AddProperty("ABSLENGTH",photonEnergy,absClad,nEntries);
321                                                   368 
322   fSilicone->SetMaterialPropertiesTable(mptSil    369   fSilicone->SetMaterialPropertiesTable(mptSilicone);
323                                                   370 
324   //------------------------------------------    371   //--------------------------------------------------
325   //  Polystyrene                                 372   //  Polystyrene
326   //------------------------------------------    373   //--------------------------------------------------
327                                                   374 
328   std::vector<G4double> refractiveIndexPS = {1 << 375   G4double refractiveIndexPS[] =
329                                                << 376   { 1.50, 1.50, 1.50, 1.50, 1.50, 1.50, 1.50, 1.50, 1.50, 1.50,
330   std::vector<G4double> absPS = {2. * cm, 2. * << 377     1.50, 1.50, 1.50, 1.50, 1.50, 1.50, 1.50, 1.50, 1.50, 1.50,
                                                   >> 378     1.50, 1.50, 1.50, 1.50, 1.50, 1.50, 1.50, 1.50, 1.50, 1.50,
                                                   >> 379     1.50, 1.50, 1.50, 1.50, 1.50, 1.50, 1.50, 1.50, 1.50, 1.50,
                                                   >> 380     1.50, 1.50, 1.50, 1.50, 1.50, 1.50, 1.50, 1.50, 1.50, 1.50};
                                                   >> 381 
                                                   >> 382   assert(sizeof(refractiveIndexPS) == sizeof(photonEnergy));
                                                   >> 383 
                                                   >> 384   G4double absPS[] =
                                                   >> 385   {2.*cm,2.*cm,2.*cm,2.*cm,2.*cm,2.*cm,2.*cm,2.*cm,2.*cm,2.*cm,
                                                   >> 386    2.*cm,2.*cm,2.*cm,2.*cm,2.*cm,2.*cm,2.*cm,2.*cm,2.*cm,2.*cm,
                                                   >> 387    2.*cm,2.*cm,2.*cm,2.*cm,2.*cm,2.*cm,2.*cm,2.*cm,2.*cm,2.*cm,
                                                   >> 388    2.*cm,2.*cm,2.*cm,2.*cm,2.*cm,2.*cm,2.*cm,2.*cm,2.*cm,2.*cm,
                                                   >> 389    2.*cm,2.*cm,2.*cm,2.*cm,2.*cm,2.*cm,2.*cm,2.*cm,2.*cm,2.*cm};
                                                   >> 390 
                                                   >> 391   assert(sizeof(absPS) == sizeof(photonEnergy));
                                                   >> 392 
                                                   >> 393   G4double scintilFast[] =
                                                   >> 394   {0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
                                                   >> 395    0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
                                                   >> 396    0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
                                                   >> 397    1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0,
                                                   >> 398    1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0};
331                                                   399 
332   std::vector<G4double> scintilFast = {        << 400   assert(sizeof(scintilFast) == sizeof(photonEnergy));
333     0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0. << 
334     0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0. << 
335     1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1. << 
336                                                   401 
337   // Add entries into properties table            402   // Add entries into properties table
338   auto mptPolystyrene = new G4MaterialProperti << 403   G4MaterialPropertiesTable* mptPolystyrene = new G4MaterialPropertiesTable();
339   mptPolystyrene->AddProperty("RINDEX", energy << 404   mptPolystyrene->AddProperty("RINDEX",photonEnergy,refractiveIndexPS,nEntries);
340   mptPolystyrene->AddProperty("ABSLENGTH", ene << 405   mptPolystyrene->AddProperty("ABSLENGTH",photonEnergy,absPS,nEntries);
341   mptPolystyrene->AddProperty("SCINTILLATIONCO << 406   mptPolystyrene->
342   mptPolystyrene->AddConstProperty("SCINTILLAT << 407                AddProperty("FASTCOMPONENT",photonEnergy, scintilFast,nEntries);
343   mptPolystyrene->AddConstProperty("RESOLUTION << 408   mptPolystyrene->AddConstProperty("SCINTILLATIONYIELD",10./keV);
344   mptPolystyrene->AddConstProperty("SCINTILLAT << 409   mptPolystyrene->AddConstProperty("RESOLUTIONSCALE",1.0);
345                                                << 410   mptPolystyrene->AddConstProperty("FASTTIMECONSTANT", 10.*ns);
                                                   >> 411  
346   fPolystyrene->SetMaterialPropertiesTable(mpt    412   fPolystyrene->SetMaterialPropertiesTable(mptPolystyrene);
347                                                   413 
348   // Set the Birks Constant for the Polystyren    414   // Set the Birks Constant for the Polystyrene scintillator
349   fPolystyrene->GetIonisation()->SetBirksConst << 415 
                                                   >> 416   fPolystyrene->GetIonisation()->SetBirksConstant(0.126*mm/MeV);
                                                   >> 417 
350 }                                                 418 }
351                                                   419