68 #include "CLHEP/Matrix/SymMatrix.h" 141 theCurrentTracker(nullptr),
170 m_treeErrors =
new TTree(
"alignTreeErrors",
"alignTreeErrors");
178 "Validates alignment payloads by comparing the relative position and orientations of tracker modules");
224 for (std::vector<AlignTransform>::const_iterator
i = theAlignments->
m_align.begin();
228 CLHEP::Hep3Vector translation =
i->translation();
229 m_x = translation.x();
230 m_y = translation.y();
231 m_z = translation.z();
233 CLHEP::HepRotation
rotation =
i->rotation();
249 delete theAlignments;
251 std::vector<AlignTransformErrorExtended> alignErrors = alignmentErrors->m_alignError;
252 for (std::vector<AlignTransformErrorExtended>::const_iterator
i = alignErrors.begin();
i != alignErrors.end(); ++
i) {
254 CLHEP::HepSymMatrix errMatrix =
i->matrix();
257 m_xx = errMatrix[0][0];
258 m_xy = errMatrix[0][1];
259 m_xz = errMatrix[0][2];
260 m_yy = errMatrix[1][1];
261 m_yz = errMatrix[1][2];
262 m_zz = errMatrix[2][2];
267 auto const& detUnits = theCurTracker->
detUnits();
269 for (
auto iunit = detUnits.begin(); iunit != detUnits.end(); ++iunit) {
270 DetId detid = (*iunit)->geographicalId();
275 auto geomDetUnit = *iunit;
278 if (geomDetUnit->surfaceDeformation()) {
279 std::vector<double> surfaceDeformParams = (geomDetUnit->surfaceDeformation())->
parameters();
281 m_dNpar = surfaceDeformParams.size();
282 m_dtype = (geomDetUnit->surfaceDeformation())->
type();
283 m_d1 = surfaceDeformParams.at(0);
284 m_d2 = surfaceDeformParams.at(1);
285 m_d3 = surfaceDeformParams.at(2);
287 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_
AlignableTracker * theCurrentTracker
std::vector< double > * mp_dpar
const edm::ESGetToken< AlignmentErrorsExtended, TrackerAlignmentErrorExtendedRcd > aliErrorToken_
TrackerGeometry * build(const GeometricDet *gd, const PTrackerParameters &ptp, const TrackerTopology *tTopo)
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 &)