ATLAS Offline Software
Loading...
Searching...
No Matches
GlobalSim::CommonSelector Class Reference

#include <CommonSelector.h>

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

Public Member Functions

 CommonSelector ()=default
 Passes all.
 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
virtual ~CommonSelector ()=default
virtual bool select (const CommonTOB &) 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 auto unsignedLong = [](const std::string & txt)->unsigned long{
23 if (txt == "inf") return ULONG_MAX;
24 return std::stoul(txt);
25 };
26 //
27 m_et_high = unsignedLong(et_high);
28 m_eta_high = unsignedLong(eta_high);
29 m_phi_high = unsignedLong(phi_high);
30 }

◆ ~CommonSelector()

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

Member Function Documentation

◆ select()

bool GlobalSim::CommonSelector::select ( const CommonTOB & tob) const
overridevirtual

Implements GlobalSim::ICommonSelector.

Definition at line 33 of file CommonSelector.cxx.

33 {
34 {
35 auto et = tob.et_bits().to_ulong();
36 if (et < m_et_low or et >= m_et_high) {return false;}
37 }
38
39 {
40 auto eta = tob.eta_bits().to_ulong();
41 if (eta < m_eta_low or eta >= m_eta_high) {return false;}
42 }
43
44 {
45 auto phi = tob.phi_bits().to_ulong();
46 if (phi < m_phi_low or phi >= m_phi_high) {return false;}
47 }
48
49 return true;
50 };
Scalar eta() const
pseudorapidity method
Scalar phi() const
phi method
float et(const xAOD::jFexSRJetRoI *j)

◆ to_string()

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

Implements GlobalSim::ICommonSelector.

Definition at line 52 of file CommonSelector.cxx.

52 {
53
54 auto ss = std::stringstream();
55 ss << "et_low: " << m_et_low <<' '
56 << "et_high: " << m_et_high <<' '
57 << "eta_low: " << m_eta_low <<' '
58 << "eta_high: " << m_eta_high <<' '
59 << "phi_low: " << m_phi_low <<' '
60 << "phi_high: " << m_phi_high;
61
62 return ss.str();
63 };
static Double_t ss

Member Data Documentation

◆ m_et_high

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

Definition at line 45 of file CommonSelector.h.

45{ULONG_MAX};

◆ m_et_low

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

Definition at line 44 of file CommonSelector.h.

44{0};

◆ m_eta_high

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

Definition at line 48 of file CommonSelector.h.

48{ULONG_MAX};

◆ m_eta_low

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

Definition at line 47 of file CommonSelector.h.

47{0};

◆ m_phi_high

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

Definition at line 52 of file CommonSelector.h.

52{ULONG_MAX};

◆ m_phi_low

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

Definition at line 51 of file CommonSelector.h.

51{0};

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