CMS 3D CMS Logo

AlignmentParameterStore.h
Go to the documentation of this file.
1 #ifndef Alignment_CommonAlignmentAlgorithm_AlignmentParameterStore_h
2 #define Alignment_CommonAlignmentAlgorithm_AlignmentParameterStore_h
3 
8 
16 
17 namespace edm { class ParameterSet; }
19 class TrackerTopology;
20 
22 {
23 
24 public:
25 
26  typedef std::vector<AlignmentParameters*> Parameters;
27  typedef std::map< std::pair<Alignable*,Alignable*>,AlgebraicMatrix > Correlations;
28  typedef std::vector<unsigned int> DetIds;
29 
32 
34  virtual ~AlignmentParameterStore();
35 
39  selectParameters( const std::vector <AlignableDet*>& alignabledets ) const;
42  selectParameters( const std::vector <AlignableDetOrUnitPtr>& alignabledets ) const;
44  CompositeAlignmentParameters selectParameters(const align::Alignables&) const;
45 
47  void updateParameters(const CompositeAlignmentParameters& aap, bool updateCorrelations = true);
48 
50  const align::Alignables& alignables(void) const { return theAlignables; }
51 
53  align::Alignables validAlignables(void) const;
54 
56  int numObjects(void) const { return theAlignables.size(); }
57 
59  AlignmentCorrelationsStore* correlationsStore( void ) const { return theCorrelationsStore; }
60 
62  const unsigned int numCorrelations( void ) const { return theCorrelationsStore->size(); }
63 
65 /* Alignable* alignableFromGeomDet( const GeomDet* geomDet ) const; */
66 
68  Alignable* alignableFromAlignableDet( const AlignableDetOrUnitPtr& alignableDet ) const;
69 
71 /* Alignable* alignableFromDetId(const unsigned int& detId) const; */
72 
74  void applyParameters(void);
75 
77  void applyParameters(Alignable* alignable);
78 
80  void resetParameters(void);
81 
83  void resetParameters(Alignable* ali);
84 
86  void cacheTransformations(void);
87 
89  void cacheTransformations(const align::RunNumber&);
90 
92  void restoreCachedTransformations(void);
93 
95  void restoreCachedTransformations(const align::RunNumber&);
96 
99  void acquireRelativeParameters(void);
100 
102  void applyAlignableAbsolutePositions( const align::Alignables& alis,
103  const AlignablePositions& newpos, int& ierr );
104 
106  void applyAlignableRelativePositions( const align::Alignables& alivec,
107  const AlignableShifts& shifts, int& ierr );
108 
110  void attachAlignmentParameters( const align::Alignables& alivec, const Parameters& parvec, int& ierr );
111 
113  void attachAlignmentParameters(const Parameters& parvec, int& ierr);
114 
116  void attachCorrelations( const align::Alignables& alivec, const Correlations& cormap,
117  bool overwrite, int& ierr );
118 
120  void attachCorrelations( const Correlations& cormap, bool overwrite, int& ierr );
121 
123  void attachUserVariables( const align::Alignables& alivec,
124  const std::vector<AlignmentUserVariables*>& uvarvec, int& ierr);
125 
127  void setAlignmentPositionError( const align::Alignables& alivec, double valshift, double valrot );
128 
130  std::pair<int,int> typeAndLayer( const Alignable* ali, const TrackerTopology* tTopo ) const;
131 
133  typedef std::pair<Alignable*, unsigned int> ParameterId;
149  bool hierarchyConstraints(const Alignable *aliMaster, const align::Alignables &aliComps,
150  std::vector<std::vector<ParameterId> > &paramIdsVecOut,
151  std::vector<std::vector<double> > &factorsVecOut,
152  bool all, double epsilon) const;
153 
154 protected:
155 
156  // storage for correlations
158 
159 private:
160  enum TypeOfConstraints { NONE, HIERARCHY_CONSTRAINTS, APPROX_AVERAGING_CONSTRAINTS };
161 
162  // data members
163 
166 
169 };
170 
171 #endif
std::map< std::pair< Alignable *, Alignable * >, AlgebraicMatrix > Correlations
std::pair< Alignable *, unsigned int > ParameterId
a single alignable parameter of an Alignable
Definition: config.py:1
std::vector< AlignableRelData > AlignableShifts
Definition: AlignableData.h:52
std::vector< AlignmentParameters * > Parameters
CLHEP::HepMatrix AlgebraicMatrix
std::vector< unsigned int > DetIds
const unsigned int numCorrelations(void) const
get number of correlations between alignables
(Abstract) Base class for alignment algorithm user variables
TypeOfConstraints theTypeOfConstraints
type of constraints
align::Alignables theAlignables
alignables
int numObjects(void) const
returns number of alignables
std::vector< Alignable * > Alignables
Definition: Utilities.h:32
AlignmentCorrelationsStore * theCorrelationsStore
HLT enums.
std::vector< AlignableAbsData > AlignablePositions
Definition: AlignableData.h:51
const align::Alignables & alignables(void) const
get all alignables
AlignmentCorrelationsStore * correlationsStore(void) const
get full correlation map
cond::RealTimeType< cond::runnumber >::type RunNumber
Definition: Utilities.h:38