ATLAS Offline Software
IsolationCloseByCorrectionTool.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_IsolationCloseByCorrectionTool_H
6 #define IsolationSelection_IsolationCloseByCorrectionTool_H
7 
10 #include <AsgTools/AsgTool.h>
12 #include <AsgTools/ToolHandle.h>
14 #ifndef XAOD_ANALYSIS
18 #endif
19 
25 
26 
31 #include "xAODMuon/MuonContainer.h"
35 
36 namespace CP {
38  public:
42 
43  };
44 
45  using caloDecorNames = std::array<std::string, 4>;
47  static caloDecorNames caloDecors();
48  static caloDecorNames pflowDecors();
49 
50  using IsoHelperMap = std::map<IsoType, std::unique_ptr<IsoVariableHelper>>;
51 
52  IsolationCloseByCorrectionTool(const std::string& name);
53  // Proper constructor for athena
55 
56  virtual StatusCode initialize() override;
57 
58  virtual CorrectionCode getCloseByCorrection(std::vector<float>& corrections, const xAOD::IParticle& par,
59  const std::vector<xAOD::Iso::IsolationType>& types,
60  const xAOD::IParticleContainer& closePar) const override;
61 
62  virtual asg::AcceptData acceptCorrected(const xAOD::IParticle& x, const xAOD::IParticleContainer& closePar) const override;
63 
65  const EventContext& ctx,
66  const xAOD::ElectronContainer* Electrons,
67  const xAOD::MuonContainer* Muons,
68  const xAOD::PhotonContainer* Photons) const override;
69 
70  virtual float getOriginalIsolation(const xAOD::IParticle& P, IsoType type) const override;
71  virtual float getOriginalIsolation(const xAOD::IParticle* particle, IsoType type) const override;
72 
74  TrackSet getTrackCandidates(const EventContext& ctx, const xAOD::IParticle* particle) const override;
75 
76  const xAOD::IParticle* isoRefParticle(const xAOD::IParticle* particle) const override;
77 
78  void associateCluster(const xAOD::IParticle* particle, float& eta, float& phi, float& energy) const override;
79 
80  void associateFlowElement(const EventContext& ctx, const xAOD::IParticle* particle, float& eta, float& phi,
81  float& energy) const override;
82 
84  using PrimaryCollection = std::set<const xAOD::IParticle*>;
85  struct ObjectCache {
86  ObjectCache() = default;
87  const xAOD::Vertex* prim_vtx{nullptr};
93  };
94 
95  private:
97  void isoTypesFromWP(const std::vector<std::unique_ptr<IsolationWP>>& WP, IsoVector& types);
101  TrackSet getAssociatedTracks(const xAOD::IParticle* P, const xAOD::Vertex* vtx) const;
103  void getAssocFlowElements(const EventContext& ctx, ObjectCache& cache) const;
104 
105  // Function to pipe each container given by the interfaces through. It loops over all
106  // particles and removes the isolation overlap between the objects
107  CorrectionCode performCloseByCorrection (const EventContext& ctx, ObjectCache& cache) const;
108 
109  // Helper function to obtain the isolation cones to use for a given particle
111 
112  // Functions to perfrom the isolation correction directly
113  CorrectionCode subtractCloseByContribution(const EventContext& ctx, const xAOD::IParticle* P, const ObjectCache& cache) const;
114  // Remove close-by tracks from the track isolation variables
115  CorrectionCode getCloseByCorrectionTrackIso(const xAOD::IParticle* primary, const IsoType type, const ObjectCache& cache,
116  float& isoValue) const;
117  // Remove close-by calo clusters from the topo et isolation variables
118  CorrectionCode getCloseByCorrectionTopoIso(const EventContext& ctx, const xAOD::IParticle* primary, const IsoType type,
119  const ObjectCache& cache, float& isoValue) const;
120  // Remove close-by flow elements from the neflow isolation variables
121  CorrectionCode getCloseByCorrectionPflowIso(const EventContext& ctx, const xAOD::IParticle* primary, const IsoType type,
122  const ObjectCache& cache, float& isoValue) const;
123  // For primary particles not selected, copy isolation value to output decorator
125 
126 
128  ClusterSet getAssociatedClusters(const EventContext& ctx, const xAOD::IParticle* particle) const;
130  PflowSet getAssocFlowElements(const EventContext& ctx, const xAOD::IParticle* particle) const;
131 
132 #ifndef XAOD_ANALYSIS
133  bool getExtrapEtaPhi(const EventContext& ctx, const xAOD::TrackParticle* tp, float& eta, float& phi) const;
135 #endif
136 
137  // Returns the Size of the Isolation cone
138  float coneSize(const xAOD::IParticle* particle, IsoType Cone) const;
139  // Retrieves the uncalibrated pt from the particle
140  float unCalibPt(const xAOD::IParticle* particle) const;
141 
142  // Clusters and tracks of particles surviving the selection quality
143  // are considered for corrections
144  bool passSelectionQuality(const xAOD::IParticle* particle) const;
145 
148  bool passFirstStage(const xAOD::TrackParticle* trk, const xAOD::Vertex* vtx) const;
149 
150  void printIsolationCones(const IsoVector& types, xAOD::Type::ObjectType T) const;
151 
152  public:
153  // Extrapolated phi eta needed for proper dR of the muons
154  void getExtrapEtaPhi(const xAOD::IParticle* particlear, float& eta, float& phi) const;
156  void loadPrimaryParticles(const xAOD::IParticleContainer* container, ObjectCache& cache) const;
158  void loadAssociatedObjects(const EventContext& ctx, ObjectCache& cache) const;
159 
160  // Some helper functions for Overlap and DeltaR
161  bool isSame(const xAOD::IParticle* particle, const xAOD::IParticle* particle1) const;
162  bool overlap(const xAOD::IParticle* particle, const xAOD::IParticle* particle1, float dR) const;
163  float deltaR2(const xAOD::IParticle* particle, const xAOD::IParticle* particle1, bool AvgCalo = false) const;
164 
165  // Fixed cone size isolation variables
167  // Any trackisolation variable with variable con size
169 
171  // PtVarcones of the pile-up robust isolation variables
173  // Any track isolation variable
175  // Pileup robust track isolation variables
177  // The pile-up robust isolation cones only accept
178  // tracks with a minimum pt requirement
180 
182 
184 
185  static bool isEgamma(const xAOD::IParticle* particle);
186 
187  const xAOD::Vertex* retrieveIDBestPrimaryVertex(const EventContext& ctx) const;
188 
189 
190 
191  static float clusterEtMinusTile(const xAOD::CaloCluster* C);
192 
193  static std::string particleName(const xAOD::IParticle* C);
194  static std::string particleName(xAOD::Type::ObjectType T);
195 
196  private:
197  // IMPORTANT USER PROPERTIES
198  ToolHandle<InDet::IInDetTrackSelectionTool> m_trkselTool{
199  this, "TrackSelectionTool", "", "TrackSelectionTool to select tracks which made it actually into the isolation"};
200  ToolHandle<CP::ITrackVertexAssociationTool> m_ttvaTool{this, "TTVASelectionTool", "",
201  "TTVASelectionTool to correct for the pile-up robust WPs"};
202  ToolHandle<CP::IIsolationSelectionTool> m_selectorTool{this, "IsolationSelectionTool", "",
203  "Please give me your configured IsolationSelectionTool!"};
204 
205  // OPTIONAL PROPERTIES
206  // Name of the isolation selection and input quality decorators
207  Gaudi::Property<std::string> m_quality_name{
208  this, "SelectionDecorator", "",
209  "Name of the char auxdata defining whether the particle shall be considered for iso correction"};
210  Gaudi::Property<std::string> m_passOR_name{this, "PassoverlapDecorator", "",
211  "Does the particle also need to pass the overlap removal?"};
212  Gaudi::Property<std::string> m_isoSelection_name{this, "IsolationSelectionDecorator", "", "Name of the final isolation decorator."};
213 
214  Gaudi::Property<std::string> m_backup_prefix{
215  this, "BackupPrefix", "", "Prefix in front of the isolation variables, if the original cone values need to be backuped"};
216 
217  Gaudi::Property<std::string> m_isoDecSuffix{
218  this, "IsoDecSuffix", "", "Suffix added to output isolation variable nanes for close by corrections"};
219 
221  Gaudi::Property<int> m_caloModel{this, "CaloCorrectionModel", TopoConeCorrectionModel::SubtractObjectsDirectly};
222  // The core of the topoEt variables. Clusters within the core shall not be
223  // added to the isolation of the object itself. They are defined to be associated with it.
224  Gaudi::Property<float> m_coreConeEl{this, "CoreConeElectrons", 0.1,
225  "This is the size of the core cone for the topoetcone variables."};
226 
227  // Muons have half of the cone-size compared to electrons
228  // (c.f. https://gitlab.cern.ch/atlas/athena/blob/21.2/Reconstruction/RecoTools/IsolationTool/Root/CaloIsolationTool.cxx#L82)
229  Gaudi::Property<float> m_coreConeMu{this, "CoreConeMuons", 0.05, "This is the size of the core cone for the topoetcone variables."};
230 
231  // Reference value to calculate the size of the mini-iso variables
232  // dR = min (fixed , m_ptvarcone / particle->pt())
233  Gaudi::Property<float> m_ptvarconeRadius{this, "PtvarconeRadius", 1.e4, "This is the kT parameter for the ptvarcone variables."};
234 
235  // Upper limit on the energy fraction of the close-by cluster
236  // to the isolation variable such that it is still subtracted from the cone.
237  // Only considered if the particle to correct is not an Egamma object. Since the reference
238  // position is extrapolated from the ID-track into the calorimeter.
239  // Aim of the game -> Find out whether it might contributed
240  Gaudi::Property<float> m_maxTopoPolution{
241  this, "MaxClusterFrac", 1.1,
242  "Maximum energy fraction a single cluster can make up to be considered as contributed to the isolation"};
243 
244  Gaudi::Property<float> m_ConeSizeVariation{
245  this, "ExtrapolationConeSize", 1.2,
246  "Constant factor to be multiplied on top of the topo-etcone size if the reference particle is not a calorimeter particle in "
247  "order to account for extrapolation effects"}; // Extend - shrink the cone size to account for extrapolation effects
248 
249  Gaudi::Property<bool> m_declareCaloDecors{this, "declareCaloDecors", false, "If set to true, the data dependency on the calo/pflow decors will be declared"};
253 #ifndef XAOD_ANALYSIS
254  Gaudi::Property<std::vector<std::string>> m_elecKeys{
255  this, "EleContainers", {}, "Pipe the list of electron containers given later to the tool"};
256  Gaudi::Property<std::vector<std::string>> m_muonKeys{
257  this, "MuoContainers", {}, "Pipe the list of muon containers given later to the tool"};
258  Gaudi::Property<std::vector<std::string>> m_photKeys{
259  this, "PhoContainers", {}, "Pipe the list of photon containers given later to the tool"};
261  this, "IsoVarKeys", {}, "The list is filled during the initialization"};
263  this, "IsoWriteDecVarKeys", {}, "The list is filled during the initialization"};
264 
266  ToolHandle<Trk::IParticleCaloExtensionTool> m_caloExtTool {this, "ParticleCaloExtensionTool", "Trk::ParticleCaloExtensionTool/ParticleCaloExtensionTool"};
267 
269  void declareDependency(const std::vector<std::string>& containers, const IsoVector& types);
270 #endif
271 
272  SG::ReadHandleKey<xAOD::VertexContainer> m_VtxKey{this, "VertexContainer", "PrimaryVertices",
273  "Name of the primary vertex container"};
274  SG::ReadHandleKey<xAOD::CaloClusterContainer> m_CaloClusterKey{this, "CaloClusterContainer", "CaloCalTopoClusters",
275  "Name of the primary calo cluster container"};
276  SG::ReadHandleKey<xAOD::FlowElementContainer> m_PflowKey{this, "PflowContainer", "CHSNeutralParticleFlowObjects",
277  "Name of the neutral pflow elements"};
285  bool m_has_nonTTVA{false};
287  bool m_hasPflowIso{false};
289  bool m_hasEtConeIso{false};
290 
291 
292  bool m_isInitialised{false};
293 
297 
298  // Functionallity to backup the original cone variables if needed
299  mutable IsoHelperMap m_isohelpers ATLAS_THREAD_SAFE;
304  mutable std::mutex m_isoHelpersMutex ATLAS_THREAD_SAFE;
305  };
306 
307 } // namespace CP
308 #endif
CP::IsolationCloseByCorrectionTool::copyIsoValuesForPartsNotSelected
CorrectionCode copyIsoValuesForPartsNotSelected(const xAOD::IParticle *part) const
Definition: IsolationCloseByCorrectionTool.cxx:347
CP::IsolationCloseByCorrectionTool::m_hasEtConeIso
bool m_hasEtConeIso
Switch whether a topoetcone isolation working point is defined.
Definition: IsolationCloseByCorrectionTool.h:289
LArG4FSStartPointFilter.part
part
Definition: LArG4FSStartPointFilter.py:21
CP::IsolationCloseByCorrectionTool::m_backup_prefix
Gaudi::Property< std::string > m_backup_prefix
Definition: IsolationCloseByCorrectionTool.h:214
CP::IsolationCloseByCorrectionTool::m_maxTopoPolution
Gaudi::Property< float > m_maxTopoPolution
Definition: IsolationCloseByCorrectionTool.h:240
asg::AsgTool
Base class for the dual-use tool implementation classes.
Definition: AsgTool.h:47
PropertyWrapper.h
Trk::ParticleSwitcher::particle
constexpr ParticleHypothesis particle[PARTICLEHYPOTHESES]
the array of masses
Definition: ParticleHypothesis.h:76
FlowElementContainer.h
CP::IsolationCloseByCorrectionTool::m_ttvaTool
ToolHandle< CP::ITrackVertexAssociationTool > m_ttvaTool
Definition: IsolationCloseByCorrectionTool.h:200
CP::IsolationCloseByCorrectionTool::ObjectCache::not_sel_parts
PrimaryCollection not_sel_parts
Definition: IsolationCloseByCorrectionTool.h:89
CP::IsolationCloseByCorrectionTool::m_isoWriteDecVarKeys
SG::WriteDecorHandleKeyArray< xAOD::IParticleContainer > m_isoWriteDecVarKeys
Definition: IsolationCloseByCorrectionTool.h:262
CP::IsolationCloseByCorrectionTool::isTrackIsoTTVA
static bool isTrackIsoTTVA(xAOD::Iso::IsolationType type)
Definition: IsolationCloseByCorrectionTool.cxx:1017
phi
Scalar phi() const
phi method
Definition: AmgMatrixBasePlugin.h:64
CP::IsolationCloseByCorrectionTool::isVarTrackIsoTTVA
static bool isVarTrackIsoTTVA(xAOD::Iso::IsolationType Iso)
Definition: IsolationCloseByCorrectionTool.cxx:1009
CP::IsolationCloseByCorrectionTool::isFixedTrackIso
static bool isFixedTrackIso(xAOD::Iso::IsolationType type)
Definition: IsolationCloseByCorrectionTool.cxx:995
CP::IsolationCloseByCorrectionTool::m_acc_quality
SelectionAccessor m_acc_quality
Definition: IsolationCloseByCorrectionTool.h:294
ObjectType
ObjectType
Definition: BaseObject.h:11
CP::IsolationCloseByCorrectionTool::m_declareCaloDecors
Gaudi::Property< bool > m_declareCaloDecors
Definition: IsolationCloseByCorrectionTool.h:249
CP::IsolationCloseByCorrectionTool::m_passOR_name
Gaudi::Property< std::string > m_passOR_name
Definition: IsolationCloseByCorrectionTool.h:210
eta
Scalar eta() const
pseudorapidity method
Definition: AmgMatrixBasePlugin.h:79
IIsolationCloseByCorrectionTool.h
CP::IsolationCloseByCorrectionTool::m_PflowKey
SG::ReadHandleKey< xAOD::FlowElementContainer > m_PflowKey
Definition: IsolationCloseByCorrectionTool.h:276
BeamSpot::mutex
std::mutex mutex
Definition: InDetBeamSpotVertex.cxx:18
IsoCloseByCorrectionTest.WP
WP
Definition: IsoCloseByCorrectionTest.py:56
CP::IsolationCloseByCorrectionTool::UseAveragedDecorators
@ UseAveragedDecorators
Definition: IsolationCloseByCorrectionTool.h:41
CP::PflowSet
std::set< FlowElementPtr > PflowSet
Definition: PhysicsAnalysis/AnalysisCommon/IsolationSelection/IsolationSelection/Defs.h:74
CP::IsolationCloseByCorrectionTool::passSelectionQuality
bool passSelectionQuality(const xAOD::IParticle *particle) const
Definition: IsolationCloseByCorrectionTool.cxx:542
CP::IsolationCloseByCorrectionTool::IsolationCloseByCorrectionTool
IsolationCloseByCorrectionTool(const std::string &name)
Definition: IsolationCloseByCorrectionTool.cxx:35
CP::IsolationCloseByCorrectionTool::ObjectCache::clusters
ClusterSet clusters
Definition: IsolationCloseByCorrectionTool.h:91
CP::IsolationCloseByCorrectionTool::m_muonKeys
Gaudi::Property< std::vector< std::string > > m_muonKeys
Definition: IsolationCloseByCorrectionTool.h:256
CP::IsolationCloseByCorrectionTool::isTopoEtIso
static bool isTopoEtIso(xAOD::Iso::IsolationType type)
Definition: IsolationCloseByCorrectionTool.cxx:1000
CP::IsolationCloseByCorrectionTool::clusterEtMinusTile
static float clusterEtMinusTile(const xAOD::CaloCluster *C)
Definition: IsolationCloseByCorrectionTool.cxx:975
CP::IsolationCloseByCorrectionTool::m_electron_isoTypes
IsoVector m_electron_isoTypes
Isolation variables used by the electron working point.
Definition: IsolationCloseByCorrectionTool.h:281
CP::TrackSet
std::set< TrackPtr > TrackSet
Definition: PhysicsAnalysis/AnalysisCommon/IsolationSelection/IsolationSelection/Defs.h:72
ParticleTest.tp
tp
Definition: ParticleTest.py:25
CP::IsolationCloseByCorrectionTool::m_elecKeys
Gaudi::Property< std::vector< std::string > > m_elecKeys
Declare the data dependencies of the Input containers.
Definition: IsolationCloseByCorrectionTool.h:254
CP::IsolationCloseByCorrectionTool::ATLAS_THREAD_SAFE
IsoHelperMap m_isohelpers ATLAS_THREAD_SAFE
Definition: IsolationCloseByCorrectionTool.h:299
CP::IsolationCloseByCorrectionTool::pflowDecors
static caloDecorNames pflowDecors()
Definition: IsolationCloseByCorrectionTool.cxx:28
SG::HandleKeyArray
Definition: StoreGate/StoreGate/HandleKeyArray.h:38
CP::IsolationCloseByCorrectionTool::associateCluster
void associateCluster(const xAOD::IParticle *particle, float &eta, float &phi, float &energy) const override
Retrieve the associated clusters from the Particle and calculate the average eta/phi/energy.
Definition: IsolationCloseByCorrectionTool.cxx:782
CP::IsolationCloseByCorrectionTool::ObjectCache::prim_vtx
const xAOD::Vertex * prim_vtx
Definition: IsolationCloseByCorrectionTool.h:87
CP::IsolationCloseByCorrectionTool::loadAssociatedObjects
void loadAssociatedObjects(const EventContext &ctx, ObjectCache &cache) const
Load all associated tracks / clusters / flow elements into the cache.
Definition: IsolationCloseByCorrectionTool.cxx:161
Defs.h
SG::ReadHandleKey
Property holding a SG store/key/clid from which a ReadHandle is made.
Definition: StoreGate/StoreGate/ReadHandleKey.h:39
CP::IsolationCloseByCorrectionTool::m_caloModel
Gaudi::Property< int > m_caloModel
EXPERT PROPERTIES.
Definition: IsolationCloseByCorrectionTool.h:221
CP::IsolationCloseByCorrectionTool::isSame
bool isSame(const xAOD::IParticle *particle, const xAOD::IParticle *particle1) const
Definition: IsolationCloseByCorrectionTool.cxx:938
xAOD::IParticle
Class providing the definition of the 4-vector interface.
Definition: Event/xAOD/xAODBase/xAODBase/IParticle.h:40
x
#define x
CP::IsolationCloseByCorrectionTool::initialize
virtual StatusCode initialize() override
Dummy implementation of the initialisation function.
Definition: IsolationCloseByCorrectionTool.cxx:37
CP
Select isolated Photons, Electrons and Muons.
Definition: Control/xAODRootAccess/xAODRootAccess/TEvent.h:48
CP::IsolationCloseByCorrectionTool::performCloseByCorrection
CorrectionCode performCloseByCorrection(const EventContext &ctx, ObjectCache &cache) const
Definition: IsolationCloseByCorrectionTool.cxx:265
CP::IsolationCloseByCorrectionTool::ATLAS_THREAD_SAFE
std::mutex m_isoHelpersMutex ATLAS_THREAD_SAFE
Mutex to protect the map if the method with signature getCloseByCorrection(std::vector<float>& correc...
Definition: IsolationCloseByCorrectionTool.h:304
CP::IsolationCloseByCorrectionTool::SubtractObjectsDirectly
@ SubtractObjectsDirectly
Definition: IsolationCloseByCorrectionTool.h:40
CP::IsolationCloseByCorrectionTool::m_coreConeMu
Gaudi::Property< float > m_coreConeMu
Definition: IsolationCloseByCorrectionTool.h:229
CP::IsolationCloseByCorrectionTool::m_isoSelection_name
Gaudi::Property< std::string > m_isoSelection_name
Definition: IsolationCloseByCorrectionTool.h:212
CP::IsolationCloseByCorrectionTool::m_photon_isoTypes
IsoVector m_photon_isoTypes
Isolation variables used by the photon working point.
Definition: IsolationCloseByCorrectionTool.h:283
CP::IsolationCloseByCorrectionTool::m_has_nonTTVA
bool m_has_nonTTVA
Switch whether a pile-up non robust TTVA working point is defined.
Definition: IsolationCloseByCorrectionTool.h:285
ReadDecorHandleKey.h
Property holding a SG store/key/clid/attr name from which a ReadDecorHandle is made.
CP::IsolationCloseByCorrectionTool::retrieveIDBestPrimaryVertex
const xAOD::Vertex * retrieveIDBestPrimaryVertex(const EventContext &ctx) const
Definition: IsolationCloseByCorrectionTool.cxx:890
CP::IsolationCloseByCorrectionTool::m_ConeSizeVariation
Gaudi::Property< float > m_ConeSizeVariation
Definition: IsolationCloseByCorrectionTool.h:244
CP::IsolationCloseByCorrectionTool::getAssocFlowElements
void getAssocFlowElements(const EventContext &ctx, ObjectCache &cache) const
Retrieve all Flow elements associated with the particles in the cache.
Definition: IsolationCloseByCorrectionTool.cxx:185
CP::IsolationCloseByCorrectionTool::m_muon_isoTypes
IsoVector m_muon_isoTypes
Isolation variables used by the muon working point.
Definition: IsolationCloseByCorrectionTool.h:279
CP::IsolationCloseByCorrectionTool::m_CaloClusterKey
SG::ReadHandleKey< xAOD::CaloClusterContainer > m_CaloClusterKey
Definition: IsolationCloseByCorrectionTool.h:274
xAOD::CaloCluster_v1
Description of a calorimeter cluster.
Definition: CaloCluster_v1.h:59
CP::IsolationCloseByCorrectionTool::isEgamma
static bool isEgamma(const xAOD::IParticle *particle)
Definition: IsolationCloseByCorrectionTool.cxx:458
CP::IsolationCloseByCorrectionTool::loadPrimaryParticles
void loadPrimaryParticles(const xAOD::IParticleContainer *container, ObjectCache &cache) const
Filter all electrons/muons/photons from the collection which pass the selection decoration.
Definition: IsolationCloseByCorrectionTool.cxx:136
CP::Iso
@ Iso
Definition: MuonEfficiencyType.h:16
StateLessPT_NewConfig.primary
primary
Definition: StateLessPT_NewConfig.py:228
CP::IsolationCloseByCorrectionTool::deltaR2
float deltaR2(const xAOD::IParticle *particle, const xAOD::IParticle *particle1, bool AvgCalo=false) const
Definition: IsolationCloseByCorrectionTool.cxx:946
ParticleGun_FastCalo_ChargeFlip_Config.energy
energy
Definition: ParticleGun_FastCalo_ChargeFlip_Config.py:78
ElectronContainer.h
CP::IsolationCloseByCorrectionTool::m_coreConeEl
Gaudi::Property< float > m_coreConeEl
Definition: IsolationCloseByCorrectionTool.h:224
CP::IsolationCloseByCorrectionTool::coneSize
float coneSize(const xAOD::IParticle *particle, IsoType Cone) const
Definition: IsolationCloseByCorrectionTool.cxx:902
IsoCloseByCorrectionTest.containers
containers
Associate the close-by pflow objects and the calorimeter clusters.
Definition: IsoCloseByCorrectionTest.py:82
CP::IsolationCloseByCorrectionTool::particleName
static std::string particleName(const xAOD::IParticle *C)
Definition: IsolationCloseByCorrectionTool.cxx:986
CP::IsolationCloseByCorrectionTool::ObjectCache::flows
PflowSet flows
Definition: IsolationCloseByCorrectionTool.h:92
CP::IsolationCloseByCorrectionTool
Definition: IsolationCloseByCorrectionTool.h:37
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
IsoVariableHelper.h
CP::IsolationCloseByCorrectionTool::getCloseByCorrectionPflowIso
CorrectionCode getCloseByCorrectionPflowIso(const EventContext &ctx, const xAOD::IParticle *primary, const IsoType type, const ObjectCache &cache, float &isoValue) const
Definition: IsolationCloseByCorrectionTool.cxx:588
ReadHandleKey.h
Property holding a SG store/key/clid from which a ReadHandle is made.
CP::IsolationCloseByCorrectionTool::passFirstStage
bool passFirstStage(const xAOD::TrackParticle *trk, const xAOD::Vertex *vtx) const
The Track particle has to pass the Track selection tool and the TTVA selection.
Definition: IsolationCloseByCorrectionTool.cxx:424
xAOD::Iso::IsolationType
IsolationType
Overall enumeration for isolation types in xAOD files.
Definition: IsolationType.h:26
CP::IsolationCloseByCorrectionTool::printIsolationCones
void printIsolationCones(const IsoVector &types, xAOD::Type::ObjectType T) const
Definition: IsolationCloseByCorrectionTool.cxx:1018
CP::IsolationCloseByCorrectionTool::isFixedTrackIsoTTVA
static bool isFixedTrackIsoTTVA(xAOD::Iso::IsolationType type)
Definition: IsolationCloseByCorrectionTool.cxx:1001
CP::IsolationCloseByCorrectionTool::isPFlowIso
static bool isPFlowIso(xAOD::Iso::IsolationType type)
Definition: IsolationCloseByCorrectionTool.cxx:1032
CP::IsolationCloseByCorrectionTool::m_photKeys
Gaudi::Property< std::vector< std::string > > m_photKeys
Definition: IsolationCloseByCorrectionTool.h:258
CP::IsolationCloseByCorrectionTool::m_caloExtTool
ToolHandle< Trk::IParticleCaloExtensionTool > m_caloExtTool
calo extension tool for muon track particle extrapolation to calo
Definition: IsolationCloseByCorrectionTool.h:266
CP::IsolationCloseByCorrectionTool::unCalibPt
float unCalibPt(const xAOD::IParticle *particle) const
Definition: IsolationCloseByCorrectionTool.cxx:912
CP::IsolationCloseByCorrectionTool::getTrackCandidates
TrackSet getTrackCandidates(const EventContext &ctx, const xAOD::IParticle *particle) const override
Load all TrackParticles associated with the particles in the Container. The particles have to pass th...
Definition: IsolationCloseByCorrectionTool.cxx:455
CP::IsolationCloseByCorrectionTool::getAssociatedTracks
TrackSet getAssociatedTracks(const xAOD::IParticle *P) const
Retrieve all Inner detector tracks associated with the primary particle.
Definition: IsolationCloseByCorrectionTool.cxx:427
CP::IIsolationCloseByCorrectionTool
Definition: IIsolationCloseByCorrectionTool.h:24
ITrackVertexAssociationTool.h
DataVector
Derived DataVector<T>.
Definition: DataVector.h:581
IInDetTrackSelectionTool.h
CP::IsolationCloseByCorrectionTool::m_hasPflowIso
bool m_hasPflowIso
Switch whether a pflow isolation working point is defined.
Definition: IsolationCloseByCorrectionTool.h:287
CP::IsolationCloseByCorrectionTool::m_selectorTool
ToolHandle< CP::IIsolationSelectionTool > m_selectorTool
Definition: IsolationCloseByCorrectionTool.h:202
CP::IsolationCloseByCorrectionTool::ObjectCache::prim_parts
PrimaryCollection prim_parts
Definition: IsolationCloseByCorrectionTool.h:88
CP::IsolationCloseByCorrectionTool::m_isInitialised
bool m_isInitialised
Definition: IsolationCloseByCorrectionTool.h:292
CP::IsolationCloseByCorrectionTool::m_acc_passOR
SelectionAccessor m_acc_passOR
Definition: IsolationCloseByCorrectionTool.h:295
CP::IsolationCloseByCorrectionTool::getExtrapEtaPhi
bool getExtrapEtaPhi(const EventContext &ctx, const xAOD::TrackParticle *tp, float &eta, float &phi) const
helper to get eta,phi of muon extrap
Definition: IsolationCloseByCorrectionTool.cxx:215
CP::IsolationCloseByCorrectionTool::getIsolationTypes
const IsoVector & getIsolationTypes(const xAOD::IParticle *particle) const
Definition: IsolationCloseByCorrectionTool.cxx:300
CP::IsolationCloseByCorrectionTool::TopoConeCorrectionModel
TopoConeCorrectionModel
Definition: IsolationCloseByCorrectionTool.h:39
CP::IsolationCloseByCorrectionTool::getCloseByCorrectionTopoIso
CorrectionCode getCloseByCorrectionTopoIso(const EventContext &ctx, const xAOD::IParticle *primary, const IsoType type, const ObjectCache &cache, float &isoValue) const
Definition: IsolationCloseByCorrectionTool.cxx:660
CP::IsolationCloseByCorrectionTool::m_isoDecSuffix
Gaudi::Property< std::string > m_isoDecSuffix
Definition: IsolationCloseByCorrectionTool.h:217
CP::SelectionAccessor
std::unique_ptr< CharAccessor > SelectionAccessor
Definition: PhysicsAnalysis/AnalysisCommon/IsolationSelection/IsolationSelection/Defs.h:24
CP::IsolationCloseByCorrectionTool::m_trkselTool
ToolHandle< InDet::IInDetTrackSelectionTool > m_trkselTool
Definition: IsolationCloseByCorrectionTool.h:198
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
createCoolChannelIdFile.par
par
Definition: createCoolChannelIdFile.py:29
IIsolationSelectionTool.h
CP::IsolationCloseByCorrectionTool::caloDecors
static caloDecorNames caloDecors()
Returns an array with the calo cluster decoration ames [0]-> eta, [1]->phi, [2]->energy....
Definition: IsolationCloseByCorrectionTool.cxx:24
CP::IsolationCloseByCorrectionTool::IsoHelperMap
std::map< IsoType, std::unique_ptr< IsoVariableHelper > > IsoHelperMap
Definition: IsolationCloseByCorrectionTool.h:50
CP::IsolationCloseByCorrectionTool::getCloseByIsoCorrection
virtual CorrectionCode getCloseByIsoCorrection(const EventContext &ctx, const xAOD::ElectronContainer *Electrons, const xAOD::MuonContainer *Muons, const xAOD::PhotonContainer *Photons) const override
Definition: IsolationCloseByCorrectionTool.cxx:247
CP::IsolationCloseByCorrectionTool::PrimaryCollection
std::set< const xAOD::IParticle * > PrimaryCollection
Helper struct to collect all relevant objects for the procedure.
Definition: IsolationCloseByCorrectionTool.h:84
CP::IsolationCloseByCorrectionTool::getCloseByCorrectionTrackIso
CorrectionCode getCloseByCorrectionTrackIso(const xAOD::IParticle *primary, const IsoType type, const ObjectCache &cache, float &isoValue) const
Definition: IsolationCloseByCorrectionTool.cxx:548
CP::IsolationCloseByCorrectionTool::ObjectCache
Definition: IsolationCloseByCorrectionTool.h:85
CP::IsolationCloseByCorrectionTool::associateFlowElement
void associateFlowElement(const EventContext &ctx, const xAOD::IParticle *particle, float &eta, float &phi, float &energy) const override
Definition: IsolationCloseByCorrectionTool.cxx:758
MuonContainer.h
CP::IsolationCloseByCorrectionTool::m_ptvarconeRadius
Gaudi::Property< float > m_ptvarconeRadius
Definition: IsolationCloseByCorrectionTool.h:233
CP::ClusterSet
std::set< CaloClusterPtr > ClusterSet
Definition: PhysicsAnalysis/AnalysisCommon/IsolationSelection/IsolationSelection/Defs.h:73
CP::IsolationCloseByCorrectionTool::ObjectCache::tracks
TrackSet tracks
Definition: IsolationCloseByCorrectionTool.h:90
IParticleCaloExtensionTool.h
VertexContainer.h
CP::IsolationCloseByCorrectionTool::ObjectCache::ObjectCache
ObjectCache()=default
xAOD::Vertex_v1
Class describing a Vertex.
Definition: Vertex_v1.h:42
CP::IsolationCloseByCorrectionTool::m_VtxKey
SG::ReadHandleKey< xAOD::VertexContainer > m_VtxKey
Definition: IsolationCloseByCorrectionTool.h:272
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
ASG_TOOL_CLASS
#define ASG_TOOL_CLASS(CLASSNAME, INT1)
Definition: AsgToolMacros.h:68
WriteDecorHandleKeyArray.h
CP::IsolationCloseByCorrectionTool::subtractCloseByContribution
CorrectionCode subtractCloseByContribution(const EventContext &ctx, const xAOD::IParticle *P, const ObjectCache &cache) const
Definition: IsolationCloseByCorrectionTool.cxx:312
IsolationWP.h
CP::IsolationCloseByCorrectionTool::getOriginalIsolation
virtual float getOriginalIsolation(const xAOD::IParticle &P, IsoType type) const override
Definition: IsolationCloseByCorrectionTool.cxx:972
CP::CorrectionCode
Return value from object correction CP tools.
Definition: CorrectionCode.h:31
CP::IsolationCloseByCorrectionTool::m_quality_name
Gaudi::Property< std::string > m_quality_name
Definition: IsolationCloseByCorrectionTool.h:207
CP::IsolationCloseByCorrectionTool::isTrackIso
static bool isTrackIso(xAOD::Iso::IsolationType type)
Definition: IsolationCloseByCorrectionTool.cxx:997
CP::IsolationCloseByCorrectionTool::caloDecorNames
std::array< std::string, 4 > caloDecorNames
Definition: IsolationCloseByCorrectionTool.h:45
CP::IsolationCloseByCorrectionTool::acceptCorrected
virtual asg::AcceptData acceptCorrected(const xAOD::IParticle &x, const xAOD::IParticleContainer &closePar) const override
Definition: IsolationCloseByCorrectionTool.cxx:850
CP::IsolationCloseByCorrectionTool::getAssociatedClusters
ClusterSet getAssociatedClusters(const EventContext &ctx, const xAOD::IParticle *particle) const
Loads the topo clusters associated with the primary IParticle.
Definition: IsolationCloseByCorrectionTool.cxx:466
CP::IsolationCloseByCorrectionTool::overlap
bool overlap(const xAOD::IParticle *particle, const xAOD::IParticle *particle1, float dR) const
Definition: IsolationCloseByCorrectionTool.cxx:960
CP::IsolationCloseByCorrectionTool::m_dec_isoselection
SelectionDecorator m_dec_isoselection
Definition: IsolationCloseByCorrectionTool.h:296
xAOD::TrackParticle_v1
Class describing a TrackParticle.
Definition: TrackParticle_v1.h:43
ToolHandle.h
AsgTool.h
asg::AcceptData
Definition: AcceptData.h:30
checker_macros.h
Define macros for attributes used to control the static checker.
CP::IsolationCloseByCorrectionTool::isoRefParticle
const xAOD::IParticle * isoRefParticle(const xAOD::IParticle *particle) const override
Retrieve the reference particle to define the cone axis in which the track particles contributing to ...
Definition: IsolationCloseByCorrectionTool.cxx:925
CP::IsolationCloseByCorrectionTool::getCloseByCorrection
virtual CorrectionCode getCloseByCorrection(std::vector< float > &corrections, const xAOD::IParticle &par, const std::vector< xAOD::Iso::IsolationType > &types, const xAOD::IParticleContainer &closePar) const override
Definition: IsolationCloseByCorrectionTool.cxx:372
CP::IsolationCloseByCorrectionTool::isVarTrackIso
static bool isVarTrackIso(xAOD::Iso::IsolationType type)
Definition: IsolationCloseByCorrectionTool.cxx:996
CP::IsolationCloseByCorrectionTool::declareDependency
void declareDependency(const std::vector< std::string > &containers, const IsoVector &types)
Helper function to declare the data dependencies.
Definition: IsolationCloseByCorrectionTool.cxx:118
CP::IsolationCloseByCorrectionTool::isoTypesFromWP
void isoTypesFromWP(const std::vector< std::unique_ptr< IsolationWP >> &WP, IsoVector &types)
Helper function to load all Isolation types from the iso working points.
Definition: IsolationCloseByCorrectionTool.cxx:97
CP::IsolationCloseByCorrectionTool::trackPtCut
static float trackPtCut(xAOD::Iso::IsolationType type)
Definition: IsolationCloseByCorrectionTool.cxx:1022
PhotonContainer.h
ReadDecorHandleKeyArray.h
CP::SelectionDecorator
std::unique_ptr< CharDecorator > SelectionDecorator
Definition: PhysicsAnalysis/AnalysisCommon/IsolationSelection/IsolationSelection/Defs.h:25
CP::IsoVector
std::vector< IsoType > IsoVector
Definition: PhysicsAnalysis/AnalysisCommon/IsolationSelection/IsolationSelection/Defs.h:37
CP::IsolationCloseByCorrectionTool::m_isoVarKeys
SG::ReadDecorHandleKeyArray< xAOD::IParticleContainer > m_isoVarKeys
Definition: IsolationCloseByCorrectionTool.h:260
TrackParticleContainer.h