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;
42 
44  void updateParameters(const CompositeAlignmentParameters& aap, bool updateCorrelations = true);
45 
47  const align::Alignables& alignables(void) const { return theAlignables; }
48 
51 
53  int numObjects(void) const { return theAlignables.size(); }
54 
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 
87 
90 
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:
157 
158  // data members
159 
162 
165 };
166 
167 #endif
void resetParameters(void)
reset parameters, correlations, user variables
const unsigned int numCorrelations(void) const
get number of correlations between alignables
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
def all(container)
workaround iterator generators for ROOT classes
Definition: cmstools.py:25
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.
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
const align::Alignables & alignables(void) const
get all alignables
void applyParameters(void)
Obsolete: Use AlignableNavigator::alignableDetFromDetId and alignableFromAlignableDet.
std::pair< int, int > typeAndLayer(const Alignable *ali, const TrackerTopology *tTopo) const
Obtain type and layer from Alignable.
Definition: config.py:1
virtual unsigned int size(void) const
Get number of stored correlations.
void attachUserVariables(const align::Alignables &alivec, const std::vector< AlignmentUserVariables *> &uvarvec, int &ierr)
Attach User Variables to given alignables.
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:48
align::Alignables validAlignables(void) const
get all alignables with valid parameters
std::vector< AlignmentParameters * > Parameters
CLHEP::HepMatrix AlgebraicMatrix
AlignmentParameterStore(const align::Alignables &alis, const edm::ParameterSet &config)
constructor
CompositeAlignmentParameters selectParameters(const std::vector< AlignableDet *> &alignabledets) const
std::vector< unsigned int > DetIds
void applyAlignableRelativePositions(const align::Alignables &alivec, const AlignableShifts &shifts, int &ierr)
apply relative shifts to alignables
(Abstract) Base class for alignment algorithm user variables
TypeOfConstraints theTypeOfConstraints
type of constraints
Alignable * alignableFromAlignableDet(const AlignableDetOrUnitPtr &alignableDet) const
Obsolete: Use AlignableNavigator::alignableDetFromGeomDet and alignableFromAlignableDet.
AlignmentCorrelationsStore * correlationsStore(void) const
get full correlation map
std::map< std::pair< Alignable *, Alignable * >, AlgebraicMatrix > Correlations
align::Alignables theAlignables
alignables
std::vector< Alignable * > Alignables
Definition: Utilities.h:31
AlignmentCorrelationsStore * theCorrelationsStore
HLT enums.
void cacheTransformations(void)
cache the current position, rotation and other parameters
std::vector< AlignableAbsData > AlignablePositions
Definition: AlignableData.h:47
int numObjects(void) const
returns number of alignables
void attachAlignmentParameters(const align::Alignables &alivec, const Parameters &parvec, int &ierr)
Attach alignment parameters to given alignables.
cond::RealTimeType< cond::runnumber >::type RunNumber
Definition: Utilities.h:37