#include <AlignableModifier.h>
Public Member Functions | |
void | addAlignmentPositionError (Alignable *alignable, float dx, float dy, float dz) |
Add the AlignmentPositionError (in global frame) to Alignable. More... | |
void | addAlignmentPositionErrorFromLocalRotation (Alignable *alignable, float phiX, float phiY, float phiZ) |
Add alignment position error resulting from rotation in local frame. More... | |
void | addAlignmentPositionErrorFromLocalRotation (Alignable *alignable, align::RotationType &) |
Add alignment position error resulting from rotation in local frame. More... | |
void | addAlignmentPositionErrorFromRotation (Alignable *alignable, float phiX, float phiY, float phiZ) |
Add alignment position error resulting from rotation in global frame. More... | |
void | addAlignmentPositionErrorFromRotation (Alignable *alignable, align::RotationType &) |
Add alignment position error resulting from rotation in global frame. More... | |
void | addAlignmentPositionErrorLocal (Alignable *alignable, float dx, float dy, float dz) |
Add the AlignmentPositionError (in local frame) to Alignable. More... | |
AlignableModifier () | |
Constructor. More... | |
const std::vector< float > | flatRandomVector (float sigmaX, float sigmaY, float sigmaZ) const |
Return a vector of random numbers (flat distribution) More... | |
const std::vector< float > | gaussianRandomVector (float sigmaX, float sigmaY, float sigmaZ) const |
Return a vector of random numbers (gaussian distribution) More... | |
const bool | isPropagated (const std::string ¶meterName) const |
Check if given parameter should be propagated. More... | |
bool | modify (Alignable *alignable, const edm::ParameterSet &pSet) |
Modify given set of alignables according to parameters. More... | |
void | moveAlignable (Alignable *alignable, bool random, bool gaussian, float sigmaX, float sigmaY, float sigmaZ) |
Move alignable in global space according to parameters. More... | |
void | moveAlignableLocal (Alignable *alignable, bool random, bool gaussian, float sigmaX, float sigmaY, float sigmaZ) |
Move alignable in local space according to parameters. More... | |
void | randomise (std::vector< double > &rnd, bool gaussian) const |
void | rotateAlignable (Alignable *alignable, bool random, bool gaussian, float sigmaPhiX, float sigmaPhiY, float sigmaPhiZ) |
Rotate alignable in global space according to parameters. More... | |
void | rotateAlignableLocal (Alignable *alignable, bool random, bool gaussian, float sigmaPhiX, float sigmaPhiY, float sigmaPhiZ) |
Rotate alignable in local space according to parameters. More... | |
void | setDistribution (const std::string &distr) |
Decodes string and sets distribution accordingly ('fixed', 'flat' or 'gaussian'). More... | |
void | setSeed (long seed) |
Resets the generator seed according to the argument. More... | |
~AlignableModifier () | |
Destructor. More... | |
Private Types | |
typedef std::pair< std::string, std::vector< double > > | DeformationMemberType |
Private Member Functions | |
void | addDeformation (Alignable *alignable, const DeformationMemberType &deformation, bool random, bool gaussian, double scale) |
void | init_ () |
Initialisation of all parameters. More... | |
Private Attributes | |
DeformationMemberType | deformation_ |
std::string | distribution_ |
double | dX_ |
double | dXlocal_ |
double | dY_ |
double | dYlocal_ |
double | dZ_ |
double | dZlocal_ |
bool | gaussian_ |
int | m_modified |
double | phiX_ |
double | phiXlocal_ |
double | phiY_ |
double | phiYlocal_ |
double | phiZ_ |
double | phiZlocal_ |
bool | random_ |
double | scale_ |
double | scaleError_ |
long | seed_ |
bool | setError_ |
bool | setRotations_ |
bool | setTranslations_ |
double | shear_ |
CLHEP::DRand48Engine * | theDRand48Engine |
Unique random number generator. More... | |
double | twist_ |
Definition at line 19 of file AlignableModifier.h.
|
private |
Definition at line 92 of file AlignableModifier.h.
AlignableModifier::AlignableModifier | ( | void | ) |
Constructor.
Definition at line 20 of file AlignableModifier.cc.
References theDRand48Engine.
AlignableModifier::~AlignableModifier | ( | ) |
Destructor.
Definition at line 29 of file AlignableModifier.cc.
References theDRand48Engine.
void AlignableModifier::addAlignmentPositionError | ( | Alignable * | alignable, |
float | dx, | ||
float | dy, | ||
float | dz | ||
) |
Add the AlignmentPositionError (in global frame) to Alignable.
Definition at line 535 of file AlignableModifier.cc.
References Alignable::addAlignmentPositionError(), and LogDebug.
Referenced by modify(), MuonScenarioBuilder::moveChamberInSector(), and MuonScenarioBuilder::moveMuon().
void AlignableModifier::addAlignmentPositionErrorFromLocalRotation | ( | Alignable * | alignable, |
float | phiX, | ||
float | phiY, | ||
float | phiZ | ||
) |
Add alignment position error resulting from rotation in local frame.
Definition at line 591 of file AlignableModifier.cc.
Referenced by modify().
void AlignableModifier::addAlignmentPositionErrorFromLocalRotation | ( | Alignable * | alignable, |
align::RotationType & | rotation | ||
) |
Add alignment position error resulting from rotation in local frame.
Definition at line 620 of file AlignableModifier.cc.
References Alignable::addAlignmentPositionErrorFromLocalRotation(), and LogDebug.
void AlignableModifier::addAlignmentPositionErrorFromRotation | ( | Alignable * | alignable, |
float | phiX, | ||
float | phiY, | ||
float | phiZ | ||
) |
Add alignment position error resulting from rotation in global frame.
Definition at line 575 of file AlignableModifier.cc.
Referenced by modify(), MuonScenarioBuilder::moveChamberInSector(), and MuonScenarioBuilder::moveMuon().
void AlignableModifier::addAlignmentPositionErrorFromRotation | ( | Alignable * | alignable, |
align::RotationType & | rotation | ||
) |
Add alignment position error resulting from rotation in global frame.
Definition at line 607 of file AlignableModifier.cc.
References Alignable::addAlignmentPositionErrorFromRotation(), and LogDebug.
void AlignableModifier::addAlignmentPositionErrorLocal | ( | Alignable * | alignable, |
float | dx, | ||
float | dy, | ||
float | dz | ||
) |
Add the AlignmentPositionError (in local frame) to Alignable.
Definition at line 549 of file AlignableModifier.cc.
References Alignable::addAlignmentPositionError(), Alignable::globalRotation(), LogDebug, TkRotation< T >::xx(), TkRotation< T >::xy(), TkRotation< T >::xz(), TkRotation< T >::yx(), TkRotation< T >::yy(), TkRotation< T >::yz(), TkRotation< T >::zx(), TkRotation< T >::zy(), and TkRotation< T >::zz().
Referenced by SurveyDataConverter::applyAPEs(), and modify().
|
private |
Definition at line 341 of file AlignableModifier.cc.
References Alignable::addSurfaceDeformation(), SurfaceDeformationFactory::create(), i, SurfaceDeformationFactory::kTwoBowedSurfaces, and SurfaceDeformationFactory::surfaceDeformationType().
Referenced by modify().
const std::vector< float > AlignableModifier::flatRandomVector | ( | float | sigmaX, |
float | sigmaY, | ||
float | sigmaZ | ||
) | const |
Return a vector of random numbers (flat distribution)
Definition at line 485 of file AlignableModifier.cc.
References abs, and theDRand48Engine.
Referenced by moveAlignable(), moveAlignableLocal(), MuonScenarioBuilder::moveCSCSectors(), MuonScenarioBuilder::moveDTSectors(), MuonScenarioBuilder::moveMuon(), rotateAlignable(), and rotateAlignableLocal().
const std::vector< float > AlignableModifier::gaussianRandomVector | ( | float | sigmaX, |
float | sigmaY, | ||
float | sigmaZ | ||
) | const |
Return a vector of random numbers (gaussian distribution)
Definition at line 451 of file AlignableModifier.cc.
References abs, and theDRand48Engine.
Referenced by moveAlignable(), moveAlignableLocal(), MuonScenarioBuilder::moveCSCSectors(), MuonScenarioBuilder::moveDTSectors(), MuonScenarioBuilder::moveMuon(), rotateAlignable(), and rotateAlignableLocal().
|
private |
Initialisation of all parameters.
Definition at line 37 of file AlignableModifier.cc.
References deformation_, distribution_, dX_, dXlocal_, dY_, dYlocal_, dZ_, dZlocal_, gaussian_, phiX_, phiXlocal_, phiY_, phiYlocal_, phiZ_, phiZlocal_, random_, scale_, scaleError_, setError_, setRotations_, setTranslations_, shear_, and twist_.
Referenced by modify().
const bool AlignableModifier::isPropagated | ( | const std::string & | parameterName | ) | const |
Check if given parameter should be propagated.
Definition at line 72 of file AlignableModifier.cc.
Referenced by MisalignmentScenarioBuilder::propagateParameters_().
bool AlignableModifier::modify | ( | Alignable * | alignable, |
const edm::ParameterSet & | pSet | ||
) |
Modify given set of alignables according to parameters.
All known parameters and defaults are defined here! Returns true if modification actually applied.
Definition at line 90 of file AlignableModifier.cc.
References abs, addAlignmentPositionError(), addAlignmentPositionErrorFromLocalRotation(), addAlignmentPositionErrorFromRotation(), addAlignmentPositionErrorLocal(), addDeformation(), deformation_, distribution_, dX_, dXlocal_, dY_, dYlocal_, dZ_, dZlocal_, error, edm::hlt::Exception, edm::ParameterSet::existsAs(), gaussian_, edm::ParameterSet::getParameter(), edm::ParameterSet::getParameterNames(), init_(), m_modified, moveAlignable(), moveAlignableLocal(), phiX_, phiXlocal_, phiY_, phiYlocal_, phiZ_, phiZlocal_, random_, rotateAlignable(), rotateAlignableLocal(), scale_, scaleError_, setDistribution(), setError_, setRotations_, setTranslations_, shear_, and twist_.
Referenced by MisalignmentScenarioBuilder::decodeMovements_().
void AlignableModifier::moveAlignable | ( | Alignable * | alignable, |
bool | random, | ||
bool | gaussian, | ||
float | sigmaX, | ||
float | sigmaY, | ||
float | sigmaZ | ||
) |
Move alignable in global space according to parameters.
If 'random' is false, the given movements are strictly applied. Otherwise, a random number is generated according to a gaussian or a flat distribution depending on 'gaussian'.
Definition at line 270 of file AlignableModifier.cc.
References flatRandomVector(), gaussianRandomVector(), LogDebug, m_modified, argparse::message, and Alignable::move().
Referenced by modify(), MuonScenarioBuilder::moveChamberInSector(), and MuonScenarioBuilder::moveMuon().
void AlignableModifier::moveAlignableLocal | ( | Alignable * | alignable, |
bool | random, | ||
bool | gaussian, | ||
float | sigmaX, | ||
float | sigmaY, | ||
float | sigmaZ | ||
) |
Move alignable in local space according to parameters.
If 'random' is false, the given movements are strictly applied. Otherwise, a random number is generated according to a gaussian or a flat distribution depending on 'gaussian'.
Definition at line 306 of file AlignableModifier.cc.
References flatRandomVector(), gaussianRandomVector(), LogDebug, m_modified, argparse::message, Alignable::move(), Alignable::surface(), and AlignableSurface::toGlobal().
Referenced by modify().
void AlignableModifier::randomise | ( | std::vector< double > & | rnd, |
bool | gaussian | ||
) | const |
Randomise all entries in 'rnd':
Definition at line 516 of file AlignableModifier.cc.
References abs, i, and theDRand48Engine.
void AlignableModifier::rotateAlignable | ( | Alignable * | alignable, |
bool | random, | ||
bool | gaussian, | ||
float | sigmaPhiX, | ||
float | sigmaPhiY, | ||
float | sigmaPhiZ | ||
) |
Rotate alignable in global space according to parameters.
If 'random' is false, the given rotations are strictly applied. Otherwise, a random number is generated according to a gaussian or a flat distribution depending on 'gaussian'.
Definition at line 374 of file AlignableModifier.cc.
References abs, flatRandomVector(), gaussianRandomVector(), LogDebug, m_modified, argparse::message, Alignable::rotateAroundGlobalX(), Alignable::rotateAroundGlobalY(), Alignable::rotateAroundGlobalZ(), PV3DBase< T, PVType, FrameType >::x(), PV3DBase< T, PVType, FrameType >::y(), and PV3DBase< T, PVType, FrameType >::z().
Referenced by modify(), MuonScenarioBuilder::moveChamberInSector(), and MuonScenarioBuilder::moveMuon().
void AlignableModifier::rotateAlignableLocal | ( | Alignable * | alignable, |
bool | random, | ||
bool | gaussian, | ||
float | sigmaPhiX, | ||
float | sigmaPhiY, | ||
float | sigmaPhiZ | ||
) |
Rotate alignable in local space according to parameters.
If 'random' is false, the given rotations are strictly applied. Otherwise, a random number is generated according to a gaussian or a flat distribution depending on 'gaussian'.
Definition at line 413 of file AlignableModifier.cc.
References abs, flatRandomVector(), gaussianRandomVector(), LogDebug, m_modified, argparse::message, Alignable::rotateAroundLocalX(), Alignable::rotateAroundLocalY(), Alignable::rotateAroundLocalZ(), PV3DBase< T, PVType, FrameType >::x(), PV3DBase< T, PVType, FrameType >::y(), and PV3DBase< T, PVType, FrameType >::z().
Referenced by modify().
void AlignableModifier::setDistribution | ( | const std::string & | distr | ) |
Decodes string and sets distribution accordingly ('fixed', 'flat' or 'gaussian').
Definition at line 233 of file AlignableModifier.cc.
References gaussian_, and random_.
Referenced by modify().
void AlignableModifier::setSeed | ( | long | seed | ) |
Resets the generator seed according to the argument.
If 'seed' is zero, asks RandomNumberGenerator service.
Definition at line 250 of file AlignableModifier.cc.
References LogDebug, edm::RandomNumberGenerator::mySeed(), and theDRand48Engine.
Referenced by MuonScenarioBuilder::applyScenario(), and TrackerScenarioBuilder::applyScenario().
|
private |
Definition at line 114 of file AlignableModifier.h.
|
private |
Definition at line 105 of file AlignableModifier.h.
|
private |
Definition at line 112 of file AlignableModifier.h.
|
private |
Definition at line 113 of file AlignableModifier.h.
|
private |
Definition at line 112 of file AlignableModifier.h.
|
private |
Definition at line 113 of file AlignableModifier.h.
|
private |
Definition at line 112 of file AlignableModifier.h.
|
private |
Definition at line 113 of file AlignableModifier.h.
|
private |
Definition at line 106 of file AlignableModifier.h.
Referenced by init_(), modify(), and setDistribution().
|
private |
Definition at line 102 of file AlignableModifier.h.
Referenced by modify(), moveAlignable(), moveAlignableLocal(), rotateAlignable(), and rotateAlignableLocal().
|
private |
Definition at line 110 of file AlignableModifier.h.
|
private |
Definition at line 111 of file AlignableModifier.h.
|
private |
Definition at line 110 of file AlignableModifier.h.
|
private |
Definition at line 111 of file AlignableModifier.h.
|
private |
Definition at line 110 of file AlignableModifier.h.
|
private |
Definition at line 111 of file AlignableModifier.h.
|
private |
Definition at line 106 of file AlignableModifier.h.
Referenced by init_(), modify(), and setDistribution().
|
private |
Definition at line 109 of file AlignableModifier.h.
|
private |
Definition at line 109 of file AlignableModifier.h.
|
private |
Definition at line 108 of file AlignableModifier.h.
|
private |
Definition at line 106 of file AlignableModifier.h.
|
private |
Definition at line 107 of file AlignableModifier.h.
|
private |
Definition at line 107 of file AlignableModifier.h.
|
private |
Definition at line 115 of file AlignableModifier.h.
|
private |
Unique random number generator.
Definition at line 97 of file AlignableModifier.h.
Referenced by AlignableModifier(), flatRandomVector(), gaussianRandomVector(), randomise(), setSeed(), and ~AlignableModifier().
|
private |
Definition at line 115 of file AlignableModifier.h.