110{
111
113
114
115
116
117
118
119
122
125
128 false, 0);
129
130
131
132
133
135
138
139 auto logicExtrusion =
141
144
146
147 std::vector<G4double> p_TiO2 = { 2.00 * eV, 3.47 * eV };
148
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",
160
162
163
164
165
166
168
169
170
172 new G4Box(
"Scintillator",
176
178 solidScintillator, polystyrene, "Scintillator");
179
180 new G4PVPlacement(
nullptr, G4ThreeVector(), logicScintillator,
"Scintillator",
181 logicExtrusion, false, 0);
182
186 {
188 new G4Box(
"SideOfBar",
191
194 0. * deg, 90. * deg);
195
197 solidScintside, polystyrene, "SideOfBar");
198
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 {
245
247
249 logicScintillator, false, 0);
250 }
251
252
253
254
255
257 {
258 G4ExceptionDescription ed;
259 ed << "The Fiber Hole has not been constructed";
260 G4Exception("WLSDetectorConstruction", "wls001", FatalException, ed);
261 }
262
263
266
267
268
269
270
271
273
277
283
287
288
290 {
291 case 2:
292
293
294
295
296
297
298
299
301
304 else
306
307 logicClad2 =
309
310 physiClad2 =
312 logicClad2, "Clad2", logicPlacement, false, 0);
313
314
315 if(opSurface)
316 {
318 physiPlacement, opSurface);
320 opSurface);
321 }
322
323 logicPlacement = logicClad2;
324 physiPlacement = physiClad2;
325 [[fallthrough]];
326
327 case 1:
328
329
330
331
332
333
334
335
337
340 else
342
343 logicClad1 =
345
346 physiClad1 =
348 logicClad1, "Clad1", logicPlacement, false, 0);
349
350
351 if(opSurface)
352 {
354 physiPlacement, opSurface);
355
357 opSurface);
358 }
359
360 logicPlacement = logicClad1;
361 physiPlacement = physiClad1;
362 [[fallthrough]];
363
364 default:
365
366
367
368
369
370
371
372
374
376 {
377 solidWLSfiber =
379 }
380 else
381 {
384 }
385
386 logicWLSfiber =
388
389 logicWLSfiber->SetUserLimits(
391
394 logicWLSfiber, "WLSFiber", logicPlacement, false, 0);
395
396
397 if(opSurface)
398 {
400 physiPlacement, opSurface);
401
403 physiWLSfiber, opSurface);
404 }
405 }
406
407
408
409
410
411
413
415
417 {
420
421 logicMirror =
423
425 "MirrorSurface", glisur, ground, dielectric_metal,
fMirrorPolish);
426
428
429 std::vector<G4double> p_mirror = { 2.00 * eV, 3.47 * eV };
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
441
443 }
444
445
446
447
448
449
451
453
456
457
458
459
460
461
462
463
465 {
469 G4ExceptionDescription ed;
470 ed << "Invalid alignment. Alignment reset to 0.";
471 G4Exception("WLSDetectorConstruction", "wls002", JustWarning, ed);
472 }
473
474
476
478 {
479 solidClrfiber =
481 }
482 else
483 {
484 solidClrfiber =
486 }
487
488 auto logicClrfiber =
new G4LogicalVolume(solidClrfiber, air,
"ClearFiber");
489
492 logicClrfiber, "ClearFiber", logicCouple, false, 0);
493
494
495
496
497
498
500
503 else
505
506 auto logicPhotonDet =
508
509 new G4PVPlacement(
nullptr, G4ThreeVector(0., 0., 0.), logicPhotonDet,
510 "PhotonDet", logicClrfiber, false, 0);
511
512
514 "PhotonDetSurface", glisur, ground, dielectric_metal,
fMPPCPolish);
515
517
518 std::vector<G4double> p_mppc = { 2.00 * eV, 3.47 * eV };
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
528 photonDetSurface);
529
530
531
533 visAttributes->SetVisibility(false);
536
538 visAttributes->SetVisibility(true);
539 logicExtrusion->SetVisAttributes(visAttributes);
541
543 visAttributes->SetVisibility(true);
544 logicScintillator->SetVisAttributes(visAttributes);
546
548 visAttributes->SetVisibility(true);
549 logicScintSide->SetVisAttributes(visAttributes);
551
553 visAttributes->SetVisibility(true);
554 logicScintCrnr->SetVisAttributes(visAttributes);
556
558 visAttributes->SetVisibility(true);
561
562 if(logicClad1 != nullptr)
563 {
565 visAttributes->SetVisibility(true);
566 logicClad1->SetVisAttributes(visAttributes);
568 }
569
570 if(logicClad2 != nullptr)
571 {
573 visAttributes->SetVisibility(true);
574 logicClad2->SetVisAttributes(visAttributes);
576 }
577
579 visAttributes->SetVisibility(true);
580 logicWLSfiber->SetVisAttributes(visAttributes);
582
584 {
586 visAttributes->SetVisibility(true);
587 logicMirror->SetVisAttributes(visAttributes);
589 }
590
592 visAttributes->SetVisibility(true);
593 logicCouple->SetVisAttributes(visAttributes);
595
597 visAttributes->SetVisibility(true);
598 logicClrfiber->SetVisAttributes(visAttributes);
600
602 visAttributes->SetVisibility(true);
603 logicPhotonDet->SetVisAttributes(visAttributes);
605
607}
G4Material * FindMaterial(G4String)
G4LogicalVolume * fLogicHole
G4double GetCoatingThickness()
G4double GetFiberRadius()
G4double fMirrorReflectivity
G4VPhysicalVolume * fPhysiHole
G4double GetCoatingRadius()
G4double fExtrusionPolish
G4LogicalVolume * fLogicWorld
G4double fSurfaceRoughness
G4double fExtrusionReflectivity
G4double fMPPCReflectivity