CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Protected Attributes | Private Types | Private Attributes
AlignmentParameterStore Class Reference

#include <AlignmentParameterStore.h>

Public Types

typedef std::map< std::pair< Alignable *, Alignable * >, AlgebraicMatrixCorrelations
 
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)
 
AlignablealignableFromAlignableDet (const AlignableDetOrUnitPtr &alignableDet) const
 Obsolete: Use AlignableNavigator::alignableDetFromGeomDet and alignableFromAlignableDet. More...
 
const align::Alignablesalignables (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 (Alignable *alignable)
 apply parameters of a given alignable More...
 
void applyParameters (void)
 Obsolete: Use AlignableNavigator::alignableDetFromDetId and alignableFromAlignableDet. 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 (const align::RunNumber &)
 cache for the given run the current position, rotation and other parameters More...
 
void cacheTransformations (void)
 cache the current position, rotation and other parameters More...
 
AlignmentCorrelationsStorecorrelationsStore (void) const
 get full correlation map More...
 
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
 
const unsigned int numCorrelations (void) const
 get number of correlations between alignables More...
 
int numObjects (void) const
 returns number of alignables More...
 
void resetParameters (Alignable *ali)
 reset parameters of a given alignable More...
 
void resetParameters (void)
 reset parameters, correlations, user variables More...
 
void restoreCachedTransformations (const align::RunNumber &)
 restore for the given run the previously cached position, rotation and other parameters More...
 
void restoreCachedTransformations (void)
 restore the previously cached position, rotation and other parameters More...
 
CompositeAlignmentParameters selectParameters (const align::Alignables &) const
 select parameters More...
 
CompositeAlignmentParameters selectParameters (const std::vector< AlignableDet * > &alignabledets) const
 
CompositeAlignmentParameters selectParameters (const std::vector< AlignableDetOrUnitPtr > &alignabledets) 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

AlignmentCorrelationsStoretheCorrelationsStore
 

Private Types

enum  TypeOfConstraints { NONE, HIERARCHY_CONSTRAINTS, APPROX_AVERAGING_CONSTRAINTS }
 

Private Attributes

align::Alignables theAlignables
 alignables More...
 
TypeOfConstraints theTypeOfConstraints
 type of constraints More...
 

Detailed Description

Basic class for management of alignment parameters and correlations

Date
2011/05/23 20:50:31
Revision
1.19

(last update by

Author
mussgill

)

Definition at line 23 of file AlignmentParameterStore.h.

Member Typedef Documentation

◆ Correlations

Definition at line 26 of file AlignmentParameterStore.h.

◆ DetIds

typedef std::vector<unsigned int> AlignmentParameterStore::DetIds

Definition at line 27 of file AlignmentParameterStore.h.

◆ ParameterId

typedef std::pair<Alignable*, unsigned int> AlignmentParameterStore::ParameterId

a single alignable parameter of an Alignable

Definition at line 128 of file AlignmentParameterStore.h.

◆ Parameters

Definition at line 25 of file AlignmentParameterStore.h.

Member Enumeration Documentation

◆ TypeOfConstraints

Enumerator
NONE 
HIERARCHY_CONSTRAINTS 
APPROX_AVERAGING_CONSTRAINTS 

Definition at line 156 of file AlignmentParameterStore.h.

Constructor & Destructor Documentation

◆ AlignmentParameterStore()

AlignmentParameterStore::AlignmentParameterStore ( const align::Alignables alis,
const edm::ParameterSet config 
)

constructor

Definition at line 29 of file AlignmentParameterStore.cc.

30  : theAlignables(alis) {
31  if (config.getUntrackedParameter<bool>("UseExtendedCorrelations")) {
33  new AlignmentExtendedCorrelationsStore(config.getParameter<edm::ParameterSet>("ExtendedCorrelationsConfig"));
34  } else {
36  }
37 
38  edm::LogInfo("Alignment") << "@SUB=AlignmentParameterStore"
39  << "Created with " << theAlignables.size() << " alignables.";
40 
41  // set hierarchy vs averaging constraints
43  const std::string cfgStrTypeOfConstraints(config.getParameter<std::string>("TypeOfConstraints"));
44  if (cfgStrTypeOfConstraints == "hierarchy") {
46  } else if (cfgStrTypeOfConstraints == "approximate_averaging") {
48  edm::LogWarning("Alignment")
49  << "@SUB=AlignmentParameterStore"
50  << "\n\n\n******* WARNING ******************************************\n"
51  << "Using approximate implementation of averaging constraints."
52  << "This is not recommended."
53  << "Consider to use 'hierarchy' constraints:"
54  << " AlignmentProducer.ParameterStore.TypeOfConstraints = cms.string('hierarchy')\n\n\n";
55  } else {
56  edm::LogError("BadArgument") << "@SUB=AlignmentParameterStore"
57  << "Unknown type of hierarchy constraints '" << cfgStrTypeOfConstraints << "'";
58  }
59 }

References APPROX_AVERAGING_CONSTRAINTS, HIERARCHY_CONSTRAINTS, NONE, AlCaHLTBitMon_QueryRunRegistry::string, theAlignables, theCorrelationsStore, and theTypeOfConstraints.

◆ ~AlignmentParameterStore()

AlignmentParameterStore::~AlignmentParameterStore ( )
virtual

destructor

Definition at line 62 of file AlignmentParameterStore.cc.

62 { delete theCorrelationsStore; }

References theCorrelationsStore.

Member Function Documentation

◆ acquireRelativeParameters()

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.

329  {
330  unsigned int nAlignables = theAlignables.size();
331 
332  for (unsigned int i = 0; i < nAlignables; ++i) {
333  Alignable* ali = theAlignables[i];
334 
335  RigidBodyAlignmentParameters* ap = dynamic_cast<RigidBodyAlignmentParameters*>(ali->alignmentParameters());
336 
337  if (!ap)
338  throw cms::Exception("BadAlignable") << "acquireRelativeParameters: "
339  << "provided alignable does not have rigid body alignment parameters";
340 
341  AlgebraicVector par(ap->size(), 0);
342  AlgebraicSymMatrix cov(ap->size(), 0);
343 
344  // Get displacement and transform global->local
345  align::LocalVector dloc = ali->surface().toLocal(ali->displacement());
346  par[0] = dloc.x();
347  par[1] = dloc.y();
348  par[2] = dloc.z();
349 
350  // Transform to local euler angles
352  par[3] = euloc(1);
353  par[4] = euloc(2);
354  par[5] = euloc(3);
355 
356  // Clone parameters
357  RigidBodyAlignmentParameters* apnew = ap->clone(par, cov);
358 
359  ali->setAlignmentParameters(apnew);
360  }
361 }

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().

◆ alignableFromAlignableDet()

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.

242  {
243  AlignableDetOrUnitPtr alignableDet = _alignableDet;
244  Alignable* mother = alignableDet;
245  while (mother) {
246  if (mother->alignmentParameters())
247  return mother;
248  mother = mother->mother();
249  }
250 
251  return nullptr;
252 }

References Alignable::alignmentParameters(), and Alignable::mother().

Referenced by selectParameters().

◆ alignables()

const align::Alignables& AlignmentParameterStore::alignables ( void  ) const
inline

◆ applyAlignableAbsolutePositions()

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.

375  {
376  unsigned int nappl = 0;
377  ierr = 0;
378 
379  // Iterate over list of alignables
380  for (align::Alignables::const_iterator iali = alivec.begin(); iali != alivec.end(); ++iali) {
381  Alignable* ali = *iali;
382  align::ID id = ali->id();
383  align::StructureType typeId = ali->alignableObjectId();
384 
385  // Find corresponding entry in AlignablePositions
386  bool found = false;
387  for (AlignablePositions::const_iterator ipos = newpos.begin(); ipos != newpos.end(); ++ipos) {
388  if (id == ipos->id() && typeId == ipos->objId()) {
389  if (found) {
390  edm::LogError("DuplicatePosition") << "New positions for alignable found more than once!";
391  } else {
392  // New position/rotation
393  const align::PositionType& pnew = ipos->pos();
394  const align::RotationType& rnew = ipos->rot();
395  const std::vector<double>& dnew = ipos->deformationParameters();
396  // Current position / rotation
397  const align::PositionType& pold = ali->globalPosition();
398  const align::RotationType& rold = ali->globalRotation();
399  // Current surf. deformation
400  std::vector<std::pair<int, SurfaceDeformation*> > dold_id_pairs;
401  SurfaceDeformation* dold_obj = nullptr;
403  std::vector<double> dold;
404  if (1 == ali->surfaceDeformationIdPairs(dold_id_pairs)) { // might not have any...
405  dold_obj = dold_id_pairs[0].second;
406  dold = dold_obj->parameters();
408  }
409 
410  // shift needed to move from current to new position
411  align::GlobalVector posDiff = pnew - pold;
412  align::RotationType rotDiff = rold.multiplyInverse(rnew);
413  align::rectify(rotDiff); // correct for rounding errors
414  ali->move(posDiff);
415  ali->rotateInGlobalFrame(rotDiff);
416  LogDebug("NewPosition") << "moving by:" << posDiff;
417  LogDebug("NewRotation") << "rotating by:\n" << rotDiff;
418 
419  // add the surface deformations
420  // If an old surface deformation record exists, ensure that the added deformation has the same type and size.
421  if (!dold.empty() && dtype != SurfaceDeformationFactory::kNoDeformations && dnew.size() == dold.size()) {
422  std::vector<double> defDiff;
423  defDiff.reserve(dold.size());
424  for (unsigned int i = 0; i < dold.size(); i++)
425  defDiff.push_back(dnew[i] - dold[i]);
426  auto deform = SurfaceDeformationFactory::create(dtype, defDiff);
427  edm::LogInfo("Alignment") << "@SUB=AlignmentParameterStore::applyAlignableAbsolutePositions"
428  << "Adding surface deformation of type "
430  (SurfaceDeformationFactory::Type)deform->type())
431  << ", size " << defDiff.size() << " and first element " << defDiff.at(0)
432  << " to alignable with id / type: " << id << " / " << typeId;
433  ali->addSurfaceDeformation(deform, true);
434  delete deform;
435  }
436  // In case no old surface deformation record exists, only ensure that the new surface deformation record has size>0. Size check is done elsewhere.
437  else if (!dnew.empty()) {
438  auto deform = SurfaceDeformationFactory::create(dnew);
439  edm::LogInfo("Alignment") << "@SUB=AlignmentParameterStore::applyAlignableAbsolutePositions"
440  << "Setting surface deformation of type "
442  (SurfaceDeformationFactory::Type)deform->type())
443  << ", size " << dnew.size() << " and first element " << dnew.at(0)
444  << " to alignable with id / type: " << id << " / " << typeId;
445  ali->addSurfaceDeformation(deform, true); // Equivalent to setSurfaceDeformation in this case
446  delete deform;
447  }
448  // If there is no new surface deformation record, do nothing.
449 
450  // add position error
451  // AlignmentPositionError ape(shift.x(),shift.y(),shift.z());
452  // (*iali)->addAlignmentPositionError(ape);
453  // (*iali)->addAlignmentPositionErrorFromRotation(rot);
454 
455  found = true;
456  ++nappl;
457  }
458  }
459  }
460  }
461 
462  if (nappl < newpos.size())
463  edm::LogError("Mismatch") << "Applied only " << nappl << " new positions"
464  << " out of " << newpos.size();
465 
466  LogDebug("NewPositions") << "Applied new positions for " << nappl << " out of " << alivec.size() << " alignables.";
467 }

References Alignable::addSurfaceDeformation(), Alignable::alignableObjectId(), SurfaceDeformationFactory::create(), runTauDisplay::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().

◆ applyAlignableRelativePositions()

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.

472  {
473  ierr = 0;
474  unsigned int nappl = 0;
475  unsigned int nAlignables = alivec.size();
476 
477  for (unsigned int i = 0; i < nAlignables; ++i) {
478  Alignable* ali = alivec[i];
479 
480  align::ID id = ali->id();
481  align::StructureType typeId = ali->alignableObjectId();
482 
483  // Find corresponding entry in AlignableShifts
484  bool found = false;
485  for (AlignableShifts::const_iterator ipos = shifts.begin(); ipos != shifts.end(); ++ipos) {
486  if (id == ipos->id() && typeId == ipos->objId()) {
487  if (found) {
488  edm::LogError("DuplicatePosition") << "New positions for alignable found more than once!";
489  } else {
490  // Current surf. deformation
491  std::vector<std::pair<int, SurfaceDeformation*> > dold_id_pairs;
492  SurfaceDeformation* dold_obj = nullptr;
494  std::vector<double> dold;
495  if (1 == ali->surfaceDeformationIdPairs(dold_id_pairs)) { // might not have any...
496  dold_obj = dold_id_pairs[0].second;
497  dold = dold_obj->parameters();
499  }
500 
501  ali->move(ipos->pos());
502  ali->rotateInGlobalFrame(ipos->rot());
503 
504  const std::vector<double>& defDiff = ipos->deformationParameters();
505  // If an old surface deformation record exists, ensure that the added deformation has the same type and size.
506  if (!dold.empty() && dtype != SurfaceDeformationFactory::kNoDeformations && defDiff.size() == dold.size()) {
507  auto deform = SurfaceDeformationFactory::create(dtype, defDiff);
508  edm::LogInfo("Alignment") << "@SUB=AlignmentParameterStore::applyAlignableRelativePositions"
509  << "Adding surface deformation of type "
511  (SurfaceDeformationFactory::Type)deform->type())
512  << ", size " << defDiff.size() << " and first element " << defDiff.at(0)
513  << " to alignable with id / type: " << id << " / " << typeId;
514  ali->addSurfaceDeformation(deform, true);
515  delete deform;
516  }
517  // In case no old surface deformation record exists, only ensure that the new surface deformation record has size>0. Size check is done elsewhere.
518  else if (!defDiff.empty()) {
519  auto deform = SurfaceDeformationFactory::create(defDiff);
520  edm::LogInfo("Alignment") << "@SUB=AlignmentParameterStore::applyAlignableRelativePositions"
521  << "Setting surface deformation of type "
523  (SurfaceDeformationFactory::Type)deform->type())
524  << ", size " << defDiff.size() << " and first element " << defDiff.at(0)
525  << " to alignable with id / type: " << id << " / " << typeId;
526  ali->addSurfaceDeformation(deform, true); // Equivalent to setSurfaceDeformation in this case
527  delete deform;
528  }
529  // If there is no new surface deformation record, do nothing.
530 
531  // Add position error
532  //AlignmentPositionError ape(pnew.x(),pnew.y(),pnew.z());
533  //ali->addAlignmentPositionError(ape);
534  //ali->addAlignmentPositionErrorFromRotation(rnew);
535 
536  found = true;
537  ++nappl;
538  }
539  }
540  }
541  }
542 
543  if (nappl < shifts.size())
544  edm::LogError("Mismatch") << "Applied only " << nappl << " new positions"
545  << " out of " << shifts.size();
546 
547  LogDebug("NewPositions") << "Applied new positions for " << nappl << " alignables.";
548 }

References Alignable::addSurfaceDeformation(), Alignable::alignableObjectId(), SurfaceDeformationFactory::create(), runTauDisplay::dtype, newFWLiteAna::found, mps_fire::i, Alignable::id(), SurfaceDeformationFactory::kNoDeformations, LogDebug, Alignable::move(), SurfaceDeformation::parameters(), Alignable::rotateInGlobalFrame(), Alignable::surfaceDeformationIdPairs(), SurfaceDeformationFactory::surfaceDeformationTypeName(), and SurfaceDeformation::type().

◆ applyParameters() [1/2]

void AlignmentParameterStore::applyParameters ( Alignable alignable)

apply parameters of a given alignable

Definition at line 262 of file AlignmentParameterStore.cc.

262  {
263  AlignmentParameters* pars = (alignable ? alignable->alignmentParameters() : nullptr);
264  if (!pars) {
265  throw cms::Exception("BadAlignable") << "applyParameters: provided alignable does not have alignment parameters";
266  }
267  pars->apply();
268 }

References Alignable::alignmentParameters(), AlignmentParameters::apply(), and Exception.

◆ applyParameters() [2/2]

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.

255  {
256  align::Alignables::const_iterator iali;
257  for (iali = theAlignables.begin(); iali != theAlignables.end(); ++iali)
258  applyParameters(*iali);
259 }

References theAlignables.

Referenced by CSCAlignmentCorrections::applyAlignment(), MuonAlignmentFromReference::fitAndAlign(), MillePedeAlignmentAlgorithm::initialize(), CSCChamberFitter::radiusCorrection(), MillePedeAlignmentAlgorithm::setParametersForRunRange(), and HIPAlignmentAlgorithm::terminate().

◆ attachAlignmentParameters() [1/2]

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.

558  {
559  int ipass = 0;
560  int ifail = 0;
561  ierr = 0;
562 
563  // Iterate over alignables
564  for (align::Alignables::const_iterator iali = alivec.begin(); iali != alivec.end(); ++iali) {
565  // Iterate over Parameters
566  bool found = false;
567  for (Parameters::const_iterator ipar = parvec.begin(); ipar != parvec.end(); ++ipar) {
568  // Get new alignment parameters
569  AlignmentParameters* ap = *ipar;
570 
571  // Check if parameters belong to alignable
572  if (ap->alignable() == (*iali)) {
573  if (!found) {
574  (*iali)->setAlignmentParameters(ap);
575  ++ipass;
576  found = true;
577  } else
578  edm::LogError("Alignment") << "@SUB=AlignmentParameterStore::attachAlignmentParameters"
579  << "More than one parameters for Alignable.";
580  }
581  }
582  if (!found)
583  ++ifail;
584  }
585  if (ifail > 0)
586  ierr = -1;
587 
588  LogDebug("attachAlignmentParameters") << " Parameters, Alignables: " << parvec.size() << "," << alivec.size()
589  << "\n pass,fail: " << ipass << "," << ifail;
590 }

References AlignmentParameters::alignable(), newFWLiteAna::found, and LogDebug.

Referenced by attachAlignmentParameters().

◆ attachAlignmentParameters() [2/2]

void AlignmentParameterStore::attachAlignmentParameters ( const Parameters parvec,
int &  ierr 
)

Attach alignment parameters to alignables.

Definition at line 551 of file AlignmentParameterStore.cc.

551  {
553 }

References attachAlignmentParameters(), and theAlignables.

◆ attachCorrelations() [1/2]

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.

601  {
602  ierr = 0;
603  int icount = 0;
604 
605  // Iterate over correlations
606  for (Correlations::const_iterator icor = cormap.begin(); icor != cormap.end(); ++icor) {
607  AlgebraicMatrix mat = (*icor).second;
608  Alignable* ali1 = (*icor).first.first;
609  Alignable* ali2 = (*icor).first.second;
610 
611  // Check if alignables exist
612  if (find(alivec.begin(), alivec.end(), ali1) != alivec.end() &&
613  find(alivec.begin(), alivec.end(), ali2) != alivec.end()) {
614  // Check if correlations already existing between these alignables
615  if (!theCorrelationsStore->correlationsAvailable(ali1, ali2) || (overwrite)) {
616  theCorrelationsStore->setCorrelations(ali1, ali2, mat);
617  ++icount;
618  } else
619  edm::LogInfo("AlreadyExists") << "Correlation existing and not overwritten";
620  } else
621  edm::LogInfo("IgnoreCorrelation") << "Ignoring correlation with no alignables!";
622  }
623 
624  LogDebug("attachCorrelations") << " Alignables,Correlations: " << alivec.size() << "," << cormap.size()
625  << "\n applied: " << icount;
626 }

References AlignmentCorrelationsStore::correlationsAvailable(), spr::find(), LogDebug, AlignmentCorrelationsStore::setCorrelations(), and theCorrelationsStore.

Referenced by attachCorrelations().

◆ attachCorrelations() [2/2]

void AlignmentParameterStore::attachCorrelations ( const Correlations cormap,
bool  overwrite,
int &  ierr 
)

Attach correlations to alignables.

Definition at line 593 of file AlignmentParameterStore.cc.

593  {
594  attachCorrelations(theAlignables, cormap, overwrite, ierr);
595 }

References attachCorrelations(), and theAlignables.

◆ attachUserVariables()

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.

631  {
632  ierr = 0;
633 
634  LogDebug("DumpArguments") << "size of alivec: " << alivec.size() << "\nsize of uvarvec: " << uvarvec.size();
635 
636  std::vector<AlignmentUserVariables*>::const_iterator iuvar = uvarvec.begin();
637 
638  for (align::Alignables::const_iterator iali = alivec.begin(); iali != alivec.end(); ++iali, ++iuvar) {
639  AlignmentParameters* ap = (*iali)->alignmentParameters();
640  AlignmentUserVariables* uvarnew = (*iuvar);
641  ap->setUserVariables(uvarnew);
642  }
643 }

References LogDebug, and AlignmentParameters::setUserVariables().

Referenced by HIPAlignmentAlgorithm::collector().

◆ cacheTransformations() [1/2]

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.

310  {
311  for (const auto& iali : theAlignables)
312  iali->cacheTransformation(run);
313 }

References writedatasetfile::run, and theAlignables.

◆ cacheTransformations() [2/2]

void AlignmentParameterStore::cacheTransformations ( void  )

cache the current position, rotation and other parameters

Definition at line 303 of file AlignmentParameterStore.cc.

303  {
304  align::Alignables::const_iterator iali;
305  for (iali = theAlignables.begin(); iali != theAlignables.end(); ++iali)
306  (*iali)->cacheTransformation();
307 }

References theAlignables.

Referenced by MillePedeAlignmentAlgorithm::beginRun(), and MillePedeAlignmentAlgorithm::terminate().

◆ correlationsStore()

AlignmentCorrelationsStore* AlignmentParameterStore::correlationsStore ( void  ) const
inline

get full correlation map

Definition at line 56 of file AlignmentParameterStore.h.

56 { return theCorrelationsStore; }

References theCorrelationsStore.

◆ hierarchyConstraints()

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.

685  {
686  // Weak point if all = false:
687  // Ignores constraints between non-subsequent levels in case the parameter is not considered in
688  // the intermediate level, e.g. global z for dets and layers is aligned, but not for rods!
689  if (!ali || !ali->alignmentParameters())
690  return false;
691 
692  const std::vector<bool>& aliSel = ali->alignmentParameters()->selector();
693  paramIdsVecOut.clear();
694  factorsVecOut.clear();
695 
696  bool firstComp = true;
697  for (align::Alignables::const_iterator iComp = aliComps.begin(), iCompE = aliComps.end(); iComp != iCompE; ++iComp) {
698  const ParametersToParametersDerivatives p2pDerivs(**iComp, *ali);
699  if (!p2pDerivs.isOK()) {
700  // std::cerr << (*iComp)->alignmentParameters()->type() << " "
701  // << ali->alignmentParameters()->type() << std::endl;
702  throw cms::Exception("BadConfig") << "AlignmentParameterStore::hierarchyConstraints"
703  << " Bad match of types of AlignmentParameters classes.\n";
704  return false;
705  }
706  const std::vector<bool>& aliCompSel = (*iComp)->alignmentParameters()->selector();
707  for (unsigned int iParMast = 0, iParMastUsed = 0; iParMast < aliSel.size(); ++iParMast) {
708  if (!all && !aliSel[iParMast])
709  continue; // no higher level parameter & constraint deselected
710  if (firstComp) { // fill output with empty arrays
711  paramIdsVecOut.push_back(std::vector<ParameterId>());
712  factorsVecOut.push_back(std::vector<double>());
713  }
714  for (unsigned int iParComp = 0; iParComp < aliCompSel.size(); ++iParComp) {
715  if (aliCompSel[iParComp]) {
716  double factor = 0.;
718  // hierachy constraints
719  factor = p2pDerivs(iParMast, iParComp);
721  // CHK poor mans averaging constraints
722  factor = p2pDerivs(iParMast, iParComp);
723  if (iParMast < 3 && (iParComp % 9) >= 3)
724  factor = 0.;
725  }
726  if (fabs(factor) > epsilon) {
727  paramIdsVecOut[iParMastUsed].push_back(ParameterId(*iComp, iParComp));
728  factorsVecOut[iParMastUsed].push_back(factor);
729  }
730  }
731  }
732  ++iParMastUsed;
733  }
734  firstComp = false;
735  } // end loop on components
736 
737  return true;
738 }

References Alignable::alignmentParameters(), python.cmstools::all(), APPROX_AVERAGING_CONSTRAINTS, geometryDiff::epsilon, Exception, DQMScaleToClient_cfi::factor, HIERARCHY_CONSTRAINTS, ParametersToParametersDerivatives::isOK(), AlignmentParameters::selector(), and theTypeOfConstraints.

Referenced by PedeSteerer::hierarchyConstraint().

◆ numCorrelations()

const unsigned int AlignmentParameterStore::numCorrelations ( void  ) const
inline

get number of correlations between alignables

Definition at line 59 of file AlignmentParameterStore.h.

59 { return theCorrelationsStore->size(); }

References AlignmentCorrelationsStore::size(), and theCorrelationsStore.

◆ numObjects()

int AlignmentParameterStore::numObjects ( void  ) const
inline

returns number of alignables

Definition at line 53 of file AlignmentParameterStore.h.

53 { return theAlignables.size(); }

References theAlignables.

◆ resetParameters() [1/2]

void AlignmentParameterStore::resetParameters ( Alignable ali)

reset parameters of a given alignable

Definition at line 282 of file AlignmentParameterStore.cc.

282  {
283  if (ali) {
284  // Get alignment parameters for this alignable
286  if (ap) {
287  int npar = ap->numSelected();
288 
289  AlgebraicVector par(npar, 0);
290  AlgebraicSymMatrix cov(npar, 0);
291  AlignmentParameters* apnew = ap->cloneFromSelected(par, cov);
292  ali->setAlignmentParameters(apnew);
293  apnew->setValid(false);
294  } else
295  edm::LogError("BadArgument") << "@SUB=AlignmentParameterStore::resetParameters"
296  << "alignable has no alignment parameter";
297  } else
298  edm::LogError("BadArgument") << "@SUB=AlignmentParameterStore::resetParameters"
299  << "argument is NULL";
300 }

References Alignable::alignmentParameters(), AlignmentParameters::cloneFromSelected(), AlignmentParameters::numSelected(), Alignable::setAlignmentParameters(), and AlignmentParameters::setValid().

◆ resetParameters() [2/2]

void AlignmentParameterStore::resetParameters ( void  )

reset parameters, correlations, user variables

Definition at line 271 of file AlignmentParameterStore.cc.

271  {
272  // Erase contents of correlation map
274 
275  // Iterate over alignables in the store and reset parameters
276  align::Alignables::const_iterator iali;
277  for (iali = theAlignables.begin(); iali != theAlignables.end(); ++iali)
278  resetParameters(*iali);
279 }

References AlignmentCorrelationsStore::resetCorrelations(), theAlignables, and theCorrelationsStore.

Referenced by MillePedeAlignmentAlgorithm::initialize(), and MillePedeAlignmentAlgorithm::setParametersForRunRange().

◆ restoreCachedTransformations() [1/2]

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.

323  {
324  for (const auto& iali : theAlignables)
325  iali->restoreCachedTransformation(run);
326 }

References writedatasetfile::run, and theAlignables.

◆ restoreCachedTransformations() [2/2]

void AlignmentParameterStore::restoreCachedTransformations ( void  )

restore the previously cached position, rotation and other parameters

Definition at line 316 of file AlignmentParameterStore.cc.

316  {
317  align::Alignables::const_iterator iali;
318  for (iali = theAlignables.begin(); iali != theAlignables.end(); ++iali)
319  (*iali)->restoreCachedTransformation();
320 }

References theAlignables.

Referenced by MillePedeAlignmentAlgorithm::setParametersForRunRange(), and MillePedeAlignmentAlgorithm::terminate().

◆ selectParameters() [1/3]

CompositeAlignmentParameters AlignmentParameterStore::selectParameters ( const align::Alignables alignables) const

select parameters

Definition at line 141 of file AlignmentParameterStore.cc.

141  {
142  align::Alignables selectedAlignables;
143  std::map<AlignableDetOrUnitPtr, Alignable*> alidettoalimap; // This map won't be filled!!!
144  std::map<Alignable*, int> aliposmap;
145  std::map<Alignable*, int> alilenmap;
146  int nparam = 0;
147 
148  // iterate over Alignable's
149  align::Alignables::const_iterator ita;
150  for (ita = alignables.begin(); ita != alignables.end(); ++ita) {
151  // Check if Alignable already there, insert into vector if not
152  if (find(selectedAlignables.begin(), selectedAlignables.end(), *ita) == selectedAlignables.end()) {
153  selectedAlignables.push_back(*ita);
154  AlignmentParameters* ap = (*ita)->alignmentParameters();
155  nparam += ap->numSelected();
156  }
157  }
158 
159  AlgebraicVector* selpar = new AlgebraicVector(nparam, 0);
160  AlgebraicSymMatrix* selcov = new AlgebraicSymMatrix(nparam, 0);
161 
162  // Fill in parameters and corresponding covariance matrices
163  int ipos = 1; // NOTE: .sub indices start from 1
164  align::Alignables::const_iterator it1;
165  for (it1 = selectedAlignables.begin(); it1 != selectedAlignables.end(); ++it1) {
166  AlignmentParameters* ap = (*it1)->alignmentParameters();
167  selpar->sub(ipos, ap->selectedParameters());
168  selcov->sub(ipos, ap->selectedCovariance());
169  int npar = ap->numSelected();
170  aliposmap[*it1] = ipos;
171  alilenmap[*it1] = npar;
172  ipos += npar;
173  }
174 
175  // Fill in the correlations. Has to be an extra loop, because the
176  // AlignmentExtendedCorrelationsStore (if used) needs the
177  // alignables' covariance matrices already present.
178  ipos = 1;
179  for (it1 = selectedAlignables.begin(); it1 != selectedAlignables.end(); ++it1) {
180  int jpos = 1;
181 
182  // Look for correlations between alignables
183  align::Alignables::const_iterator it2;
184  for (it2 = selectedAlignables.begin(); it2 != it1; ++it2) {
185  theCorrelationsStore->correlations(*it1, *it2, *selcov, ipos - 1, jpos - 1);
186  jpos += (*it2)->alignmentParameters()->numSelected();
187  }
188 
189  ipos += (*it1)->alignmentParameters()->numSelected();
190  }
191 
193  CompositeAlignmentParameters aap(data, selectedAlignables, alidettoalimap, aliposmap, alilenmap);
194 
195  return aap;
196 }

References alignables(), AlignmentCorrelationsStore::correlations(), data, spr::find(), AlignmentParameters::numSelected(), AlignmentParameters::selectedCovariance(), AlignmentParameters::selectedParameters(), and theCorrelationsStore.

◆ selectParameters() [2/3]

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.

66  {
67  std::vector<AlignableDetOrUnitPtr> detOrUnits;
68  detOrUnits.reserve(alignabledets.size());
69 
70  std::vector<AlignableDet*>::const_iterator it, iEnd;
71  for (it = alignabledets.begin(), iEnd = alignabledets.end(); it != iEnd; ++it)
72  detOrUnits.push_back(AlignableDetOrUnitPtr(*it));
73 
74  return this->selectParameters(detOrUnits);
75 }

Referenced by HIPAlignmentAlgorithm::run().

◆ selectParameters() [3/3]

CompositeAlignmentParameters AlignmentParameterStore::selectParameters ( const std::vector< AlignableDetOrUnitPtr > &  alignabledets) const

select parameters

Definition at line 78 of file AlignmentParameterStore.cc.

79  {
81  std::map<AlignableDetOrUnitPtr, Alignable*> alidettoalimap;
82  std::map<Alignable*, int> aliposmap;
83  std::map<Alignable*, int> alilenmap;
84  int nparam = 0;
85 
86  // iterate over AlignableDet's
87  for (std::vector<AlignableDetOrUnitPtr>::const_iterator iad = alignabledets.begin(); iad != alignabledets.end();
88  ++iad) {
90  if (ali) {
91  alidettoalimap[*iad] = ali; // Add to map
92  // Check if Alignable already there, insert into vector if not
93  if (find(alignables.begin(), alignables.end(), ali) == alignables.end()) {
94  alignables.push_back(ali);
96  nparam += ap->numSelected();
97  }
98  }
99  }
100 
101  AlgebraicVector* selpar = new AlgebraicVector(nparam, 0);
102  AlgebraicSymMatrix* selcov = new AlgebraicSymMatrix(nparam, 0);
103 
104  // Fill in parameters and corresponding covariance matricess
105  int ipos = 1; // NOTE: .sub indices start from 1
106  align::Alignables::const_iterator it1;
107  for (it1 = alignables.begin(); it1 != alignables.end(); ++it1) {
108  AlignmentParameters* ap = (*it1)->alignmentParameters();
109  selpar->sub(ipos, ap->selectedParameters());
110  selcov->sub(ipos, ap->selectedCovariance());
111  int npar = ap->numSelected();
112  aliposmap[*it1] = ipos;
113  alilenmap[*it1] = npar;
114  ipos += npar;
115  }
116 
117  // Fill in the correlations. Has to be an extra loop, because the
118  // AlignmentExtendedCorrelationsStore (if used) needs the
119  // alignables' covariance matrices already present.
120  ipos = 1;
121  for (it1 = alignables.begin(); it1 != alignables.end(); ++it1) {
122  int jpos = 1;
123 
124  // Look for correlations between alignables
125  align::Alignables::const_iterator it2;
126  for (it2 = alignables.begin(); it2 != it1; ++it2) {
127  theCorrelationsStore->correlations(*it1, *it2, *selcov, ipos - 1, jpos - 1);
128  jpos += (*it2)->alignmentParameters()->numSelected();
129  }
130 
131  ipos += (*it1)->alignmentParameters()->numSelected();
132  }
133 
135  CompositeAlignmentParameters aap(data, alignables, alidettoalimap, aliposmap, alilenmap);
136 
137  return aap;
138 }

References alignableFromAlignableDet(), alignables(), Alignable::alignmentParameters(), AlignmentCorrelationsStore::correlations(), data, spr::find(), AlignmentParameters::numSelected(), AlignmentParameters::selectedCovariance(), AlignmentParameters::selectedParameters(), and theCorrelationsStore.

◆ setAlignmentPositionError()

void AlignmentParameterStore::setAlignmentPositionError ( const align::Alignables alivec,
double  valshift,
double  valrot 
)

Set Alignment position error.

Definition at line 646 of file AlignmentParameterStore.cc.

648  {
649  unsigned int nAlignables = alivec.size();
650 
651  for (unsigned int i = 0; i < nAlignables; ++i) {
652  Alignable* ali = alivec[i];
653 
654  // First reset APE
655  AlignmentPositionError nulApe(0, 0, 0);
656  ali->setAlignmentPositionError(nulApe, true);
657 
658  // Set APE from displacement
659  AlignmentPositionError ape(valshift, valshift, valshift);
660  if (valshift > 0.)
661  ali->addAlignmentPositionError(ape, true);
662  else
663  ali->setAlignmentPositionError(ape, true);
664  // GF: Resetting and setting as above does not really make sense to me,
665  // and adding to zero or setting is the same! I'd just do
666  //ali->setAlignmentPositionError(AlignmentPositionError ape(valshift,valshift,valshift),true);
667 
668  // Set APE from rotation
670  r(1) = valrot;
671  r(2) = valrot;
672  r(3) = valrot;
674  }
675 
676  LogDebug("StoreAPE") << "Store APE from shift: " << valshift << "\nStore APE from rotation: " << valrot;
677 }

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().

◆ typeAndLayer()

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.

368  {
369  return TrackerAlignableId().typeAndLayerFromDetId(ali->id(), tTopo);
370 }

References Alignable::id(), and TrackerAlignableId::typeAndLayerFromDetId().

Referenced by HIPAlignmentAlgorithm::fillAlignablesMonitor(), and HIPAlignmentAlgorithm::terminate().

◆ updateParameters()

void AlignmentParameterStore::updateParameters ( const CompositeAlignmentParameters aap,
bool  updateCorrelations = true 
)

update parameters

Definition at line 199 of file AlignmentParameterStore.cc.

199  {
201  const AlgebraicVector& parameters = aap.parameters();
202  const AlgebraicSymMatrix& covariance = aap.covariance();
203 
204  int ipos = 1; // NOTE: .sub indices start from 1
205 
206  // Loop over alignables
207  for (align::Alignables::const_iterator it = alignables.begin(); it != alignables.end(); ++it) {
208  // Update parameters and local covariance
209  AlignmentParameters* ap = (*it)->alignmentParameters();
210  int nsel = ap->numSelected();
211  AlgebraicVector subvec = parameters.sub(ipos, ipos + nsel - 1);
212  AlgebraicSymMatrix subcov = covariance.sub(ipos, ipos + nsel - 1);
213  AlignmentParameters* apnew = ap->cloneFromSelected(subvec, subcov);
214  (*it)->setAlignmentParameters(apnew);
215 
216  // Now update correlations between detectors
217  if (updateCorrelations) {
218  int jpos = 1;
219  for (align::Alignables::const_iterator it2 = alignables.begin(); it2 != it; ++it2) {
220  theCorrelationsStore->setCorrelations(*it, *it2, covariance, ipos - 1, jpos - 1);
221  jpos += (*it2)->alignmentParameters()->numSelected();
222  }
223  }
224 
225  ipos += nsel;
226  }
227 }

References alignables(), AlignmentParameters::cloneFromSelected(), CompositeAlignmentParameters::components(), CompositeAlignmentParameters::covariance(), AlignmentParameters::numSelected(), CompositeAlignmentParameters::parameters(), AlignmentCorrelationsStore::setCorrelations(), and theCorrelationsStore.

◆ validAlignables()

align::Alignables AlignmentParameterStore::validAlignables ( void  ) const

get all alignables with valid parameters

Definition at line 230 of file AlignmentParameterStore.cc.

230  {
232  for (align::Alignables::const_iterator iali = theAlignables.begin(); iali != theAlignables.end(); ++iali)
233  if ((*iali)->alignmentParameters()->isValid())
234  result.push_back(*iali);
235 
236  LogDebug("Alignment") << "@SUB=AlignmentParameterStore::validAlignables"
237  << "Valid alignables: " << result.size() << "out of " << theAlignables.size();
238  return result;
239 }

References LogDebug, mps_fire::result, and theAlignables.

Member Data Documentation

◆ theAlignables

align::Alignables AlignmentParameterStore::theAlignables
private

◆ theCorrelationsStore

AlignmentCorrelationsStore* AlignmentParameterStore::theCorrelationsStore
protected

◆ theTypeOfConstraints

TypeOfConstraints AlignmentParameterStore::theTypeOfConstraints
private

type of constraints

Definition at line 164 of file AlignmentParameterStore.h.

Referenced by AlignmentParameterStore(), and hierarchyConstraints().

Vector3DBase
Definition: Vector3DBase.h:8
align::toAngles
EulerAngles toAngles(const RotationType &)
Convert rotation matrix to angles about x-, y-, z-axes (frame rotation).
Definition: Utilities.cc:8
TkRotation< Scalar >
BeamSpotPI::parameters
parameters
Definition: BeamSpotPayloadInspectorHelper.h:30
mps_fire.i
i
Definition: mps_fire.py:428
Alignable::setAlignmentParameters
void setAlignmentParameters(AlignmentParameters *dap)
Set the AlignmentParameters.
Definition: Alignable.cc:123
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
Alignable::setAlignmentPositionError
virtual void setAlignmentPositionError(const AlignmentPositionError &ape, bool propagateDown)=0
Set the alignment position error - if (!propagateDown) do not affect daughters.
Alignable::rotateInGlobalFrame
virtual void rotateInGlobalFrame(const RotationType &rotation)=0
Alignable
Definition: Alignable.h:27
CompositeAlignmentParameters
Definition: CompositeAlignmentParameters.h:27
Alignable::surfaceDeformationIdPairs
virtual int surfaceDeformationIdPairs(std::vector< std::pair< int, SurfaceDeformation * > > &) const =0
AlignmentCorrelationsStore::size
virtual unsigned int size(void) const
Get number of stored correlations.
Definition: AlignmentCorrelationsStore.cc:126
RigidBodyAlignmentParameters::clone
RigidBodyAlignmentParameters * clone(const AlgebraicVector &parameters, const AlgebraicSymMatrix &covMatrix) const override
Clone all parameters (for update of parameters)
Definition: RigidBodyAlignmentParameters.cc:48
ReferenceCountingPointer
Definition: ReferenceCounted.h:60
AlignmentParameterStore::attachCorrelations
void attachCorrelations(const align::Alignables &alivec, const Correlations &cormap, bool overwrite, int &ierr)
Attach correlations to given alignables.
Definition: AlignmentParameterStore.cc:598
AlignmentParameters::apply
virtual void apply()=0
apply parameters to alignable
TkRotation::multiplyInverse
Basic3DVector< T > multiplyInverse(const Basic3DVector< T > &v) const
Definition: extTkRotation.h:178
edm::LogInfo
Log< level::Info, false > LogInfo
Definition: MessageLogger.h:125
AlignableSurface::toLocal
align::RotationType toLocal(const align::RotationType &) const
Return in local frame a rotation given in global frame.
Definition: AlignableSurface.cc:35
CompositeAlignmentParameters::components
Components components() const
Get vector of alignable components.
Definition: CompositeAlignmentParameters.cc:71
SurfaceDeformation::type
virtual int type() const =0
specific type, i.e. SurfaceDeformationFactory::Type
spr::find
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:19
AlignmentCorrelationsStore::setCorrelations
virtual void setCorrelations(Alignable *ap1, Alignable *ap2, const AlgebraicSymMatrix &cov, int row, int col)
Definition: AlignmentCorrelationsStore.cc:51
newFWLiteAna.found
found
Definition: newFWLiteAna.py:118
AlignableDetOrUnitPtr
Definition: AlignableDetOrUnitPtr.h:30
SurfaceDeformation
Definition: SurfaceDeformation.h:18
edm::LogWarning
Log< level::Warning, false > LogWarning
Definition: MessageLogger.h:122
python.cmstools.all
def all(container)
workaround iterator generators for ROOT classes
Definition: cmstools.py:25
AlignmentParameters
Definition: AlignmentParameters.h:35
AlignmentParameterStore::ParameterId
std::pair< Alignable *, unsigned int > ParameterId
a single alignable parameter of an Alignable
Definition: AlignmentParameterStore.h:128
geometryDiff.epsilon
int epsilon
Definition: geometryDiff.py:26
config
Definition: config.py:1
AlignmentExtendedCorrelationsStore
Definition: AlignmentExtendedCorrelationsStore.h:19
Basic3DVector::y
T y() const
Cartesian y coordinate.
Definition: extBasic3DVector.h:97
AlgebraicVector
CLHEP::HepVector AlgebraicVector
Definition: AlgebraicObjects.h:13
SurfaceDeformation::parameters
virtual std::vector< double > parameters() const =0
parameters - interpretation left to the concrete implementation
AlignmentParameterStore::applyParameters
void applyParameters(void)
Obsolete: Use AlignableNavigator::alignableDetFromDetId and alignableFromAlignableDet.
Definition: AlignmentParameterStore.cc:255
Alignable::alignableObjectId
virtual StructureType alignableObjectId() const =0
Return the alignable type identifier.
Alignable::addAlignmentPositionError
virtual void addAlignmentPositionError(const AlignmentPositionError &ape, bool propagateDown)=0
DQMScaleToClient_cfi.factor
factor
Definition: DQMScaleToClient_cfi.py:8
align::rectify
void rectify(RotationType &)
Correct a rotation matrix for rounding errors.
Definition: Utilities.cc:185
AlignmentParameters::selectedCovariance
AlgebraicSymMatrix selectedCovariance(void) const
Get covariance matrix of selected parameters.
Definition: AlignmentParameters.cc:59
Alignable::surface
const AlignableSurface & surface() const
Return the Surface (global position and orientation) of the object.
Definition: Alignable.h:132
AlignmentCorrelationsStore::correlations
virtual void correlations(Alignable *ap1, Alignable *ap2, AlgebraicSymMatrix &cov, int row, int col) const
Definition: AlignmentCorrelationsStore.cc:12
Point3DBase< Scalar, GlobalTag >
Alignable::displacement
const GlobalVector & displacement() const
Return change of the global position since the creation of the object.
Definition: Alignable.h:141
TrackerAlignableId::typeAndLayerFromDetId
std::pair< int, int > typeAndLayerFromDetId(const DetId &detId, const TrackerTopology *tTopo) const
Definition: TrackerAlignableId.cc:17
align::StructureType
StructureType
Definition: StructureType.h:16
Alignable::addAlignmentPositionErrorFromRotation
virtual void addAlignmentPositionErrorFromRotation(const RotationType &rotation, bool propagateDown)=0
ParametersToParametersDerivatives
Definition: ParametersToParametersDerivatives.h:43
AlignmentParameterStore::APPROX_AVERAGING_CONSTRAINTS
Definition: AlignmentParameterStore.h:156
LogDebug
#define LogDebug(id)
Definition: MessageLogger.h:233
Alignable::rotation
const RotationType & rotation() const
Return change of orientation since the creation of the object.
Definition: Alignable.h:144
edm::ParameterSet
Definition: ParameterSet.h:47
align::ID
uint32_t ID
Definition: Definitions.h:24
AlignmentCorrelationsStore
Definition: AlignmentCorrelationsStore.h:16
SurfaceDeformationFactory::Type
Type
Definition: SurfaceDeformationFactory.h:17
RigidBodyAlignmentParameters
Definition: RigidBodyAlignmentParameters.h:21
Alignable::id
align::ID id() const
Return the ID of Alignable, i.e. DetId of 'first' component GeomDet(Unit).
Definition: Alignable.h:180
AlignmentCorrelationsStore::correlationsAvailable
virtual bool correlationsAvailable(Alignable *ap1, Alignable *ap2) const
Check whether correlations are stored for a given pair of alignables.
Definition: AlignmentCorrelationsStore.cc:100
runTauDisplay.dtype
dtype
Definition: runTauDisplay.py:121
AlignmentParameterStore::HIERARCHY_CONSTRAINTS
Definition: AlignmentParameterStore.h:156
AlgebraicSymMatrix
CLHEP::HepSymMatrix AlgebraicSymMatrix
Definition: AlgebraicObjects.h:15
AlignmentParameterStore::theAlignables
align::Alignables theAlignables
alignables
Definition: AlignmentParameterStore.h:161
edm::LogError
Log< level::Error, false > LogError
Definition: MessageLogger.h:123
AlignmentParameterStore::alignableFromAlignableDet
Alignable * alignableFromAlignableDet(const AlignableDetOrUnitPtr &alignableDet) const
Obsolete: Use AlignableNavigator::alignableDetFromGeomDet and alignableFromAlignableDet.
Definition: AlignmentParameterStore.cc:242
AlignmentParameters::selectedParameters
AlgebraicVector selectedParameters(void) const
Get selected parameters.
Definition: AlignmentParameters.cc:54
align::EulerAngles
AlgebraicVector EulerAngles
Definition: Definitions.h:34
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
SurfaceDeformationFactory::surfaceDeformationTypeName
std::string surfaceDeformationTypeName(const Type &type)
Definition: SurfaceDeformationFactory.cc:26
Alignable::move
virtual void move(const GlobalVector &displacement)=0
Movement with respect to the global reference frame.
alignCSCRings.r
r
Definition: alignCSCRings.py:93
AlignmentParametersData
Definition: AlignmentParametersData.h:7
align::Alignables
std::vector< Alignable * > Alignables
Definition: Utilities.h:31
TrackerAlignableId
Definition: TrackerAlignableId.h:22
AlgebraicMatrix
CLHEP::HepMatrix AlgebraicMatrix
Definition: AlgebraicObjects.h:14
writedatasetfile.run
run
Definition: writedatasetfile.py:27
AlignmentParameterStore::theTypeOfConstraints
TypeOfConstraints theTypeOfConstraints
type of constraints
Definition: AlignmentParameterStore.h:164
AlignmentParameters::setValid
void setValid(bool v)
Set validity flag.
Definition: AlignmentParameters.cc:137
AlignmentParameterStore::NONE
Definition: AlignmentParameterStore.h:156
AlignmentParameters::cloneFromSelected
virtual AlignmentParameters * cloneFromSelected(const AlgebraicVector &par, const AlgebraicSymMatrix &cov) const =0
Exception
Definition: hltDiff.cc:245
CompositeAlignmentParameters::parameters
const AlgebraicVector & parameters() const
Get alignment parameters.
Definition: CompositeAlignmentParameters.h:59
AlignmentParameters::numSelected
int numSelected(void) const
Get number of selected parameters.
Definition: AlignmentParameters.cc:51
AlignmentParameters::size
int size(void) const
Get number of parameters.
Definition: AlignmentParameters.cc:131
AlignmentParameterStore::theCorrelationsStore
AlignmentCorrelationsStore * theCorrelationsStore
Definition: AlignmentParameterStore.h:153
align::toMatrix
RotationType toMatrix(const EulerAngles &)
Convert rotation angles about x-, y-, z-axes to matrix.
Definition: Utilities.cc:34
AlignmentParameters::alignable
Alignable * alignable(void) const
Get pointer to corresponding alignable.
Definition: AlignmentParameters.cc:104
data
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:79
SurfaceDeformationFactory::kNoDeformations
Definition: SurfaceDeformationFactory.h:21
TkRotation::x
Basic3DVector< T > x() const
Definition: extTkRotation.h:247
mps_fire.result
result
Definition: mps_fire.py:311
TkRotation::rot
Rot3< T > rot
Definition: extTkRotation.h:263
Alignable::globalPosition
const PositionType & globalPosition() const
Return the global position of the object.
Definition: Alignable.h:135
AlignmentPositionError
Definition: AlignmentPositionError.h:10
edm::Log
Definition: MessageLogger.h:70
Alignable::alignmentParameters
AlignmentParameters * alignmentParameters() const
Get the AlignmentParameters.
Definition: Alignable.h:58
CompositeAlignmentParameters::covariance
const AlgebraicSymMatrix & covariance() const
Get parameter covariance matrix.
Definition: CompositeAlignmentParameters.h:62
Alignable::addSurfaceDeformation
virtual void addSurfaceDeformation(const SurfaceDeformation *deformation, bool propagateDown)=0
AlignmentParameterStore::attachAlignmentParameters
void attachAlignmentParameters(const align::Alignables &alivec, const Parameters &parvec, int &ierr)
Attach alignment parameters to given alignables.
Definition: AlignmentParameterStore.cc:556
Alignable::globalRotation
const RotationType & globalRotation() const
Return the global orientation of the object.
Definition: Alignable.h:138
AlignmentCorrelationsStore::resetCorrelations
virtual void resetCorrelations(void)
Reset correlations.
Definition: AlignmentCorrelationsStore.cc:114
AlignmentParameters::setUserVariables
void setUserVariables(AlignmentUserVariables *auv)
Set pointer to user variables.
Definition: AlignmentParameters.cc:94
SurfaceDeformationFactory::create
SurfaceDeformation * create(int type, const std::vector< double > &params)
Definition: SurfaceDeformationFactory.cc:40
Alignable::mother
Alignable * mother() const
Return pointer to container alignable (if any)
Definition: Alignable.h:91