66 #include "CLHEP/Matrix/SymMatrix.h"
124 theParameterSet( iConfig ),
125 theCurrentTracker(0),
127 m_x(0.), m_y(0.), m_z(0.),
128 m_alpha(0.), m_beta(0.), m_gamma(0.),
130 m_xx(0.), m_xy(0.), m_yy(0.), m_xz(0.), m_yz(0.), m_zz(0.),
132 m_d1(0.), m_d2(0.), m_d3(0.),
139 m_tree =
new TTree(m_outputTreename.c_str(),m_outputTreename.c_str());
144 m_treeErrors =
new TTree(
"alignTreeErrors",
"alignTreeErrors");
197 Alignments* theAlignments = theCurrentTracker->alignments();
202 for (std::vector<AlignTransform>::const_iterator
i = theAlignments->
m_align.begin();
i != theAlignments->
m_align.end(); ++
i){
205 CLHEP::Hep3Vector translation =
i->translation();
206 m_x = translation.x();
207 m_y = translation.y();
208 m_z = translation.z();
211 CLHEP::HepRotation
rotation =
i->rotation();
213 m_beta = rotation.getTheta();
228 delete theAlignments;
230 std::vector<AlignTransformError> alignErrors = alignmentErrors->m_alignError;
231 for (std::vector<AlignTransformError>::const_iterator
i = alignErrors.begin();
i != alignErrors.end(); ++
i){
234 CLHEP::HepSymMatrix errMatrix =
i->matrix();
237 m_xx = errMatrix[0][0];
238 m_xy = errMatrix[0][1];
239 m_xz = errMatrix[0][2];
240 m_yy = errMatrix[1][1];
241 m_yz = errMatrix[1][2];
242 m_zz = errMatrix[2][2];
247 std::vector<GeomDetUnit*>detUnits = theCurTracker->
detUnits() ;
250 for (std::vector<GeomDetUnit*>::const_iterator iunit = detUnits.begin(); iunit != detUnits.end(); ++iunit) {
264 m_dNpar = surfaceDeformParams.size() ;
266 m_d1 = surfaceDeformParams.at(0) ;
267 m_d2 = surfaceDeformParams.at(1) ;
268 m_d3 = surfaceDeformParams.at(2) ;
270 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
Class to update a given geometry with a set of alignments.
const edm::ParameterSet theParameterSet
#define DEFINE_FWK_MODULE(type)
TrackerGeometry * build(const GeometricDet *gd, const edm::ParameterSet &pSet)
AlignableTracker * theCurrentTracker
std::vector< double > * mp_dpar
virtual const SurfaceDeformation * surfaceDeformation() const
std::string m_outputTreename
std::vector< AlignTransform > m_align
UInt_t numDeformationValues_
uint32_t rawId() const
get the raw id
virtual const DetUnitContainer & detUnits() const
Returm a vector of all GeomDetUnit.
void attachSurfaceDeformations(C *geometry, const AlignmentSurfaceDeformations *surfaceDeformations)
void get(HolderT &iHolder) const
void applyAlignments(C *geometry, const Alignments *alignments, const AlignmentErrors *alignmentErrors, const AlignTransform &globalCoordinates)
int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum) ...
~TrackerGeometryIntoNtuples()
T const * product() const
TTree * m_treeDeformations
const AlignTransform & DetectorGlobalPosition(const Alignments &allGlobals, const DetId &id)
virtual void analyze(const edm::Event &iEvent, const edm::EventSetup &iSetup) override
TrackerGeometryIntoNtuples(const edm::ParameterSet &)