#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 (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... | |
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... | |
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 |
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 Attributes | |
align::Alignables | theAlignables |
alignables More... | |
Basic class for management of alignment parameters and correlations
(last update by
)
Definition at line 20 of file AlignmentParameterStore.h.
typedef std::map< std::pair<Alignable*,Alignable*>,AlgebraicMatrix > AlignmentParameterStore::Correlations |
Definition at line 26 of file AlignmentParameterStore.h.
typedef std::vector<unsigned int> AlignmentParameterStore::DetIds |
Definition at line 27 of file AlignmentParameterStore.h.
typedef std::pair<Alignable*, unsigned int> AlignmentParameterStore::ParameterId |
a single alignable parameter of an Alignable
Definition at line 127 of file AlignmentParameterStore.h.
typedef std::vector<AlignmentParameters*> AlignmentParameterStore::Parameters |
Definition at line 25 of file AlignmentParameterStore.h.
AlignmentParameterStore::AlignmentParameterStore | ( | const align::Alignables & | alis, |
const edm::ParameterSet & | config | ||
) |
constructor
Definition at line 26 of file AlignmentParameterStore.cc.
References edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), theAlignables, and theCorrelationsStore.
|
virtual |
destructor
Definition at line 42 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 344 of file AlignmentParameterStore.cc.
References Alignable::alignmentParameters(), RigidBodyAlignmentParameters::clone(), Alignable::displacement(), edm::hlt::Exception, i, Alignable::rotation(), Alignable::setAlignmentParameters(), AlignmentParameters::size(), Alignable::surface(), theAlignables, align::toAngles(), AlignableSurface::toLocal(), TkRotation< T >::x(), and Basic3DVector< T >::y().
Alignable * AlignmentParameterStore::alignableFromAlignableDet | ( | 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 253 of file AlignmentParameterStore.cc.
References Alignable::alignmentParameters(), and Alignable::mother().
Referenced by KalmanAlignmentUpdator::alignablesFromAlignableDets(), and selectParameters().
|
inline |
get all alignables
Definition at line 50 of file AlignmentParameterStore.h.
References theAlignables.
Referenced by AlignmentMonitorSurvey::book(), AlignmentMonitorTemplate::book(), AlignmentMonitorGeneric::book(), PedeSteerer::buildSubSteer(), SurveyAlignmentAlgorithm::initialize(), MuonMillepedeAlgorithm::initialize(), HIPAlignmentAlgorithm::initialize(), MuonDTLocalMillepedeAlgorithm::initialize(), MillePedeAlignmentAlgorithm::initialize(), CSCOverlapsAlignmentAlgorithm::initialize(), MuonAlignmentFromReference::initialize(), PedeSteerer::PedeSteerer(), and selectParameters().
void AlignmentParameterStore::applyAlignableAbsolutePositions | ( | const align::Alignables & | alis, |
const AlignablePositions & | newpos, | ||
int & | ierr | ||
) |
apply absolute positions to alignables
Definition at line 397 of file AlignmentParameterStore.cc.
References Alignable::alignableObjectId(), newFWLiteAna::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().
void AlignmentParameterStore::applyAlignableRelativePositions | ( | const align::Alignables & | alivec, |
const AlignableShifts & | shifts, | ||
int & | ierr | ||
) |
apply relative shifts to alignables
Definition at line 458 of file AlignmentParameterStore.cc.
References Alignable::alignableObjectId(), newFWLiteAna::found, i, Alignable::id(), LogDebug, Alignable::move(), and Alignable::rotateInGlobalFrame().
void AlignmentParameterStore::applyParameters | ( | void | ) |
Obsolete: Use AlignableNavigator::alignableDetFromDetId and alignableFromAlignableDet.
apply all valid parameters to their alignables
Definition at line 265 of file AlignmentParameterStore.cc.
References theAlignables.
Referenced by CSCAlignmentCorrections::applyAlignment(), MuonAlignmentFromReference::fitAndAlign(), MillePedeAlignmentAlgorithm::initialize(), CSCChamberFitter::radiusCorrection(), MillePedeAlignmentAlgorithm::setParametersForRunRange(), MuonMillepedeAlgorithm::terminate(), and HIPAlignmentAlgorithm::terminate().
void AlignmentParameterStore::applyParameters | ( | Alignable * | alignable | ) |
apply parameters of a given alignable
Definition at line 274 of file AlignmentParameterStore.cc.
References Alignable::alignmentParameters(), AlignmentParameters::apply(), and edm::hlt::Exception.
void AlignmentParameterStore::attachAlignmentParameters | ( | const align::Alignables & | alivec, |
const Parameters & | parvec, | ||
int & | ierr | ||
) |
Attach alignment parameters to given alignables.
Definition at line 512 of file AlignmentParameterStore.cc.
References AlignmentParameters::alignable(), newFWLiteAna::found, and LogDebug.
Referenced by attachAlignmentParameters().
void AlignmentParameterStore::attachAlignmentParameters | ( | const Parameters & | parvec, |
int & | ierr | ||
) |
Attach alignment parameters to alignables.
Definition at line 504 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 560 of file AlignmentParameterStore.cc.
References 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 552 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 597 of file AlignmentParameterStore.cc.
References LogDebug, and AlignmentParameters::setUserVariables().
Referenced by HIPAlignmentAlgorithm::collector().
void AlignmentParameterStore::cacheTransformations | ( | void | ) |
cache the current position, rotation and other parameters
Definition at line 327 of file AlignmentParameterStore.cc.
References theAlignables.
Referenced by MillePedeAlignmentAlgorithm::terminate().
|
inline |
get full correlation map
Definition at line 59 of file AlignmentParameterStore.h.
References theCorrelationsStore.
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 650 of file AlignmentParameterStore.cc.
References Alignable::alignmentParameters(), edm::hlt::Exception, ParametersToParametersDerivatives::isOK(), and AlignmentParameters::selector().
Referenced by PedeSteerer::hierarchyConstraint().
|
inline |
get number of correlations between alignables
Definition at line 62 of file AlignmentParameterStore.h.
References AlignmentCorrelationsStore::size(), and theCorrelationsStore.
Referenced by SingleTrajectoryUpdator::process().
|
inline |
returns number of alignables
Definition at line 56 of file AlignmentParameterStore.h.
References theAlignables.
void AlignmentParameterStore::resetParameters | ( | void | ) |
reset parameters, correlations, user variables
Definition at line 287 of file AlignmentParameterStore.cc.
References AlignmentCorrelationsStore::resetCorrelations(), theAlignables, and theCorrelationsStore.
Referenced by MillePedeAlignmentAlgorithm::initialize(), and MillePedeAlignmentAlgorithm::setParametersForRunRange().
void AlignmentParameterStore::resetParameters | ( | Alignable * | ali | ) |
reset parameters of a given alignable
Definition at line 300 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 336 of file AlignmentParameterStore.cc.
References theAlignables.
Referenced by MillePedeAlignmentAlgorithm::setParametersForRunRange().
CompositeAlignmentParameters AlignmentParameterStore::selectParameters | ( | const std::vector< AlignableDet * > & | alignabledets | ) | const |
select parameters (for backward compatibility, use with vector<AlignableDetOrUnitPtr> as argument instead)
Definition at line 49 of file AlignmentParameterStore.cc.
Referenced by SingleTrajectoryUpdator::process(), MuonMillepedeAlgorithm::run(), and HIPAlignmentAlgorithm::run().
CompositeAlignmentParameters AlignmentParameterStore::selectParameters | ( | const std::vector< AlignableDetOrUnitPtr > & | alignabledets | ) | const |
select parameters
Definition at line 63 of file AlignmentParameterStore.cc.
References alignableFromAlignableDet(), alignables(), Alignable::alignmentParameters(), AlignmentCorrelationsStore::correlations(), data, spr::find(), AlignmentParameters::numSelected(), AlignmentParameters::selectedCovariance(), AlignmentParameters::selectedParameters(), 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 617 of file AlignmentParameterStore.cc.
References Alignable::addAlignmentPositionError(), Alignable::addAlignmentPositionErrorFromRotation(), 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 |
Obtain type and layer from Alignable.
Definition at line 389 of file AlignmentParameterStore.cc.
References Alignable::id(), and TrackerAlignableId::typeAndLayerFromDetId().
Referenced by HIPAlignmentAlgorithm::fillRoot().
void AlignmentParameterStore::updateParameters | ( | const CompositeAlignmentParameters & | aap, |
bool | updateCorrelations = true |
||
) |
update parameters
Definition at line 201 of file AlignmentParameterStore.cc.
References AlignmentParameters::cloneFromSelected(), CompositeAlignmentParameters::components(), CompositeAlignmentParameters::covariance(), AlignmentParameters::numSelected(), Parameters::parameters, CompositeAlignmentParameters::parameters(), AlignmentCorrelationsStore::setCorrelations(), and theCorrelationsStore.
Referenced by SingleTrajectoryUpdator::process().
align::Alignables AlignmentParameterStore::validAlignables | ( | void | ) | const |
get all alignables with valid parameters
Definition at line 239 of file AlignmentParameterStore.cc.
References LogDebug, query::result, and theAlignables.
|
private |
alignables
Definition at line 157 of file AlignmentParameterStore.h.
Referenced by acquireRelativeParameters(), alignables(), AlignmentParameterStore(), applyParameters(), attachAlignmentParameters(), attachCorrelations(), cacheTransformations(), numObjects(), resetParameters(), restoreCachedTransformations(), and validAlignables().
|
protected |
Definition at line 151 of file AlignmentParameterStore.h.
Referenced by AlignmentParameterStore(), attachCorrelations(), correlationsStore(), numCorrelations(), resetParameters(), selectParameters(), updateParameters(), and ~AlignmentParameterStore().