Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 11:56:05

0001 #ifndef Alignment_CommonAlignment_AlignmentParametersData_h
0002 #define Alignment_CommonAlignment_AlignmentParametersData_h
0003 
0004 #include "DataFormats/GeometrySurface/interface/ReferenceCounted.h"
0005 #include "DataFormats/CLHEP/interface/AlgebraicObjects.h"
0006 
0007 class AlignmentParametersData : public ReferenceCounted {
0008 public:
0009   typedef ReferenceCountingPointer<AlignmentParametersData> DataContainer;
0010 
0011   /// Default constructor.
0012   AlignmentParametersData(void);
0013 
0014   /// Constructor from parameters vector, covariance matrix and selection vector.
0015   /// NOTE: The input data must live on the heap and must not be deleted by the user.
0016   AlignmentParametersData(AlgebraicVector* param, AlgebraicSymMatrix* cov, std::vector<bool>* sel);
0017 
0018   /// Constructor from parameters vector, covariance matrix and selection vector.
0019   AlignmentParametersData(const AlgebraicVector& param, const AlgebraicSymMatrix& cov, const std::vector<bool>& sel);
0020 
0021   /// Constructor from parameters vector and covariance matrix.
0022   /// NOTE: The input data must live on the heap and must not be deleted by the user.
0023   AlignmentParametersData(AlgebraicVector* param, AlgebraicSymMatrix* cov);
0024 
0025   /// Constructor from parameters vector and covariance matrix.
0026   AlignmentParametersData(const AlgebraicVector& param, const AlgebraicSymMatrix& cov);
0027 
0028   ~AlignmentParametersData(void) override;
0029 
0030   /// Access to the parameter vector.
0031   const AlgebraicVector& parameters(void) const { return *theParameters; }
0032 
0033   /// Access to the covariance matrix
0034   const AlgebraicSymMatrix& covariance(void) const { return *theCovariance; }
0035 
0036   /// Access to the selection vector.
0037   const std::vector<bool>& selector(void) const { return *theSelector; }
0038 
0039   /// Access to the number of selected parameters.
0040   int numSelected(void) { return theNumSelected; }
0041 
0042   /// Check if the size of the parameters vector, the size of the covariance matrix,
0043   /// the size of the selector and the number of selected parameters is consistent.
0044   /// An exception of type "LogicError" is thrown in case of any inconsistencies.
0045   void checkConsistency(void) const;
0046 
0047 private:
0048   AlgebraicVector* theParameters;
0049   AlgebraicSymMatrix* theCovariance;
0050   std::vector<bool>* theSelector;
0051   int theNumSelected;
0052 };
0053 
0054 #endif