ATLAS Offline Software
Public Member Functions | Private Attributes | List of all members
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 ()
 
StatusCode initialize ()
 
StatusCode finalize ()
 
virtual StatusCode addBranches () const
 

Private Attributes

std::string m_eventInfoName
 
ToolHandle< DerivationFramework::BoostedHadTopAndTopPairFilterToolm_filterTool_High
 
ToolHandle< DerivationFramework::BoostedHadTopAndTopPairFilterToolm_filterTool_Low
 

Detailed Description

Definition at line 26 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 13 of file BoostedHadTopAndTopPairFilterAugmentation.cxx.

13  :
14  base_class(t,n,p),
17 {
18 
19 
20  declareProperty("EventInfoName",m_eventInfoName="EventInfo");
21  declareProperty("FilterTool_High", m_filterTool_High);
22  declareProperty("FilterTool_Low", m_filterTool_Low);
23 
24 
25 }

◆ ~BoostedHadTopAndTopPairFilterAugmentation()

DerivationFramework::BoostedHadTopAndTopPairFilterAugmentation::~BoostedHadTopAndTopPairFilterAugmentation ( )

Definition at line 29 of file BoostedHadTopAndTopPairFilterAugmentation.cxx.

29 {}

Member Function Documentation

◆ addBranches()

StatusCode DerivationFramework::BoostedHadTopAndTopPairFilterAugmentation::addBranches ( ) const
virtual

Definition at line 63 of file BoostedHadTopAndTopPairFilterAugmentation.cxx.

63  {
64 
66 
67  if (evtStore()->retrieve(eventInfo,m_eventInfoName).isFailure()) {
68  ATH_MSG_ERROR("could not retrieve event info " <<m_eventInfoName);
69  return StatusCode::FAILURE;
70  }
71 
72  // call first the tool for high pT values
73  static const SG::AuxElement::Decorator<int> decorationttbarSysPt_High("TTbar350");
74  static const SG::AuxElement::Decorator<int> decorationHadTopPt_High("HadTop500");
75 
76  int filterCode_High = m_filterTool_High->filterFlag(500000.0, 350000.0);
77 
78  if (filterCode_High == 0 ){
79  decorationHadTopPt_High(*eventInfo) = 0;
80  decorationttbarSysPt_High(*eventInfo) = 0;
81  }
82  else if ( filterCode_High == 1){
83  decorationttbarSysPt_High(*eventInfo) = 1;
84  decorationHadTopPt_High(*eventInfo) = 0;
85  }
86  else if ( filterCode_High == 2){
87  decorationttbarSysPt_High(*eventInfo) = 0;
88  decorationHadTopPt_High(*eventInfo) = 1;
89 
90  }
91  else if ( filterCode_High == 3){
92  decorationttbarSysPt_High(*eventInfo) = 1;
93  decorationHadTopPt_High(*eventInfo) = 1;
94  }
95 
96 
97  // now call tool for low pT values
98  static const SG::AuxElement::Decorator<int> decorationttbarSysPt_Low("TTbar150");
99  static const SG::AuxElement::Decorator<int> decorationHadTopPt_Low("HadTop200");
100 
101  int filterCode_Low = m_filterTool_Low->filterFlag(200000.0, 150000.0);
102 
103  if (filterCode_Low == 0 ){
104  decorationHadTopPt_Low(*eventInfo) = 0;
105  decorationttbarSysPt_Low(*eventInfo) = 0;
106  }
107  else if ( filterCode_Low == 1){
108  decorationttbarSysPt_Low(*eventInfo) = 1;
109  decorationHadTopPt_Low(*eventInfo) = 0;
110  }
111  else if ( filterCode_Low == 2){
112  decorationttbarSysPt_Low(*eventInfo) = 0;
113  decorationHadTopPt_Low(*eventInfo) = 1;
114 
115  }
116  else if ( filterCode_Low == 3){
117  decorationttbarSysPt_Low(*eventInfo) = 1;
118  decorationHadTopPt_Low(*eventInfo) = 1;
119  }
120 
121 
122 
123  //ATH_MSG_INFO("filterCode "<<filterCode );
124 
125 
126  return StatusCode::SUCCESS;
127 
128 }

◆ finalize()

StatusCode DerivationFramework::BoostedHadTopAndTopPairFilterAugmentation::finalize ( )

Definition at line 55 of file BoostedHadTopAndTopPairFilterAugmentation.cxx.

55  {
56 
57  return StatusCode::SUCCESS;
58 
59 }

◆ initialize()

StatusCode DerivationFramework::BoostedHadTopAndTopPairFilterAugmentation::initialize ( )

Definition at line 33 of file BoostedHadTopAndTopPairFilterAugmentation.cxx.

33  {
34 
35  ATH_MSG_INFO("Initialize " );
36 
37 
38  if(m_filterTool_High.retrieve().isFailure()){
39  ATH_MSG_ERROR("unable to retrieve filter tool " << m_filterTool_High);
40  return StatusCode::FAILURE;
41  }
42 
43  if(m_filterTool_Low.retrieve().isFailure()){
44  ATH_MSG_ERROR("unable to retrieve filter tool " << m_filterTool_Low);
45  return StatusCode::FAILURE;
46  }
47 
48 
49  return StatusCode::SUCCESS;
50 
51 }

Member Data Documentation

◆ m_eventInfoName

std::string DerivationFramework::BoostedHadTopAndTopPairFilterAugmentation::m_eventInfoName
private

Definition at line 40 of file BoostedHadTopAndTopPairFilterAugmentation.h.

◆ m_filterTool_High

ToolHandle<DerivationFramework::BoostedHadTopAndTopPairFilterTool> DerivationFramework::BoostedHadTopAndTopPairFilterAugmentation::m_filterTool_High
private

Definition at line 41 of file BoostedHadTopAndTopPairFilterAugmentation.h.

◆ m_filterTool_Low

ToolHandle<DerivationFramework::BoostedHadTopAndTopPairFilterTool> DerivationFramework::BoostedHadTopAndTopPairFilterAugmentation::m_filterTool_Low
private

Definition at line 42 of file BoostedHadTopAndTopPairFilterAugmentation.h.


The documentation for this class was generated from the following files:
python.PyKernel.retrieve
def retrieve(aClass, aKey=None)
Definition: PyKernel.py:110
DerivationFramework::BoostedHadTopAndTopPairFilterAugmentation::m_eventInfoName
std::string m_eventInfoName
Definition: BoostedHadTopAndTopPairFilterAugmentation.h:40
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
DerivationFramework::BoostedHadTopAndTopPairFilterAugmentation::m_filterTool_Low
ToolHandle< DerivationFramework::BoostedHadTopAndTopPairFilterTool > m_filterTool_Low
Definition: BoostedHadTopAndTopPairFilterAugmentation.h:42
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
DerivationFramework::BoostedHadTopAndTopPairFilterAugmentation::m_filterTool_High
ToolHandle< DerivationFramework::BoostedHadTopAndTopPairFilterTool > m_filterTool_High
Definition: BoostedHadTopAndTopPairFilterAugmentation.h:41
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
SG::Decorator
Helper class to provide type-safe access to aux data.
Definition: Decorator.h:59
beamspotman.n
n
Definition: beamspotman.py:731
columnar::ContainerId::eventInfo
@ eventInfo
xAOD::EventInfo_v1
Class describing the basic event information.
Definition: EventInfo_v1.h:43