ATLAS Offline Software
Loading...
Searching...
No Matches
TrigNavSlimmingMTAlg.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef TRIGNAVSLIMMINGMT_TRIGNAVSLIMMINGMTALG_H
6#define TRIGNAVSLIMMINGMT_TRIGNAVSLIMMINGMTALG_H
7
9
12
16
20
22
35public:
36 TrigNavSlimmingMTAlg(const std::string& name, ISvcLocator* pSvcLocator);
37 virtual StatusCode initialize() override;
38 virtual StatusCode execute (const EventContext& ctx) const override;
39
40private:
41
42 typedef std::map<const TrigCompositeUtils::Decision*, TrigCompositeUtils::Decision*> IOCacheMap;
43
50
52 this, "PrimaryInputCollection", "HLTNav_Summary",
53 "Input collection containing the HLTPassRaw terminus node of the navigation."};
54
56 this, "OutputCollection", "HLTNav_Summary_ESDSlimmed",
57 "Single output collection containing the slimmed navigation nodes."};
58
60 this, "RepackROIsOutputCollection", "HLTNav_RepackedROIs",
61 "Single output collection containing any repacked ROIs (use with RepackROIs)."};
62
64 this, "RepackFeaturesOutputCollection_Particle", "HLTNav_RepackedFeatures_Particle",
65 "Single output collection containing any repacked Particle features (use with RepackFeatures)."};
66
68 this, "RepackFeaturesOutputCollection_MET", "HLTNav_RepackedFeatures_MET",
69 "Single output collection containing any repacked IParticle features (use with RepackFeatures)."};
70
71 Gaudi::Property<bool> m_keepFailedBranches{
72 this, "KeepFailedBranched", true,
73 "Keep nodes which are in branches of the graph which fail selection for all triggers, these are used by T0 monitoring."};
74
75 Gaudi::Property<bool> m_keepOnlyFinalFeatures{
76 this, "KeepOnlyFinalFeatures", false,
77 "Keeps only the final features which accepted a chain. Fine for analysis-use."};
78
79 Gaudi::Property<bool> m_removeEmptySteps{
80 this, "RemoveEmptySteps", false,
81 "Slim away ComboHypo->InputMaker empty step pairs which come from parallel chain alignment (special case: keep if C.H. adds a feature, e.g. BLS). Fine for analysis-use."};
82
83 Gaudi::Property<bool> m_propagatePrescaledNode{
84 this, "PropagatePrescaledNode", false,
85 "Copies the 'HLTPrescaled' node (if it exists) from the input to output navigation collection. If it does not exist, it can be re-created from the xAOD::TriggerDecision"};
86
87 Gaudi::Property<bool> m_propagateL1Nodes{
88 this, "PropagateL1Nodes", false,
89 "Copies the 'L1TAP' and 'L1TAV' nodes (if they exists) from the input to output navigation collection. If they do not exist, they can be re-created from the xAOD::TriggerDecision"};
90
91 Gaudi::Property<bool> m_repackROIs{
92 this, "RepackROIs", false,
93 "Re-pack the target of all 'roi' and 'initialRoI' edges into a single container (WriteHandle defined above)"};
94
95 Gaudi::Property<bool> m_repackMET{
96 this, "RepackMET", false,
97 "Re-pack the target of all 'feature' edges to xAOD::TrigMissingET objects into a single container (WriteHandle defined above)"};
98
99 Gaudi::Property<bool> m_repackFeatures{
100 this, "RepackFeatures", false,
101 "Re-pack the target of all 'feature' edges into a small number of containers (WriteHandle defined above)"};
102
103 Gaudi::Property<std::vector<std::string>> m_repackFeaturesExclusionList{
104 this, "RepackFeaturesExclusionList", {},
105 "Optional list of StoreGate key strings. If strings are provided and RepackFeatures is true, then 'feature' edges "
106 "whose StoreGate key is an exact match to an entry on the supplied list will not be re-packed and will be left unchanged"};
107
108 Gaudi::Property<std::vector<std::string>> m_edgesToDrop{
109 this, "EdgesToDrop", {"view"},
110 "Any edges within the set of names will be dropped as part of the thinning"};
111
112 Gaudi::Property<std::vector<std::string>> m_nodesToDrop{
113 this, "NodesToDrop", {"F"},
114 "Any nodes within the set of names will be dropped as part of the thinning and the navigation re-wired around them"};
115
116 Gaudi::Property<std::vector<std::string>> m_allOutputContainers{
117 this, "AllOutputContainers", {},
118 "List of SG keys of all possible output containers at differing verbosity. Used to stop different instances of the alg interfering with each other."};
119
121 this, "ApplyChainsFilterToSummaryNodes", true,
122 "If the ChainsFilter (if supplied) should be applied to the terminus, express terminus and prescaled nodes. "
123 "If set to false, the trigger decision for any chain may be obtained from the navigation at the expense of additional file size."};
124
125 Gaudi::Property<std::vector<std::string>> m_chainsFilter{
126 this, "ChainsFilter", {},
127 "Optional list of HLT chains. If provided, only navigation data corresponding to these chains will be kept. "
128 "Matching multiple chains via regular expressions is supported."};
129
130 PublicToolHandle<Trig::TrigDecisionTool> m_trigDec{
131 this, "TrigDecisionTool", "Trig::TrigDecisionTool/TrigDecisionTool",
132 "Trigger Decision Tool, used to apply the ChainsFilter"};
133
134 Gaudi::Property<bool> m_runtimeValidation{
135 this, "RuntimeValidation", false,
136 "Perform additional validation checks on the navigation, and print WARNINGs if anything out of the ordinary is found."};
137
138 std::set<std::string> m_allOutputContainersSet;
139
146 StatusCode fillChainIDs(TrigCompositeUtils::DecisionIDContainer& chainIDs, const TrigCompositeUtils::Decision* applyPassingChainsFilter) const;
147
155 StatusCode createPresaledGraphNode(Outputs& outputContainers, const TrigCompositeUtils::DecisionIDContainer& chainIDs) const;
156
163 StatusCode createL1GraphNodes(Outputs& outputContainers) const;
164
175 StatusCode inputToOutput(
176 const TrigCompositeUtils::Decision* input,
178 IOCacheMap& cache,
179 Outputs& outputContainers,
181 const EventContext& ctx) const;
182
190 StatusCode propagateLinks(
191 const TrigCompositeUtils::Decision* input,
192 TrigCompositeUtils::Decision* output) const;
193
201 StatusCode propagateDecisionIDs(
202 const TrigCompositeUtils::Decision* input,
204 const TrigCompositeUtils::DecisionIDContainer& chainIDs) const;
205
215 StatusCode propagateSeedingRelation(
216 const TrigCompositeUtils::NavGraphNode* inputNode,
217 IOCacheMap& cache,
218 const EventContext& ctx) const;
219
226 StatusCode repackLinks(
228 Outputs& outputContainers) const;
229
234 const TrigCompositeUtils::Decision* output,
235 const std::string& when) const;
236
240 std::vector<size_t> lookupHardCodedLegMultiplicities(const std::string& chain) const;
241
249 template< typename COLLECTION >
251 SG::WriteHandle<COLLECTION>* writeHandle,
252 const std::string& edgeName) const;
253
258 template< typename COLLECTION >
259 StatusCode doRepackCopy(const typename COLLECTION::base_value_type* object,
260 SG::WriteHandle<COLLECTION>* writeHandle) const;
261
262};
263
265
266#endif // TRIGNAVSLIMMINGMT_TRIGNAVSLIMMINGMTALG_H
Handle class for reading from StoreGate.
Handle class for recording to StoreGate.
An algorithm that can be simultaneously executed in multiple threads.
Property holding a SG store/key/clid from which a ReadHandle is made.
Property holding a SG store/key/clid from which a WriteHandle is made.
Transient utility class to represent a node in a graph (m_decisionObject), and a vector of edges (m_f...
Definition NavGraph.h:20
std::vector< size_t > lookupHardCodedLegMultiplicities(const std::string &chain) const
Supplemental leg multiplicity information to support MC20.
SG::WriteHandleKey< TrigRoiDescriptorCollection > m_outputRepackedROICollectionKey
Gaudi::Property< std::vector< std::string > > m_edgesToDrop
StatusCode createPresaledGraphNode(Outputs &outputContainers, const TrigCompositeUtils::DecisionIDContainer &chainIDs) const
Creates a new graph node from scratch, populates it with the Chain IDs of all HLT chains which were n...
StatusCode doRepack(TrigCompositeUtils::Decision *decision, SG::WriteHandle< COLLECTION > *writeHandle, const std::string &edgeName) const
Look for an ElementLink<COLLECTION> with the given edge-name in 'decision', if found then make a copy...
Gaudi::Property< bool > m_keepFailedBranches
Gaudi::Property< std::vector< std::string > > m_allOutputContainers
Gaudi::Property< bool > m_repackFeatures
SG::WriteHandleKey< xAOD::TrigCompositeContainer > m_outputCollection
Gaudi::Property< bool > m_applyChainsFilterToSummaryNodes
Gaudi::Property< bool > m_runtimeValidation
StatusCode inputToOutput(const TrigCompositeUtils::Decision *input, TrigCompositeUtils::Decision **output, IOCacheMap &cache, Outputs &outputContainers, const TrigCompositeUtils::DecisionIDContainer &chainIDs, const EventContext &ctx) const
Map a const Decision object from an input collection to its equivalent in the output collection Where...
SG::WriteHandleKey< xAOD::ParticleContainer > m_outputRepackedFeaturesCollectionKey_Particle
SG::WriteHandleKey< xAOD::TrigMissingETContainer > m_outputRepackedFeaturesCollectionKey_MET
StatusCode propagateSeedingRelation(const TrigCompositeUtils::NavGraphNode *inputNode, IOCacheMap &cache, const EventContext &ctx) const
Copy the subset of "seed" links which are present in the inputNode.
void printIParticleRepackingDebug(const TrigCompositeUtils::Decision *output, const std::string &when) const
Print debug information relating to the re-packing of feature links as Particle objects.
StatusCode createL1GraphNodes(Outputs &outputContainers) const
Creates two new graph node from scratch, populates it using the TriggerDecisionTool with the hash of ...
StatusCode propagateDecisionIDs(const TrigCompositeUtils::Decision *input, TrigCompositeUtils::Decision *output, const TrigCompositeUtils::DecisionIDContainer &chainIDs) const
Copy DecisionIDs (passing chains and passing chain-legs) from input to output.
Gaudi::Property< bool > m_repackMET
Gaudi::Property< bool > m_repackROIs
std::set< std::string > m_allOutputContainersSet
Processed form of m_allOutputContainers.
Gaudi::Property< std::vector< std::string > > m_repackFeaturesExclusionList
Gaudi::Property< bool > m_keepOnlyFinalFeatures
StatusCode doRepackCopy(const typename COLLECTION::base_value_type *object, SG::WriteHandle< COLLECTION > *writeHandle) const
Performs the xAOD Copy.
SG::ReadHandleKey< xAOD::TrigCompositeContainer > m_primaryInputCollection
TrigNavSlimmingMTAlg(const std::string &name, ISvcLocator *pSvcLocator)
StatusCode repackLinks(TrigCompositeUtils::Decision *output, Outputs &outputContainers) const
Repacks ElementLinks in the DecisionObject to point to compact output containers written by this alg.
std::map< const TrigCompositeUtils::Decision *, TrigCompositeUtils::Decision * > IOCacheMap
Gaudi::Property< std::vector< std::string > > m_nodesToDrop
virtual StatusCode execute(const EventContext &ctx) const override
Gaudi::Property< bool > m_removeEmptySteps
virtual StatusCode initialize() override
StatusCode fillChainIDs(TrigCompositeUtils::DecisionIDContainer &chainIDs, const TrigCompositeUtils::Decision *applyPassingChainsFilter) const
Convert the ChainsFilter into the set of chain-IDd and chain-leg-IDs which comprises all of the Decis...
Gaudi::Property< bool > m_propagatePrescaledNode
Gaudi::Property< bool > m_propagateL1Nodes
PublicToolHandle< Trig::TrigDecisionTool > m_trigDec
StatusCode propagateLinks(const TrigCompositeUtils::Decision *input, TrigCompositeUtils::Decision *output) const
Copy links (graph edges) from input to output.
Gaudi::Property< std::vector< std::string > > m_chainsFilter
std::set< DecisionID > DecisionIDContainer
SG::WriteHandle< TrigRoiDescriptorCollection > * rois
SG::WriteHandle< xAOD::ParticleContainer > * particles
SG::WriteHandle< xAOD::TrigMissingETContainer > * mets
SG::WriteHandle< xAOD::TrigCompositeContainer > * nav