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;
45  selectParameters( const std::vector <Alignable*>& alignables ) const;
46 
48  void updateParameters(const CompositeAlignmentParameters& aap, bool updateCorrelations = true);
49 
51  const align::Alignables& alignables(void) const { return theAlignables; }
52 
54  align::Alignables validAlignables(void) const;
55 
57  int numObjects(void) const { return theAlignables.size(); }
58 
60  AlignmentCorrelationsStore* correlationsStore( void ) const { return theCorrelationsStore; }
61 
63  const unsigned int numCorrelations( void ) const { return theCorrelationsStore->size(); }
64 
66 /* Alignable* alignableFromGeomDet( const GeomDet* geomDet ) const; */
67 
69  Alignable* alignableFromAlignableDet( const AlignableDetOrUnitPtr& alignableDet ) const;
70 
72 /* Alignable* alignableFromDetId(const unsigned int& detId) const; */
73 
75  void applyParameters(void);
76 
78  void applyParameters(Alignable* alignable);
79 
81  void resetParameters(void);
82 
84  void resetParameters(Alignable* ali);
85 
87  void cacheTransformations(void);
88 
90  void cacheTransformations(const align::RunNumber&);
91 
93  void restoreCachedTransformations(void);
94 
96  void restoreCachedTransformations(const align::RunNumber&);
97 
100  void acquireRelativeParameters(void);
101 
103  void applyAlignableAbsolutePositions( const align::Alignables& alis,
104  const AlignablePositions& newpos, int& ierr );
105 
107  void applyAlignableRelativePositions( const align::Alignables& alivec,
108  const AlignableShifts& shifts, int& ierr );
109 
111  void attachAlignmentParameters( const align::Alignables& alivec, const Parameters& parvec, int& ierr );
112 
114  void attachAlignmentParameters(const Parameters& parvec, int& ierr);
115 
117  void attachCorrelations( const align::Alignables& alivec, const Correlations& cormap,
118  bool overwrite, int& ierr );
119 
121  void attachCorrelations( const Correlations& cormap, bool overwrite, int& ierr );
122 
124  void attachUserVariables( const align::Alignables& alivec,
125  const std::vector<AlignmentUserVariables*>& uvarvec, int& ierr);
126 
128  void setAlignmentPositionError( const align::Alignables& alivec, double valshift, double valrot );
129 
131  std::pair<int,int> typeAndLayer( const Alignable* ali, const TrackerTopology* tTopo ) const;
132 
134  typedef std::pair<Alignable*, unsigned int> ParameterId;
150  bool hierarchyConstraints(const Alignable *aliMaster, const align::Alignables &aliComps,
151  std::vector<std::vector<ParameterId> > &paramIdsVecOut,
152  std::vector<std::vector<double> > &factorsVecOut,
153  bool all, double epsilon) const;
154 
155 protected:
156 
157  // storage for correlations
159 
160 private:
161  enum TypeOfConstraints { NONE, HIERARCHY_CONSTRAINTS, APPROX_AVERAGING_CONSTRAINTS };
162 
163  // data members
164 
167 
170 };
171 
172 #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:31
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:37