ATLAS Offline Software
Loading...
Searching...
No Matches
EMFCondition Class Reference

#include <EMFCondition.h>

Inheritance diagram for EMFCondition:
Collaboration diagram for EMFCondition:

Public Member Functions

 EMFCondition (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 EMFCondition.h.

Constructor & Destructor Documentation

◆ EMFCondition()

EMFCondition::EMFCondition ( double threshold)

Definition at line 14 of file EMFCondition.cxx.

14 : m_min(threshold) {
15}

Member Function Documentation

◆ capacity()

virtual unsigned int EMFCondition::capacity ( ) const
inlineoverridevirtual

Implements ICondition.

Definition at line 32 of file EMFCondition.h.

32{return s_capacity;}
static const unsigned int s_capacity

◆ isSatisfied() [1/2]

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

Implements ICondition.

Definition at line 46 of file EMFCondition.cxx.

47 {
48 auto result = isSatisfied(ips[0], c);
49 return result;
50}
bool isSatisfied(const HypoJetVector &, const std::unique_ptr< ITrigJetHypoInfoCollector > &) const override

◆ isSatisfied() [2/2]

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

Definition at line 18 of file EMFCondition.cxx.

19 {
20
21 float emf =999;
22 ip->getAttribute("EMFrac",emf);
23 bool pass = m_min >= emf;
24
25 if(collector){
26 const void* address = static_cast<const void*>(this);
27
28 std::stringstream ss0;
29 ss0 << "EMFCondition: (" << address << ") "
30 << " emf thresh " << m_min
31 << " pass: " << std::boolalpha << pass << '\n';
32
33 auto j_addr = static_cast<const void*>(ip.get());
34 std::stringstream ss1;
35 ss1 << " jet : ("<< j_addr << ")"
36 " emf " << emf << '\n';
37
38 collector->collect(ss0.str(), ss1.str());
39
40 }
41 return pass;
42}
virtual void collect(const std::string &, const std::string &)=0

◆ toString()

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

Implements ICondition.

Definition at line 53 of file EMFCondition.cxx.

53 {
54 std::stringstream ss;
55 ss << "EMFCondition (" << this << ") "
56 << " EMF threshold: "
57 << m_min
58 <<'\n';
59
60 return ss.str();
61}
static Double_t ss

Member Data Documentation

◆ m_min

double EMFCondition::m_min
private

Definition at line 38 of file EMFCondition.h.

◆ s_capacity

const unsigned int EMFCondition::s_capacity {1}
staticprivate

Definition at line 42 of file EMFCondition.h.

42{1};

The documentation for this class was generated from the following files: