10#include <GaudiKernel/StatusCode.h>
11#include <traccc/edm/silicon_cell_collection.hpp>
18bool float_equal(
float a,
float b) {
20 if (std::abs(
a-b) < 1e-3f)
return true;
57 ms <<
"id: " <<
cl.identifier()
58 <<
", idhash: " <<
cl.identifierHash()
59 <<
", locpos: [" <<
cl.localPosition<2>()(0) <<
", " <<
cl.localPosition<2>()(1) <<
']'
60 <<
", locvar: [" <<
'[' <<
cl.localCovariance<2>()(0, 0) <<
", " <<
cl.localCovariance<2>()(0, 1) <<
']'
61 <<
",[" <<
cl.localCovariance<2>()(1, 0) <<
", " <<
cl.localCovariance<2>()(1, 1) <<
"]]"
62 <<
", glopos: [" <<
cl.globalPosition()(0) <<
", " <<
cl.globalPosition()(1) <<
", " <<
cl.globalPosition()(2) <<
']'
68 ms <<
"id: " <<
cl.identifier()
69 <<
", idhash: " <<
cl.identifierHash()
70 <<
", locpos: " <<
cl.localPosition<1>()
71 <<
", locvar: " <<
cl.localCovariance<1>()
89 return StatusCode::SUCCESS;
103 if (mon_pixels->size() != ref_pixels->size() || mon_strips->size() != ref_strips->size()) {
104 std::ostringstream oss;
105 oss <<
"different sizes:";
106 if (mon_pixels->size() != ref_pixels->size()) {
107 oss <<
" pixels (ref: " << ref_pixels->size() <<
", mon: " << mon_pixels->size() <<
")";
109 if (mon_strips->size() != ref_strips->size()) {
110 oss <<
" strips (ref: " << ref_strips->size() <<
", mon: " << mon_strips->size() <<
")";
113 return StatusCode::FAILURE;
116 unsigned int pixel_mismatch = 0;
117 for (
size_t i = 0; i < mon_pixels->size(); ++i) {
123 <<
": ref=[" <<
ref <<
']'
124 <<
", mon=[" << mon <<
']');
127 unsigned int strip_mismatch = 0;
128 for (
size_t i = 0; i < mon_strips->size(); ++i) {
134 <<
": ref=[" <<
ref <<
']'
135 <<
", mon=[" << mon <<
']');
139 if (pixel_mismatch != 0 || strip_mismatch != 0) {
140 ATH_MSG_ERROR(
"pixel clusters: " << pixel_mismatch <<
" mismatches over " << mon_pixels->size() <<
" clusters");
141 ATH_MSG_ERROR(
"strip clusters: " << strip_mismatch <<
" mismatches over " << mon_strips->size() <<
" clusters");
142 return StatusCode::FAILURE;
145 return StatusCode::SUCCESS;
const std::regex ref(r_ef)
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_DEBUG(x,...)
#define ATH_MSG_ERROR(x,...)
std::ostream & operator<<(std::ostream &s, const std::tuple< Tup... > &tup)
bool operator==(const DataVector< T > &a, const DataVector< T > &b)
Vector equality comparison.
Handle class for reading from StoreGate.
SG::ReadHandleKey< xAOD::StripClusterContainer > m_monitoredStripsKey
SG::ReadHandleKey< xAOD::StripClusterContainer > m_referenceStripsKey
virtual StatusCode initialize() override
SG::ReadHandleKey< xAOD::PixelClusterContainer > m_monitoredPixelsKey
virtual StatusCode execute(const EventContext &ctx) const override
SG::ReadHandleKey< xAOD::PixelClusterContainer > m_referencePixelsKey
ConstVectorMap< 3 > globalPosition() const
Returns the global position of the pixel cluster.
ConstMatrixMap< N > localCovariance() const
Returns the local covariance of the measurement.
DetectorIDHashType identifierHash() const
Returns the IdentifierHash of the measurement (corresponds to the detector element IdentifierHash).
ConstVectorMap< N > localPosition() const
Returns the local position of the measurement.
The AlignStoreProviderAlg loads the rigid alignment corrections and pipes them through the readout ge...
SG::ReadCondHandle< T > makeHandle(const SG::ReadCondHandleKey< T > &key, const EventContext &ctx=Gaudi::Hive::currentContext())
cl
print [x.__class__ for x in toList(dqregion.getSubRegions()) ]
StripCluster_v1 StripCluster
Define the version of the strip cluster class.
PixelCluster_v1 PixelCluster
Define the version of the pixel cluster class.