ATLAS Offline Software
ComboHypo.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3 */
4 #ifndef DECISIONHANDLING_COMBOHYPO_H
5 #define DECISIONHANDLING_COMBOHYPO_H
6 
7 // Framework includes
11 
12 // STL includes
13 #include <string>
14 #include <utility>
16 
32  public:
33  ComboHypo(const std::string& name, ISvcLocator* pSvcLocator);
34  virtual ~ComboHypo() override;
35 
36  virtual StatusCode initialize() override;
37  virtual StatusCode execute(const EventContext& context) const override;
38 
39 
40  protected:
45  ToolHandleArray<ComboHypoToolBase>& hypoTools() { return m_hypoTools; }
46  const ToolHandleArray<ComboHypoToolBase>& hypoTools() const { return m_hypoTools; }
47 
48  private:
49 
50  SG::ReadHandleKeyArray<TrigCompositeUtils::DecisionContainer> m_inputs { this, "HypoInputDecisions", {}, "Input Decisions" };
51  SG::WriteHandleKeyArray<TrigCompositeUtils::DecisionContainer> m_outputs { this, "HypoOutputDecisions", {}, "Output Decisions" };
52 
53  Gaudi::Property<bool> m_requireUniqueROI {this, "RequireUniqueROI", false,
54  "Require each Feature in each leg of the combination to come from a unique L1 seeding ROI."};
55 
56  Gaudi::Property< Combo::MultiplicityReqMap > m_multiplicitiesReqMap{this, "MultiplicitiesMap", {},
57  "Map from the chain name to multiplicities required at each input",
58  "mapMergeNoReplace<std::string, std::vector<int>>"};
59 
60  Gaudi::Property< Combo::LegMap > m_legToInputCollectionMap{this, "LegToInputCollectionMap", {},
61  "Map from the chain name to the per-leg index in this algorithm's ReadHandleKeyArray which should be used as the source of incoming Decision Objects on the leg.",
62  "mapMergeNoReplace<std::string, std::vector<int>>"};
63 
64  Gaudi::Property<bool> m_checkMultiplicityMap { this, "CheckMultiplicityMap", true,
65  "Perform a consistency check of the MultiplicitiesMap"};
66 
72  StatusCode copyDecisions( const Combo::LegDecisionsMap & passingLegs, const EventContext& context ) const;
73 
74 
92  SG::sgkey_t& featureKey,
94  SG::sgkey_t& roiKey,
96  bool& roiFullscan,
97  bool& objectRequestsNoMultiplicityCheck,
98  SG::SGKeyMap<std::set<uint32_t>>& priorFeaturesMap) const;
99 
104  StatusCode fillDecisionsMap( Combo::LegDecisionsMap& dmap, const EventContext& context) const;
105 
106  ToolHandleArray< ComboHypoToolBase > m_hypoTools {this, "ComboHypoTools", {}, "Tools to perform selection"};
107 
108 };
109 
110 
111 #endif // DECISIONHANDLING_COMBOHYPO_H
ComboHypo::m_multiplicitiesReqMap
Gaudi::Property< Combo::MultiplicityReqMap > m_multiplicitiesReqMap
Definition: ComboHypo.h:56
ComboHypo::extractFeatureAndRoI
StatusCode extractFeatureAndRoI(const HLT::Identifier &chainLegId, const ElementLink< TrigCompositeUtils::DecisionContainer > &EL, SG::sgkey_t &featureKey, TrigCompositeUtils::Decision::index_type &featureIndex, SG::sgkey_t &roiKey, TrigCompositeUtils::Decision::index_type &roiIndex, bool &roiFullscan, bool &objectRequestsNoMultiplicityCheck, SG::SGKeyMap< std::set< uint32_t >> &priorFeaturesMap) const
For a given Decision node from a HypoAlg, extracts type-less identification data on the node's Featur...
Definition: ComboHypo.cxx:380
Combo::MultiplicityReqMap
std::map< std::string, std::vector< int > > MultiplicityReqMap
Map from the chain name to the multiplicities required at each input.
Definition: IComboHypoTool.h:17
ComboHypo::copyDecisions
StatusCode copyDecisions(const Combo::LegDecisionsMap &passingLegs, const EventContext &context) const
iterates over the inputs and for every object (no filtering) crates output object linked to input mov...
Definition: ComboHypo.cxx:86
ComboHypo::decisionsOutput
const SG::WriteHandleKeyArray< TrigCompositeUtils::DecisionContainer > & decisionsOutput() const
Definition: ComboHypo.h:42
TrigCompositeUtils.h
ComboHypo::fillDecisionsMap
StatusCode fillDecisionsMap(Combo::LegDecisionsMap &dmap, const EventContext &context) const
iterates over all inputs, associating inputs to legs
Definition: ComboHypo.cxx:464
SG::HandleKeyArray
Definition: StoreGate/StoreGate/HandleKeyArray.h:38
Combo::LegDecisionsMap
std::map< TrigCompositeUtils::DecisionID, std::vector< ElementLink< TrigCompositeUtils::DecisionContainer > > > LegDecisionsMap
LegDecisionsMap For a given chain leg key, this map holds all Decision Objects which are active on th...
Definition: IComboHypoTool.h:28
ComboHypo
Definition: ComboHypo.h:31
AthReentrantAlgorithm
An algorithm that can be simultaneously executed in multiple threads.
Definition: AthReentrantAlgorithm.h:83
ComboHypo::ComboHypo
ComboHypo(const std::string &name, ISvcLocator *pSvcLocator)
Definition: ComboHypo.cxx:13
ComboHypo::m_requireUniqueROI
Gaudi::Property< bool > m_requireUniqueROI
Definition: ComboHypo.h:53
ComboHypo::hypoTools
ToolHandleArray< ComboHypoToolBase > & hypoTools()
Definition: ComboHypo.h:45
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ComboHypo::execute
virtual StatusCode execute(const EventContext &context) const override
Definition: ComboHypo.cxx:152
ComboHypo::~ComboHypo
virtual ~ComboHypo() override
Definition: ComboHypo.cxx:18
ComboHypo::m_hypoTools
ToolHandleArray< ComboHypoToolBase > m_hypoTools
Definition: ComboHypo.h:106
EL
This module defines the arguments passed from the BATCH driver to the BATCH worker.
Definition: AlgorithmWorkerData.h:24
ComboHypo::triggerMultiplicityMap
const Combo::MultiplicityReqMap & triggerMultiplicityMap() const
Definition: ComboHypo.h:43
ComboHypo::m_outputs
SG::WriteHandleKeyArray< TrigCompositeUtils::DecisionContainer > m_outputs
Definition: ComboHypo.h:51
HLT::Identifier
Definition: TrigCompositeUtils/TrigCompositeUtils/HLTIdentifier.h:20
AthReentrantAlgorithm.h
ComboHypo::initialize
virtual StatusCode initialize() override
Definition: ComboHypo.cxx:22
ComboHypoToolBase.h
ComboHypo::m_legToInputCollectionMap
Gaudi::Property< Combo::LegMap > m_legToInputCollectionMap
Definition: ComboHypo.h:60
ComboHypo::hypoTools
const ToolHandleArray< ComboHypoToolBase > & hypoTools() const
Definition: ComboHypo.h:46
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
xAOD::TrigComposite_v1::index_type
uint32_t index_type
Definition: TrigComposite_v1.h:56
SG::sgkey_t
uint32_t sgkey_t
Type used for hashed StoreGate key+CLID pairs.
Definition: CxxUtils/CxxUtils/sgkey_t.h:32
ComboHypo::m_inputs
SG::ReadHandleKeyArray< TrigCompositeUtils::DecisionContainer > m_inputs
Definition: ComboHypo.h:50
ComboHypo::legToInputCollectionMap
const Combo::LegMap & legToInputCollectionMap() const
Definition: ComboHypo.h:44
SG::SGKeyMap
std::unordered_map< sgkey_t, T > SGKeyMap
A map using sgkey_t as a key.
Definition: CxxUtils/CxxUtils/sgkey_t.h:93
Combo::LegMap
std::map< std::string, std::vector< int > > LegMap
Map from the chain name to legs required at each input.
Definition: IComboHypoTool.h:23
ComboHypo::decisionsInput
const SG::ReadHandleKeyArray< TrigCompositeUtils::DecisionContainer > & decisionsInput() const
Definition: ComboHypo.h:41
TrigComposite.h
ComboHypo::m_checkMultiplicityMap
Gaudi::Property< bool > m_checkMultiplicityMap
Definition: ComboHypo.h:64