diff --git a/ExtinctionMonitorFNAL/Geometry/CMakeLists.txt b/ExtinctionMonitorFNAL/Geometry/CMakeLists.txt index 32056d1951..ccba14f93f 100644 --- a/ExtinctionMonitorFNAL/Geometry/CMakeLists.txt +++ b/ExtinctionMonitorFNAL/Geometry/CMakeLists.txt @@ -5,7 +5,6 @@ cet_make_library( src/ExtMonFNALMagnet.cc src/ExtMonFNALModule.cc src/ExtMonFNALModuleIdConverter.cc - src/ExtMonFNALMuonID.cc src/ExtMonFNALPixelChip.cc src/ExtMonFNALPixelIdConverter.cc src/ExtMonFNALPlane.cc diff --git a/ExtinctionMonitorFNAL/Geometry/inc/ExtMonFNAL.hh b/ExtinctionMonitorFNAL/Geometry/inc/ExtMonFNAL.hh index 4b59eee6b2..5f8af7fab9 100644 --- a/ExtinctionMonitorFNAL/Geometry/inc/ExtMonFNAL.hh +++ b/ExtinctionMonitorFNAL/Geometry/inc/ExtMonFNAL.hh @@ -20,7 +20,6 @@ #include "Offline/ExtinctionMonitorFNAL/Geometry/inc/ExtMonFNALPlane.hh" #include "Offline/ExtinctionMonitorFNAL/Geometry/inc/ExtMonFNALPlaneStack.hh" #include "Offline/ExtinctionMonitorFNAL/Geometry/inc/ExtMonFNALMagnet.hh" -#include "Offline/ExtinctionMonitorFNAL/Geometry/inc/ExtMonFNALMuonID.hh" namespace mu2e { @@ -51,8 +50,6 @@ namespace mu2e { const ExtMonFNALMagnet& spectrometerMagnet() const { return spectrometerMagnet_; } - const ExtMonFNALMuonID& muonID() const { return muonID_; } - // Location of the detector == that of the upstream stack. CLHEP::Hep3Vector detectorCenterInMu2e() const; const CLHEP::HepRotation& detectorRotationInMu2e() const; @@ -86,9 +83,6 @@ namespace mu2e { CLHEP::Hep3Vector stackToExtMon_position(const CLHEP::Hep3Vector& pos) const { return (pos.z() < 0) ? dnStackToExtMon_position(pos) : upStackToExtMon_position(pos); } - CLHEP::Hep3Vector muonIDToExtMon_position(const CLHEP::Hep3Vector& muonIDpos) const { - return dnToExtMonCoordinateRotation_ * muonIDpos; - } //---------------------------------------------------------------- // Pixel center in the coordinate system of its PlaneStack @@ -127,7 +121,6 @@ namespace mu2e { ExtMonFNALPlaneStack up_; ExtMonFNALPlaneStack dn_; ExtMonFNALMagnet spectrometerMagnet_; - ExtMonFNALMuonID muonID_; CLHEP::HepRotationX dnToExtMonCoordinateRotation_; }; diff --git a/ExtinctionMonitorFNAL/Geometry/inc/ExtMonFNALMuonID.hh b/ExtinctionMonitorFNAL/Geometry/inc/ExtMonFNALMuonID.hh deleted file mode 100644 index befa5301c6..0000000000 --- a/ExtinctionMonitorFNAL/Geometry/inc/ExtMonFNALMuonID.hh +++ /dev/null @@ -1,65 +0,0 @@ -//Building the Muon ID detector-using code from ExtMonFNALMagnet.hh and DetectorSolenoidShieldingMaker.hh -//As of now it is a rectangular box with half sizes, rotation, and center defined - -//Jackson Waters, 2018 - -#ifndef EXTMONFNALMUONID_HH -#define EXTMONFNALMUONID_HH - -#include "Offline/Mu2eInterfaces/inc/Detector.hh" - -#include -#include -#include - -#include "CLHEP/Vector/ThreeVector.h" -#include "CLHEP/Vector/Rotation.h" - -namespace mu2e { - - namespace ExtMonFNAL { class ExtMonMaker; } - namespace ExtMonFNAL { class ExtMon; } - - class ExtMonFNALMuonIDMaker; - - class ExtMonFNALMuonID : virtual public Detector { - public: - //Transverse size and Z-position similar to plane stack mother volume - const std::vector& motherTransverseHalfSize() const { return m_motherTransverseHalfSize; } - const double motherStartZ() const { return m_motherStartZ; } - const double motherEndZ() const { return m_motherEndZ; } - //Positioning of Muon ID Detector - CLHEP::Hep3Vector refPointInMu2e() const { return refPointInMu2e_; } - CLHEP::HepRotation const& muonIDRotationInMu2e() const { return muonIDRotationInMu2e_; } - - double nominalMomentum() const { return nominalMomentum_; } - - private: - ExtMonFNALMuonID(); - // An initialized instance of this class should be obtained via ExtMonFNALMuonIDMaker - // Included these first two classes to make it similar to ExtMonFNALPlaneStack files - friend class ExtMonFNAL::ExtMon; - friend class ExtMonFNAL::ExtMonMaker; - friend class ExtMonFNALMuonIDMaker; - - - // Mother Volume based off of ExtMonFNALPlaneStack - std::vector m_motherTransverseHalfSize; - double m_motherStartZ; - double m_motherEndZ; - - //Momentum, Reference point, and Rotation - - double nominalMomentum_; - - CLHEP::Hep3Vector refPointInMu2e_; - CLHEP::HepRotation muonIDRotationInMu2e_; - - - }; - - // std::ostream& operator<<(std::ostream& os, const ExtMonFNALMuonID& muid); - -}// namespace mu2e*/ - -#endif/*EXTMONFNALMUONID_HH*/ diff --git a/ExtinctionMonitorFNAL/Geometry/src/ExtMonFNALMuonID.cc b/ExtinctionMonitorFNAL/Geometry/src/ExtMonFNALMuonID.cc deleted file mode 100644 index e18fa81f22..0000000000 --- a/ExtinctionMonitorFNAL/Geometry/src/ExtMonFNALMuonID.cc +++ /dev/null @@ -1,25 +0,0 @@ -//Source file for new Muon ID Detector - -//Jackson Waters, 2018 - -#include "Offline/ExtinctionMonitorFNAL/Geometry/inc/ExtMonFNALMuonID.hh" - - -#include "CLHEP/Units/SystemOfUnits.h" - -#include "cetlib_except/exception.h" - -//================================================================ -namespace mu2e { - -mu2e::ExtMonFNALMuonID::ExtMonFNALMuonID() - : m_motherTransverseHalfSize() - , nominalMomentum_() -{} - - /*std::ostream& operator<<(std::ostream& os, const ExtMonFNALMuonID& muid) { - return os<<"ExtMonFNALMuonID(halfsize="< -#include - -#include "Offline/ExtinctionMonitorFNAL/Geometry/inc/ExtMonFNAL.hh" -#include "Offline/ExtinctionMonitorFNAL/Geometry/inc/ExtMonFNALMuonID.hh" - -namespace CLHEP { class Hep3Vector; } -namespace CLHEP { class HepRotation; } - -namespace mu2e { class SimpleConfig; } -namespace mu2e { class ExtMonFNALMuonID; } -namespace mu2e { namespace ExtMonFNAL { class ExtMon; } } - -namespace mu2e { - - class ExtMonFNALMuonIDMaker { - public: - - static ExtMonFNALMuonID read(const SimpleConfig& c, - const std::string& prefix, - const CLHEP::HepRotation& muonIDInRotationInMu2e, - const CLHEP::Hep3Vector& refTrajmuonIDEntranceInMu2e, - double nominalMomentum); - - static std::unique_ptr make(const SimpleConfig& config); - }; - - } - -#endif/*EXTMONFNALMUONIDMAKER_HH*/ - - diff --git a/GeometryService/src/ExtMonFNALMuonIDMaker.cc b/GeometryService/src/ExtMonFNALMuonIDMaker.cc deleted file mode 100644 index 3f2cf3ced5..0000000000 --- a/GeometryService/src/ExtMonFNALMuonIDMaker.cc +++ /dev/null @@ -1,73 +0,0 @@ -// Jackson Waters, 2018 -//Maker source file for Muon ID detector geometry - -// Mu2e includes -#include "Offline/ConfigTools/inc/SimpleConfig.hh" -#include "Offline/ExtinctionMonitorFNAL/Geometry/inc/ExtMonFNAL.hh" -#include "Offline/ExtinctionMonitorFNAL/Geometry/inc/ExtMonFNALMuonID.hh" -#include "Offline/GeometryService/inc/ExtMonFNALMuonIDMaker.hh" - -// C++ includes -#include -#include -#include -#include - -//Framework includes -#include "cetlib_except/exception.h" - -// CLHEP includes -#include "CLHEP/Vector/ThreeVector.h" -#include "CLHEP/Vector/Rotation.h" -#include "CLHEP/Units/SystemOfUnits.h" - - - -//#define AGDEBUG(stuff) std::cerr<<"AG: "<<__FILE__<<", line "<<__LINE__<<": "< ExtMonFNALMuonIDMaker::make(const SimpleConfig& c) { - std::unique_ptr muid ( new ExtMonFNALMuonID() ); - - return muid; - } - - ExtMonFNALMuonID - ExtMonFNALMuonIDMaker::read(const SimpleConfig& c, const std::string& prefix, - const CLHEP::HepRotation& muonIDInRotationInMu2e, // of the input arm of ref trajectory - const CLHEP::Hep3Vector& refTrajmuonIDEntranceInMu2e, - double nominalMomentum) - { - ExtMonFNALMuonID muid; - muid.muonIDRotationInMu2e_ = muonIDInRotationInMu2e; - muid.nominalMomentum_ = nominalMomentum; - - c.getVectorDouble(prefix + ".motherTransverseHalfSize", muid.m_motherTransverseHalfSize, 2); - - // distance between the points - //const double MuonIDEntranceToBendPointDistance = muid.outerHalfSize_[2]/cos(trackBendHalfAngle); - - muid.refPointInMu2e_ = refTrajmuonIDEntranceInMu2e; - muid.m_motherStartZ = c.getDouble(prefix+".motherStartZ"); - muid.m_motherEndZ = c.getDouble(prefix+".motherEndZ"); - // muid.geometricCenterInMu2e_ = muid.refPointInMu2e_ + muid.muonIDRotationInMu2e_ * CLHEP::Hep3Vector(0, 0, -2000); - - if(c.getInt("extMonFNAL.verbosityLevel") > 0) { - std::cout<<"ExtMonFNALMuonID "<dn_.planeNumberOffset_ = 0; det->up_.planeNumberOffset_ = det->dn_.nplanes(); - //---------------------------------------------------------------- - //Muon ID Detector Addition - /* det->muonID_ = ExtMonFNALMuonIDMaker::read(config, - "extMonFNAL.muonID", - room.collimator2RotationInMu2e(), - refEntranceToMagnet, - room.filterMagnet().nominalMomentum() + dp - );*/ - const CLHEP::Hep3Vector muonIDRefPointInMu2e = det->dn_.refPointInMu2e(); - det->muonID_ = ExtMonFNALMuonIDMaker::read(config, - "extMonFNAL.muonID", - det->dn_.rotationInMu2e(), - muonIDRefPointInMu2e, - room.filterMagnet().nominalMomentum() + dp - ); - /*ExtMonFNALMuonID ExtMonFNALMuonIDMaker::read(const SimpleConfig& c, const std::string& prefix) - { - ExtMonFNALMuonID muid; - - c. getVectorDouble(prefix + ".outerHalfSize", muid.outerHalfSize_, 3); - if(verbose){ - std::cout<<"ExtMonFNALMuonID " <getBool("hasExtMonFNAL",false)){ addDetector(ExtMonFNAL::ExtMonMaker::make(*_config, emfb)); - addDetector(ExtMonFNALMuonIDMaker::make(*_config)); } diff --git a/Mu2eG4/geom/extmon_fnal_v02.txt b/Mu2eG4/geom/extmon_fnal_v02.txt index b3615375a9..9e8d32639e 100644 --- a/Mu2eG4/geom/extmon_fnal_v02.txt +++ b/Mu2eG4/geom/extmon_fnal_v02.txt @@ -201,23 +201,6 @@ vector extMonFNAL.dn.module_yoffset = { 16.7, 0., -16.7 }; vector extMonFNAL.dn.module_zoffset = { 1., -1., 1. }; // just determines which side of the plane; all math is handed in constructExMonFNAL vector extMonFNAL.dn.module_rotation = { 0., 0., 180. }; - - -//Addition of the Muon ID detector will be placed here -// Jackson Waters 2018 -//Right now it will be a rectangular box with 3D rotation - -vector extMonFNAL.muonID.motherTransverseHalfSize = {200, 200};//mm x, y -string extMonFNAL.muonID.material = "G4_Fe"; - -bool extMonFNAL.muonID.iron.visible = true; -bool extMonFNAL.muonID.iron.solid = true; - -// Placing the box in the z-position based off of the start and end points of the z-position of the downstream pixel planes - -double extMonFNAL.muonID.motherStartZ = -2500.; -double extMonFNAL.muonID.motherEndZ = -700.; - //---------------------------------------------------------------- // These are detector VDs (not filter ones) // diff --git a/Mu2eG4/geom/geom_common_trackerVST.txt b/Mu2eG4/geom/geom_common_trackerVST.txt index 5a49ddf662..8c388b8953 100644 --- a/Mu2eG4/geom/geom_common_trackerVST.txt +++ b/Mu2eG4/geom/geom_common_trackerVST.txt @@ -418,7 +418,6 @@ string extMonFNAL.concreteMaterial = "G4_AIR"; string extMonFNAL.filter.magnet.material = "G4_AIR"; string extMonFNAL.spectrometer.magnet.material = "G4_AIR"; string extMonFNAL.planeMaterial = "G4_AIR"; -string extMonFNAL.muonID.material = "G4_AIR"; string extMonFNAL.room.materialName = "G4_AIR"; string extMonFNAL.room.wall.materialName = "G4_AIR"; string ExtShieldDownstream.materialType1 = "G4_AIR"; diff --git a/Mu2eG4/inc/constructExtMonFNAL.hh b/Mu2eG4/inc/constructExtMonFNAL.hh index 21b8b879ea..b7f144dd5f 100644 --- a/Mu2eG4/inc/constructExtMonFNAL.hh +++ b/Mu2eG4/inc/constructExtMonFNAL.hh @@ -15,7 +15,6 @@ namespace mu2e { class SimpleConfig; class ExtMonFNALMagnet; - class ExtMonFNALMuonID; void constructExtMonFNAL(const VolumeInfo& collimator1Parent, const CLHEP::HepRotation& collimator1ParentRotationInMu2e, @@ -60,14 +59,6 @@ namespace mu2e { bool const placePV ); - void constructExtMonFNALMuonID(const ExtMonFNALModule& module, - const ExtMonFNALMuonID& muid, - const std::string& volNameSuffix, - const VolumeInfo& parent, - const CLHEP::HepRotation& parentRotationInMu2e, - const SimpleConfig& config - ); - } #endif /* CONSTRUCTEXTMONFNAL_HH */ diff --git a/Mu2eG4/src/constructExtMonFNAL.cc b/Mu2eG4/src/constructExtMonFNAL.cc index 5ba177c8f2..6a7f425c1f 100644 --- a/Mu2eG4/src/constructExtMonFNAL.cc +++ b/Mu2eG4/src/constructExtMonFNAL.cc @@ -463,65 +463,6 @@ namespace mu2e { addBoxVDPlane(VirtualDetectorId::EMFBoxBottom, boxZX, -zxOffset, extmon, parentRotationInMu2e, parent, config); } } - //=============================================================== - void constructExtMonFNALMuonID(const ExtMonFNALModule& module, - const ExtMonFNALMuonID& muid, - const std::string& volNameSuffix, - const VolumeInfo& parent, - const CLHEP::HepRotation& parentRotationInMu2e, - const SimpleConfig& config - ) - { - bool const forceAuxEdgeVisible = config.getBool("g4.forceAuxEdgeVisible"); - bool const doSurfaceCheck = config.getBool("g4.doSurfaceCheck"); - bool const placePV = true; - - MaterialFinder materialFinder(config); - AntiLeakRegistry& reg = art::ServiceHandle()->antiLeakRegistry(); - - - //---------------------------------------------------------------- - - CLHEP::HepRotation *muidRotationInRoomInv = - reg.add(muid.muonIDRotationInMu2e().inverse() * parentRotationInMu2e); - - const CLHEP::HepRotation muidRotationInRoom(muidRotationInRoomInv->inverse()); - - const CLHEP::Hep3Vector muidRefPointInRoom(parentRotationInMu2e.inverse()*(muid.refPointInMu2e() - parent.centerInMu2e())); - - - - //---------------------------------------------------------------- - // Mother volume for planeStack - - double muidpx = muid.motherTransverseHalfSize()[0]; - double muidpy = muid.motherTransverseHalfSize()[1]; - std::vector polygon; - polygon.push_back({+muidpx,+muidpy}); - polygon.push_back({-muidpx,+muidpy}); - polygon.push_back({-muidpx,-muidpy}); - polygon.push_back({+muidpx,-muidpy}); - - std::vector zsections; - zsections.emplace_back(muid.motherStartZ(), G4TwoVector(), 1.); - zsections.emplace_back(muid.motherEndZ(), G4TwoVector(), 1.); - VolumeInfo mother = nestExtrudedSolid("ExtMonMuonIDMother"+volNameSuffix, - polygon, - zsections, - findMaterialOrThrow("G4_Fe"), - muidRotationInRoomInv, - muidRefPointInRoom, - parent, - 0, - config.getBool("extMonFNAL."+volNameSuffix+".iron.visible"), - G4Colour::Magenta(), - config.getBool("extMonFNAL."+volNameSuffix+".iron.solid"), - forceAuxEdgeVisible, - placePV, - doSurfaceCheck - ); - } - //================================================================ VolumeInfo constructExtMonFNALDetectorRoom(const VolumeInfo& parent, const CLHEP::HepRotation& parentRotationInMu2e, @@ -610,13 +551,6 @@ namespace mu2e { emfb->detectorRoomRotationInMu2e(), config); - constructExtMonFNALMuonID(extmon->module(), - extmon->muonID(), - "muonID", - detectorRoom, - emfb->detectorRoomRotationInMu2e(), - config); - // enclose whole ExtMon magnet+sensors in a set of VDs constructExtMonFNALBoxVirtualDetectors(*extmon, detectorRoom,