22 theParentAlignable( parent ),
24 theNumberOfUpdates( 0 ),
25 theUpdateFrequency( frequency ),
26 theFirstUpdate(
true ),
27 theAlignmentFlag(
false )
33 int iType = typeAndLayer.first;
34 int iLayer = typeAndLayer.second;
35 int iId = parent->
id();
62 #ifdef USE_LOCAL_PARAMETERS
70 const int nParameter = 6;
73 for (
int i = 0;
i < nParameter; ++
i )
111 const int nParameter = 6;
113 globalParameters[0] = globalShifts.x();
114 globalParameters[1] = globalShifts.y();
115 globalParameters[2] = globalShifts.z();
116 globalParameters[3] = globalEulerAngles[0];
117 globalParameters[4] = globalEulerAngles[1];
118 globalParameters[5] = globalEulerAngles[2];
122 for (
int i = 0;
i < nParameter; ++
i )
153 const vector< bool >& selector = param->
selector();
157 const int nParameter = 6;
160 for (
int i = 0;
i < nParameter; ++
i )
183 #ifdef USE_LOCAL_PARAMETERS
191 const int nParameter = 6;
196 for (
int i = 0;
i < nParameter; ++
i )
238 const int nParameter = 6;
240 globalParameters[0] = globalShifts.x();
241 globalParameters[1] = globalShifts.y();
242 globalParameters[2] = globalShifts.z();
243 globalParameters[3] = globalEulerAngles[0];
244 globalParameters[4] = globalEulerAngles[1];
245 globalParameters[5] = globalEulerAngles[2];
253 for (
int i = 0;
i < nParameter; ++
i )
301 #ifdef USE_LOCAL_PARAMETERS
319 trueParameters[0] = -localShifts.
x();
320 trueParameters[1] = -localShifts.
y();
321 trueParameters[2] = -localShifts.
z();
322 trueParameters[3] = -localEulerAngles[0];
323 trueParameters[4] = -localEulerAngles[1];
324 trueParameters[5] = -localEulerAngles[2];
337 trueParameters[0] = -globalShifts.
x();
338 trueParameters[1] = -globalShifts.
y();
339 trueParameters[2] = -globalShifts.
z();
340 trueParameters[3] = -globalEulerAngles[0];
341 trueParameters[4] = -globalEulerAngles[1];
342 trueParameters[5] = -globalEulerAngles[2];
346 return trueParameters;
373 throw cms::Exception(
"OutOfRange" ) <<
"[KalmanAlignmentUserVariables::selectedParameter] "
374 <<
"Index out of range (selector = " << selected <<
")";
381 const float micron = 1
e-4;
382 const float millirad = 1
e-3;
399 throw cms::Exception(
"LogicError" ) <<
"@SUB=KalmanAlignmentUserVariables::selectedScaling"
400 <<
"Index out of range (selector = " << selected <<
")\n";
408 snprintf( temp,
sizeof(temp),
"%u", i );
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)
std::pair< int, int > typeAndLayerFromDetId(const DetId &detId, const TrackerTopology *tTopo) const
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.
Alignable * theParentAlignable
float selectedScaling(const int &selected) const
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.
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.
CLHEP::HepVector AlgebraicVector
AlgebraicVector EulerAngles
const AlgebraicVector extractTrueParameters(void) 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
const PositionType & globalPosition() const
Return the global position of the object.
volatile std::atomic< bool > shutdown_flag false
static const char * idToString(align::StructureType type)
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