ATLAS Offline Software
Public Member Functions | Private Attributes | List of all members
GlobalSim::CommonSelector Class Reference

#include <CommonSelector.h>

Inheritance diagram for GlobalSim::CommonSelector:
Collaboration diagram for GlobalSim::CommonSelector:

Public Member Functions

 CommonSelector ()=default
 Passes all. More...
 
 CommonSelector (const std::string &et_low, const std::string &et_high, const std::string &eta_low, const std::string &eta_high, const std::string &phi_low, const std::string &phi_high)
 window limits from strings, to match the CommonTOB bitsets More...
 
virtual ~CommonSelector ()=default
 
virtual bool select (const ICommonTOB &) const override
 
virtual std::string to_string () const override
 

Private Attributes

ulong m_et_low {0}
 
ulong m_et_high {ULONG_MAX}
 
ulong m_eta_low {0}
 
ulong m_eta_high {ULONG_MAX}
 
ulong m_phi_low {0}
 
ulong m_phi_high {ULONG_MAX}
 

Detailed Description

Definition at line 23 of file CommonSelector.h.

Constructor & Destructor Documentation

◆ CommonSelector() [1/2]

GlobalSim::CommonSelector::CommonSelector ( )
default

Passes all.

◆ CommonSelector() [2/2]

GlobalSim::CommonSelector::CommonSelector ( const std::string &  et_low,
const std::string &  et_high,
const std::string &  eta_low,
const std::string &  eta_high,
const std::string &  phi_low,
const std::string &  phi_high 
)

window limits from strings, to match the CommonTOB bitsets

Definition at line 12 of file CommonSelector.cxx.

17  :
18  m_et_low{std::stoul(et_low)},
19  m_eta_low{std::stoul(eta_low)},
20  m_phi_low{std::stoul(phi_low)} {
21 
22  if(et_high == "inf") {
23  m_et_high = ULONG_MAX;
24  } else {
25  m_et_high = std::stoul(et_high);
26  }
27 
28  if(eta_high == "inf") {
29  m_eta_high = ULONG_MAX;
30  } else {
31  m_eta_high = std::stoul(eta_high);
32  }
33 
34  if(eta_high == "inf") {
35  m_phi_high = ULONG_MAX;
36  } else {
37  m_phi_high = std::stoul(phi_high);
38  }
39  }

◆ ~CommonSelector()

virtual GlobalSim::CommonSelector::~CommonSelector ( )
virtualdefault

Member Function Documentation

◆ select()

bool GlobalSim::CommonSelector::select ( const ICommonTOB tob) const
overridevirtual

Implements GlobalSim::ICommonSelector.

Definition at line 42 of file CommonSelector.cxx.

42  {
43  {
44  auto et = tob.et_bits().to_ulong();
45  if (et < m_et_low or et >= m_et_high) {return false;}
46  }
47 
48  {
49  auto eta = tob.eta_bits().to_ulong();
50  if (eta < m_eta_low or eta >= m_eta_high) {return false;}
51  }
52 
53  {
54  auto phi = tob.phi_bits().to_ulong();
55  if (phi < m_phi_low or phi >= m_phi_high) {return false;}
56  }
57 
58  return true;
59  };

◆ to_string()

std::string GlobalSim::CommonSelector::to_string ( ) const
overridevirtual

Implements GlobalSim::ICommonSelector.

Definition at line 61 of file CommonSelector.cxx.

61  {
62 
63  auto ss = std::stringstream();
64  ss << "et_low: " << m_et_low <<' '
65  << "et_high: " << m_et_high <<' '
66  << "eta_low: " << m_eta_low <<' '
67  << "eta_high: " << m_eta_high <<' '
68  << "phi_low: " << m_phi_low <<' '
69  << "phi_high: " << m_phi_high;
70 
71  return ss.str();
72  };

Member Data Documentation

◆ m_et_high

ulong GlobalSim::CommonSelector::m_et_high {ULONG_MAX}
private

Definition at line 45 of file CommonSelector.h.

◆ m_et_low

ulong GlobalSim::CommonSelector::m_et_low {0}
private

Definition at line 44 of file CommonSelector.h.

◆ m_eta_high

ulong GlobalSim::CommonSelector::m_eta_high {ULONG_MAX}
private

Definition at line 48 of file CommonSelector.h.

◆ m_eta_low

ulong GlobalSim::CommonSelector::m_eta_low {0}
private

Definition at line 47 of file CommonSelector.h.

◆ m_phi_high

ulong GlobalSim::CommonSelector::m_phi_high {ULONG_MAX}
private

Definition at line 52 of file CommonSelector.h.

◆ m_phi_low

ulong GlobalSim::CommonSelector::m_phi_low {0}
private

Definition at line 51 of file CommonSelector.h.


The documentation for this class was generated from the following files:
et
Extra patterns decribing particle interation process.
PowhegControl_ttHplus_NLO.ss
ss
Definition: PowhegControl_ttHplus_NLO.py:83
phi
Scalar phi() const
phi method
Definition: AmgMatrixBasePlugin.h:67
GlobalSim::CommonSelector::m_et_low
ulong m_et_low
Definition: CommonSelector.h:44
eta
Scalar eta() const
pseudorapidity method
Definition: AmgMatrixBasePlugin.h:83
GlobalSim::IOBitwise::ICommonTOB::eta_bits
virtual std::bitset< s_eta_width > eta_bits() const =0
Returns the eta bits of this TOB.
GlobalSim::CommonSelector::m_et_high
ulong m_et_high
Definition: CommonSelector.h:45
GlobalSim::IOBitwise::ICommonTOB::et_bits
virtual std::bitset< s_et_width > et_bits() const =0
Returns the eT bits of this TOB.
GlobalSim::CommonSelector::m_eta_low
ulong m_eta_low
Definition: CommonSelector.h:47
GlobalSim::IOBitwise::ICommonTOB::phi_bits
virtual std::bitset< s_phi_width > phi_bits() const =0
Returns the phi bits of this TOB.
GlobalSim::CommonSelector::m_phi_low
ulong m_phi_low
Definition: CommonSelector.h:51
GlobalSim::CommonSelector::m_phi_high
ulong m_phi_high
Definition: CommonSelector.h:52
GlobalSim::CommonSelector::m_eta_high
ulong m_eta_high
Definition: CommonSelector.h:48