65 #include "CLHEP/Matrix/SymMatrix.h"
122 theCurrentTracker(0),
124 m_x(0.), m_y(0.), m_z(0.),
125 m_alpha(0.), m_beta(0.), m_gamma(0.),
127 m_xx(0.), m_xy(0.), m_yy(0.), m_xz(0.), m_yz(0.), m_zz(0.),
129 m_d1(0.), m_d2(0.), m_d3(0.),
136 m_tree =
new TTree(m_outputTreename.c_str(),m_outputTreename.c_str());
141 m_treeErrors =
new TTree(
"alignTreeErrors",
"alignTreeErrors");
188 Alignments* theAlignments = theCurrentTracker->alignments();
193 for (std::vector<AlignTransform>::const_iterator
i = theAlignments->
m_align.begin();
i != theAlignments->
m_align.end(); ++
i){
196 CLHEP::Hep3Vector translation =
i->translation();
197 m_x = translation.x();
198 m_y = translation.y();
199 m_z = translation.z();
202 CLHEP::HepRotation
rotation =
i->rotation();
204 m_beta = rotation.getTheta();
219 delete theAlignments;
221 std::vector<AlignTransformError> alignErrors = alignmentErrors->m_alignError;
222 for (std::vector<AlignTransformError>::const_iterator
i = alignErrors.begin();
i != alignErrors.end(); ++
i){
225 CLHEP::HepSymMatrix errMatrix =
i->matrix();
228 m_xx = errMatrix[0][0];
229 m_xy = errMatrix[0][1];
230 m_xz = errMatrix[0][2];
231 m_yy = errMatrix[1][1];
232 m_yz = errMatrix[1][2];
233 m_zz = errMatrix[2][2];
238 std::vector<GeomDetUnit*>detUnits = theCurTracker->
detUnits() ;
241 for (std::vector<GeomDetUnit*>::const_iterator iunit = detUnits.begin(); iunit != detUnits.end(); ++iunit) {
255 m_dNpar = surfaceDeformParams.size() ;
257 m_d1 = surfaceDeformParams.at(0) ;
258 m_d2 = surfaceDeformParams.at(1) ;
259 m_d3 = surfaceDeformParams.at(2) ;
261 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.
#define DEFINE_FWK_MODULE(type)
AlignableTracker * theCurrentTracker
virtual void analyze(const edm::Event &iEvent, const edm::EventSetup &iSetup)
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()
TrackerGeometry * build(const GeometricDet *gd)
TTree * m_treeDeformations
const AlignTransform & DetectorGlobalPosition(const Alignments &allGlobals, const DetId &id)
TrackerGeometryIntoNtuples(const edm::ParameterSet &)