#include <AlignmentParameterStore.h>
Public Types | |
typedef std::map< std::pair< Alignable *, Alignable * >, AlgebraicMatrix > | Correlations |
typedef std::vector< unsigned int > | DetIds |
typedef std::pair< Alignable *, unsigned int > | ParameterId |
a single alignable parameter of an Alignable More... | |
typedef std::vector< AlignmentParameters * > | Parameters |
Public Member Functions | |
void | acquireRelativeParameters (void) |
Alignable * | alignableFromAlignableDet (const AlignableDetOrUnitPtr &alignableDet) const |
Obsolete: Use AlignableNavigator::alignableDetFromGeomDet and alignableFromAlignableDet. More... | |
const align::Alignables & | alignables (void) const |
get all alignables More... | |
AlignmentParameterStore (const align::Alignables &alis, const edm::ParameterSet &config) | |
constructor More... | |
void | applyAlignableAbsolutePositions (const align::Alignables &alis, const AlignablePositions &newpos, int &ierr) |
apply absolute positions to alignables More... | |
void | applyAlignableRelativePositions (const align::Alignables &alivec, const AlignableShifts &shifts, int &ierr) |
apply relative shifts to alignables More... | |
void | applyParameters (void) |
Obsolete: Use AlignableNavigator::alignableDetFromDetId and alignableFromAlignableDet. More... | |
void | applyParameters (Alignable *alignable) |
apply parameters of a given alignable More... | |
void | attachAlignmentParameters (const align::Alignables &alivec, const Parameters &parvec, int &ierr) |
Attach alignment parameters to given alignables. More... | |
void | attachAlignmentParameters (const Parameters &parvec, int &ierr) |
Attach alignment parameters to alignables. More... | |
void | attachCorrelations (const align::Alignables &alivec, const Correlations &cormap, bool overwrite, int &ierr) |
Attach correlations to given alignables. More... | |
void | attachCorrelations (const Correlations &cormap, bool overwrite, int &ierr) |
Attach correlations to alignables. More... | |
void | attachUserVariables (const align::Alignables &alivec, const std::vector< AlignmentUserVariables * > &uvarvec, int &ierr) |
Attach User Variables to given alignables. More... | |
void | cacheTransformations (void) |
cache the current position, rotation and other parameters More... | |
void | cacheTransformations (const align::RunNumber &) |
cache for the given run the current position, rotation and other parameters More... | |
AlignmentCorrelationsStore * | correlationsStore (void) const |
get full correlation map More... | |
bool | hierarchyConstraints (const Alignable *aliMaster, const align::Alignables &aliComps, std::vector< std::vector< ParameterId > > ¶mIdsVecOut, std::vector< std::vector< double > > &factorsVecOut, bool all, double epsilon) const |
const unsigned int | numCorrelations (void) const |
get number of correlations between alignables More... | |
int | numObjects (void) const |
returns number of alignables More... | |
void | resetParameters (void) |
reset parameters, correlations, user variables More... | |
void | resetParameters (Alignable *ali) |
reset parameters of a given alignable More... | |
void | restoreCachedTransformations (void) |
restore the previously cached position, rotation and other parameters More... | |
void | restoreCachedTransformations (const align::RunNumber &) |
restore for the given run the previously cached position, rotation and other parameters More... | |
CompositeAlignmentParameters | selectParameters (const std::vector< AlignableDet * > &alignabledets) const |
CompositeAlignmentParameters | selectParameters (const std::vector< AlignableDetOrUnitPtr > &alignabledets) const |
select parameters More... | |
CompositeAlignmentParameters | selectParameters (const std::vector< Alignable * > &alignables) const |
select parameters More... | |
void | setAlignmentPositionError (const align::Alignables &alivec, double valshift, double valrot) |
Set Alignment position error. More... | |
std::pair< int, int > | typeAndLayer (const Alignable *ali, const TrackerTopology *tTopo) const |
Obtain type and layer from Alignable. More... | |
void | updateParameters (const CompositeAlignmentParameters &aap, bool updateCorrelations=true) |
update parameters More... | |
align::Alignables | validAlignables (void) const |
get all alignables with valid parameters More... | |
virtual | ~AlignmentParameterStore () |
destructor More... | |
Protected Attributes | |
AlignmentCorrelationsStore * | theCorrelationsStore |
Private Types | |
enum | TypeOfConstraints { NONE, HIERARCHY_CONSTRAINTS, APPROX_AVERAGING_CONSTRAINTS } |
Private Attributes | |
align::Alignables | theAlignables |
alignables More... | |
TypeOfConstraints | theTypeOfConstraints |
type of constraints More... | |
Basic class for management of alignment parameters and correlations
(last update by
)
Definition at line 21 of file AlignmentParameterStore.h.
typedef std::map< std::pair<Alignable*,Alignable*>,AlgebraicMatrix > AlignmentParameterStore::Correlations |
Definition at line 27 of file AlignmentParameterStore.h.
typedef std::vector<unsigned int> AlignmentParameterStore::DetIds |
Definition at line 28 of file AlignmentParameterStore.h.
typedef std::pair<Alignable*, unsigned int> AlignmentParameterStore::ParameterId |
a single alignable parameter of an Alignable
Definition at line 134 of file AlignmentParameterStore.h.
typedef std::vector<AlignmentParameters*> AlignmentParameterStore::Parameters |
Definition at line 26 of file AlignmentParameterStore.h.
|
private |
Enumerator | |
---|---|
NONE | |
HIERARCHY_CONSTRAINTS | |
APPROX_AVERAGING_CONSTRAINTS |
Definition at line 161 of file AlignmentParameterStore.h.
AlignmentParameterStore::AlignmentParameterStore | ( | const align::Alignables & | alis, |
const edm::ParameterSet & | config | ||
) |
constructor
Definition at line 26 of file AlignmentParameterStore.cc.
References APPROX_AVERAGING_CONSTRAINTS, edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), HIERARCHY_CONSTRAINTS, NONE, AlCaHLTBitMon_QueryRunRegistry::string, theAlignables, theCorrelationsStore, and theTypeOfConstraints.
|
virtual |
destructor
Definition at line 60 of file AlignmentParameterStore.cc.
References theCorrelationsStore.
void AlignmentParameterStore::acquireRelativeParameters | ( | void | ) |
acquire shifts/rotations from alignables of the store and copy into alignment parameters (local frame)
Definition at line 378 of file AlignmentParameterStore.cc.
References Alignable::alignmentParameters(), RigidBodyAlignmentParameters::clone(), Alignable::displacement(), Exception, mps_fire::i, Alignable::rotation(), Alignable::setAlignmentParameters(), AlignmentParameters::size(), Alignable::surface(), theAlignables, align::toAngles(), AlignableSurface::toLocal(), TkRotation< T >::x(), and Basic3DVector< T >::y().
Alignable * AlignmentParameterStore::alignableFromAlignableDet | ( | const AlignableDetOrUnitPtr & | alignableDet | ) | const |
Obsolete: Use AlignableNavigator::alignableDetFromGeomDet and alignableFromAlignableDet.
get Alignable corresponding to given AlignableDet (non-const ref. argument since might be returned)
Definition at line 271 of file AlignmentParameterStore.cc.
References Alignable::alignmentParameters(), and Alignable::mother().
Referenced by selectParameters().
|
inline |
get all alignables
Definition at line 51 of file AlignmentParameterStore.h.
Referenced by AlignmentProducerBase::applyMisalignment(), AlignmentMonitorSurvey::book(), AlignmentMonitorTemplate::book(), AlignmentMonitorGeneric::book(), PedeSteerer::buildSubSteer(), SurveyAlignmentAlgorithm::initialize(), MuonMillepedeAlgorithm::initialize(), HIPAlignmentAlgorithm::initialize(), MuonDTLocalMillepedeAlgorithm::initialize(), CSCOverlapsAlignmentAlgorithm::initialize(), MuonAlignmentFromReference::initialize(), PedeSteerer::PedeSteerer(), selectParameters(), and updateParameters().
void AlignmentParameterStore::applyAlignableAbsolutePositions | ( | const align::Alignables & | alis, |
const AlignablePositions & | newpos, | ||
int & | ierr | ||
) |
apply absolute positions to alignables
Definition at line 431 of file AlignmentParameterStore.cc.
References Alignable::alignableObjectId(), applyAlignableRelativePositions(), runEdmFileComparison::found, Alignable::globalPosition(), Alignable::globalRotation(), Alignable::id(), LogDebug, Alignable::move(), TkRotation< T >::multiplyInverse(), align::rectify(), TkRotation< T >::rot, and Alignable::rotateInGlobalFrame().
Referenced by HIPAlignmentAlgorithm::startNewLoop(), and typeAndLayer().
void AlignmentParameterStore::applyAlignableRelativePositions | ( | const align::Alignables & | alivec, |
const AlignableShifts & | shifts, | ||
int & | ierr | ||
) |
apply relative shifts to alignables
Definition at line 492 of file AlignmentParameterStore.cc.
References Alignable::alignableObjectId(), runEdmFileComparison::found, mps_fire::i, Alignable::id(), LogDebug, Alignable::move(), and Alignable::rotateInGlobalFrame().
Referenced by applyAlignableAbsolutePositions().
void AlignmentParameterStore::applyParameters | ( | void | ) |
Obsolete: Use AlignableNavigator::alignableDetFromDetId and alignableFromAlignableDet.
apply all valid parameters to their alignables
Definition at line 284 of file AlignmentParameterStore.cc.
References theAlignables.
Referenced by CSCAlignmentCorrections::applyAlignment(), MuonAlignmentFromReference::fitAndAlign(), CSCChamberFitter::radiusCorrection(), MillePedeAlignmentAlgorithm::setParametersForRunRange(), MuonMillepedeAlgorithm::terminate(), and HIPAlignmentAlgorithm::terminate().
void AlignmentParameterStore::applyParameters | ( | Alignable * | alignable | ) |
apply parameters of a given alignable
Definition at line 293 of file AlignmentParameterStore.cc.
References Alignable::alignmentParameters(), AlignmentParameters::apply(), and Exception.
void AlignmentParameterStore::attachAlignmentParameters | ( | const align::Alignables & | alivec, |
const Parameters & | parvec, | ||
int & | ierr | ||
) |
Attach alignment parameters to given alignables.
Definition at line 546 of file AlignmentParameterStore.cc.
References AlignmentParameters::alignable(), runEdmFileComparison::found, and LogDebug.
Referenced by attachAlignmentParameters().
void AlignmentParameterStore::attachAlignmentParameters | ( | const Parameters & | parvec, |
int & | ierr | ||
) |
Attach alignment parameters to alignables.
Definition at line 538 of file AlignmentParameterStore.cc.
References attachAlignmentParameters(), and theAlignables.
void AlignmentParameterStore::attachCorrelations | ( | const align::Alignables & | alivec, |
const Correlations & | cormap, | ||
bool | overwrite, | ||
int & | ierr | ||
) |
Attach correlations to given alignables.
Definition at line 594 of file AlignmentParameterStore.cc.
References attachUserVariables(), AlignmentCorrelationsStore::correlationsAvailable(), spr::find(), LogDebug, AlignmentCorrelationsStore::setCorrelations(), and theCorrelationsStore.
Referenced by attachCorrelations().
void AlignmentParameterStore::attachCorrelations | ( | const Correlations & | cormap, |
bool | overwrite, | ||
int & | ierr | ||
) |
Attach correlations to alignables.
Definition at line 586 of file AlignmentParameterStore.cc.
References attachCorrelations(), and theAlignables.
void AlignmentParameterStore::attachUserVariables | ( | const align::Alignables & | alivec, |
const std::vector< AlignmentUserVariables * > & | uvarvec, | ||
int & | ierr | ||
) |
Attach User Variables to given alignables.
Definition at line 631 of file AlignmentParameterStore.cc.
References LogDebug, and AlignmentParameters::setUserVariables().
Referenced by attachCorrelations(), and HIPAlignmentAlgorithm::collector().
void AlignmentParameterStore::cacheTransformations | ( | void | ) |
cache the current position, rotation and other parameters
Definition at line 346 of file AlignmentParameterStore.cc.
References theAlignables.
Referenced by MillePedeAlignmentAlgorithm::beginRun(), and MillePedeAlignmentAlgorithm::terminate().
void AlignmentParameterStore::cacheTransformations | ( | const align::RunNumber & | run | ) |
cache for the given run the current position, rotation and other parameters
Definition at line 355 of file AlignmentParameterStore.cc.
References theAlignables.
|
inline |
get full correlation map
Definition at line 60 of file AlignmentParameterStore.h.
bool AlignmentParameterStore::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 |
Assuming aliMaster has (sub-)components aliComps with alignment parameters (cf. Alignable::firstParamComponents), paramIdsVecOut and factorsVecOut will be filled (in parallel) with constraints on the selected alignment parameters of aliMaster to get rid of the additionally introduced degrees of freedom: The 'vector product' of the parameters identified by ParameterId in std::vector<ParameterId> and the factors in std::vector<double> has to vanish (i.e. == 0.), |factor| < epsilon will be treated as 0. If all == false, skip constraint on aliMaster's degree of freedom 'i' if 'i'th alignment parameter of aliMaster is not selected, i.e. constrain only for otherwise doubled d.o.f. If all == true, produce one constraint for each of the aliMaster's parameters irrespective of whether they are selecte dor not. paramIdsVecOut and factorsVecOut contain exactly one std::vector per selected alignment parameter of aliMaster, but in principle these can be empty... Note that not all combinations of AlignmentParameters classes ar supported. If not there will be an exception (and false returned...)
Definition at line 684 of file AlignmentParameterStore.cc.
References Alignable::alignmentParameters(), APPROX_AVERAGING_CONSTRAINTS, Exception, HIERARCHY_CONSTRAINTS, ParametersToParametersDerivatives::isOK(), AlignmentParameters::selector(), and theTypeOfConstraints.
Referenced by PedeSteerer::hierarchyConstraint(), and setAlignmentPositionError().
|
inline |
get number of correlations between alignables
Definition at line 63 of file AlignmentParameterStore.h.
|
inline |
returns number of alignables
Definition at line 57 of file AlignmentParameterStore.h.
void AlignmentParameterStore::resetParameters | ( | void | ) |
reset parameters, correlations, user variables
Definition at line 306 of file AlignmentParameterStore.cc.
References AlignmentCorrelationsStore::resetCorrelations(), theAlignables, and theCorrelationsStore.
Referenced by MillePedeAlignmentAlgorithm::setParametersForRunRange().
void AlignmentParameterStore::resetParameters | ( | Alignable * | ali | ) |
reset parameters of a given alignable
Definition at line 319 of file AlignmentParameterStore.cc.
References Alignable::alignmentParameters(), AlignmentParameters::cloneFromSelected(), AlignmentParameters::numSelected(), Alignable::setAlignmentParameters(), and AlignmentParameters::setValid().
void AlignmentParameterStore::restoreCachedTransformations | ( | void | ) |
restore the previously cached position, rotation and other parameters
Definition at line 362 of file AlignmentParameterStore.cc.
References theAlignables.
Referenced by MillePedeAlignmentAlgorithm::setParametersForRunRange(), and MillePedeAlignmentAlgorithm::terminate().
void AlignmentParameterStore::restoreCachedTransformations | ( | const align::RunNumber & | run | ) |
restore for the given run the previously cached position, rotation and other parameters
Definition at line 371 of file AlignmentParameterStore.cc.
References theAlignables.
CompositeAlignmentParameters AlignmentParameterStore::selectParameters | ( | const std::vector< AlignableDet * > & | alignabledets | ) | const |
select parameters (for backward compatibility, use with vector<AlignableDetOrUnitPtr> as argument instead)
Definition at line 67 of file AlignmentParameterStore.cc.
Referenced by MuonMillepedeAlgorithm::run(), HIPAlignmentAlgorithm::run(), and selectParameters().
CompositeAlignmentParameters AlignmentParameterStore::selectParameters | ( | const std::vector< AlignableDetOrUnitPtr > & | alignabledets | ) | const |
select parameters
Definition at line 81 of file AlignmentParameterStore.cc.
References alignableFromAlignableDet(), alignables(), Alignable::alignmentParameters(), AlignmentCorrelationsStore::correlations(), data, spr::find(), AlignmentParameters::numSelected(), AlignmentParameters::selectedCovariance(), AlignmentParameters::selectedParameters(), selectParameters(), and theCorrelationsStore.
CompositeAlignmentParameters AlignmentParameterStore::selectParameters | ( | const std::vector< Alignable * > & | alignables | ) | const |
select parameters
void AlignmentParameterStore::setAlignmentPositionError | ( | const align::Alignables & | alivec, |
double | valshift, | ||
double | valrot | ||
) |
Set Alignment position error.
Definition at line 651 of file AlignmentParameterStore.cc.
References Alignable::addAlignmentPositionError(), Alignable::addAlignmentPositionErrorFromRotation(), hierarchyConstraints(), mps_fire::i, LogDebug, alignCSCRings::r, Alignable::setAlignmentPositionError(), and align::toMatrix().
Referenced by MuonAlignmentFromReference::fitAndAlign(), MuonAlignmentFromReference::initialize(), and HIPAlignmentAlgorithm::setAlignmentPositionError().
std::pair< int, int > AlignmentParameterStore::typeAndLayer | ( | const Alignable * | ali, |
const TrackerTopology * | tTopo | ||
) | const |
Obtain type and layer from Alignable.
Definition at line 423 of file AlignmentParameterStore.cc.
References applyAlignableAbsolutePositions(), Alignable::id(), and TrackerAlignableId::typeAndLayerFromDetId().
Referenced by HIPAlignmentAlgorithm::fillRoot(), and HIPAlignmentAlgorithm::terminate().
void AlignmentParameterStore::updateParameters | ( | const CompositeAlignmentParameters & | aap, |
bool | updateCorrelations = true |
||
) |
update parameters
Definition at line 219 of file AlignmentParameterStore.cc.
References alignables(), AlignmentParameters::cloneFromSelected(), CompositeAlignmentParameters::components(), CompositeAlignmentParameters::covariance(), AlignmentParameters::numSelected(), CompositeAlignmentParameters::parameters(), metProducer_cfi::parameters, AlignmentCorrelationsStore::setCorrelations(), and theCorrelationsStore.
align::Alignables AlignmentParameterStore::validAlignables | ( | void | ) | const |
get all alignables with valid parameters
Definition at line 257 of file AlignmentParameterStore.cc.
References LogDebug, mps_fire::result, and theAlignables.
|
private |
alignables
Definition at line 166 of file AlignmentParameterStore.h.
Referenced by acquireRelativeParameters(), AlignmentParameterStore(), applyParameters(), attachAlignmentParameters(), attachCorrelations(), cacheTransformations(), resetParameters(), restoreCachedTransformations(), and validAlignables().
|
protected |
Definition at line 158 of file AlignmentParameterStore.h.
Referenced by AlignmentParameterStore(), attachCorrelations(), resetParameters(), selectParameters(), updateParameters(), and ~AlignmentParameterStore().
|
private |
type of constraints
Definition at line 169 of file AlignmentParameterStore.h.
Referenced by AlignmentParameterStore(), and hierarchyConstraints().