ATLAS Offline Software
Loading...
Searching...
No Matches
PixelDistortionData.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3*/
10
11#ifndef PIXELDISTORTIONDATA_H
12#define PIXELDISTORTIONDATA_H
13
15#include <map>
16
19
21 public:
22 void setVersion(int version);
23 void setIds(const std::unordered_map<uint32_t,unsigned long long>& ids);
24 void setDistortionMap(const std::unordered_map<uint32_t,std::vector<float>>& distortionMap);
25
26 int getVersion() const;
27 unsigned long long getId(uint32_t hashID) const;
28 std::vector<float> getDistortionMap(uint32_t id) const;
29
30 Amg::Vector2D correction(uint32_t hashID, const Amg::Vector2D & locpos, const Amg::Vector3D & direction) const;
31 Amg::Vector2D correctReconstruction(uint32_t hashID, const Amg::Vector2D & locpos, const Amg::Vector3D & direction) const;
32 Amg::Vector2D correctSimulation(uint32_t hashID, const Amg::Vector2D & locpos, const Amg::Vector3D & direction) const;
33 static double getInSituZ(const double localeta, const double eta_size, const double localphi, const double phi_size, const float *disto) ;
34 static double getSurveyZ(const double localeta, const double localphi, const float *disto) ;
35 static bool isOldParam(const unsigned long long ull_id) ;
36 static bool isIBL3D(const unsigned long long ull_id) ;
37
38 void clear();
39
40 private:
41 int m_version{};
42 std::unordered_map<uint32_t,unsigned long long> m_ids;
43 std::unordered_map<uint32_t,std::vector<float>> m_distortionMap;
44};
45
46inline void PixelDistortionData::setVersion(int version) { m_version=version; }
47inline void PixelDistortionData::setIds(const std::unordered_map<uint32_t,unsigned long long>& ids) { m_ids=ids; }
48inline void PixelDistortionData::setDistortionMap(const std::unordered_map<uint32_t,std::vector<float>>& distortionMap) { m_distortionMap=distortionMap; }
49
50inline int PixelDistortionData::getVersion() const { return m_version; }
51
52CLASS_DEF( PixelDistortionData , 127567278 , 1 )
53
55
56#endif
Hold mappings of ranges to condition objects.
#define CONDCONT_DEF(...)
Definition CondCont.h:1413
macros to associate a CLID to a type
#define CLASS_DEF(NAME, CID, VERSION)
associate a clid and a version to a type eg
Amg::Vector2D correction(uint32_t hashID, const Amg::Vector2D &locpos, const Amg::Vector3D &direction) const
std::unordered_map< uint32_t, unsigned long long > m_ids
void setVersion(int version)
Amg::Vector2D correctSimulation(uint32_t hashID, const Amg::Vector2D &locpos, const Amg::Vector3D &direction) const
static double getSurveyZ(const double localeta, const double localphi, const float *disto)
static double getInSituZ(const double localeta, const double eta_size, const double localphi, const double phi_size, const float *disto)
static bool isOldParam(const unsigned long long ull_id)
void setIds(const std::unordered_map< uint32_t, unsigned long long > &ids)
std::vector< float > getDistortionMap(uint32_t id) const
static bool isIBL3D(const unsigned long long ull_id)
void setDistortionMap(const std::unordered_map< uint32_t, std::vector< float > > &distortionMap)
Amg::Vector2D correctReconstruction(uint32_t hashID, const Amg::Vector2D &locpos, const Amg::Vector3D &direction) const
std::unordered_map< uint32_t, std::vector< float > > m_distortionMap
unsigned long long getId(uint32_t hashID) const
Eigen::Matrix< double, 2, 1 > Vector2D
Eigen::Matrix< double, 3, 1 > Vector3D