#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 23 of file AlignableModifier.h.
|
private |
Definition at line 85 of file AlignableModifier.h.
AlignableModifier::AlignableModifier | ( | void | ) |
Constructor.
Definition at line 21 of file AlignableModifier.cc.
References theDRand48Engine.
AlignableModifier::~AlignableModifier | ( | ) |
Destructor.
Definition at line 49 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 532 of file AlignableModifier.cc.
References Alignable::addAlignmentPositionError(), PVValHelper::dx, PVValHelper::dy, PVValHelper::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 598 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 618 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 588 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 611 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 540 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(), PVValHelper::dx, PVValHelper::dy, PVValHelper::dz, Alignable::globalRotation(), LogDebug, and hcal_runs::rt.
Referenced by modify().
|
private |
Definition at line 355 of file AlignableModifier.cc.
References Alignable::addSurfaceDeformation(), SurfaceDeformationFactory::create(), mps_fire::i, SurfaceDeformationFactory::kTwoBowedSurfaces, m_modified, randomise(), pfClustersFromCombinedCaloHF_cfi::scale, 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 486 of file AlignableModifier.cc.
References funct::abs(), beamSpotPI::sigmaX, beamSpotPI::sigmaY, beamSpotPI::sigmaZ, and theDRand48Engine.
Referenced by moveAlignable(), moveAlignableLocal(), MuonScenarioBuilder::moveCSCSectors(), MuonScenarioBuilder::moveDTSectors(), MuonScenarioBuilder::moveGEMSectors(), 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 457 of file AlignableModifier.cc.
References funct::abs(), beamSpotPI::sigmaX, beamSpotPI::sigmaY, beamSpotPI::sigmaZ, and theDRand48Engine.
Referenced by moveAlignable(), moveAlignableLocal(), MuonScenarioBuilder::moveCSCSectors(), MuonScenarioBuilder::moveDTSectors(), MuonScenarioBuilder::moveGEMSectors(), MuonScenarioBuilder::moveMuon(), rotateAlignable(), and rotateAlignableLocal().
|
private |
Initialisation of all parameters.
Definition at line 52 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 84 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 94 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 295 of file AlignableModifier.cc.
References flatRandomVector(), gaussianRandomVector(), LogDebug, m_modified, Alignable::move(), beamSpotPI::sigmaX, beamSpotPI::sigmaY, and beamSpotPI::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 326 of file AlignableModifier.cc.
References flatRandomVector(), gaussianRandomVector(), LogDebug, m_modified, Alignable::move(), beamSpotPI::sigmaX, beamSpotPI::sigmaY, beamSpotPI::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 514 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 387 of file AlignableModifier.cc.
References funct::abs(), flatRandomVector(), gaussianRandomVector(), LogDebug, m_modified, 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 423 of file AlignableModifier.cc.
References funct::abs(), flatRandomVector(), gaussianRandomVector(), LogDebug, m_modified, 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 263 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 277 of file AlignableModifier.cc.
References LogDebug, edm::RandomNumberGenerator::mySeed(), fileCollector::seed, and theDRand48Engine.
Referenced by MuonScenarioBuilder::applyScenario(), and TrackerScenarioBuilder::applyScenario().
|
private |
Definition at line 107 of file AlignableModifier.h.
|
private |
Definition at line 98 of file AlignableModifier.h.
|
private |
Definition at line 105 of file AlignableModifier.h.
|
private |
Definition at line 106 of file AlignableModifier.h.
|
private |
Definition at line 105 of file AlignableModifier.h.
|
private |
Definition at line 106 of file AlignableModifier.h.
|
private |
Definition at line 105 of file AlignableModifier.h.
|
private |
Definition at line 106 of file AlignableModifier.h.
|
private |
Definition at line 99 of file AlignableModifier.h.
Referenced by init_(), modify(), and setDistribution().
|
private |
Definition at line 95 of file AlignableModifier.h.
Referenced by addDeformation(), modify(), moveAlignable(), moveAlignableLocal(), rotateAlignable(), and rotateAlignableLocal().
|
private |
Definition at line 103 of file AlignableModifier.h.
|
private |
Definition at line 104 of file AlignableModifier.h.
|
private |
Definition at line 103 of file AlignableModifier.h.
|
private |
Definition at line 104 of file AlignableModifier.h.
|
private |
Definition at line 103 of file AlignableModifier.h.
|
private |
Definition at line 104 of file AlignableModifier.h.
|
private |
Definition at line 99 of file AlignableModifier.h.
Referenced by init_(), modify(), and setDistribution().
|
private |
Definition at line 102 of file AlignableModifier.h.
|
private |
Definition at line 102 of file AlignableModifier.h.
|
private |
Definition at line 101 of file AlignableModifier.h.
|
private |
Definition at line 99 of file AlignableModifier.h.
|
private |
Definition at line 100 of file AlignableModifier.h.
|
private |
Definition at line 100 of file AlignableModifier.h.
|
private |
Definition at line 108 of file AlignableModifier.h.
|
private |
Unique random number generator.
Definition at line 90 of file AlignableModifier.h.
Referenced by AlignableModifier(), flatRandomVector(), gaussianRandomVector(), randomise(), setSeed(), and ~AlignableModifier().
|
private |
Definition at line 108 of file AlignableModifier.h.