ATLAS Offline Software
Public Member Functions | Private Attributes | List of all members
DerivationFramework::TruthEDDecorator Class Reference

#include <TruthEDDecorator.h>

Inheritance diagram for DerivationFramework::TruthEDDecorator:
Collaboration diagram for DerivationFramework::TruthEDDecorator:

Public Member Functions

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

Private Attributes

std::string m_eventInfoName
 
std::vector< std::string > m_edKeys
 
std::string m_ed_suffix
 
std::vector< SG::AuxElement::Decorator< float > > m_dec_eventShape
 

Detailed Description

Definition at line 28 of file TruthEDDecorator.h.

Constructor & Destructor Documentation

◆ TruthEDDecorator()

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

Definition at line 16 of file TruthEDDecorator.cxx.

17  : base_class(t,n,p)
18  {
19 
20  declareProperty("EventInfoName",m_eventInfoName="EventInfo");
21  declareProperty("EnergyDensityKeys",m_edKeys={"TruthIsoCentralEventShape","TruthIsoForwardEventShape"});
22  declareProperty("DecorationSuffix",m_ed_suffix="_rho");
23  }

◆ ~TruthEDDecorator()

DerivationFramework::TruthEDDecorator::~TruthEDDecorator ( )

Definition at line 26 of file TruthEDDecorator.cxx.

26 {}

Member Function Documentation

◆ addBranches()

StatusCode DerivationFramework::TruthEDDecorator::addBranches ( ) const
finaloverridevirtual

Definition at line 37 of file TruthEDDecorator.cxx.

37  {
38  ATH_MSG_VERBOSE("addBranches()");
39 
40  // Get the event info that we will decorate onto
41  const xAOD::EventInfo* eventInfo(nullptr);
42  if (evtStore()->retrieve(eventInfo,m_eventInfoName).isFailure()) {
43  ATH_MSG_ERROR("could not retrieve event info " <<m_eventInfoName);
44  return StatusCode::FAILURE;
45  }
46 
47  const xAOD::EventShape* eventShape(nullptr);
48  for (size_t i=0;i<m_edKeys.size();++i){
49  // Get the event shapes from which we'll get the densities
50  ATH_CHECK( evtStore()->retrieve(eventShape,m_edKeys[i]) );
51  // Decorate the densities onto the event info
52  m_dec_eventShape[i](*eventInfo) = acc_Density(*eventShape);
53  }
54 
55  return StatusCode::SUCCESS;
56  }

◆ initialize()

StatusCode DerivationFramework::TruthEDDecorator::initialize ( )
finaloverride

Definition at line 29 of file TruthEDDecorator.cxx.

29  {
30  for (size_t i=0;i<m_edKeys.size();++i){
31  m_dec_eventShape.emplace_back(m_edKeys[i]+m_ed_suffix );
32  }
33  return StatusCode::SUCCESS;
34  }

Member Data Documentation

◆ m_dec_eventShape

std::vector<SG::AuxElement::Decorator<float> > DerivationFramework::TruthEDDecorator::m_dec_eventShape
private

Definition at line 40 of file TruthEDDecorator.h.

◆ m_ed_suffix

std::string DerivationFramework::TruthEDDecorator::m_ed_suffix
private

Definition at line 39 of file TruthEDDecorator.h.

◆ m_edKeys

std::vector<std::string> DerivationFramework::TruthEDDecorator::m_edKeys
private

Definition at line 38 of file TruthEDDecorator.h.

◆ m_eventInfoName

std::string DerivationFramework::TruthEDDecorator::m_eventInfoName
private

Definition at line 37 of file TruthEDDecorator.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::TruthEDDecorator::m_eventInfoName
std::string m_eventInfoName
Definition: TruthEDDecorator.h:37
DerivationFramework::TruthEDDecorator::m_dec_eventShape
std::vector< SG::AuxElement::Decorator< float > > m_dec_eventShape
Definition: TruthEDDecorator.h:40
DerivationFramework::TruthEDDecorator::m_ed_suffix
std::string m_ed_suffix
Definition: TruthEDDecorator.h:39
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
lumiFormat.i
int i
Definition: lumiFormat.py:85
beamspotman.n
n
Definition: beamspotman.py:731
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
xAOD::EventShape_v1
Data class for event shapes.
Definition: EventShape_v1.h:28
columnar::ContainerId::eventInfo
@ eventInfo
xAOD::EventInfo_v1
Class describing the basic event information.
Definition: EventInfo_v1.h:43
DerivationFramework::TruthEDDecorator::m_edKeys
std::vector< std::string > m_edKeys
Definition: TruthEDDecorator.h:38