From 89b4dd7efa722de85ced04113d91c8a6f915a59d Mon Sep 17 00:00:00 2001 From: Heshy Roskes Date: Fri, 20 Nov 2015 20:19:51 +0100 Subject: [PATCH] Use the correct GlobalPosition so that the output can be consistently compared to the input --- .../plugins/TrackerSystematicMisalignments.cc | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/Alignment/TrackerAlignment/plugins/TrackerSystematicMisalignments.cc b/Alignment/TrackerAlignment/plugins/TrackerSystematicMisalignments.cc index fe8340157fb15..37580d2cabb37 100644 --- a/Alignment/TrackerAlignment/plugins/TrackerSystematicMisalignments.cc +++ b/Alignment/TrackerAlignment/plugins/TrackerSystematicMisalignments.cc @@ -12,12 +12,15 @@ #include "CondFormats/AlignmentRecord/interface/TrackerAlignmentRcd.h" #include "CondFormats/Alignment/interface/AlignmentErrorsExtended.h" #include "CondFormats/AlignmentRecord/interface/TrackerAlignmentErrorExtendedRcd.h" +#include "CondFormats/Alignment/interface/DetectorGlobalPosition.h" +#include "CondFormats/AlignmentRecord/interface/GlobalPositionRcd.h" #include "FWCore/Framework/interface/EventSetup.h" #include "FWCore/MessageLogger/interface/MessageLogger.h" #include "FWCore/ParameterSet/interface/ParameterSet.h" #include "DataFormats/DetId/interface/DetId.h" +#include "Geometry/Records/interface/TrackerDigiGeometryRecord.h" #include "Geometry/TrackerGeometryBuilder/interface/TrackerGeometry.h" #include "Geometry/TrackingGeometryAligner/interface/GeometryAligner.h" #include "CLHEP/Random/RandGauss.h" @@ -117,7 +120,7 @@ void TrackerSystematicMisalignments::analyze(const edm::Event& event, const edm: setup.get().get(tTopoHandle); const TrackerTopology* const tTopo = tTopoHandle.product(); - edm::ESHandle geom; + edm::ESHandle geom; setup.get().get(geom); edm::ESHandle ptp; setup.get().get( ptp ); @@ -132,9 +135,13 @@ void TrackerSystematicMisalignments::analyze(const edm::Event& event, const edm: setup.get().get(alignments); setup.get().get(alignmentErrors); + edm::ESHandle globalPositionRcd; + setup.get().getRecord().get(globalPositionRcd); + //apply the latest alignments GeometryAligner aligner; - aligner.applyAlignments( &(*tracker), &(*alignments), &(*alignmentErrors), AlignTransform() ); + aligner.applyAlignments( &(*tracker), &(*alignments), &(*alignmentErrors), + align::DetectorGlobalPosition(*globalPositionRcd, DetId(DetId::Tracker))); }