#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... | |
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 21 of file AlignableModifier.cc.
References theDRand48Engine.
AlignableModifier::~AlignableModifier | ( | ) |
Destructor.
Definition at line 40 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 553 of file AlignableModifier.cc.
References Alignable::addAlignmentPositionError(), allConversions_cfi::dz, 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 610 of file AlignableModifier.cc.
References makeMuonMisalignmentScenario::rot.
Referenced by modify().
void AlignableModifier::addAlignmentPositionErrorFromLocalRotation | ( | Alignable * | alignable, |
align::RotationType & | rotation | ||
) |
Add alignment position error resulting from rotation in local frame.
Definition at line 639 of file AlignableModifier.cc.
References Alignable::addAlignmentPositionErrorFromLocalRotation(), LogDebug, and idealTransformation::rotation.
void AlignableModifier::addAlignmentPositionErrorFromRotation | ( | Alignable * | alignable, |
float | phiX, | ||
float | phiY, | ||
float | phiZ | ||
) |
Add alignment position error resulting from rotation in global frame.
Definition at line 594 of file AlignableModifier.cc.
References makeMuonMisalignmentScenario::rot.
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 626 of file AlignableModifier.cc.
References Alignable::addAlignmentPositionErrorFromRotation(), LogDebug, and idealTransformation::rotation.
void AlignableModifier::addAlignmentPositionErrorLocal | ( | Alignable * | alignable, |
float | dx, | ||
float | dy, | ||
float | dz | ||
) |
Add the AlignmentPositionError (in local frame) to Alignable.
Definition at line 567 of file AlignableModifier.cc.
References Alignable::addAlignmentPositionError(), GlobalErrorBase< T, ErrorWeightType >::cxx(), GlobalErrorBase< T, ErrorWeightType >::cyx(), GlobalErrorBase< T, ErrorWeightType >::cyy(), GlobalErrorBase< T, ErrorWeightType >::czx(), GlobalErrorBase< T, ErrorWeightType >::czy(), GlobalErrorBase< T, ErrorWeightType >::czz(), allConversions_cfi::dz, 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 modify().
|
private |
Definition at line 359 of file AlignableModifier.cc.
References Alignable::addSurfaceDeformation(), SurfaceDeformationFactory::create(), mps_fire::i, SurfaceDeformationFactory::kTwoBowedSurfaces, m_modified, randomise(), Scenarios_cff::scale, and SurfaceDeformationFactory::surfaceDeformationType().
Referenced by modify(), and moveAlignableLocal().
const std::vector< float > AlignableModifier::flatRandomVector | ( | float | sigmaX, |
float | sigmaY, | ||
float | sigmaZ | ||
) | const |
Return a vector of random numbers (flat distribution)
Definition at line 503 of file AlignableModifier.cc.
References funct::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 469 of file AlignableModifier.cc.
References funct::abs(), and theDRand48Engine.
Referenced by moveAlignable(), moveAlignableLocal(), MuonScenarioBuilder::moveCSCSectors(), MuonScenarioBuilder::moveDTSectors(), MuonScenarioBuilder::moveMuon(), rotateAlignable(), and rotateAlignableLocal().
|
private |
Initialisation of all parameters.
Definition at line 48 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().
bool AlignableModifier::isPropagated | ( | const std::string & | parameterName | ) | const |
Check if given parameter should be propagated.
Definition at line 83 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 101 of file AlignableModifier.cc.
References funct::abs(), addAlignmentPositionError(), addAlignmentPositionErrorFromLocalRotation(), addAlignmentPositionErrorFromRotation(), addAlignmentPositionErrorLocal(), addDeformation(), deformation_, distribution_, dX_, dXlocal_, dY_, dYlocal_, dZ_, dZlocal_, relativeConstraints::error, 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_, AlCaHLTBitMon_QueryRunRegistry::string, 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 288 of file AlignableModifier.cc.
References flatRandomVector(), gaussianRandomVector(), LogDebug, m_modified, python.rootplot.argparse::message, Alignable::move(), and fftjetvertexadder_cfi::sigmaZ.
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 324 of file AlignableModifier.cc.
References addDeformation(), flatRandomVector(), gaussianRandomVector(), LogDebug, m_modified, python.rootplot.argparse::message, Alignable::move(), fftjetvertexadder_cfi::sigmaZ, 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 534 of file AlignableModifier.cc.
References funct::abs(), mps_fire::i, and theDRand48Engine.
Referenced by addDeformation().
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 392 of file AlignableModifier.cc.
References funct::abs(), flatRandomVector(), gaussianRandomVector(), LogDebug, m_modified, python.rootplot.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 431 of file AlignableModifier.cc.
References funct::abs(), flatRandomVector(), gaussianRandomVector(), LogDebug, m_modified, python.rootplot.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 251 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 268 of file AlignableModifier.cc.
References LogDebug, edm::RandomNumberGenerator::mySeed(), SurveyInfoScenario_cff::seed, 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 addDeformation(), 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.