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

#include <MomentCondition.h>

Inheritance diagram for MomentCondition:
Collaboration diagram for MomentCondition:

Public Member Functions

 MomentCondition (double mMin, double mMax, const std::string &moment)
 
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
 
double m_max
 
std::string m_moment
 

Static Private Attributes

static const unsigned int s_capacity {1}
 

Detailed Description

Definition at line 25 of file MomentCondition.h.

Constructor & Destructor Documentation

◆ MomentCondition()

MomentCondition::MomentCondition ( double  mMin,
double  mMax,
const std::string &  moment 
)

Definition at line 13 of file MomentCondition.cxx.

15  :
16 m_min(mMin), m_max(mMax), m_moment(moment) {
17 }

Member Function Documentation

◆ capacity()

virtual unsigned int MomentCondition::capacity ( ) const
inlineoverridevirtual

Implements ICondition.

Definition at line 32 of file MomentCondition.h.

32 {return s_capacity;}

◆ isSatisfied() [1/2]

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

Implements ICondition.

Definition at line 64 of file MomentCondition.cxx.

65  {
66  auto result = isSatisfied(ips[0], c);
67  return result;
68 }

◆ isSatisfied() [2/2]

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

Definition at line 20 of file MomentCondition.cxx.

21  {
22 
23  float momentValue;
24 
25  if (!(ip -> getAttribute(m_moment, momentValue))){
26 
27  if(collector){
28  auto j_addr = static_cast<const void*>(ip.get());
29 
30  std::stringstream ss0;
31  ss0 << "MomentCondition: "
32  << " unable to retrieve " << m_moment << '\n';
33  std::stringstream ss1;
34  ss1 << " jet : ("<< j_addr << ")";
35  collector->collect(ss0.str(), ss1.str());
36  }
37  return false;
38  }
39 
40  bool pass = m_min <= momentValue and m_max > momentValue;
41 
42  if(collector){
43  const void* address = static_cast<const void*>(this);
44 
45  std::stringstream ss0;
46  ss0 << "MomentCondition: ("<< address
47  << ") min cut value " << m_min
48  << " max cut value " << m_max
49  << " moment " << m_moment
50  << " pass: " << std::boolalpha << pass << '\n';
51 
52  auto j_addr = static_cast<const void*>(ip.get());
53  std::stringstream ss1;
54  ss1 << " jet : ("<< j_addr << ") "
55  "moment " << m_moment << " value: " << momentValue<< '\n';
56 
57  collector->collect(ss0.str(), ss1.str());
58 
59  }
60  return pass;
61 }

◆ toString()

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

Implements ICondition.

Definition at line 71 of file MomentCondition.cxx.

71  {
72  std::stringstream ss;
73  ss << "MomentCondition (" << this << ") "
74  << " moment: " << m_moment
75  << " min " << m_min
76  << " max " << m_max
77  <<'\n';
78 
79  return ss.str();
80 }

Member Data Documentation

◆ m_max

double MomentCondition::m_max
private

Definition at line 39 of file MomentCondition.h.

◆ m_min

double MomentCondition::m_min
private

Definition at line 38 of file MomentCondition.h.

◆ m_moment

std::string MomentCondition::m_moment
private

Definition at line 40 of file MomentCondition.h.

◆ s_capacity

const unsigned int MomentCondition::s_capacity {1}
staticprivate

Definition at line 45 of file MomentCondition.h.


The documentation for this class was generated from the following files:
get_generator_info.result
result
Definition: get_generator_info.py:21
PowhegControl_ttHplus_NLO.ss
ss
Definition: PowhegControl_ttHplus_NLO.py:83
ITrigJetHypoInfoCollector::collect
virtual void collect(const std::string &, const std::string &)=0
MomentCondition::s_capacity
static const unsigned int s_capacity
Definition: MomentCondition.h:45
MomentCondition::m_min
double m_min
Definition: MomentCondition.h:38
MomentCondition::isSatisfied
bool isSatisfied(const HypoJetVector &, const std::unique_ptr< ITrigJetHypoInfoCollector > &) const override
Definition: MomentCondition.cxx:64
find_tgc_unfilled_channelids.ip
ip
Definition: find_tgc_unfilled_channelids.py:3
RTTAlgmain.address
address
Definition: RTTAlgmain.py:55
MomentCondition::m_max
double m_max
Definition: MomentCondition.h:39
python.compressB64.c
def c
Definition: compressB64.py:93
MomentCondition::m_moment
std::string m_moment
Definition: MomentCondition.h:40