diff --git a/Trigger/TrigAlgorithms/TrigFastTrackFinder/python/TrigFastTrackFinder_Config.py b/Trigger/TrigAlgorithms/TrigFastTrackFinder/python/TrigFastTrackFinder_Config.py index 83ce229b0a59fe98eb90ae0578a062bcd43c4d51..989ecdbf8a698b82e867ed291ce1740793207506 100755 --- a/Trigger/TrigAlgorithms/TrigFastTrackFinder/python/TrigFastTrackFinder_Config.py +++ b/Trigger/TrigAlgorithms/TrigFastTrackFinder/python/TrigFastTrackFinder_Config.py @@ -391,8 +391,6 @@ class TrigFastTrackFinderBase(TrigFastTrackFinder): if remapped_type=="cosmics": TrackMaker_FTF.CosmicTrack=True - self.useBeamSpotForRoiZwidth = config.useBeamSpotForRoiZwidth - ToolSvc += TrackMaker_FTF self.initialTrackMaker = TrackMaker_FTF diff --git a/Trigger/TrigAlgorithms/TrigFastTrackFinder/src/TrigFastTrackFinder.cxx b/Trigger/TrigAlgorithms/TrigFastTrackFinder/src/TrigFastTrackFinder.cxx index 753ce0d99b2ef58fa25f7d5f22e3cb9e6a05e7f9..202f1ff4ec66fd57f1e891e2242cd4c06b0441f7 100644 --- a/Trigger/TrigAlgorithms/TrigFastTrackFinder/src/TrigFastTrackFinder.cxx +++ b/Trigger/TrigAlgorithms/TrigFastTrackFinder/src/TrigFastTrackFinder.cxx @@ -67,7 +67,6 @@ TrigFastTrackFinder::TrigFastTrackFinder(const std::string& name, ISvcLocator* p m_doZFinder(false), m_doZFinderOnly(false), m_storeZFinderVertices(false), - m_useBeamSpotForRoiZwidth(false), m_nfreeCut(5), m_countTotalRoI(0), m_countRoIwithEnoughHits(0), @@ -162,7 +161,6 @@ TrigFastTrackFinder::TrigFastTrackFinder(const std::string& name, ISvcLocator* p // Accleration declareProperty("useGPU", m_useGPU = false,"Use GPU acceleration"); - declareProperty("useBeamSpotForRoiZwidth", m_useBeamSpotForRoiZwidth = false); // Large Radius Tracking declareProperty("LRT_Mode", m_LRTmode,"Enable Large Radius Tracking mode" ); @@ -281,6 +279,7 @@ StatusCode TrigFastTrackFinder::initialize() { if( m_doDisappearingTrk ) { ATH_CHECK(m_extrapolator.retrieve()); ATH_MSG_DEBUG("Retrieved tool " << m_extrapolator); + ATH_CHECK(m_disTrkFitter.retrieve()); ATH_MSG_DEBUG("Retrieved tool " << m_disTrkFitter); } else { @@ -382,56 +381,18 @@ StatusCode TrigFastTrackFinder::execute(const EventContext& ctx) const { ATH_CHECK(roiCollection.isValid()); - TrigRoiDescriptor internalRoI; - - if ( roiCollection->size()>1 ) ATH_MSG_WARNING( "More than one Roi in the collection: " << m_roiCollectionKey << ", this is not supported - use a composite Roi" ); - - if ( roiCollection->size()>0) { - if ( !m_useBeamSpotForRoiZwidth) { - internalRoI = **roiCollection->begin(); - }else{ - SG::ReadCondHandle<InDet::BeamSpotData> beamSpotHandle { m_beamSpotKey, ctx }; - - int beamSpotBitMap = beamSpotHandle->beamStatus(); - bool isOnlineBeamspot = ((beamSpotBitMap & 0x4) == 0x4); - - if ((isOnlineBeamspot && (beamSpotBitMap & 0x3) == 0x3) || !isOnlineBeamspot){ //converged or MC event, if the original RoI has a zed > 3 sig + 10 then set it to 3 sig + 10. - RoiDescriptor originRoI = **roiCollection->begin(); - double beamSpot_zsig = beamSpotHandle->beamSigma(2); - Amg::Vector3D vertex = beamSpotHandle->beamPos(); - double zVTX = vertex.z(); - double origin_zedPlus = originRoI.zedPlus() ; //!< z at the most forward end of the RoI - double origin_zedMinus = originRoI.zedMinus(); //!< z at the most backward end of the RoI - - double new_zedMargin = 10.; - double new_zedRange = 3.; - - double new_zedPlus = zVTX + beamSpot_zsig * new_zedRange + new_zedMargin; - double new_zedMinus = zVTX - beamSpot_zsig * new_zedRange - new_zedMargin; - - if (origin_zedPlus > new_zedPlus && origin_zedMinus < new_zedMinus){ - ATH_MSG_DEBUG("Updated RoI with zed = "<<new_zedRange<<" * sig + "<<new_zedMargin); - double origin_eta = originRoI.eta(); //!< gets eta at zMinus - double origin_etaPlus = originRoI.etaPlus() ; //!< gets eta at zedPlus - double origin_etaMinus = originRoI.etaMinus(); //!< gets eta at zMinus - - double origin_phi = originRoI.phi() ; //!< gets phiPlus - double origin_phiPlus = originRoI.phiPlus() ; //!< gets phiPlus - double origin_phiMinus = originRoI.phiMinus(); //!< gets phiMinus - - internalRoI = TrigRoiDescriptor( origin_eta, origin_etaMinus, origin_etaPlus, - origin_phi, origin_phiMinus, origin_phiPlus, - zVTX, new_zedMinus, new_zedPlus ); - } - else internalRoI = **roiCollection->begin(); // we have a more narrow zed range in RoI, no need to update. - }else{ //Not converged, set to the fullScan RoI - internalRoI = **roiCollection->begin(); - } - } + if ( roiCollection->size()>1 ) ATH_MSG_WARNING( "More than one Roi in the collection: " << m_roiCollectionKey << ", this is not supported - use a composite Roi: Using the first Roi ONLY" ); + + if ( roiCollection->size()==0) { + ATH_MSG_ERROR("No Roi found for " << m_roiCollectionKey.key() ); + return StatusCode::FAILURE; } + TrigRoiDescriptor internalRoI = **roiCollection->begin(); - // internalRoI.manageConstituents(false);//Don't try to delete RoIs at the end + /// internalRoI.manageConstituents(false);//Don't try to delete RoIs at the end + + /// updating this class member counter is not going to be thread safe ... m_countTotalRoI++; SG::WriteHandle<TrackCollection> outputTracks(m_outputTracksKey, ctx); @@ -458,8 +419,7 @@ StatusCode TrigFastTrackFinder::findTracks(InDet::SiTrackMakerEventData_xk &trac const TrackCollection* inputTracks, TrackCollection& outputTracks, const EventContext& ctx) const { - - ATH_MSG_DEBUG("Input RoI " << roi); + ATH_MSG_DEBUG( "Input RoI " << roi ); auto mnt_roi_nTracks = Monitored::Scalar<int>("roi_nTracks", 0); auto mnt_roi_nSPs = Monitored::Scalar<int>("roi_nSPs", 0); diff --git a/Trigger/TrigAlgorithms/TrigFastTrackFinder/src/TrigFastTrackFinder.h b/Trigger/TrigAlgorithms/TrigFastTrackFinder/src/TrigFastTrackFinder.h index 3e274babe3523ccf2a416dbb8cea48018928d65d..640bd682c42fc9f81d6074175b6d215581832622 100644 --- a/Trigger/TrigAlgorithms/TrigFastTrackFinder/src/TrigFastTrackFinder.h +++ b/Trigger/TrigAlgorithms/TrigFastTrackFinder/src/TrigFastTrackFinder.h @@ -187,8 +187,6 @@ protected: bool m_doResMonitoring; - bool m_useBeamSpotForRoiZwidth; - // Cuts and settings TrigCombinatorialSettings m_tcs; diff --git a/Trigger/TrigSteer/DecisionHandling/CMakeLists.txt b/Trigger/TrigSteer/DecisionHandling/CMakeLists.txt index 01d72d4b4777e905e6dda9fe274ca2854a59740a..d59aa01e6d28d45bf48d859a6be7b5062af9a483 100644 --- a/Trigger/TrigSteer/DecisionHandling/CMakeLists.txt +++ b/Trigger/TrigSteer/DecisionHandling/CMakeLists.txt @@ -12,7 +12,7 @@ atlas_add_library( DecisionHandlingLib src/InputMakerBase.cxx src/ITestHypoTool.cxx PUBLIC_HEADERS DecisionHandling - LINK_LIBRARIES AthenaBaseComps AthenaMonitoringKernelLib GaudiKernel StoreGateLib TrigCompositeUtilsLib TrigCostMonitorLib TrigSteeringEvent TrigTimeAlgsLib + LINK_LIBRARIES AthenaBaseComps AthenaMonitoringKernelLib GaudiKernel BeamSpotConditionsData StoreGateLib TrigCompositeUtilsLib TrigCostMonitorLib TrigSteeringEvent TrigTimeAlgsLib PRIVATE_LINK_LIBRARIES AthContainers AthViews xAODTrigger ) # Component(s) in the package: @@ -28,7 +28,8 @@ atlas_add_component( DecisionHandling src/TestHypoTool.cxx src/TestHypoAlg.cxx src/PassFilter.cxx - LINK_LIBRARIES DecisionHandlingLib AthenaKernel xAODTrigCalo AthViews xAODTracking xAODJet ) + src/Roi*.cxx + LINK_LIBRARIES DecisionHandlingLib AthenaKernel xAODTrigCalo AthViews xAODTracking xAODJet HLTSeedingLib ) atlas_install_python_modules( python/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} ) #atlas_install_joboptions( share/*.py ) diff --git a/Trigger/TrigSteer/DecisionHandling/DecisionHandling/IRoiUpdaterTool.h b/Trigger/TrigSteer/DecisionHandling/DecisionHandling/IRoiUpdaterTool.h new file mode 100644 index 0000000000000000000000000000000000000000..9dc1a3e851088bb8d4fde0cbe20544a10e6818e6 --- /dev/null +++ b/Trigger/TrigSteer/DecisionHandling/DecisionHandling/IRoiUpdaterTool.h @@ -0,0 +1,35 @@ +/* + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration +*/ + +#ifndef DECISIONHANDLING_IROIUPDATERTOOL_H +#define DECISIONHANDLING_IROIUPDATERTOOL_H + +#include <memory> + +#include "GaudiKernel/IAlgTool.h" +#include "Gaudi/Property.h" +#include "GaudiKernel/StatusCode.h" +#include "TrigSteeringEvent/TrigRoiDescriptor.h" + + + +/** + * @class IRoiUpdaterTool + **/ +class IRoiUpdaterTool : virtual public IAlgTool { + +public: + + DeclareInterfaceID(IRoiUpdaterTool, 1, 0); + + virtual ~IRoiUpdaterTool() = default; + + virtual std::unique_ptr<TrigRoiDescriptor> execute( const IRoiDescriptor* roi, const EventContext& ctx) const = 0; + + virtual std::unique_ptr<TrigRoiDescriptor> execute( const EventContext& ctx ) const = 0; + +}; + +#endif //> !DECISIONHANDLING_IROIUPDATERTOOL_H + diff --git a/Trigger/TrigSteer/DecisionHandling/DecisionHandling/IViewCreatorROITool.h b/Trigger/TrigSteer/DecisionHandling/DecisionHandling/IViewCreatorROITool.h index c4d5876bc78c7534079e1738d58149c7f0772773..7047b4b51b933518283000db7da797e0c9bd4ec5 100644 --- a/Trigger/TrigSteer/DecisionHandling/DecisionHandling/IViewCreatorROITool.h +++ b/Trigger/TrigSteer/DecisionHandling/DecisionHandling/IViewCreatorROITool.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration */ #ifndef VIEWALGS_IVIEWCREATORROITOOL_H @@ -10,6 +10,7 @@ #include "Gaudi/Property.h" #include "TrigCompositeUtils/TrigCompositeUtils.h" + /** * @class IViewCreatorROITool * MT Trigger Tool interface used to determine the correct ROI to spawn an EventView on for a given Decision object. @@ -34,6 +35,7 @@ public: **/ virtual StatusCode attachROILinks(TrigCompositeUtils::DecisionContainer& decisions, const EventContext& ctx) const = 0; + }; #endif //> !VIEWALGS_IVIEWCREATORROITOOL_H diff --git a/Trigger/TrigSteer/DecisionHandling/src/InputMakerForRoI.h b/Trigger/TrigSteer/DecisionHandling/src/InputMakerForRoI.h index 8312eecc1bc41d2dd52c8eb859a7dd84df903686..32f3ea468b6effccf17cc1b6f6167899b7ca1f77 100644 --- a/Trigger/TrigSteer/DecisionHandling/src/InputMakerForRoI.h +++ b/Trigger/TrigSteer/DecisionHandling/src/InputMakerForRoI.h @@ -1,8 +1,8 @@ /* Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ -#ifndef DESICIONHANDLING_INPUTMAKERFORROI_H -#define DESICIONHANDLING_INPUTMAKERFORROI_H +#ifndef DECISIONHANDLING_INPUTMAKERFORROI_H +#define DECISIONHANDLING_INPUTMAKERFORROI_H #include <string> @@ -39,4 +39,4 @@ }; -#endif //> !DESICIONHANDLING_INPUTMAKERFORROI_H +#endif //> !DECISIONHANDLING_INPUTMAKERFORROI_H diff --git a/Trigger/TrigSteer/DecisionHandling/src/ViewCreatorCentredOnClusterROITool.h b/Trigger/TrigSteer/DecisionHandling/src/ViewCreatorCentredOnClusterROITool.h index 0180320d673e52332229c08c7b0e4061ea427718..9a89a444a68f33794cfe3cbc2b70ff0592643e19 100644 --- a/Trigger/TrigSteer/DecisionHandling/src/ViewCreatorCentredOnClusterROITool.h +++ b/Trigger/TrigSteer/DecisionHandling/src/ViewCreatorCentredOnClusterROITool.h @@ -1,9 +1,9 @@ /* -Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration +Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration */ -#ifndef DESICIONHANDLING_VIEWCREATORCENTREDONCLUSTERROITOOL_H -#define DESICIONHANDLING_VIEWCREATORCENTREDONCLUSTERROITOOL_H +#ifndef DECISIONHANDLING_VIEWCREATORCENTREDONCLUSTERROITOOL_H +#define DECISIONHANDLING_VIEWCREATORCENTREDONCLUSTERROITOOL_H #include "AthenaBaseComps/AthAlgTool.h" #include "StoreGate/WriteHandleKey.h" @@ -54,4 +54,4 @@ public: }; -#endif //> !DESICIONHANDLING_VIEWCREATORCENTREDONCLUSTERROITOOL_H +#endif //> !DECISIONHANDLING_VIEWCREATORCENTREDONCLUSTERROITOOL_H diff --git a/Trigger/TrigSteer/DecisionHandling/src/ViewCreatorCentredOnIParticleROITool.h b/Trigger/TrigSteer/DecisionHandling/src/ViewCreatorCentredOnIParticleROITool.h index 799d9808bf21674fb277bb73d2dd5b415f91353c..c21e38423b8caa43bd8690248cb9335940a8e8c3 100755 --- a/Trigger/TrigSteer/DecisionHandling/src/ViewCreatorCentredOnIParticleROITool.h +++ b/Trigger/TrigSteer/DecisionHandling/src/ViewCreatorCentredOnIParticleROITool.h @@ -1,9 +1,9 @@ /* -Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration +Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration */ -#ifndef DESICIONHANDLING_VIEWCREATORCENTREDONIPARTICLEROITOOL_H -#define DESICIONHANDLING_VIEWCREATORCENTREDONIPARTICLEROITOOL_H +#ifndef DECISIONHANDLING_VIEWCREATORCENTREDONIPARTICLEROITOOL_H +#define DECISIONHANDLING_VIEWCREATORCENTREDONIPARTICLEROITOOL_H #include "AthenaBaseComps/AthAlgTool.h" #include "StoreGate/WriteHandleKey.h" @@ -55,4 +55,4 @@ public: }; -#endif //> !DESICIONHANDLING_VIEWCREATORCENTREDONIPARTICLEROITOOL_H +#endif //> !DECISIONHANDLING_VIEWCREATORCENTREDONIPARTICLEROITOOL_H diff --git a/Trigger/TrigSteer/DecisionHandling/src/ViewCreatorCentredOnJetWithPVConstraintROITool.h b/Trigger/TrigSteer/DecisionHandling/src/ViewCreatorCentredOnJetWithPVConstraintROITool.h index da690591ae869a15eb5aaf05bd37a7a23983dfba..26b682152885d005b4332f1fe9195018dd806b14 100644 --- a/Trigger/TrigSteer/DecisionHandling/src/ViewCreatorCentredOnJetWithPVConstraintROITool.h +++ b/Trigger/TrigSteer/DecisionHandling/src/ViewCreatorCentredOnJetWithPVConstraintROITool.h @@ -1,9 +1,9 @@ /* -Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration +Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration */ -#ifndef DESICIONHANDLING_VIEWCREATORCENTREDONJETWITHPVCONSTRAINTROITOOL_H -#define DESICIONHANDLING_VIEWCREATORCENTREDONJETWITHPVCONSTRAINTROITOOL_H +#ifndef DECISIONHANDLING_VIEWCREATORCENTREDONJETWITHPVCONSTRAINTROITOOL_H +#define DECISIONHANDLING_VIEWCREATORCENTREDONJETWITHPVCONSTRAINTROITOOL_H #include "AthenaBaseComps/AthAlgTool.h" #include "StoreGate/WriteHandleKey.h" @@ -62,4 +62,4 @@ public: }; -#endif //> !DESICIONHANDLING_VIEWCREATORCENTREDONJETWITHPVCONSTRAINTROITOOL_H +#endif //> !DECISIONHANDLING_VIEWCREATORCENTREDONJETWITHPVCONSTRAINTROITOOL_H diff --git a/Trigger/TrigSteer/DecisionHandling/src/ViewCreatorFSROITool.cxx b/Trigger/TrigSteer/DecisionHandling/src/ViewCreatorFSROITool.cxx index 96800ef2f92759a7711f21c684ad3ca94a9b8973..d80f2c3c727373cc85472e6f978454ddae130438 100644 --- a/Trigger/TrigSteer/DecisionHandling/src/ViewCreatorFSROITool.cxx +++ b/Trigger/TrigSteer/DecisionHandling/src/ViewCreatorFSROITool.cxx @@ -1,6 +1,6 @@ /* -Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration +Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration */ #include "TrigSteeringEvent/TrigRoiDescriptorCollection.h" @@ -15,18 +15,29 @@ ViewCreatorFSROITool::ViewCreatorFSROITool(const std::string& type, const std::s StatusCode ViewCreatorFSROITool::initialize() { ATH_CHECK( m_roisWriteHandleKey.initialize() ); + + if ( !m_roiupdater.empty() ) ATH_CHECK( m_roiupdater.retrieve() ); + return StatusCode::SUCCESS; } StatusCode ViewCreatorFSROITool::attachROILinks(TrigCompositeUtils::DecisionContainer& decisions, const EventContext& ctx) const { + SG::WriteHandle<TrigRoiDescriptorCollection> roisWriteHandle = createAndStoreNoAux(m_roisWriteHandleKey, ctx); - roisWriteHandle->push_back( new TrigRoiDescriptor(true) ); - const ElementLink<TrigRoiDescriptorCollection> roiEL = ElementLink<TrigRoiDescriptorCollection>(*roisWriteHandle, /*index =*/ 0, ctx); + + if ( m_roiupdater.empty() ) { + roisWriteHandle->push_back( new TrigRoiDescriptor( RoiDescriptor::FULLSCAN ) ); + } + else { + roisWriteHandle->push_back( m_roiupdater->execute( ctx ) ); + } + + const ElementLink<TrigRoiDescriptorCollection> roiEL = ElementLink<TrigRoiDescriptorCollection>( *roisWriteHandle, /*index =*/ 0, ctx ); for ( Decision* outputDecision : decisions ) { - outputDecision->setObjectLink(roiString(), roiEL); + outputDecision->setObjectLink( roiString(), roiEL ); } - return StatusCode::SUCCESS; + return StatusCode::SUCCESS; } diff --git a/Trigger/TrigSteer/DecisionHandling/src/ViewCreatorFSROITool.h b/Trigger/TrigSteer/DecisionHandling/src/ViewCreatorFSROITool.h index 73396ecbd12e8daf27a9b4b74622c915ae09e6b0..288504f86ae5fe134fdda470cc3b20e89df1ec2f 100644 --- a/Trigger/TrigSteer/DecisionHandling/src/ViewCreatorFSROITool.h +++ b/Trigger/TrigSteer/DecisionHandling/src/ViewCreatorFSROITool.h @@ -1,5 +1,5 @@ /* -Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration +Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration */ #ifndef DESICIONHANDLING_VIEWCREATORFSROITOOL_H @@ -8,6 +8,7 @@ Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration #include "AthenaBaseComps/AthAlgTool.h" #include "StoreGate/WriteHandleKey.h" #include "DecisionHandling/IViewCreatorROITool.h" +#include "HLTSeeding/IRoiUpdaterTool.h" #include "TrigSteeringEvent/TrigRoiDescriptorCollection.h" /** @@ -24,7 +25,7 @@ public: virtual ~ViewCreatorFSROITool() = default; - virtual StatusCode initialize() override; + virtual StatusCode initialize() override; /** * @brief Tool interface method. @@ -37,6 +38,8 @@ public: SG::WriteHandleKey< TrigRoiDescriptorCollection > m_roisWriteHandleKey {this,"RoisWriteHandleKey","", "Name of the ROI collection produced by this tool."}; + ToolHandle<IRoiUpdaterTool> m_roiupdater { this, "RoiUpdater", "", "Roi Updater" }; + }; #endif //> !DESICIONHANDLING_VIEWCREATORFSROITOOL_H diff --git a/Trigger/TrigSteer/DecisionHandling/src/ViewCreatorFetchFromViewROITool.h b/Trigger/TrigSteer/DecisionHandling/src/ViewCreatorFetchFromViewROITool.h index a3ae58e43fb1859cce23545a3dd2e294c8c5fabc..9e2e48a56ff80be12caffdd83d2e268c40732188 100644 --- a/Trigger/TrigSteer/DecisionHandling/src/ViewCreatorFetchFromViewROITool.h +++ b/Trigger/TrigSteer/DecisionHandling/src/ViewCreatorFetchFromViewROITool.h @@ -1,9 +1,9 @@ /* -Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration +Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration */ -#ifndef DESICIONHANDLING_VIEWCREATORFETCHFROMVIEWROITOOL_H -#define DESICIONHANDLING_VIEWCREATORFETCHFROMVIEWROITOOL_H +#ifndef DECISIONHANDLING_VIEWCREATORFETCHFROMVIEWROITOOL_H +#define DECISIONHANDLING_VIEWCREATORFETCHFROMVIEWROITOOL_H #include "AthenaBaseComps/AthAlgTool.h" #include "StoreGate/WriteHandleKey.h" @@ -49,4 +49,4 @@ public: std::string m_viewToFetchFromProbe; }; -#endif //> !DESICIONHANDLING_VIEWCREATORFETCHFROMVIEWROITOOL_H +#endif //> !DECISIONHANDLING_VIEWCREATORFETCHFROMVIEWROITOOL_H diff --git a/Trigger/TrigSteer/DecisionHandling/src/ViewCreatorInitialROITool.h b/Trigger/TrigSteer/DecisionHandling/src/ViewCreatorInitialROITool.h index 81f2e35843b09a25ddb3305d80d055286c7cb354..f56d74fdea948565f9fb8c079c6b7f9a7dea3838 100644 --- a/Trigger/TrigSteer/DecisionHandling/src/ViewCreatorInitialROITool.h +++ b/Trigger/TrigSteer/DecisionHandling/src/ViewCreatorInitialROITool.h @@ -1,13 +1,15 @@ /* -Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration +Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration */ -#ifndef DESICIONHANDLING_VIEWCREATORINITIALROITOOL_H -#define DESICIONHANDLING_VIEWCREATORINITIALROITOOL_H +#ifndef DECISIONHANDLING_VIEWCREATORINITIALROITOOL_H +#define DECISIONHANDLING_VIEWCREATORINITIALROITOOL_H #include "AthenaBaseComps/AthAlgTool.h" #include "DecisionHandling/IViewCreatorROITool.h" +#include "HLTSeeding/IRoiUpdaterTool.h" + /** * @class ViewCreatorInitialROITool * Basic ROI provider tool which retrieves and re-attaches an existing "initialRoI" ElementLink. @@ -30,6 +32,7 @@ public: **/ virtual StatusCode attachROILinks(TrigCompositeUtils::DecisionContainer& decisions, const EventContext& ctx) const override; + ToolHandle<IRoiUpdaterTool> m_roiupdater { this, "RoiUpdater", "", "Roi Updater" }; }; -#endif //> !DESICIONHANDLING_VIEWCREATORINITIALROITOOL_H +#endif //> !DECISIONHANDLING_VIEWCREATORINITIALROITOOL_H diff --git a/Trigger/TrigSteer/DecisionHandling/src/ViewCreatorNamedROITool.h b/Trigger/TrigSteer/DecisionHandling/src/ViewCreatorNamedROITool.h index 1bc3c37da151255f3da9cb3ba730fef5b5732ddf..5432a592526f660c3d6cec092413c19be64ebf72 100644 --- a/Trigger/TrigSteer/DecisionHandling/src/ViewCreatorNamedROITool.h +++ b/Trigger/TrigSteer/DecisionHandling/src/ViewCreatorNamedROITool.h @@ -1,9 +1,9 @@ /* -Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration +Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration */ -#ifndef DESICIONHANDLING_VIEWCREATORNAMEDROITOOL_H -#define DESICIONHANDLING_VIEWCREATORNAMEDROITOOL_H +#ifndef DECISIONHANDLING_VIEWCREATORNAMEDROITOOL_H +#define DECISIONHANDLING_VIEWCREATORNAMEDROITOOL_H #include "AthenaBaseComps/AthAlgTool.h" #include "DecisionHandling/IViewCreatorROITool.h" @@ -32,4 +32,4 @@ public: }; -#endif //> !DESICIONHANDLING_VIEWCREATORNAMEDROITOOL_H +#endif //> !DECISIONHANDLING_VIEWCREATORNAMEDROITOOL_H diff --git a/Trigger/TrigSteer/DecisionHandling/src/ViewCreatorPreviousROITool.h b/Trigger/TrigSteer/DecisionHandling/src/ViewCreatorPreviousROITool.h index f1549e10a76301611abb2a94bfd0f5633aeb3b10..f0abe88affc7f3a33b1bd5b8d4ea95d43810404f 100644 --- a/Trigger/TrigSteer/DecisionHandling/src/ViewCreatorPreviousROITool.h +++ b/Trigger/TrigSteer/DecisionHandling/src/ViewCreatorPreviousROITool.h @@ -1,9 +1,9 @@ /* -Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration +Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration */ -#ifndef DESICIONHANDLING_VIEWCREATORPREVIOUSROITOOL_H -#define DESICIONHANDLING_VIEWCREATORPREVIOUSROITOOL_H +#ifndef DECISIONHANDLING_VIEWCREATORPREVIOUSROITOOL_H +#define DECISIONHANDLING_VIEWCREATORPREVIOUSROITOOL_H #include "AthenaBaseComps/AthAlgTool.h" #include "DecisionHandling/IViewCreatorROITool.h" @@ -37,4 +37,4 @@ public: }; -#endif //> !DESICIONHANDLING_VIEWCREATORPREVIOUSROITOOL_H +#endif //> !DECISIONHANDLING_VIEWCREATORPREVIOUSROITOOL_H diff --git a/Trigger/TrigSteer/HLTSeeding/CMakeLists.txt b/Trigger/TrigSteer/HLTSeeding/CMakeLists.txt index a0d857ddb2966acb1df0c3b5cf17dda9fd62aa6e..a0847761668c3c4b78b62bdd818c4a4849ba43b5 100644 --- a/Trigger/TrigSteer/HLTSeeding/CMakeLists.txt +++ b/Trigger/TrigSteer/HLTSeeding/CMakeLists.txt @@ -11,13 +11,13 @@ find_package( CLHEP ) atlas_add_library( HLTSeedingLib PUBLIC_HEADERS HLTSeeding INTERFACE - LINK_LIBRARIES AthenaBaseComps GaudiKernel StoreGateLib TrigCompositeUtilsLib TrigConfData ) + LINK_LIBRARIES AthenaBaseComps GaudiKernel StoreGateLib TrigCompositeUtilsLib TrigConfData BeamSpotConditionsData ) atlas_add_component( HLTSeeding src/*.cxx src/components/*.cxx - INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} + INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} LINK_LIBRARIES ${Boost_LIBRARIES} ${CLHEP_LIBRARIES} AthenaKernel AthenaMonitoringKernelLib - GaudiKernel HLTSeedingLib L1TopoAlgorithms StoreGateLib TrigCompositeUtilsLib TrigConfxAODLib TrigCostMonitorLib + GaudiKernel L1TopoAlgorithms HLTSeedingLib StoreGateLib TrigCompositeUtilsLib TrigConfxAODLib TrigCostMonitorLib TrigSteeringEvent TrigT1Interfaces TrigT1Result TrigTimeAlgsLib xAODEventInfo xAODTrigger xAODCore ) # Install files from the package: diff --git a/Trigger/TrigSteer/HLTSeeding/HLTSeeding/IRoiUpdaterTool.h b/Trigger/TrigSteer/HLTSeeding/HLTSeeding/IRoiUpdaterTool.h new file mode 100644 index 0000000000000000000000000000000000000000..9dc1a3e851088bb8d4fde0cbe20544a10e6818e6 --- /dev/null +++ b/Trigger/TrigSteer/HLTSeeding/HLTSeeding/IRoiUpdaterTool.h @@ -0,0 +1,35 @@ +/* + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration +*/ + +#ifndef DECISIONHANDLING_IROIUPDATERTOOL_H +#define DECISIONHANDLING_IROIUPDATERTOOL_H + +#include <memory> + +#include "GaudiKernel/IAlgTool.h" +#include "Gaudi/Property.h" +#include "GaudiKernel/StatusCode.h" +#include "TrigSteeringEvent/TrigRoiDescriptor.h" + + + +/** + * @class IRoiUpdaterTool + **/ +class IRoiUpdaterTool : virtual public IAlgTool { + +public: + + DeclareInterfaceID(IRoiUpdaterTool, 1, 0); + + virtual ~IRoiUpdaterTool() = default; + + virtual std::unique_ptr<TrigRoiDescriptor> execute( const IRoiDescriptor* roi, const EventContext& ctx) const = 0; + + virtual std::unique_ptr<TrigRoiDescriptor> execute( const EventContext& ctx ) const = 0; + +}; + +#endif //> !DECISIONHANDLING_IROIUPDATERTOOL_H + diff --git a/Trigger/TrigSteer/HLTSeeding/python/HLTSeedingConfig.py b/Trigger/TrigSteer/HLTSeeding/python/HLTSeedingConfig.py index 30eb36820c84d40816f948327c555825d0a45eb2..ef1ef0b7dc5c69df739fc76c2fccef107530c01f 100644 --- a/Trigger/TrigSteer/HLTSeeding/python/HLTSeedingConfig.py +++ b/Trigger/TrigSteer/HLTSeeding/python/HLTSeedingConfig.py @@ -277,8 +277,12 @@ class HLTSeeding(CompFactory.HLTSeeding) : self.ctpUnpacker = ctpUnpacker from TrigEDMConfig.TriggerEDMRun3 import recordable + + # needs to be set up such that the Roiupdater is set to false by default + self.RoIBRoIUnpackers += [ CompFactory.FSRoIsUnpackingTool("FSRoIsUnpackingTool", + RoiUpdater=None, Decisions=mapThresholdToL1DecisionCollection("FSNOSEED"), OutputTrigRoIs = recordable(mapThresholdToL1RoICollection("FSNOSEED") )) ] # EM unpacker diff --git a/Trigger/TrigSteer/HLTSeeding/src/FSRoIsUnpackingTool.cxx b/Trigger/TrigSteer/HLTSeeding/src/FSRoIsUnpackingTool.cxx index 3aa7ff929c7662d98b73d42759ec691faf9f0443..f83febc075a0d05341f42e3e503b29cfb371a21d 100644 --- a/Trigger/TrigSteer/HLTSeeding/src/FSRoIsUnpackingTool.cxx +++ b/Trigger/TrigSteer/HLTSeeding/src/FSRoIsUnpackingTool.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration */ #include "FSRoIsUnpackingTool.h" @@ -9,7 +9,8 @@ FSRoIsUnpackingTool::FSRoIsUnpackingTool(const std::string& type, const std::string& name, const IInterface* parent) - : RoIsUnpackingToolBase(type, name, parent) {} + : RoIsUnpackingToolBase(type, name, parent) { +} StatusCode FSRoIsUnpackingTool::initialize() { @@ -29,6 +30,9 @@ StatusCode FSRoIsUnpackingTool::start() { m_allFSChains.insert( thresholdToChain.second.begin(), thresholdToChain.second.end() ); } + /// shouldn;t this be protected by an output level check ? + /// hopefully the optimisation will remove the loop if the + /// ATH_MSG_DEBUG gets compiled out for ( auto id: m_allFSChains ) { ATH_MSG_DEBUG( "FS Chain " << id ); } @@ -61,7 +65,13 @@ StatusCode FSRoIsUnpackingTool::unpack(const EventContext& ctx, auto roiHandle = SG::makeHandle( m_trigRoIsKey, ctx ); ATH_CHECK(roiHandle.record( std::make_unique<TrigRoiDescriptorCollection>() )); - roiHandle->push_back( std::make_unique<TrigRoiDescriptor>(true) ); // true == FS + /// + if ( !m_roiupdater.empty() ) { + roiHandle->push_back( m_roiupdater->execute(ctx) ); + } + else { + roiHandle->push_back( std::make_unique<TrigRoiDescriptor>( RoiDescriptor::FULLSCAN ) ); + } ATH_MSG_DEBUG("Linking to FS RoI descriptor"); decision->setObjectLink( initialRoIString(), ElementLink<TrigRoiDescriptorCollection>( m_trigRoIsKey.key(), 0 ) ); diff --git a/Trigger/TrigSteer/HLTSeeding/src/RoIsUnpackingToolBase.cxx b/Trigger/TrigSteer/HLTSeeding/src/RoIsUnpackingToolBase.cxx index 215570a4a41721fa06ba2610c50f7b02af455e79..b74a8dba84eaaaa0f979fd745ecfc6daf2d380b4 100644 --- a/Trigger/TrigSteer/HLTSeeding/src/RoIsUnpackingToolBase.cxx +++ b/Trigger/TrigSteer/HLTSeeding/src/RoIsUnpackingToolBase.cxx @@ -14,7 +14,12 @@ RoIsUnpackingToolBase::RoIsUnpackingToolBase(const std::string& type, StatusCode RoIsUnpackingToolBase::initialize() { - if ( !m_monTool.empty() ) {ATH_CHECK( m_monTool.retrieve() );} + + if ( !m_monTool.empty() ) ATH_CHECK( m_monTool.retrieve() ); + /// should this really be here if it is only accessed in + /// derived classes ? + if ( !m_roiupdater.empty() ) ATH_CHECK( m_roiupdater.retrieve() ); + ATH_CHECK( m_decisionsKey.initialize() ); ATH_CHECK( m_decisionsKeyProbe.initialize(SG::AllowEmpty) ); ATH_CHECK( m_trigRoIsKey.initialize(SG::AllowEmpty) ); diff --git a/Trigger/TrigSteer/HLTSeeding/src/RoIsUnpackingToolBase.h b/Trigger/TrigSteer/HLTSeeding/src/RoIsUnpackingToolBase.h index d6550ea948a1952fd04178a3d6b6b9c90f3ffa6b..0c81e025d5f325859159221df6639fdcfbeea595 100644 --- a/Trigger/TrigSteer/HLTSeeding/src/RoIsUnpackingToolBase.h +++ b/Trigger/TrigSteer/HLTSeeding/src/RoIsUnpackingToolBase.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration */ #ifndef HLTSEEDING_ROISUNPACKINGTOOLBASE_H #define HLTSEEDING_ROISUNPACKINGTOOLBASE_H @@ -16,6 +16,9 @@ #include "AthenaBaseComps/AthAlgTool.h" #include "AthenaMonitoringKernel/GenericMonitoringTool.h" +#include "HLTSeeding/IRoiUpdaterTool.h" + + namespace ROIB { class RoIBResult; } @@ -61,8 +64,8 @@ protected: this, "HLTTriggerMenu", "DetectorStore+HLTTriggerMenu", "Name of the HLTMenu object to read configuration from"}; /// @} - ToolHandle<GenericMonitoringTool> m_monTool{ - this, "MonTool", "", "Monitoring tool"}; + ToolHandle<GenericMonitoringTool> m_monTool{ this, "MonTool", "", "Monitoring tool" }; + ToolHandle<IRoiUpdaterTool> m_roiupdater{ this, "RoiUpdater", "", "Roi Updater" }; std::map<HLT::Identifier, HLT::IDVec> m_thresholdToChainMapping; std::map<HLT::Identifier, HLT::Identifier> m_legToChainMapping; diff --git a/Trigger/TrigSteer/HLTSeeding/src/RoiUpdaterTool.cxx b/Trigger/TrigSteer/HLTSeeding/src/RoiUpdaterTool.cxx new file mode 100644 index 0000000000000000000000000000000000000000..c7118b7212f03fb93938b6a5e98f15e39e9270b5 --- /dev/null +++ b/Trigger/TrigSteer/HLTSeeding/src/RoiUpdaterTool.cxx @@ -0,0 +1,127 @@ + +/* +Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration +*/ + +#include "TrigSteeringEvent/TrigRoiDescriptorCollection.h" +#include "RoiUpdaterTool.h" + + + +RoiUpdaterTool::RoiUpdaterTool(const std::string& type, const std::string& name, const IInterface* parent) + : base_class(type, name, parent), m_update(false) +{} + + + +StatusCode RoiUpdaterTool::initialize() { + + ATH_MSG_DEBUG("initialize()"); + + if ( m_etaWidth!=-999 || m_phiWidth!=-999 || m_zedWidth!=-999 ) m_update = true; + + if ( m_useBeamspot ) { + m_update = true; + ATH_CHECK( m_beamspotKey.initialize( m_useBeamspot ) ); + } + + return StatusCode::SUCCESS; +} + + + +void zrange( double nsigma, double fence, double& zed, double& zedMinus, double& zedPlus, const SG::ReadCondHandleKey<InDet::BeamSpotData>& bs, const EventContext& ctx ) { + + SG::ReadCondHandle<InDet::BeamSpotData> beamSpotHandle( bs, ctx ); + + uint32_t bitmap = beamSpotHandle->beamStatus(); + + /// 0x4 is the online flag - 0x7 is presumably converged online + if ( ( (bitmap & 0x7) == 0x7 ) || !(bitmap & 0x4) ) { + double zsigma = beamSpotHandle->beamSigma(2); + double zpos = beamSpotHandle->beamPos()[2]; + + zed = zpos; /// technically, updating the z position itself should not be needed + zedMinus = zpos - nsigma*zsigma - fence; + zedPlus = zpos + nsigma*zsigma + fence; + } + else { + zedMinus = -RoiDescriptor::zedWidthDefault(); + zedPlus = RoiDescriptor::zedWidthDefault(); + } + +} + + + + +std::unique_ptr<TrigRoiDescriptor> RoiUpdaterTool::execute( const EventContext& ctx ) const { + /// create initial dummy FS Roi here - used to define the new Roi and is then discarded + RoiDescriptor troi( RoiDescriptor::FULLSCAN ); + return execute( &troi, ctx ); +} + + +std::unique_ptr<TrigRoiDescriptor> RoiUpdaterTool::execute( const IRoiDescriptor* iroi, const EventContext& ctx ) const { + + ATH_MSG_DEBUG( "execute()" ); + + /// if we don't want to update, why are we even including trhe RoiUIpdater ??? + /// will return a unique_ptr - if that causes issues down the line, so be it + if ( !m_update ) return std::make_unique<TrigRoiDescriptor>( *iroi ); + + /// should not update a composite Roi - or do we want the constituents updated ??? + /// or what ??? Return a copy ? Who will own this stuff ?? + /// why are you calling the updater on a composite Roi in any case ? + /// will return a unique_ptr - if that causes issues down the line, so be it + if ( iroi->composite() ) { + ATH_MSG_WARNING( "Will not update composite Roi parameters: " << *iroi ); + return std::make_unique<TrigRoiDescriptor>( *iroi ); + } + + double eta = iroi->eta(); + double etaMinus = iroi->etaMinus(); + double etaPlus = iroi->etaPlus(); + + double phi = iroi->phi(); + double phiMinus = iroi->phiMinus(); + double phiPlus = iroi->phiPlus(); + + double zed = iroi->zed(); + double zedMinus = iroi->zedMinus(); + double zedPlus = iroi->zedPlus(); + + if ( m_etaWidth!=-999 ) { + etaMinus = eta - m_etaWidth; + etaPlus = eta + m_etaWidth; + } + + if ( m_phiWidth!=-999 ) { + /// NB: the correct mapping of phi to the range -M_PIF < phi < M_PIF is + /// done in the RoiDescriptor constuctor so we don't bother here + phiMinus = phi - m_phiWidth; + phiPlus = phi + m_phiWidth; + } + + if ( m_zedWidth!=-999 ) { + zedMinus = zed - m_zedWidth; + zedPlus = zed + m_zedWidth; + } + + /// do *not* prevent the beamspot from *increasing* the size of the Roi + if ( m_useBeamspot ) zrange( m_nsigma, m_fence, zed, zedMinus, zedPlus, m_beamspotKey, ctx ); + + /// limit to old range - no point going well outside the interaction region + if ( zedMinus<-RoiDescriptor::zedWidthDefault() ) zedMinus = -RoiDescriptor::zedWidthDefault(); + if ( zedPlus> RoiDescriptor::zedWidthDefault() ) zedPlus = RoiDescriptor::zedWidthDefault(); + + /// don't use an actual fullscan Roi, since the parameters have been changed so may not actually + /// include all detector elements - the FS flag, prevents the RegionSelector from actually testing + /// the detector element containment, so could create a "fullscan" Roi with only a small number of + /// detector elements. If you want genuine FS behaviour for the RS, use an FS Roi. If you want + /// a restricted Roi for non RS use, even if it is FS for a specific subdetector, use a restricted + /// Roi + return std::make_unique<TrigRoiDescriptor>( eta, etaMinus, etaPlus, phi, phiMinus, phiPlus, zed, zedMinus, zedPlus ); + +} + diff --git a/Trigger/TrigSteer/HLTSeeding/src/RoiUpdaterTool.h b/Trigger/TrigSteer/HLTSeeding/src/RoiUpdaterTool.h new file mode 100644 index 0000000000000000000000000000000000000000..344aa366227b4c427d5edeff28b3c6e2231c3163 --- /dev/null +++ b/Trigger/TrigSteer/HLTSeeding/src/RoiUpdaterTool.h @@ -0,0 +1,55 @@ +/* +Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration +*/ + +#ifndef DECISIONHANDLING_ROIUPDATERTOOL_H +#define DECISIONHANDLING_ROIUPDATERTOOL_H + +#include "AthenaBaseComps/AthAlgTool.h" + +#include "TrigSteeringEvent/TrigRoiDescriptorCollection.h" +#include "BeamSpotConditionsData/BeamSpotData.h" +#include "StoreGate/ReadCondHandleKey.h" +#include "HLTSeeding/IRoiUpdaterTool.h" + +/** + * @class RoiUpdaterTool + * Tool to create a new RoiDescriptor from an existing input5 RoiDescriptor + * + + **/ +class RoiUpdaterTool: public extends<AthAlgTool, IRoiUpdaterTool> +{ +public: + + RoiUpdaterTool(const std::string& type, const std::string& name, const IInterface* parent); + + virtual ~RoiUpdaterTool() = default; + + virtual StatusCode initialize() override; + + std::unique_ptr<TrigRoiDescriptor> execute( const EventContext& ctx ) const override; + + std::unique_ptr<TrigRoiDescriptor> execute( const IRoiDescriptor* iroi, const EventContext& ctx ) const override; + + /// whether to update the RoiDescritor or not - determiuned from whether any of + /// update parameters are set + bool m_update; + + /** + * don't want these parameters used if not set + **/ + Gaudi::Property<double> m_etaWidth { this, "EtaWidth", -999, "FS Roi eta half width" }; + Gaudi::Property<double> m_phiWidth { this, "PhiWidth", -999, "FS Roi phi half width" }; + Gaudi::Property<double> m_zedWidth { this, "ZedWidth", -999, "FS Roi zed half width" }; + + Gaudi::Property<bool> m_useBeamspot { this, "useBeamSpot", false, "use beamspot for zed width" }; + /// default settings - should be retuned with data + Gaudi::Property<double> m_nsigma { this, "NSigma", 3, "width (in simga) for the beamspot Roi width" }; + Gaudi::Property<double> m_fence { this, "Fance", 10, "fence width for the beamspot Roi width" }; /// do we need an mm unit here ? + + SG::ReadCondHandleKey<InDet::BeamSpotData> m_beamspotKey { this, "BeamSpotKey", "BeamSpotData", "SG key for beam spot" }; + +}; + +#endif //> !DECISIONHANDLING_ROIUPDATERTOOL_H diff --git a/Trigger/TrigSteer/HLTSeeding/src/components/HLTSeeding_entries.cxx b/Trigger/TrigSteer/HLTSeeding/src/components/HLTSeeding_entries.cxx index 8a4573cc0abce9fa58531091ee2c06856a3d7c28..08169851a450bac53f410e40ec6d5a3c0b40c477 100644 --- a/Trigger/TrigSteer/HLTSeeding/src/components/HLTSeeding_entries.cxx +++ b/Trigger/TrigSteer/HLTSeeding/src/components/HLTSeeding_entries.cxx @@ -25,6 +25,8 @@ #include "../L1TriggerResultMaker.h" #include "../L1DataConsistencyChecker.h" +#include "../RoiUpdaterTool.h" + // Algorithms DECLARE_COMPONENT( HLTSeeding ) DECLARE_COMPONENT( HLTSeedingNoCtpForTesting ) @@ -72,3 +74,5 @@ DECLARE_COMPONENT( RoIsUnpackingToolBase ) DECLARE_COMPONENT( RoIsUnpackingEmulationTool ) DECLARE_COMPONENT( FSRoIsUnpackingTool ) DECLARE_COMPONENT( L1DataConsistencyChecker ) + +DECLARE_COMPONENT( RoiUpdaterTool ) diff --git a/Trigger/TrigTools/TrigInDetConfig/python/ConfigSettingsBase.py b/Trigger/TrigTools/TrigInDetConfig/python/ConfigSettingsBase.py index 02890db38a364e6326e514342c55a16ddb877386..89d14267d474d796f2ce3e6e5c1d30047f34c6e4 100644 --- a/Trigger/TrigTools/TrigInDetConfig/python/ConfigSettingsBase.py +++ b/Trigger/TrigTools/TrigInDetConfig/python/ConfigSettingsBase.py @@ -63,7 +63,9 @@ class _ConfigSettingsBase() : self._doHitDV = False self._doDisappearingTrk = False self._usePixelNN = False - self._useBeamSpotForRoiZwidth = False + self._useDynamicRoiZWidth = False + + #precision tracking configuration values self._maxRPhiImpactPT = None self._maxZImpactPT = None @@ -381,10 +383,9 @@ class _ConfigSettingsBase() : def minTRTonTrk(self): return self._minTRTonTrkPT - @property - def useBeamSpotForRoiZwidth(self): - return self._useBeamSpotForRoiZwidth + def useDynamicRoiZWidth(self): + return self._useDynamicRoiZWidth @property def useSiSPSeededTrackFinder(self): @@ -423,10 +424,8 @@ class _ConfigSettingsBase() : log.info( " LRTHardPtmin : %s", self._LRTHardPtMin ) log.info( " doHitDV : %s", self._doHitDV ) log.info( " nClustersMin : %s", self._nClustersMin ) - log.info( " useBremModel : %s", self._useBremModel ) log.info( " suffix : %s", self._suffix ) - log.info( " record : %s", self._record ) - log.info( " Roi : %s", self._Roi ) + log.info( " roi : %s", self._roi ) log.info( " addSingleTrackVertices: %s", self._addSingleTrackVertices ) log.info( " maxRPhiImpact : %s", self._maxRPhiImpactPT ) log.info( " maxZImpact : %s", self._maxZImpactPT ) @@ -439,5 +438,9 @@ class _ConfigSettingsBase() : log.info( " useSCT : %s", self._useSCTPT ) log.info( " doEmCaloSeed : %s", self._doEmCaloSeedPT ) log.info( " minTRTonTrk : %s", self._minTRTonTrkPT ) - log.info( " BeamSpotForRoiZwidth : %s", self._useBeamSpotForRoiZwidth ) + log.info( " useDynamicRoiZWidth : %s", self._useDynamicRoiZWidth ) log.info( " useSiSPSeededTrackFinder : %s", self._useSiSPSeededTrackFinder ) + +if __name__=='__main__': + config = _ConfigSettingsBase() + config.printout() diff --git a/Trigger/TriggerCommon/TrigEDMConfig/python/TriggerEDMRun3.py b/Trigger/TriggerCommon/TrigEDMConfig/python/TriggerEDMRun3.py index c1b622f0cd41938e3cc1d06b23b64bac71b47a2b..88a452e44928f0ab2647a96be4b029a6971ecdb6 100644 --- a/Trigger/TriggerCommon/TrigEDMConfig/python/TriggerEDMRun3.py +++ b/Trigger/TriggerCommon/TrigEDMConfig/python/TriggerEDMRun3.py @@ -862,14 +862,17 @@ TriggerHLTListRun3 = [ ('TrigRoiDescriptorCollection#HLT_Roi_Bjet', 'BS ESD AODFULL', 'Bjet'), - # jet superRoI Descriptor and associated track and vertex class used for EventView creation + # jet superRoI Descriptor and associated track and vertex class used for EventView creation + ('TrigRoiDescriptorCollection#HLT_Roi_FS', 'BS ESD AODFULL', 'Jet'), ('TrigRoiDescriptorCollection#HLT_Roi_JetSuper', 'BS ESD AODFULL', 'Jet'), + ('xAOD::TrackParticleContainer#HLT_IDTrack_JetSuper_FTF', 'BS ESD AODFULL', 'Jet', 'inViews:JetSuperRoIViews'), ('xAOD::TrackParticleAuxContainer#HLT_IDTrack_JetSuper_FTFAux.', 'BS ESD AODFULL', 'Jet'), + # bjet Second Stage Fast tracks ('xAOD::TrackParticleContainer#HLT_IDTrack_Bjet_FTF', 'BS ESD AODFULL', 'Bjet', 'inViews:'+BTagViewsEMTopo+','+BTagViewsEMPFlow), ('xAOD::TrackParticleAuxContainer#HLT_IDTrack_Bjet_FTFAux.', 'BS ESD AODFULL', 'Bjet'), diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLT/CommonSequences/FullScanDefs.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLT/CommonSequences/FullScanDefs.py index 18fa0685eddfe662b60d78e1f2d4d365f5c0c3a1..2d538bb0b83308aed2f7b14c9ff38e83f39f5e57 100644 --- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLT/CommonSequences/FullScanDefs.py +++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLT/CommonSequences/FullScanDefs.py @@ -4,11 +4,15 @@ # RoI used for the full-scan calorimeter step caloFSRoI = "FSJETMETCaloRoI" + # RoI used for the full-scan tracking step trkFSRoI = "FSJETMETTrkRoI" + # Name of the fullscan cells fs_cells = "CaloCellsFS" + # Name of the fullscan EM clusters em_clusters = "HLT_TopoCaloClustersFS" + # Name of the fullscan LC clusters -lc_clusters = "HLT_TopoCaloClustersLCFS" \ No newline at end of file +lc_clusters = "HLT_TopoCaloClustersLCFS" diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLT/Jet/JetMenuSequences.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLT/Jet/JetMenuSequences.py index 94cf99e9ea0493b93e2f5eaccb9fd4786fcbc8b8..10dbb633125d983ac5e5f53d1fc7215edee20197 100644 --- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLT/Jet/JetMenuSequences.py +++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLT/Jet/JetMenuSequences.py @@ -40,11 +40,31 @@ def getCaloInputMaker(): # Used for chains that use tracking def getTrackingInputMaker(trkopt): if trkopt=="ftf": - InputMakerAlg = conf2toConfigurable(CompFactory.InputMakerForRoI( - "IM_Jet_TrackingStep", - mergeUsingFeature = False, - RoITool = conf2toConfigurable(CompFactory.ViewCreatorInitialROITool()), - RoIs = trkFSRoI)) + + IDTrigConfig = getInDetTrigConfig( 'jet' ) + + log.info( "jet FS tracking: useDynamicRoiZWidth: %s", str(IDTrigConfig.useDynamicRoiZWidth) ) + + roiUpdater = None + if IDTrigConfig.useDynamicRoiZWidth: + roiUpdater = CompFactory.RoiUpdaterTool( useBeamSpot=True ) + + log.info( roiUpdater ) + + InputMakerAlg = conf2toConfigurable(CompFactory.InputMakerForRoI( "IM_Jet_TrackingStep", + mergeUsingFeature = False, + RoITool = conf2toConfigurable( CompFactory.ViewCreatorFSROITool( name="RoiTool_FS", + RoiUpdater=roiUpdater, + RoisWriteHandleKey=recordable( IDTrigConfig.roi ) ) ), + RoIs = trkFSRoI ) ) + else: + InputMakerAlg = conf2toConfigurable( CompFactory.InputMakerForRoI( "IM_Jet_TrackingStep", + mergeUsingFeature = False, + RoITool = conf2toConfigurable(CompFactory.ViewCreatorInitialROITool()), + RoIs = trkFSRoI) ) + + + elif trkopt=="roiftf": IDTrigConfig = getInDetTrigConfig( 'jetSuper' ) InputMakerAlg = EventViewCreatorAlgorithm(