Loading...
Searching...
No Matches
Public Member Functions | Private Member Functions | Private Attributes | List of all members
WLSDetectorConstruction Class Reference

#include <Doxymodules_optical.h>

Inheritance diagram for WLSDetectorConstruction:
G4VUserDetectorConstruction

Public Member Functions

 WLSDetectorConstruction ()
 
 ~WLSDetectorConstruction () override
 
G4VPhysicalVolumeConstruct () override
 
G4VPhysicalVolumeConstructDetector ()
 
void ConstructSDandField () override
 
void SetWorldMaterial (G4String)
 
void SetWLSFiberMaterial (G4String)
 
void SetCoupleMaterial (G4String)
 
void SetPhotonDetGeometry (G4String)
 
void SetNumberOfCladding (G4int)
 
void SetWLSLength (G4double)
 
void SetWLSRadius (G4double)
 
void SetClad1Radius (G4double)
 
void SetClad2Radius (G4double)
 
void SetPhotonDetHalfLength (G4double)
 
void SetGap (G4double)
 
void SetPhotonDetAlignment (G4double)
 
void SetXYRatio (G4double)
 
void SetSurfaceRoughness (G4double)
 
void SetMirrorReflectivity (G4double)
 
void SetMirrorPolish (G4double)
 
void SetPhotonDetReflectivity (G4double)
 
void SetPhotonDetPolish (G4double)
 
void SetMirror (G4bool)
 
void SetBarLength (G4double)
 
void SetBarBase (G4double)
 
void SetHoleRadius (G4double)
 
void SetCoatingThickness (G4double)
 
void SetCoatingRadius (G4double)
 
G4double GetWLSFiberLength ()
 
G4double GetWLSFiberEnd ()
 
G4double GetWLSFiberRMax ()
 
G4double GetSurfaceRoughness ()
 
G4bool IsPerfectFiber ()
 
G4double GetBarLength ()
 
G4double GetBarBase ()
 
G4double GetHoleRadius ()
 
G4double GetHoleLength ()
 
G4double GetFiberRadius ()
 
G4double GetCoatingThickness ()
 
G4double GetCoatingRadius ()
 
G4MaterialFindMaterial (G4String)
 

Private Member Functions

void UpdateGeometryParameters ()
 

Private Attributes

std::vector< G4VisAttributes * > fVisAttributes
 
WLSMaterialsfMaterials = nullptr
 
G4LogicalVolumefLogicHole = nullptr
 
G4LogicalVolumefLogicWorld = nullptr
 
G4VPhysicalVolumefPhysiWorld = nullptr
 
G4VPhysicalVolumefPhysiHole = nullptr
 
G4double fWorldSizeX = -1.
 
G4double fWorldSizeY = -1.
 
G4double fWorldSizeZ = -1.
 
G4double fWLSfiberRX = -1.
 
G4double fWLSfiberRY = 0.5 * CLHEP::mm
 
G4double fWLSfiberZ = 1. * CLHEP::m
 
G4double fClad1RX = -1.
 
G4double fClad1RY = -1.
 
G4double fClad1Z = -1.
 
G4double fClad2RX = -1.
 
G4double fClad2RY = -1.
 
G4double fClad2Z = -1.
 
G4double fClrfiberHalfL = -1.
 
G4double fClrfiberZ = -1.
 
G4double fCoupleRX = -1.
 
G4double fCoupleRY = -1.
 
G4double fCoupleZ = -1.
 
G4double fMirrorRmax = -1.
 
G4double fMirrorZ = 0.1 * CLHEP::mm
 
G4bool fMirrorToggle = true
 
G4String fMPPCShape = "Circle"
 
G4double fMPPCHalfL = -1.
 
G4double fMPPCZ = 0.05 * CLHEP::mm
 
G4double fMPPCDist = 0.
 
G4double fMPPCTheta = 0
 
G4double fWLSfiberOrigin = 0.
 
G4double fCoupleOrigin = 0.
 
G4double fMirrorOrigin = 0.
 
G4double fMPPCOriginX = 0.
 
G4double fMPPCOriginZ = 0.
 
G4int fNumOfCladLayers = 0
 
G4double fMirrorPolish = 1.
 
G4double fMirrorReflectivity = 1.
 
G4double fMPPCPolish = 1.
 
G4double fMPPCReflectivity = 0.
 
G4double fExtrusionPolish = 1.
 
G4double fExtrusionReflectivity = 1.
 
G4double fSurfaceRoughness = 1.
 
G4double fXYRatio = 1.
 
G4double fBarLength = 1. * CLHEP::m
 
G4double fBarBase = 9.6 * CLHEP::mm
 
G4double fHoleRadius = 0.9 * CLHEP::mm
 
G4double fHoleLength = -1.
 
G4double fCoatingThickness = 0.25 * CLHEP::mm
 
G4double fCoatingRadius = 1.875 * CLHEP::mm
 
WLSDetectorMessengerfDetectorMessenger = nullptr
 
G4Cache< WLSPhotonDetSD * > fmppcSD
 

Detailed Description

Definition at line 85 of file Doxymodules_optical.h.

Constructor & Destructor Documentation

◆ WLSDetectorConstruction()

WLSDetectorConstruction::WLSDetectorConstruction ( )

◆ ~WLSDetectorConstruction()

WLSDetectorConstruction::~WLSDetectorConstruction ( )
override

Definition at line 77 of file WLSDetectorConstruction.cc.

78{
79 delete fDetectorMessenger;
80 delete fMaterials;
81 for (auto visAttributes: fVisAttributes)
82 {
83 delete visAttributes;
84 }
85}

Member Function Documentation

◆ Construct()

G4VPhysicalVolume * WLSDetectorConstruction::Construct ( )
override

Definition at line 89 of file WLSDetectorConstruction.cc.

90{
91 if(fPhysiWorld)
92 {
93 G4GeometryManager::GetInstance()->OpenGeometry();
94 G4PhysicalVolumeStore::GetInstance()->Clean();
95 G4LogicalVolumeStore::GetInstance()->Clean();
96 G4SolidStore::GetInstance()->Clean();
97 G4LogicalSkinSurface::CleanSurfaceTable();
98 G4LogicalBorderSurface::CleanSurfaceTable();
99 }
100
103
104 return ConstructDetector();
105}
G4VPhysicalVolume * ConstructDetector()
static WLSMaterials * GetInstance()

◆ ConstructDetector()

G4VPhysicalVolume * WLSDetectorConstruction::ConstructDetector ( )

Definition at line 109 of file WLSDetectorConstruction.cc.

110{
111
112 auto air = FindMaterial("G4_AIR");
113 //G4cout << "\nMaterial Properties Table for G4_AIR:" << G4endl;
114 //air->GetMaterialPropertiesTable()->DumpTable();
115
116 //--------------------------------------------------
117 // World
118 //--------------------------------------------------
119
120 G4VSolid* solidWorld =
122
124 new G4LogicalVolume(solidWorld, air, "World");
125
127 new G4PVPlacement(nullptr, G4ThreeVector(), fLogicWorld, "World", nullptr,
128 false, 0);
129
130 //--------------------------------------------------
131 // Extrusion
132 //--------------------------------------------------
133
134 auto coating = FindMaterial("Coating");
135
136 G4VSolid* solidExtrusion = new G4Box("Extrusion", GetBarBase() / 2.,
137 GetBarBase() / 2., GetBarLength() / 2.);
138
139 auto logicExtrusion =
140 new G4LogicalVolume(solidExtrusion, coating, "Extrusion");
141
142 auto TiO2Surface = new G4OpticalSurface(
143 "TiO2Surface", glisur, ground, dielectric_metal, fExtrusionPolish);
144
145 auto TiO2SurfaceProperty = new G4MaterialPropertiesTable();
146
147 std::vector<G4double> p_TiO2 = { 2.00 * eV, 3.47 * eV };
148
149 std::vector<G4double> refl_TiO2 = { fExtrusionReflectivity,
151 std::vector<G4double> effi_TiO2 = { 0., 0. };
152
153 TiO2SurfaceProperty->AddProperty("REFLECTIVITY", p_TiO2, refl_TiO2);
154 TiO2SurfaceProperty->AddProperty("EFFICIENCY", p_TiO2, effi_TiO2);
155
156 TiO2Surface->SetMaterialPropertiesTable(TiO2SurfaceProperty);
157
158 new G4PVPlacement(nullptr, G4ThreeVector(), logicExtrusion, "Extrusion",
159 fLogicWorld, false, 0);
160
161 new G4LogicalSkinSurface("TiO2Surface", logicExtrusion, TiO2Surface);
162
163 //--------------------------------------------------
164 // Scintillator
165 //--------------------------------------------------
166
167 auto polystyrene = FindMaterial("Polystyrene");
168 //G4cout << "\nMaterial Properties Table for Polystyrene:" << G4endl;
169 //polystyrene->GetMaterialPropertiesTable()->DumpTable();
170
171 G4VSolid* solidScintillator =
172 new G4Box("Scintillator",
175 GetBarLength() / 2.);
176
177 auto logicScintillator = new G4LogicalVolume(
178 solidScintillator, polystyrene, "Scintillator");
179
180 new G4PVPlacement(nullptr, G4ThreeVector(), logicScintillator, "Scintillator",
181 logicExtrusion, false, 0);
182
183 G4LogicalVolume* logicScintSide = nullptr;
184 G4LogicalVolume* logicScintCrnr = nullptr;
185 if(GetCoatingRadius() > 0.)
186 {
187 G4VSolid* solidScintside =
188 new G4Box("SideOfBar",
190 GetCoatingRadius() / 2., GetBarLength() / 2.);
191
192 G4VSolid* solidScintcrnr =
193 new G4Tubs("CrnrOfBar", 0.0 * cm, GetCoatingRadius(), GetBarLength() / 2.,
194 0. * deg, 90. * deg);
195
196 logicScintSide = new G4LogicalVolume(
197 solidScintside, polystyrene, "SideOfBar");
198
199 logicScintCrnr = new G4LogicalVolume(
200 solidScintcrnr, polystyrene, "CrnrOfBar");
201
202 G4double pos =
204
205 new G4PVPlacement(nullptr, G4ThreeVector(0., -pos, 0.), logicScintSide,
206 "SideOfBar", logicExtrusion, false, 0);
207
208 new G4PVPlacement(nullptr, G4ThreeVector(0., pos, 0.), logicScintSide,
209 "SideOfBar", logicExtrusion, false, 1);
210
211 auto rot1 = new G4RotationMatrix();
212 rot1->rotateZ(-90.*deg);
213
214 new G4PVPlacement(rot1, G4ThreeVector(pos, 0., 0.), logicScintSide,
215 "SideOfBar", logicExtrusion, false, 2);
216
217 new G4PVPlacement(rot1, G4ThreeVector(-pos, 0., 0.), logicScintSide,
218 "SideOfBar", logicExtrusion, false, 3);
219
221
222 new G4PVPlacement(nullptr, G4ThreeVector(pos, pos, 0.), logicScintCrnr,
223 "CrnrOfBar", logicExtrusion, false, 0);
224
225 new G4PVPlacement(rot1, G4ThreeVector(-pos, pos, 0.), logicScintCrnr,
226 "CrnrOfBar", logicExtrusion, false, 1);
227
228 auto rot2 = new G4RotationMatrix();
229 rot2->rotateZ(-180.*deg);
230
231 new G4PVPlacement(rot2, G4ThreeVector(-pos, -pos, 0.), logicScintCrnr,
232 "CrnrOfBar", logicExtrusion, false, 2);
233
234 auto rot3 = new G4RotationMatrix();
235 rot3->rotateZ(-270.*deg);
236
237 new G4PVPlacement(rot3, G4ThreeVector(pos, -pos, 0.), logicScintCrnr,
238 "CrnrOfBar", logicExtrusion, false, 3);
239 }
240
242 {
243 G4VSolid* solidHole = new G4Tubs(
244 "Hole", 0., GetHoleRadius(), GetHoleLength() / 2., 0. * deg, 360. * deg);
245
246 fLogicHole = new G4LogicalVolume(solidHole, air, "Hole");
247
248 fPhysiHole = new G4PVPlacement(nullptr, G4ThreeVector(), fLogicHole, "Hole",
249 logicScintillator, false, 0);
250 }
251
252 //--------------------------------------------------
253 // Fiber
254 //--------------------------------------------------
255
256 if(!(fLogicHole) || !(fPhysiHole))
257 {
258 G4ExceptionDescription ed;
259 ed << "The Fiber Hole has not been constructed";
260 G4Exception("WLSDetectorConstruction", "wls001", FatalException, ed);
261 }
262
263 // Pointers to the most recently constructed volume
264 G4LogicalVolume* logicPlacement = fLogicHole;
265 G4VPhysicalVolume* physiPlacement = fPhysiHole;
266
267 //--------------------------------------------------
268 // Fiber Construction
269 //--------------------------------------------------
270
271 // Boundary Surface Properties
272 G4OpticalSurface* opSurface = nullptr;
273
274 if(fSurfaceRoughness < 1.)
275 opSurface = new G4OpticalSurface("RoughSurface", glisur, ground,
276 dielectric_dielectric, fSurfaceRoughness);
277
278 G4LogicalVolume* logicWLSfiber = nullptr;
279 G4LogicalVolume* logicClad1 = nullptr;
280 G4LogicalVolume* logicClad2 = nullptr;
281 G4VPhysicalVolume* physiClad1 = nullptr;
282 G4VPhysicalVolume* physiClad2 = nullptr;
283
284 auto fpethylene = FindMaterial("FPethylene");
285 auto pethylene = FindMaterial("Pethylene");
286 auto pmma = FindMaterial("PMMA");
287
288 // Determine the number of cladding layers to be built
289 switch(fNumOfCladLayers)
290 {
291 case 2:
292
293 //--------------------------------------------------
294 // Cladding 2
295 //--------------------------------------------------
296
297 //G4cout << "\nMaterial Properties Table for fPethylene:" << G4endl;
298 //fpethylene->GetMaterialPropertiesTable()->DumpTable();
299
300 G4VSolid* solidClad2;
301
302 if(fXYRatio == 1.)
303 solidClad2 = new G4Tubs("Clad2", 0., fClad2RX, fClad2Z, 0., twopi);
304 else
305 solidClad2 = new G4EllipticalTube("Clad2", fClad2RX, fClad2RY, fClad2Z);
306
307 logicClad2 =
308 new G4LogicalVolume(solidClad2, fpethylene, "Clad2");
309
310 physiClad2 =
311 new G4PVPlacement(nullptr, G4ThreeVector(0.0, 0.0, fWLSfiberOrigin),
312 logicClad2, "Clad2", logicPlacement, false, 0);
313
314 // Place the rough surface only if needed
315 if(opSurface)
316 {
317 new G4LogicalBorderSurface("surfaceClad2Out", physiClad2,
318 physiPlacement, opSurface);
319 new G4LogicalBorderSurface("surfaceClad2In", physiPlacement, physiClad2,
320 opSurface);
321 }
322
323 logicPlacement = logicClad2;
324 physiPlacement = physiClad2;
325 [[fallthrough]];
326
327 case 1:
328
329 //--------------------------------------------------
330 // Cladding 1
331 //--------------------------------------------------
332
333 //G4cout << "\nMaterial Properties Table for Pethylene:" << G4endl;
334 //pethylene->GetMaterialPropertiesTable()->DumpTable();
335
336 G4VSolid* solidClad1;
337
338 if(fXYRatio == 1.)
339 solidClad1 = new G4Tubs("Clad1", 0., fClad1RX, fClad1Z, 0., twopi);
340 else
341 solidClad1 = new G4EllipticalTube("Clad1", fClad1RX, fClad1RY, fClad1Z);
342
343 logicClad1 =
344 new G4LogicalVolume(solidClad1, pethylene, "Clad1");
345
346 physiClad1 =
347 new G4PVPlacement(nullptr, G4ThreeVector(0., 0., fWLSfiberOrigin),
348 logicClad1, "Clad1", logicPlacement, false, 0);
349
350 // Place the rough surface only if needed
351 if(opSurface)
352 {
353 new G4LogicalBorderSurface("surfaceClad1Out", physiClad1,
354 physiPlacement, opSurface);
355
356 new G4LogicalBorderSurface("surfaceClad1In", physiPlacement, physiClad1,
357 opSurface);
358 }
359
360 logicPlacement = logicClad1;
361 physiPlacement = physiClad1;
362 [[fallthrough]];
363
364 default:
365
366 //--------------------------------------------------
367 // WLS Fiber
368 //--------------------------------------------------
369
370 //G4cout << "\nMaterial Properties Table for PMMA:" << G4endl;
371 //pmma->GetMaterialPropertiesTable()->DumpTable();
372
373 G4VSolid* solidWLSfiber;
374
375 if(fXYRatio == 1.)
376 {
377 solidWLSfiber =
378 new G4Tubs("WLSFiber", 0., fWLSfiberRX, fWLSfiberZ, 0., twopi);
379 }
380 else
381 {
382 solidWLSfiber = new G4EllipticalTube("WLSFiber", fWLSfiberRX,
384 }
385
386 logicWLSfiber =
387 new G4LogicalVolume(solidWLSfiber, pmma, "WLSFiber");
388
389 logicWLSfiber->SetUserLimits(
390 new G4UserLimits(DBL_MAX, DBL_MAX, 10. * ms));
391
392 G4VPhysicalVolume* physiWLSfiber =
393 new G4PVPlacement(nullptr, G4ThreeVector(0., 0., fWLSfiberOrigin),
394 logicWLSfiber, "WLSFiber", logicPlacement, false, 0);
395
396 // Place the rough surface only if needed
397 if(opSurface)
398 {
399 new G4LogicalBorderSurface("surfaceWLSOut", physiWLSfiber,
400 physiPlacement, opSurface);
401
402 new G4LogicalBorderSurface("surfaceWLSIn", physiPlacement,
403 physiWLSfiber, opSurface);
404 }
405 }
406
407 //--------------------------------------------------
408 // Mirror for reflection at one of the end
409 //--------------------------------------------------
410
411 // Place the mirror only if the user wants the mirror
412 G4LogicalVolume* logicMirror = nullptr;
413
414 auto aluminum = FindMaterial("G4_Al");
415
416 if(fMirrorToggle)
417 {
418 G4VSolid* solidMirror =
419 new G4Box("Mirror", fMirrorRmax, fMirrorRmax, fMirrorZ);
420
421 logicMirror =
422 new G4LogicalVolume(solidMirror, aluminum, "Mirror");
423
424 auto mirrorSurface = new G4OpticalSurface(
425 "MirrorSurface", glisur, ground, dielectric_metal, fMirrorPolish);
426
427 auto mirrorSurfaceProperty = new G4MaterialPropertiesTable();
428
429 std::vector<G4double> p_mirror = { 2.00 * eV, 3.47 * eV };
430 std::vector<G4double> refl_mirror = { fMirrorReflectivity,
432 std::vector<G4double> effi_mirror = { 0., 0. };
433
434 mirrorSurfaceProperty->AddProperty("REFLECTIVITY", p_mirror, refl_mirror);
435 mirrorSurfaceProperty->AddProperty("EFFICIENCY", p_mirror, effi_mirror);
436
437 mirrorSurface->SetMaterialPropertiesTable(mirrorSurfaceProperty);
438
439 new G4PVPlacement(nullptr, G4ThreeVector(0., 0., fMirrorOrigin),
440 logicMirror, "Mirror", fLogicWorld, false, 0);
441
442 new G4LogicalSkinSurface("MirrorSurface", logicMirror, mirrorSurface);
443 }
444
445 //--------------------------------------------------
446 // Coupling at the read-out end
447 //--------------------------------------------------
448
449 // Clear Fiber (Coupling Layer)
450 G4VSolid* solidCouple = new G4Box("Couple", fCoupleRX, fCoupleRY, fCoupleZ);
451
452 auto logicCouple = new G4LogicalVolume(solidCouple, air, "Couple");
453
454 new G4PVPlacement(nullptr, G4ThreeVector(0., 0., fCoupleOrigin), logicCouple,
455 "Couple", fLogicWorld, false, 0);
456
457 //--------------------------------------------------
458 // A logical layer in front of PhotonDet
459 //--------------------------------------------------
460
461 // Purpose: Preventing direct dielectric to metal contact
462
463 // Check for valid placement of PhotonDet
464 if(fMPPCTheta > std::atan(fMPPCDist / fMPPCHalfL))
465 {
466 fMPPCTheta = 0.;
469 G4ExceptionDescription ed;
470 ed << "Invalid alignment. Alignment reset to 0.";
471 G4Exception("WLSDetectorConstruction", "wls002", JustWarning, ed);
472 }
473
474 // Clear Fiber (Coupling Layer)
475 G4VSolid* solidClrfiber;
476
477 if(fMPPCShape == "Square")
478 {
479 solidClrfiber =
480 new G4Box("ClearFiber", fClrfiberHalfL, fClrfiberHalfL, fClrfiberZ);
481 }
482 else
483 {
484 solidClrfiber =
485 new G4Tubs("ClearFiber", 0., fClrfiberHalfL, fClrfiberZ, 0., twopi);
486 }
487
488 auto logicClrfiber = new G4LogicalVolume(solidClrfiber, air, "ClearFiber");
489
490 new G4PVPlacement(new G4RotationMatrix(CLHEP::HepRotationY(-fMPPCTheta)),
491 G4ThreeVector(fMPPCOriginX, 0.0, fMPPCOriginZ),
492 logicClrfiber, "ClearFiber", logicCouple, false, 0);
493
494 //--------------------------------------------------
495 // PhotonDet (Sensitive Detector)
496 //--------------------------------------------------
497
498 // Physical Construction
499 G4VSolid* solidPhotonDet = nullptr;
500
501 if(fMPPCShape == "Square")
502 solidPhotonDet = new G4Box("PhotonDet", fMPPCHalfL, fMPPCHalfL, fMPPCZ);
503 else
504 solidPhotonDet = new G4Tubs("PhotonDet", 0., fMPPCHalfL, fMPPCZ, 0., twopi);
505
506 auto logicPhotonDet =
507 new G4LogicalVolume(solidPhotonDet, aluminum, "PhotonDet_LV");
508
509 new G4PVPlacement(nullptr, G4ThreeVector(0., 0., 0.), logicPhotonDet,
510 "PhotonDet", logicClrfiber, false, 0);
511
512 // PhotonDet Surface Properties
513 auto photonDetSurface = new G4OpticalSurface(
514 "PhotonDetSurface", glisur, ground, dielectric_metal, fMPPCPolish);
515
516 auto photonDetSurfaceProperty = new G4MaterialPropertiesTable();
517
518 std::vector<G4double> p_mppc = { 2.00 * eV, 3.47 * eV };
519 std::vector<G4double> refl_mppc = { fMPPCReflectivity, fMPPCReflectivity };
520 std::vector<G4double> effi_mppc = { 1., 1. };
521
522 photonDetSurfaceProperty->AddProperty("REFLECTIVITY", p_mppc, refl_mppc);
523 photonDetSurfaceProperty->AddProperty("EFFICIENCY", p_mppc, effi_mppc);
524
525 photonDetSurface->SetMaterialPropertiesTable(photonDetSurfaceProperty);
526
527 new G4LogicalSkinSurface("PhotonDetSurface", logicPhotonDet,
528 photonDetSurface);
529
530 // visualization attributes -------------------------------------------------
531
532 auto visAttributes = new G4VisAttributes(G4Colour(1.0,1.0,1.0));
533 visAttributes->SetVisibility(false);
534 fLogicWorld->SetVisAttributes(visAttributes);
535 fVisAttributes.push_back(visAttributes);
536
537 visAttributes = new G4VisAttributes(G4Colour(0.2,0.2,0.2,0.5));
538 visAttributes->SetVisibility(true);
539 logicExtrusion->SetVisAttributes(visAttributes);
540 fVisAttributes.push_back(visAttributes);
541
542 visAttributes = new G4VisAttributes(G4Colour(0.0,0.0,1.0,0.9));
543 visAttributes->SetVisibility(true);
544 logicScintillator->SetVisAttributes(visAttributes);
545 fVisAttributes.push_back(visAttributes);
546
547 visAttributes = new G4VisAttributes(G4Colour(0.0,0.8,0.2,0.2));
548 visAttributes->SetVisibility(true);
549 logicScintSide->SetVisAttributes(visAttributes);
550 fVisAttributes.push_back(visAttributes);
551
552 visAttributes = new G4VisAttributes(G4Colour(0.0,0.8,0.2,0.2));
553 visAttributes->SetVisibility(true);
554 logicScintCrnr->SetVisAttributes(visAttributes);
555 fVisAttributes.push_back(visAttributes);
556
557 visAttributes = new G4VisAttributes(G4Colour(0.4,0.0,0.0,0.5));
558 visAttributes->SetVisibility(true);
559 fLogicHole->SetVisAttributes(visAttributes);
560 fVisAttributes.push_back(visAttributes);
561
562 if(logicClad1 != nullptr)
563 {
564 visAttributes = new G4VisAttributes(G4Colour(0.0,0.8,0.5,0.5));
565 visAttributes->SetVisibility(true);
566 logicClad1->SetVisAttributes(visAttributes);
567 fVisAttributes.push_back(visAttributes);
568 }
569
570 if(logicClad2 != nullptr)
571 {
572 visAttributes = new G4VisAttributes(G4Colour(0.0,0.5,0.8,0.5));
573 visAttributes->SetVisibility(true);
574 logicClad2->SetVisAttributes(visAttributes);
575 fVisAttributes.push_back(visAttributes);
576 }
577
578 visAttributes = new G4VisAttributes(G4Colour(0.8,0.8,1.0));
579 visAttributes->SetVisibility(true);
580 logicWLSfiber->SetVisAttributes(visAttributes);
581 fVisAttributes.push_back(visAttributes);
582
583 if(fMirrorToggle == true)
584 {
585 visAttributes = new G4VisAttributes(G4Colour(0.3,0.3,1.0,0.3));
586 visAttributes->SetVisibility(true);
587 logicMirror->SetVisAttributes(visAttributes);
588 fVisAttributes.push_back(visAttributes);
589 }
590
591 visAttributes = new G4VisAttributes(G4Colour(0.0,0.0,0.5,0.5));
592 visAttributes->SetVisibility(true);
593 logicCouple->SetVisAttributes(visAttributes);
594 fVisAttributes.push_back(visAttributes);
595
596 visAttributes = new G4VisAttributes(G4Colour(0.3,0.3,0.3,0.5));
597 visAttributes->SetVisibility(true);
598 logicClrfiber->SetVisAttributes(visAttributes);
599 fVisAttributes.push_back(visAttributes);
600
601 visAttributes = new G4VisAttributes(G4Colour(1.0,1.0,1.0,0.8));
602 visAttributes->SetVisibility(true);
603 logicPhotonDet->SetVisAttributes(visAttributes);
604 fVisAttributes.push_back(visAttributes);
605
606 return fPhysiWorld;
607}
G4Material * FindMaterial(G4String)

◆ ConstructSDandField()

void WLSDetectorConstruction::ConstructSDandField ( )
override

Definition at line 613 of file WLSDetectorConstruction.cc.

614{
615 if(!fmppcSD.Get())
616 {
617 G4String mppcSDName = "WLS/PhotonDet";
618 auto mppcSD = new WLSPhotonDetSD(mppcSDName);
619 G4SDManager::GetSDMpointer()->AddNewDetector(mppcSD);
620 fmppcSD.Put(mppcSD);
621 }
622 SetSensitiveDetector("PhotonDet_LV", fmppcSD.Get(), true);
623}
G4Cache< WLSPhotonDetSD * > fmppcSD

◆ SetWorldMaterial()

void WLSDetectorConstruction::SetWorldMaterial ( G4String  )

◆ SetWLSFiberMaterial()

void WLSDetectorConstruction::SetWLSFiberMaterial ( G4String  )

◆ SetCoupleMaterial()

void WLSDetectorConstruction::SetCoupleMaterial ( G4String  )

◆ SetPhotonDetGeometry()

void WLSDetectorConstruction::SetPhotonDetGeometry ( G4String  shape)

Definition at line 659 of file WLSDetectorConstruction.cc.

662{
663 if(shape == "Circle" || shape == "Square")
664 fMPPCShape = shape;
665 G4RunManager::GetRunManager()->GeometryHasBeenModified();
666}

◆ SetNumberOfCladding()

void WLSDetectorConstruction::SetNumberOfCladding ( G4int  num)

Definition at line 670 of file WLSDetectorConstruction.cc.

673{
674 fNumOfCladLayers = num;
675 G4RunManager::GetRunManager()->GeometryHasBeenModified();
676}

◆ SetWLSLength()

void WLSDetectorConstruction::SetWLSLength ( G4double  length)

Definition at line 680 of file WLSDetectorConstruction.cc.

682{
683 fWLSfiberZ = length;
684 G4RunManager::GetRunManager()->GeometryHasBeenModified();
685}

◆ SetWLSRadius()

void WLSDetectorConstruction::SetWLSRadius ( G4double  radius)

Definition at line 689 of file WLSDetectorConstruction.cc.

691{
692 fWLSfiberRY = radius;
693 G4RunManager::GetRunManager()->GeometryHasBeenModified();
694}

◆ SetClad1Radius()

void WLSDetectorConstruction::SetClad1Radius ( G4double  radius)

Definition at line 698 of file WLSDetectorConstruction.cc.

700{
701 fClad1RY = radius;
702 G4RunManager::GetRunManager()->GeometryHasBeenModified();
703}

◆ SetClad2Radius()

void WLSDetectorConstruction::SetClad2Radius ( G4double  radius)

Definition at line 707 of file WLSDetectorConstruction.cc.

709{
710 fClad2RY = radius;
711 G4RunManager::GetRunManager()->GeometryHasBeenModified();
712}

◆ SetPhotonDetHalfLength()

void WLSDetectorConstruction::SetPhotonDetHalfLength ( G4double  halfL)

Definition at line 716 of file WLSDetectorConstruction.cc.

719{
720 fMPPCHalfL = halfL;
721 G4RunManager::GetRunManager()->GeometryHasBeenModified();
722}

◆ SetGap()

void WLSDetectorConstruction::SetGap ( G4double  gap)

Definition at line 726 of file WLSDetectorConstruction.cc.

728{
729 fMPPCDist = gap;
730 G4RunManager::GetRunManager()->GeometryHasBeenModified();
731}

◆ SetPhotonDetAlignment()

void WLSDetectorConstruction::SetPhotonDetAlignment ( G4double  theta)

Definition at line 735 of file WLSDetectorConstruction.cc.

740{
741 fMPPCTheta = theta;
742 G4RunManager::GetRunManager()->GeometryHasBeenModified();
743}

◆ SetXYRatio()

void WLSDetectorConstruction::SetXYRatio ( G4double  r)

Definition at line 807 of file WLSDetectorConstruction.cc.

810{
811 fXYRatio = r;
812 G4RunManager::GetRunManager()->GeometryHasBeenModified();
813}

◆ SetSurfaceRoughness()

void WLSDetectorConstruction::SetSurfaceRoughness ( G4double  roughness)

Definition at line 747 of file WLSDetectorConstruction.cc.

750{
751 fSurfaceRoughness = roughness;
752 G4RunManager::GetRunManager()->GeometryHasBeenModified();
753}

◆ SetMirrorReflectivity()

void WLSDetectorConstruction::SetMirrorReflectivity ( G4double  reflectivity)

Definition at line 767 of file WLSDetectorConstruction.cc.

770{
771 fMirrorReflectivity = reflectivity;
772 G4RunManager::GetRunManager()->GeometryHasBeenModified();
773}

◆ SetMirrorPolish()

void WLSDetectorConstruction::SetMirrorPolish ( G4double  polish)

Definition at line 757 of file WLSDetectorConstruction.cc.

760{
761 fMirrorPolish = polish;
762 G4RunManager::GetRunManager()->GeometryHasBeenModified();
763}

◆ SetPhotonDetReflectivity()

void WLSDetectorConstruction::SetPhotonDetReflectivity ( G4double  reflectivity)

Definition at line 787 of file WLSDetectorConstruction.cc.

790{
791 fMPPCReflectivity = reflectivity;
792 G4RunManager::GetRunManager()->GeometryHasBeenModified();
793}

◆ SetPhotonDetPolish()

void WLSDetectorConstruction::SetPhotonDetPolish ( G4double  polish)

Definition at line 777 of file WLSDetectorConstruction.cc.

780{
781 fMPPCPolish = polish;
782 G4RunManager::GetRunManager()->GeometryHasBeenModified();
783}

◆ SetMirror()

void WLSDetectorConstruction::SetMirror ( G4bool  flag)

Definition at line 797 of file WLSDetectorConstruction.cc.

800{
801 fMirrorToggle = flag;
802 G4RunManager::GetRunManager()->GeometryHasBeenModified();
803}

◆ SetBarLength()

void WLSDetectorConstruction::SetBarLength ( G4double  length)

Definition at line 817 of file WLSDetectorConstruction.cc.

819{
820 fBarLength = length;
821 G4RunManager::GetRunManager()->GeometryHasBeenModified();
822}

◆ SetBarBase()

void WLSDetectorConstruction::SetBarBase ( G4double  side)

Definition at line 826 of file WLSDetectorConstruction.cc.

828{
829 fBarBase = side;
830 G4RunManager::GetRunManager()->GeometryHasBeenModified();
831}

◆ SetHoleRadius()

void WLSDetectorConstruction::SetHoleRadius ( G4double  radius)

Definition at line 835 of file WLSDetectorConstruction.cc.

837{
838 fHoleRadius = radius;
839 G4RunManager::GetRunManager()->GeometryHasBeenModified();
840}

◆ SetCoatingThickness()

void WLSDetectorConstruction::SetCoatingThickness ( G4double  thick)

Definition at line 844 of file WLSDetectorConstruction.cc.

846{
847 fCoatingThickness = thick;
848 G4RunManager::GetRunManager()->GeometryHasBeenModified();
849}

◆ SetCoatingRadius()

void WLSDetectorConstruction::SetCoatingRadius ( G4double  radius)

Definition at line 853 of file WLSDetectorConstruction.cc.

855{
856 fCoatingRadius = radius;
857 G4RunManager::GetRunManager()->GeometryHasBeenModified();
858}

◆ GetWLSFiberLength()

G4double WLSDetectorConstruction::GetWLSFiberLength ( )

Definition at line 862 of file WLSDetectorConstruction.cc.

862{ return fWLSfiberZ; }

◆ GetWLSFiberEnd()

G4double WLSDetectorConstruction::GetWLSFiberEnd ( )

Definition at line 897 of file WLSDetectorConstruction.cc.

898{
900}

◆ GetWLSFiberRMax()

G4double WLSDetectorConstruction::GetWLSFiberRMax ( )

Definition at line 904 of file WLSDetectorConstruction.cc.

905{
906 if(fNumOfCladLayers == 2)
907 return fClad2RY;
908 if(fNumOfCladLayers == 1)
909 return fClad1RY;
910 return fWLSfiberRY;
911}

◆ GetSurfaceRoughness()

G4double WLSDetectorConstruction::GetSurfaceRoughness ( )

Definition at line 915 of file WLSDetectorConstruction.cc.

916{
917 return fSurfaceRoughness;
918}

◆ IsPerfectFiber()

G4bool WLSDetectorConstruction::IsPerfectFiber ( )

Definition at line 923 of file WLSDetectorConstruction.cc.

924{
925 return fSurfaceRoughness == 1. && fXYRatio == 1. &&
926 (!fMirrorToggle || (fMirrorPolish == 1. && fMirrorReflectivity == 1.));
927}

◆ GetBarLength()

G4double WLSDetectorConstruction::GetBarLength ( )

Definition at line 866 of file WLSDetectorConstruction.cc.

866{ return fBarLength; }

◆ GetBarBase()

G4double WLSDetectorConstruction::GetBarBase ( )

Definition at line 870 of file WLSDetectorConstruction.cc.

870{ return fBarBase; }

◆ GetHoleRadius()

G4double WLSDetectorConstruction::GetHoleRadius ( )

Definition at line 874 of file WLSDetectorConstruction.cc.

874{ return fHoleRadius; }

◆ GetHoleLength()

G4double WLSDetectorConstruction::GetHoleLength ( )

Definition at line 878 of file WLSDetectorConstruction.cc.

878{ return fHoleLength; }

◆ GetFiberRadius()

G4double WLSDetectorConstruction::GetFiberRadius ( )

Definition at line 882 of file WLSDetectorConstruction.cc.

882{ return GetWLSFiberRMax(); }

◆ GetCoatingThickness()

G4double WLSDetectorConstruction::GetCoatingThickness ( )

Definition at line 886 of file WLSDetectorConstruction.cc.

887{
888 return fCoatingThickness;
889}

◆ GetCoatingRadius()

G4double WLSDetectorConstruction::GetCoatingRadius ( )

Definition at line 893 of file WLSDetectorConstruction.cc.

893{ return fCoatingRadius; }

◆ FindMaterial()

G4Material * WLSDetectorConstruction::FindMaterial ( G4String  name)

Definition at line 931 of file WLSDetectorConstruction.cc.

932{
933 G4Material* material = G4Material::GetMaterial(name, true);
934 return material;
935}

◆ UpdateGeometryParameters()

void WLSDetectorConstruction::UpdateGeometryParameters ( )
private

Member Data Documentation

◆ fVisAttributes

std::vector<G4VisAttributes*> WLSDetectorConstruction::fVisAttributes
private

Definition at line 120 of file WLSDetectorConstruction.hh.

◆ fMaterials

WLSMaterials* WLSDetectorConstruction::fMaterials = nullptr
private

Definition at line 122 of file WLSDetectorConstruction.hh.

◆ fLogicHole

G4LogicalVolume* WLSDetectorConstruction::fLogicHole = nullptr
private

Definition at line 124 of file WLSDetectorConstruction.hh.

◆ fLogicWorld

G4LogicalVolume* WLSDetectorConstruction::fLogicWorld = nullptr
private

Definition at line 125 of file WLSDetectorConstruction.hh.

◆ fPhysiWorld

G4VPhysicalVolume* WLSDetectorConstruction::fPhysiWorld = nullptr
private

Definition at line 127 of file WLSDetectorConstruction.hh.

◆ fPhysiHole

G4VPhysicalVolume* WLSDetectorConstruction::fPhysiHole = nullptr
private

Definition at line 128 of file WLSDetectorConstruction.hh.

◆ fWorldSizeX

G4double WLSDetectorConstruction::fWorldSizeX = -1.
private

Definition at line 130 of file WLSDetectorConstruction.hh.

◆ fWorldSizeY

G4double WLSDetectorConstruction::fWorldSizeY = -1.
private

Definition at line 131 of file WLSDetectorConstruction.hh.

◆ fWorldSizeZ

G4double WLSDetectorConstruction::fWorldSizeZ = -1.
private

Definition at line 132 of file WLSDetectorConstruction.hh.

◆ fWLSfiberRX

G4double WLSDetectorConstruction::fWLSfiberRX = -1.
private

Definition at line 134 of file WLSDetectorConstruction.hh.

◆ fWLSfiberRY

G4double WLSDetectorConstruction::fWLSfiberRY = 0.5 * CLHEP::mm
private

Definition at line 135 of file WLSDetectorConstruction.hh.

◆ fWLSfiberZ

G4double WLSDetectorConstruction::fWLSfiberZ = 1. * CLHEP::m
private

Definition at line 136 of file WLSDetectorConstruction.hh.

◆ fClad1RX

G4double WLSDetectorConstruction::fClad1RX = -1.
private

Definition at line 138 of file WLSDetectorConstruction.hh.

◆ fClad1RY

G4double WLSDetectorConstruction::fClad1RY = -1.
private

Definition at line 139 of file WLSDetectorConstruction.hh.

◆ fClad1Z

G4double WLSDetectorConstruction::fClad1Z = -1.
private

Definition at line 140 of file WLSDetectorConstruction.hh.

◆ fClad2RX

G4double WLSDetectorConstruction::fClad2RX = -1.
private

Definition at line 142 of file WLSDetectorConstruction.hh.

◆ fClad2RY

G4double WLSDetectorConstruction::fClad2RY = -1.
private

Definition at line 143 of file WLSDetectorConstruction.hh.

◆ fClad2Z

G4double WLSDetectorConstruction::fClad2Z = -1.
private

Definition at line 144 of file WLSDetectorConstruction.hh.

◆ fClrfiberHalfL

G4double WLSDetectorConstruction::fClrfiberHalfL = -1.
private

Definition at line 146 of file WLSDetectorConstruction.hh.

◆ fClrfiberZ

G4double WLSDetectorConstruction::fClrfiberZ = -1.
private

Definition at line 147 of file WLSDetectorConstruction.hh.

◆ fCoupleRX

G4double WLSDetectorConstruction::fCoupleRX = -1.
private

Definition at line 149 of file WLSDetectorConstruction.hh.

◆ fCoupleRY

G4double WLSDetectorConstruction::fCoupleRY = -1.
private

Definition at line 150 of file WLSDetectorConstruction.hh.

◆ fCoupleZ

G4double WLSDetectorConstruction::fCoupleZ = -1.
private

Definition at line 151 of file WLSDetectorConstruction.hh.

◆ fMirrorRmax

G4double WLSDetectorConstruction::fMirrorRmax = -1.
private

Definition at line 153 of file WLSDetectorConstruction.hh.

◆ fMirrorZ

G4double WLSDetectorConstruction::fMirrorZ = 0.1 * CLHEP::mm
private

Definition at line 154 of file WLSDetectorConstruction.hh.

◆ fMirrorToggle

G4bool WLSDetectorConstruction::fMirrorToggle = true
private

Definition at line 155 of file WLSDetectorConstruction.hh.

◆ fMPPCShape

G4String WLSDetectorConstruction::fMPPCShape = "Circle"
private

Definition at line 157 of file WLSDetectorConstruction.hh.

◆ fMPPCHalfL

G4double WLSDetectorConstruction::fMPPCHalfL = -1.
private

Definition at line 158 of file WLSDetectorConstruction.hh.

◆ fMPPCZ

G4double WLSDetectorConstruction::fMPPCZ = 0.05 * CLHEP::mm
private

Definition at line 159 of file WLSDetectorConstruction.hh.

◆ fMPPCDist

G4double WLSDetectorConstruction::fMPPCDist = 0.
private

Definition at line 160 of file WLSDetectorConstruction.hh.

◆ fMPPCTheta

G4double WLSDetectorConstruction::fMPPCTheta = 0
private

Definition at line 161 of file WLSDetectorConstruction.hh.

◆ fWLSfiberOrigin

G4double WLSDetectorConstruction::fWLSfiberOrigin = 0.
private

Definition at line 163 of file WLSDetectorConstruction.hh.

◆ fCoupleOrigin

G4double WLSDetectorConstruction::fCoupleOrigin = 0.
private

Definition at line 164 of file WLSDetectorConstruction.hh.

◆ fMirrorOrigin

G4double WLSDetectorConstruction::fMirrorOrigin = 0.
private

Definition at line 165 of file WLSDetectorConstruction.hh.

◆ fMPPCOriginX

G4double WLSDetectorConstruction::fMPPCOriginX = 0.
private

Definition at line 166 of file WLSDetectorConstruction.hh.

◆ fMPPCOriginZ

G4double WLSDetectorConstruction::fMPPCOriginZ = 0.
private

Definition at line 167 of file WLSDetectorConstruction.hh.

◆ fNumOfCladLayers

G4int WLSDetectorConstruction::fNumOfCladLayers = 0
private

Definition at line 169 of file WLSDetectorConstruction.hh.

◆ fMirrorPolish

G4double WLSDetectorConstruction::fMirrorPolish = 1.
private

Definition at line 171 of file WLSDetectorConstruction.hh.

◆ fMirrorReflectivity

G4double WLSDetectorConstruction::fMirrorReflectivity = 1.
private

Definition at line 172 of file WLSDetectorConstruction.hh.

◆ fMPPCPolish

G4double WLSDetectorConstruction::fMPPCPolish = 1.
private

Definition at line 173 of file WLSDetectorConstruction.hh.

◆ fMPPCReflectivity

G4double WLSDetectorConstruction::fMPPCReflectivity = 0.
private

Definition at line 174 of file WLSDetectorConstruction.hh.

◆ fExtrusionPolish

G4double WLSDetectorConstruction::fExtrusionPolish = 1.
private

Definition at line 175 of file WLSDetectorConstruction.hh.

◆ fExtrusionReflectivity

G4double WLSDetectorConstruction::fExtrusionReflectivity = 1.
private

Definition at line 176 of file WLSDetectorConstruction.hh.

◆ fSurfaceRoughness

G4double WLSDetectorConstruction::fSurfaceRoughness = 1.
private

Definition at line 177 of file WLSDetectorConstruction.hh.

◆ fXYRatio

G4double WLSDetectorConstruction::fXYRatio = 1.
private

Definition at line 178 of file WLSDetectorConstruction.hh.

◆ fBarLength

G4double WLSDetectorConstruction::fBarLength = 1. * CLHEP::m
private

Definition at line 180 of file WLSDetectorConstruction.hh.

◆ fBarBase

G4double WLSDetectorConstruction::fBarBase = 9.6 * CLHEP::mm
private

Definition at line 181 of file WLSDetectorConstruction.hh.

◆ fHoleRadius

G4double WLSDetectorConstruction::fHoleRadius = 0.9 * CLHEP::mm
private

Definition at line 182 of file WLSDetectorConstruction.hh.

◆ fHoleLength

G4double WLSDetectorConstruction::fHoleLength = -1.
private

Definition at line 183 of file WLSDetectorConstruction.hh.

◆ fCoatingThickness

G4double WLSDetectorConstruction::fCoatingThickness = 0.25 * CLHEP::mm
private

Definition at line 184 of file WLSDetectorConstruction.hh.

◆ fCoatingRadius

G4double WLSDetectorConstruction::fCoatingRadius = 1.875 * CLHEP::mm
private

Definition at line 185 of file WLSDetectorConstruction.hh.

◆ fDetectorMessenger

WLSDetectorMessenger* WLSDetectorConstruction::fDetectorMessenger = nullptr
private

Definition at line 189 of file WLSDetectorConstruction.hh.

◆ fmppcSD

G4Cache<WLSPhotonDetSD*> WLSDetectorConstruction::fmppcSD
private

Definition at line 190 of file WLSDetectorConstruction.hh.


The documentation for this class was generated from the following files:

Applications | User Support | Publications | Collaboration