SToGS
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
PW_OpticalDetectorConstruction.hh
Go to the documentation of this file.
1 //
2 // ********************************************************************
3 // * License and Disclaimer *
4 // * *
5 // * The Geant4 software is copyright of the Copyright Holders of *
6 // * the Geant4 Collaboration. It is provided under the terms and *
7 // * conditions of the Geant4 Software License, included in the file *
8 // * LICENSE and available at http://cern.ch/geant4/license . These *
9 // * include a list of copyright holders. *
10 // * *
11 // * Neither the authors of this software system, nor their employing *
12 // * institutes,nor the agencies providing financial support for this *
13 // * work make any representation or warranty, express or implied, *
14 // * regarding this software system or assume any liability for its *
15 // * use. Please see the license in the file LICENSE and URL above *
16 // * for the full disclaimer and the limitation of liability. *
17 // * *
18 // * This code implementation is the result of the scientific and *
19 // * technical work of the GEANT4 collaboration. *
20 // * By using, copying, modifying or distributing the software (or *
21 // * any work based on the software) you agree to acknowledge its *
22 // * use in resulting scientific publications, and indicate your *
23 // * acceptance of all terms of the Geant4 Software license. *
24 // ********************************************************************
25 //
26 //
27 #ifndef PW_OpticalDetectorConstruction_h
28 #define PW_OpticalDetectorConstruction_h 1
29 
30 #include "globals.hh"
31 #include "G4VUserDetectorConstruction.hh"
32 
33 // std includes
34 #include <iostream>
35 #include <sstream>
36 #include <fstream>
37 #include <string>
38 
39 class G4Box;
40 class G4Sphere;
41 class G4LogicalVolume;
42 class G4VPhysicalVolume;
43 class G4Material;
44 class G4AssemblyVolume;
45 class G4OpticalSurface;
46 
47 class PW_OpticalDetectorConstruction : public G4VUserDetectorConstruction
48 {
49 private:
51  G4LogicalVolume* logicWorld;
53  std::pair<G4LogicalVolume*, G4LogicalVolume*> logicDetector;
54 
55 private:
57  std::string cube_material, cuboid_material;
58  G4int whichOpticalSurface_cube, whichOpticalSurface_cuboid, whichOpticalSurface_cube_cuboid;
59  G4int whichGeometry, whichPhotocathMat;
60 
61  G4double cube_side, cuboid_side;
62  G4double cubePosition, cuboidPosition;
63  G4double scint_cube_reflectivity[2], scint_cuboid_reflectivity[2], cube_cuboid_reflectivity[2];
64  G4double scint_cube_efficiency[2], scint_cuboid_efficiency[2];
65 // G4double cube_cuboid_efficiency[2];
66  G4double cube_cuboid_rindex[2];
67 
68 private:
69  void Construct_assembledPW(G4VPhysicalVolume* physiWorld);
70  void PW_SetScintOptSurfaces(G4OpticalSurface *cube_world_border, G4OpticalSurface *cuboid_world_border, G4OpticalSurface *cube_cuboid_border);
71  std::pair<G4LogicalVolume*, G4LogicalVolume*> PW_getScintSolids();
72 
73  void Construct_cuboid(G4VPhysicalVolume* physiWorld);
74 
75  std::pair<G4OpticalSurface*, G4LogicalVolume*> getCubicPhotocathode();
76  G4Material* getPhotocathodeMaterial();
77 
78  void ReadParameters(G4String filename);
79  void WhichSurface(G4OpticalSurface* Surface, G4int which);
80 
81 public:
82  PW_OpticalDetectorConstruction(G4String filename = "");
84 
86  virtual G4VPhysicalVolume* Construct();
87 
89  virtual void ConstructSDandField();
90 };
91 #endif
virtual G4VPhysicalVolume * Construct()
One of the mandatory class to be implemented in order to have G4 working properly.