diff --git a/MuonSpectrometer/MuonAlignment/MuonAlignExample/share/muonErrorScaling.py b/MuonSpectrometer/MuonAlignment/MuonAlignExample/share/muonErrorScaling.py index 830556e08f46e2a01dfee3529bdd5ccd2d7da5ae..f54e1283031b84a3ed51ad09a6a1723a8710894c 100644 --- a/MuonSpectrometer/MuonAlignment/MuonAlignExample/share/muonErrorScaling.py +++ b/MuonSpectrometer/MuonAlignment/MuonAlignExample/share/muonErrorScaling.py @@ -21,7 +21,7 @@ MdtDriftCircleOnTrackCreator.ScaleErrorsManually=False MdtDriftCircleOnTrackCreator.OutputLevel = outputLevel MdtDriftCircleOnTrackCreator.ErrorScalingTool=muonErrorScalingTool -CscClusterOnTrackCreator = MuonRecTools.getPublicTool("CscClusterOnTrackCreator") +CscClusterOnTrackCreator = MuonRecTools.getPrivateTool("CscClusterOnTrackCreator") CscClusterOnTrackCreator.DoRpcErrorScaling = True CscClusterOnTrackCreator.DoTgcErrorScaling = True CscClusterOnTrackCreator.DoCscErrorScaling = True diff --git a/MuonSpectrometer/MuonReconstruction/MuonDataPrep/CscClusterization/src/CalibCscStripFitter.cxx b/MuonSpectrometer/MuonReconstruction/MuonDataPrep/CscClusterization/src/CalibCscStripFitter.cxx index eb5fe65606b766eb6bea2830db92df81146b3927..52d37216b7fc34adb5b3aa2ead4382bf3e8c17fc 100644 --- a/MuonSpectrometer/MuonReconstruction/MuonDataPrep/CscClusterization/src/CalibCscStripFitter.cxx +++ b/MuonSpectrometer/MuonReconstruction/MuonDataPrep/CscClusterization/src/CalibCscStripFitter.cxx @@ -23,7 +23,7 @@ CalibCscStripFitter:: CalibCscStripFitter(string type, string aname, const IInterface* parent) : AthAlgTool(type, aname, parent),m_noiseOption(rms), m_pmuon_detmgr(0), m_phelper(0), - m_cscCalibTool("CscCalibTool/CscCalibTool") { + m_cscCalibTool("CscCalibTool/CscCalibTool", this) { declareInterface<ICscStripFitter>(this); declareProperty("timeError", m_terr =5.0); diff --git a/MuonSpectrometer/MuonReconstruction/MuonDataPrep/CscClusterization/src/CscClusterUtilTool.cxx b/MuonSpectrometer/MuonReconstruction/MuonDataPrep/CscClusterization/src/CscClusterUtilTool.cxx index 8dff507556f354e62eba17b9e97b6c1422c9759a..95349b049ff7bc38ea61f8c7d9af872c247532d7 100644 --- a/MuonSpectrometer/MuonReconstruction/MuonDataPrep/CscClusterization/src/CscClusterUtilTool.cxx +++ b/MuonSpectrometer/MuonReconstruction/MuonDataPrep/CscClusterization/src/CscClusterUtilTool.cxx @@ -30,8 +30,8 @@ CscClusterUtilTool:: CscClusterUtilTool(string type, string aname, const IInterface* parent) : AthAlgTool(type, aname, parent), m_pmuon_detmgr(0), m_phelper(0), - m_stripFitter("CalibCscStripFitter/CalibCscStripFitter"), - m_precClusterFitter("QratCscClusterFitter/QratCscClusterFitter"), + m_stripFitter("CalibCscStripFitter/CalibCscStripFitter", this), + m_precClusterFitter("QratCscClusterFitter/QratCscClusterFitter", this), m_cscStripLocation("CSC_Measurements") { declareInterface<ICscClusterUtilTool>(this); diff --git a/MuonSpectrometer/MuonReconstruction/MuonDataPrep/CscClusterization/src/QratCscClusterFitter.cxx b/MuonSpectrometer/MuonReconstruction/MuonDataPrep/CscClusterization/src/QratCscClusterFitter.cxx index 0fa5af224beeb29b5a009a3c40b78f8a5157b0c9..ffa4729ef526212e60192a98f6d7b72228f334e8 100644 --- a/MuonSpectrometer/MuonReconstruction/MuonDataPrep/CscClusterization/src/QratCscClusterFitter.cxx +++ b/MuonSpectrometer/MuonReconstruction/MuonDataPrep/CscClusterization/src/QratCscClusterFitter.cxx @@ -217,8 +217,10 @@ int qrat_atanh(const double a, const double b, double c, const double x0, QratCscClusterFitter:: QratCscClusterFitter(string type, string aname, const IInterface* parent) -: AthAlgTool(type, aname, parent) - , m_detMgr(nullptr), m_cscIdHelper(nullptr), m_alignmentTool("CscAlignmentTool/CscAlignmentTool") + : AthAlgTool(type, aname, parent), + m_detMgr(nullptr), + m_cscIdHelper(nullptr), + m_alignmentTool("CscAlignmentTool/CscAlignmentTool", this) { declareInterface<ICscClusterFitter>(this); m_max_width.push_back(5); // CSS eta diff --git a/MuonSpectrometer/MuonReconstruction/MuonRIO_OnTrackCreators/MuonClusterOnTrackCreator/src/CscClusterOnTrackCreator.cxx b/MuonSpectrometer/MuonReconstruction/MuonRIO_OnTrackCreators/MuonClusterOnTrackCreator/src/CscClusterOnTrackCreator.cxx index 48852d3ec54123f67686f0743b33e4fe6bc09b11..970bc319a22df75384d15e9aa0d1263376531327 100644 --- a/MuonSpectrometer/MuonReconstruction/MuonRIO_OnTrackCreators/MuonClusterOnTrackCreator/src/CscClusterOnTrackCreator.cxx +++ b/MuonSpectrometer/MuonReconstruction/MuonRIO_OnTrackCreators/MuonClusterOnTrackCreator/src/CscClusterOnTrackCreator.cxx @@ -57,9 +57,9 @@ namespace Muon { m_cscIdHelper(0), m_rpcIdHelper(0), m_tgcIdHelper(0), - m_stripFitter("CalibCscStripFitter/CalibCscStripFitter"), - m_clusterFitter("QratCscClusterFitter/QratCscClusterFitter"), - m_clusterUtilTool("CscClusterUtilTool/CscClusterUtilTool"), + m_stripFitter("CalibCscStripFitter/CalibCscStripFitter", this), + m_clusterFitter("QratCscClusterFitter/QratCscClusterFitter", this), + m_clusterUtilTool("CscClusterUtilTool/CscClusterUtilTool", this), m_have_csc_tools(false) { // algtool interface - necessary! @@ -439,4 +439,10 @@ namespace Muon { correct(const Trk::PrepRawData& RIO,const Trk::TrackParameters& TP) const { return createRIO_OnTrack(RIO,TP.position(),TP.momentum().unit()); } + + /// These functions are provided from the interface + const ToolHandle<ICscStripFitter>& CscClusterOnTrackCreator::GetICscStripFitter() const {return m_stripFitter;} + const ToolHandle<ICscClusterFitter>& CscClusterOnTrackCreator::GetICscClusterFitter() const {return m_clusterFitter;} + const ToolHandle<ICscClusterUtilTool>& CscClusterOnTrackCreator::GetICscClusterUtilTool() const {return m_clusterUtilTool;} + } diff --git a/MuonSpectrometer/MuonReconstruction/MuonRIO_OnTrackCreators/MuonClusterOnTrackCreator/src/CscClusterOnTrackCreator.h b/MuonSpectrometer/MuonReconstruction/MuonRIO_OnTrackCreators/MuonClusterOnTrackCreator/src/CscClusterOnTrackCreator.h index 7e9c0604cd1e99643fee929f3dbcd6f7c17819ad..4b7b9fc40bae14fe1a12d00815f7828d861daea3 100644 --- a/MuonSpectrometer/MuonReconstruction/MuonRIO_OnTrackCreators/MuonClusterOnTrackCreator/src/CscClusterOnTrackCreator.h +++ b/MuonSpectrometer/MuonReconstruction/MuonRIO_OnTrackCreators/MuonClusterOnTrackCreator/src/CscClusterOnTrackCreator.h @@ -18,7 +18,7 @@ #include "AthenaBaseComps/AthAlgTool.h" #include "GaudiKernel/ToolHandle.h" -#include "MuonRecToolInterfaces/IMuonClusterOnTrackCreator.h" +#include "MuonRecToolInterfaces/ICscClusterOnTrackCreator.h" #include "MuonRIO_OnTrack/MuonClusterOnTrack.h" #include "MuonReadoutGeometry/MuonDetectorManager.h" @@ -28,9 +28,6 @@ #include "MuonPrepRawData/CscStripPrepDataContainer.h" -class ICscStripFitter; -class ICscClusterFitter; -class ICscClusterUtilTool; class CscIdHelper; namespace Muon { @@ -59,7 +56,7 @@ namespace Muon { - CscStripFitter: Tool to fit charge + time of a CSC strip - CscStripPrepDataLocation: Storegate key of the CscStripPrepData collection */ - class CscClusterOnTrackCreator : public AthAlgTool, virtual public IMuonClusterOnTrackCreator { + class CscClusterOnTrackCreator : public AthAlgTool, virtual public ICscClusterOnTrackCreator { public: CscClusterOnTrackCreator(const std::string&,const std::string&,const IInterface*); @@ -96,14 +93,19 @@ namespace Muon { */ virtual const MuonClusterOnTrack* correct(const Trk::PrepRawData& RIO,const Trk::TrackParameters& TP) const; + virtual const ToolHandle<ICscStripFitter>& GetICscStripFitter() const; + virtual const ToolHandle<ICscClusterFitter>& GetICscClusterFitter() const; + virtual const ToolHandle<ICscClusterUtilTool>& GetICscClusterUtilTool() const; + + private: const MuonGM::MuonDetectorManager* m_muonMgr; // Muon GeoModel const CscIdHelper* m_cscIdHelper; const RpcIdHelper* m_rpcIdHelper; const TgcIdHelper* m_tgcIdHelper; - ToolHandle<ICscStripFitter> m_stripFitter; - ToolHandle<ICscClusterFitter> m_clusterFitter; - ToolHandle<ICscClusterUtilTool> m_clusterUtilTool; + ToolHandle<ICscStripFitter> m_stripFitter; + ToolHandle<ICscClusterFitter> m_clusterFitter; + ToolHandle<ICscClusterUtilTool> m_clusterUtilTool; bool m_have_csc_tools; SG::ReadCondHandleKey<RIO_OnTrackErrorScaling> m_cscErrorScalingKey diff --git a/MuonSpectrometer/MuonReconstruction/MuonRecExample/python/CscTools.py b/MuonSpectrometer/MuonReconstruction/MuonRecExample/python/CscTools.py index 43d2c3d8231c51df74437bda8c480d5d0016d712..4b55589463674155e7fb95f170d0e813b3ac6e23 100644 --- a/MuonSpectrometer/MuonReconstruction/MuonRecExample/python/CscTools.py +++ b/MuonSpectrometer/MuonReconstruction/MuonRecExample/python/CscTools.py @@ -131,12 +131,12 @@ def CscThresholdClusterBuilderTool(name="CscThresholdClusterBuilderTool",extraFl return CfgMgr.CscThresholdClusterBuilderTool(name,**kwargs) def CscClusterUtilTool(name = "CscClusterUtilTool",extraFlags=None,**kwargs): - kwargs.setdefault("strip_fitter", getPublicTool("CalibCscStripFitter") ) - kwargs.setdefault("precision_fitter", getPublicTool("QratCscClusterFitter") ) + kwargs.setdefault("strip_fitter", getPrivateTool("CalibCscStripFitter") ) + kwargs.setdefault("precision_fitter", getPrivateTool("QratCscClusterFitter") ) return CfgMgr.CscClusterUtilTool(name,**kwargs) def CalibCscStripFitter(name = "CalibCscStripFitter",extraFlags=None,**kwargs): - kwargs.setdefault("cscCalibTool", getPublicTool("CscCalibTool") ) + kwargs.setdefault("cscCalibTool", getPrivateTool("CscCalibTool") ) return CfgMgr.CalibCscStripFitter(name,**kwargs) def CscSplitClusterFitter(name="CscSplitClusterFitter",extraFlags=None,**kwargs): @@ -169,12 +169,11 @@ def QratCscClusterFitter( name="QratCscClusterFitter",extraFlags=None,**kwargs): ] kwargs.setdefault("qratcor_csl_eta",qratcor_csl_eta) kwargs.setdefault("qratcor_css_eta",qratcor_css_eta) - kwargs.setdefault("CscAlignmentTool", getPublicTool("CscAlignmentTool") ) + kwargs.setdefault("CscAlignmentTool", getPrivateTool("CscAlignmentTool") ) return CfgMgr.QratCscClusterFitter(name,**kwargs) def CscSegmentUtilTool(name= "CscSegmentUtilTool",extraFlags=None,**kwargs): - kwargs.setdefault("precision_fitter", getPublicTool("QratCscClusterFitter") ) kwargs.setdefault("rot_creator", getPublicTool("CscClusterOnTrackCreator") ) return CfgMgr.CscSegmentUtilTool(name,**kwargs) diff --git a/MuonSpectrometer/MuonReconstruction/MuonRecExample/python/MuonRecTools.py b/MuonSpectrometer/MuonReconstruction/MuonRecExample/python/MuonRecTools.py index 3326352a52b89c7cd9cc259469a38dca00170975..f7077514bfc4410e18c60c47f83b21a145d87089 100644 --- a/MuonSpectrometer/MuonReconstruction/MuonRecExample/python/MuonRecTools.py +++ b/MuonSpectrometer/MuonReconstruction/MuonRecExample/python/MuonRecTools.py @@ -52,9 +52,9 @@ def getMuonRIO_OnTrackErrorScalingCondAlg() : CondDataAssociation = error_scaling_def) def CscClusterOnTrackCreator(name="CscClusterOnTrackCreator",**kwargs): - kwargs.setdefault("CscStripFitter", getPublicTool("CalibCscStripFitter") ) - kwargs.setdefault("CscClusterFitter", getPublicTool("QratCscClusterFitter") ) - kwargs.setdefault("CscClusterUtilTool", getPublicTool("CscClusterUtilTool") ) + kwargs.setdefault("CscStripFitter", getPrivateTool("CalibCscStripFitter") ) + kwargs.setdefault("CscClusterFitter", getPrivateTool("QratCscClusterFitter") ) + kwargs.setdefault("CscClusterUtilTool", getPrivateTool("CscClusterUtilTool") ) if False : # enable CscClusterOnTrack error scaling : from InDetRecExample.TrackingCommon import getRIO_OnTrackErrorScalingCondAlg,createAndAddCondAlg createAndAddCondAlg(getMuonRIO_OnTrackErrorScalingCondAlg,'RIO_OnTrackErrorScalingCondAlg') @@ -439,8 +439,8 @@ if DetFlags.detdescr.Muon_on() and rec.doMuon(): getPublicTool("MuonEDMPrinterTool") getPublicTool("MuonSegmentMomentum") getPublicTool("MuonClusterOnTrackCreator") - getPublicTool("CscClusterOnTrackCreator") - getPublicTool("CscBroadClusterOnTrackCreator") + getPrivateTool("CscClusterOnTrackCreator") + getPrivateTool("CscBroadClusterOnTrackCreator") getPublicTool("MdtDriftCircleOnTrackCreator") getPublicTool("MdtTubeHitOnTrackCreator") diff --git a/MuonSpectrometer/MuonReconstruction/MuonRecTools/MuonRecToolInterfaces/MuonRecToolInterfaces/ICscClusterOnTrackCreator.h b/MuonSpectrometer/MuonReconstruction/MuonRecTools/MuonRecToolInterfaces/MuonRecToolInterfaces/ICscClusterOnTrackCreator.h new file mode 100644 index 0000000000000000000000000000000000000000..50bba1d613d2e82c8742b270cf918d4f7b3d05f0 --- /dev/null +++ b/MuonSpectrometer/MuonReconstruction/MuonRecTools/MuonRecToolInterfaces/MuonRecToolInterfaces/ICscClusterOnTrackCreator.h @@ -0,0 +1,48 @@ +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +#ifndef MUON_ICSCCLUSTERONTRACKCREATOR_H +#define MUON_ICSCCLUSTERONTRACKCREATOR_H + +#include "MuonRecToolInterfaces/IMuonClusterOnTrackCreator.h" + +static const InterfaceID IID_ICscClusterOnTrackCreator + ("Muon::ICscClusterOnTrackCreator",1,0); + +class ICscStripFitter; +class ICscClusterFitter; +class ICscClusterUtilTool; + + +namespace Muon { + + + /** @brief Interface for tools calibrating CSCCluster, turning them into Muon::ICscClusterOnTrack object. + The interface inherits from IMuonClusterOnTrackCreator. + */ + class ICscClusterOnTrackCreator : virtual public IMuonClusterOnTrackCreator + { + public: + /////////////////////////////////////////////////////////////////// + // Standard tool methods + /////////////////////////////////////////////////////////////////// + + static const InterfaceID& interfaceID(); + + + /** @brief Return some tools used by CscClusterOnTrackCreator + */ + virtual const ToolHandle<ICscStripFitter>& GetICscStripFitter() const = 0; + virtual const ToolHandle<ICscClusterFitter>& GetICscClusterFitter() const = 0; + virtual const ToolHandle<ICscClusterUtilTool>& GetICscClusterUtilTool() const = 0; + }; + + inline const InterfaceID& ICscClusterOnTrackCreator::interfaceID() + { + return IID_ICscClusterOnTrackCreator; + } +} // end of name space + +#endif // MUON_ICSCCLUSTERONTRACKCREATOR_H + diff --git a/MuonSpectrometer/MuonReconstruction/MuonRecTools/MuonRecToolInterfaces/MuonRecToolInterfaces/IMuonClusterOnTrackCreator.h b/MuonSpectrometer/MuonReconstruction/MuonRecTools/MuonRecToolInterfaces/MuonRecToolInterfaces/IMuonClusterOnTrackCreator.h index e0d6042cb04204367d204a50cf34565e774aaecf..edf9c0d26a171248763aa26a77abb058c7534eb0 100755 --- a/MuonSpectrometer/MuonReconstruction/MuonRecTools/MuonRecToolInterfaces/MuonRecToolInterfaces/IMuonClusterOnTrackCreator.h +++ b/MuonSpectrometer/MuonReconstruction/MuonRecTools/MuonRecToolInterfaces/MuonRecToolInterfaces/IMuonClusterOnTrackCreator.h @@ -12,6 +12,10 @@ static const InterfaceID IID_IMuonClusterOnTrackCreator ("Muon::IMuonClusterOnTrackCreator",1,0); +class ICscStripFitter; +class ICscClusterFitter; +class ICscClusterUtilTool; + namespace Trk { class PrepRawData; } diff --git a/MuonSpectrometer/MuonReconstruction/MuonSegmentMakers/MuonSegmentMakerAlgs/CscSegmentMakers/src/CscSegmentUtilTool.cxx b/MuonSpectrometer/MuonReconstruction/MuonSegmentMakers/MuonSegmentMakerAlgs/CscSegmentMakers/src/CscSegmentUtilTool.cxx index bfd0edb3f874ea4ab58407741ffe8a7b0070fcb1..5471e54d5bebc3dacf49005454e7dd0d0d003513 100644 --- a/MuonSpectrometer/MuonReconstruction/MuonSegmentMakers/MuonSegmentMakerAlgs/CscSegmentMakers/src/CscSegmentUtilTool.cxx +++ b/MuonSpectrometer/MuonReconstruction/MuonSegmentMakers/MuonSegmentMakerAlgs/CscSegmentMakers/src/CscSegmentUtilTool.cxx @@ -25,7 +25,7 @@ #include "TrkSurfaces/RotatedTrapezoidBounds.h" #include "CscSegmentMakers/ICscSegmentFinder.h" -#include "MuonRecToolInterfaces/IMuonClusterOnTrackCreator.h" +#include "MuonRecToolInterfaces/ICscClusterOnTrackCreator.h" #include "CscClusterization/ICscClusterFitter.h" #include "CscClusterization/ICscStripFitter.h" #include "MuonIdHelpers/MuonIdHelperTool.h" @@ -96,11 +96,8 @@ namespace { CscSegmentUtilTool::CscSegmentUtilTool (const std::string& type, const std::string& name, const IInterface* parent) : AthAlgTool(type,name,parent), m_gm(0), m_phelper(0), - m_pfitter_prec("QratCscClusterFitter/QratCscClusterFitter"), m_rotCreator("Muon::CscClusterOnTrackCreator/CscClusterOnTrackCreator"), m_idHelper("Muon::MuonIdHelperTool/MuonIdHelperTool"), - m_clusterTool("CscClusterUtilTool/CscClusterUtilTool"), - m_stripFitter("CalibCscStripFitter/CalibCscStripFitter"), m_cscCoolStrSvc("MuonCalib::CscCoolStrSvc", name) { declareInterface<ICscSegmentUtilTool>(this); @@ -121,12 +118,12 @@ CscSegmentUtilTool::CscSegmentUtilTool declareProperty("IPconstraint", m_IPconstraint = true); declareProperty("IPerror", m_IPerror = 250.); declareProperty("allEtaPhiMatches", m_allEtaPhiMatches = true); - declareProperty("precision_fitter", m_pfitter_prec); declareProperty("rot_creator", m_rotCreator); declareProperty("TightenChi2", m_TightenChi2 = true); declareProperty("Remove4Overlap", m_remove4Overlap = true); declareProperty("Remove3Overlap", m_remove3Overlap = true); declareProperty("UnspoiledHits", m_nunspoil = -1); + } //****************************************************************************** @@ -148,7 +145,7 @@ StatusCode CscSegmentUtilTool::initialize() ATH_MSG_DEBUG ( " ROT tan(theta) tolerance: " << m_fitsegment_tantheta_tolerance ); ATH_MSG_DEBUG ( " cluster_error_scaler " << m_cluster_error_scaler); - ATH_MSG_DEBUG ( " Precision cluster fitter is " << m_pfitter_prec.typeAndName() ); + //ATH_MSG_DEBUG ( " Precision cluster fitter is " << m_rotCreator->GetICscClusterFitter().typeAndName() ); ATH_MSG_DEBUG ( " ROT creator: " << m_rotCreator.typeAndName() ); @@ -165,32 +162,18 @@ StatusCode CscSegmentUtilTool::initialize() m_phelper = m_gm->cscIdHelper(); - - // Retrieve the precision cluster fitting tool. - if ( m_pfitter_prec.retrieve().isFailure() ) { - ATH_MSG_FATAL ( "Unable to retrieve CSC precision cluster fitting tool " - << m_pfitter_prec->name() ); - return StatusCode::FAILURE; - }else{ - ATH_MSG_DEBUG( "Retrieved " << m_pfitter_prec ); - } - if ( m_rotCreator.retrieve().isFailure() ) { ATH_MSG_ERROR ( "Could not get " << m_rotCreator ); return StatusCode::FAILURE; }else{ ATH_MSG_DEBUG ( "Got " << m_rotCreator ); } + if ( m_idHelper.retrieve().isFailure() ) { ATH_MSG_ERROR ( "Could not get " << m_idHelper ); return StatusCode::FAILURE; } - if(m_clusterTool.retrieve().isFailure() ){ - ATH_MSG_ERROR( "Could not get "<< m_clusterTool ); - return StatusCode::FAILURE; - } - if ( m_cscCoolStrSvc.retrieve().isFailure() ) { ATH_MSG_FATAL ( "Unable to retrieve pointer to the CSC COLL Conditions Service" ); return StatusCode::FAILURE; @@ -381,7 +364,7 @@ fit_detailCalcPart1(const ICscSegmentFinder::TrkClusters& clus, const Amg::Vecto double d = Amg::error(clu->localCovariance(),Trk::locX); if (isunspoiled) { if ( IsSlopeGiven && outlierHitLayer != ( iclu - clus.begin() ) ) - d = m_pfitter_prec->getCorrectedError(prd, s1); + d = m_rotCreator->GetICscClusterFitter()->getCorrectedError(prd, s1); // if ( outlierHitLayer == ( iclu - clus.begin() ) ) // d = getDefaultError(id, measphi, prd); } @@ -451,7 +434,7 @@ fit_detailCalcPart1(const ICscSegmentFinder::TrkClusters& clus, const Amg::Vecto double d = Amg::error(clu->localCovariance(),Trk::locX); if (isunspoiled) { if ( IsSlopeGiven ) - d = m_pfitter_prec->getCorrectedError(prd, s1); + d = m_rotCreator->GetICscClusterFitter()->getCorrectedError(prd, s1); if ( outlierHitLayer == ( iclu - clus.begin() ) ) d = getDefaultError(id, measphi, prd); } @@ -1500,11 +1483,11 @@ void CscSegmentUtilTool::add_2dseg2hits(ICscSegmentFinder::Segments &segs, ICscS const Muon::CscClusterOnTrack* cot = iseg->clus[iclus].cl; if(checkCrossTalk){ const Muon::CscPrepData* prep = cot->prepRawData(); - std::vector<const Muon::CscStripPrepData*> strips = m_clusterTool->getStrips(prep); + std::vector<const Muon::CscStripPrepData*> strips = m_rotCreator->GetICscClusterUtilTool()->getStrips(prep); std::vector<double> stripCharges; for (unsigned int s=0; s<strips.size(); ++s) { ICscClusterFitter::StripFit sfit; - sfit = m_stripFitter->fit(*strips[s]); + sfit = m_rotCreator->GetICscStripFitter()->fit(*strips[s]); stripCharges.push_back(sfit.charge); } double maxCharge=0,centCharge=0; diff --git a/MuonSpectrometer/MuonReconstruction/MuonSegmentMakers/MuonSegmentMakerAlgs/CscSegmentMakers/src/CscSegmentUtilTool.h b/MuonSpectrometer/MuonReconstruction/MuonSegmentMakers/MuonSegmentMakerAlgs/CscSegmentMakers/src/CscSegmentUtilTool.h index 2391d20016714d965cf144dd35376e816887ad37..4aee3db63ec47f37030e7efdae599e488fd19919 100644 --- a/MuonSpectrometer/MuonReconstruction/MuonSegmentMakers/MuonSegmentMakerAlgs/CscSegmentMakers/src/CscSegmentUtilTool.h +++ b/MuonSpectrometer/MuonReconstruction/MuonSegmentMakers/MuonSegmentMakerAlgs/CscSegmentMakers/src/CscSegmentUtilTool.h @@ -17,7 +17,6 @@ #include "xAODEventInfo/EventInfo.h" #include "StoreGate/ReadHandleKey.h" //#include "CscClusterization/CalibCscStripFitter.h" -//#include "CscClusterization/ICscStripFitter.h" namespace MuonGM { class MuonDetectorManager; @@ -29,12 +28,10 @@ namespace Trk { namespace Muon { class MuonIdHelperTool; class MuonSegment; - class IMuonClusterOnTrackCreator; + class ICscClusterOnTrackCreator; class CscPrepData; } class ICscSegmentFinder; -class ICscClusterFitter; -class ICscStripFitter; class CscSegmentUtilTool : virtual public ICscSegmentUtilTool, public AthAlgTool { @@ -118,11 +115,9 @@ private: // data bool m_remove3Overlap; int m_nunspoil; - ToolHandle<ICscClusterFitter> m_pfitter_prec; - ToolHandle<Muon::IMuonClusterOnTrackCreator> m_rotCreator; + ToolHandle<Muon::ICscClusterOnTrackCreator> m_rotCreator; ToolHandle<Muon::MuonIdHelperTool> m_idHelper; - ToolHandle<ICscClusterUtilTool> m_clusterTool; - ToolHandle<ICscStripFitter> m_stripFitter; + ServiceHandle<MuonCalib::CscICoolStrSvc> m_cscCoolStrSvc; SG::ReadHandleKey<xAOD::EventInfo> m_eventInfo{this,"EventInfo","EventInfo","event info"}; diff --git a/MuonSpectrometer/MuonReconstruction/MuonTrackMakers/MuonTrackMakerTools/MuonTrackFinderTools/src/MuonChamberHoleRecoveryTool.cxx b/MuonSpectrometer/MuonReconstruction/MuonTrackMakers/MuonTrackMakerTools/MuonTrackFinderTools/src/MuonChamberHoleRecoveryTool.cxx index 1e4a73712a2323c7643acf210b4f1898571ffb26..b199e0aa5551790b21b75d2fc6e0cbd32a4dd705 100644 --- a/MuonSpectrometer/MuonReconstruction/MuonTrackMakers/MuonTrackMakerTools/MuonTrackFinderTools/src/MuonChamberHoleRecoveryTool.cxx +++ b/MuonSpectrometer/MuonReconstruction/MuonTrackMakers/MuonTrackMakerTools/MuonTrackFinderTools/src/MuonChamberHoleRecoveryTool.cxx @@ -67,7 +67,7 @@ namespace Muon { m_intersectSvc("MuonStationIntersectSvc",name()), m_extrapolator("Trk::Extrapolator/MuonExtrapolator"), m_mdtRotCreator("Muon::MdtDriftCircleOnTrackCreator/MdtDriftCircleOnTrackCreator"), - m_cscRotCreator("Muon::CscClusterOnTrackCreator/CscClusterOnTrackCreator"), + m_cscRotCreator("Muon::CscClusterOnTrackCreator/CscClusterOnTrackCreator", this), m_clusRotCreator("Muon::MuonClusterOnTrackCreator/MuonClusterOnTrackCreator"), m_pullCalculator("Trk::ResidualPullCalculator/ResidualPullCalculator"), m_idHelperTool("Muon::MuonIdHelperTool/MuonIdHelperTool"), diff --git a/MuonSpectrometer/MuonReconstruction/MuonTrackMakers/MuonTrackMakerTools/MuonTrackSteeringTools/src/MuPatCandidateTool.cxx b/MuonSpectrometer/MuonReconstruction/MuonTrackMakers/MuonTrackMakerTools/MuonTrackSteeringTools/src/MuPatCandidateTool.cxx index 1f269f2eadb4842b364d0103870f41f462bebf7e..c8999251bd383134626caf92b813ada53cf2d1c5 100644 --- a/MuonSpectrometer/MuonReconstruction/MuonTrackMakers/MuonTrackMakerTools/MuonTrackSteeringTools/src/MuPatCandidateTool.cxx +++ b/MuonSpectrometer/MuonReconstruction/MuonTrackMakers/MuonTrackMakerTools/MuonTrackSteeringTools/src/MuPatCandidateTool.cxx @@ -51,7 +51,7 @@ namespace Muon { MuPatCandidateTool::MuPatCandidateTool(const std::string& t, const std::string& n, const IInterface* p) : AthAlgTool(t,n,p), m_mdtRotCreator("Muon::MdtDriftCircleOnTrackCreator/MdtDriftCircleOnTrackCreator"), - m_cscRotCreator("Muon::CscClusterOnTrackCreator/CscClusterOnTrackCreator"), + m_cscRotCreator("Muon::CscClusterOnTrackCreator/CscClusterOnTrackCreator", this), m_compClusterCreator("Muon::TriggerChamberClusterOnTrackCreator/TriggerChamberClusterOnTrackCreator"), m_idHelperTool("Muon::MuonIdHelperTool/MuonIdHelperTool"), m_helperTool("Muon::MuonEDMHelperTool/MuonEDMHelperTool"), diff --git a/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/CscRawDataMonitoring/share/CSCMon_jobOptions.py b/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/CscRawDataMonitoring/share/CSCMon_jobOptions.py index bb5871d3b2097c5b1f874229ab0f20976883ae64..6abc9037e68c04b372cb14620fdc7923aa1b35b0 100644 --- a/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/CscRawDataMonitoring/share/CSCMon_jobOptions.py +++ b/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/CscRawDataMonitoring/share/CSCMon_jobOptions.py @@ -163,6 +163,7 @@ from AthenaCommon.AppMgr import ToolSvc from AthenaCommon import CfgMgr from AthenaCommon.CfgGetter import getPublicTool,getPublicToolClone +from AthenaCommon.CfgGetter import getPrivateTool,getPrivateToolClone ############################### # CSC monitoring algorithms @@ -221,8 +222,8 @@ if doCSCClus: CSCClusterKey = 'CSC_Clusters', CSCPrepRawDataKey = 'CSC_Measurements', CSCQmaxCutADC = 200, - CSCCalibTool = ToolSvc.CscCalibTool, - CSCStripFitter = ToolSvc.CalibCscStripFitter, + CSCCalibTool = getPrivateTool("CscCalibTool"), + CSCStripFitter = getPrivateTool("CalibCscStripFitter"), CSCTrigDecisionTool = ToolSvc.TrigDecisionTool, CSCDoEventSelection = False, CSCEventSelTriggers = csc_evtSelectionTriggers diff --git a/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/CscRawDataMonitoring/share/CscRawESD_MonitoringOptions.py b/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/CscRawDataMonitoring/share/CscRawESD_MonitoringOptions.py index 921197dbb2aeb501a56a761c76909b0a8f2286e8..a4879b152c0e712f15426a4555a3e1da35b445e0 100755 --- a/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/CscRawDataMonitoring/share/CscRawESD_MonitoringOptions.py +++ b/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/CscRawDataMonitoring/share/CscRawESD_MonitoringOptions.py @@ -28,6 +28,7 @@ from AthenaCommon.AppMgr import ToolSvc from AthenaCommon import CfgMgr from AthenaCommon.CfgGetter import getPublicTool,getPublicToolClone +from AthenaCommon.CfgGetter import getPrivateTool,getPrivateToolClone CalibCscStripFitter = getPublicTool("CalibCscStripFitter") ToolSvc += CalibCscStripFitter @@ -68,8 +69,8 @@ cscClusterESDValAlg = CscClusterValAlg( name = 'cscClusterESDValAlg', CSCClusterKey = 'CSC_Clusters', CSCPrepRawDataKey = 'CSC_Measurements', CSCQmaxCutADC = 0, - CSCCalibTool = ToolSvc.CscCalibTool, - CSCStripFitter = ToolSvc.CalibCscStripFitter, + CSCCalibTool = getPrivateTool("CscCalibTool"), + CSCStripFitter = getPrivateTool("CalibCscStripFitter"), #CSCTrigDecisionTool = ToolSvc.TrigDecisionTool, CSCDoEventSelection = False, CSCEventSelTriggers = csc_evtSelectionTriggers diff --git a/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/CscRawDataMonitoring/src/CscClusterValAlg.cxx b/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/CscRawDataMonitoring/src/CscClusterValAlg.cxx index 37820b0ddaf1c07fdc258ef61253564f05fcbf74..6d6294b13764936431d870a6692c6f93d08fa424 100755 --- a/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/CscRawDataMonitoring/src/CscClusterValAlg.cxx +++ b/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/CscRawDataMonitoring/src/CscClusterValAlg.cxx @@ -70,8 +70,8 @@ CscClusterValAlg::CscClusterValAlg(const std::string & type, const std::string & name, const IInterface* parent) : ManagedMonitorToolBase( type, name, parent ), m_cscIdHelper(0), - m_stripFitter(name), - m_cscCalibTool(name), + m_stripFitter(name, this), + m_cscCalibTool(name, this), m_trigDec( "Trig::TrigDecisionTool/TrigDecisionTool" ), m_cscclus_oviewEA(0), m_cscclus_oviewEC(0) diff --git a/MuonSpectrometer/MuonValidation/MuonDQA/MuonSegmMonitoring/share/CSCSegmMon_topOptions.py b/MuonSpectrometer/MuonValidation/MuonDQA/MuonSegmMonitoring/share/CSCSegmMon_topOptions.py index 8962aa00086b6913e0fd1a564246791287fd0649..ad623a8aea7e8995522181f032475f84ef3e7338 100644 --- a/MuonSpectrometer/MuonValidation/MuonDQA/MuonSegmMonitoring/share/CSCSegmMon_topOptions.py +++ b/MuonSpectrometer/MuonValidation/MuonDQA/MuonSegmMonitoring/share/CSCSegmMon_topOptions.py @@ -170,6 +170,7 @@ from AthenaCommon.AppMgr import ToolSvc from AthenaCommon import CfgMgr from AthenaCommon.CfgGetter import getPublicTool,getPublicToolClone +from AthenaCommon.CfgGetter import getPrivateTool,getPrivateToolClone ############################### # CSC monitoring algorithms @@ -219,8 +220,8 @@ if doCSCClus: CSCClusterKey = 'CSC_Clusters', CSCPrepRawDataKey = 'CSC_Measurements', CSCQmaxCutADC = 200, - CSCCalibTool = ToolSvc.CscCalibTool, - CSCStripFitter = ToolSvc.CalibCscStripFitter + CSCCalibTool = getPrivateTool("CscCalibTool"), + CSCStripFitter = getPrivateTool("CalibCscStripFitter") ) ToolSvc += cscClusterESDValAlg