CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 
21 {
22 
23 public:
24 
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 
38  selectParameters( const std::vector <AlignableDet*>& alignabledets ) const;
41  selectParameters( const std::vector <AlignableDetOrUnitPtr>& alignabledets ) const;
44  selectParameters( const std::vector <Alignable*>& alignables ) const;
45 
47  void updateParameters(const CompositeAlignmentParameters& aap, bool updateCorrelations = true);
48 
50  const align::Alignables& alignables(void) const { return theAlignables; }
51 
54 
56  int numObjects(void) const { return theAlignables.size(); }
57 
60 
62  const unsigned int numCorrelations( void ) const { return theCorrelationsStore->size(); }
63 
65 /* Alignable* alignableFromGeomDet( const GeomDet* geomDet ) const; */
66 
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 
90 
93  void acquireRelativeParameters(void);
94 
97  const AlignablePositions& newpos, int& ierr );
98 
101  const AlignableShifts& shifts, int& ierr );
102 
104  void attachAlignmentParameters( const align::Alignables& alivec, const Parameters& parvec, int& ierr );
105 
107  void attachAlignmentParameters(const Parameters& parvec, int& ierr);
108 
110  void attachCorrelations( const align::Alignables& alivec, const Correlations& cormap,
111  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, int& ierr);
119 
121  void setAlignmentPositionError( const align::Alignables& alivec, double valshift, double valrot );
122 
124  std::pair<int,int> typeAndLayer( const Alignable* ali ) const;
125 
127  typedef std::pair<Alignable*, unsigned int> ParameterId;
143  bool hierarchyConstraints(const Alignable *aliMaster, const align::Alignables &aliComps,
144  std::vector<std::vector<ParameterId> > &paramIdsVecOut,
145  std::vector<std::vector<double> > &factorsVecOut,
146  bool all, double epsilon) const;
147 
148 protected:
149 
150  // storage for correlations
152 
153 private:
154  // data members
155 
158 
159 };
160 
161 #endif
void attachUserVariables(const align::Alignables &alivec, const std::vector< AlignmentUserVariables * > &uvarvec, int &ierr)
Attach User Variables to given alignables.
void resetParameters(void)
reset parameters, correlations, user variables
std::map< std::pair< Alignable *, Alignable * >, AlgebraicMatrix > Correlations
std::pair< Alignable *, unsigned int > ParameterId
a single alignable parameter of an Alignable
void setAlignmentPositionError(const align::Alignables &alivec, double valshift, double valrot)
Set Alignment position error.
align::Alignables validAlignables(void) const
get all alignables with valid parameters
void attachCorrelations(const align::Alignables &alivec, const Correlations &cormap, bool overwrite, int &ierr)
Attach correlations to given alignables.
void restoreCachedTransformations(void)
restore the previously cached position, rotation and other parameters
virtual ~AlignmentParameterStore()
destructor
void applyParameters(void)
Obsolete: Use AlignableNavigator::alignableDetFromDetId and alignableFromAlignableDet.
void applyAlignableAbsolutePositions(const align::Alignables &alis, const AlignablePositions &newpos, int &ierr)
apply absolute positions to alignables
void updateParameters(const CompositeAlignmentParameters &aap, bool updateCorrelations=true)
update parameters
std::vector< AlignableRelData > AlignableShifts
Definition: AlignableData.h:52
virtual unsigned int size(void) const
Get number of stored correlations.
vector< ParameterSet > Parameters
std::vector< AlignmentParameters * > Parameters
CLHEP::HepMatrix AlgebraicMatrix
AlignmentParameterStore(const align::Alignables &alis, const edm::ParameterSet &config)
constructor
bool hierarchyConstraints(const Alignable *aliMaster, const align::Alignables &aliComps, std::vector< std::vector< ParameterId > > &paramIdsVecOut, std::vector< std::vector< double > > &factorsVecOut, bool all, double epsilon) const
std::vector< unsigned int > DetIds
void applyAlignableRelativePositions(const align::Alignables &alivec, const AlignableShifts &shifts, int &ierr)
apply relative shifts to alignables
const unsigned int numCorrelations(void) const
get number of correlations between alignables
(Abstract) Base class for alignment algorithm user variables
align::Alignables theAlignables
alignables
int numObjects(void) const
returns number of alignables
CompositeAlignmentParameters selectParameters(const std::vector< AlignableDet * > &alignabledets) const
std::vector< Alignable * > Alignables
Definition: Utilities.h:28
AlignmentCorrelationsStore * theCorrelationsStore
void cacheTransformations(void)
cache the current position, rotation and other parameters
std::vector< AlignableAbsData > AlignablePositions
Definition: AlignableData.h:51
const double epsilon
void attachAlignmentParameters(const align::Alignables &alivec, const Parameters &parvec, int &ierr)
Attach alignment parameters to given alignables.
Alignable * alignableFromAlignableDet(AlignableDetOrUnitPtr alignableDet) const
Obsolete: Use AlignableNavigator::alignableDetFromGeomDet and alignableFromAlignableDet.
const align::Alignables & alignables(void) const
get all alignables
AlignmentCorrelationsStore * correlationsStore(void) const
get full correlation map
std::pair< int, int > typeAndLayer(const Alignable *ali) const
Obtain type and layer from Alignable.