CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
AlignmentParameters.h
Go to the documentation of this file.
1 #ifndef Alignment_CommonAlignment_AlignmentParameters_H
2 #define Alignment_CommonAlignment_AlignmentParameters_H
3 
4 #include <vector>
5 
8 
10 
27 
28 // include and not forward declare to ensure automatic conversion from AlignableDet(Unit):
29 // NO: include problems... #include "Alignment/CommonAlignment/interface/AlignableDetOrUnitPtr.h"
31 class Alignable;
33 class RecHit;
34 
36 public:
38 
41 
43  AlignmentParameters(Alignable* object, const AlgebraicVector& par, const AlgebraicSymMatrix& cov);
44 
47  const AlgebraicVector& par,
48  const AlgebraicSymMatrix& cov,
49  const std::vector<bool>& sel);
50 
53 
55  virtual ~AlignmentParameters();
56 
58  virtual void apply() = 0;
60  virtual int type() const = 0;
61 
63  virtual AlignmentParameters* clone(const AlgebraicVector& par, const AlgebraicSymMatrix& cov) const = 0;
64  virtual AlignmentParameters* cloneFromSelected(const AlgebraicVector& par, const AlgebraicSymMatrix& cov) const = 0;
65 
67  const std::vector<bool>& selector(void) const;
68 
70  int numSelected(void) const;
71 
74 
77 
79  const AlgebraicVector& parameters(void) const;
80 
82  const AlgebraicSymMatrix& covariance(void) const;
83 
86  const AlignableDetOrUnitPtr& alidet) const = 0;
88  const AlignableDetOrUnitPtr& alidet) const;
89 
94 
96  Alignable* alignable(void) const;
97 
102  virtual unsigned int hierarchyLevel() const;
103 
105  int size(void) const;
106 
108  bool isValid(void) const;
110  void setValid(bool v);
111 
112 protected:
113  // private helper methods
114  AlgebraicSymMatrix collapseSymMatrix(const AlgebraicSymMatrix& m, const std::vector<bool>& sel) const;
115  AlgebraicVector collapseVector(const AlgebraicVector& m, const std::vector<bool>& sel) const;
116  AlgebraicSymMatrix expandSymMatrix(const AlgebraicSymMatrix& m, const std::vector<bool>& sel) const;
117  AlgebraicVector expandVector(const AlgebraicVector& m, const std::vector<bool>& sel) const;
118 
119  // data members
120 
122 
124 
126 
127  bool bValid;
128 };
129 
130 #endif
AlgebraicSymMatrix collapseSymMatrix(const AlgebraicSymMatrix &m, const std::vector< bool > &sel) const
AlgebraicVector selectedParameters(void) const
Get selected parameters.
AlgebraicSymMatrix expandSymMatrix(const AlgebraicSymMatrix &m, const std::vector< bool > &sel) const
const std::vector< bool > & selector(void) const
Get alignment parameter selector vector.
const AlgebraicVector & parameters(void) const
Get alignment parameters.
AlignmentUserVariables * userVariables(void) const
Get pointer to user variables.
virtual AlgebraicMatrix derivatives(const TrajectoryStateOnSurface &tsos, const AlignableDetOrUnitPtr &alidet) const =0
Get derivatives of selected parameters.
CLHEP::HepMatrix AlgebraicMatrix
void setValid(bool v)
Set validity flag.
(Abstract) Base class for alignment algorithm user variables
Alignable * alignable(void) const
Get pointer to corresponding alignable.
AlignmentParametersData::DataContainer DataContainer
AlgebraicSymMatrix selectedCovariance(void) const
Get covariance matrix of selected parameters.
int numSelected(void) const
Get number of selected parameters.
CLHEP::HepVector AlgebraicVector
virtual int type() const =0
tell type (AlignmentParametersFactory::ParametersType - but no circular dependency) ...
AlgebraicVector expandVector(const AlgebraicVector &m, const std::vector< bool > &sel) const
void setUserVariables(AlignmentUserVariables *auv)
Set pointer to user variables.
int size(void) const
Get number of parameters.
virtual AlignmentParameters * clone(const AlgebraicVector &par, const AlgebraicSymMatrix &cov) const =0
Enforce clone methods in derived classes.
AlgebraicVector collapseVector(const AlgebraicVector &m, const std::vector< bool > &sel) const
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:79
virtual ~AlignmentParameters()
Destructor.
bool isValid(void) const
Get validity flag.
CLHEP::HepSymMatrix AlgebraicSymMatrix
AlignmentParameters()
Default constructor.
bool bValid
True if parameters are valid.
virtual unsigned int hierarchyLevel() const
virtual AlignmentParameters * cloneFromSelected(const AlgebraicVector &par, const AlgebraicSymMatrix &cov) const =0
const AlgebraicSymMatrix & covariance(void) const
Get parameter covariance matrix.
AlignmentUserVariables * theUserVariables
virtual void apply()=0
apply parameters to alignable
virtual AlgebraicMatrix selectedDerivatives(const TrajectoryStateOnSurface &tsos, const AlignableDetOrUnitPtr &alidet) const