70 #include "CLHEP/Matrix/SymMatrix.h" 143 theCurrentTracker(nullptr),
172 m_treeErrors =
new TTree(
"alignTreeErrors",
"alignTreeErrors");
218 for (std::vector<AlignTransform>::const_iterator
i = theAlignments->
m_align.begin();
222 CLHEP::Hep3Vector translation =
i->translation();
223 m_x = translation.x();
224 m_y = translation.y();
225 m_z = translation.z();
227 CLHEP::HepRotation
rotation =
i->rotation();
243 delete theAlignments;
245 std::vector<AlignTransformErrorExtended> alignErrors = alignmentErrors->m_alignError;
246 for (std::vector<AlignTransformErrorExtended>::const_iterator
i = alignErrors.begin();
i != alignErrors.end(); ++
i) {
248 CLHEP::HepSymMatrix errMatrix =
i->matrix();
251 m_xx = errMatrix[0][0];
252 m_xy = errMatrix[0][1];
253 m_xz = errMatrix[0][2];
254 m_yy = errMatrix[1][1];
255 m_yz = errMatrix[1][2];
256 m_zz = errMatrix[2][2];
261 auto const& detUnits = theCurTracker->
detUnits();
264 for (
auto iunit = detUnits.begin(); iunit != detUnits.end(); ++iunit) {
265 DetId detid = (*iunit)->geographicalId();
271 auto geomDetUnit = *iunit;
274 if (geomDetUnit->surfaceDeformation()) {
275 std::vector<double> surfaceDeformParams = (geomDetUnit->surfaceDeformation())->
parameters();
277 m_dNpar = surfaceDeformParams.size();
278 m_dtype = (geomDetUnit->surfaceDeformation())->
type();
279 m_d1 = surfaceDeformParams.at(0);
280 m_d2 = surfaceDeformParams.at(1);
281 m_d3 = surfaceDeformParams.at(2);
283 for (std::vector<double>::const_iterator it = surfaceDeformParams.begin(); it != surfaceDeformParams.end();
Float_t deformationValues_[kMaxNumPar]
void attachSurfaceDeformations(const C *geometry, const AlignmentSurfaceDeformations *surfaceDeformations)
const edm::ESGetToken< Alignments, GlobalPositionRcd > gprToken_
~TrackerGeometryIntoNtuples() override
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_
#define DEFINE_FWK_MODULE(type)
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_
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum) ...
bool getData(T &iHolder) const
const edm::ESGetToken< PTrackerParameters, PTrackerParametersRcd > ptpToken_
Log< level::Info, false > LogInfo
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 &)