ATLAS Offline Software
Loading...
Searching...
No Matches
eflowTrackClusterLink.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/*
6 * eflowTrackClusterLink.h
7 *
8 * Created on: 30.09.2013
9 * Author: tlodd
10 */
11
12#ifndef EFLOWREC_EFLOWTRACKCLUSTERLINK_H
13#define EFLOWREC_EFLOWTRACKCLUSTERLINK_H
14
15#include <utility>
16#include <unordered_map>
17#include <vector>
18#include <iostream>
19#include <mutex>
20
21#include "GaudiKernel/ToolHandle.h"
22#include "GaudiKernel/EventContext.h"
23
24#include "CxxUtils/fpcompare.h"
25#include "eflowRecTrack.h"
26
27class eflowRecTrack;
28class eflowRecCluster;
29
37public:
39 m_track(track), m_cluster(cluster) { }
40
42
44 eflowRecCluster* cluster,
45 const EventContext& ctx);
46
48 const eflowRecCluster* getCluster() const { return m_cluster; }
50 const eflowRecTrack* getTrack() const { return m_track; }
51
52 void setClusterIntegral(const std::vector<double>& clusterIntegral) {
53 m_clusterIntegral = clusterIntegral;
54 }
55 const std::vector<double>& getClusterIntegral() const { return m_clusterIntegral; }
56
57private:
58 using key_t = std::pair<eflowRecTrack*, eflowRecCluster*>;
59 struct Hasher
60 {
61 size_t operator() (const key_t& k) const
62 {
63 return std::hash<eflowRecTrack*>()(k.first) ^
64 std::hash<eflowRecCluster*>()(k.second);
65 }
66 };
67 struct Cache
68 {
69 std::mutex m_mutex;
70 std::unordered_map<key_t, std::unique_ptr<eflowTrackClusterLink>, Hasher > m_map;
71 EventContext::ContextEvt_t m_evt = static_cast<EventContext::ContextEvt_t>(-1);
72 };
73
76
77 std::vector<double> m_clusterIntegral;
78};
79
80#endif /* EFLOWREC_EFLOWTRACKCLUSTERLINK_H */
This class extends the information about a xAOD::CaloCluster.
This class extends the information about a xAOD::Track.
Workaround x86 precision issues for FP inequality comparisons.