Loading...
Searching...
No Matches
LXeMainVolume.cc
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/// \file optical/LXe/src/LXeMainVolume.cc
28/// \brief Implementation of the LXeMainVolume class
29//
30//
31#include "LXeMainVolume.hh"
32
33#include "globals.hh"
34#include "G4Box.hh"
35#include "G4Colour.hh"
36#include "G4LogicalSkinSurface.hh"
37#include "G4LogicalBorderSurface.hh"
38#include "G4LogicalVolume.hh"
39#include "G4Material.hh"
40#include "G4MaterialPropertiesTable.hh"
41#include "G4OpticalSurface.hh"
42#include "G4Sphere.hh"
43#include "G4SystemOfUnits.hh"
44#include "G4Tubs.hh"
45#include "G4VisAttributes.hh"
46
47//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
48
49LXeMainVolume::LXeMainVolume(G4RotationMatrix* pRot, const G4ThreeVector& tlate,
50 G4LogicalVolume* pMotherLogical, G4bool pMany,
51 G4int pCopyNo, LXeDetectorConstruction* c)
52 // Pass info to the G4PVPlacement constructor
53 : G4PVPlacement(pRot, tlate,
54 // Temp logical volume must be created here
55 new G4LogicalVolume(new G4Box("temp", 1, 1, 1),
56 G4Material::GetMaterial("Vacuum"), "temp"),
57 "housing", pMotherLogical, pMany, pCopyNo)
58 , fConstructor(c)
59{
60 CopyValues();
61
62 G4double housing_x = fScint_x + 2. * fD_mtl;
63 G4double housing_y = fScint_y + 2. * fD_mtl;
64 G4double housing_z = fScint_z + 2. * fD_mtl;
65
66 //*************************** housing and scintillator
68 new G4Box("scint_box", fScint_x / 2., fScint_y / 2., fScint_z / 2.);
70 new G4Box("housing_box", housing_x / 2., housing_y / 2., housing_z / 2.);
71
72 fScint_log = new G4LogicalVolume(fScint_box, G4Material::GetMaterial("LXe"),
73 "scint_log");
75 fHousing_box, G4Material::GetMaterial("Al"), "housing_log");
76
77 new G4PVPlacement(nullptr, G4ThreeVector(), fScint_log, "scintillator",
78 fHousing_log, false, 0);
79
80 //*************** Miscellaneous sphere to demonstrate skin surfaces
81 fSphere = new G4Sphere("sphere", 0., 2. * cm, 0. * deg, 360. * deg, 0. * deg,
82 360. * deg);
84 new G4LogicalVolume(fSphere, G4Material::GetMaterial("Al"), "sphere_log");
85 if(fSphereOn)
86 new G4PVPlacement(nullptr, G4ThreeVector(5. * cm, 5. * cm, 5. * cm),
87 fSphere_log, "sphere", fScint_log, false, 0);
88
89 //****************** Build PMTs
90 G4double innerRadius_pmt = 0.;
91 G4double height_pmt = fD_mtl / 2.;
92 G4double startAngle_pmt = 0.;
93 G4double spanningAngle_pmt = 360. * deg;
94
95 fPmt = new G4Tubs("pmt_tube", innerRadius_pmt, fOuterRadius_pmt, height_pmt,
96 startAngle_pmt, spanningAngle_pmt);
97
98 // the "photocathode" is a metal slab at the back of the glass that
99 // is only a very rough approximation of the real thing since it only
100 // absorbs or detects the photons based on the efficiency set below
101 fPhotocath = new G4Tubs("photocath_tube", innerRadius_pmt, fOuterRadius_pmt,
102 height_pmt / 2., startAngle_pmt, spanningAngle_pmt);
103
104 fPmt_log =
105 new G4LogicalVolume(fPmt, G4Material::GetMaterial("Glass"), "pmt_log");
107 fPhotocath, G4Material::GetMaterial("Al"), "photocath_log");
108
109 new G4PVPlacement(nullptr, G4ThreeVector(0., 0., -height_pmt / 2.),
110 fPhotocath_log, "photocath", fPmt_log, false, 0);
111
112 //***********Arrange pmts around the outside of housing**********
113
114 G4double dx = fScint_x / fNx;
115 G4double dy = fScint_y / fNy;
116 G4double dz = fScint_z / fNz;
117
118 G4double x, y, z;
119 G4double xmin = -fScint_x / 2. - dx / 2.;
120 G4double ymin = -fScint_y / 2. - dy / 2.;
121 G4double zmin = -fScint_z / 2. - dz / 2.;
122 G4int k = 0;
123
124 z = -fScint_z / 2. - height_pmt; // front
125 PlacePMTs(fPmt_log, nullptr, x, y, dx, dy, xmin, ymin, fNx, fNy, x, y, z, k);
126
127 auto rm_z = new G4RotationMatrix();
128 rm_z->rotateY(180. * deg);
129 z = fScint_z / 2. + height_pmt; // back
130 PlacePMTs(fPmt_log, rm_z, x, y, dx, dy, xmin, ymin, fNx, fNy, x, y, z, k);
131
132 auto rm_y1 = new G4RotationMatrix();
133 rm_y1->rotateY(-90. * deg);
134 x = -fScint_x / 2. - height_pmt; // left
135 PlacePMTs(fPmt_log, rm_y1, y, z, dy, dz, ymin, zmin, fNy, fNz, x, y, z, k);
136
137 auto rm_y2 = new G4RotationMatrix();
138 rm_y2->rotateY(90. * deg);
139 x = fScint_x / 2. + height_pmt; // right
140 PlacePMTs(fPmt_log, rm_y2, y, z, dy, dz, ymin, zmin, fNy, fNz, x, y, z, k);
141
142 auto rm_x1 = new G4RotationMatrix();
143 rm_x1->rotateX(90. * deg);
144 y = -fScint_y / 2. - height_pmt; // bottom
145 PlacePMTs(fPmt_log, rm_x1, x, z, dx, dz, xmin, zmin, fNx, fNz, x, y, z, k);
146
147 auto rm_x2 = new G4RotationMatrix();
148 rm_x2->rotateX(-90. * deg);
149 y = fScint_y / 2. + height_pmt; // top
150 PlacePMTs(fPmt_log, rm_x2, x, z, dx, dz, xmin, zmin, fNx, fNz, x, y, z, k);
151
154
155 SetLogicalVolume(fHousing_log);
156}
157
158//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
159
173
174//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
175
176void LXeMainVolume::PlacePMTs(G4LogicalVolume* pmt_log, G4RotationMatrix* rot,
177 G4double& a, G4double& b, G4double da,
178 G4double db, G4double amin, G4double bmin,
179 G4int na, G4int nb, G4double& x, G4double& y,
180 G4double& z, G4int& k)
181{
182 /* PlacePMTs : a different way to parameterize placement that does not depend
183 * on calculating the position from the copy number
184 *
185 * pmt_log = logical volume for pmts to be placed
186 * rot = rotation matrix to apply
187 * a,b = coordinates to vary(ie. if varying in the xy plane then pass x,y)
188 * da,db = value to increment a,b by
189 * amin,bmin = start values for a,b
190 * na,nb = number of repitions in a and b
191 * x,y,z = just pass x,y, and z by reference (the same ones passed for a,b)
192 * k = copy number to start with
193 * sd = sensitive detector for pmts
194 */
195 a = amin;
196 for(G4int j = 1; j <= na; ++j)
197 {
198 a += da;
199 b = bmin;
200 for(G4int i = 1; i <= nb; ++i)
201 {
202 b += db;
203 new G4PVPlacement(rot, G4ThreeVector(x, y, z), pmt_log, "pmt",
204 fHousing_log, false, k);
205 fPmtPositions.push_back(G4ThreeVector(x, y, z));
206 ++k;
207 }
208 }
209}
210
211//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
212
214{
215 auto housing_va = new G4VisAttributes(G4Colour(0.8, 0.8, 0.8));
216 fHousing_log->SetVisAttributes(housing_va);
217
218 auto sphere_va = new G4VisAttributes();
219 sphere_va->SetForceSolid(true);
220 fSphere_log->SetVisAttributes(sphere_va);
221}
222
223//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
224
226{
227 std::vector<G4double> ephoton = { 7.0 * eV, 7.14 * eV };
228
229 //**Scintillator housing properties
230 std::vector<G4double> reflectivity = { fRefl, fRefl };
231 std::vector<G4double> efficiency = { 0.0, 0.0 };
232 auto scintHsngPT = new G4MaterialPropertiesTable();
233 scintHsngPT->AddProperty("REFLECTIVITY", ephoton, reflectivity);
234 scintHsngPT->AddProperty("EFFICIENCY", ephoton, efficiency);
235 auto OpScintHousingSurface =
236 new G4OpticalSurface("HousingSurface", unified, polished, dielectric_metal);
237 OpScintHousingSurface->SetMaterialPropertiesTable(scintHsngPT);
238
239 //**Sphere surface properties
240 std::vector<G4double> sphereReflectivity = { 1.0, 1.0 };
241 std::vector<G4double> sphereEfficiency = { 0.0, 0.0 };
242 auto spherePT = new G4MaterialPropertiesTable();
243 spherePT->AddProperty("REFLECTIVITY", ephoton, sphereReflectivity);
244 spherePT->AddProperty("EFFICIENCY", ephoton, sphereEfficiency);
245 auto OpSphereSurface =
246 new G4OpticalSurface("SphereSurface", unified, polished, dielectric_metal);
247 OpSphereSurface->SetMaterialPropertiesTable(spherePT);
248
249 //**Photocathode surface properties
250 std::vector<G4double> photocath_EFF = { 1., 1. };
251 std::vector<G4double> photocath_ReR = { 1.92, 1.92 };
252 std::vector<G4double> photocath_ImR = { 1.69, 1.69 };
253 auto photocath_mt = new G4MaterialPropertiesTable();
254 photocath_mt->AddProperty("EFFICIENCY", ephoton, photocath_EFF);
255 photocath_mt->AddProperty("REALRINDEX", ephoton, photocath_ReR);
256 photocath_mt->AddProperty("IMAGINARYRINDEX", ephoton, photocath_ImR);
257 auto photocath_opsurf = new G4OpticalSurface(
258 "photocath_opsurf", glisur, polished, dielectric_metal);
259 photocath_opsurf->SetMaterialPropertiesTable(photocath_mt);
260
261 //**Create logical skin surfaces
262 new G4LogicalSkinSurface("photocath_surf", fHousing_log,
263 OpScintHousingSurface);
264 new G4LogicalSkinSurface("sphere_surface", fSphere_log, OpSphereSurface);
265 new G4LogicalSkinSurface("photocath_surf", fPhotocath_log, photocath_opsurf);
266}
std::vector< ExP01TrackerHit * > a
Definition of the LXeMainVolume class.
LXeMainVolume(G4RotationMatrix *pRot, const G4ThreeVector &tlate, G4LogicalVolume *pMotherLogical, G4bool pMany, G4int pCopyNo, LXeDetectorConstruction *c)
G4double fScint_x
G4LogicalVolume * fScint_log
G4double fScint_z
G4Box * fHousing_box
G4LogicalVolume * fPhotocath_log
G4LogicalVolume * fHousing_log
G4double fScint_y
G4double fOuterRadius_pmt
G4LogicalVolume * fPmt_log
void SurfaceProperties()
G4Tubs * fPhotocath
G4LogicalVolume * fSphere_log
void PlacePMTs(G4LogicalVolume *pmt_Log, G4RotationMatrix *rot, G4double &a, G4double &b, G4double da, G4double db, G4double amin, G4double bmin, G4int na, G4int nb, G4double &x, G4double &y, G4double &z, G4int &k)
G4Sphere * fSphere
LXeDetectorConstruction * fConstructor
std::vector< G4ThreeVector > fPmtPositions

Applications | User Support | Publications | Collaboration