ATLAS Offline Software
Loading...
Searching...
No Matches
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
9#include "./ProductGen.h"
10#include "./JetStreamer.h"
13#include <vector>
14
15using CondInd2JetGroupsInds = std::map<int, std::vector<std::size_t>>;
16using JetGroupInd2ElemInds = std::map<int, std::vector<std::size_t>>;
17
18typedef 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,
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
std::unique_ptr< ITrigJetHypoInfoCollector > Collector
Definition FastReducer.h:22
std::map< int, std::vector< std::size_t > > CondInd2JetGroupsInds
std::map< int, std::vector< std::size_t > > JetGroupInd2ElemInds
std::unique_ptr< ITrigJetHypoInfoCollector > Collector
std::vector< bool > m_jetMask
std::unique_ptr< JetStreamer > m_jetstreamer
JetGroupProduct(const std::vector< std::size_t > &siblings, const CondInd2JetGroupsInds &satisfiedBy, const std::vector< std::size_t > &condMult, const JetGroupInd2ElemInds &)
JetGroupInd2ElemInds m_jg2elemjgs
virtual std::vector< std::size_t > next(const Collector &) override
void init(const std::vector< std::size_t > &siblings, const CondInd2JetGroupsInds &satisfiedBy, const std::vector< std::size_t > &condMult)
std::vector< std::vector< std::size_t > > m_seenIndices
virtual bool valid() const override
std::size_t m_jetEnd
std::map< int, std::vector< std::size_t > > JetGroupInd2ElemInds