FDsimG4MirrorSpherical.cc
Go to the documentation of this file.
2 #include "FDsimG4MirrorSD.hh"
3 #include "FDsimG4Colours.hh"
4 
5 #include "G4UnitsTable.hh"
6 #include "G4Sphere.hh"
7 #include "G4SDManager.hh"
8 #include "G4Material.hh"
9 #include "G4MaterialTable.hh"
10 #include "G4LogicalVolume.hh"
11 #include "G4PVPlacement.hh"
12 #include "G4OpticalSurface.hh"
13 #include "G4LogicalBorderSurface.hh"
14 #include "G4LogicalSkinSurface.hh"
15 #include "G4ThreeVector.hh"
16 #include "G4VisAttributes.hh"
17 
18 using namespace TelescopeSimulatorLX ;
19 
20 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
21 
23 
24  curvRadius = rcurv ;
25  thickness = 5.0*mm ;
26 
27  pMaterial = G4Material::GetMaterial("MirrorPlastic");
28 
29  CheckParameters() ;
30  BuildMirror() ;
31 
32 }
33 
34 
35 
36 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
38 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
39 
41 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
43 
44  G4cerr << " ================================================================ " << G4endl ;
45  G4cerr << " = Mirror parameters " << G4endl ;
46  G4cerr << " = " << G4endl ;
47  G4cerr << " = " << G4endl ;
48  G4cerr << " ================================================================ " << G4endl ;
49 
50 }
51 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
53 
54  G4Sphere *sphere = new G4Sphere("Sphere",curvRadius,curvRadius+thickness,0.0, 2.0*pi,0.,40.*pi/180.) ;
55 
57  = new G4LogicalVolume(sphere,pMaterial,"MirrorSpherical",0,0,0);
58 
59  G4OpticalSurface *OpticalAirMirror = new G4OpticalSurface("SphericalMirrorSurface");
60  OpticalAirMirror->SetModel(unified);
61  OpticalAirMirror->SetType(dielectric_metal);
62 
63  G4MaterialPropertiesTable *MirrorMPT = new G4MaterialPropertiesTable();
64  MirrorMPT->AddProperty("REFLECTIVITY", new G4MaterialPropertyVector()) ;
65  MirrorMPT->AddEntry("REFLECTIVITY",0.0*eV,1.0);
66  MirrorMPT->AddEntry("REFLECTIVITY",10.0*eV,1.0);
67 
68  OpticalAirMirror->SetMaterialPropertiesTable(MirrorMPT) ;
69 
70  new G4LogicalSkinSurface("SphericalMirrorSurface",pLogicalVolume,OpticalAirMirror);
71 
72 
73  pLogicalVolume->SetVisAttributes(new G4VisAttributes(red)) ;
74 
75 
76  FDsimG4MirrorSD * MirrorSD = NULL ;
77 
78  // Sensitive Detector Manager
79  G4SDManager * SDmanager = G4SDManager::GetSDMpointer();
80 
81  if(!MirrorSD)
82  {
83  G4cerr << "Creating Mirror Sensitive Detector: " << G4endl ;
84  MirrorSD = new FDsimG4MirrorSD("MirrorSD");
85  SDmanager->AddNewDetector(MirrorSD);
86  }
87  pLogicalVolume->SetSensitiveDetector(MirrorSD) ;
88 
89 }
const double eV
Definition: GalacticUnits.h:35
constexpr double mm
Definition: AugerUnits.h:113
static const G4Colour red(1.0, 0.0, 0.0)

, generated on Tue Sep 26 2023.