CMS 3D CMS Logo

CompositeAlignmentParameters.h
Go to the documentation of this file.
1 #ifndef Alignment_CommonAlignmentParametrization_CompositeAlignmentParameters_h
2 #define Alignment_CommonAlignmentParametrization_CompositeAlignmentParameters_h
3 
4 
9 
10 #include <map>
11 #include <vector>
12 
24 
25 class AlignableDet;
26 class Alignable;
27 
29 {
30 
31 public:
32 
35 
36  typedef std::map<AlignableDetOrUnitPtr,Alignable*> AlignableDetToAlignableMap;
37  typedef std::map<Alignable*,int> Aliposmap;
38  typedef std::map<Alignable*,int> Alilenmap;
39 
41 
43 
45  const Components& comp);
46 
48  const Components& comp, const AlignableDetToAlignableMap& alimap,
49  const Aliposmap& aliposmap, const Alilenmap& alilenmap);
50 
51  CompositeAlignmentParameters( const DataContainer& data,
52  const Components& comp, const AlignableDetToAlignableMap& alimap,
53  const Aliposmap& aliposmap, const Alilenmap& alilenmap);
54 
57 
59  const AlgebraicVector& parameters() const { return theData->parameters();}
60 
62  const AlgebraicSymMatrix& covariance() const { return theData->covariance();}
63 
66  const AlgebraicSymMatrix& cov) const;
67 
70  const AlignableDetToAlignableMap& alimap,
71  const Aliposmap& aliposmap,
72  const Alilenmap& alilenmap) const;
73 
75  Components components() const;
76 
81  const AlignableDetOrUnitPtr &alidet ) const;
83  AlgebraicMatrix derivatives( const std::vector<TrajectoryStateOnSurface>& tsosvec,
84  const std::vector<AlignableDet*>& alidetvec ) const;
85  AlgebraicMatrix derivatives( const std::vector<TrajectoryStateOnSurface>& tsosvec,
86  const std::vector<AlignableDetOrUnitPtr>& alidetvec ) const;
88  AlgebraicMatrix selectedDerivatives( const std::vector<TrajectoryStateOnSurface> &tsosvec,
89  const std::vector<AlignableDet*> &alidetvec ) const;
90  AlgebraicMatrix selectedDerivatives( const std::vector<TrajectoryStateOnSurface> &tsosvec,
91  const std::vector<AlignableDetOrUnitPtr> &alidetvec ) const;
92 
94  AlgebraicVector correctionTerm( const std::vector<TrajectoryStateOnSurface>& tsosvec,
95  const std::vector<AlignableDet*>& alidetvec ) const;
96  AlgebraicVector correctionTerm( const std::vector<TrajectoryStateOnSurface>& tsosvec,
97  const std::vector<AlignableDetOrUnitPtr>& alidetvec ) const;
100  AlignableDet* alidet ) const;
103  AlignableDet* alidet ) const;
105  AlgebraicMatrix derivativesLegacy( const std::vector<TrajectoryStateOnSurface>& tsosvec,
106  const std::vector<AlignableDet*>& alidetvec ) const;
108  AlgebraicMatrix selectedDerivativesLegacy( const std::vector<TrajectoryStateOnSurface>& tsosvec,
109  const std::vector<AlignableDet*>& alidetvec ) const;
110 
113 
114 
117 
120 
123  const align::Alignables&) const;
124 
125 protected:
126  DataContainer theData;
127 
128 private:
129 
131  bool extractPositionAndLength( const align::Alignables& alignables,
132  std::vector<int>& posvec,
133  std::vector<int>& lenvec,
134  int& length ) const;
135 
138 
141  void convert(const std::vector<AlignableDet*> &input,
142  std::vector<AlignableDetOrUnitPtr> &output) const;
143 
145  Components theComponents;
146 
148  AlignableDetToAlignableMap theAlignableDetToAlignableMap;
149 
151  Aliposmap theAliposmap;
152  Alilenmap theAlilenmap;
153 
154 };
155 
156 #endif
AlignmentParametersData::DataContainer DataContainer
align::Alignables Components
vector of alignable components
AlignableDetToAlignableMap theAlignableDetToAlignableMap
Relate Alignable&#39;s and AlignableDet&#39;s.
AlgebraicSymMatrix covarianceSubset(const align::Alignables &) const
Extract covariance matrix for subset of alignables.
bool extractPositionAndLength(const align::Alignables &alignables, std::vector< int > &posvec, std::vector< int > &lenvec, int &length) const
Extract position and length of parameters for a subset of Alignables.
Alignable * alignableFromAlignableDet(const AlignableDetOrUnitPtr &adet) const
Get relevant Alignable from AlignableDet.
static std::string const input
Definition: EdmProvDump.cc:44
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
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<AlignableDetOrUnitPtr>
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) ...
align::Alignables extractAlignables(const align::Alignables &) const
Return vector of alignables without multiple occurences.
AlgebraicMatrix selectedDerivatives(const TrajectoryStateOnSurface &tsos, const AlignableDetOrUnitPtr &alidet) const
Get derivatives for selected alignables.
AlgebraicVector parameterSubset(const align::Alignables &) const
Extract parameters for subset of alignables.
std::vector< Alignable * > Alignables
Definition: Utilities.h:32
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.