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
AlignmentParameterStore::hierarchyConstraints
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
Definition: AlignmentParameterStore.cc:680
AlignmentParameterStore::numObjects
int numObjects(void) const
returns number of alignables
Definition: AlignmentParameterStore.h:53
AlignmentUserVariables
(Abstract) Base class for alignment algorithm user variables
Definition: AlignmentUserVariables.h:6
AlignmentParameterStore::alignables
const align::Alignables & alignables(void) const
get all alignables
Definition: AlignmentParameterStore.h:47
AlignmentParameterStore::resetParameters
void resetParameters(void)
reset parameters, correlations, user variables
Definition: AlignmentParameterStore.cc:271
AlignmentParameterStore::selectParameters
CompositeAlignmentParameters selectParameters(const std::vector< AlignableDet * > &alignabledets) const
Definition: AlignmentParameterStore.cc:65
edm
HLT enums.
Definition: AlignableModifier.h:19
TrackerTopology
Definition: TrackerTopology.h:16
align::RunNumber
cond::RealTimeType< cond::runnumber >::type RunNumber
Definition: Utilities.h:37
Alignable
Definition: Alignable.h:27
AlignmentParameterStore::updateParameters
void updateParameters(const CompositeAlignmentParameters &aap, bool updateCorrelations=true)
update parameters
Definition: AlignmentParameterStore.cc:199
CompositeAlignmentParameters
Definition: CompositeAlignmentParameters.h:27
AlignmentParameterStore::attachUserVariables
void attachUserVariables(const align::Alignables &alivec, const std::vector< AlignmentUserVariables * > &uvarvec, int &ierr)
Attach User Variables to given alignables.
Definition: AlignmentParameterStore.cc:629
AlignmentParameterStore::restoreCachedTransformations
void restoreCachedTransformations(void)
restore the previously cached position, rotation and other parameters
Definition: AlignmentParameterStore.cc:316
AlignmentCorrelationsStore::size
virtual unsigned int size(void) const
Get number of stored correlations.
Definition: AlignmentCorrelationsStore.cc:126
AlignmentParameterStore::setAlignmentPositionError
void setAlignmentPositionError(const align::Alignables &alivec, double valshift, double valrot)
Set Alignment position error.
Definition: AlignmentParameterStore.cc:646
AlignmentParameterStore::attachCorrelations
void attachCorrelations(const align::Alignables &alivec, const Correlations &cormap, bool overwrite, int &ierr)
Attach correlations to given alignables.
Definition: AlignmentParameterStore.cc:598
AlignmentParameterStore::applyAlignableAbsolutePositions
void applyAlignableAbsolutePositions(const align::Alignables &alis, const AlignablePositions &newpos, int &ierr)
apply absolute positions to alignables
Definition: AlignmentParameterStore.cc:373
AlignableDetOrUnitPtr
Definition: AlignableDetOrUnitPtr.h:30
AlignableShifts
std::vector< AlignableRelData > AlignableShifts
Definition: AlignableData.h:48
python.cmstools.all
def all(container)
workaround iterator generators for ROOT classes
Definition: cmstools.py:25
AlignmentParameterStore::ParameterId
std::pair< Alignable *, unsigned int > ParameterId
a single alignable parameter of an Alignable
Definition: AlignmentParameterStore.h:128
AlignmentCorrelationsStore.h
geometryDiff.epsilon
int epsilon
Definition: geometryDiff.py:26
AlignmentParameterStore::~AlignmentParameterStore
virtual ~AlignmentParameterStore()
destructor
Definition: AlignmentParameterStore.cc:62
AlignmentParameterStore::applyAlignableRelativePositions
void applyAlignableRelativePositions(const align::Alignables &alivec, const AlignableShifts &shifts, int &ierr)
apply relative shifts to alignables
Definition: AlignmentParameterStore.cc:470
config
Definition: config.py:1
AlignmentParameterStore::validAlignables
align::Alignables validAlignables(void) const
get all alignables with valid parameters
Definition: AlignmentParameterStore.cc:230
AlignmentParameterStore::applyParameters
void applyParameters(void)
Obsolete: Use AlignableNavigator::alignableDetFromDetId and alignableFromAlignableDet.
Definition: AlignmentParameterStore.cc:255
AlignmentParameterStore::typeAndLayer
std::pair< int, int > typeAndLayer(const Alignable *ali, const TrackerTopology *tTopo) const
Obtain type and layer from Alignable.
Definition: AlignmentParameterStore.cc:368
AlignableData.h
CompositeAlignmentParameters.h
AlignmentParameterStore::APPROX_AVERAGING_CONSTRAINTS
Definition: AlignmentParameterStore.h:156
AlignmentParameterStore::Correlations
std::map< std::pair< Alignable *, Alignable * >, AlgebraicMatrix > Correlations
Definition: AlignmentParameterStore.h:26
edm::ParameterSet
Definition: ParameterSet.h:47
ParameterSet
Definition: Functions.h:16
AlignmentCorrelationsStore
Definition: AlignmentCorrelationsStore.h:16
AlignmentParameterStore::Parameters
std::vector< AlignmentParameters * > Parameters
Definition: AlignmentParameterStore.h:25
AlignmentParameterStore::AlignmentParameterStore
AlignmentParameterStore(const align::Alignables &alis, const edm::ParameterSet &config)
constructor
Definition: AlignmentParameterStore.cc:29
AlignmentParameterStore::acquireRelativeParameters
void acquireRelativeParameters(void)
Definition: AlignmentParameterStore.cc:329
AlignmentParameterStore::HIERARCHY_CONSTRAINTS
Definition: AlignmentParameterStore.h:156
AlignmentParameterStore::DetIds
std::vector< unsigned int > DetIds
Definition: AlignmentParameterStore.h:27
trackerHitRTTI::vector
Definition: trackerHitRTTI.h:21
Utilities.h
AlignmentParameterStore::theAlignables
align::Alignables theAlignables
alignables
Definition: AlignmentParameterStore.h:161
AlignmentParameterStore::TypeOfConstraints
TypeOfConstraints
Definition: AlignmentParameterStore.h:156
AlignmentParameterStore::cacheTransformations
void cacheTransformations(void)
cache the current position, rotation and other parameters
Definition: AlignmentParameterStore.cc:303
AlignmentParameterStore::alignableFromAlignableDet
Alignable * alignableFromAlignableDet(const AlignableDetOrUnitPtr &alignableDet) const
Obsolete: Use AlignableNavigator::alignableDetFromGeomDet and alignableFromAlignableDet.
Definition: AlignmentParameterStore.cc:242
AlignmentParameterStore::correlationsStore
AlignmentCorrelationsStore * correlationsStore(void) const
get full correlation map
Definition: AlignmentParameterStore.h:56
align::Alignables
std::vector< Alignable * > Alignables
Definition: Utilities.h:31
AlgebraicMatrix
CLHEP::HepMatrix AlgebraicMatrix
Definition: AlgebraicObjects.h:14
AlignmentParameterStore::theTypeOfConstraints
TypeOfConstraints theTypeOfConstraints
type of constraints
Definition: AlignmentParameterStore.h:164
AlignmentParameterStore
Definition: AlignmentParameterStore.h:23
AlignmentParameterStore::NONE
Definition: AlignmentParameterStore.h:156
AlignmentParameterStore::theCorrelationsStore
AlignmentCorrelationsStore * theCorrelationsStore
Definition: AlignmentParameterStore.h:153
AlignmentParameterStore::numCorrelations
const unsigned int numCorrelations(void) const
get number of correlations between alignables
Definition: AlignmentParameterStore.h:59
AlignablePositions
std::vector< AlignableAbsData > AlignablePositions
Definition: AlignableData.h:47
Parameters
vector< ParameterSet > Parameters
Definition: HLTMuonPlotter.cc:25
AlignmentParameterStore::attachAlignmentParameters
void attachAlignmentParameters(const align::Alignables &alivec, const Parameters &parvec, int &ierr)
Attach alignment parameters to given alignables.
Definition: AlignmentParameterStore.cc:556