Loading [MathJax]/extensions/tex2jax.js
ATLAS Offline Software
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
IsolationCloseByCorrectionTool.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2025 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 const caloDecorNames& caloDecors();
48  static const 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,
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};
94  };
95 
96  private:
98  void isoTypesFromWP(const std::vector<std::unique_ptr<IsolationWP>>& WP, IsoVector& types);
102  TrackSet getAssociatedTracks(const xAOD::IParticle* P, const xAOD::Vertex* vtx) const;
104  void getAssocFlowElements(const EventContext& ctx, ObjectCache& cache) const;
105 
106  // Function to pipe each container given by the interfaces through. It loops over all
107  // particles and removes the isolation overlap between the objects
108  CorrectionCode performCloseByCorrection (const EventContext& ctx, ObjectCache& cache) const;
109 
110  // Lock decorations that we produced.
111  void lockDecorations (const xAOD::IParticleContainer* parts) const;
112 
113  // Helper function to obtain the isolation cones to use for a given particle
114  const IsoVector& getIsolationTypes(const xAOD::IParticle* particle) const;
115 
116  // Functions to perfrom the isolation correction directly
117  CorrectionCode subtractCloseByContribution(const EventContext& ctx, const xAOD::IParticle* P, ObjectCache& cache) const;
118  // Remove close-by tracks from the track isolation variables
119  CorrectionCode getCloseByCorrectionTrackIso(const xAOD::IParticle* primary, const IsoType type, const ObjectCache& cache,
120  float& isoValue) const;
121  // Remove close-by calo clusters from the topo et isolation variables
122  CorrectionCode getCloseByCorrectionTopoIso(const EventContext& ctx, const xAOD::IParticle* primary, const IsoType type,
123  ObjectCache& cache, float& isoValue) const;
124  // Remove close-by flow elements from the neflow isolation variables
125  CorrectionCode getCloseByCorrectionPflowIso(const EventContext& ctx, const xAOD::IParticle* primary, const IsoType type,
126  const ObjectCache& cache, float& isoValue) const;
127  // For primary particles not selected, copy isolation value to output decorator
129 
130 
132  ClusterSet getAssociatedClusters(const EventContext& ctx, const xAOD::IParticle* particle,
133  ObjectCache& cache) const;
135  PflowSet getAssocFlowElements(const EventContext& ctx, const xAOD::IParticle* particle) const;
136 
137 #ifndef XAOD_ANALYSIS
138  bool getExtrapEtaPhi(const EventContext& ctx, const xAOD::TrackParticle* tp, float& eta, float& phi) const;
140 #endif
141 
142  // Returns the Size of the Isolation cone
143  float coneSize(const xAOD::IParticle* particle, IsoType Cone) const;
144  // Retrieves the uncalibrated pt from the particle
145  float unCalibPt(const xAOD::IParticle* particle) const;
146 
147  // Clusters and tracks of particles surviving the selection quality
148  // are considered for corrections
149  bool passSelectionQuality(const xAOD::IParticle* particle) const;
150 
153  bool passFirstStage(const xAOD::TrackParticle* trk, const xAOD::Vertex* vtx) const;
154 
155  void printIsolationCones(const IsoVector& types, xAOD::Type::ObjectType T) const;
156 
157  public:
158  // Extrapolated phi eta needed for proper dR of the muons
159  void getExtrapEtaPhi(const xAOD::IParticle* particlear, float& eta, float& phi) const;
161  void loadPrimaryParticles(const xAOD::IParticleContainer* container, ObjectCache& cache) const;
163  void loadAssociatedObjects(const EventContext& ctx, ObjectCache& cache) const;
164 
165  // Some helper functions for Overlap and DeltaR
166  bool isSame(const xAOD::IParticle* particle, const xAOD::IParticle* particle1) const;
167  bool overlap(const xAOD::IParticle* particle, const xAOD::IParticle* particle1, float dR) const;
168  float deltaR2(const xAOD::IParticle* particle, const xAOD::IParticle* particle1, bool AvgCalo = false) const;
169 
170  // Fixed cone size isolation variables
172  // Any trackisolation variable with variable con size
174 
176  // PtVarcones of the pile-up robust isolation variables
178  // Any track isolation variable
180  // Pileup robust track isolation variables
182  // The pile-up robust isolation cones only accept
183  // tracks with a minimum pt requirement
185 
187 
189 
190  static bool isEgamma(const xAOD::IParticle* particle);
191 
192  const xAOD::Vertex* retrieveIDBestPrimaryVertex(const EventContext& ctx) const;
193 
194 
195 
196  static float clusterEtMinusTile(const xAOD::CaloCluster* C);
197 
198  static std::string particleName(const xAOD::IParticle* C);
199  static std::string particleName(xAOD::Type::ObjectType T);
200 
201  private:
202  // IMPORTANT USER PROPERTIES
203  ToolHandle<InDet::IInDetTrackSelectionTool> m_trkselTool{
204  this, "TrackSelectionTool", "", "TrackSelectionTool to select tracks which made it actually into the isolation"};
205  ToolHandle<CP::ITrackVertexAssociationTool> m_ttvaTool{this, "TTVASelectionTool", "",
206  "TTVASelectionTool to correct for the pile-up robust WPs"};
207  ToolHandle<CP::IIsolationSelectionTool> m_selectorTool{this, "IsolationSelectionTool", "",
208  "Please give me your configured IsolationSelectionTool!"};
209 
210  // OPTIONAL PROPERTIES
211  // Name of the isolation selection and input quality decorators
212  Gaudi::Property<std::string> m_quality_name{
213  this, "SelectionDecorator", "",
214  "Name of the char auxdata defining whether the particle shall be considered for iso correction"};
215  Gaudi::Property<std::string> m_passOR_name{this, "PassoverlapDecorator", "",
216  "Does the particle also need to pass the overlap removal?"};
217  Gaudi::Property<std::string> m_isoSelection_name{this, "IsolationSelectionDecorator", "", "Name of the final isolation decorator."};
218 
219  Gaudi::Property<std::string> m_backup_prefix{
220  this, "BackupPrefix", "", "Prefix in front of the isolation variables, if the original cone values need to be backuped"};
221 
222  Gaudi::Property<std::string> m_isoDecSuffix{
223  this, "IsoDecSuffix", "", "Suffix added to output isolation variable names for close by corrections"};
224  Gaudi::Property<std::string> m_caloDecSuffix{
225  this, "CaloDecSuffix", "", "Suffix added to output cluster variable names for close by corrections"};
226 
228  Gaudi::Property<int> m_caloModel{this, "CaloCorrectionModel", TopoConeCorrectionModel::SubtractObjectsDirectly};
229  // The core of the topoEt variables. Clusters within the core shall not be
230  // added to the isolation of the object itself. They are defined to be associated with it.
231  Gaudi::Property<float> m_coreConeEl{this, "CoreConeElectrons", 0.1,
232  "This is the size of the core cone for the topoetcone variables."};
233 
234  // Muons have half of the cone-size compared to electrons
235  // (c.f. https://gitlab.cern.ch/atlas/athena/blob/21.2/Reconstruction/RecoTools/IsolationTool/Root/CaloIsolationTool.cxx#L82)
236  Gaudi::Property<float> m_coreConeMu{this, "CoreConeMuons", 0.05, "This is the size of the core cone for the topoetcone variables."};
237 
238  // Reference value to calculate the size of the mini-iso variables
239  // dR = min (fixed , m_ptvarcone / particle->pt())
240  Gaudi::Property<float> m_ptvarconeRadius{this, "PtvarconeRadius", 1.e4, "This is the kT parameter for the ptvarcone variables."};
241 
242  // Upper limit on the energy fraction of the close-by cluster
243  // to the isolation variable such that it is still subtracted from the cone.
244  // Only considered if the particle to correct is not an Egamma object. Since the reference
245  // position is extrapolated from the ID-track into the calorimeter.
246  // Aim of the game -> Find out whether it might contributed
247  Gaudi::Property<float> m_maxTopoPolution{
248  this, "MaxClusterFrac", 1.1,
249  "Maximum energy fraction a single cluster can make up to be considered as contributed to the isolation"};
250 
251  Gaudi::Property<float> m_ConeSizeVariation{
252  this, "ExtrapolationConeSize", 1.2,
253  "Constant factor to be multiplied on top of the topo-etcone size if the reference particle is not a calorimeter particle in "
254  "order to account for extrapolation effects"}; // Extend - shrink the cone size to account for extrapolation effects
255 
256  Gaudi::Property<bool> m_declareCaloDecors{this, "declareCaloDecors", false, "If set to true, the data dependency on the calo/pflow decors will be declared"};
260 #ifndef XAOD_ANALYSIS
261  Gaudi::Property<std::vector<std::string>> m_elecKeys{
262  this, "EleContainers", {}, "Pipe the list of electron containers given later to the tool"};
263  Gaudi::Property<std::vector<std::string>> m_muonKeys{
264  this, "MuoContainers", {}, "Pipe the list of muon containers given later to the tool"};
265  Gaudi::Property<std::vector<std::string>> m_photKeys{
266  this, "PhoContainers", {}, "Pipe the list of photon containers given later to the tool"};
268  this, "IsoVarKeys", {}, "The list is filled during the initialization"};
270  this, "IsoWriteDecVarKeys", {}, "The list is filled during the initialization"};
271 
273  ToolHandle<Trk::IParticleCaloExtensionTool> m_caloExtTool {this, "ParticleCaloExtensionTool", "Trk::ParticleCaloExtensionTool/ParticleCaloExtensionTool"};
274 
276  void declareDependency(const std::vector<std::string>& containers, const IsoVector& types);
277 #endif
278 
279  SG::ReadHandleKey<xAOD::VertexContainer> m_VtxKey{this, "VertexContainer", "PrimaryVertices",
280  "Name of the primary vertex container"};
281  SG::ReadHandleKey<xAOD::CaloClusterContainer> m_CaloClusterKey{this, "CaloClusterContainer", "CaloCalTopoClusters",
282  "Name of the primary calo cluster container"};
283  SG::ReadHandleKey<xAOD::FlowElementContainer> m_PflowKey{this, "PflowContainer", "CHSNeutralParticleFlowObjects",
284  "Name of the neutral pflow elements"};
292  bool m_has_nonTTVA{false};
294  bool m_hasPflowIso{false};
296  bool m_hasEtConeIso{false};
297 
298 
299  bool m_isInitialised{false};
300 
304 
305  // Functionallity to backup the original cone variables if needed
306  mutable IsoHelperMap m_isohelpers ATLAS_THREAD_SAFE;
311  mutable std::mutex m_isoHelpersMutex ATLAS_THREAD_SAFE;
312  };
313 
314 } // namespace CP
315 #endif
CP::IsolationCloseByCorrectionTool::copyIsoValuesForPartsNotSelected
CorrectionCode copyIsoValuesForPartsNotSelected(const xAOD::IParticle *part) const
Definition: IsolationCloseByCorrectionTool.cxx:409
CP::IsolationCloseByCorrectionTool::m_hasEtConeIso
bool m_hasEtConeIso
Switch whether a topoetcone isolation working point is defined.
Definition: IsolationCloseByCorrectionTool.h:296
LArG4FSStartPointFilter.part
part
Definition: LArG4FSStartPointFilter.py:21
CP::IsolationCloseByCorrectionTool::m_backup_prefix
Gaudi::Property< std::string > m_backup_prefix
Definition: IsolationCloseByCorrectionTool.h:219
CP::IsolationCloseByCorrectionTool::m_maxTopoPolution
Gaudi::Property< float > m_maxTopoPolution
Definition: IsolationCloseByCorrectionTool.h:247
asg::AsgTool
Base class for the dual-use tool implementation classes.
Definition: AsgTool.h:47
CP::IsolationCloseByCorrectionTool::getAssociatedClusters
ClusterSet getAssociatedClusters(const EventContext &ctx, const xAOD::IParticle *particle, ObjectCache &cache) const
Loads the topo clusters associated with the primary IParticle.
Definition: IsolationCloseByCorrectionTool.cxx:531
PropertyWrapper.h
CP::IsolationCloseByCorrectionTool::lockDecorations
void lockDecorations(const xAOD::IParticleContainer *parts) const
Definition: IsolationCloseByCorrectionTool.cxx:324
FlowElementContainer.h
CP::IsolationCloseByCorrectionTool::m_ttvaTool
ToolHandle< CP::ITrackVertexAssociationTool > m_ttvaTool
Definition: IsolationCloseByCorrectionTool.h:205
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:269
CP::IsolationCloseByCorrectionTool::isTrackIsoTTVA
static bool isTrackIsoTTVA(xAOD::Iso::IsolationType type)
Definition: IsolationCloseByCorrectionTool.cxx:1088
CP::IsolationCloseByCorrectionTool::isVarTrackIsoTTVA
static bool isVarTrackIsoTTVA(xAOD::Iso::IsolationType Iso)
Definition: IsolationCloseByCorrectionTool.cxx:1080
CP::IsolationCloseByCorrectionTool::isFixedTrackIso
static bool isFixedTrackIso(xAOD::Iso::IsolationType type)
Definition: IsolationCloseByCorrectionTool.cxx:1066
CP::IsolationCloseByCorrectionTool::m_acc_quality
SelectionAccessor m_acc_quality
Definition: IsolationCloseByCorrectionTool.h:301
ObjectType
ObjectType
Definition: BaseObject.h:11
CP::IsolationCloseByCorrectionTool::m_declareCaloDecors
Gaudi::Property< bool > m_declareCaloDecors
Definition: IsolationCloseByCorrectionTool.h:256
CP::IsolationCloseByCorrectionTool::m_passOR_name
Gaudi::Property< std::string > m_passOR_name
Definition: IsolationCloseByCorrectionTool.h:215
IIsolationCloseByCorrectionTool.h
CP::IsolationCloseByCorrectionTool::m_PflowKey
SG::ReadHandleKey< xAOD::FlowElementContainer > m_PflowKey
Definition: IsolationCloseByCorrectionTool.h:283
BeamSpot::mutex
std::mutex mutex
Definition: InDetBeamSpotVertex.cxx:18
IsoCloseByCorrectionTest.WP
WP
Definition: IsoCloseByCorrectionTest.py:56
DMTest::P
P_v1 P
Definition: P.h:23
CP::IsolationCloseByCorrectionTool::UseAveragedDecorators
@ UseAveragedDecorators
Definition: IsolationCloseByCorrectionTool.h:41
CP::PflowSet
std::set< FlowElementPtr > PflowSet
Definition: PhysicsAnalysis/AnalysisCommon/IsolationSelection/IsolationSelection/Defs.h:75
CP::IsolationCloseByCorrectionTool::passSelectionQuality
bool passSelectionQuality(const xAOD::IParticle *particle) const
Definition: IsolationCloseByCorrectionTool.cxx:606
CP::IsolationCloseByCorrectionTool::IsolationCloseByCorrectionTool
IsolationCloseByCorrectionTool(const std::string &name)
Definition: IsolationCloseByCorrectionTool.cxx:40
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:263
CP::IsolationCloseByCorrectionTool::isTopoEtIso
static bool isTopoEtIso(xAOD::Iso::IsolationType type)
Definition: IsolationCloseByCorrectionTool.cxx:1071
CP::IsolationCloseByCorrectionTool::clusterEtMinusTile
static float clusterEtMinusTile(const xAOD::CaloCluster *C)
Definition: IsolationCloseByCorrectionTool.cxx:1046
CP::IsolationCloseByCorrectionTool::m_electron_isoTypes
IsoVector m_electron_isoTypes
Isolation variables used by the electron working point.
Definition: IsolationCloseByCorrectionTool.h:288
CP::TrackSet
std::set< TrackPtr > TrackSet
Definition: PhysicsAnalysis/AnalysisCommon/IsolationSelection/IsolationSelection/Defs.h:73
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:261
CP::IsolationCloseByCorrectionTool::ATLAS_THREAD_SAFE
IsoHelperMap m_isohelpers ATLAS_THREAD_SAFE
Definition: IsolationCloseByCorrectionTool.h:306
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:848
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:167
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:228
CP::IsolationCloseByCorrectionTool::isSame
bool isSame(const xAOD::IParticle *particle, const xAOD::IParticle *particle1) const
Definition: IsolationCloseByCorrectionTool.cxx:1008
xAOD::IParticle
Class providing the definition of the 4-vector interface.
Definition: Event/xAOD/xAODBase/xAODBase/IParticle.h:41
x
#define x
CP::IsolationCloseByCorrectionTool::initialize
virtual StatusCode initialize() override
Dummy implementation of the initialisation function.
Definition: IsolationCloseByCorrectionTool.cxx:42
CP
Select isolated Photons, Electrons and Muons.
Definition: Control/xAODRootAccess/xAODRootAccess/TEvent.h:49
CP::IsolationCloseByCorrectionTool::performCloseByCorrection
CorrectionCode performCloseByCorrection(const EventContext &ctx, ObjectCache &cache) const
Definition: IsolationCloseByCorrectionTool.cxx:275
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:311
python.CaloAddPedShiftConfig.type
type
Definition: CaloAddPedShiftConfig.py:42
CP::IsolationCloseByCorrectionTool::SubtractObjectsDirectly
@ SubtractObjectsDirectly
Definition: IsolationCloseByCorrectionTool.h:40
CP::IsolationCloseByCorrectionTool::m_coreConeMu
Gaudi::Property< float > m_coreConeMu
Definition: IsolationCloseByCorrectionTool.h:236
CP::IsolationCloseByCorrectionTool::m_isoSelection_name
Gaudi::Property< std::string > m_isoSelection_name
Definition: IsolationCloseByCorrectionTool.h:217
CP::IsolationCloseByCorrectionTool::m_photon_isoTypes
IsoVector m_photon_isoTypes
Isolation variables used by the photon working point.
Definition: IsolationCloseByCorrectionTool.h:290
CP::IsolationCloseByCorrectionTool::caloDecors
static const caloDecorNames & caloDecors()
Returns an array with the calo cluster decoration names [0]-> eta, [1]->phi, [2]->energy....
Definition: IsolationCloseByCorrectionTool.cxx:25
CP::IsolationCloseByCorrectionTool::m_has_nonTTVA
bool m_has_nonTTVA
Switch whether a pile-up non robust TTVA working point is defined.
Definition: IsolationCloseByCorrectionTool.h:292
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:956
CP::IsolationCloseByCorrectionTool::m_ConeSizeVariation
Gaudi::Property< float > m_ConeSizeVariation
Definition: IsolationCloseByCorrectionTool.h:251
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:191
CP::IsolationCloseByCorrectionTool::m_muon_isoTypes
IsoVector m_muon_isoTypes
Isolation variables used by the muon working point.
Definition: IsolationCloseByCorrectionTool.h:286
CP::IsolationCloseByCorrectionTool::m_CaloClusterKey
SG::ReadHandleKey< xAOD::CaloClusterContainer > m_CaloClusterKey
Definition: IsolationCloseByCorrectionTool.h:281
xAOD::CaloCluster_v1
Description of a calorimeter cluster.
Definition: CaloCluster_v1.h:62
CP::IsolationCloseByCorrectionTool::isEgamma
static bool isEgamma(const xAOD::IParticle *particle)
Definition: IsolationCloseByCorrectionTool.cxx:523
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:141
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:1016
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:231
CP::IsolationCloseByCorrectionTool::coneSize
float coneSize(const xAOD::IParticle *particle, IsoType Cone) const
Definition: IsolationCloseByCorrectionTool.cxx:972
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:1057
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:653
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:489
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:1089
CP::IsolationCloseByCorrectionTool::isFixedTrackIsoTTVA
static bool isFixedTrackIsoTTVA(xAOD::Iso::IsolationType type)
Definition: IsolationCloseByCorrectionTool.cxx:1072
CP::IsolationCloseByCorrectionTool::isPFlowIso
static bool isPFlowIso(xAOD::Iso::IsolationType type)
Definition: IsolationCloseByCorrectionTool.cxx:1103
CP::IsolationCloseByCorrectionTool::m_photKeys
Gaudi::Property< std::vector< std::string > > m_photKeys
Definition: IsolationCloseByCorrectionTool.h:265
CP::IsolationCloseByCorrectionTool::m_caloExtTool
ToolHandle< Trk::IParticleCaloExtensionTool > m_caloExtTool
calo extension tool for muon track particle extrapolation to calo
Definition: IsolationCloseByCorrectionTool.h:273
CP::IsolationCloseByCorrectionTool::unCalibPt
float unCalibPt(const xAOD::IParticle *particle) const
Definition: IsolationCloseByCorrectionTool.cxx:982
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:520
CP::IsolationCloseByCorrectionTool::getAssociatedTracks
TrackSet getAssociatedTracks(const xAOD::IParticle *P) const
Retrieve all Inner detector tracks associated with the primary particle.
Definition: IsolationCloseByCorrectionTool.cxx:492
CP::IIsolationCloseByCorrectionTool
Definition: IIsolationCloseByCorrectionTool.h:24
CP::IsolationCloseByCorrectionTool::m_caloDecSuffix
Gaudi::Property< std::string > m_caloDecSuffix
Definition: IsolationCloseByCorrectionTool.h:224
ITrackVertexAssociationTool.h
DataVector
Derived DataVector<T>.
Definition: DataVector.h:794
IInDetTrackSelectionTool.h
CP::IsolationCloseByCorrectionTool::ObjectCache::eg_associated_clusters
UnorderedClusterSet eg_associated_clusters
Definition: IsolationCloseByCorrectionTool.h:93
CP::IsolationCloseByCorrectionTool::m_hasPflowIso
bool m_hasPflowIso
Switch whether a pflow isolation working point is defined.
Definition: IsolationCloseByCorrectionTool.h:294
CP::IsolationCloseByCorrectionTool::m_selectorTool
ToolHandle< CP::IIsolationSelectionTool > m_selectorTool
Definition: IsolationCloseByCorrectionTool.h:207
CP::IsolationCloseByCorrectionTool::ObjectCache::prim_parts
PrimaryCollection prim_parts
Definition: IsolationCloseByCorrectionTool.h:88
CP::IsolationCloseByCorrectionTool::m_isInitialised
bool m_isInitialised
Definition: IsolationCloseByCorrectionTool.h:299
CP::IsolationCloseByCorrectionTool::m_acc_passOR
SelectionAccessor m_acc_passOR
Definition: IsolationCloseByCorrectionTool.h:302
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:221
CP::IsolationCloseByCorrectionTool::getIsolationTypes
const IsoVector & getIsolationTypes(const xAOD::IParticle *particle) const
Definition: IsolationCloseByCorrectionTool.cxx:361
CP::IsolationCloseByCorrectionTool::TopoConeCorrectionModel
TopoConeCorrectionModel
Definition: IsolationCloseByCorrectionTool.h:39
CP::IsolationCloseByCorrectionTool::m_isoDecSuffix
Gaudi::Property< std::string > m_isoDecSuffix
Definition: IsolationCloseByCorrectionTool.h:222
CP::IsolationCloseByCorrectionTool::pflowDecors
static const caloDecorNames & pflowDecors()
Definition: IsolationCloseByCorrectionTool.cxx:31
CP::SelectionAccessor
std::unique_ptr< CharAccessor > SelectionAccessor
Definition: PhysicsAnalysis/AnalysisCommon/IsolationSelection/IsolationSelection/Defs.h:25
CP::IsolationCloseByCorrectionTool::m_trkselTool
ToolHandle< InDet::IInDetTrackSelectionTool > m_trkselTool
Definition: IsolationCloseByCorrectionTool.h:203
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
createCoolChannelIdFile.par
par
Definition: createCoolChannelIdFile.py:29
IIsolationSelectionTool.h
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:253
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:612
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:824
MuonContainer.h
CP::IsolationCloseByCorrectionTool::m_ptvarconeRadius
Gaudi::Property< float > m_ptvarconeRadius
Definition: IsolationCloseByCorrectionTool.h:240
CP::ClusterSet
std::set< CaloClusterPtr > ClusterSet
Definition: PhysicsAnalysis/AnalysisCommon/IsolationSelection/IsolationSelection/Defs.h:74
CP::IsolationCloseByCorrectionTool::ObjectCache::tracks
TrackSet tracks
Definition: IsolationCloseByCorrectionTool.h:90
IParticleCaloExtensionTool.h
CP::IsolationCloseByCorrectionTool::subtractCloseByContribution
CorrectionCode subtractCloseByContribution(const EventContext &ctx, const xAOD::IParticle *P, ObjectCache &cache) const
Definition: IsolationCloseByCorrectionTool.cxx:373
CP::IsolationCloseByCorrectionTool::getCloseByCorrectionTopoIso
CorrectionCode getCloseByCorrectionTopoIso(const EventContext &ctx, const xAOD::IParticle *primary, const IsoType type, ObjectCache &cache, float &isoValue) const
Definition: IsolationCloseByCorrectionTool.cxx:725
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:279
Muons
Definition: Muons.py:1
CP::UnorderedClusterSet
std::unordered_set< const xAOD::CaloCluster * > UnorderedClusterSet
Definition: PhysicsAnalysis/AnalysisCommon/IsolationSelection/IsolationSelection/Defs.h:77
ASG_TOOL_CLASS
#define ASG_TOOL_CLASS(CLASSNAME, INT1)
Definition: AsgToolMacros.h:68
WriteDecorHandleKeyArray.h
IsolationWP.h
CP::IsolationCloseByCorrectionTool::getOriginalIsolation
virtual float getOriginalIsolation(const xAOD::IParticle &P, IsoType type) const override
Definition: IsolationCloseByCorrectionTool.cxx:1043
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:212
CP::IsolationCloseByCorrectionTool::isTrackIso
static bool isTrackIso(xAOD::Iso::IsolationType type)
Definition: IsolationCloseByCorrectionTool.cxx:1068
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:916
doL1CaloHVCorrections.parts
parts
Definition: doL1CaloHVCorrections.py:334
CP::IsolationCloseByCorrectionTool::overlap
bool overlap(const xAOD::IParticle *particle, const xAOD::IParticle *particle1, float dR) const
Definition: IsolationCloseByCorrectionTool.cxx:1030
CP::IsolationCloseByCorrectionTool::m_dec_isoselection
SelectionDecorator m_dec_isoselection
Definition: IsolationCloseByCorrectionTool.h:303
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:995
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:435
CP::IsolationCloseByCorrectionTool::isVarTrackIso
static bool isVarTrackIso(xAOD::Iso::IsolationType type)
Definition: IsolationCloseByCorrectionTool.cxx:1067
CP::IsolationCloseByCorrectionTool::declareDependency
void declareDependency(const std::vector< std::string > &containers, const IsoVector &types)
Helper function to declare the data dependencies.
Definition: IsolationCloseByCorrectionTool.cxx:123
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:102
CP::IsolationCloseByCorrectionTool::trackPtCut
static float trackPtCut(xAOD::Iso::IsolationType type)
Definition: IsolationCloseByCorrectionTool.cxx:1093
PhotonContainer.h
ReadDecorHandleKeyArray.h
CP::SelectionDecorator
std::unique_ptr< CharDecorator > SelectionDecorator
Definition: PhysicsAnalysis/AnalysisCommon/IsolationSelection/IsolationSelection/Defs.h:26
CP::IsoVector
std::vector< IsoType > IsoVector
Definition: PhysicsAnalysis/AnalysisCommon/IsolationSelection/IsolationSelection/Defs.h:38
CP::IsolationCloseByCorrectionTool::m_isoVarKeys
SG::ReadDecorHandleKeyArray< xAOD::IParticleContainer > m_isoVarKeys
Definition: IsolationCloseByCorrectionTool.h:267
TrackParticleContainer.h