CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
CompositeAlignmentParameters.h
Go to the documentation of this file.
1 #ifndef Alignment_CommonAlignmentParametrization_CompositeAlignmentParameters_h
2 #define Alignment_CommonAlignmentParametrization_CompositeAlignmentParameters_h
3 
4 
8 
9 #include <map>
10 #include <vector>
11 
23 
24 class AlignableDet;
25 class Alignable;
26 
28 {
29 
30 public:
31 
33  typedef std::vector<Alignable*> Components;
34 
35  typedef std::map<AlignableDetOrUnitPtr,Alignable*> AlignableDetToAlignableMap;
36  typedef std::map<Alignable*,int> Aliposmap;
37  typedef std::map<Alignable*,int> Alilenmap;
38 
40 
42 
44  const Components& comp);
45 
47  const Components& comp, const AlignableDetToAlignableMap& alimap,
48  const Aliposmap& aliposmap, const Alilenmap& alilenmap);
49 
51  const Components& comp, const AlignableDetToAlignableMap& alimap,
52  const Aliposmap& aliposmap, const Alilenmap& alilenmap);
53 
56 
58  const AlgebraicVector& parameters() const { return theData->parameters();}
59 
61  const AlgebraicSymMatrix& covariance() const { return theData->covariance();}
62 
65  const AlgebraicSymMatrix& cov) const;
66 
69  const AlignableDetToAlignableMap& alimap,
70  const Aliposmap& aliposmap,
71  const Alilenmap& alilenmap) const;
72 
74  Components components() const;
75 
80  const AlignableDetOrUnitPtr &alidet ) const;
82  AlgebraicMatrix derivatives( const std::vector<TrajectoryStateOnSurface>& tsosvec,
83  const std::vector<AlignableDet*>& alidetvec ) const;
84  AlgebraicMatrix derivatives( const std::vector<TrajectoryStateOnSurface>& tsosvec,
85  const std::vector<AlignableDetOrUnitPtr>& alidetvec ) const;
87  AlgebraicMatrix selectedDerivatives( const std::vector<TrajectoryStateOnSurface> &tsosvec,
88  const std::vector<AlignableDet*> &alidetvec ) const;
89  AlgebraicMatrix selectedDerivatives( const std::vector<TrajectoryStateOnSurface> &tsosvec,
90  const std::vector<AlignableDetOrUnitPtr> &alidetvec ) const;
91 
93  AlgebraicVector correctionTerm( const std::vector<TrajectoryStateOnSurface>& tsosvec,
94  const std::vector<AlignableDet*>& alidetvec ) const;
95  AlgebraicVector correctionTerm( const std::vector<TrajectoryStateOnSurface>& tsosvec,
96  const std::vector<AlignableDetOrUnitPtr>& alidetvec ) const;
99  AlignableDet* alidet ) const;
102  AlignableDet* alidet ) const;
104  AlgebraicMatrix derivativesLegacy( const std::vector<TrajectoryStateOnSurface>& tsosvec,
105  const std::vector<AlignableDet*>& alidetvec ) const;
107  AlgebraicMatrix selectedDerivativesLegacy( const std::vector<TrajectoryStateOnSurface>& tsosvec,
108  const std::vector<AlignableDet*>& alidetvec ) const;
109 
112 
113 
115  AlgebraicVector parameterSubset ( const std::vector<Alignable*>& vec ) const;
116 
118  AlgebraicSymMatrix covarianceSubset( const std::vector<Alignable*>& vec ) const;
119 
121  AlgebraicMatrix covarianceSubset ( const std::vector<Alignable*>& veci,
122  const std::vector<Alignable*>& vecj ) const;
123 
124 protected:
126 
127 private:
128 
130  bool extractPositionAndLength( const std::vector<Alignable*>& alignables,
131  std::vector<int>& posvec,
132  std::vector<int>& lenvec,
133  int& length ) const;
134 
136  std::vector< Alignable* > extractAlignables( const std::vector< Alignable* >& alignables ) const;
137 
140  void convert(const std::vector<AlignableDet*> &input,
141  std::vector<AlignableDetOrUnitPtr> &output) const;
142 
145 
148 
152 
153 };
154 
155 #endif
bool extractPositionAndLength(const std::vector< Alignable * > &alignables, std::vector< int > &posvec, std::vector< int > &lenvec, int &length) const
Extract position and length of parameters for a subset of Alignables.
std::vector< Alignable * > extractAlignables(const std::vector< Alignable * > &alignables) const
Return vector of alignables without multiple occurences.
AlignmentParametersData::DataContainer DataContainer
Alignable * alignableFromAlignableDet(AlignableDetOrUnitPtr adet) const
Get relevant Alignable from AlignableDet.
std::vector< Alignable * > Components
vector of alignable components
AlignableDetToAlignableMap theAlignableDetToAlignableMap
Relate Alignable&#39;s and AlignableDet&#39;s.
AlgebraicMatrix selectedDerivativesLegacy(const TrajectoryStateOnSurface &tsos, AlignableDet *alidet) const
deprecated due to &#39;AlignableDet*&#39; interface (legacy code should not be needed anymore) ...
const AlgebraicVector & parameters() const
Get alignment parameters.
void convert(const std::vector< AlignableDet * > &input, std::vector< AlignableDetOrUnitPtr > &output) const
AlgebraicSymMatrix covarianceSubset(const std::vector< Alignable * > &vec) const
Extract covariance matrix for subset of alignables.
CLHEP::HepMatrix AlgebraicMatrix
Components components() const
Get vector of alignable components.
std::map< Alignable *, int > Alilenmap
const AlgebraicSymMatrix & covariance() const
Get parameter covariance matrix.
virtual ~CompositeAlignmentParameters()
destructor
AlgebraicVector correctionTerm(const std::vector< TrajectoryStateOnSurface > &tsosvec, const std::vector< AlignableDet * > &alidetvec) const
for backward compatibility, use std::vector&lt;AlignableDetOrUnitPtr&gt;
CLHEP::HepVector AlgebraicVector
std::map< AlignableDetOrUnitPtr, Alignable * > AlignableDetToAlignableMap
AlgebraicMatrix derivativesLegacy(const TrajectoryStateOnSurface &tsos, AlignableDet *alidet) const
deprecated due to &#39;AlignableDet*&#39; interface (legacy code should not be needed anymore) ...
AlgebraicVector parameterSubset(const std::vector< Alignable * > &vec) const
Extract parameters for subset of alignables.
AlgebraicMatrix selectedDerivatives(const TrajectoryStateOnSurface &tsos, const AlignableDetOrUnitPtr &alidet) const
Get derivatives for selected alignables.
Aliposmap theAliposmap
Maps to find parameters/covariance elements for given alignable.
CompositeAlignmentParameters(const AlgebraicVector &par, const AlgebraicSymMatrix &cov, const Components &comp)
constructors
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
CLHEP::HepSymMatrix AlgebraicSymMatrix
std::map< Alignable *, int > Aliposmap
Components theComponents
Vector of alignable components.
AlgebraicMatrix derivatives(const TrajectoryStateOnSurface &tsos, const AlignableDetOrUnitPtr &alidet) const
Get derivatives.
CompositeAlignmentParameters * clone(const AlgebraicVector &par, const AlgebraicSymMatrix &cov) const
Clone parameters.