ATLAS Offline Software
RepeatedCondition.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_REPEATEDCONDITION_H
6 #define TRIGHLTJETHYPO_REPEATEDCONDITION_H
7 
8 /********************************************************************
9  *
10  * NAME: RepeatedCondition.h
11  * PACKAGE: Trigger/TrigHypothesis/TrigHLTJetHypo
12  *
13  * AUTHOR: P. Sherwood
14  *
15  * an implementation of the IRepeatedCondition PABC.
16  *
17  *********************************************************************/
18 
20 #include "IRepeatedCondition.h"
21 
22 #include <memory>
23 #include <string>
24 #include <ostream>
25 
26 
28 
30  public:
31  RepeatedCondition(std::unique_ptr<ICondition> cp,
32  std::size_t mult,
33  int clique,
34  int chainPartind = -1,
35  bool invert=false);
36  virtual ~RepeatedCondition();
37 
38  virtual bool
39  multiplicitySatisfied(std::size_t jgMultiplicity,
40  const Collector&) const override;
41  virtual bool
43  const std::unique_ptr<ITrigJetHypoInfoCollector>& c) const override;
44 
45 
46  // capacity: this is the size of a jet group which is requred to
47  // satisfy a Condition.
48  // eg the five ComoundConditions for the chain 3JX_2JX have capcity 1
49  // A Dijet Condition will have multiplicity 2.
50 
51 
52  virtual unsigned int capacity() const override;
53 
54  // multiplicity: RepeatedConditions which contain CompoundConditions
55  // with identical functionality will have the multiplicity
56  // given by the chainPart of the condiguriung chainDict.
57  //
58  // eg the two conditions for the chain 3JX_2JX will have multiplicty
59  // of 3 and 2 respectively.
60  virtual std::size_t multiplicity() const override;
61 
62  // clique: RepeatedConditions which contain CompoundConditions
63  // with identical functionality form a clique, and receive
64  // the same value for their clique index.
65  //
66  // eg the two RepeteadConditions for the chain 3JX_2JX form a clique.
67  virtual int clique() const override;
68 
69  virtual std::string toString() const override;
70 
71  virtual int label() const override;
72 
73  virtual bool isFromChainPart() const override;
74 
75 private:
76 
77  std::unique_ptr<ICondition> m_condition;
78  std::size_t m_multiplicity{1};
79  int m_clique{-1};
80  // record of which chain part in the chainDict this conditions comes from
81  int m_chainPartInd{-1};
82  bool m_invert{false};
83 };
84 
85 std::ostream& operator<<(std::ostream&,
86  const RepeatedCondition&);
87 
88 #endif
IRepeatedCondition.h
RepeatedCondition::isSatisfied
virtual bool isSatisfied(const HypoJetVector &v, const std::unique_ptr< ITrigJetHypoInfoCollector > &c) const override
Definition: RepeatedCondition.cxx:30
HypoJetDefs.h
RepeatedCondition::RepeatedCondition
RepeatedCondition(std::unique_ptr< ICondition > cp, std::size_t mult, int clique, int chainPartind=-1, bool invert=false)
Definition: RepeatedCondition.cxx:11
IRepeatedCondition
Definition: IRepeatedCondition.h:29
RepeatedCondition::toString
virtual std::string toString() const override
Definition: RepeatedCondition.cxx:50
RepeatedCondition::m_chainPartInd
int m_chainPartInd
Definition: RepeatedCondition.h:81
RepeatedCondition::label
virtual int label() const override
Definition: RepeatedCondition.cxx:69
RepeatedCondition::m_condition
std::unique_ptr< ICondition > m_condition
Definition: RepeatedCondition.h:77
operator<<
std::ostream & operator<<(std::ostream &, const RepeatedCondition &)
Definition: RepeatedCondition.cxx:77
RepeatedCondition::m_invert
bool m_invert
Definition: RepeatedCondition.h:82
RepeatedCondition::multiplicity
virtual std::size_t multiplicity() const override
Definition: RepeatedCondition.cxx:41
ITrigJetHypoInfoCollector
Definition: ITrigJetHypoInfoCollector.h:9
RepeatedCondition::clique
virtual int clique() const override
Definition: RepeatedCondition.cxx:46
RepeatedCondition::m_clique
int m_clique
Definition: RepeatedCondition.h:79
HypoJetVector
std::vector< pHypoJet > HypoJetVector
Definition: HypoJetDefs.h:27
RepeatedCondition::m_multiplicity
std::size_t m_multiplicity
Definition: RepeatedCondition.h:78
Collector
std::unique_ptr< ITrigJetHypoInfoCollector > Collector
Definition: FastReducer.h:22
LArNewCalib_PedestalAutoCorr.cp
cp
Definition: LArNewCalib_PedestalAutoCorr.py:188
RepeatedCondition
Definition: RepeatedCondition.h:29
RepeatedCondition::isFromChainPart
virtual bool isFromChainPart() const override
Definition: RepeatedCondition.cxx:73
python.PyAthena.v
v
Definition: PyAthena.py:154
RepeatedCondition::~RepeatedCondition
virtual ~RepeatedCondition()
Definition: RepeatedCondition.cxx:21
RepeatedCondition::capacity
virtual unsigned int capacity() const override
Definition: RepeatedCondition.cxx:37
python.compressB64.c
def c
Definition: compressB64.py:93
RepeatedCondition::multiplicitySatisfied
virtual bool multiplicitySatisfied(std::size_t jgMultiplicity, const Collector &) const override
Definition: RepeatedCondition.cxx:24