ATLAS Offline Software
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"
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 
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
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.
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.
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 
64 };
65 
66 #endif
67 
IJetConstituentModifier.h
JetConstituentModifierBase::process
StatusCode process(xAOD::IParticleContainer *cont) const override final
Definition: JetConstituentModifierBase.cxx:23
Jet.h
JetConstituentModifierBase::m_applyToNeutralPFO
bool m_applyToNeutralPFO
Definition: JetConstituentModifierBase.h:63
asg::AsgTool
Base class for the dual-use tool implementation classes.
Definition: AsgTool.h:47
JetConstituentModifierBase::setEtaPhi
StatusCode setEtaPhi(xAOD::IParticle *obj, float eta, float phi) const
Definition: JetConstituentModifierBase.cxx:41
phi
Scalar phi() const
phi method
Definition: AmgMatrixBasePlugin.h:64
JetConstituentModifierBase::JetConstituentModifierBase
JetConstituentModifierBase(const std::string &name)
Definition: JetConstituentModifierBase.cxx:14
SG::Accessor
Helper class to provide type-safe access to aux data.
Definition: Control/AthContainers/AthContainers/Accessor.h:66
eta
Scalar eta() const
pseudorapidity method
Definition: AmgMatrixBasePlugin.h:79
JetConstituentModifierBase::process_impl
virtual StatusCode process_impl(xAOD::IParticleContainer *) const
Definition: JetConstituentModifierBase.h:33
test_pyathena.pt
pt
Definition: test_pyathena.py:11
xAOD::IParticle
Class providing the definition of the 4-vector interface.
Definition: Event/xAOD/xAODBase/xAODBase/IParticle.h:40
JetConstituentModifierBase::m_applyToChargedPFO
bool m_applyToChargedPFO
Definition: JetConstituentModifierBase.h:62
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
IJetConstituentModifier
Definition: IJetConstituentModifier.h:16
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
IParticleContainer.h
JetConstituentModifierBase::setP4
StatusCode setP4(xAOD::IParticle *obj, const xAOD::JetFourMom_t &p4, const SG::AuxElement::Accessor< float > *weightAcc=nullptr) const
Definition: JetConstituentModifierBase.cxx:113
DataVector
Derived DataVector<T>.
Definition: DataVector.h:581
xAOD::JetFourMom_t
ROOT::Math::LorentzVector< ROOT::Math::PtEtaPhiM4D< double > > JetFourMom_t
Base 4 Momentum type for Jet.
Definition: JetTypes.h:17
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:192
JetConstituentModifierBase
Definition: JetConstituentModifierBase.h:22
JetConstituentModifierBase::setEnergyPt
StatusCode setEnergyPt(xAOD::IParticle *obj, float e, float pt, const SG::AuxElement::Accessor< float > *weightAcc=nullptr) const
Definition: JetConstituentModifierBase.cxx:61
JetConstituentModifierBase::m_inputType
unsigned int m_inputType
Definition: JetConstituentModifierBase.h:60
DiTauMassTools::MaxHistStrategyV2::e
e
Definition: PhysicsAnalysis/TauID/DiTauMassTools/DiTauMassTools/HelperFunctions.h:26
ASG_TOOL_CLASS
#define ASG_TOOL_CLASS(CLASSNAME, INT1)
Definition: AsgToolMacros.h:68
AsgTool.h
python.PyAthena.obj
obj
Definition: PyAthena.py:135