ATLAS Offline Software
JetGroupProduct.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef TRIGHLTJETHYPO_JETGROUPPRODUCT_H
6 #define TRIGHLTJETHYPO_JETGROUPPRODUCT_H
7 
8 #include "./IJetGroupProduct.h"
9 #include "./ProductGen.h"
10 #include "./JetStreamer.h"
11 #include "./DebugInfoCollector.h"
13 #include <vector>
14 
15 using CondInd2JetGroupsInds = std::map<int, std::vector<std::size_t>>;
16 using JetGroupInd2ElemInds = std::map<int, std::vector<std::size_t>>;
17 
18 typedef std::unique_ptr<ITrigJetHypoInfoCollector> Collector;
19 
21  /*
22  * Iterate through the combinations of jet groups.
23  * The jet groups are those that satisfied a set up siblings.
24  * Their parent is tested against all the combioinations of jet groups
25  * that satisfy the siblings.
26  *
27  * eg for a vector of siblings [s1, s2]
28  * satisfiedBy[s1] is a vector<vector<size_t>> say <[jg1, jg2], [jg3, jg4]>
29  * satisfiedBy[s2] is a vector<vector<size_t>> say <[jg5, jg6]>
30  * the products are then [jg1, jg2, jg5, jg6], [jg3, jg4, jg5, jg6]
31  * jg1 is an key in a map that has a value of an input jet group (typically
32  * containing a single jet.
33  */
34  public:
35  JetGroupProduct(const std::vector<std::size_t>& siblings,
36  const CondInd2JetGroupsInds& satisfiedBy,
37  const std::vector<std::size_t>& condMult,
38  const JetGroupInd2ElemInds&);
39 
40  virtual std::vector<std::size_t> next(const Collector&) override;
41  virtual bool valid() const override;
42 
43  private:
44 
46 
47  std::vector<bool> m_jetMask;
48  std::size_t m_jetEnd{0};
49  // ProductGen m_productGen;
50  std::vector<std::vector<std::size_t>> m_seenIndices;
51  std::unique_ptr<JetStreamer> m_jetstreamer{nullptr};
52  bool m_valid{false};
53 
54  void init(const std::vector<std::size_t>& siblings,
55  const CondInd2JetGroupsInds& satisfiedBy,
56  const std::vector<std::size_t>& condMult
57  );
58 
59 };
60 
61 #endif
IJetGroupProduct
Definition: IJetGroupProduct.h:14
CondInd2JetGroupsInds
std::map< int, std::vector< std::size_t > > CondInd2JetGroupsInds
Definition: JetGroupProduct.h:15
ProductGen.h
HypoJetDefs.h
JetGroupProduct::m_seenIndices
std::vector< std::vector< std::size_t > > m_seenIndices
Definition: JetGroupProduct.h:50
JetGroupProduct
Definition: JetGroupProduct.h:20
JetGroupProduct::init
void init(const std::vector< std::size_t > &siblings, const CondInd2JetGroupsInds &satisfiedBy, const std::vector< std::size_t > &condMult)
Definition: JetGroupProduct.cxx:24
JetGroupProduct::JetGroupProduct
JetGroupProduct(const std::vector< std::size_t > &siblings, const CondInd2JetGroupsInds &satisfiedBy, const std::vector< std::size_t > &condMult, const JetGroupInd2ElemInds &)
Definition: JetGroupProduct.cxx:13
JetStreamer.h
JetGroupProduct::valid
virtual bool valid() const override
Definition: JetGroupProduct.cxx:127
JetGroupProduct::m_jetstreamer
std::unique_ptr< JetStreamer > m_jetstreamer
Definition: JetGroupProduct.h:51
JetGroupInd2ElemInds
std::map< int, std::vector< std::size_t > > JetGroupInd2ElemInds
Definition: elementalJetGroups.h:11
DebugInfoCollector.h
JetGroupProduct::m_jg2elemjgs
JetGroupInd2ElemInds m_jg2elemjgs
Definition: JetGroupProduct.h:45
Collector
std::unique_ptr< ITrigJetHypoInfoCollector > Collector
Definition: FastReducer.h:22
JetGroupProduct::m_jetEnd
std::size_t m_jetEnd
Definition: JetGroupProduct.h:48
Collector
std::unique_ptr< ITrigJetHypoInfoCollector > Collector
Definition: JetGroupProduct.h:18
JetGroupProduct::m_valid
bool m_valid
Definition: JetGroupProduct.h:52
IJetGroupProduct.h
JetGroupProduct::next
virtual std::vector< std::size_t > next(const Collector &) override
Definition: JetGroupProduct.cxx:60
JetGroupProduct::m_jetMask
std::vector< bool > m_jetMask
Definition: JetGroupProduct.h:47