ATLAS Offline Software
PixelDistortionData.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
11 #ifndef PIXELDISTORTIONDATA_H
12 #define PIXELDISTORTIONDATA_H
13 
14 #include "AthenaKernel/CLASS_DEF.h"
15 #include <map>
16 
18 #include "AthenaKernel/CondCont.h"
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 
47 inline void PixelDistortionData::setIds(const std::unordered_map<uint32_t,unsigned long long>& ids) { m_ids=ids; }
48 inline void PixelDistortionData::setDistortionMap(const std::unordered_map<uint32_t,std::vector<float>>& distortionMap) { m_distortionMap=distortionMap; }
49 
50 inline int PixelDistortionData::getVersion() const { return m_version; }
51 
52 CLASS_DEF( PixelDistortionData , 127567278 , 1 )
53 
55 
56 #endif
PixelDistortionData::setVersion
void setVersion(int version)
Definition: PixelDistortionData.h:46
CondCont.h
Hold mappings of ranges to condition objects.
xAOD::uint32_t
setEventNumber uint32_t
Definition: EventInfo_v1.cxx:127
Amg::Vector2D
Eigen::Matrix< double, 2, 1 > Vector2D
Definition: GeoPrimitives.h:48
PixelDistortionData::correctSimulation
Amg::Vector2D correctSimulation(uint32_t hashID, const Amg::Vector2D &locpos, const Amg::Vector3D &direction) const
Definition: PixelDistortionData.cxx:186
PixelDistortionData::correctReconstruction
Amg::Vector2D correctReconstruction(uint32_t hashID, const Amg::Vector2D &locpos, const Amg::Vector3D &direction) const
Definition: PixelDistortionData.cxx:180
CONDCONT_DEF
CONDCONT_DEF(PixelDistortionData, 127567679)
PixelDistortionData::clear
void clear()
Definition: PixelDistortionData.cxx:314
GeoPrimitives.h
PixelDistortionData::getVersion
int getVersion() const
Definition: PixelDistortionData.h:50
PixelDistortionData::m_distortionMap
std::unordered_map< uint32_t, std::vector< float > > m_distortionMap
Definition: PixelDistortionData.h:43
PixelDistortionData::isIBL3D
static bool isIBL3D(const unsigned long long ull_id)
Definition: PixelDistortionData.cxx:253
PixelDistortionData::setDistortionMap
void setDistortionMap(const std::unordered_map< uint32_t, std::vector< float >> &distortionMap)
Definition: PixelDistortionData.h:48
PixelDistortionData::isOldParam
static bool isOldParam(const unsigned long long ull_id)
Definition: PixelDistortionData.cxx:244
PixelDistortionData
Definition: PixelDistortionData.h:20
python.subdetectors.mmg.ids
ids
Definition: mmg.py:8
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
get_generator_info.version
version
Definition: get_generator_info.py:33
PixelDistortionData::getId
unsigned long long getId(uint32_t hashID) const
Definition: PixelDistortionData.cxx:113
PixelDistortionData::getSurveyZ
static double getSurveyZ(const double localeta, const double localphi, const float *disto)
Definition: PixelDistortionData.cxx:221
PixelDistortionData::m_ids
std::unordered_map< uint32_t, unsigned long long > m_ids
Definition: PixelDistortionData.h:42
CLASS_DEF
#define CLASS_DEF(NAME, CID, VERSION)
associate a clid and a version to a type eg
Definition: Control/AthenaKernel/AthenaKernel/CLASS_DEF.h:64
PixelDistortionData::correction
Amg::Vector2D correction(uint32_t hashID, const Amg::Vector2D &locpos, const Amg::Vector3D &direction) const
Definition: PixelDistortionData.cxx:120
PixelDistortionData::getDistortionMap
std::vector< float > getDistortionMap(uint32_t id) const
Definition: PixelDistortionData.cxx:100
PixelDistortionData::setIds
void setIds(const std::unordered_map< uint32_t, unsigned long long > &ids)
Definition: PixelDistortionData.h:47
PixelDistortionData::m_version
int m_version
Definition: PixelDistortionData.h:41
CLASS_DEF.h
macros to associate a CLID to a type
PixelDistortionData::getInSituZ
static double getInSituZ(const double localeta, const double eta_size, const double localphi, const double phi_size, const float *disto)
Definition: PixelDistortionData.cxx:192