ATLAS Offline Software
Loading...
Searching...
No Matches
JetHitAssociationAlg.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef JET_HIT_ASSOCIATION_ALG_HH
6#define JET_HIT_ASSOCIATION_ALG_HH
7
8
9
10
11// FrameWork includes
13
14// Containers
17
18// Read and write handles
22
23// Element links
24#include "AthLinks/ElementLink.h"
25// STL includes
26#include <string>
27#include <utility> //std::pair
28#include <vector>
29
30
31namespace FlavorTagDiscriminants {
32
34
35 public:
36 JetHitAssociationAlg(const std::string& name,
37 ISvcLocator* pSvcLocator);
38
39 virtual StatusCode initialize() override;
40 virtual StatusCode execute(const EventContext&) const override;
41
42
43 private:
44 // Particle container
46 this, "jetContainer", "tempEmtopoJets", "Key for particle collection"};
47
49 this, "hitAssociation", m_jetCollectionKey, "hitsAssociatedWithJet", "Key for decorating hit links"};
50
52 this, "wedgeZDecor", "", "Jet decoration holding the wedge z-centre, in the same frame as the hit positions; if unset the wedge is centred on z = 0"};
53
54
55 // Hits input
57 this, "hitContainer", "PixelClusters", "Key for input hits"};
58
60 this, "hitReaderX", m_inputHitCollectionKey, "HitsXRelToBeamspot", "Key for hits x coordinate relative to vertex"};
61
63 this, "hitReaderY", m_inputHitCollectionKey, "HitsYRelToBeamspot", "Key for hits x coordinate relative to vertex"};
64
66 this, "hitReaderZ", m_inputHitCollectionKey, "HitsZRelToBeamspot", "Key for hits x coordinate relative to vertex"};
67
68
69 // Jet-Hit association configuration
70 Gaudi::Property<float> m_dPhiHitToJet {
71 this, "dphiHitToJet", 0.2, "Phi half-width of the wedge around the jet axis"};
72
73 Gaudi::Property<float> m_dEtaHitToVertex {
74 this, "detaHitToJet", 0.2, "Eta half-width of the wedge around the jet axis"};
75
76 Gaudi::Property<float> m_dZHitToVertex {
77 this, "dzHitToVertex", 180, "Z half-width [mm] of the wedge around its z-centre"};
78
79 Gaudi::Property<bool> m_useDRCone {
80 this, "useDRCone", false, "Select hits in a dR cone around the jet axis instead of the wedge"};
81
82 Gaudi::Property<float> m_dRHitToJet {
83 this, "dRHitToJet", 0.4, "Cone size, if useDRCone is set"};
84
85 Gaudi::Property<bool> m_includeBarrel {
86 this, "includeBarrelHits", true, "Include barrel hits"};
87
88 Gaudi::Property<bool> m_includeEndcap {
89 this, "includeEndcapHits", true, "Include endcap hits"};
90
91 Gaudi::Property<int> m_maxHits {
92 this, "maxHits", 200, "Maximum number of total hits; 0 to keep all"};
93
94
95 struct Hit {
97 float phi;
98 float z;
99 float r;
100 };
101
102
103 // Helper methods
104 const std::vector<std::pair<float, const xAOD::TrackMeasurementValidation*>>
106 const std::vector<Hit>& hits,
107 double zed) const;
108 };
109
110}
111
112#endif
Property holding a SG store/key/clid/attr name from which a ReadDecorHandle is made.
Property holding a SG store/key/clid from which a ReadHandle is made.
Property holding a SG store/key/clid/attr name from which a WriteDecorHandle is made.
An algorithm that can be simultaneously executed in multiple threads.
virtual StatusCode execute(const EventContext &) const override
SG::ReadDecorHandleKey< xAOD::IParticleContainer > m_wedgeZKey
SG::ReadDecorHandleKey< xAOD::TrackMeasurementValidationContainer > m_hitsYRelToVertexKey
SG::ReadHandleKey< xAOD::TrackMeasurementValidationContainer > m_inputHitCollectionKey
SG::ReadHandleKey< xAOD::IParticleContainer > m_jetCollectionKey
JetHitAssociationAlg(const std::string &name, ISvcLocator *pSvcLocator)
SG::ReadDecorHandleKey< xAOD::TrackMeasurementValidationContainer > m_hitsXRelToVertexKey
const std::vector< std::pair< float, const xAOD::TrackMeasurementValidation * > > getJetHits(const xAOD::IParticle *jet, const std::vector< Hit > &hits, double zed) const
SG::WriteDecorHandleKey< xAOD::IParticleContainer > m_hitAssociationKey
SG::ReadDecorHandleKey< xAOD::TrackMeasurementValidationContainer > m_hitsZRelToVertexKey
Property holding a SG store/key/clid/attr name from which a ReadDecorHandle is made.
Property holding a SG store/key/clid from which a ReadHandle is made.
Property holding a SG store/key/clid/attr name from which a WriteDecorHandle is made.
Class providing the definition of the 4-vector interface.
TrackMeasurementValidation_v1 TrackMeasurementValidation
Reference the current persistent version:
const xAOD::TrackMeasurementValidation * original_hit