ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
InnerDetector
InDetConditions
PixelConditionsData
PixelConditionsData
ITkPixelClusterErrorData.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 ITKPIXELCLUSTERERRORDATA_H
6
#define ITKPIXELCLUSTERERRORDATA_H
7
8
#include "
AthenaKernel/CLASS_DEF.h
"
9
10
#include "Identifier/Identifier.h"
11
#include "
Identifier/IdentifierHash.h
"
12
#include "
InDetIdentifier/PixelID.h
"
13
14
#include <string>
15
#include <vector>
16
#include <array>
17
#include <utility>
//std::pair
18
#include <span>
19
20
21
namespace
ITk
22
{
23
24
class
PixelClusterErrorData
25
{
26
27
public
:
28
enum
EParam
{
29
kPeriod_phi
,
30
kPeriod_sinheta
,
31
kDelta_x_slope
,
32
kDelta_x_offset
,
33
kError_x
,
34
kDelta_y_slope
,
35
kDelta_y_offset
,
36
kError_y
,
37
kNParam
38
};
39
40
PixelClusterErrorData
() {
initialize
(); }
41
~PixelClusterErrorData
() {};
42
44
45
std::pair<double,double>
getDelta
(
IdentifierHash
idHash,
46
int
sizePhi,
double
angle
,
47
int
sizeZ,
double
eta
)
const
;
48
std::pair<double,double>
getDeltaError
(
IdentifierHash
idHash)
const
{
49
const
std::array<float,kNParam> &values =
m_constmap
.at(idHash);
50
return
std::make_pair(values[
kError_x
],values[
kError_y
]);
51
}
52
void
setDeltaError
(
IdentifierHash
idHash,
53
float
period_phi,
float
period_sinheta,
54
float
delta_x_slope,
float
delta_x_offset,
float
error_x,
55
float
delta_y_slope,
float
delta_y_offset,
float
error_y );
56
void
setDeltaError
(
IdentifierHash
idHash,
const
std::array<float, kNParam> ¶m ) {
57
m_constmap
.at(idHash)=param;
58
}
59
void
setDeltaError
(
IdentifierHash
idHash, std::span<double> param ) {
60
std::array<float,kNParam> &dest=
m_constmap
.at(idHash);
61
if
(param.size() != dest.size())
throw
std::range_error(
"Parameter sizes do not match"
);
62
std::copy(param.begin(),param.end(), dest.begin());
63
}
64
void
print
(
const
std::string&
file
)
const
;
69
unsigned
int
load
(
const
std::string&
file
);
70
71
IdentifierHash
getIdentifierHash
(
Identifier
identifier)
const
{
72
return
m_pixelID
->wafer_hash(identifier);
73
}
74
Identifier
getIdentifier
(
IdentifierHash
idHash)
const
{
75
return
m_pixelID
->wafer_id(idHash);
76
}
77
78
const
std::vector< std::array<float, kNParam> > &
getConstMap
()
const
{
return
m_constmap
; }
79
80
private
:
81
void
initialize
();
82
// map to store all ITk Analogue Clustering constants and errors
83
std::vector< std::array<float, kNParam> >
m_constmap
;
84
85
const
PixelID
*
m_pixelID
{
nullptr
};
86
87
};
88
89
}
// namespace ITk
90
91
#endif
92
eta
Scalar eta() const
pseudorapidity method
Definition
AmgMatrixBasePlugin.h:83
CLASS_DEF.h
macros to associate a CLID to a type
IdentifierHash.h
PixelID.h
This is an Identifier helper class for the Pixel subdetector.
angle
double angle(const GeoTrf::Vector2D &a, const GeoTrf::Vector2D &b)
Definition
TRTDetectorFactory_Full.cxx:71
ITk::PixelClusterErrorData::getDeltaError
std::pair< double, double > getDeltaError(IdentifierHash idHash) const
Definition
ITkPixelClusterErrorData.h:48
ITk::PixelClusterErrorData::setDeltaError
void setDeltaError(IdentifierHash idHash, std::span< double > param)
Definition
ITkPixelClusterErrorData.h:59
ITk::PixelClusterErrorData::print
void print(const std::string &file) const
Definition
ITkPixelClusterErrorData.cxx:68
ITk::PixelClusterErrorData::getIdentifierHash
IdentifierHash getIdentifierHash(Identifier identifier) const
Definition
ITkPixelClusterErrorData.h:71
ITk::PixelClusterErrorData::~PixelClusterErrorData
~PixelClusterErrorData()
Definition
ITkPixelClusterErrorData.h:41
ITk::PixelClusterErrorData::EParam
EParam
Definition
ITkPixelClusterErrorData.h:28
ITk::PixelClusterErrorData::kPeriod_phi
@ kPeriod_phi
Definition
ITkPixelClusterErrorData.h:29
ITk::PixelClusterErrorData::kDelta_x_slope
@ kDelta_x_slope
Definition
ITkPixelClusterErrorData.h:31
ITk::PixelClusterErrorData::kPeriod_sinheta
@ kPeriod_sinheta
Definition
ITkPixelClusterErrorData.h:30
ITk::PixelClusterErrorData::kDelta_y_slope
@ kDelta_y_slope
Definition
ITkPixelClusterErrorData.h:34
ITk::PixelClusterErrorData::kNParam
@ kNParam
Definition
ITkPixelClusterErrorData.h:37
ITk::PixelClusterErrorData::kError_y
@ kError_y
Definition
ITkPixelClusterErrorData.h:36
ITk::PixelClusterErrorData::kDelta_x_offset
@ kDelta_x_offset
Definition
ITkPixelClusterErrorData.h:32
ITk::PixelClusterErrorData::kDelta_y_offset
@ kDelta_y_offset
Definition
ITkPixelClusterErrorData.h:35
ITk::PixelClusterErrorData::kError_x
@ kError_x
Definition
ITkPixelClusterErrorData.h:33
ITk::PixelClusterErrorData::setDeltaError
void setDeltaError(IdentifierHash idHash, float period_phi, float period_sinheta, float delta_x_slope, float delta_x_offset, float error_x, float delta_y_slope, float delta_y_offset, float error_y)
Definition
ITkPixelClusterErrorData.cxx:56
ITk::PixelClusterErrorData::m_pixelID
const PixelID * m_pixelID
Definition
ITkPixelClusterErrorData.h:85
ITk::PixelClusterErrorData::getIdentifier
Identifier getIdentifier(IdentifierHash idHash) const
Definition
ITkPixelClusterErrorData.h:74
ITk::PixelClusterErrorData::PixelClusterErrorData
PixelClusterErrorData()
Definition
ITkPixelClusterErrorData.h:40
ITk::PixelClusterErrorData::initialize
void initialize()
Definition
ITkPixelClusterErrorData.cxx:18
ITk::PixelClusterErrorData::load
unsigned int load(const std::string &file)
load cluster error data from ascii file
Definition
ITkPixelClusterErrorData.cxx:83
ITk::PixelClusterErrorData::getDelta
std::pair< double, double > getDelta(IdentifierHash idHash, int sizePhi, double angle, int sizeZ, double eta) const
Methods to access the calibration data.
Definition
ITkPixelClusterErrorData.cxx:32
ITk::PixelClusterErrorData::getConstMap
const std::vector< std::array< float, kNParam > > & getConstMap() const
Definition
ITkPixelClusterErrorData.h:78
ITk::PixelClusterErrorData::m_constmap
std::vector< std::array< float, kNParam > > m_constmap
Definition
ITkPixelClusterErrorData.h:83
ITk::PixelClusterErrorData::setDeltaError
void setDeltaError(IdentifierHash idHash, const std::array< float, kNParam > ¶m)
Definition
ITkPixelClusterErrorData.h:56
IdentifierHash
This is a "hash" representation of an Identifier.
Definition
IdentifierHash.h:25
PixelID
This is an Identifier helper class for the Pixel subdetector.
Definition
PixelID.h:69
ITk
Definition
ITkPixelOfflineCalibCondAlg.cxx:13
Identifier
Definition
IdentifierFieldParser.cxx:14
file
TFile * file
Definition
tile_monitor.h:29
Generated on
for ATLAS Offline Software by
1.17.0