68 #include "CLHEP/Matrix/SymMatrix.h" 139 m_tree =
new TTree(m_outputTreename.c_str(),m_outputTreename.c_str());
144 m_treeErrors =
new TTree(
"alignTreeErrors",
"alignTreeErrors");
199 Alignments* theAlignments = theCurrentTracker->alignments();
204 for (std::vector<AlignTransform>::const_iterator
i = theAlignments->
m_align.begin();
i != theAlignments->
m_align.end(); ++
i){
207 CLHEP::Hep3Vector translation =
i->translation();
208 m_x = translation.x();
209 m_y = translation.y();
210 m_z = translation.z();
213 CLHEP::HepRotation
rotation =
i->rotation();
215 m_beta = rotation.getTheta();
230 delete theAlignments;
232 std::vector<AlignTransformErrorExtended> alignErrors = alignmentErrors->m_alignError;
233 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) {
254 DetId detid = (*iunit)->geographicalId();
260 auto geomDetUnit = *iunit ;
263 if ( geomDetUnit->surfaceDeformation() ) {
264 std::vector<double> surfaceDeformParams = (geomDetUnit->surfaceDeformation())->
parameters() ;
266 m_dNpar = surfaceDeformParams.size() ;
267 m_dtype = (geomDetUnit->surfaceDeformation())->
type() ;
268 m_d1 = surfaceDeformParams.at(0) ;
269 m_d2 = surfaceDeformParams.at(1) ;
270 m_d3 = surfaceDeformParams.at(2) ;
272 for (std::vector<double>::const_iterator it = surfaceDeformParams.begin(); it != surfaceDeformParams.end(); ++it) {
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.
#define DEFINE_FWK_MODULE(type)
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_
void attachSurfaceDeformations(C *geometry, const AlignmentSurfaceDeformations *surfaceDeformations)
void get(HolderT &iHolder) const
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