ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Reconstruction
Jet
JetRecTools
Root
ClusterAtEMScaleTool.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#include <vector>
6
#include "
JetRecTools/ClusterAtEMScaleTool.h
"
7
8
using namespace
std
;
9
10
11
ClusterAtEMScaleTool::ClusterAtEMScaleTool
(
const
std::string& name) :
JetConstituentModifierBase
(name)
12
{
13
}
14
15
StatusCode
ClusterAtEMScaleTool::initialize
() {
16
if
(
m_inputType
!=
xAOD::Type::CaloCluster
) {
17
ATH_MSG_ERROR
(
"As the name suggests, ClusterAtEMScaleTool cannot operate on objects of type "
18
<<
m_inputType
);
19
return
StatusCode::FAILURE;
20
}
21
return
StatusCode::SUCCESS;
22
}
23
24
StatusCode
ClusterAtEMScaleTool::setClustersToEMScale
(
xAOD::CaloClusterContainer
& cont)
const
{
25
for
(
xAOD::CaloCluster
* cl : cont ) {
26
cl->setCalE( cl->rawE() );
27
cl->setCalM( cl->rawM() );
28
cl->setCalPhi( cl->rawPhi() );
29
cl->setCalEta( cl->rawEta() );
30
}
31
32
return
StatusCode::SUCCESS;
33
}
34
35
StatusCode
ClusterAtEMScaleTool::process_impl
(
xAOD::IParticleContainer
* cont)
const
{
36
xAOD::CaloClusterContainer
* clust =
dynamic_cast<
xAOD::CaloClusterContainer
*
>
(cont);
// Get CaloCluster container
37
if
(clust)
return
setClustersToEMScale
(*clust);
38
return
StatusCode::FAILURE;
39
}
40
41
42
ClusterAtEMScaleTool::~ClusterAtEMScaleTool
()=
default
;
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition
AthMsgStreamMacros.h:33
ClusterAtEMScaleTool.h
ClusterAtEMScaleTool::~ClusterAtEMScaleTool
~ClusterAtEMScaleTool()
ClusterAtEMScaleTool::process_impl
StatusCode process_impl(xAOD::IParticleContainer *cont) const
Definition
ClusterAtEMScaleTool.cxx:35
ClusterAtEMScaleTool::initialize
StatusCode initialize()
Dummy implementation of the initialisation function.
Definition
ClusterAtEMScaleTool.cxx:15
ClusterAtEMScaleTool::ClusterAtEMScaleTool
ClusterAtEMScaleTool(const std::string &name)
Definition
ClusterAtEMScaleTool.cxx:11
ClusterAtEMScaleTool::setClustersToEMScale
StatusCode setClustersToEMScale(xAOD::CaloClusterContainer &cont) const
Definition
ClusterAtEMScaleTool.cxx:24
JetConstituentModifierBase::JetConstituentModifierBase
JetConstituentModifierBase(const std::string &name)
Definition
JetConstituentModifierBase.cxx:14
JetConstituentModifierBase::m_inputType
unsigned int m_inputType
Definition
JetConstituentModifierBase.h:60
std
STL namespace.
xAODType::CaloCluster
@ CaloCluster
The object is a calorimeter cluster.
Definition
ObjectType.h:39
xAOD::CaloCluster
CaloCluster_v1 CaloCluster
Define the latest version of the calorimeter cluster class.
Definition
Event/xAOD/xAODCaloEvent/xAODCaloEvent/CaloCluster.h:19
xAOD::CaloClusterContainer
CaloClusterContainer_v1 CaloClusterContainer
Define the latest version of the calorimeter cluster container.
Definition
Event/xAOD/xAODCaloEvent/xAODCaloEvent/CaloClusterContainer.h:17
xAOD::IParticleContainer
DataVector< IParticle > IParticleContainer
Simple convenience declaration of IParticleContainer.
Definition
xAOD/xAODBase/xAODBase/IParticleContainer.h:32
Generated on
for ATLAS Offline Software by
1.17.0