ATLAS Offline Software
Loading...
Searching...
No Matches
IIsolationCloseByCorrectionTool.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3 */
4
5#ifndef ISOLATIONSELECTION_IISOLATIONCLOSEBYCORRECTIONTOOL_H
6#define ISOLATIONSELECTION_IISOLATIONCLOSEBYCORRECTIONTOOL_H
7
9#include <AsgTools/IAsgTool.h>
13#include <PATCore/AcceptData.h>
14#include <PATCore/AcceptInfo.h>
20
21class EventContext;
22
23namespace CP {
26 public:
27 // This function calculates and applies (the particle is not redecorated) the corrections for close-by objects for each isolation
28 // variables and tests whether the particle passes the isolation working point after the corrections. Note that to use this
29 // functionality, a IsolationSelectionTool must have been passed to the tool (which must have been intialised indicating which
30 // isolation working point to use). The result returned is a AcceptData object which is the decision made by the tool with respect
31 // to the particle passing the working point.
32 virtual asg::AcceptData acceptCorrected(const xAOD::IParticle& x, const xAOD::IParticleContainer& closePar) const = 0;
33
34 // This function calculates the values of the corrections for close-by objects to be applied to the isolation variables (without
35 // redecorating the particles). The corrections are returned in a vector (one correction per isolation type provided). This function
36 // is intended for experts only who want to check the effects of the corrections.
37 virtual CorrectionCode getCloseByCorrection(std::vector<float>& corrections, const xAOD::IParticle& par,
38 const std::vector<xAOD::Iso::IsolationType>& types,
39 const xAOD::IParticleContainer& closePar) const = 0;
40
41 // This function calculates the values of the corrections for close-by objects and applies them to the isolation variables and
42 // writes them out as a new decoration of the particles. This requires a suffix to be specified for the new decoration, otherwise
43 // an ERROR will be returned.
45 const EventContext& ctx,
46 const xAOD::ElectronContainer* Electrons = nullptr,
47 const xAOD::MuonContainer* Muons = nullptr,
48 const xAOD::PhotonContainer* Photons = nullptr
49 ) const = 0;
50 virtual float getOriginalIsolation(const xAOD::IParticle& P, IsoType type) const = 0;
51 virtual float getOriginalIsolation(const xAOD::IParticle* P, IsoType type) const = 0;
52
54 virtual void associateCluster(const xAOD::IParticle* particle, float& eta, float& phi, float& energy) const = 0;
55
56 virtual void associateFlowElement(const EventContext& ctx, const xAOD::IParticle* particle, float& eta, float& phi,
57 float& energy) const = 0;
58
61 virtual TrackSet getTrackCandidates(const EventContext& ctx, const xAOD::IParticle* particle) const = 0;
62
64 virtual const xAOD::IParticle* isoRefParticle(const xAOD::IParticle* particle) const = 0;
65
67 };
68
69} // namespace CP
70#endif
Scalar eta() const
pseudorapidity method
#define ASG_TOOL_INTERFACE(CLASSNAME)
Property holding a SG store/key/clid from which a ReadHandle is made.
static Double_t P(Double_t *tt, Double_t *par)
#define x
Define macros for attributes used to control the static checker.
Return value from object correction CP tools.
virtual TrackSet getTrackCandidates(const EventContext &ctx, const xAOD::IParticle *particle) const =0
Retrieve the track particles associated with the primary particle.
virtual asg::AcceptData acceptCorrected(const xAOD::IParticle &x, const xAOD::IParticleContainer &closePar) const =0
virtual ~IIsolationCloseByCorrectionTool()=default
virtual float getOriginalIsolation(const xAOD::IParticle &P, IsoType type) const =0
virtual float getOriginalIsolation(const xAOD::IParticle *P, IsoType type) const =0
virtual CorrectionCode getCloseByCorrection(std::vector< float > &corrections, const xAOD::IParticle &par, const std::vector< xAOD::Iso::IsolationType > &types, const xAOD::IParticleContainer &closePar) const =0
virtual CorrectionCode getCloseByIsoCorrection(const EventContext &ctx, const xAOD::ElectronContainer *Electrons=nullptr, const xAOD::MuonContainer *Muons=nullptr, const xAOD::PhotonContainer *Photons=nullptr) const =0
virtual void associateFlowElement(const EventContext &ctx, const xAOD::IParticle *particle, float &eta, float &phi, float &energy) const =0
virtual void associateCluster(const xAOD::IParticle *particle, float &eta, float &phi, float &energy) const =0
Retrieve the associated clusters from the Particle and calculate the average eta/phi/energy.
virtual const xAOD::IParticle * isoRefParticle(const xAOD::IParticle *particle) const =0
Retrieve the reference particle to define the cone axis in which the track particles contributing to ...
Base class for the dual-use tool interface classes.
Definition IAsgTool.h:41
Class providing the definition of the 4-vector interface.
Select isolated Photons, Electrons and Muons.
Definition Muons.py:1
PhotonContainer_v1 PhotonContainer
Definition of the current "photon container version".
ElectronContainer_v1 ElectronContainer
Definition of the current "electron container version".
static const EventInfo_v1::Accessor< std::vector< std::string > > types("streamTagTypes")
MuonContainer_v1 MuonContainer
Definition of the current "Muon container version".
DataVector< IParticle > IParticleContainer
Simple convenience declaration of IParticleContainer.