70 #include "CLHEP/Matrix/SymMatrix.h" 145 theCurrentTracker(nullptr),
174 m_treeErrors =
new TTree(
"alignTreeErrors",
"alignTreeErrors");
182 "Validates alignment payloads by comparing the relative position and orientations of tracker modules");
229 for (std::vector<AlignTransform>::const_iterator
i = theAlignments->
m_align.begin();
233 CLHEP::Hep3Vector translation =
i->translation();
234 m_x = translation.x();
235 m_y = translation.y();
236 m_z = translation.z();
238 CLHEP::HepRotation
rotation =
i->rotation();
254 delete theAlignments;
256 std::vector<AlignTransformErrorExtended> alignErrors = alignmentErrors->m_alignError;
257 for (std::vector<AlignTransformErrorExtended>::const_iterator
i = alignErrors.begin();
i != alignErrors.end(); ++
i) {
259 CLHEP::HepSymMatrix errMatrix =
i->matrix();
262 m_xx = errMatrix[0][0];
263 m_xy = errMatrix[0][1];
264 m_xz = errMatrix[0][2];
265 m_yy = errMatrix[1][1];
266 m_yz = errMatrix[1][2];
267 m_zz = errMatrix[2][2];
272 auto const& detUnits = theCurTracker->
detUnits();
274 for (
auto iunit = detUnits.begin(); iunit != detUnits.end(); ++iunit) {
275 DetId detid = (*iunit)->geographicalId();
280 auto geomDetUnit = *iunit;
283 if (geomDetUnit->surfaceDeformation()) {
284 std::vector<double> surfaceDeformParams = (geomDetUnit->surfaceDeformation())->
parameters();
286 m_dNpar = surfaceDeformParams.size();
287 m_dtype = (geomDetUnit->surfaceDeformation())->
type();
288 m_d1 = surfaceDeformParams.at(0);
289 m_d2 = surfaceDeformParams.at(1);
290 m_d3 = surfaceDeformParams.at(2);
292 for (std::vector<double>::const_iterator
it = surfaceDeformParams.begin();
it != surfaceDeformParams.end();
Float_t deformationValues_[kMaxNumPar]
void attachSurfaceDeformations(const C *geometry, const AlignmentSurfaceDeformations *surfaceDeformations)
void addWithDefaultLabel(ParameterSetDescription const &psetDescription)
const edm::ESGetToken< Alignments, GlobalPositionRcd > gprToken_
~TrackerGeometryIntoNtuples() override
T const & getData(const ESGetToken< T, R > &iToken) const noexcept(false)
Alignments * alignments() const override
Return alignments, sorted by DetId.
const edm::ESGetToken< AlignmentSurfaceDeformations, TrackerSurfaceDeformationRcd > surfDefToken_
const edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > topoToken_
Class to update a given geometry with a set of alignments.
const edm::ESGetToken< Alignments, TrackerAlignmentRcd > aliToken_
TrackerGeometry * build(const GeometricDet *gd, const PTrackerAdditionalParametersPerDet *ptitp, const PTrackerParameters &ptp, const TrackerTopology *tTopo)
AlignableTracker * theCurrentTracker
std::vector< double > * mp_dpar
const edm::ESGetToken< PTrackerAdditionalParametersPerDet, PTrackerAdditionalParametersPerDetRcd > ptitpToken_
const edm::ESGetToken< AlignmentErrorsExtended, TrackerAlignmentErrorExtendedRcd > aliErrorToken_
const DetContainer & detUnits() const override
Returm a vector of all GeomDet.
std::string m_outputTreename
std::vector< AlignTransform > m_align
void applyAlignments(const C *geometry, const Alignments *alignments, const AlignmentErrorsExtended *alignmentErrors, const AlignTransform &globalCoordinates)
T getUntrackedParameter(std::string const &, T const &) const
UInt_t numDeformationValues_
const edm::ESGetToken< GeometricDet, IdealGeometryRecord > geomDetToken_
#define DEFINE_FWK_MODULE(type)
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum) ...
const edm::ESGetToken< PTrackerParameters, PTrackerParametersRcd > ptpToken_
Log< level::Info, false > LogInfo
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
constexpr uint32_t rawId() const
get the raw id
TTree * m_treeDeformations
const AlignTransform & DetectorGlobalPosition(const Alignments &allGlobals, const DetId &id)
void analyze(const edm::Event &iEvent, const edm::EventSetup &iSetup) override
TrackerGeometryIntoNtuples(const edm::ParameterSet &)