Geant4 Cross Reference

Cross-Referencing   Geant4
Geant4/examples/advanced/exp_microdosimetry/src/DetectorConstruction.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/advanced/exp_microdosimetry/src/DetectorConstruction.cc (Version 11.3.0) and /examples/advanced/exp_microdosimetry/src/DetectorConstruction.cc (Version 8.3.p1)


  1 //                                                  1 
  2 // *******************************************    
  3 // * License and Disclaimer                       
  4 // *                                              
  5 // * The  Geant4 software  is  copyright of th    
  6 // * the Geant4 Collaboration.  It is provided    
  7 // * conditions of the Geant4 Software License    
  8 // * LICENSE and available at  http://cern.ch/    
  9 // * include a list of copyright holders.         
 10 // *                                              
 11 // * Neither the authors of this software syst    
 12 // * institutes,nor the agencies providing fin    
 13 // * work  make  any representation or  warran    
 14 // * regarding  this  software system or assum    
 15 // * use.  Please see the license in the file     
 16 // * for the full disclaimer and the limitatio    
 17 // *                                              
 18 // * This  code  implementation is the result     
 19 // * technical work of the GEANT4 collaboratio    
 20 // * By using,  copying,  modifying or  distri    
 21 // * any work based  on the software)  you  ag    
 22 // * use  in  resulting  scientific  publicati    
 23 // * acceptance of all terms of the Geant4 Sof    
 24 // *******************************************    
 25 //                                                
 26 // Authors: Susanna Guatelli and Francesco Rom    
 27 // susanna@uow.edu.au, francesco.romano@ct.inf    
 28                                                   
 29 // Modified by Jacopo Magini: j.magini@surrey.    
 30                                                   
 31 // Modified by David Bolst: db001@uowmail.edu.    
 32 // Added geometry of "bridge" microdosimeter (    
 33                                                   
 34 #include "DetectorConstruction.hh"                
 35 #include "globals.hh"                             
 36 #include "G4Element.hh"                           
 37 #include "G4Material.hh"                          
 38 #include "G4PVPlacement.hh"                       
 39 #include "G4LogicalVolume.hh"                     
 40 #include "G4Box.hh"                               
 41 #include "G4Tubs.hh"                              
 42 //#include "G4SubtractionSolid.hh"                
 43 #include "G4FieldManager.hh"                      
 44 #include "G4TransportationManager.hh"             
 45 #include "G4ChordFinder.hh"                       
 46 #include "G4Colour.hh"                            
 47 #include "G4VisAttributes.hh"                     
 48 #include "SensitiveDetector.hh"                   
 49 #include "G4SDManager.hh"                         
 50 #include "G4UserLimits.hh"                        
 51 #include "Randomize.hh"                           
 52 #include "G4ThreeVector.hh"                       
 53 #include "G4GeometryTolerance.hh"                 
 54 #include "G4GeometryManager.hh"                   
 55 #include "G4SystemOfUnits.hh"                     
 56 #include "G4NistManager.hh"                       
 57                                                   
 58 DetectorConstruction::DetectorConstruction(Ana    
 59 {                                                 
 60   analysis = analysis_manager;                    
 61   messenger = detector_messenger;                 
 62                                                   
 63   detectorType = messenger -> GetDetectorType(    
 64   detectorSizeWidth = messenger -> GetDetector    
 65   detectorSizeThickness = messenger -> GetDete    
 66   secondStageSizeDim = messenger -> GetSecondS    
 67   secondStageSizeThickness = messenger -> GetS    
 68                                                   
 69   usingWaterPhantom = messenger -> IsPhantomEn    
 70                                                   
 71   detectorPositionDepth = messenger -> GetDete    
 72                                                   
 73   nistMan = G4NistManager::Instance();            
 74 }                                                 
 75                                                   
 76 DetectorConstruction::~DetectorConstruction(){    
 77                                                   
 78 }                                                 
 79                                                   
 80 G4VPhysicalVolume* DetectorConstruction::Const    
 81 {                                                 
 82   if( usingWaterPhantom == true ) ConstructWor    
 83   else ConstructVacuumWorld(); // space applic    
 84                                                   
 85   if( detectorType == "Diamond" ) ConstructDia    
 86   else if( detectorType == "MicroDiamond" ) Co    
 87   else if( detectorType == "Silicon" ) Constru    
 88   else if( detectorType == "SiliconBridge" ) C    
 89   else if( detectorType == "DiamondTelescope"     
 90   else if( detectorType ==  "SiCDetector") Con    
 91   else                                            
 92   {                                               
 93     G4cout << "ERROR: " << detectorType << " i    
 94     return 0;                                     
 95   }                                               
 96                                                   
 97   return physical_world;                          
 98 }                                                 
 99                                                   
100 void DetectorConstruction::ConstructWorldWithW    
101 {                                                 
102   //Define materials                              
103   G4Material* air  = nistMan->FindOrBuildMater    
104   G4Material* water = G4NistManager::Instance(    
105                                                   
106   G4double phantomWidth = 5.*cm;                  
107   G4double phantomLength = detectorPositionDep    
108                                                   
109   G4double worldWidth = phantomWidth + 5*cm;      
110   G4double worldLength = phantomLength*2;         
111                                                   
112   // In a clinical setup, the water phantom is    
113   G4Box* world = new G4Box("world_box", worldW    
114   G4LogicalVolume* logical_world = new G4Logic    
115                                                   
116   //set the logical world volume invisible        
117   logical_world -> SetVisAttributes(G4VisAttri    
118                                                   
119   physical_world = new G4PVPlacement(0,           
120                 G4ThreeVector(),                  
121                 logical_world,                    
122                 "world_phys",                     
123                 0,                                
124                 false,                            
125                 0);                               
126                                                   
127   G4Box* phantom_box = new G4Box("phantom_box"    
128   G4LogicalVolume* logical_phantom = new G4Log    
129                                                   
130   //the water phantom starts at z=0               
131   G4ThreeVector phantom_position = G4ThreeVect    
132                                                   
133    new G4PVPlacement(0, phantom_position, logi    
134         logical_world,                            
135         false, 0, 0);                             
136                                                   
137    logical_phantom -> SetVisAttributes(G4VisAt    
138                                                   
139    // smaller inner volume where the detector     
140   G4double innerSize = 2.*cm;                     
141   G4Box* inner_box = new G4Box("inner_box", in    
142   G4LogicalVolume* logical_inner = new G4Logic    
143                                                   
144   G4double innerDepth = phantomLength/2 -detec    
145   G4ThreeVector inner_position = G4ThreeVector    
146   new G4PVPlacement(0, inner_position, logical    
147         logical_phantom,                          
148         false, 0, 0);                             
149                                                   
150   logical_inner -> SetVisAttributes(G4VisAttri    
151                                                   
152   // private member of DetectorConstruction,      
153   // needed as mother volume for Construct*Det    
154   logical_motherVolumeForDetector = logical_in    
155   materialOfMotherVolume = water;                 
156                                                   
157   // uncomment to enable a G4Region for the in    
158   // e.g. in order to set different cuts          
159   //G4Region* inner_region = new G4Region("inn    
160   //inner_region -> AddRootLogicalVolume( logi    
161 }                                                 
162                                                   
163 void DetectorConstruction::ConstructVacuumWorl    
164 {                                                 
165     //Define Vacuum                               
166   G4double Z = 1.;                                
167   G4double A = 1.01*g/mole;                       
168   G4double vacuumDensity = 1.e-25 *g/cm3;         
169   G4double pressure = 3.e-18*pascal;              
170   G4double temperature = 2.73*kelvin;             
171   G4Material* vacuum = new G4Material("Galacti    
172              vacuumDensity,kStateGas,temperatu    
173                                                   
174   G4double worldSize = 10.*cm;                    
175                                                   
176   G4Box* world_box = new G4Box("world_box", wo    
177   G4LogicalVolume* logical_world = new G4Logic    
178   physical_world = new G4PVPlacement(0,           
179                 G4ThreeVector(),                  
180                 logical_world,                    
181                 "world_phys",                     
182                 0,                                
183                 false,                            
184                 0);                               
185                                                   
186   logical_world -> SetVisAttributes(G4VisAttri    
187                                                   
188   logical_motherVolumeForDetector = logical_wo    
189   materialOfMotherVolume = vacuum;                
190 }                                                 
191                                                   
192 void DetectorConstruction::ConstructDiamondDet    
193 {                                                 
194                                                   
195 //Define each individual element                  
196 //Define Oxygen                                   
197  G4double A = 16.0 * g/mole;                      
198  G4double Z = 8;                                  
199  G4Element* elO = new G4Element ("Oxygen", "O"    
200                                                   
201 //Define Hydrogen                                 
202  A = 1.01 * g/mole;                               
203  Z = 1;                                           
204  G4Element* elH = new G4Element ("Hydrogen", "    
205                                                   
206 //Define Boron                                    
207  A = 10.8 * g/mole;                               
208  Z = 5;                                           
209  G4Element* elB = new G4Element ("Boron", "B",    
210                                                   
211 //Define Carbon                                   
212  A = 12.01 * g/mole;                              
213  Z = 6;                                           
214  G4Element* elC = new G4Element ("Carbon", "C"    
215                                                   
216 //Define diamond                                  
217  A = 12.01 * g/mole;                              
218  Z = 6;                                           
219  G4Material* diamond = new G4Material("diamond    
220                                                   
221 //Define dopant (boron doped diamond)             
222  G4Material* dopant = new G4Material("dopant",    
223  dopant -> AddElement(elC, 99.9994*perCent);      
224  dopant -> AddElement(elB, 0.0006*perCent);       
225                                                   
226  //Define Aluminium contacts (AlContact)          
227  A = 26.981 * g/mole;                             
228  Z = 13;                                          
229  G4Material* AlContact = new G4Material("AlCon    
230                                                   
231  //Define Gold contact (AuContact)                
232  A = 196.97 * g/mole;                             
233  Z = 79;                                          
234  G4Material* AuContact = new G4Material("AuCon    
235                                                   
236  //Define PMMA (C502H8)                           
237  // NIST reference                                
238  G4Material* PMMA = new G4Material("PMMA", 1.1    
239  PMMA -> AddElement(elC, 5);                      
240  PMMA -> AddElement(elO, 2);                      
241  PMMA -> AddElement(elH, 8);                      
242                                                   
243                                                   
244  // Define the geometry of the diamond microdo    
245  // mother volume of the detector components      
246  G4double DiaVol_x = 300*micrometer;              
247  G4double DiaVol_y = 240*micrometer;              
248  G4double DiaVol_z = 150*micrometer;              
249                                                   
250  G4Box* DiaVol_box = new G4Box("DiaVol_box",Di    
251                                                   
252  G4LogicalVolume* logical_DiaVol = new G4Logic    
253                                                   
254  G4ThreeVector DiaVol_position = {0, 0, -DiaVo    
255                                                   
256  new G4PVPlacement(0, DiaVol_position, logical    
257         logical_motherVolumeForDetector,          
258         false, 0, true);                          
259                                                   
260  //VacBlock for contact placement                 
261  G4double vacblock_x = 300*um;                    
262  G4double vacblock_y = 240*um;                    
263  G4double vacblock_z = 0.25*um;                   
264                                                   
265  // vacuum (or water) box to place other volum    
266  G4Box* vacblock_box = new G4Box("vacblock_box    
267                                                   
268  G4LogicalVolume* logical_vacblock = new G4Log    
269                                                   
270  new G4PVPlacement(0,                             
271              G4ThreeVector(0,0,DiaVol_z - vacb    
272        logical_vacblock,                          
273              "vacblock_phys",                     
274              logical_DiaVol,                      
275              false,                               
276              0, true);                            
277 //Bdl in DiaVol                                   
278  G4double Bdl_x = 300*micrometer;                 
279  G4double Bdl_y = 240*micrometer;                 
280  G4double Bdl_z = detectorSizeThickness/2;        
281                                                   
282  G4Box* Bdl_box = new G4Box("Bdl_box",Bdl_x,Bd    
283                                                   
284  G4LogicalVolume* logical_Bdl = new G4LogicalV    
285                                                   
286  new G4PVPlacement(0,                             
287        G4ThreeVector(0,0,DiaVol_z - Bdl_z - va    
288        logical_Bdl,                               
289        "Bdl_phys",                                
290              logical_DiaVol,   //mother volume    
291                    false,                         
292        0, true);                                  
293                                                   
294  //Diamond SV                                     
295  G4double SV_x = detectorSizeWidth/2;             
296  G4double SV_y = detectorSizeWidth/2;             
297  G4double SV_z = Bdl_z;                           
298                                                   
299  G4Box* SV_box = new G4Box("SV_box",SV_x,SV_y,    
300                                                   
301  G4LogicalVolume* logical_SV = new G4LogicalVo    
302                                                   
303  new G4PVPlacement(0, G4ThreeVector(-45*um,105    
304         logical_Bdl,false, 0, true);              
305                                                   
306  new G4PVPlacement(0, G4ThreeVector(165*um,105    
307        logical_Bdl, false, 0, true);              
308                                                   
309  new G4PVPlacement(0, G4ThreeVector(-45*um,-10    
310        logical_Bdl, false, 0, true);              
311                                                   
312  new G4PVPlacement(0, G4ThreeVector(165*um,-10    
313        logical_Bdl, false, 0, true);              
314                                                   
315 //Al strips                                       
316 //10 nm thickness                                 
317  G4double AlStrip_x = 240*um;                     
318  G4double AlStrip_y = 240*um;                     
319  G4double AlStrip_z = vacblock_z;                 
320                                                   
321  G4Box* AlStrip = new G4Box("AlStrip",AlStrip_    
322                                                   
323  G4LogicalVolume* logical_AlStrip = new G4Logi    
324                                                   
325  new G4PVPlacement(0, G4ThreeVector(60*um,0,0)    
326                    logical_vacblock, false, 0,    
327                                                   
328 //gold cylinder in vacblock                       
329  G4double innerRadiusOfTheTube1 = 0.*um;          
330  G4double outerRadiusOfTheTube1 = 45.*um;         
331  G4double heightOfTheTube1 = 10*nm;               
332  G4double startAngleOfTheTube1 = 0.*deg;          
333  G4double spanningAngleOfTheTube1 = 360.*deg;     
334                                                   
335  G4Tubs* GoldCylinder1 = new G4Tubs("GoldCylin    
336                         outerRadiusOfTheTube1,    
337                         heightOfTheTube1,         
338                         startAngleOfTheTube1,     
339                         spanningAngleOfTheTube    
340                                                   
341  G4LogicalVolume* logical_GoldCylinder1 = new     
342                                                   
343  new G4PVPlacement(0,G4ThreeVector(-245*um,0,-    
344                    logical_GoldCylinder1,         
345              "GoldCylinder1_phys",                
346              logical_vacblock, false, 0, true)    
347                                                   
348 //gold contacts                                   
349  G4double innerRadiusOfTheTube2 = 0.*um;          
350  G4double outerRadiusOfTheTube2 = 45.*um;         
351  G4double heightOfTheTube2 = Bdl_z;               
352  G4double startAngleOfTheTube2 = 0.*deg;          
353  G4double spanningAngleOfTheTube2 = 360.*deg;     
354                                                   
355  G4Tubs* GoldCylinder2 = new G4Tubs("GoldCylin    
356                         innerRadiusOfTheTube2,    
357                         outerRadiusOfTheTube2,    
358                         heightOfTheTube2,         
359                         startAngleOfTheTube2,     
360                         spanningAngleOfTheTube    
361                                                   
362  G4LogicalVolume* logical_GoldCylinder2 = new     
363                                                   
364  new G4PVPlacement(0, G4ThreeVector(-245*um,0,    
365        logical_Bdl, false, 0, true);              
366                                                   
367 //gold cylinder in DiaVol                         
368  G4double innerRadiusOfTheTube3 = 0.*um;          
369  G4double outerRadiusOfTheTube3 = 45.*um;         
370  G4double heightOfTheTube3 = 75.*um -heightOfT    
371  G4double startAngleOfTheTube3 = 0.*deg;          
372  G4double spanningAngleOfTheTube3 = 360.*deg;     
373                                                   
374  G4Tubs* GoldCylinder3 = new G4Tubs("GoldCylin    
375                         innerRadiusOfTheTube3,    
376                         outerRadiusOfTheTube3,    
377                         heightOfTheTube3,         
378                         startAngleOfTheTube3,     
379                         spanningAngleOfTheTube    
380                                                   
381 G4LogicalVolume* logical_GoldCylinder3 = new G    
382                                                   
383 new G4PVPlacement(0, G4ThreeVector(-245*um,0,D    
384              logical_GoldCylinder3,               
385              "GoldCylinder3_phys",                
386              logical_DiaVol,                      
387              false,                               
388              0, true);                            
389                                                   
390 // Visualisation attributes                       
391                                                   
392         logical_DiaVol -> SetVisAttributes(G4V    
393   logical_Bdl -> SetVisAttributes(G4VisAttribu    
394                                                   
395   G4VisAttributes vis_SV(G4Colour(198, 226, 25    
396   vis_SV.SetForceSolid(true);                     
397   logical_SV -> SetVisAttributes(vis_SV);         
398         logical_vacblock -> SetVisAttributes(G    
399   logical_AlStrip -> SetVisAttributes(G4VisAtt    
400                                                   
401   G4VisAttributes vis_GoldCylinder1(G4Colour(2    
402   vis_GoldCylinder1.SetForceAuxEdgeVisible(tru    
403   logical_GoldCylinder1 -> SetVisAttributes(vi    
404                                                   
405   G4VisAttributes vis_GoldCylinder2(G4Colour(2    
406   vis_GoldCylinder2.SetForceAuxEdgeVisible(tru    
407   logical_GoldCylinder2 -> SetVisAttributes(vi    
408                                                   
409   G4VisAttributes vis_GoldCylinder3(G4Colour(2    
410   vis_GoldCylinder3.SetForceAuxEdgeVisible(tru    
411   logical_GoldCylinder3 -> SetVisAttributes(vi    
412                                                   
413 // no need to return the following, it's been     
414 //return physical_world;                          
415                                                   
416 }                                                 
417                                                   
418 void DetectorConstruction::ConstructMicroDiamo    
419 {                                                 
420   //Define each individual element                
421   //Define Boron                                  
422   G4double A = 10.8 * g/mole;                     
423   G4double Z = 5;                                 
424   G4Element* elB = new G4Element ("Boron", "B"    
425                                                   
426   //Define Carbon                                 
427   A = 12.01 * g/mole;                             
428   Z = 6;                                          
429   G4Element* elC = new G4Element ("Carbon", "C    
430                                                   
431   //Define diamond                                
432   A = 12.01 * g/mole;                             
433   Z = 6;                                          
434   G4Material* diamond = new G4Material("diamon    
435                                                   
436   //Define p-type diamond (boron doped diamond    
437   G4Material* p_diamond = new G4Material("p_di    
438   // Boron concentration used is 1e20 cm-3, co    
439   p_diamond -> AddElement(elC, 99.94887*perCen    
440   p_diamond -> AddElement(elB, 0.05113*perCent    
441                                                   
442   //Define chromium contact                       
443   G4Material* chromium = nistMan->FindOrBuildM    
444                                                   
445   // sentive volume                               
446   G4double SVside = detectorSizeWidth /2.;        
447   G4double SVthickness = detectorSizeThickness    
448   G4double SVspacing = 200.*um; //edge-edge di    
449                                                   
450   G4Box* SV_box = new G4Box("SV_box", SVside,     
451                                                   
452   G4LogicalVolume* logical_SV = new G4LogicalV    
453                                                   
454   G4VisAttributes SVcolour(G4Colour(0.5, 0.5,     
455   SVcolour.SetForceSolid(true);                   
456   logical_SV -> SetVisAttributes(SVcolour);       
457                                                   
458   // chromium front-electrode                     
459   G4double feThickness = 50.*nm /2.; // front-    
460                                                   
461   G4Box* fe_box = new G4Box("frontElec_box", S    
462                                                   
463   G4LogicalVolume* logical_fe = new G4LogicalV    
464                                                   
465   G4VisAttributes fe_colour(G4Colour::Brown())    
466   fe_colour.SetForceSolid(false);                 
467   logical_fe -> SetVisAttributes(fe_colour);      
468                                                   
469   // p-type diamond                               
470   G4double pDthickness = 1.*um /2.; // p-type     
471                                                   
472   G4Box* pD_box = new G4Box("pDiam_box", SVsid    
473                                                   
474   G4LogicalVolume* logical_pD = new G4LogicalV    
475                                                   
476   G4VisAttributes pDcolour(G4Colour::Blue());     
477   pDcolour.SetForceSolid(false);                  
478                                                   
479   logical_pD -> SetVisAttributes(pDcolour);       
480                                                   
481   // put them in place                            
482   G4ThreeVector SVposition = {0., 0., 0}; //po    
483   G4ThreeVector fePosition = {0., 0., SVthickn    
484   G4ThreeVector pDposition = {0., 0., -SVthick    
485                                                   
486   G4double SVposition_x[4] = { -3.*SVside -1.5    
487                                                   
488   std::ostringstream PVName;                      
489                                                   
490   for( int i=0; i<4; i++)                         
491   {                                               
492     // sensitive volume                           
493     SVposition[0] = SVposition_x[i];              
494     PVName << "SV_phys" << i;                     
495     new G4PVPlacement(0, SVposition, logical_S    
496           logical_motherVolumeForDetector,        
497           false, 0, true);                        
498     PVName.str(""); //reset the string            
499                                                   
500     // chromium front-electrode                   
501     PVName << "frontElec_phys" << i;              
502     fePosition[0] = SVposition[0];                
503     new G4PVPlacement(0, fePosition, logical_f    
504           logical_motherVolumeForDetector,        
505           false, 0, true);                        
506     PVName.str("");                               
507                                                   
508     // p-type diamond back-electrode              
509     PVName << "pD_phys" << i;                     
510     pDposition[0] = SVposition[0];                
511     new G4PVPlacement(0, pDposition, logical_p    
512           logical_motherVolumeForDetector,        
513           false, 0, true);                        
514     PVName.str("");                               
515   }                                               
516                                                   
517   // HPHT diamond substrate (only one big subs    
518   G4double subs_x = 2.*mm /2.;                    
519   G4double subs_y = 0.5*mm /2.;                   
520   G4double sub_z = 300.*micrometer /2.;           
521                                                   
522   G4Box* sub_box = new G4Box("sub_box", subs_x    
523                                                   
524   G4LogicalVolume* logical_sub = new G4Logical    
525                                                   
526   G4ThreeVector subPosition = {0,0, -SVthickne    
527                                                   
528   new G4PVPlacement(0, subPosition, logical_su    
529         logical_motherVolumeForDetector,          
530         false, 0, true);                          
531                                                   
532   G4VisAttributes subColour(G4Colour(0.5, 0.5,    
533   subColour.SetForceSolid(false);                 
534   logical_sub -> SetVisAttributes(subColour);     
535 }                                                 
536                                                   
537 void DetectorConstruction::ConstructDiamondTel    
538 {                                                 
539   //Define each individual element                
540   //Define Boron                                  
541   G4double A = 10.8 * g/mole;                     
542   G4double Z = 5;                                 
543   G4Element* elB = new G4Element ("Boron", "B"    
544                                                   
545   //Define Carbon                                 
546   A = 12.01 * g/mole;                             
547   Z = 6;                                          
548   G4Element* elC = new G4Element ("Carbon", "C    
549                                                   
550   //Define diamond                                
551   A = 12.01 * g/mole;                             
552   Z = 6;                                          
553   G4Material* diamond = new G4Material("diamon    
554                                                   
555   //Define p-type diamond (boron doped diamond    
556   G4Material* p_diamond = new G4Material("p_di    
557   // Boron concentration used is 1e20 cm-3, co    
558   p_diamond -> AddElement(elC, 99.94887*perCen    
559   p_diamond -> AddElement(elB, 0.05113*perCent    
560                                                   
561   //Define chromium contact                       
562   G4Material* chromium = nistMan->FindOrBuildM    
563                                                   
564   // sentive volumes                              
565   // DE                                           
566   G4double SV_DE_radius = detectorSizeWidth /2    
567   G4double SV_DE_thickness = detectorSizeThick    
568                                                   
569   G4Tubs* SV_DE_cyl = new G4Tubs("SV_DE_cyl",     
570                                                   
571   G4LogicalVolume* logical_SV = new G4LogicalV    
572                                                   
573   G4VisAttributes SVcolour(G4Colour(0.5, 0.5,     
574   SVcolour.SetForceSolid(true);                   
575   logical_SV -> SetVisAttributes(SVcolour);       
576                                                   
577   // The E-stage diameter has to be at least t    
578   if( secondStageSizeDim < detectorSizeWidth )    
579   {                                               
580     G4cout << "WARNING: the telescope E-stage     
581     G4cout << "To be compliant with the telesc    
582     secondStageSizeDim = detectorSizeWidth;       
583     G4cout << "E-stage diameter set to default    
584   }                                               
585                                                   
586   // E stage                                      
587   G4double SV_E_thickness = secondStageSizeThi    
588   G4double SV_E_radius = secondStageSizeDim /2    
589                                                   
590   G4Tubs* SV_E_cyl = new G4Tubs("SV_E_cyl", 0.    
591                                                   
592   G4LogicalVolume* logical_SV_Estage = new G4L    
593                                                   
594   G4VisAttributes SV_E_colour(G4Colour(0.7, 0.    
595   SV_E_colour.SetForceSolid(true);                
596   logical_SV_Estage -> SetVisAttributes(SV_E_c    
597                                                   
598   // DE and E crystals - the DE and E sensitiv    
599                                                   
600   // DE and E crystals thickensses are the sam    
601   // Default diamond crystals lateral size        
602   G4double d_crystal_width = 2.*mm /2.;           
603                                                   
604   if( d_crystal_width < secondStageSizeDim )      
605   {                                               
606     G4cout << "The default lateral size (" <<     
607     d_crystal_width = secondStageSizeDim;         
608   }                                               
609                                                   
610   // DE crystal                                   
611   G4Box* DE_crystal_box = new G4Box("DE_crysta    
612                                                   
613   G4LogicalVolume* logical_DE_crystal = new G4    
614                                                   
615   G4VisAttributes Diamond_crystal_colour(G4Col    
616   Diamond_crystal_colour.SetForceSolid(false);    
617   logical_DE_crystal -> SetVisAttributes(Diamo    
618                                                   
619   // E crystal                                    
620   G4Box* E_crystal_box = new G4Box("E_crystal_    
621                                                   
622   G4LogicalVolume* logical_E_crystal = new G4L    
623                                                   
624   logical_E_crystal -> SetVisAttributes(Diamon    
625                                                   
626   // chromium front-electrode                     
627   G4double feThickness = 100.*nm /2.; // front    
628                                                   
629   G4Tubs* fe_cyl = new G4Tubs("frontElec_cyl",    
630                                                   
631   G4LogicalVolume* logical_fe = new G4LogicalV    
632                                                   
633   G4VisAttributes fe_colour(G4Colour::Brown())    
634   fe_colour.SetForceSolid(false);                 
635   logical_fe -> SetVisAttributes(fe_colour);      
636                                                   
637   // chromium back-electrode                      
638   G4Tubs* fe_cyl_back = new G4Tubs("backElec_c    
639                                                   
640   G4LogicalVolume* logical_fe_back = new G4Log    
641                                                   
642   logical_fe_back -> SetVisAttributes(fe_colou    
643                                                   
644   // p-type diamond                               
645   G4double pDthickness = 1.8*um /2.; // p-type    
646                                                   
647   // the p-type diamond layer has the same lat    
648                                                   
649   G4Box* pD_box = new G4Box("pDiam_box", d_cry    
650                                                   
651   G4LogicalVolume* logical_pD = new G4LogicalV    
652                                                   
653   G4VisAttributes pDcolour(G4Colour::Blue());     
654   pDcolour.SetForceSolid(false);                  
655   logical_pD -> SetVisAttributes(pDcolour);       
656                                                   
657   // put them in place                            
658   G4ThreeVector DE_crystal_position = {0., 0.,    
659   G4ThreeVector SVposition = {0., 0., 0.}; //     
660   G4ThreeVector fePosition = {0., 0., SV_DE_th    
661   G4ThreeVector pDposition = {0., 0., -SV_DE_t    
662   G4ThreeVector E_crystal_position = {0., 0.,     
663   G4ThreeVector SV_E_position = {0., 0., 0.};     
664   G4ThreeVector bePosition = {0., 0., -SV_DE_t    
665                                                   
666   // DE crystal                                   
667   new G4PVPlacement(0, DE_crystal_position, lo    
668         logical_motherVolumeForDetector,          
669         false, 0, true);                          
670   // DE sensitive volume                          
671   new G4PVPlacement(0, SVposition, logical_SV,    
672         logical_DE_crystal,                       
673         false, 0, true);                          
674   // p-type diamond layer                         
675   new G4PVPlacement(0, pDposition, logical_pD,    
676         logical_motherVolumeForDetector,          
677         false, 0, true);                          
678   // E crystal                                    
679   new G4PVPlacement(0, E_crystal_position, log    
680         logical_motherVolumeForDetector,          
681         false, 0, true);                          
682   // E sensitive volume                           
683   new G4PVPlacement(0, SV_E_position, logical_    
684         logical_E_crystal,                        
685         false, 0, true);                          
686   // front-electrode                              
687   new G4PVPlacement(0, fePosition, logical_fe,    
688         logical_motherVolumeForDetector,          
689         false, 0, true);                          
690   // back electrode                               
691   new G4PVPlacement(0, bePosition, logical_fe_    
692         logical_motherVolumeForDetector,          
693         false, 0, true);                          
694 }                                                 
695                                                   
696 void DetectorConstruction::ConstructSiliconDet    
697 {                                                 
698   nistMan->SetVerbose(1);                         
699                                                   
700   //Define each individual element                
701   //Define Nitrogen                               
702   G4double A = 14.01 * g/mole;                    
703   G4double Z = 7;                                 
704   G4Element* elN = new G4Element ("Nitrogen",     
705                                                   
706   //Define Oxygen                                 
707   A = 16.0 * g/mole;                              
708   Z = 8;                                          
709   G4Element* elO = new G4Element ("Oxygen", "O    
710                                                   
711   //Define Hydrogen                               
712   A = 1.01 * g/mole;                              
713   Z = 1;                                          
714   G4Element* elH = new G4Element ("Hydrogen",     
715                                                   
716   //Define Carbon                                 
717   A = 12.01 * g/mole;                             
718   Z = 6;                                          
719   G4Element* elC = new G4Element ("Carbon", "C    
720                                                   
721   //Define Air                                    
722   G4Material* Air = new G4Material("Air", 1.29    
723   Air -> AddElement(elN, 70*perCent);             
724   Air -> AddElement(elO, 30*perCent);             
725                                                   
726   //Define PMMA (C502H8)                          
727   // NIST reference                               
728   G4Material* PMMA = new G4Material("PMMA", 1.    
729   PMMA -> AddElement(elC, 5);                     
730   PMMA -> AddElement(elO, 2);                     
731   PMMA -> AddElement(elH, 8);                     
732                                                   
733   //define materials                              
734   G4Material* silicon = nistMan->FindOrBuildMa    
735   G4Material* SiO2 = nistMan->FindOrBuildMater    
736                                                   
737                                                   
738    G4double SVspacing = 10.*um; // distance be    
739                                                   
740   // PMMA                                         
741   G4double PMMA_x = ( detectorSizeWidth*2. + S    
742   G4double PMMA_y = ( detectorSizeWidth*2. + S    
743   G4double PMMA_z = detectorSizeThickness /2.;    
744                                                   
745   G4Box* PMMA_box = new G4Box("PMMA_box", PMMA    
746                                                   
747   G4LogicalVolume* logical_PMMA = new G4Logica    
748                                                   
749   new G4PVPlacement(0, G4ThreeVector(), logica    
750           logical_motherVolumeForDetector,        
751           false, 0, true);                        
752                                                   
753   logical_PMMA -> SetVisAttributes(G4VisAttrib    
754                                                   
755   // sensitive volumes                            
756   G4double SV_radius = detectorSizeWidth /2.;     
757   G4double SV_thick = detectorSizeThickness /2    
758                                                   
759   G4Tubs* SV_cyl = new G4Tubs("SV_cyl", 0., SV    
760   //G4RotationMatrix* cylRot = new G4RotationM    
761   //cylRot->rotateY(M_PI/2.*rad);                 
762                                                   
763   G4LogicalVolume* logical_SV = new G4LogicalV    
764                                                   
765   G4VisAttributes SVcolour(G4Colour(0.5, 0.5,     
766   SVcolour.SetForceSolid(true);                   
767   logical_SV -> SetVisAttributes(SVcolour);       
768                                                   
769   G4ThreeVector SVposition; //if(volumeName !=    
770                                                   
771   SVposition = { +SVspacing/2. +SV_radius, +SV    
772   new G4PVPlacement(0, SVposition, logical_SV,    
773             logical_PMMA,                         
774             false, 0, true);                      
775   /*new G4PVPlacement(cylRot, SVposition, logi    
776             logical_PMMA,                         
777             false, 0, true);*/                    
778                                                   
779   SVposition = { -SVspacing/2. -SV_radius, +SV    
780   new G4PVPlacement(0, SVposition, logical_SV,    
781             logical_PMMA,                         
782             false, 0, true);                      
783                                                   
784   SVposition = { -SVspacing/2. -SV_radius, -SV    
785   new G4PVPlacement(0, SVposition, logical_SV,    
786             logical_PMMA,                         
787             false, 0, true);                      
788                                                   
789   SVposition = { +SVspacing/2. +SV_radius, -SV    
790   new G4PVPlacement(0, SVposition, logical_SV,    
791             logical_PMMA,                         
792             false, 0, true);                      
793                                                   
794   // Si02 layer                                   
795   G4double oxyde_x = PMMA_x;                      
796   G4double oxyde_y = PMMA_y;                      
797   G4double oxyde_z = 1.*um /2.;                   
798                                                   
799   G4Box* oxyde_box = new G4Box("oxyde_box", ox    
800                                                   
801   G4LogicalVolume* logical_oxyde = new G4Logic    
802                                                   
803   G4ThreeVector oxyde_position = G4ThreeVector    
804   new G4PVPlacement(0, oxyde_position, logical    
805           logical_motherVolumeForDetector,        
806           false, 0, true);                        
807                                                   
808   logical_oxyde -> SetVisAttributes(G4VisAttri    
809 }                                                 
810                                                   
811 void DetectorConstruction::ConstructSiliconBri    
812 {                                                 
813 //--------------------------------------------    
814 //--------------------- MATERIALS ------------    
815 //--------------------------------------------    
816   //Define Water                                  
817   //G4Material* Water  = nistMan->FindOrBuildM    
818                                                   
819   //Define Polyethylene                           
820   //G4Material* poly  = nistMan->FindOrBuildMa    
821                                                   
822   //Define PMMA                                   
823   //G4Material* perspex  = nistMan->FindOrBuil    
824                                                   
825   //Define Aluminium                              
826   G4Material* Aluminium = nistMan->FindOrBuild    
827                                                   
828   //Define Silicon                                
829   G4Material* silicon = nistMan->FindOrBuildMa    
830                                                   
831   //Define Aluminium Oxide (this is acting as     
832   //G4Material* AlOx = nistMan->FindOrBuildMat    
833                                                   
834   //Define SiO                                    
835   G4Material* SiO2 = nistMan->FindOrBuildMater    
836                                                   
837   //Define Pyrex Glass                            
838   //G4Material* PyrexGlass = nistMan->FindOrBu    
839                                                   
840 //--------------------------------------------    
841 //-------------------- Vis Attributes --------    
842 //--------------------------------------------    
843   G4VisAttributes* wireFrameWhiteAtt = new G4V    
844   wireFrameWhiteAtt -> SetVisibility(true);       
845   wireFrameWhiteAtt -> SetForceWireframe(true)    
846                                                   
847   G4VisAttributes* wireFramePinkAtt = new G4Vi    
848     wireFramePinkAtt -> SetVisibility(true);      
849     wireFramePinkAtt -> SetForceWireframe(true    
850                                                   
851   G4VisAttributes* solidGreyAtt = new G4VisAtt    
852     solidGreyAtt -> SetVisibility(true);          
853     solidGreyAtt -> SetForceSolid(true);          
854                                                   
855   G4VisAttributes* solidRedAtt = new G4VisAttr    
856   solidRedAtt -> SetVisibility(true);             
857   solidRedAtt -> SetForceSolid(true);             
858                                                   
859   G4VisAttributes* solidGreenAtt = new G4VisAt    
860   solidGreenAtt -> SetVisibility(true);           
861   solidGreenAtt -> SetForceSolid(true);           
862                                                   
863   G4VisAttributes* solidYellowAtt = new G4VisA    
864   solidYellowAtt -> SetVisibility(true);          
865   solidYellowAtt -> SetForceSolid(true);          
866                                                   
867   G4VisAttributes* solidBlueAtt = new G4VisAtt    
868   solidBlueAtt -> SetVisibility(true);            
869   solidBlueAtt -> SetForceSolid(true);            
870                                                   
871 //--------------------------------------------    
872 //----------------------- Volumes ------------    
873 //--------------------------------------------    
874                                                   
875   G4RotationMatrix* rotMatW = new G4RotationMa    
876   rotMatW->rotateY(0*deg);                        
877   rotMatW->rotateX(-90*deg);                      
878   rotMatW->rotateZ(0*deg);                        
879                                                   
880 //------------------Detector Mother Volume----    
881   G4double SVheight = detectorSizeThickness;      
882   G4double insulationThickness = 1.*micrometer    
883   G4double SiOoverlayerBottomThickness = 1.7*m    
884   G4double AlOverlayerThickness = 1.7*micromet    
885   G4double AlOverlayerRadius = 4.*micrometer;     
886   G4double SiOoverlayerTopThickness = 1.43*mic    
887   G4double SiOoverlayerTopRadius = 10.5/2. * m    
888   G4double overLayerThickness = AlOverlayerThi    
889                                                   
890   G4double baseSiThickness = 300.*micrometer;     
891   G4double detectorHeight = (SVheight + baseSi    
892                                                   
893   G4double SVwidth = detectorSizeWidth;           
894   G4double pitch = 20.*micrometer; //distance     
895                                                   
896   G4double bridgingWidth = 20.*micrometer;        
897   G4double bridgingLength = 15.*micrometer;       
898   G4double bridingHeight = SVheight;              
899                                                   
900   G4double numberOfRows = 59;                     
901   G4double numberOfColumns = (24*3);              
902   G4double SVareaWidth = (numberOfColumns * (S    
903   G4double SVareaLength = numberOfRows*(SVwidt    
904   G4double bufferWidth = 100.*micrometer;         
905   G4double detectorWidth = SVareaWidth + buffe    
906   G4double detectorLength = SVareaLength + buf    
907                                                   
908 //------------------Smaller Detector Mother Vo    
909   G4Box* detectorBox = new G4Box("detectorBox"    
910   G4LogicalVolume* logicalDetectorReg = new G4    
911   new G4PVPlacement(rotMatW, G4ThreeVector(0,0    
912                                                   
913   logicalDetectorReg -> SetVisAttributes(wireF    
914                                                   
915 //------------------Base Silicon Volume-------    
916   G4Box* basSiBox = new G4Box("baseSiBox", det    
917   G4LogicalVolume* logicalbaseSi = new G4Logic    
918   new G4PVPlacement(0, G4ThreeVector(0,(-detec    
919                                                   
920   logicalbaseSi -> SetVisAttributes(wireFrameP    
921                                                   
922 //---------------------Insulation Volume------    
923   G4Box* SiOBox = new G4Box("SiOBox", detector    
924   G4LogicalVolume* logicalSoI = new G4LogicalV    
925   new G4PVPlacement(0, G4ThreeVector(0,(detect    
926                                                   
927   logicalSoI -> SetVisAttributes(solidGreyAtt)    
928                                                   
929 //----------------Sensitive Volume Region-----    
930 //This volume encapsulates the SVs and the "br    
931   G4Box* SVregBox = new G4Box("SVregBox", dete    
932   G4LogicalVolume* logicalSVreg = new G4Logica    
933   new G4PVPlacement(0, G4ThreeVector(0,(detect    
934                                                   
935     logicalSVreg -> SetVisAttributes(wireFrame    
936                                                   
937 //----------------------Bridging Volume-------    
938 //This volume connects or "bridges" the main s    
939 //together but effectively act as additional s    
940   G4Box* bridgeVolBox = new G4Box("bridgeVolBo    
941   G4LogicalVolume* logicalBridgeVol = new G4Lo    
942                                                   
943   logicalBridgeVol -> SetVisAttributes(solidRe    
944                                                   
945 //---------------------SiO Bottom Overlayer---    
946   G4Box* SiObotLayerBox = new G4Box("SiObotLay    
947   G4LogicalVolume* logicalSiObotLayer = new G4    
948                                                   
949   logicalSiObotLayer -> SetVisAttributes(solid    
950                                                   
951 //--------------SiO Bottom Overlayer Bridging     
952   G4Box* SiObotLayerBridgeBox = new G4Box("SiO    
953   G4LogicalVolume* logicalSiObotLayerBridge =     
954                                                   
955   logicalSiObotLayerBridge -> SetVisAttributes    
956                                                   
957 //-----------------------Al contact ----------    
958   G4Box* AlContactBox = new G4Box("AlContactBo    
959   G4LogicalVolume* logicalAlContact = new G4Lo    
960                                                   
961   logicalAlContact -> SetVisAttributes(solidYe    
962                                                   
963 //----------------------SiO Top Overlayer-----    
964   G4Box* SiOtopLayerBox = new G4Box("SiOtopLay    
965   G4LogicalVolume* logicalSiOtopLayer = new G4    
966                                                   
967   logicalSiOtopLayer -> SetVisAttributes(solid    
968                                                   
969 //--------------------Sensitive Volume--------    
970   G4Box* sensitiveBridgeVolume = new G4Box("wa    
971   G4LogicalVolume* SV_log = new G4LogicalVolum    
972                                                   
973   SV_log -> SetVisAttributes(solidYellowAtt);     
974                                                   
975 //---Placing SVs, 30x30 volumes and "bridging"    
976                                                   
977   G4bool checkSVoverlap = false;                  
978                                                   
979   //Placing "odd" SV rows/columns                 
980   G4int globalCount = 100000;                     
981                                                   
982   for (G4double j = -SVareaLength/2.; j <= SVa    
983   {                                               
984     for (G4double i = -SVareaWidth/2.; i <= SV    
985     {                                             
986       //G4cout << "x: " << i/um << " z: " << j    
987       new G4PVPlacement(0, G4ThreeVector(i,0,j    
988                                                   
989       new G4PVPlacement(0, G4ThreeVector(i,((d    
990                                                   
991       new G4PVPlacement(0, G4ThreeVector(i,((d    
992                                                   
993       globalCount++;                              
994     }                                             
995   }                                               
996                                                   
997   //Placing "even" SV rows/columns                
998   globalCount = 200000;                           
999                                                   
1000   for (G4double j = (-SVareaLength/2. + SVwid    
1001   {                                              
1002     for (G4double i = -SVareaWidth/2.; i <= S    
1003     {                                            
1004       //G4cout << "x: " << i/micrometer << "     
1005                                                  
1006       new G4PVPlacement(0, G4ThreeVector(i,0,    
1007                                                  
1008       new G4PVPlacement(0, G4ThreeVector(i,((    
1009                                                  
1010       new G4PVPlacement(0, G4ThreeVector(i,((    
1011                                                  
1012       globalCount++;                             
1013     }                                            
1014   }                                              
1015                                                  
1016   //Placing "odd" bridging volumes rows/colum    
1017   globalCount = 300000;                          
1018                                                  
1019   for (G4double j = -SVareaLength/2.; j < SVa    
1020   {                                              
1021     for (G4double i = -SVareaWidth/2.; i < SV    
1022     {                                            
1023     if ( (i + (SVwidth + bridgingWidth)) < SV    
1024     {                                            
1025       //G4cout << globalCount << G4endl;         
1026       new G4PVPlacement(0, G4ThreeVector((i +    
1027                                                  
1028       new G4PVPlacement(0, G4ThreeVector((i +    
1029                                                  
1030       //G4cout << "x: " << (i + SVwidth/2. +     
1031                                                  
1032       globalCount++;                             
1033     }                                            
1034     }                                            
1035   }                                              
1036                                                  
1037   //Placing "even" bridging rows/columns         
1038   globalCount = 400000;                          
1039                                                  
1040   for (G4double j = (-SVareaLength/2. + SVwid    
1041   {                                              
1042     for (G4double i = -SVareaWidth/2.; i < SV    
1043     {                                            
1044                                                  
1045     if ( (i+ (SVwidth + bridgingWidth)) < SVa    
1046     {                                            
1047       //G4cout << globalCount << G4endl;         
1048       new G4PVPlacement(0, G4ThreeVector((i +    
1049                                                  
1050       //G4cout << "x: " << (i + SVwidth/2. +     
1051                                                  
1052       new G4PVPlacement(0, G4ThreeVector((i +    
1053                                                  
1054       globalCount++;                             
1055     }                                            
1056                                                  
1057     }                                            
1058   }                                              
1059                                                  
1060 //----------------------------------------       
1061   new G4PVPlacement(0, G4ThreeVector(0,0,0),     
1062 }                                                
1063                                                  
1064                                                  
1065 void DetectorConstruction::ConstructSiC()        
1066 {                                                
1067                                                  
1068 //Define SiC                                     
1069  G4double A = 12.01 * g/mole;                    
1070  G4double Z = 6;                                 
1071 G4double A_Si=28.086*g/mole;                     
1072  G4double Z_Si=14;                               
1073 G4double density_SiC=3.22*g/cm3;                 
1074 G4Element *Si=new G4Element("Silicum","Si",Z_    
1075 G4Element *C=new G4Element("Carbon","C",Z,A);    
1076 G4Material *SiC=new G4Material("SiC", density    
1077 SiC->AddElement(Si,1);                           
1078 SiC->AddElement(C,1);                            
1079                                                  
1080 /*G4Material *airNist = G4NistManager::Instan    
1081   G4Material *Silicon = G4NistManager::Instan    
1082                                                  
1083                                                  
1084 detectorSizeWidth=0.1*mm;                        
1085  detectorSizeThickness=22*um;//10*um;            
1086                                                  
1087  G4double substrate_thickness=370*um;            
1088                                                  
1089  G4double SV_x = detectorSizeWidth/2;            
1090  G4double SV_y = detectorSizeWidth/2;            
1091  G4double SV_z = detectorSizeThickness/2;        
1092                                                  
1093  G4Box* SV_box = new G4Box("SV_box",SV_x,SV_y    
1094                                                  
1095  G4LogicalVolume* logical_SV = new G4LogicalV    
1096                                                  
1097  new G4PVPlacement(0, G4ThreeVector(0*mm,0*mm    
1098         logical_motherVolumeForDetector,false    
1099                                                  
1100                                                  
1101  G4Box* Substrate_box = new G4Box("Substrate_    
1102                                                  
1103                                                  
1104   G4LogicalVolume* logical_substrate = new G4    
1105                                                  
1106   new G4PVPlacement(0, G4ThreeVector(0,0,-2*S    
1107         logical_motherVolumeForDetector,         
1108         false, 0, true);                         
1109                                                  
1110                                                  
1111 // Visualisation attributes                      
1112                                                  
1113   G4VisAttributes vis_SV(G4Colour(198, 226, 2    
1114   vis_SV.SetForceSolid(true);                    
1115   logical_SV -> SetVisAttributes(vis_SV);        
1116 }                                                
1117                                                  
1118                                                  
1119                                                  
1120 void DetectorConstruction::ConstructSDandFiel    
1121 {                                                
1122    SensitiveDetector* SD = new SensitiveDetec    
1123    G4SDManager::GetSDMpointer()->AddNewDetect    
1124    SetSensitiveDetector("SV_log", SD);           
1125                                                  
1126   if (detectorType == "SiliconBridge")           
1127   {                                              
1128     SetSensitiveDetector("bridgeVol_log", SD)    
1129   }                                              
1130   else if (detectorType == "DiamondTelescope"    
1131   {                                              
1132     SensitiveDetector* SDs2 = new SensitiveDe    
1133     G4SDManager::GetSDMpointer()->AddNewDetec    
1134     SetSensitiveDetector("SV_Estage_log", SDs    
1135   }                                              
1136 }                                                
1137