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

#include <TrigJetConditionConfig_phi.h>

Inheritance diagram for TrigJetConditionConfig_phi:
Collaboration diagram for TrigJetConditionConfig_phi:

Public Member Functions

 TrigJetConditionConfig_phi (const std::string &type, const std::string &name, const IInterface *parent)
virtual StatusCode initialize () override
virtual Condition getCondition () const override

Private Member Functions

StatusCode checkVals () const

Private Attributes

Gaudi::Property< std::string > m_strmin {this, "min", {}, "min for phi region"}
Gaudi::Property< std::string > m_strmax {this, "max", {}, "max for phi region"}
double m_min {0.}
double m_max {0.}

Detailed Description

Definition at line 13 of file TrigJetConditionConfig_phi.h.

Constructor & Destructor Documentation

◆ TrigJetConditionConfig_phi()

TrigJetConditionConfig_phi::TrigJetConditionConfig_phi ( const std::string & type,
const std::string & name,
const IInterface * parent )

Definition at line 11 of file TrigJetConditionConfig_phi.cxx.

13 :
14 base_class(type, name, parent){
15
16}

Member Function Documentation

◆ checkVals()

StatusCode TrigJetConditionConfig_phi::checkVals ( ) const
private

Definition at line 54 of file TrigJetConditionConfig_phi.cxx.

54 {
55
56 if (m_min > m_max){
57 ATH_MSG_ERROR(" min phi > max phi");
58 return StatusCode::FAILURE;
59 }
60
61 if (m_min < -M_PI) {
62 ATH_MSG_ERROR(" min phi " << m_min << " out of range");
63 return StatusCode::FAILURE;
64 }
65
66 if (m_max > M_PI) {
67 ATH_MSG_ERROR(" max phi " << m_max << " out of range");
68 return StatusCode::FAILURE;
69 }
70
71 return StatusCode::SUCCESS;
72}
#define M_PI
#define ATH_MSG_ERROR(x)

◆ getCondition()

Condition TrigJetConditionConfig_phi::getCondition ( ) const
overridevirtual

Definition at line 49 of file TrigJetConditionConfig_phi.cxx.

49 {
50 return std::make_unique<PhiCondition>(m_min, m_max);
51}

◆ initialize()

StatusCode TrigJetConditionConfig_phi::initialize ( )
overridevirtual

Definition at line 18 of file TrigJetConditionConfig_phi.cxx.

18 {
19
20 auto convert = [](const std::string& s) {
21
22 if (s == "PI"){
23 return M_PI;
24 } else if (s == "-PI") {
25 return -M_PI;
26 }
27 return std::stod(s);
28 };
29
30 try {
32 } catch (...) {
33 ATH_MSG_ERROR ("Cannot convert " + m_strmin + " to double");
34 return StatusCode::FAILURE;
35 }
36
37 try {
39 } catch (...) {
40 ATH_MSG_ERROR ("Cannot convert " + m_strmax + " to double");
41 return StatusCode::FAILURE;
42 }
43
45 return StatusCode::SUCCESS;
46}
#define CHECK(...)
Evaluate an expression and check for errors.
Gaudi::Property< std::string > m_strmax
Gaudi::Property< std::string > m_strmin
std::unique_ptr< MVAUtils::BDT > convert(TMVA::MethodBDT *bdt, bool isRegression=true, bool useYesNoLeaf=false)

Member Data Documentation

◆ m_max

double TrigJetConditionConfig_phi::m_max {0.}
private

Definition at line 38 of file TrigJetConditionConfig_phi.h.

38{0.};

◆ m_min

double TrigJetConditionConfig_phi::m_min {0.}
private

Definition at line 37 of file TrigJetConditionConfig_phi.h.

37{0.};

◆ m_strmax

Gaudi::Property<std::string> TrigJetConditionConfig_phi::m_strmax {this, "max", {}, "max for phi region"}
private

Definition at line 35 of file TrigJetConditionConfig_phi.h.

35{this, "max", {}, "max for phi region"};

◆ m_strmin

Gaudi::Property<std::string> TrigJetConditionConfig_phi::m_strmin {this, "min", {}, "min for phi region"}
private

Definition at line 32 of file TrigJetConditionConfig_phi.h.

32{this, "min", {}, "min for phi region"};

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