ATLAS Offline Software
Loading...
Searching...
No Matches
DerivationFramework::BoostedHadTopAndTopPairFilterAugmentation Class Reference

#include <BoostedHadTopAndTopPairFilterAugmentation.h>

Inheritance diagram for DerivationFramework::BoostedHadTopAndTopPairFilterAugmentation:
Collaboration diagram for DerivationFramework::BoostedHadTopAndTopPairFilterAugmentation:

Public Member Functions

 BoostedHadTopAndTopPairFilterAugmentation (const std::string &t, const std::string &n, const IInterface *p)
 ~BoostedHadTopAndTopPairFilterAugmentation ()
virtual StatusCode initialize () override final
virtual StatusCode addBranches (const EventContext &ctx) const override final

Private Attributes

SG::ReadHandleKey< xAOD::EventInfom_eventInfoName {this, "EventInfoName", "EventInfo", ""}
SG::WriteDecorHandleKey< xAOD::EventInfom_ttbarSysPt_HighKey {this, "ttbarSysPt_HighKey", m_eventInfoName, "TTbar350"}
SG::WriteDecorHandleKey< xAOD::EventInfom_HadTopPt_HighKey {this, "HadTopPt_HighKey", m_eventInfoName, "HadTop350"}
SG::WriteDecorHandleKey< xAOD::EventInfom_ttbarSysPt_LowKey {this, "ttbarSysPt_LowKey", m_eventInfoName, "TTbar150"}
SG::WriteDecorHandleKey< xAOD::EventInfom_HadTopPt_LowKey {this, "HadTopPt_LowKey", m_eventInfoName, "HadTop200"}
ToolHandle< DerivationFramework::BoostedHadTopAndTopPairFilterToolm_filterTool_Low {this, "FilterTool_Low", ""}
ToolHandle< DerivationFramework::BoostedHadTopAndTopPairFilterToolm_filterTool_High {this, "FilterTool_High", ""}

Detailed Description

Definition at line 27 of file BoostedHadTopAndTopPairFilterAugmentation.h.

Constructor & Destructor Documentation

◆ BoostedHadTopAndTopPairFilterAugmentation()

DerivationFramework::BoostedHadTopAndTopPairFilterAugmentation::BoostedHadTopAndTopPairFilterAugmentation ( const std::string & t,
const std::string & n,
const IInterface * p )

Definition at line 12 of file BoostedHadTopAndTopPairFilterAugmentation.cxx.

12 :
13 base_class(t,n,p)
14 {
15 }

◆ ~BoostedHadTopAndTopPairFilterAugmentation()

DerivationFramework::BoostedHadTopAndTopPairFilterAugmentation::~BoostedHadTopAndTopPairFilterAugmentation ( )

Definition at line 19 of file BoostedHadTopAndTopPairFilterAugmentation.cxx.

19{}

Member Function Documentation

◆ addBranches()

StatusCode DerivationFramework::BoostedHadTopAndTopPairFilterAugmentation::addBranches ( const EventContext & ctx) const
finaloverridevirtual

Definition at line 37 of file BoostedHadTopAndTopPairFilterAugmentation.cxx.

37 {
38 SG::ReadHandle<xAOD::EventInfo> eventInfo{m_eventInfoName, ctx};
39 if (!eventInfo.isValid()) {
40 ATH_MSG_ERROR("could not retrieve event info " <<m_eventInfoName);
41 return StatusCode::FAILURE;
42 }
43
44 // call first the tool for high pT values
45 SG::WriteDecorHandle<xAOD::EventInfo, int> decorationttbarSysPt_High(m_ttbarSysPt_HighKey, ctx);
46 SG::WriteDecorHandle<xAOD::EventInfo, int> decorationHadTopPt_High(m_HadTopPt_HighKey, ctx);
47
48 int filterCode_High = m_filterTool_High->filterFlag(500000.0, 350000.0);
49
50 if (filterCode_High == 0 ){
51 decorationHadTopPt_High(*eventInfo) = 0;
52 decorationttbarSysPt_High(*eventInfo) = 0;
53 }
54 else if ( filterCode_High == 1){
55 decorationttbarSysPt_High(*eventInfo) = 1;
56 decorationHadTopPt_High(*eventInfo) = 0;
57 }
58 else if ( filterCode_High == 2){
59 decorationttbarSysPt_High(*eventInfo) = 0;
60 decorationHadTopPt_High(*eventInfo) = 1;
61
62 }
63 else if ( filterCode_High == 3){
64 decorationttbarSysPt_High(*eventInfo) = 1;
65 decorationHadTopPt_High(*eventInfo) = 1;
66 }
67
68
69 // now call tool for low pT values
70 SG::WriteDecorHandle<xAOD::EventInfo, int> decorationttbarSysPt_Low(m_ttbarSysPt_LowKey, ctx);
71 SG::WriteDecorHandle<xAOD::EventInfo, int> decorationHadTopPt_Low(m_HadTopPt_LowKey, ctx);
72
73 int filterCode_Low = m_filterTool_Low->filterFlag(200000.0, 150000.0);
74
75 if (filterCode_Low == 0 ){
76 decorationHadTopPt_Low(*eventInfo) = 0;
77 decorationttbarSysPt_Low(*eventInfo) = 0;
78 }
79 else if ( filterCode_Low == 1){
80 decorationttbarSysPt_Low(*eventInfo) = 1;
81 decorationHadTopPt_Low(*eventInfo) = 0;
82 }
83 else if ( filterCode_Low == 2){
84 decorationttbarSysPt_Low(*eventInfo) = 0;
85 decorationHadTopPt_Low(*eventInfo) = 1;
86
87 }
88 else if ( filterCode_Low == 3){
89 decorationttbarSysPt_Low(*eventInfo) = 1;
90 decorationHadTopPt_Low(*eventInfo) = 1;
91 }
92
93
94
95 //ATH_MSG_INFO("filterCode "<<filterCode );
96
97
98 return StatusCode::SUCCESS;
99
100 }
#define ATH_MSG_ERROR(x)
ToolHandle< DerivationFramework::BoostedHadTopAndTopPairFilterTool > m_filterTool_High
ToolHandle< DerivationFramework::BoostedHadTopAndTopPairFilterTool > m_filterTool_Low
virtual bool isValid() override final
Can the handle be successfully dereferenced?

◆ initialize()

StatusCode DerivationFramework::BoostedHadTopAndTopPairFilterAugmentation::initialize ( )
finaloverridevirtual

Definition at line 23 of file BoostedHadTopAndTopPairFilterAugmentation.cxx.

23 {
24 ATH_MSG_DEBUG( "Initialize" );
25 ATH_CHECK(m_eventInfoName.initialize());
26 ATH_CHECK(m_ttbarSysPt_HighKey.initialize());
27 ATH_CHECK(m_HadTopPt_HighKey.initialize());
28 ATH_CHECK(m_ttbarSysPt_LowKey.initialize());
29 ATH_CHECK(m_HadTopPt_LowKey.initialize());
30 ATH_CHECK(m_filterTool_High.retrieve());
31 ATH_CHECK(m_filterTool_Low.retrieve());
32 return StatusCode::SUCCESS;
33 }
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_DEBUG(x)

Member Data Documentation

◆ m_eventInfoName

SG::ReadHandleKey<xAOD::EventInfo> DerivationFramework::BoostedHadTopAndTopPairFilterAugmentation::m_eventInfoName {this, "EventInfoName", "EventInfo", ""}
private

Definition at line 38 of file BoostedHadTopAndTopPairFilterAugmentation.h.

38{this, "EventInfoName", "EventInfo", ""};

◆ m_filterTool_High

ToolHandle<DerivationFramework::BoostedHadTopAndTopPairFilterTool> DerivationFramework::BoostedHadTopAndTopPairFilterAugmentation::m_filterTool_High {this, "FilterTool_High", ""}
private

Definition at line 44 of file BoostedHadTopAndTopPairFilterAugmentation.h.

44{this, "FilterTool_High", ""};

◆ m_filterTool_Low

ToolHandle<DerivationFramework::BoostedHadTopAndTopPairFilterTool> DerivationFramework::BoostedHadTopAndTopPairFilterAugmentation::m_filterTool_Low {this, "FilterTool_Low", ""}
private

Definition at line 43 of file BoostedHadTopAndTopPairFilterAugmentation.h.

43{this, "FilterTool_Low", ""};

◆ m_HadTopPt_HighKey

SG::WriteDecorHandleKey<xAOD::EventInfo> DerivationFramework::BoostedHadTopAndTopPairFilterAugmentation::m_HadTopPt_HighKey {this, "HadTopPt_HighKey", m_eventInfoName, "HadTop350"}
private

Definition at line 40 of file BoostedHadTopAndTopPairFilterAugmentation.h.

40{this, "HadTopPt_HighKey", m_eventInfoName, "HadTop350"};

◆ m_HadTopPt_LowKey

SG::WriteDecorHandleKey<xAOD::EventInfo> DerivationFramework::BoostedHadTopAndTopPairFilterAugmentation::m_HadTopPt_LowKey {this, "HadTopPt_LowKey", m_eventInfoName, "HadTop200"}
private

Definition at line 42 of file BoostedHadTopAndTopPairFilterAugmentation.h.

42{this, "HadTopPt_LowKey", m_eventInfoName, "HadTop200"};

◆ m_ttbarSysPt_HighKey

SG::WriteDecorHandleKey<xAOD::EventInfo> DerivationFramework::BoostedHadTopAndTopPairFilterAugmentation::m_ttbarSysPt_HighKey {this, "ttbarSysPt_HighKey", m_eventInfoName, "TTbar350"}
private

Definition at line 39 of file BoostedHadTopAndTopPairFilterAugmentation.h.

39{this, "ttbarSysPt_HighKey", m_eventInfoName, "TTbar350"};

◆ m_ttbarSysPt_LowKey

SG::WriteDecorHandleKey<xAOD::EventInfo> DerivationFramework::BoostedHadTopAndTopPairFilterAugmentation::m_ttbarSysPt_LowKey {this, "ttbarSysPt_LowKey", m_eventInfoName, "TTbar150"}
private

Definition at line 41 of file BoostedHadTopAndTopPairFilterAugmentation.h.

41{this, "ttbarSysPt_LowKey", m_eventInfoName, "TTbar150"};

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