23 theParentAlignable( parent ),
25 theNumberOfUpdates( 0 ),
26 theUpdateFrequency( frequency ),
27 theFirstUpdate(
true ),
28 theAlignmentFlag(
false )
34 int iType = typeAndLayer.first;
35 int iLayer = typeAndLayer.second;
36 int iId = parent->
id();
39 string strType = string(
"Type" ) +
toString( iType ) + string(
"_" );
40 string strLayer = string(
"Layer" ) +
toString( iLayer ) + string(
"_" );
41 string strId = string(
"Id" ) +
toString( iId );
63 #ifdef USE_LOCAL_PARAMETERS
71 const int nParameter = 6;
74 for (
int i = 0;
i < nParameter; ++
i )
112 const int nParameter = 6;
114 globalParameters[0] = globalShifts.x();
115 globalParameters[1] = globalShifts.y();
116 globalParameters[2] = globalShifts.z();
117 globalParameters[3] = globalEulerAngles[0];
118 globalParameters[4] = globalEulerAngles[1];
119 globalParameters[5] = globalEulerAngles[2];
123 for (
int i = 0;
i < nParameter; ++
i )
154 const vector< bool >& selector = param->
selector();
158 const int nParameter = 6;
161 for (
int i = 0;
i < nParameter; ++
i )
184 #ifdef USE_LOCAL_PARAMETERS
192 const int nParameter = 6;
197 for (
int i = 0;
i < nParameter; ++
i )
239 const int nParameter = 6;
241 globalParameters[0] = globalShifts.x();
242 globalParameters[1] = globalShifts.y();
243 globalParameters[2] = globalShifts.z();
244 globalParameters[3] = globalEulerAngles[0];
245 globalParameters[4] = globalEulerAngles[1];
246 globalParameters[5] = globalEulerAngles[2];
254 for (
int i = 0;
i < nParameter; ++
i )
256 string startHistoName = histoNamePrefix + string(
"_Start" ) +
selectedParameter(
i );
259 string deltaHistoName = histoNamePrefix + string(
"_Delta" ) +
selectedParameter(
i );
262 string valueHistoName = histoNamePrefix + string(
"_Value" ) +
selectedParameter( i );
302 #ifdef USE_LOCAL_PARAMETERS
320 trueParameters[0] = -localShifts.
x();
321 trueParameters[1] = -localShifts.
y();
322 trueParameters[2] = -localShifts.
z();
323 trueParameters[3] = -localEulerAngles[0];
324 trueParameters[4] = -localEulerAngles[1];
325 trueParameters[5] = -localEulerAngles[2];
338 trueParameters[0] = -globalShifts.
x();
339 trueParameters[1] = -globalShifts.
y();
340 trueParameters[2] = -globalShifts.
z();
341 trueParameters[3] = -globalEulerAngles[0];
342 trueParameters[4] = -globalEulerAngles[1];
343 trueParameters[5] = -globalEulerAngles[2];
347 return trueParameters;
356 return string(
"X" );
359 return string(
"Y" );
362 return string(
"Z" );
365 return string(
"Alpha" );
368 return string(
"Beta" );
371 return string(
"Gamma" );
374 throw cms::Exception(
"OutOfRange" ) <<
"[KalmanAlignmentUserVariables::selectedParameter] "
375 <<
"Index out of range (selector = " << selected <<
")";
382 const float micron = 1e-4;
383 const float millirad = 1e-3;
400 throw cms::Exception(
"LogicError" ) <<
"@SUB=KalmanAlignmentUserVariables::selectedScaling"
401 <<
"Index out of range (selector = " << selected <<
")\n";
409 sprintf( temp,
"%u", i );
411 return string( temp );
const std::string selectedParameter(const int &selected) const
align::ID id() const
Return the ID of Alignable, i.e. DetId of 'first' component GeomDet(Unit).
void histogramParameters(std::string histoNamePrefix)
Histogram current estimate of the alignment parameters wrt. the true values.
static const TrackerAlignableId * theAlignableId
std::string theTypeAndLayer
static void fillHistogram(std::string histo_name, float data)
AlgebraicVector selectedParameters(void) const
Get selected parameters.
const GlobalVector & displacement() const
Return change of the global position since the creation of the object.
const std::vector< bool > & selector(void) const
Get alignment parameter selector vector.
const std::string & typeToName(align::StructureType type) const
Convert type to name.
Alignable * theParentAlignable
const std::string toString(const int &i) const
void update(bool enforceUpdate=false)
Call this function in case the associated Alignable was updated by the alignment algorithm.
AlignmentParameters * alignmentParameters() const
Get the AlignmentParameters.
const AlgebraicVector & parameters(void) const
Get alignment parameters.
std::string theIdentifier
const RotationType & rotation() const
Return change of orientation since the creation of the object.
align::RotationType toLocal(const align::RotationType &) const
Return in local frame a rotation given in global frame.
void setAlignmentParameters(AlignmentParameters *dap)
Set the AlignmentParameters.
void unfixAlignable(void)
virtual StructureType alignableObjectId() const =0
Return the alignable type identifier.
Allows conversion between type and name, and vice-versa.
EulerAngles toAngles(const RotationType &)
Convert rotation matrix to angles about x-, y-, z-axes (frame rotation).
const AlignableSurface & surface() const
Return the Surface (global position and orientation) of the object.
AlgebraicSymMatrix selectedCovariance(void) const
Get covariance matrix of selected parameters.
static const AlignableObjectId * theObjectId
CLHEP::HepVector AlgebraicVector
AlgebraicVector EulerAngles
const AlgebraicVector extractTrueParameters(void) const
const float selectedScaling(const int &selected) const
virtual AlignmentParameters * clone(const AlgebraicVector &par, const AlgebraicSymMatrix &cov) const =0
Enforce clone methods in derived classes.
KalmanAlignmentUserVariables(void)
align::GlobalPoints toGlobal(const align::LocalPoints &) const
Return in global coord given a set of local points.
RotationType toMatrix(const EulerAngles &)
Convert rotation angles about x-, y-, z-axes to matrix.
CLHEP::HepSymMatrix AlgebraicSymMatrix
std::pair< int, int > typeAndLayerFromDetId(const DetId &detId) const
const PositionType & globalPosition() const
Return the global position of the object.
Basic3DVector< T > multiplyInverse(const Basic3DVector< T > &v) const
static void fillGraph(std::string graph_name, float x_data, float y_data)
const AlgebraicSymMatrix & covariance(void) const
Get parameter covariance matrix.
const BasicVectorType & basicVector() const
const DetId & geomDetId() const