ATLAS Offline Software
Loading...
Searching...
No Matches
PhysicsAnalysis
Algorithms
TruthPartonLevelAnalysisAlgorithms
Root
RunPartonHistoryAlg.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3
*/
4
6
7
#include "
TruthPartonLevelAnalysisAlgorithms/RunPartonHistoryAlg.h
"
8
9
#include "
PartonHistory/PartonSchemeConfig.h
"
10
11
namespace
CP
{
12
RunPartonHistoryAlg::RunPartonHistoryAlg
(
const
std::string&
name
,
13
ISvcLocator* pSvcLocator)
14
:
EL
::
AnaAlgorithm
(
name
, pSvcLocator),
m_PartonScheme
(
"Ttbar"
) {
15
declareProperty
(
"partonScheme"
,
m_PartonScheme
,
"the parton history to run"
);
16
}
17
18
StatusCode
RunPartonHistoryAlg::initialize
() {
19
ANA_MSG_INFO
(
"Initializing PartonHistory "
<<
name
());
20
ANA_MSG_INFO
(
" - partonScheme: "
<<
m_PartonScheme
);
21
22
// Look up scheme configuration from the registry
23
try
{
24
const
PartonSchemeConfig
& cfg =
getSchemeConfig
(
m_PartonScheme
);
25
m_PartonHistory
= std::make_unique<CalcPartonHistory>(
26
"CP::CalcPartonHistory"
, cfg.truthCollections);
27
m_PartonHistory
->configure(cfg);
28
}
catch
(
const
std::runtime_error&
e
) {
29
ANA_MSG_ERROR
(
" ==> PartonScheme "
<<
m_PartonScheme
30
<<
" is not recognised! aborting."
);
31
return
StatusCode::FAILURE;
32
}
33
ANA_CHECK
(
m_PartonHistory
->setProperty(
"prefix"
,
m_PartonScheme
));
34
ANA_CHECK
(
m_PartonHistory
->initialize());
35
return
StatusCode::SUCCESS;
36
}
37
38
StatusCode
RunPartonHistoryAlg::execute
() {
39
ANA_CHECK
(
m_PartonHistory
->execute());
40
return
StatusCode::SUCCESS;
41
}
42
43
}
// namespace CP
ANA_MSG_INFO
#define ANA_MSG_INFO(xmsg)
Macro printing info messages.
Definition
Control/AthToolSupport/AsgMessaging/AsgMessaging/MessageCheck.h:290
ANA_MSG_ERROR
#define ANA_MSG_ERROR(xmsg)
Macro printing error messages.
Definition
Control/AthToolSupport/AsgMessaging/AsgMessaging/MessageCheck.h:294
ANA_CHECK
#define ANA_CHECK(EXP)
check whether the given expression was successful
Definition
Control/AthToolSupport/AsgMessaging/AsgMessaging/MessageCheck.h:324
PartonSchemeConfig.h
RunPartonHistoryAlg.h
AthCommonDataStore< AthCommonMsg< Algorithm > >::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
Definition
AthCommonDataStore.h:145
CP::RunPartonHistoryAlg::m_PartonScheme
std::string m_PartonScheme
Definition
RunPartonHistoryAlg.h:32
CP::RunPartonHistoryAlg::initialize
virtual StatusCode initialize() override
Definition
RunPartonHistoryAlg.cxx:18
CP::RunPartonHistoryAlg::execute
virtual StatusCode execute() override
Definition
RunPartonHistoryAlg.cxx:38
CP::RunPartonHistoryAlg::m_PartonHistory
std::unique_ptr< CalcPartonHistory > m_PartonHistory
Definition
RunPartonHistoryAlg.h:33
CP::RunPartonHistoryAlg::RunPartonHistoryAlg
RunPartonHistoryAlg(const std::string &name, ISvcLocator *pSvcLocator)
Definition
RunPartonHistoryAlg.cxx:12
EL::AnaAlgorithm::AnaAlgorithm
AnaAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
constructor with parameters
Definition
AnaAlgorithm.cxx:40
CP
Select isolated Photons, Electrons and Muons.
Definition
Control/xAODRootAccess/xAODRootAccess/TEvent.h:27
CP::getSchemeConfig
const PartonSchemeConfig & getSchemeConfig(const std::string &schemeName)
Returns the configuration for a given scheme name.
Definition
PartonSchemeConfig.cxx:14
EL
This module defines the arguments passed from the BATCH driver to the BATCH worker.
Definition
AsgComponentFactories.h:16
xAOD::name
name
Definition
TriggerMenuJson_v1.cxx:29
xAOD::e
setPy e
Definition
CompositeParticle_v1.cxx:166
CP::PartonSchemeConfig
Top-level configuration for a named parton history scheme.
Definition
PartonSchemeConfig.h:72
Generated on
for ATLAS Offline Software by
1.16.1