diff --git a/MuonSpectrometer/MuonCnv/MuonPrepRawDataProviderTools/src/MuonPRDSelectionTool.cxx b/MuonSpectrometer/MuonCnv/MuonPrepRawDataProviderTools/src/MuonPRDSelectionTool.cxx index 6d453f4ba259ae3c2ddcbcf79f007631a7a869dd..ad8f8c09f9125e7a3f04bfb2ff6fd6386cb16da8 100644 --- a/MuonSpectrometer/MuonCnv/MuonPrepRawDataProviderTools/src/MuonPRDSelectionTool.cxx +++ b/MuonSpectrometer/MuonCnv/MuonPrepRawDataProviderTools/src/MuonPRDSelectionTool.cxx @@ -75,7 +75,7 @@ namespace Muon { } - const MdtDriftCircleOnTrack* MuonPRDSelectionTool::calibrateAndSelect( const MuonSystemExtension::Intersection& intersection, const MdtPrepData& mdt ) const { + const MdtDriftCircleOnTrack* MuonPRDSelectionTool::calibrateAndSelect( const MuonSystemExtension::Intersection& intersection, const MdtPrepData& mdt, double beta) const { // calculate intersection with tube const Amg::Vector3D& direction = intersection.trackParameters->momentum(); @@ -120,7 +120,7 @@ namespace Muon { if( msgLvl(MSG::VERBOSE) ) msg(MSG::VERBOSE) << endmsg; // calibrate hit - const MdtDriftCircleOnTrack* mdtROT = m_mdtCreator->createRIO_OnTrack( mdt, intersect, &direction ); + const MdtDriftCircleOnTrack* mdtROT = m_mdtCreator->createRIO_OnTrack( mdt, intersect, &direction, 0., nullptr, beta, 0.); if( !mdtROT ) ATH_MSG_VERBOSE(" Failed to calibrate " << m_idHelperSvc->toString(id)); return mdtROT; } diff --git a/MuonSpectrometer/MuonCnv/MuonPrepRawDataProviderTools/src/MuonPRDSelectionTool.h b/MuonSpectrometer/MuonCnv/MuonPrepRawDataProviderTools/src/MuonPRDSelectionTool.h index 1bf85f5454ca62697ef9060ccbc602a80ec62de0..137f03ada98151443da01622a27ecd154dbe49bb 100644 --- a/MuonSpectrometer/MuonCnv/MuonPrepRawDataProviderTools/src/MuonPRDSelectionTool.h +++ b/MuonSpectrometer/MuonCnv/MuonPrepRawDataProviderTools/src/MuonPRDSelectionTool.h @@ -55,7 +55,7 @@ namespace Muon { } /** IMuonPRDSelectionTool interface: calibrate and select single MDT */ - const MdtDriftCircleOnTrack* calibrateAndSelect( const MuonSystemExtension::Intersection& intersection, const MdtPrepData& mdt ) const; + const MdtDriftCircleOnTrack* calibrateAndSelect( const MuonSystemExtension::Intersection& intersection, const MdtPrepData& mdt, double beta = 1.) const; /** IMuonPRDSelectionTool interface: calibrate and select single cluster */ const MuonClusterOnTrack* calibrateAndSelect( const Trk::TrackParameters& pars, const MuonCluster& clus ) const; diff --git a/MuonSpectrometer/MuonReconstruction/MuonRecTools/MuonRecToolInterfaces/MuonRecToolInterfaces/IMuonPRDSelectionTool.h b/MuonSpectrometer/MuonReconstruction/MuonRecTools/MuonRecToolInterfaces/MuonRecToolInterfaces/IMuonPRDSelectionTool.h index 69b314acdf29ae881a6a168451e2c38865fba4d2..a7b9584ec2ac52bf07612b86c073ac768fdaa781 100644 --- a/MuonSpectrometer/MuonReconstruction/MuonRecTools/MuonRecToolInterfaces/MuonRecToolInterfaces/IMuonPRDSelectionTool.h +++ b/MuonSpectrometer/MuonReconstruction/MuonRecTools/MuonRecToolInterfaces/MuonRecToolInterfaces/IMuonPRDSelectionTool.h @@ -37,7 +37,7 @@ namespace Muon { /** IMuonPRDSelectionTool interface: calibrate and select single MDT */ virtual const MdtDriftCircleOnTrack* calibrateAndSelect(const MuonSystemExtension::Intersection& intersection, - const MdtPrepData& mdt) const = 0; + const MdtPrepData& mdt, double beta = 1.) const = 0; /** IMuonPRDSelectionTool interface: calibrate and select single cluster */ virtual const MuonClusterOnTrack* calibrateAndSelect(const Trk::TrackParameters& pars, const MuonCluster& clus) const = 0; diff --git a/MuonSpectrometer/MuonReconstruction/MuonRecTools/MuonRecToolInterfaces/MuonRecToolInterfaces/IMuonSegmentMaker.h b/MuonSpectrometer/MuonReconstruction/MuonRecTools/MuonRecToolInterfaces/MuonRecToolInterfaces/IMuonSegmentMaker.h index 900c51f4b2883d04bd8da1088160df3d9d4f1d3d..992ff3dc7d95e225e9731ed6ed924cc811023385 100755 --- a/MuonSpectrometer/MuonReconstruction/MuonRecTools/MuonRecToolInterfaces/MuonRecToolInterfaces/IMuonSegmentMaker.h +++ b/MuonSpectrometer/MuonReconstruction/MuonRecTools/MuonRecToolInterfaces/MuonRecToolInterfaces/IMuonSegmentMaker.h @@ -109,7 +109,7 @@ namespace Muon { */ virtual void find(const Amg::Vector3D& gpos, const Amg::Vector3D& gdir, const std::vector<const MdtDriftCircleOnTrack*>& mdts, const std::vector<const MuonClusterOnTrack*>& clusters, bool updatePhi = false, - Trk::SegmentCollection* segColl = nullptr, double momentum = 1e9, double sinAngleCut = 0.) const = 0; + Trk::SegmentCollection* segColl = nullptr, double momentum = 1e9, double sinAngleCut = 0., double beta = 1.) const = 0; /** @brief seeded segment search starting from a list of MdtDriftCircleOnTrack objects and a list of MuonClusterOnTrack objects @param road an estimate of the position and direction of the muon in the chamber diff --git a/MuonSpectrometer/MuonReconstruction/MuonSegmentMakers/MuonSegmentMakerTools/DCMathSegmentMaker/src/DCMathSegmentMaker.cxx b/MuonSpectrometer/MuonReconstruction/MuonSegmentMakers/MuonSegmentMakerTools/DCMathSegmentMaker/src/DCMathSegmentMaker.cxx index 424c18101540bb9233441d7c91daaa0b4b293bc5..0dd0236a56de2373cb7f668582dba48c0d29922d 100644 --- a/MuonSpectrometer/MuonReconstruction/MuonSegmentMakers/MuonSegmentMakerTools/DCMathSegmentMaker/src/DCMathSegmentMaker.cxx +++ b/MuonSpectrometer/MuonReconstruction/MuonSegmentMakers/MuonSegmentMakerTools/DCMathSegmentMaker/src/DCMathSegmentMaker.cxx @@ -86,7 +86,7 @@ namespace Muon { void DCMathSegmentMaker::find(const Amg::Vector3D& roadpos, const Amg::Vector3D& roaddir, const std::vector<const MdtDriftCircleOnTrack*>& mdts, const std::vector<const MuonClusterOnTrack*>& clusters, bool hasPhiMeasurements, - Trk::SegmentCollection* segColl, double momentum, double sinAngleCut) const { + Trk::SegmentCollection* segColl, double momentum, double sinAngleCut, double beta) const { const EventContext& ctx = Gaudi::Hive::currentContext(); if (m_doTimeOutChecks && Athena::Timeout::instance().reached()) { ATH_MSG_DEBUG("Timeout reached. Aborting sequence."); @@ -220,7 +220,7 @@ namespace Muon { // loop over segments segmentCreationInfo sInfo(spVecs, multiGeo.get(), gToStation, amdbToGlobal, phimin, phimax); for (TrkDriftCircleMath::Segment& seg : segs) { - std::unique_ptr<MuonSegment> segment = createSegment(ctx, seg, chid, roadpos, roaddir2, mdts, hasPhiMeasurements, sInfo); + std::unique_ptr<MuonSegment> segment = createSegment(ctx, seg, chid, roadpos, roaddir2, mdts, hasPhiMeasurements, sInfo, beta); if (segment) segColl->push_back(segment.release()); } ATH_MSG_DEBUG(" Done "); @@ -229,7 +229,7 @@ namespace Muon { std::unique_ptr<MuonSegment> DCMathSegmentMaker::createSegment(const EventContext& ctx, TrkDriftCircleMath::Segment& segment, const Identifier& chid, const Amg::Vector3D& roadpos, const Amg::Vector3D& roaddir2, const std::vector<const MdtDriftCircleOnTrack*>& mdts, bool hasPhiMeasurements, - segmentCreationInfo& sInfo) const { + segmentCreationInfo& sInfo, double beta) const { bool isEndcap = m_idHelperSvc->isEndcap(chid); // find all curved segments MuonStationIndex::ChIndex chIndex = m_idHelperSvc->chamberIndex(chid); @@ -318,7 +318,7 @@ namespace Muon { std::set<Identifier> deltaVec; std::set<Identifier> outoftimeVec; - associateMDTsToSegment(gdir, segment, sInfo.geom, sInfo.globalTrans, sInfo.amdbTrans, deltaVec, outoftimeVec, rioDistVec); + associateMDTsToSegment(gdir, segment, sInfo.geom, sInfo.globalTrans, sInfo.amdbTrans, deltaVec, outoftimeVec, rioDistVec, beta); std::vector<std::pair<double, std::unique_ptr<const Trk::MeasurementBase>>> garbage_collector; TrkDriftCircleMath::DCSLHitSelector hitSelector; @@ -1153,7 +1153,7 @@ namespace Muon { const Amg::Vector3D& gdir, TrkDriftCircleMath::Segment& segment, const TrkDriftCircleMath::ChamberGeometry* multiGeo, const Amg::Transform3D& gToStation, const Amg::Transform3D& amdbToGlobal, std::set<Identifier>& deltaVec, std::set<Identifier>& outoftimeVec, - std::vector<std::pair<double, std::unique_ptr<const Trk::MeasurementBase>> >& rioDistVec) const { + std::vector<std::pair<double, std::unique_ptr<const Trk::MeasurementBase>> >& rioDistVec, double beta) const { // clear result vectors // convert segment parameters + x position from road @@ -1224,7 +1224,7 @@ namespace Muon { bool hasT0 = segment.hasT0Shift(); if (!hasT0 || m_mdtCreatorT0.empty()) { // ATH_MSG_VERBOSE(" recalibrate MDT hit"); - nonconstDC.reset(m_mdtCreator->createRIO_OnTrack(*riodc->prepRawData(), mdtGP, &gdir)); + nonconstDC.reset(m_mdtCreator->createRIO_OnTrack(*riodc->prepRawData(), mdtGP, &gdir, 0., nullptr, beta, 0.)); if (hasT0) ATH_MSG_WARNING("Attempted to change t0 without a properly configured MDT creator tool. "); } else { ATH_MSG_VERBOSE(" recalibrate MDT hit with shift " << segment.t0Shift()<<" "<<m_printer->print(*riodc)); diff --git a/MuonSpectrometer/MuonReconstruction/MuonSegmentMakers/MuonSegmentMakerTools/DCMathSegmentMaker/src/DCMathSegmentMaker.h b/MuonSpectrometer/MuonReconstruction/MuonSegmentMakers/MuonSegmentMakerTools/DCMathSegmentMaker/src/DCMathSegmentMaker.h index a64900f30439879cfa80757a3fc273cbdfc0a1fc..71bf69c9e3b91d74301b3475f1a92365f42a65b2 100644 --- a/MuonSpectrometer/MuonReconstruction/MuonSegmentMakers/MuonSegmentMakerTools/DCMathSegmentMaker/src/DCMathSegmentMaker.h +++ b/MuonSpectrometer/MuonReconstruction/MuonSegmentMakers/MuonSegmentMakerTools/DCMathSegmentMaker/src/DCMathSegmentMaker.h @@ -240,7 +240,7 @@ namespace Muon { */ void find(const Amg::Vector3D& gpos, const Amg::Vector3D& gdir, const std::vector<const MdtDriftCircleOnTrack*>& mdts, const std::vector<const MuonClusterOnTrack*>& clusters, bool hasPhiMeasurements = false, - Trk::SegmentCollection* segColl = nullptr, double momentum = 1e9, double sinAngleCut = 0) const; + Trk::SegmentCollection* segColl = nullptr, double momentum = 1e9, double sinAngleCut = 0, double beta = 1. ) const; /** find segments starting from: - a track prediction @@ -290,7 +290,7 @@ namespace Muon { const Amg::Vector3D& gdir, TrkDriftCircleMath::Segment& segment, const TrkDriftCircleMath::ChamberGeometry* multiGeo, const Amg::Transform3D& gToStation, const Amg::Transform3D& amdbToGlobal, std::set<Identifier>& deltaVec, std::set<Identifier>& outoftimeVec, - std::vector<std::pair<double, std::unique_ptr<const Trk::MeasurementBase>> >& rioDistVec) const; + std::vector<std::pair<double, std::unique_ptr<const Trk::MeasurementBase>> >& rioDistVec, double beta = 1. ) const; std::pair<std::pair<int, int>, bool> associateClustersToSegment( const TrkDriftCircleMath::Segment& segment, const Identifier& chid, const Amg::Transform3D& gToStation, ClusterVecPair& spVecs, double phimin, double phimax, std::vector<std::pair<double, std::unique_ptr<const Trk::MeasurementBase>> >& rioDistVec) const; @@ -330,7 +330,7 @@ namespace Muon { std::unique_ptr<MuonSegment> createSegment(const EventContext& ctx, TrkDriftCircleMath::Segment& segment, const Identifier& chid, const Amg::Vector3D& roadpos, const Amg::Vector3D& roaddir2, const std::vector<const MdtDriftCircleOnTrack*>& mdts, - bool hasPhiMeasurements, segmentCreationInfo& sInfo) const; + bool hasPhiMeasurements, segmentCreationInfo& sInfo, double beta = 1. ) const; const MdtPrepData* findMdt(const EventContext& ctx, const Identifier& id) const; diff --git a/Reconstruction/MuonIdentification/MuonCombinedTrackFindingTools/src/MuonStauRecoTool.cxx b/Reconstruction/MuonIdentification/MuonCombinedTrackFindingTools/src/MuonStauRecoTool.cxx index a947857cc2c0a4c3da220398a197323c9913c6d3..1cfa9c6c2ff7f4a96f84300f5e9ac611dbe9be48 100644 --- a/Reconstruction/MuonIdentification/MuonCombinedTrackFindingTools/src/MuonStauRecoTool.cxx +++ b/Reconstruction/MuonIdentification/MuonCombinedTrackFindingTools/src/MuonStauRecoTool.cxx @@ -197,6 +197,7 @@ namespace MuonCombined { << " layerDataVec size" << candidate->layerDataVec.size() << " hits size" << candidate->hits.size()); + float beta = candidate->betaFitResult.beta; // loop over layers and perform segment finding, collect segments per layer for (const auto& layerData : candidate->layerDataVec) { // store segments in layer @@ -205,7 +206,7 @@ namespace MuonCombined { // loop over maxima for (const auto& maximumData : layerData.maximumDataVec) { // find segments for intersection - findSegments(layerData.intersection, *maximumData, segments, m_muonPRDSelectionToolStau, m_segmentMaker); + findSegments(layerData.intersection, *maximumData, segments, m_muonPRDSelectionToolStau, m_segmentMaker, beta); } // skip if no segment were found @@ -1131,14 +1132,16 @@ namespace MuonCombined { void MuonStauRecoTool::findSegments(const Muon::MuonSystemExtension::Intersection& intersection, MaximumData& maximumData, std::vector<std::shared_ptr<const Muon::MuonSegment>>& segments, const ToolHandle<Muon::IMuonPRDSelectionTool>& muonPRDSelectionTool, - const ToolHandle<Muon::IMuonSegmentMaker>& segmentMaker) const { + const ToolHandle<Muon::IMuonSegmentMaker>& segmentMaker, + float beta) const { const MuonHough::MuonLayerHough::Maximum& maximum = *maximumData.maximum; const std::vector<std::shared_ptr<const Muon::MuonClusterOnTrack>>& phiClusterOnTracks = maximumData.phiClusterOnTracks; // lambda to handle calibration and selection of MDTs auto handleMdt = [intersection, muonPRDSelectionTool](const Muon::MdtPrepData& prd, - std::vector<const Muon::MdtDriftCircleOnTrack*>& mdts) { - const Muon::MdtDriftCircleOnTrack* mdt = muonPRDSelectionTool->calibrateAndSelect(intersection, prd); + std::vector<const Muon::MdtDriftCircleOnTrack*>& mdts, + float beta) { + const Muon::MdtDriftCircleOnTrack* mdt = muonPRDSelectionTool->calibrateAndSelect(intersection, prd, beta); if (mdt) mdts.push_back(mdt); }; @@ -1170,7 +1173,7 @@ namespace MuonCombined { } else if ((*hit)->prd) { Identifier id = (*hit)->prd->identify(); if (m_idHelperSvc->isMdt(id)) - handleMdt(static_cast<const Muon::MdtPrepData&>(*(*hit)->prd), mdts); + handleMdt(static_cast<const Muon::MdtPrepData&>(*(*hit)->prd), mdts, beta); else handleCluster(static_cast<const Muon::MuonCluster&>(*(*hit)->prd), clusters); } @@ -1189,7 +1192,7 @@ namespace MuonCombined { // run segment finder auto segColl = std::make_unique<Trk::SegmentCollection>(SG::VIEW_ELEMENTS); segmentMaker->find(intersection.trackParameters->position(), intersection.trackParameters->momentum(), mdts, clusters, - !clusters.empty(), segColl.get(), intersection.trackParameters->momentum().mag()); + !clusters.empty(), segColl.get(), intersection.trackParameters->momentum().mag(), 0, beta); if (segColl) { Trk::SegmentCollection::iterator sit = segColl->begin(); Trk::SegmentCollection::iterator sit_end = segColl->end(); diff --git a/Reconstruction/MuonIdentification/MuonCombinedTrackFindingTools/src/MuonStauRecoTool.h b/Reconstruction/MuonIdentification/MuonCombinedTrackFindingTools/src/MuonStauRecoTool.h index 001c08e1c4be3b4f3282ba2d8a2193ecb8c87aed..d81af9a1ac47498dbf8e616141af497ea94751a5 100644 --- a/Reconstruction/MuonIdentification/MuonCombinedTrackFindingTools/src/MuonStauRecoTool.h +++ b/Reconstruction/MuonIdentification/MuonCombinedTrackFindingTools/src/MuonStauRecoTool.h @@ -165,7 +165,8 @@ namespace MuonCombined { void findSegments(const Muon::MuonSystemExtension::Intersection& intersection, MaximumData& maximumData, std::vector<std::shared_ptr<const Muon::MuonSegment>>& t0fittedSegments, const ToolHandle<Muon::IMuonPRDSelectionTool>& muonPRDSelectionTool, - const ToolHandle<Muon::IMuonSegmentMaker>& segmentMaker) const; + const ToolHandle<Muon::IMuonSegmentMaker>& segmentMaker, + float beta = 1.) const; /** associate Hough maxima and associate time measurements */ bool extractTimeMeasurements(const EventContext& ctx, const Muon::MuonSystemExtension& muonSystemExtension, diff --git a/Tools/WorkflowTestRunner/python/References.py b/Tools/WorkflowTestRunner/python/References.py index 0051d5f71edb6c8b16a3babc30bbe45a054825b3..bcc0b60c9204d9bdbc9c5a6f9eda3316dc3b810c 100644 --- a/Tools/WorkflowTestRunner/python/References.py +++ b/Tools/WorkflowTestRunner/python/References.py @@ -25,10 +25,10 @@ references_map = { "d1759": "v20", "d1912": "v8", # Reco - "q442": "v76", - "q449": "v124", - "q452": "v36", - "q454": "v52", + "q442": "v77", + "q449": "v125", + "q452": "v37", + "q454": "v53", # Derivations "data_PHYS_Run2": "v48", "data_PHYSLITE_Run2": "v26",