68 #include "CLHEP/Matrix/SymMatrix.h" 148 m_tree =
new TTree(m_outputTreename.c_str(), m_outputTreename.c_str());
153 m_treeErrors =
new TTree(
"alignTreeErrors",
"alignTreeErrors");
201 Alignments* theAlignments = theCurrentTracker->alignments();
206 for (std::vector<AlignTransform>::const_iterator
i = theAlignments->
m_align.begin();
210 CLHEP::Hep3Vector translation =
i->translation();
211 m_x = translation.x();
212 m_y = translation.y();
213 m_z = translation.z();
215 CLHEP::HepRotation
rotation =
i->rotation();
217 m_beta = rotation.getTheta();
231 delete theAlignments;
233 std::vector<AlignTransformErrorExtended> alignErrors = alignmentErrors->m_alignError;
234 for (std::vector<AlignTransformErrorExtended>::const_iterator
i = alignErrors.begin();
i != alignErrors.end(); ++
i) {
236 CLHEP::HepSymMatrix errMatrix =
i->matrix();
239 m_xx = errMatrix[0][0];
240 m_xy = errMatrix[0][1];
241 m_xz = errMatrix[0][2];
242 m_yy = errMatrix[1][1];
243 m_yz = errMatrix[1][2];
244 m_zz = errMatrix[2][2];
249 auto const& detUnits = theCurTracker->
detUnits();
252 for (
auto iunit = detUnits.begin(); iunit != detUnits.end(); ++iunit) {
253 DetId detid = (*iunit)->geographicalId();
259 auto geomDetUnit = *iunit;
262 if (geomDetUnit->surfaceDeformation()) {
263 std::vector<double> surfaceDeformParams = (geomDetUnit->surfaceDeformation())->
parameters();
265 m_dNpar = surfaceDeformParams.size();
266 m_dtype = (geomDetUnit->surfaceDeformation())->
type();
267 m_d1 = surfaceDeformParams.at(0);
268 m_d2 = surfaceDeformParams.at(1);
269 m_d3 = surfaceDeformParams.at(2);
271 for (std::vector<double>::const_iterator it = surfaceDeformParams.begin(); it != surfaceDeformParams.end();
Float_t deformationValues_[kMaxNumPar]
T getUntrackedParameter(std::string const &, T const &) const
~TrackerGeometryIntoNtuples() override
const DetContainer & detUnits() const override
Returm a vector of all GeomDet.
Class to update a given geometry with a set of alignments.
AlignableTracker * theCurrentTracker
std::vector< double > * mp_dpar
constexpr uint32_t rawId() const
get the raw id
TrackerGeometry * build(const GeometricDet *gd, const PTrackerParameters &ptp, const TrackerTopology *tTopo)
std::string m_outputTreename
std::vector< AlignTransform > m_align
UInt_t numDeformationValues_
#define DEFINE_FWK_MODULE(type)
ProductT const & get(ESGetToken< ProductT, DepRecordT > const &iToken) const
void attachSurfaceDeformations(C *geometry, const AlignmentSurfaceDeformations *surfaceDeformations)
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum) ...
void applyAlignments(C *geometry, const Alignments *alignments, const AlignmentErrorsExtended *alignmentErrors, const AlignTransform &globalCoordinates)
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 &)
T const * product() const