#include #include #include #include #include #include #include #include using namespace RAT; using namespace CLHEP; using namespace std; PanelS7::PanelS7( 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 PanelS7::ConstructPanel() { // Construct the Panel Envelope, for S7 it is a regular Dodecagon double panelRadius = 3.0 * fPMTRadius; double z[] = { fPanelDepth, fPanelHeight }; double rInner[] = { 0, 0 }; double rOuter[] = { panelRadius, panelRadius }; G4VSolid* panelSolid = new G4Polyhedra( fPrefix + "_s7_solid", pi/ 12.0 * rad, twopi, 12, 2, z, rInner, rOuter ); fPanelLogical = new G4LogicalVolume( panelSolid, fPanelMaterial, fPrefix + "_s7_logic" ); fPanelLogical->SetVisAttributes( fVisAttributes ); fPMTRotation = pi / 6.0 * rad; } void PanelS7::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 ) ) ); } void PanelS7::SetCutList() { fEdgeCoords.clear(); fEdgeCoords.push_back( G4ThreeVector( 3.0 * fPMTRadius, -1.0 * fPMTb - 1.0 * fPMTc, 0.0 ) ); fEdgeCoords.push_back( G4ThreeVector( 0.0, -2.0 * fPMTb - 2.0 * fPMTc, 0.0 ) ); fEdgeCoords.push_back( G4ThreeVector( -3.0 * fPMTRadius, -1.0 * fPMTb - 1.0 * fPMTc, 0.0 ) ); fEdgeCoords.push_back( G4ThreeVector( -3.0 * fPMTRadius, 1.0 * fPMTb + 1.0 * fPMTc, 0.0 ) ); fEdgeCoords.push_back( G4ThreeVector( 0.0, 2.0 * fPMTb + 2.0 * fPMTc, 0.0 ) ); fEdgeCoords.push_back( G4ThreeVector( 3.0 * fPMTRadius, 1.0 * fPMTb + 1.0 * fPMTc, 0.0 ) ); }