ATLAS Offline Software
Loading...
Searching...
No Matches
TrigComboHypoTool::VarInfo Struct Reference

Organise info per var selection in a struct. More...

Collaboration diagram for TrigComboHypoTool::VarInfo:

Public Member Functions

bool validate (std::string &errmsg) const
 Check consistency of single var config.
std::string rangeStr () const
 Generate range string for printing.
bool test (float value) const

Public Attributes

std::string varTag {""}
ComboHypoVars var {UNDEF}
size_t index {0}
std::string monToolName {""}
bool useMin {false}
float varMin {FLOATDEFAULT}
bool useMax {false}
float varMax {FLOATDEFAULT}
bool legA_is_MET {false}
uint32_t legA {0}
bool legB_is_MET {false}
uint32_t legB {0}
bool legsAreEqual {false}

Detailed Description

Organise info per var selection in a struct.

Definition at line 51 of file TrigComboHypoTool.h.

Member Function Documentation

◆ rangeStr()

std::string TrigComboHypoTool::VarInfo::rangeStr ( ) const
inline

Generate range string for printing.

Definition at line 71 of file TrigComboHypoTool.h.

71 {
72 return (useMin ? std::to_string(varMin) + " < " : "") + varTag + (useMax ? " < " + std::to_string(varMax): "");
73 }

◆ test()

bool TrigComboHypoTool::VarInfo::test ( float value) const
inline

Definition at line 74 of file TrigComboHypoTool.h.

74 {
75 return (useMin ? value > varMin : true) && (useMax ? value < varMax : true);
76 }

◆ validate()

bool TrigComboHypoTool::VarInfo::validate ( std::string & errmsg) const

Check consistency of single var config.

Definition at line 41 of file TrigComboHypoTool.cxx.

41 {
42 if (legA==0){
43 errmsg = "legA ID not set!";
44 return false;
45 }
46 if (legB==0){
47 errmsg="legB ID not set!";
48 return false;
49 }
50 if ((!useMin) && (!useMax)){
51 errmsg="Trying to configure the Tool without setting at least one of UseMin or UseMax!";
52 return false;
53 }
54 if (legA==legB && (legA_is_MET || legB_is_MET)) {
55 errmsg = "Cannot specify the same MET leg for both sides!";
56 return false;
57 }
58 return true;
59}
static thread_local std::ostringstream errmsg
Definition WaferTree.h:25

Member Data Documentation

◆ index

size_t TrigComboHypoTool::VarInfo::index {0}

Definition at line 54 of file TrigComboHypoTool.h.

54{0};

◆ legA

uint32_t TrigComboHypoTool::VarInfo::legA {0}

Definition at line 63 of file TrigComboHypoTool.h.

63{0};

◆ legA_is_MET

bool TrigComboHypoTool::VarInfo::legA_is_MET {false}

Definition at line 62 of file TrigComboHypoTool.h.

62{false};

◆ legB

uint32_t TrigComboHypoTool::VarInfo::legB {0}

Definition at line 65 of file TrigComboHypoTool.h.

65{0};

◆ legB_is_MET

bool TrigComboHypoTool::VarInfo::legB_is_MET {false}

Definition at line 64 of file TrigComboHypoTool.h.

64{false};

◆ legsAreEqual

bool TrigComboHypoTool::VarInfo::legsAreEqual {false}

Definition at line 66 of file TrigComboHypoTool.h.

66{false};

◆ monToolName

std::string TrigComboHypoTool::VarInfo::monToolName {""}

Definition at line 55 of file TrigComboHypoTool.h.

55{""};

◆ useMax

bool TrigComboHypoTool::VarInfo::useMax {false}

Definition at line 59 of file TrigComboHypoTool.h.

59{false};

◆ useMin

bool TrigComboHypoTool::VarInfo::useMin {false}

Definition at line 57 of file TrigComboHypoTool.h.

57{false};

◆ var

ComboHypoVars TrigComboHypoTool::VarInfo::var {UNDEF}

Definition at line 53 of file TrigComboHypoTool.h.

◆ varMax

float TrigComboHypoTool::VarInfo::varMax {FLOATDEFAULT}

Definition at line 60 of file TrigComboHypoTool.h.

static constexpr float FLOATDEFAULT

◆ varMin

float TrigComboHypoTool::VarInfo::varMin {FLOATDEFAULT}

Definition at line 58 of file TrigComboHypoTool.h.

◆ varTag

std::string TrigComboHypoTool::VarInfo::varTag {""}

Definition at line 52 of file TrigComboHypoTool.h.

52{""};

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