#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... | |
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 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 128 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 155 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 363 of file AlignmentParameterStore.cc.
References Alignable::alignmentParameters(), RigidBodyAlignmentParameters::clone(), Alignable::displacement(), 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 | ( | 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.
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 416 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 477 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 284 of file AlignmentParameterStore.cc.
References theAlignables.
Referenced by CSCAlignmentCorrections::applyAlignment(), MuonAlignmentFromReference::fitAndAlign(), MillePedeAlignmentAlgorithm::initialize(), CSCChamberFitter::radiusCorrection(), MillePedeAlignmentAlgorithm::setParametersForRunRange(), HIPAlignmentAlgorithm::terminate(), and MuonMillepedeAlgorithm::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 531 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 523 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 579 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 571 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 616 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 346 of file AlignmentParameterStore.cc.
References theAlignables.
Referenced by MillePedeAlignmentAlgorithm::terminate().
|
inline |
get full correlation map
Definition at line 60 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 669 of file AlignmentParameterStore.cc.
References Alignable::alignmentParameters(), Exception, ParametersToParametersDerivatives::isOK(), and AlignmentParameters::selector().
Referenced by PedeSteerer::hierarchyConstraint().
|
inline |
get number of correlations between alignables
Definition at line 63 of file AlignmentParameterStore.h.
References AlignmentCorrelationsStore::size(), and theCorrelationsStore.
|
inline |
returns number of alignables
Definition at line 57 of file AlignmentParameterStore.h.
References theAlignables.
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::initialize(), and 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 355 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 67 of file AlignmentParameterStore.cc.
Referenced by MuonMillepedeAlgorithm::run(), and HIPAlignmentAlgorithm::run().
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(), 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 636 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 TrackerTopology * | tTopo | ||
) | const |
Obtain type and layer from Alignable.
Definition at line 408 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 219 of file AlignmentParameterStore.cc.
References AlignmentParameters::cloneFromSelected(), CompositeAlignmentParameters::components(), CompositeAlignmentParameters::covariance(), AlignmentParameters::numSelected(), CompositeAlignmentParameters::parameters(), HLT_FULL_cff::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, query::result, and theAlignables.
|
private |
alignables
Definition at line 160 of file AlignmentParameterStore.h.
Referenced by acquireRelativeParameters(), alignables(), AlignmentParameterStore(), applyParameters(), attachAlignmentParameters(), attachCorrelations(), cacheTransformations(), numObjects(), resetParameters(), restoreCachedTransformations(), and validAlignables().
|
protected |
Definition at line 152 of file AlignmentParameterStore.h.
Referenced by AlignmentParameterStore(), attachCorrelations(), correlationsStore(), numCorrelations(), resetParameters(), selectParameters(), updateParameters(), and ~AlignmentParameterStore().
|
private |
type of constraints
Definition at line 163 of file AlignmentParameterStore.h.
Referenced by AlignmentParameterStore().