diff --git a/beam.mac b/beam.mac index 9ffe08197b1bb5657001185dcf1f81d701236303..788c3982a3cd898f2ccd69fc53c703a1bbd0d4ca 100644 --- a/beam.mac +++ b/beam.mac @@ -28,7 +28,7 @@ /gps/pos/rot1 1 0 0 /gps/pos/rot2 0 0 1 #/gps/pos/centre 0 0 0 mm -/gps/pos/centre 28.50 623.50 -5.00 mm +/gps/pos/centre 28.50 623.50 -5.50 mm # the photons are emitted around the y-axis /gps/ang/rot1 1 0 0 diff --git a/src/DetectorConstruction.cc b/src/DetectorConstruction.cc index 3247c66e497e2ca2d3100aabd77909bf5fd6cc5d..fbc26814c8be74127ebc53cdf2dcb375dc444df8 100755 --- a/src/DetectorConstruction.cc +++ b/src/DetectorConstruction.cc @@ -1,4 +1,3 @@ - // ******************************************************************** // * License and Disclaimer * // * * @@ -316,7 +315,19 @@ void DetectorConstruction::BuildPMT(){ m_logicIntSD.push_back( new G4LogicalVolume(m_solidIntSD.back(), materials->Air, "logicIntSD2") ); m_logicIntSD.back()->SetVisAttributes(VisAtt_PMT); m_logicIntSD.back()->SetSensitiveDetector( PMT ); + + /*********************************** + * Intermediate Sensitive Detector 3 + **********************************/ + m_SDnames.push_back("PhotodiodeSD"); + PMT = new PMTSD(m_SDnames.back(), true); // isIntermediate set to true + SDman->AddNewDetector( PMT ); + m_solidIntSD.push_back( new G4Box("soldPhotodiodeSD", 19.00*mm, 0.001*mm, 0.75*mm) ); + m_logicIntSD.push_back( new G4LogicalVolume(m_solidIntSD.back(), materials->Air, "logicPhotodiodeSD")); + m_logicIntSD.back()->SetVisAttributes(VisAtt_PMT); + m_logicIntSD.back()->SetSensitiveDetector( PMT ); + } /* @@ -361,6 +372,7 @@ bool CHECK_OVERLAPS = true; false, 0, CHECK_OVERLAPS) ); + //----------------- Place Intermediate Detector 2 -----------------// m_physIntSD.push_back( @@ -374,6 +386,19 @@ bool CHECK_OVERLAPS = true; CHECK_OVERLAPS) ); +//----------------- Place Intermediate Detector 3 -----------------// + + m_physIntSD.push_back( + new G4PVPlacement(new G4RotationMatrix(), + G4ThreeVector( 28.50*mm, 640.00*mm, -5.75*mm), + m_logicIntSD[2], + "PhotodiodeSD", + m_logicWorld, + false, + 0, + CHECK_OVERLAPS) ); + + //----------------- Define Optical Borders -----------------// // One of these is correct. The order of the logical volumes is different