#include #include #include #include #include #include #include #include using namespace RAT; using namespace CLHEP; using namespace std; PanelS19::PanelS19( const std::string& prefix, const G4ThreeVector& position, const G4ThreeVector& zAxis, const G4ThreeVector& xAxis, G4Material* panelMaterial, G4VisAttributes* visAttributes ) : PanelBase( prefix, position, zAxis, xAxis, panelMaterial, visAttributes ) { SetPMTList(); SetCutList(); } void PanelS19::ConstructPanel() { // Construct the Panel Envelope, for S19 it is a regular Hexagon double panelRadius = 4.0 * fPMTRadius / cos( pi / 6.0 ); double z[] = { fPanelDepth, fPanelHeight }; double rInner[] = { 0, 0 }; double rOuter[] = { panelRadius, panelRadius }; G4VSolid *panelSolid = new G4Polyhedra( fPrefix + "_s19_solid", 0.0, twopi, 6, 2, z, rInner, rOuter ); fPanelLogical = new G4LogicalVolume( panelSolid, fPanelMaterial, fPrefix + "_s19_logic" ); fPanelLogical->SetVisAttributes( fVisAttributes ); fPMTRotation = pi / 6.0 * rad; } void PanelS19::SetPMTList() { fPMTs.clear(); fPMTs.push_back( PanelPMT( G4ThreeVector( 0.0, 0.0, 0.0 ) ) ); fPMTs.push_back( PanelPMT( G4ThreeVector( 2.0 * fPMTRadius, 0.0, 0.0 ) ) ); fPMTs.push_back( PanelPMT( G4ThreeVector( fPMTRadius, fPMTb + fPMTc, 0.0 ) ) ); fPMTs.push_back( PanelPMT( G4ThreeVector( -fPMTRadius, fPMTb + fPMTc, 0.0 ) ) ); fPMTs.push_back( PanelPMT( G4ThreeVector( -2.0 * fPMTRadius, 0.0, 0.0 ) ) ); fPMTs.push_back( PanelPMT( G4ThreeVector( -fPMTRadius, -fPMTb - fPMTc, 0.0 ) ) ); fPMTs.push_back( PanelPMT( G4ThreeVector( fPMTRadius, -fPMTb - fPMTc, 0.0 ) ) ); fPMTs.push_back( PanelPMT( G4ThreeVector( 4.0 * fPMTRadius, 0.0, 0.0 ) ) ); fPMTs.push_back( PanelPMT( G4ThreeVector( 3.0 * fPMTRadius, fPMTb + fPMTc, 0.0 ) ) ); fPMTs.push_back( PanelPMT( G4ThreeVector( 2.0 * fPMTRadius, 2.0 * fPMTb + 2.0 * fPMTc, 0.0 ) ) ); fPMTs.push_back( PanelPMT( G4ThreeVector( 0.0, 2.0 * fPMTb + 2.0 * fPMTc, 0.0 ) ) ); fPMTs.push_back( PanelPMT( G4ThreeVector( -2.0 * fPMTRadius, 2.0 * fPMTb + 2.0 * fPMTc, 0.0 ) ) ); fPMTs.push_back( PanelPMT( G4ThreeVector( -3.0 * fPMTRadius, fPMTb + fPMTc, 0.0 ) ) ); fPMTs.push_back( PanelPMT( G4ThreeVector( -4.0 * fPMTRadius, 0.0, 0.0 ) ) ); fPMTs.push_back( PanelPMT( G4ThreeVector( -3.0 * fPMTRadius, -fPMTb - fPMTc, 0.0 ) ) ); fPMTs.push_back( PanelPMT( G4ThreeVector( -2.0 * fPMTRadius, -2.0 * fPMTb - 2.0 * fPMTc, 0.0 ) ) ); fPMTs.push_back( PanelPMT( G4ThreeVector( 0.0, -2.0* fPMTb - 2.0 * fPMTc, 0.0 ) ) ); fPMTs.push_back( PanelPMT( G4ThreeVector( 2.0 * fPMTRadius, -2.0 * fPMTb - 2.0 * fPMTc, 0.0 ) ) ); fPMTs.push_back( PanelPMT( G4ThreeVector( 3.0 * fPMTRadius, -fPMTb - fPMTc, 0.0 ) ) ); } void PanelS19::SetCutList() { fEdgeCoords.clear(); fEdgeCoords.push_back( G4ThreeVector( 6.0 * fPMTRadius, 0.0, 0.0 ) ); fEdgeCoords.push_back( G4ThreeVector( 5.0 * fPMTRadius, -1.0 * fPMTb - 1.0 * fPMTc, 0.0 ) ); fEdgeCoords.push_back( G4ThreeVector( 4.0 * fPMTRadius, -2.0 * fPMTb - 2.0 * fPMTc, 0.0 ) ); fEdgeCoords.push_back( G4ThreeVector( 3.0 * fPMTRadius, -3.0 * fPMTb - 3.0 * fPMTc, 0.0 ) ); fEdgeCoords.push_back( G4ThreeVector( 1.0 * fPMTRadius, -3.0 * fPMTb - 3.0 * fPMTc, 0.0 ) ); fEdgeCoords.push_back( G4ThreeVector( -1.0 * fPMTRadius, -3.0 * fPMTb - 3.0 * fPMTc, 0.0 ) ); fEdgeCoords.push_back( G4ThreeVector( -3.0 * fPMTRadius, -3.0 * fPMTb - 3.0 * fPMTc, 0.0 ) ); fEdgeCoords.push_back( G4ThreeVector( -4.0 * fPMTRadius, -2.0 * fPMTb - 2.0 * fPMTc, 0.0 ) ); fEdgeCoords.push_back( G4ThreeVector( -5.0 * fPMTRadius, -1.0 * fPMTb - 1.0 * fPMTc, 0.0 ) ); fEdgeCoords.push_back( G4ThreeVector( -6.0 * fPMTRadius, 0.0, 0.0 ) ); fEdgeCoords.push_back( G4ThreeVector( -5.0 * fPMTRadius, 1.0 * fPMTb + 1.0 * fPMTc, 0.0 ) ); fEdgeCoords.push_back( G4ThreeVector( -4.0 * fPMTRadius, 2.0 * fPMTb + 2.0 * fPMTc, 0.0 ) ); fEdgeCoords.push_back( G4ThreeVector( -3.0 * fPMTRadius, 3.0 * fPMTb + 3.0 * fPMTc, 0.0 ) ); fEdgeCoords.push_back( G4ThreeVector( -1.0 * fPMTRadius, 3.0 * fPMTb + 3.0 * fPMTc, 0.0 ) ); fEdgeCoords.push_back( G4ThreeVector( 1.0 * fPMTRadius, 3.0 * fPMTb + 3.0 * fPMTc, 0.0 ) ); fEdgeCoords.push_back( G4ThreeVector( 3.0 * fPMTRadius, 3.0 * fPMTb + 3.0 * fPMTc, 0.0 ) ); fEdgeCoords.push_back( G4ThreeVector( 4.0 * fPMTRadius, 2.0 * fPMTb + 2.0 * fPMTc, 0.0 ) ); fEdgeCoords.push_back( G4ThreeVector( 5.0 * fPMTRadius, 1.0 * fPMTb + 1.0 * fPMTc, 0.0 ) ); }