File indexing completed on 2024-04-06 11:56:05
0001 #ifndef Alignment_CommonAlignment_AlignmentParameters_H
0002 #define Alignment_CommonAlignment_AlignmentParameters_H
0003
0004 #include <vector>
0005
0006 #include "Alignment/CommonAlignment/interface/AlignmentParametersData.h"
0007 #include "Alignment/CommonAlignment/interface/AlignmentUserVariables.h"
0008
0009 #include "DataFormats/CLHEP/interface/AlgebraicObjects.h"
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028
0029
0030 class AlignableDetOrUnitPtr;
0031 class Alignable;
0032 class TrajectoryStateOnSurface;
0033 class RecHit;
0034
0035 class AlignmentParameters {
0036 public:
0037 typedef AlignmentParametersData::DataContainer DataContainer;
0038
0039
0040 AlignmentParameters();
0041
0042
0043 AlignmentParameters(Alignable* object, const AlgebraicVector& par, const AlgebraicSymMatrix& cov);
0044
0045
0046 AlignmentParameters(Alignable* object,
0047 const AlgebraicVector& par,
0048 const AlgebraicSymMatrix& cov,
0049 const std::vector<bool>& sel);
0050
0051
0052 AlignmentParameters(Alignable* object, const DataContainer& data);
0053
0054
0055 virtual ~AlignmentParameters();
0056
0057
0058 virtual void apply() = 0;
0059
0060 virtual int type() const = 0;
0061
0062
0063 virtual AlignmentParameters* clone(const AlgebraicVector& par, const AlgebraicSymMatrix& cov) const = 0;
0064 virtual AlignmentParameters* cloneFromSelected(const AlgebraicVector& par, const AlgebraicSymMatrix& cov) const = 0;
0065
0066
0067 const std::vector<bool>& selector(void) const;
0068
0069
0070 int numSelected(void) const;
0071
0072
0073 AlgebraicVector selectedParameters(void) const;
0074
0075
0076 AlgebraicSymMatrix selectedCovariance(void) const;
0077
0078
0079 const AlgebraicVector& parameters(void) const;
0080
0081
0082 const AlgebraicSymMatrix& covariance(void) const;
0083
0084
0085 virtual AlgebraicMatrix derivatives(const TrajectoryStateOnSurface& tsos,
0086 const AlignableDetOrUnitPtr& alidet) const = 0;
0087 virtual AlgebraicMatrix selectedDerivatives(const TrajectoryStateOnSurface& tsos,
0088 const AlignableDetOrUnitPtr& alidet) const;
0089
0090
0091 void setUserVariables(AlignmentUserVariables* auv);
0092
0093 AlignmentUserVariables* userVariables(void) const;
0094
0095
0096 Alignable* alignable(void) const;
0097
0098
0099
0100
0101
0102 virtual unsigned int hierarchyLevel() const;
0103
0104
0105 int size(void) const;
0106
0107
0108 bool isValid(void) const;
0109
0110 void setValid(bool v);
0111
0112 protected:
0113
0114 AlgebraicSymMatrix collapseSymMatrix(const AlgebraicSymMatrix& m, const std::vector<bool>& sel) const;
0115 AlgebraicVector collapseVector(const AlgebraicVector& m, const std::vector<bool>& sel) const;
0116 AlgebraicSymMatrix expandSymMatrix(const AlgebraicSymMatrix& m, const std::vector<bool>& sel) const;
0117 AlgebraicVector expandVector(const AlgebraicVector& m, const std::vector<bool>& sel) const;
0118
0119
0120
0121 Alignable* theAlignable;
0122
0123 DataContainer theData;
0124
0125 AlignmentUserVariables* theUserVariables;
0126
0127 bool bValid;
0128 };
0129
0130 #endif