ATLAS Offline Software
Loading...
Searching...
No Matches
Reconstruction
Jet
JetRecTools
JetRecTools
JetConstituentModifierBase.h
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
//JetConstituentModifierBase.h
6
7
#ifndef JETRECTOOLS_JETCONSTITUENTMODIFIERBASE_H
8
#define JETRECTOOLS_JETCONSTITUENTMODIFIERBASE_H
9
12
13
#include "
AsgTools/AsgTool.h
"
14
#include "
xAODBase/IParticleContainer.h
"
15
#include "
JetInterface/IJetConstituentModifier.h
"
16
#include "
xAODJet/Jet.h
"
17
18
// JetConstituentModifierBase provides default execute () behaviour
19
// to all JetConstituentModifier tools. Can be used in Rootcore, without
20
// the need for a sequence.
21
22
class
JetConstituentModifierBase
:
public
asg::AsgTool
,
virtual
public
IJetConstituentModifier
{
23
ASG_TOOL_CLASS
(
JetConstituentModifierBase
,
IJetConstituentModifier
)
24
public
:
25
JetConstituentModifierBase
(
const
std::string & name);
26
27
// Implement the IJetConstituentModifier interface
28
// Do some type-checking on the input container
29
StatusCode
process
(
xAOD::IParticleContainer
* cont)
const
override
final
;
30
// Concrete implementation method to be overridden by child tools
31
// We pass a pointer here, because some of the type-specific tools
32
// will want to cast to the right container type
33
virtual
StatusCode
process_impl
(
xAOD::IParticleContainer
*
/*cont*/
)
const
34
{
35
ATH_MSG_ERROR
(
"This is the JetConstituentModifierBase class, no corrections implemented!"
);
36
return
StatusCode::FAILURE;
37
}
38
39
protected
:
40
// Define four-momentum setters that will handle type-specific operations
41
// Multiple versions are needed that only correct particular four-vector
42
// components, to avoid producing unnecessary shallow copy branches
43
44
// Setter for eta/phi
45
StatusCode
setEtaPhi
(
xAOD::IParticle
* obj,
float
eta
,
float
phi
)
const
;
46
// Setter for e/pt, and optionally a weight
47
// We pass the weight accessor so that the child can determine the name.
48
StatusCode
setEnergyPt
(
xAOD::IParticle
* obj,
float
e,
float
pt,
49
const
SG::AuxElement::Accessor<float>
* weightAcc=
nullptr
)
const
;
50
// Setter for full four-vector, and optionally a weight
51
// We pass the weight accessor so that the child can determine the name.
52
StatusCode
setP4
(
xAOD::IParticle
* obj,
const
xAOD::JetFourMom_t
& p4,
53
const
SG::AuxElement::Accessor<float>
* weightAcc=
nullptr
)
const
;
54
55
// We need to know the output type so that we can set the p4 appropriately,
56
// because IParticle does not specify the p4 encoding.
57
// The user must explicitly set what sort of object they modify
58
// Define as a basic integer type because Gaudi
59
// doesn't support arbitrary property types
60
unsigned
int
m_inputType
=
xAOD::Type::Other
;
61
62
bool
m_applyToChargedPFO
=
true
;
63
bool
m_applyToNeutralPFO
=
true
;
64
};
65
66
#endif
67
eta
Scalar eta() const
pseudorapidity method
Definition
AmgMatrixBasePlugin.h:83
phi
Scalar phi() const
phi method
Definition
AmgMatrixBasePlugin.h:67
ASG_TOOL_CLASS
#define ASG_TOOL_CLASS(CLASSNAME, INT1)
Definition
AsgToolMacros.h:68
AsgTool.h
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition
AthMsgStreamMacros.h:33
Jet.h
IJetConstituentModifier.h
IJetConstituentModifier
Definition
IJetConstituentModifier.h:16
JetConstituentModifierBase::m_applyToNeutralPFO
bool m_applyToNeutralPFO
Definition
JetConstituentModifierBase.h:63
JetConstituentModifierBase::JetConstituentModifierBase
JetConstituentModifierBase(const std::string &name)
Definition
JetConstituentModifierBase.cxx:14
JetConstituentModifierBase::setEtaPhi
StatusCode setEtaPhi(xAOD::IParticle *obj, float eta, float phi) const
Definition
JetConstituentModifierBase.cxx:41
JetConstituentModifierBase::setP4
StatusCode setP4(xAOD::IParticle *obj, const xAOD::JetFourMom_t &p4, const SG::AuxElement::Accessor< float > *weightAcc=nullptr) const
Definition
JetConstituentModifierBase.cxx:113
JetConstituentModifierBase::m_inputType
unsigned int m_inputType
Definition
JetConstituentModifierBase.h:60
JetConstituentModifierBase::setEnergyPt
StatusCode setEnergyPt(xAOD::IParticle *obj, float e, float pt, const SG::AuxElement::Accessor< float > *weightAcc=nullptr) const
Definition
JetConstituentModifierBase.cxx:61
JetConstituentModifierBase::process_impl
virtual StatusCode process_impl(xAOD::IParticleContainer *) const
Definition
JetConstituentModifierBase.h:33
JetConstituentModifierBase::m_applyToChargedPFO
bool m_applyToChargedPFO
Definition
JetConstituentModifierBase.h:62
SG::AuxElement::Accessor
SG::Accessor< T, ALLOC > Accessor
Definition
AuxElement.h:572
asg::AsgTool
Base class for the dual-use tool implementation classes.
Definition
AsgTool.h:47
xAOD::IParticle
Class providing the definition of the 4-vector interface.
Definition
Event/xAOD/xAODBase/xAODBase/IParticle.h:41
process
const std::string process
Definition
fbtTestBasics.cxx:76
xAODType::Other
@ Other
An object not falling into any of the other categories.
Definition
ObjectType.h:34
xAOD::IParticleContainer
DataVector< IParticle > IParticleContainer
Simple convenience declaration of IParticleContainer.
Definition
xAOD/xAODBase/xAODBase/IParticleContainer.h:32
xAOD::JetFourMom_t
ROOT::Math::LorentzVector< ROOT::Math::PtEtaPhiM4D< double > > JetFourMom_t
Base 4 Momentum type for Jet.
Definition
JetTypes.h:17
IParticleContainer.h
Generated on
for ATLAS Offline Software by
1.14.0