Go to the documentation of this file.00001 #ifndef Alignment_CommonAlignment_AlignmentParameters_H
00002 #define Alignment_CommonAlignment_AlignmentParameters_H
00003
00004 #include <vector>
00005
00006 #include "Alignment/CommonAlignment/interface/AlignmentParametersData.h"
00007 #include "Alignment/CommonAlignment/interface/AlignmentUserVariables.h"
00008
00009 #include "DataFormats/CLHEP/interface/AlgebraicObjects.h"
00010
00027
00028
00029
00030 class AlignableDetOrUnitPtr;
00031 class Alignable;
00032 class TrajectoryStateOnSurface;
00033 class RecHit;
00034
00035 class AlignmentParameters
00036 {
00037
00038 public:
00039
00040 typedef AlignmentParametersData::DataContainer DataContainer;
00041
00043 AlignmentParameters();
00044
00046 AlignmentParameters(Alignable* object, const AlgebraicVector& par,
00047 const AlgebraicSymMatrix& cov);
00048
00050 AlignmentParameters(Alignable* object, const AlgebraicVector& par,
00051 const AlgebraicSymMatrix& cov, const std::vector<bool>& sel);
00052
00054 AlignmentParameters(Alignable* object, const DataContainer& data );
00055
00057 virtual ~AlignmentParameters();
00058
00060 virtual void apply() = 0;
00062 virtual int type() const = 0;
00063
00065 virtual AlignmentParameters* clone(const AlgebraicVector& par,
00066 const AlgebraicSymMatrix& cov) const = 0;
00067 virtual AlignmentParameters* cloneFromSelected(const AlgebraicVector& par,
00068 const AlgebraicSymMatrix& cov) const = 0;
00069
00071 const std::vector<bool>& selector( void ) const;
00072
00074 int numSelected( void ) const;
00075
00077 AlgebraicVector selectedParameters( void ) const;
00078
00080 AlgebraicSymMatrix selectedCovariance(void) const;
00081
00083 const AlgebraicVector& parameters(void) const;
00084
00086 const AlgebraicSymMatrix& covariance(void) const;
00087
00089 virtual AlgebraicMatrix derivatives(const TrajectoryStateOnSurface& tsos,
00090 const AlignableDetOrUnitPtr &alidet) const = 0;
00091 virtual AlgebraicMatrix selectedDerivatives( const TrajectoryStateOnSurface& tsos,
00092 const AlignableDetOrUnitPtr &alidet) const;
00093
00095 void setUserVariables(AlignmentUserVariables* auv);
00097 AlignmentUserVariables* userVariables( void ) const;
00098
00100 Alignable* alignable( void ) const;
00101
00106 virtual unsigned int hierarchyLevel() const;
00107
00109 int size(void) const;
00110
00112 bool isValid(void) const;
00114 void setValid(bool v);
00115
00116 protected:
00117
00118
00119 AlgebraicSymMatrix collapseSymMatrix(const AlgebraicSymMatrix& m,
00120 const std::vector<bool>& sel) const;
00121 AlgebraicVector collapseVector(const AlgebraicVector& m,
00122 const std::vector<bool>& sel) const;
00123 AlgebraicSymMatrix expandSymMatrix(const AlgebraicSymMatrix& m,
00124 const std::vector<bool>& sel) const;
00125 AlgebraicVector expandVector(const AlgebraicVector& m,
00126 const std::vector<bool>& sel) const;
00127
00128
00129
00130 Alignable* theAlignable;
00131
00132 DataContainer theData;
00133
00134 AlignmentUserVariables* theUserVariables;
00135
00136 bool bValid;
00137
00138
00139 };
00140
00141 #endif
00142
00143