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 {
18  class ParameterSet;
19 }
21 class TrackerTopology;
22 
24 public:
25  typedef std::vector<AlignmentParameters*> Parameters;
26  typedef std::map<std::pair<Alignable*, Alignable*>, AlgebraicMatrix> Correlations;
27  typedef std::vector<unsigned int> DetIds;
28 
31 
33  virtual ~AlignmentParameterStore();
34 
37  CompositeAlignmentParameters selectParameters(const std::vector<AlignableDet*>& alignabledets) const;
39  CompositeAlignmentParameters selectParameters(const std::vector<AlignableDetOrUnitPtr>& alignabledets) const;
41  CompositeAlignmentParameters selectParameters(const align::Alignables&) const;
42 
44  void updateParameters(const CompositeAlignmentParameters& aap, bool updateCorrelations = true);
45 
47  const align::Alignables& alignables(void) const { return theAlignables; }
48 
50  align::Alignables validAlignables(void) const;
51 
53  int numObjects(void) const { return theAlignables.size(); }
54 
56  AlignmentCorrelationsStore* correlationsStore(void) const { return theCorrelationsStore; }
57 
59  const unsigned int numCorrelations(void) const { return theCorrelationsStore->size(); }
60 
62  /* Alignable* alignableFromGeomDet( const GeomDet* geomDet ) const; */
63 
65  Alignable* alignableFromAlignableDet(const AlignableDetOrUnitPtr& alignableDet) const;
66 
68  /* Alignable* alignableFromDetId(const unsigned int& detId) const; */
69 
71  void applyParameters(void);
72 
74  void applyParameters(Alignable* alignable);
75 
77  void resetParameters(void);
78 
80  void resetParameters(Alignable* ali);
81 
83  void cacheTransformations(void);
84 
86  void cacheTransformations(const align::RunNumber&);
87 
89  void restoreCachedTransformations(void);
90 
92  void restoreCachedTransformations(const align::RunNumber&);
93 
96  void acquireRelativeParameters(void);
97 
99  void applyAlignableAbsolutePositions(const align::Alignables& alis, const AlignablePositions& newpos, int& ierr);
100 
102  void applyAlignableRelativePositions(const align::Alignables& alivec, const AlignableShifts& shifts, int& ierr);
103 
105  void attachAlignmentParameters(const align::Alignables& alivec, const Parameters& parvec, int& ierr);
106 
108  void attachAlignmentParameters(const Parameters& parvec, int& ierr);
109 
111  void attachCorrelations(const align::Alignables& alivec, const Correlations& cormap, bool overwrite, int& ierr);
112 
114  void attachCorrelations(const Correlations& cormap, bool overwrite, int& ierr);
115 
117  void attachUserVariables(const align::Alignables& alivec,
118  const std::vector<AlignmentUserVariables*>& uvarvec,
119  int& ierr);
120 
122  void setAlignmentPositionError(const align::Alignables& alivec, double valshift, double valrot);
123 
125  std::pair<int, int> typeAndLayer(const Alignable* ali, const TrackerTopology* tTopo) const;
126 
128  typedef std::pair<Alignable*, unsigned int> ParameterId;
144  bool hierarchyConstraints(const Alignable* aliMaster,
145  const align::Alignables& aliComps,
146  std::vector<std::vector<ParameterId> >& paramIdsVecOut,
147  std::vector<std::vector<double> >& factorsVecOut,
148  bool all,
149  double epsilon) const;
150 
151 protected:
152  // storage for correlations
154 
155 private:
156  enum TypeOfConstraints { NONE, HIERARCHY_CONSTRAINTS, APPROX_AVERAGING_CONSTRAINTS };
157 
158  // data members
159 
162 
165 };
166 
167 #endif
std::pair< Alignable *, unsigned int > ParameterId
a single alignable parameter of an Alignable
Definition: config.py:1
std::vector< AlignableRelData > AlignableShifts
Definition: AlignableData.h:48
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
std::map< std::pair< Alignable *, Alignable * >, AlgebraicMatrix > Correlations
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:47
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