ATLAS Offline Software
Public Member Functions | Private Member Functions | Private Attributes | List of all members
SpecifiedJetsCondition Class Reference

#include <SpecifiedJetsCondition.h>

Inheritance diagram for SpecifiedJetsCondition:
Collaboration diagram for SpecifiedJetsCondition:

Public Member Functions

 SpecifiedJetsCondition (const HypoJetGroupVector &)
 
 ~SpecifiedJetsCondition () override
 
bool isSatisfied (const HypoJetVector &, const std::unique_ptr< ITrigJetHypoInfoCollector > &) const override
 
virtual unsigned int capacity () const override
 
std::string toString () const noexcept override
 

Private Member Functions

bool groupIsSatisfied (const HypoJetVector &ips, const HypoJetVector &group, const std::unique_ptr< ITrigJetHypoInfoCollector > &) const
 

Private Attributes

HypoJetGroupVector m_acceptedJetGroups
 
std::size_t m_capacity
 

Detailed Description

Definition at line 26 of file SpecifiedJetsCondition.h.

Constructor & Destructor Documentation

◆ SpecifiedJetsCondition()

SpecifiedJetsCondition::SpecifiedJetsCondition ( const HypoJetGroupVector accJets)

Definition at line 13 of file SpecifiedJetsCondition.cxx.

13  : m_acceptedJetGroups(accJets){
14  m_capacity = accJets[0].size();
15 }

◆ ~SpecifiedJetsCondition()

SpecifiedJetsCondition::~SpecifiedJetsCondition ( )
inlineoverride

Definition at line 29 of file SpecifiedJetsCondition.h.

29 {}

Member Function Documentation

◆ capacity()

virtual unsigned int SpecifiedJetsCondition::capacity ( ) const
inlineoverridevirtual

Implements ICondition.

Definition at line 34 of file SpecifiedJetsCondition.h.

34 {return m_capacity;}

◆ groupIsSatisfied()

bool SpecifiedJetsCondition::groupIsSatisfied ( const HypoJetVector ips,
const HypoJetVector group,
const std::unique_ptr< ITrigJetHypoInfoCollector > &   
) const
private

Definition at line 18 of file SpecifiedJetsCondition.cxx.

20  {
21 
22  for(const auto& j : ips){
23  if(std::find(group.begin(), group.end(), j) == group.end()){
24  return false;
25  }
26  }
27 
28  return true;
29 }

◆ isSatisfied()

bool SpecifiedJetsCondition::isSatisfied ( const HypoJetVector ips,
const std::unique_ptr< ITrigJetHypoInfoCollector > &  collector 
) const
overridevirtual

Implements ICondition.

Definition at line 32 of file SpecifiedJetsCondition.cxx.

33  {
34  for(const auto& jg : m_acceptedJetGroups){
35  if(groupIsSatisfied(ips, jg, collector)){
36  return true;
37  }
38  }
39  return false;
40 }

◆ toString()

std::string SpecifiedJetsCondition::toString ( ) const
overridevirtualnoexcept

Implements ICondition.

Definition at line 44 of file SpecifiedJetsCondition.cxx.

44  {
45  std::stringstream ss;
46  ss << "SpecifiedJetsCondition (" << this << ") accepted jet groupds: ";
47  std::size_t count{0};
48  for(const auto& jg : m_acceptedJetGroups){
49  ss << "group " << count << '\n';
50  ++count;
51  for(const auto& j : jg){
52  auto j_addr = static_cast<const void*>(j.get());
53  ss << j_addr << " ";
54  }
55  }
56  ss << '\n';
57  return ss.str();
58 }

Member Data Documentation

◆ m_acceptedJetGroups

HypoJetGroupVector SpecifiedJetsCondition::m_acceptedJetGroups
private

Definition at line 38 of file SpecifiedJetsCondition.h.

◆ m_capacity

std::size_t SpecifiedJetsCondition::m_capacity
private

Definition at line 39 of file SpecifiedJetsCondition.h.


The documentation for this class was generated from the following files:
PowhegControl_ttHplus_NLO.ss
ss
Definition: PowhegControl_ttHplus_NLO.py:83
find
std::string find(const std::string &s)
return a remapped string
Definition: hcg.cxx:135
SpecifiedJetsCondition::m_acceptedJetGroups
HypoJetGroupVector m_acceptedJetGroups
Definition: SpecifiedJetsCondition.h:38
XMLtoHeader.count
count
Definition: XMLtoHeader.py:85
CaloLCW_tf.group
group
Definition: CaloLCW_tf.py:28
SpecifiedJetsCondition::groupIsSatisfied
bool groupIsSatisfied(const HypoJetVector &ips, const HypoJetVector &group, const std::unique_ptr< ITrigJetHypoInfoCollector > &) const
Definition: SpecifiedJetsCondition.cxx:18
SpecifiedJetsCondition::m_capacity
std::size_t m_capacity
Definition: SpecifiedJetsCondition.h:39