diff --git a/InnerDetector/InDetCalibAlgs/TRT_CalibAlgs/TRT_CalibAlgs/TRTCalibrationMgr.h b/InnerDetector/InDetCalibAlgs/TRT_CalibAlgs/TRT_CalibAlgs/TRTCalibrationMgr.h index b404c2c0b26f21822e61d47c81e4910c8935f327..25bb9dcfddcd2af518b8206f40499e3ba9556312 100755 --- a/InnerDetector/InDetCalibAlgs/TRT_CalibAlgs/TRT_CalibAlgs/TRTCalibrationMgr.h +++ b/InnerDetector/InDetCalibAlgs/TRT_CalibAlgs/TRT_CalibAlgs/TRTCalibrationMgr.h @@ -77,8 +77,8 @@ private: PublicToolHandleArray<ITRTCalibrator> m_TRTCalibTools {this, "TRTCalibrator", {}, ""}; ToolHandleArray<IFitTool> m_FitTools {this, "FitTools", {}, ""}; ToolHandle<Trk::ITrackFitter> m_trackFitter {this, "TrackFitter", "ActsTrk::KalmanFitter/TrkKalmanFitter", ""}; - ToolHandle<Trk::ITrackSelectorTool> m_trackSelector; //!< Tool handle to the Trk::ITrackSelectorTool - ToolHandle<IAthenaOutputStreamTool> m_streamer; //!< OutputStreamTool + ToolHandle<Trk::ITrackSelectorTool> m_trackSelector {this, "TrackSelectorTool", "InDet::InDetTrackSelectorTool/InDetTrackSelectorTool", "Tool for the selection of tracks"}; + ToolHandle<IAthenaOutputStreamTool> m_streamer {this, "StreamTool", "AthenaOutputStreamTool/CondStream1"}; //!< OutputStreamTool // Gaudi properties Gaudi::Property<bool> m_dorefit {this, "DoRefit" , true , "Does a Re-Fit"}; diff --git a/InnerDetector/InDetCalibAlgs/TRT_CalibAlgs/python/TRTCalibrationMgrConfig.py b/InnerDetector/InDetCalibAlgs/TRT_CalibAlgs/python/TRTCalibrationMgrConfig.py index 16b2f55b5cbf3c699f5e7a88b12d58ce94b77f11..fedb5ca91ead14ea0057ff2cd3168cbfa9db68cf 100644 --- a/InnerDetector/InDetCalibAlgs/TRT_CalibAlgs/python/TRTCalibrationMgrConfig.py +++ b/InnerDetector/InDetCalibAlgs/TRT_CalibAlgs/python/TRTCalibrationMgrConfig.py @@ -61,23 +61,25 @@ def TRTCalibratorCfg(flags, name="TRTCalibrator", **kwargs) : if "NeighbourSvc" not in kwargs: from TRT_ConditionsServices.TRT_ConditionsServicesConfig import TRT_StrawNeighbourSvcCfg kwargs.setdefault("NeighbourSvc", acc.getPrimaryAndMerge(TRT_StrawNeighbourSvcCfg(flags))) - if "TRTCaldbTool" not in kwargs: + if "TRTCalDbTool" not in kwargs: from TRT_ConditionsServices.TRT_ConditionsServicesConfig import TRT_CalDbToolCfg - TRT_CalDbTool = acc.popToolsAndMerge(TRT_CalDbToolCfg(flags)) - acc.setPrivateTools(TRT_CalDbTool) + kwargs.setdefault("TRT_CalDbTool", acc.popToolsAndMerge(TRT_CalDbToolCfg(flags))) + + acc.setPrivateTools(CompFactory.TRTCalibrator(name, **kwargs)) + return acc # Tool to select tracks to be used for calibration def InDetDetailedTrackSelectorToolCfg(flags,name="InDetDetailedTrackSelectorTool",**kwargs): + # FIXME - This function should go to the correct Athena pkg... from AthenaCommon.SystemOfUnits import GeV, mm acc = ComponentAccumulator() - kwargs.setdefault("name", name) kwargs.setdefault("pTMin", 1.0*GeV) - # kwargs.setdefault("fitChi2OndfMax",50.0) ---> This does not exist in the InDetDetailedTrackSelectorTool.cxx file + kwargs.setdefault("fitChi2OnNdfMax",50.0) kwargs.setdefault("z0Max",99999.0*mm) kwargs.setdefault("IPd0Max",10.0*mm) kwargs.setdefault("IPd0Max",300.0*mm) @@ -91,12 +93,11 @@ def InDetDetailedTrackSelectorToolCfg(flags,name="InDetDetailedTrackSelectorTool kwargs.setdefault("nHitTrtPlusOutliersHighE",20) kwargs.setdefault("nHitTrtHighE",0) - # from TrkConfig.AtlasExtrapolatorConfig import InDetExtrapolatorCfg - # kwargs.setdefault("Extrapolator", acc.popToolsAndMerge(InDetExtrapolatorCfg(flags, **kwargs))) - + from TrkConfig.AtlasExtrapolatorConfig import InDetExtrapolatorCfg + kwargs.setdefault("Extrapolator", acc.popToolsAndMerge(InDetExtrapolatorCfg(flags))) from InDetConfig.InDetTrackSelectorToolConfig import InDetTrackSelectorToolCfg - acc.setPrivateTools(acc.popToolsAndMerge(InDetTrackSelectorToolCfg(flags, **kwargs))) + acc.setPrivateTools(acc.popToolsAndMerge(InDetTrackSelectorToolCfg(flags, name=name , **kwargs))) return acc # Steering algorithm. Either it fills track and hit ntuples, or it calls TRTCalibrator diff --git a/InnerDetector/InDetCalibAlgs/TRT_CalibAlgs/src/TRTCalibrationMgr.cxx b/InnerDetector/InDetCalibAlgs/TRT_CalibAlgs/src/TRTCalibrationMgr.cxx index e163a14c74f5f3d08c288cbb6725f9608f15e746..37aa1196b4019822b73e42734aadab496ac8a597 100644 --- a/InnerDetector/InDetCalibAlgs/TRT_CalibAlgs/src/TRTCalibrationMgr.cxx +++ b/InnerDetector/InDetCalibAlgs/TRT_CalibAlgs/src/TRTCalibrationMgr.cxx @@ -27,17 +27,11 @@ TRTCalibrationMgr::TRTCalibrationMgr(const std::string& name, ISvcLocator* pSvcLocator) : AthAlgorithm (name, pSvcLocator), - m_trackSelector("InDet::InDetTrackSelectorTool/InDetTrackSelectorTool"), - m_streamer("AthenaOutputStreamTool/CondStream1"), m_max_ntrk(100000), m_par_rtcontainerkey("/TRT/Calib/RT"), m_par_t0containerkey("/TRT/Calib/T0") { - m_TRTCalibTools.push_back("TRTCalibrator"); - // declare algorithm parameters - declareProperty("StreamTool", m_streamer); declareProperty("Max_ntrk",m_max_ntrk); - declareProperty("TrackSelectorTool", m_trackSelector, "Tool for the selection of tracks"); } //---------------------------------------------------------------------