|
ATLAS Offline Software
|
Go to the documentation of this file.
16 #define _USE_MATH_DEFINES
25 const std::string&
name)
31 , m_chi2VAlignParam(nullptr)
32 , m_chi2VAlignParamX(nullptr)
67 if(fabs(sinbeta) < 0.99999 ){
77 values[4]=-std::asin(sinbeta);
83 double alphaPlusGamma = std::asin(
rotation(0,1) );
84 values[3] = alphaPlusGamma;
99 double sumx(0),sumy(0),sumz(0);
101 for (
auto *detelements : detelementsVec) {
105 for(
const auto *detelement : *detelements) {
106 sumx += detelement->surface().center().x();
107 sumy += detelement->surface().center().y();
108 sumz += detelement->surface().center().z();
110 n += detelements->size();
131 ATH_MSG_DEBUG(
"adding detElement "<<
det->identify()<<
", detType "<<detType);
155 std::vector<Amg::Transform3D>* alignModToDetElemTransform=m_alignModuleToDetElementTransforms[detType];
157 if(m_detIdentifiers[detType] && !m_detIdentifiers[detType]->
empty()) {
160 for (
int i=0;
i<(
int)alignModToDetElemTransform->size();
i++)
162 return &(*alignModToDetElemTransform)[
i];
168 for (
int i=0;
i<(
int)alignModToDetElemTransform->size();
i++)
169 if ((*detElements)[
i]==
det)
170 return &(*alignModToDetElemTransform)[
i];
182 typeStr=
"none";
break;
184 typeStr=
"Pixel";
break;
186 typeStr=
"SCT";
break;
188 typeStr=
"TRT";
break;
190 typeStr=
"MDT";
break;
192 typeStr=
"CSC";
break;
194 typeStr=
"RPC";
break;
196 typeStr=
"TGC";
break;
198 typeStr=
"NDetectorTypes";
break;
206 sl <<
"AlignModule \'"<<alignModule.
name()<<
"\' ID: "<<alignModule.
identify()
218 double sumx(0),sumy(0),sumz(0);
219 double sumRx(0),sumRy(0),sumRz(0);
226 for(
const auto *detelement : *detelements) {
234 ATH_MSG_DEBUG(
n <<
" " << trans[0] <<
" "<< trans[1] <<
" " << trans[2]
235 <<
" "<< trans[3] <<
" " << trans[4] <<
" "<< trans[5]);
264 return Amg::Transform3D::Identity();
268 ATH_MSG_DEBUG(
" SUM " << oneOnN <<
" " << sumx*oneOnN <<
" "<< sumy*oneOnN
269 <<
" " << sumz*oneOnN <<
" "<< sumRx*oneOnN <<
" " << sumRy*oneOnN <<
" "<< sumRz*oneOnN);
273 Amg::Transform3D newtrans = surfaceCentre * Amg::RotationMatrix3D::Identity();
297 for(DetElementCollection::const_iterator
it = detelements->begin() ;
298 it != detelements->end(); ++
it, ++j ) {
304 ATH_MSG_DEBUG(j <<
" " << trans[0] <<
" "<< trans[1] <<
" " << trans[2]
305 <<
" "<< trans[3] <<
" " << trans[4] <<
" "<< trans[5]);
std::vector< DetElementCollection * > m_detelements
void resetAlignModuleToDetElementTransforms()
Reset align module to detector element transforms based on the AlignModuleToGlobal transform and the ...
void addDetElement(AlignModule::DetectorType detType, const TrkDetElementBase *det, const Amg::Transform3D &transform, Identifier id=Identifier())
used to add a detector element to the align module with a align frame to detector element local frame...
Amg::Vector3D centerOfGravity() const
void decomposeTransform(const Amg::Transform3D &transform, double *values)
void setLevel(MSG::Level lvl)
Change the current logging level.
void setGlobalFrameToAlignFrameTransform(const Amg::Transform3D &t)
set global to alignment frame transforms
IdentifierHash identifyHash() const
Set and return index of module, used by alignment classes to keep track of order of align module.
Eigen::Affine3d Transform3D
double *** m_chi2VAlignParamMeasType
Amg::Vector3D transform(Amg::Vector3D &v, Amg::Transform3D &tr)
Transform a point from a Trasformation3D.
Amg::Transform3D calculateAlignModuleToGlobal() const
Calculates Align to Global transform based on the TrkDetElementBase in the alignmodule.
Class to provide easy MsgStream access and capabilities.
std::vector< IdentifierCollection * > m_detIdentifiers
std::vector< Identifier > IdentifierCollection
std::vector< const TrkDetElementBase * > DetElementCollection
typedefs to contain detector element pointers and transforms
const std::string & name() const
std::string detTypeStr(AlignModule::DetectorType detType)
returns the detector type
Ensure that the ATLAS eigen extensions are properly loaded.
Definition of ATLAS Math & Geometry primitives (Amg)
Eigen::Matrix< double, 3, 1 > Vector3D
const Amg::Transform3D * alignModuleToDetElementTransform(AlignModule::DetectorType detType, const TrkDetElementBase *det, const Identifier id=Identifier()) const
returns AlignModule to DetElement transform for a detector element
Eigen::Matrix< double, 3, 3 > RotationMatrix3D
MsgStream & operator<<(MsgStream &sl, const AlignModule &alignModule)
overload of << operator for MsgStream for debug output
Eigen::Translation< double, 3 > Translation3D
Eigen::AngleAxisd AngleAxis3D
std::vector< std::vector< Amg::Transform3D > * > m_alignModuleToDetElementTransforms
Identifier identify() const
Amg::Transform3D m_globalToAlignFrameTransform
@ NumberOfMeasurementTypes