From ea19255f95c3fc9a56c6b7234e70ab0917179b2f Mon Sep 17 00:00:00 2001 From: Patrick Scholer <pscholer@atlmuonsw1.dyndns.cern.ch> Date: Sat, 23 Nov 2024 14:59:19 +0100 Subject: [PATCH 1/2] add non parallelism to sTGC as built model --- .../MuonAlignmentData/MuonAlignmentData/sTGCAsBuiltData2.h | 1 + .../MuonAlignment/MuonAlignmentData/src/sTGCAsBuiltData2.cxx | 2 +- .../MuonCondGeneral/MuonCondAlg/src/sTGCAsBuiltCondAlg2.cxx | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/MuonSpectrometer/MuonAlignment/MuonAlignmentData/MuonAlignmentData/sTGCAsBuiltData2.h b/MuonSpectrometer/MuonAlignment/MuonAlignmentData/MuonAlignmentData/sTGCAsBuiltData2.h index b747d2feb486..cf1953123ca3 100644 --- a/MuonSpectrometer/MuonAlignment/MuonAlignmentData/MuonAlignmentData/sTGCAsBuiltData2.h +++ b/MuonSpectrometer/MuonAlignment/MuonAlignmentData/MuonAlignmentData/sTGCAsBuiltData2.h @@ -29,6 +29,7 @@ class sTGCAsBuiltData2: public AthMessaging { double offset {0.}; double rotation{0.}; double scale{0.}; + double npar {0.}; }; StatusCode setParameters(const Identifier& gasGapId, const Parameters& pars); diff --git a/MuonSpectrometer/MuonAlignment/MuonAlignmentData/src/sTGCAsBuiltData2.cxx b/MuonSpectrometer/MuonAlignment/MuonAlignmentData/src/sTGCAsBuiltData2.cxx index 700905f2851f..a12e59114d14 100644 --- a/MuonSpectrometer/MuonAlignment/MuonAlignmentData/src/sTGCAsBuiltData2.cxx +++ b/MuonSpectrometer/MuonAlignment/MuonAlignmentData/src/sTGCAsBuiltData2.cxx @@ -19,7 +19,7 @@ Amg::Vector2D sTGCAsBuiltData2::correctPosition(const Identifier& channelId, con Amg::Vector2D correctedPos = pos; Parameters pars = par_itr->second; constexpr double convScale = 1.e-3; // parameters are stored in um and mrad therefore dividing by 1000 - correctedPos.x() = pos.x() + (pars.offset * convScale + pars.rotation *convScale * pos.y() + pars.scale*convScale*pos.x()); + correctedPos.x() = pos.x() + (pars.offset * convScale + pars.rotation *convScale * pos.y() + pars.scale*convScale*pos.x() + pars.npar * convScale * convScale * pos.x()*pos.y()); return correctedPos; } diff --git a/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondAlg/src/sTGCAsBuiltCondAlg2.cxx b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondAlg/src/sTGCAsBuiltCondAlg2.cxx index cdd848b395b7..f67ce9851f36 100644 --- a/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondAlg/src/sTGCAsBuiltCondAlg2.cxx +++ b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondAlg/src/sTGCAsBuiltCondAlg2.cxx @@ -92,6 +92,7 @@ StatusCode sTGCAsBuiltCondAlg2::parseDataFromJSON(const nlohmann::json& lines, pars.offset = line["offset"]; pars.rotation = line["rotation"]; pars.scale = line["scale"]; + pars.npar = line["npar"]; ATH_CHECK(effiData.setParameters(id, pars)); } -- GitLab From 0ce2d04b97a5a16549ce97771b9f07a354cceee3 Mon Sep 17 00:00:00 2001 From: Patrick Scholer <pscholer@atlmuonsw1.dyndns.cern.ch> Date: Mon, 25 Nov 2024 11:20:46 +0100 Subject: [PATCH 2/2] rename parameters and add some documentation --- .../MuonAlignmentData/sTGCAsBuiltData2.h | 21 ++++++++++++------- .../src/sTGCAsBuiltData2.cxx | 2 +- .../MuonCondAlg/src/sTGCAsBuiltCondAlg2.cxx | 2 +- 3 files changed, 16 insertions(+), 9 deletions(-) diff --git a/MuonSpectrometer/MuonAlignment/MuonAlignmentData/MuonAlignmentData/sTGCAsBuiltData2.h b/MuonSpectrometer/MuonAlignment/MuonAlignmentData/MuonAlignmentData/sTGCAsBuiltData2.h index cf1953123ca3..94e0ab791861 100644 --- a/MuonSpectrometer/MuonAlignment/MuonAlignmentData/MuonAlignmentData/sTGCAsBuiltData2.h +++ b/MuonSpectrometer/MuonAlignment/MuonAlignmentData/MuonAlignmentData/sTGCAsBuiltData2.h @@ -12,11 +12,17 @@ #include "GeoPrimitives/GeoPrimitives.h" /** - * Container class that stores the as built parameters of the sTgcs. - * Each gasGap has its own set of corrections. -*/ - - + * @class sTGCAsBuiltData2 + * + * @brief Class holding the sTGC as built conditions data and applying it. The model consists of four parameters: + * - offset: shift of the strip layer in the precission coordinate + * - rotation: rotation of the strip plane around the origin of the local coordinate system + * - scale: correction to the pitch of the strips. + * - nonPara: correction to the non parallelism of the strips + * + * The as built parameters are applied in athenas local coordinate system. The parameters are expected in units of um and mrad + * + */ class sTGCAsBuiltData2: public AthMessaging { public: @@ -24,12 +30,13 @@ class sTGCAsBuiltData2: public AthMessaging { // returns the local positon corrected for the as built parameters Amg::Vector2D correctPosition(const Identifier& channelId, const Amg::Vector2D& pos) const; // Set the parameters of the as build model (shift, rotation, scale) - + + struct Parameters{ double offset {0.}; double rotation{0.}; double scale{0.}; - double npar {0.}; + double nonPara {0.}; }; StatusCode setParameters(const Identifier& gasGapId, const Parameters& pars); diff --git a/MuonSpectrometer/MuonAlignment/MuonAlignmentData/src/sTGCAsBuiltData2.cxx b/MuonSpectrometer/MuonAlignment/MuonAlignmentData/src/sTGCAsBuiltData2.cxx index a12e59114d14..b98814e31b7f 100644 --- a/MuonSpectrometer/MuonAlignment/MuonAlignmentData/src/sTGCAsBuiltData2.cxx +++ b/MuonSpectrometer/MuonAlignment/MuonAlignmentData/src/sTGCAsBuiltData2.cxx @@ -19,7 +19,7 @@ Amg::Vector2D sTGCAsBuiltData2::correctPosition(const Identifier& channelId, con Amg::Vector2D correctedPos = pos; Parameters pars = par_itr->second; constexpr double convScale = 1.e-3; // parameters are stored in um and mrad therefore dividing by 1000 - correctedPos.x() = pos.x() + (pars.offset * convScale + pars.rotation *convScale * pos.y() + pars.scale*convScale*pos.x() + pars.npar * convScale * convScale * pos.x()*pos.y()); + correctedPos.x() = pos.x() + (pars.offset * convScale + pars.rotation *convScale * pos.y() + pars.scale*convScale*pos.x() + pars.nonPara * convScale * convScale * pos.x()*pos.y()); return correctedPos; } diff --git a/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondAlg/src/sTGCAsBuiltCondAlg2.cxx b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondAlg/src/sTGCAsBuiltCondAlg2.cxx index f67ce9851f36..2c3c7718ae6d 100644 --- a/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondAlg/src/sTGCAsBuiltCondAlg2.cxx +++ b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondAlg/src/sTGCAsBuiltCondAlg2.cxx @@ -92,7 +92,7 @@ StatusCode sTGCAsBuiltCondAlg2::parseDataFromJSON(const nlohmann::json& lines, pars.offset = line["offset"]; pars.rotation = line["rotation"]; pars.scale = line["scale"]; - pars.npar = line["npar"]; + pars.nonPara = line["nonPara"]; ATH_CHECK(effiData.setParameters(id, pars)); } -- GitLab