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

#include <PtCondition.h>

Inheritance diagram for PtCondition:
Collaboration diagram for PtCondition:

Public Member Functions

 PtCondition (double threshold)
 
bool isSatisfied (const HypoJetVector &, const std::unique_ptr< ITrigJetHypoInfoCollector > &) const override
 
virtual unsigned int capacity () const override
 
std::string toString () const override
 

Private Member Functions

bool isSatisfied (const pHypoJet &, const std::unique_ptr< ITrigJetHypoInfoCollector > &) const
 

Private Attributes

double m_min
 

Static Private Attributes

static const unsigned int s_capacity {1}
 

Detailed Description

Definition at line 25 of file PtCondition.h.

Constructor & Destructor Documentation

◆ PtCondition()

PtCondition::PtCondition ( double  threshold)

Definition at line 13 of file PtCondition.cxx.

13  : m_min(threshold) {
14 }

Member Function Documentation

◆ capacity()

virtual unsigned int PtCondition::capacity ( ) const
inlineoverridevirtual

Implements ICondition.

Definition at line 32 of file PtCondition.h.

32 {return s_capacity;}

◆ isSatisfied() [1/2]

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

Implements ICondition.

Definition at line 43 of file PtCondition.cxx.

44  {
45  auto result = isSatisfied(ips[0], c);
46  return result;
47 }

◆ isSatisfied() [2/2]

bool PtCondition::isSatisfied ( const pHypoJet ip,
const std::unique_ptr< ITrigJetHypoInfoCollector > &  collector 
) const
private

Definition at line 17 of file PtCondition.cxx.

18  {
19  auto pt = ip->pt();
20  bool pass = m_min <= pt;
21 
22  if(collector){
23  const void* address = static_cast<const void*>(this);
24 
25  std::stringstream ss0;
26  ss0 << "PtCondition: (" << address << ") "
27  << " pt thresh " << m_min
28  << " pass: " << std::boolalpha << pass << '\n';
29 
30  auto j_addr = static_cast<const void*>(ip.get());
31  std::stringstream ss1;
32  ss1 << " jet : ("<< j_addr << ")"
33  " pt " << pt << '\n';
34 
35  collector->collect(ss0.str(), ss1.str());
36 
37  }
38  return pass;
39 }

◆ toString()

std::string PtCondition::toString ( ) const
overridevirtual

Implements ICondition.

Definition at line 50 of file PtCondition.cxx.

50  {
51  std::stringstream ss;
52  ss << "PtCondition (" << this << ") "
53  << " Pt threshold: "
54  << m_min
55  <<'\n';
56 
57  return ss.str();
58 }

Member Data Documentation

◆ m_min

double PtCondition::m_min
private

Definition at line 38 of file PtCondition.h.

◆ s_capacity

const unsigned int PtCondition::s_capacity {1}
staticprivate

Definition at line 42 of file PtCondition.h.


The documentation for this class was generated from the following files:
PtCondition::m_min
double m_min
Definition: PtCondition.h:38
get_generator_info.result
result
Definition: get_generator_info.py:21
PowhegControl_ttHplus_NLO.ss
ss
Definition: PowhegControl_ttHplus_NLO.py:83
test_pyathena.pt
pt
Definition: test_pyathena.py:11
ITrigJetHypoInfoCollector::collect
virtual void collect(const std::string &, const std::string &)=0
find_tgc_unfilled_channelids.ip
ip
Definition: find_tgc_unfilled_channelids.py:3
PtCondition::isSatisfied
bool isSatisfied(const HypoJetVector &, const std::unique_ptr< ITrigJetHypoInfoCollector > &) const override
Definition: PtCondition.cxx:43
threshold
Definition: chainparser.cxx:74
RTTAlgmain.address
address
Definition: RTTAlgmain.py:55
PtCondition::s_capacity
static const unsigned int s_capacity
Definition: PtCondition.h:42
python.compressB64.c
def c
Definition: compressB64.py:93