#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 align::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 23 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 128 of file AlignmentParameterStore.h.
typedef std::vector<AlignmentParameters*> AlignmentParameterStore::Parameters |
Definition at line 25 of file AlignmentParameterStore.h.
|
private |
Enumerator | |
---|---|
NONE | |
HIERARCHY_CONSTRAINTS | |
APPROX_AVERAGING_CONSTRAINTS |
Definition at line 156 of file AlignmentParameterStore.h.
AlignmentParameterStore::AlignmentParameterStore | ( | const align::Alignables & | alis, |
const edm::ParameterSet & | config | ||
) |
constructor
Definition at line 29 of file AlignmentParameterStore.cc.
References APPROX_AVERAGING_CONSTRAINTS, HIERARCHY_CONSTRAINTS, NONE, AlCaHLTBitMon_QueryRunRegistry::string, theAlignables, theCorrelationsStore, and theTypeOfConstraints.
|
virtual |
destructor
Definition at line 62 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 329 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 242 of file AlignmentParameterStore.cc.
References Alignable::alignmentParameters(), and Alignable::mother().
Referenced by selectParameters().
|
inline |
get all alignables
Definition at line 47 of file AlignmentParameterStore.h.
References theAlignables.
Referenced by AlignmentMonitorSurvey::book(), AlignmentMonitorGeneric::book(), AlignmentMonitorTemplate::book(), PedeSteerer::buildSubSteer(), SurveyAlignmentAlgorithm::initialize(), HIPAlignmentAlgorithm::initialize(), CSCOverlapsAlignmentAlgorithm::initialize(), MillePedeAlignmentAlgorithm::initialize(), MuonAlignmentFromReference::initialize(), selectParameters(), and updateParameters().
void AlignmentParameterStore::applyAlignableAbsolutePositions | ( | const align::Alignables & | alis, |
const AlignablePositions & | newpos, | ||
int & | ierr | ||
) |
apply absolute positions to alignables
Definition at line 373 of file AlignmentParameterStore.cc.
References Alignable::addSurfaceDeformation(), Alignable::alignableObjectId(), SurfaceDeformationFactory::create(), isotrackApplyRegressor::dtype, newFWLiteAna::found, Alignable::globalPosition(), Alignable::globalRotation(), mps_fire::i, Alignable::id(), SurfaceDeformationFactory::kNoDeformations, LogDebug, Alignable::move(), TkRotation< T >::multiplyInverse(), SurfaceDeformation::parameters(), align::rectify(), TkRotation< T >::rot, Alignable::rotateInGlobalFrame(), Alignable::surfaceDeformationIdPairs(), SurfaceDeformationFactory::surfaceDeformationTypeName(), and SurfaceDeformation::type().
Referenced by HIPAlignmentAlgorithm::startNewLoop().
void AlignmentParameterStore::applyAlignableRelativePositions | ( | const align::Alignables & | alivec, |
const AlignableShifts & | shifts, | ||
int & | ierr | ||
) |
apply relative shifts to alignables
Definition at line 470 of file AlignmentParameterStore.cc.
References Alignable::addSurfaceDeformation(), Alignable::alignableObjectId(), SurfaceDeformationFactory::create(), isotrackApplyRegressor::dtype, newFWLiteAna::found, mps_fire::i, Alignable::id(), SurfaceDeformationFactory::kNoDeformations, LogDebug, Alignable::move(), SurfaceDeformation::parameters(), Alignable::rotateInGlobalFrame(), Alignable::surfaceDeformationIdPairs(), SurfaceDeformationFactory::surfaceDeformationTypeName(), and SurfaceDeformation::type().
void AlignmentParameterStore::applyParameters | ( | void | ) |
Obsolete: Use AlignableNavigator::alignableDetFromDetId and alignableFromAlignableDet.
apply all valid parameters to their alignables
Definition at line 255 of file AlignmentParameterStore.cc.
References theAlignables.
Referenced by CSCAlignmentCorrections::applyAlignment(), MuonAlignmentFromReference::fitAndAlign(), MillePedeAlignmentAlgorithm::initialize(), CSCChamberFitter::radiusCorrection(), MillePedeAlignmentAlgorithm::setParametersForRunRange(), and HIPAlignmentAlgorithm::terminate().
void AlignmentParameterStore::applyParameters | ( | Alignable * | alignable | ) |
apply parameters of a given alignable
Definition at line 262 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 556 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 551 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 598 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 593 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 629 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 303 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 310 of file AlignmentParameterStore.cc.
References writedatasetfile::run, and theAlignables.
|
inline |
get full correlation map
Definition at line 56 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 680 of file AlignmentParameterStore.cc.
References Alignable::alignmentParameters(), python.cmstools::all(), APPROX_AVERAGING_CONSTRAINTS, geometryDiff::epsilon, Exception, HIERARCHY_CONSTRAINTS, ParametersToParametersDerivatives::isOK(), AlignmentParameters::selector(), and theTypeOfConstraints.
Referenced by PedeSteerer::hierarchyConstraint().
|
inline |
get number of correlations between alignables
Definition at line 59 of file AlignmentParameterStore.h.
References AlignmentCorrelationsStore::size(), and theCorrelationsStore.
|
inline |
returns number of alignables
Definition at line 53 of file AlignmentParameterStore.h.
References theAlignables.
void AlignmentParameterStore::resetParameters | ( | void | ) |
reset parameters, correlations, user variables
Definition at line 271 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 282 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 316 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 323 of file AlignmentParameterStore.cc.
References writedatasetfile::run, and 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 65 of file AlignmentParameterStore.cc.
References ALPAKA_ACCELERATOR_NAMESPACE::vertexFinder::it.
Referenced by HIPAlignmentAlgorithm::run().
CompositeAlignmentParameters AlignmentParameterStore::selectParameters | ( | const std::vector< AlignableDetOrUnitPtr > & | alignabledets | ) | const |
select parameters
Definition at line 78 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 align::Alignables & | alignables | ) | const |
select parameters
Definition at line 141 of file AlignmentParameterStore.cc.
References alignables(), AlignmentCorrelationsStore::correlations(), data, spr::find(), AlignmentParameters::numSelected(), AlignmentParameters::selectedCovariance(), AlignmentParameters::selectedParameters(), and theCorrelationsStore.
void AlignmentParameterStore::setAlignmentPositionError | ( | const align::Alignables & | alivec, |
double | valshift, | ||
double | valrot | ||
) |
Set Alignment position error.
Definition at line 646 of file AlignmentParameterStore.cc.
References Alignable::addAlignmentPositionError(), Alignable::addAlignmentPositionErrorFromRotation(), 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 368 of file AlignmentParameterStore.cc.
References Alignable::id(), and TrackerAlignableId::typeAndLayerFromDetId().
Referenced by HIPAlignmentAlgorithm::fillAlignablesMonitor(), and HIPAlignmentAlgorithm::terminate().
void AlignmentParameterStore::updateParameters | ( | const CompositeAlignmentParameters & | aap, |
bool | updateCorrelations = true |
||
) |
update parameters
Definition at line 199 of file AlignmentParameterStore.cc.
References alignables(), AlignmentParameters::cloneFromSelected(), CompositeAlignmentParameters::components(), CompositeAlignmentParameters::covariance(), ALPAKA_ACCELERATOR_NAMESPACE::vertexFinder::it, AlignmentParameters::numSelected(), CompositeAlignmentParameters::parameters(), AlignmentCorrelationsStore::setCorrelations(), and theCorrelationsStore.
align::Alignables AlignmentParameterStore::validAlignables | ( | void | ) | const |
get all alignables with valid parameters
Definition at line 230 of file AlignmentParameterStore.cc.
References LogDebug, mps_fire::result, and theAlignables.
|
private |
alignables
Definition at line 161 of file AlignmentParameterStore.h.
Referenced by acquireRelativeParameters(), alignables(), AlignmentParameterStore(), applyParameters(), attachAlignmentParameters(), attachCorrelations(), cacheTransformations(), numObjects(), resetParameters(), restoreCachedTransformations(), and validAlignables().
|
protected |
Definition at line 153 of file AlignmentParameterStore.h.
Referenced by AlignmentParameterStore(), attachCorrelations(), correlationsStore(), numCorrelations(), resetParameters(), selectParameters(), updateParameters(), and ~AlignmentParameterStore().
|
private |
type of constraints
Definition at line 164 of file AlignmentParameterStore.h.
Referenced by AlignmentParameterStore(), and hierarchyConstraints().