82 mirrorReflectivity = 1.;
85 mppcReflectivity = 0.;
88 extrusionReflectivity = 1.;
97 mppcHalfL = wlsfiberRY;
102 clrfiberZ = mppcZ + 10.*nm ;
108 holeLength = barLength;
109 coatingThickness = 0.25*
mm;
110 coatingRadius = 1.875*
mm;
112 UpdateGeometryParameters();
117 if (detectorMessenger)
delete detectorMessenger;
118 if (materials)
delete materials;
135 new G4Box(
"World", worldSizeX, worldSizeY, worldSizeZ);
171 G4double refl_TiO2[2] = {extrusionReflectivity,extrusionReflectivity};
174 TiO2SurfaceProperty -> AddProperty(
"REFLECTIVITY",p_TiO2,refl_TiO2,2);
175 TiO2SurfaceProperty -> AddProperty(
"EFFICIENCY",p_TiO2,effi_TiO2,2);
177 TiO2Surface -> SetMaterialPropertiesTable(TiO2SurfaceProperty);
354 void WLSDetectorConstruction::ConstructFiber()
356 if (!(logicHole) || !(physiHole) ) {
357 std::ostringstream o;
358 o <<
"The Fiber Hole has not been constructed";
359 G4Exception(
"WLSDetectorConstruction::ConstructFiber",
"",
374 if (surfaceRoughness < 1.)
385 switch ( numOfCladLayers ) {
424 logicPlacement = logicClad2;
425 physiPlacement = physiClad2;
464 logicPlacement = logicClad1;
465 physiPlacement = physiClad1;
536 G4double refl_mirror[2] = {mirrorReflectivity,mirrorReflectivity};
539 MirrorSurfaceProperty->
AddProperty(
"REFLECTIVITY",p_mirror,refl_mirror,2);
540 MirrorSurfaceProperty->
AddProperty(
"EFFICIENCY",p_mirror,effi_mirror,2);
542 MirrorSurface -> SetMaterialPropertiesTable(MirrorSurfaceProperty);
560 G4VSolid* solidCouple =
new G4Box(
"Couple",coupleRX,coupleRY,coupleZ);
581 if (mppcTheta > std::atan(mppcDist / mppcHalfL)) {
584 mppcOriginX = std::sin(mppcTheta) * (mppcDist + clrfiberZ);
585 mppcOriginZ = -coupleZ + std::cos(mppcTheta) * (mppcDist + clrfiberZ);
586 G4cerr <<
"Invalid alignment. Alignment Reset to 0" <<
G4endl;
592 if ( mppcShape ==
"Square" )
594 new G4Box(
"ClearFiber",clrfiberHalfL,clrfiberHalfL,clrfiberZ);
619 if ( mppcShape ==
"Square" )
620 solidPhotonDet =
new G4Box(
"PhotonDet",mppcHalfL,mppcHalfL,mppcZ);
649 G4double refl_mppc[2] = {mppcReflectivity,mppcReflectivity};
652 PhotonDetSurfaceProperty -> AddProperty(
"REFLECTIVITY",p_mppc,refl_mppc,2);
653 PhotonDetSurfaceProperty -> AddProperty(
"EFFICIENCY",p_mppc,effi_mppc,2);
655 PhotonDetSurface -> SetMaterialPropertiesTable(PhotonDetSurfaceProperty);
660 G4String mppcSDName =
"WLS/PhotonDet";
674 if (!physiWorld)
return;
686 UpdateGeometryParameters();
696 void WLSDetectorConstruction::UpdateGeometryParameters()
698 wlsfiberRX = XYRatio * wlsfiberRY;
700 clad1RX = wlsfiberRX + 0.03*wlsfiberRX;
701 clad1RY = wlsfiberRY + 0.03*wlsfiberRY;
704 clad2RX = clad1RX + 0.03*wlsfiberRX;
705 clad2RY = clad1RY + 0.03*wlsfiberRY;
708 worldSizeX = clad2RX + mppcDist + mppcHalfL + 1.*
cm;
709 worldSizeY = clad2RY + mppcDist + mppcHalfL + 1.*
cm;
710 worldSizeZ = wlsfiberZ + mppcDist + mppcHalfL + 1.*
cm;
712 coupleRX = worldSizeX;
713 coupleRY = worldSizeY;
714 coupleZ = (worldSizeZ - wlsfiberZ) / 2;
716 clrfiberHalfL = mppcHalfL;
718 mirrorRmax = clad2RY;
720 coupleOrigin = wlsfiberOrigin + wlsfiberZ + coupleZ;
721 mirrorOrigin = wlsfiberOrigin - wlsfiberZ - mirrorZ;
722 mppcOriginX = std::sin(mppcTheta) * (mppcDist + clrfiberZ);
723 mppcOriginZ = -coupleZ + std::cos(mppcTheta) * (mppcDist + clrfiberZ);
735 unsigned int place = 0;
737 while (place < rotation.size()) {
742 angle = strtod(rotation.substr(place+1).c_str(),&
p) *
deg;
744 if (!p || (*p != (
char)
',' && *p != (
char)
'\0')) {
745 G4cerr <<
"Invalid rotation specification: " <<
746 rotation.c_str() <<
G4endl;
752 switch(rotation.substr(place,1).c_str()[0]) {
763 G4cerr <<
" Invalid rotation specification: "
768 rot = thisRotation * rot;
769 place = rotation.find(
',',place);
770 if (place > rotation.size())
break;
782 if (shape ==
"Circle" || shape ==
"Square" ) mppcShape = shape;
789 numOfCladLayers = num;
839 surfaceRoughness = roughness;
846 mirrorPolish = polish;
853 mirrorReflectivity = reflectivity;
867 mppcReflectivity = reflectivity;
899 coatingThickness = thick;
905 coatingRadius = radius;
916 {
return coatingThickness; }
921 return wlsfiberOrigin + wlsfiberZ;
926 if (numOfCladLayers == 2)
return clad2RY;
927 if (numOfCladLayers == 1)
return clad1RY;
933 return surfaceRoughness;
939 return surfaceRoughness == 1. && XYRatio == 1.
941 (mirrorPolish == 1. && mirrorReflectivity == 1.));