CMS 3D CMS Logo

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
const AlgebraicSymMatrix & covariance(void) const
Get parameter covariance matrix.
Alignable * alignable(void) const
Get pointer to corresponding alignable.
const AlgebraicVector & parameters(void) const
Get alignment parameters.
int numSelected(void) const
Get number of selected parameters.
AlgebraicVector expandVector(const AlgebraicVector &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
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.
AlignmentUserVariables * userVariables(void) const
Get pointer to user variables.
virtual AlgebraicMatrix selectedDerivatives(const TrajectoryStateOnSurface &tsos, const AlignableDetOrUnitPtr &alidet) const
int size(void) const
Get number of parameters.
AlgebraicSymMatrix collapseSymMatrix(const AlgebraicSymMatrix &m, const std::vector< bool > &sel) const
(Abstract) Base class for alignment algorithm user variables
bool isValid(void) const
Get validity flag.
AlgebraicVector collapseVector(const AlgebraicVector &m, const std::vector< bool > &sel) const
AlignmentParametersData::DataContainer DataContainer
CLHEP::HepVector AlgebraicVector
virtual unsigned int hierarchyLevel() const
virtual int type() const =0
tell type (AlignmentParametersFactory::ParametersType - but no circular dependency) ...
void setUserVariables(AlignmentUserVariables *auv)
Set pointer to user variables.
virtual AlignmentParameters * clone(const AlgebraicVector &par, const AlgebraicSymMatrix &cov) const =0
Enforce clone methods in derived classes.
const std::vector< bool > & selector(void) const
Get alignment parameter selector vector.
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:80
virtual ~AlignmentParameters()
Destructor.
CLHEP::HepSymMatrix AlgebraicSymMatrix
AlignmentParameters()
Default constructor.
bool bValid
True if parameters are valid.
virtual AlignmentParameters * cloneFromSelected(const AlgebraicVector &par, const AlgebraicSymMatrix &cov) const =0
AlignmentUserVariables * theUserVariables
virtual void apply()=0
apply parameters to alignable
AlgebraicSymMatrix selectedCovariance(void) const
Get covariance matrix of selected parameters.