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

#include <PhiCondition.h>

Inheritance diagram for PhiCondition:
Collaboration diagram for PhiCondition:

Public Member Functions

 PhiCondition (double phiMin, double phiMax)
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

Static Private Attributes

static const unsigned int s_capacity {1}

Detailed Description

Definition at line 26 of file PhiCondition.h.

Constructor & Destructor Documentation

◆ PhiCondition()

PhiCondition::PhiCondition ( double phiMin,
double phiMax )

Definition at line 13 of file PhiCondition.cxx.

14 : m_min(phiMin), m_max(phiMax){
15}

Member Function Documentation

◆ capacity()

virtual unsigned int PhiCondition::capacity ( ) const
inlineoverridevirtual

Implements ICondition.

Definition at line 34 of file PhiCondition.h.

34{return s_capacity;}
static const unsigned int s_capacity

◆ isSatisfied() [1/2]

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

Implements ICondition.

Definition at line 45 of file PhiCondition.cxx.

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

◆ isSatisfied() [2/2]

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

Definition at line 19 of file PhiCondition.cxx.

20 {
21
22 auto phi = ip->phi();
23 bool pass = m_min <= phi and m_max > phi;
24
25 if(collector){
26 const void* address = static_cast<const void*>(this);
27
28 std::stringstream ss0;
29 ss0 << "PhiCondition: (" << address << ") "
30 << " phi[" << m_min << ", " << m_max << "]"
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 << ") phi " << phi << '\n';
36
37 collector->collect(ss0.str(), ss1.str());
38
39 }
40 return pass;
41}
Scalar phi() const
phi method
virtual void collect(const std::string &, const std::string &)=0

◆ toString()

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

Implements ICondition.

Definition at line 52 of file PhiCondition.cxx.

52 {
53 std::stringstream ss;
54 ss << "PhiCondition (" << this << ") phiMin "
55 << m_min
56 << " phiMax "
57 << m_max
58 <<'\n';
59
60 return ss.str();
61}
static Double_t ss

Member Data Documentation

◆ m_max

double PhiCondition::m_max
private

Definition at line 40 of file PhiCondition.h.

◆ m_min

double PhiCondition::m_min
private

Definition at line 39 of file PhiCondition.h.

◆ s_capacity

const unsigned int PhiCondition::s_capacity {1}
staticprivate

Definition at line 44 of file PhiCondition.h.

44{1};

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