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 
8 
9 #include <map>
10 #include <vector>
11 
23 
24 class AlignableDet;
25 class Alignable;
26 
28 public:
31 
32  typedef std::map<AlignableDetOrUnitPtr, Alignable *> AlignableDetToAlignableMap;
33  typedef std::map<Alignable *, int> Aliposmap;
34  typedef std::map<Alignable *, int> Alilenmap;
35 
37 
39 
40  CompositeAlignmentParameters(const AlgebraicVector &par, const AlgebraicSymMatrix &cov, const Components &comp);
41 
43  const AlgebraicSymMatrix &cov,
44  const Components &comp,
45  const AlignableDetToAlignableMap &alimap,
46  const Aliposmap &aliposmap,
47  const Alilenmap &alilenmap);
48 
49  CompositeAlignmentParameters(const DataContainer &data,
50  const Components &comp,
51  const AlignableDetToAlignableMap &alimap,
52  const Aliposmap &aliposmap,
53  const Alilenmap &alilenmap);
54 
57 
59  const AlgebraicVector &parameters() const { return theData->parameters(); }
60 
62  const AlgebraicSymMatrix &covariance() const { return theData->covariance(); }
63 
66 
69  const AlgebraicSymMatrix &cov,
70  const AlignableDetToAlignableMap &alimap,
71  const Aliposmap &aliposmap,
72  const Alilenmap &alilenmap) const;
73 
75  Components components() const;
76 
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;
105  AlgebraicMatrix derivativesLegacy(const std::vector<TrajectoryStateOnSurface> &tsosvec,
106  const std::vector<AlignableDet *> &alidetvec) const;
109  AlgebraicMatrix selectedDerivativesLegacy(const std::vector<TrajectoryStateOnSurface> &tsosvec,
110  const std::vector<AlignableDet *> &alidetvec) const;
111 
114 
117 
120 
123 
124 protected:
125  DataContainer theData;
126 
127 private:
129  bool extractPositionAndLength(const align::Alignables &alignables,
130  std::vector<int> &posvec,
131  std::vector<int> &lenvec,
132  int &length) const;
133 
136 
139  void convert(const std::vector<AlignableDet *> &input, std::vector<AlignableDetOrUnitPtr> &output) const;
140 
142  Components theComponents;
143 
145  AlignableDetToAlignableMap theAlignableDetToAlignableMap;
146 
148  Aliposmap theAliposmap;
149  Alilenmap theAlilenmap;
150 };
151 
152 #endif
std::map< Alignable *, int > Aliposmap
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:48
AlgebraicMatrix selectedDerivativesLegacy(const TrajectoryStateOnSurface &tsos, AlignableDet *alidet) const
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.
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
AlgebraicMatrix derivativesLegacy(const TrajectoryStateOnSurface &tsos, AlignableDet *alidet) const
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
std::map< Alignable *, int > Alilenmap
std::map< AlignableDetOrUnitPtr, Alignable * > AlignableDetToAlignableMap
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
CLHEP::HepSymMatrix AlgebraicSymMatrix
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.