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 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 };
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 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 };
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: