ATLAS Offline Software
JetGroupReducer.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef TRIGHLTJETHYPO_JETGROUPREDUCER_H
6 #define TRIGHLTJETHYPO_JETGROUPREDUCER_H
7 
8 #include "./IJetGroupProduct.h"
9 #include "./DebugInfoCollector.h"
11 #include <vector>
12 
13 using CondInd2JetGroupsInds = std::map<int, std::vector<std::size_t>>;
14 
15 using JetGroupInd2ElemInds = std::map<int, std::vector<std::size_t>>;
16 
17 
18 typedef std::unique_ptr<ITrigJetHypoInfoCollector> Collector;
19 
20 // Reduce one or more vectors of possibly non-elementary jet group indices to
21 // a vector of elementary jet group indices
22 // A possible use of this class is to efficiently combine
23 // satisfying jet groups from the children of an AcceptAll
24 // condition. This approach would not be used for simpleTrees
25 // as specialised reducers for such trees exist which exploit the
26 // fact the the child jet groups are elementary.
27 
28 
30  /*
31  * Form the reducer of the sets of jets passing sibling Conditions.
32  */
33  public:
34  JetGroupReducer(const std::vector<std::size_t>& siblings,
35  const CondInd2JetGroupsInds& satisfiedBy,
36  const JetGroupInd2ElemInds&);
37 
38  virtual std::vector<std::size_t> next(const Collector&) override;
39  virtual bool valid() const override;
40 
41  private:
42  std::vector<std::size_t> m_jetIndices;
43  bool m_done{false};
44 };
45 
46 #endif
IJetGroupProduct
Definition: IJetGroupProduct.h:14
CondInd2JetGroupsInds
std::map< int, std::vector< std::size_t > > CondInd2JetGroupsInds
Definition: JetGroupProduct.h:15
HypoJetDefs.h
JetGroupReducer::JetGroupReducer
JetGroupReducer(const std::vector< std::size_t > &siblings, const CondInd2JetGroupsInds &satisfiedBy, const JetGroupInd2ElemInds &)
Definition: JetGroupReducer.cxx:13
JetGroupReducer
Definition: JetGroupReducer.h:29
JetGroupInd2ElemInds
std::map< int, std::vector< std::size_t > > JetGroupInd2ElemInds
Definition: elementalJetGroups.h:11
DebugInfoCollector.h
Collector
std::unique_ptr< ITrigJetHypoInfoCollector > Collector
Definition: FastReducer.h:22
JetGroupReducer::m_jetIndices
std::vector< std::size_t > m_jetIndices
Definition: JetGroupReducer.h:42
JetGroupReducer::valid
virtual bool valid() const override
Definition: JetGroupReducer.cxx:93
JetGroupReducer::next
virtual std::vector< std::size_t > next(const Collector &) override
Definition: JetGroupReducer.cxx:77
IJetGroupProduct.h
Collector
std::unique_ptr< ITrigJetHypoInfoCollector > Collector
Definition: JetGroupReducer.h:18
JetGroupReducer::m_done
bool m_done
Definition: JetGroupReducer.h:43