Base class to build a scenario from configuration and apply to either tracker or muon. More...
#include <MisalignmentScenarioBuilder.h>
Public Member Functions | |
virtual void | applyScenario (const edm::ParameterSet &scenario)=0 |
Apply misalignment scenario to the tracker (sub-system specific) More... | |
MisalignmentScenarioBuilder (AlignableObjectId::Geometry) | |
Constructor. More... | |
virtual | ~MisalignmentScenarioBuilder ()=default |
Destructor. More... | |
Protected Member Functions | |
void | applyMovements_ (Alignable *alignable, const edm::ParameterSet &pSet) |
Apply movements given by parameter set to given alignable. More... | |
void | decodeMovements_ (const edm::ParameterSet &pSet, const std::vector< Alignable * > &alignables) |
Decode movements defined in given parameter set for given set of alignables. More... | |
void | decodeMovements_ (const edm::ParameterSet &pSet, const std::vector< Alignable * > &alignables, const std::string &levelName) |
Decode movements defined in given parameter set for given set of alignables tagged by given name. More... | |
edm::ParameterSet | getParameterSet_ (const std::string &name, const edm::ParameterSet &pSet) const |
edm::ParameterSet | getParameterSet_ (const std::string &levelName, int iComponent, const edm::ParameterSet &pSet) const |
bool | hasParameter_ (const std::string &name, const edm::ParameterSet &pSet) const |
Check if given parameter exists in parameter set. More... | |
virtual bool | isTopLevel_ (const std::string ¶meterSetName) const |
Check if given parameter is for a top-level structure. More... | |
void | mergeParameters_ (edm::ParameterSet &localSet, const edm::ParameterSet &globalSet) const |
Merge two sets of parameters into one (the first argument) More... | |
virtual bool | possiblyPartOf (const std::string &subStruct, const std::string &largeStruct) const |
void | printParameters_ (const edm::ParameterSet &pSet, const bool showPsets=false) const |
Print all parameters and values for given set. More... | |
void | propagateParameters_ (const edm::ParameterSet &pSet, const std::string &globalName, edm::ParameterSet &subSet) const |
Propagate global parameters to sub-parameters. More... | |
const std::string | rootName_ (const std::string ¶meterSetName) const |
Get root name of a parameter set (e.g. 'Rod' in 'Rods' or 'Rod1') More... | |
Protected Attributes | |
std::string | indent_ |
Depth in hierarchy. More... | |
AlignableModifier | theModifier |
Helper class for random movements. More... | |
int | theModifierCounter {0} |
Counter for applied modification. More... | |
edm::ParameterSet | theScenario |
Misalignment scenario to apply (from config file) More... | |
Private Attributes | |
const AlignableObjectId | alignableObjectId_ |
Base class to build a scenario from configuration and apply to either tracker or muon.
Definition at line 21 of file MisalignmentScenarioBuilder.h.
MisalignmentScenarioBuilder::MisalignmentScenarioBuilder | ( | AlignableObjectId::Geometry | geometry | ) |
Constructor.
Definition at line 24 of file MisalignmentScenarioBuilder.cc.
|
virtualdefault |
Destructor.
|
protected |
Apply movements given by parameter set to given alignable.
|
pure virtual |
Apply misalignment scenario to the tracker (sub-system specific)
Implemented in TrackerScenarioBuilder, and MuonScenarioBuilder.
|
protected |
Decode movements defined in given parameter set for given set of alignables.
Definition at line 32 of file MisalignmentScenarioBuilder.cc.
References alignableObjectId_, AlignableObjectId::idToString(), fwlog::levelName(), and AlCaHLTBitMon_QueryRunRegistry::string.
Referenced by MuonScenarioBuilder::applyScenario(), TrackerScenarioBuilder::applyScenario(), and decodeMovements_().
|
protected |
Decode movements defined in given parameter set for given set of alignables tagged by given name.
Definition at line 62 of file MisalignmentScenarioBuilder.cc.
References decodeMovements_(), edm::ParameterSet::empty(), edm::ParameterSet::getParameterNames(), getParameterSet_(), edm::ParameterSet::getParameterSetNames(), indent_, LogDebug, mergeParameters_(), AlignableModifier::modify(), mergeVDriftHistosByStation::name, printParameters_(), propagateParameters_(), theModifier, and theModifierCounter.
|
protected |
Get parameter set corresponding to given name from pSet returns empty parameter set if does not exist)
Definition at line 223 of file MisalignmentScenarioBuilder.cc.
References edm::ParameterSet::getParameter(), hasParameter_(), mergeVDriftHistosByStation::name, and mps_fire::result.
Referenced by decodeMovements_(), MuonScenarioBuilder::extractParameters(), and mergeParameters_().
|
protected |
Get parameter set corresponding to given levelName and iComponent from pSet, any parameter set name like <levelName><m>, <levelName><m>_<n>, <levelName><m>_<n>_<o> etc. is accepted for iComponent == m, n or o. (returns empty parameter set if does not exist).
Definition at line 241 of file MisalignmentScenarioBuilder.cc.
References Exception, edm::ParameterSet::getParameter(), edm::ParameterSet::getParameterNames(), indent_, LogDebug, mps_fire::result, and AlCaHLTBitMon_QueryRunRegistry::string.
|
protected |
Check if given parameter exists in parameter set.
Definition at line 298 of file MisalignmentScenarioBuilder.cc.
References spr::find(), edm::ParameterSet::getParameterNames(), mergeVDriftHistosByStation::name, and cscdqm::h::names.
Referenced by MuonScenarioBuilder::applyScenario(), TrackerScenarioBuilder::applyScenario(), and getParameterSet_().
|
protectedvirtual |
Check if given parameter is for a top-level structure.
Reimplemented in TrackerScenarioBuilder.
Definition at line 351 of file MisalignmentScenarioBuilder.cc.
References pyrootRender::root, rootName_(), and AlCaHLTBitMon_QueryRunRegistry::string.
Referenced by propagateParameters_().
|
protected |
Merge two sets of parameters into one (the first argument)
Definition at line 125 of file MisalignmentScenarioBuilder.cc.
References edm::ParameterSet::addParameter(), edm::ParameterSet::copyFrom(), edm::ParameterSet::empty(), edm::ParameterSet::existsAs(), edm::ParameterSet::getParameter(), edm::ParameterSet::getParameterNames(), getParameterSet_(), and indent_.
Referenced by decodeMovements_(), and propagateParameters_().
|
protectedvirtual |
Check whether structure 'subStruct' could be part of 'largeStruct', defaults to true, but can be overwritten in derived classes to speed up recursive merging.
Reimplemented in TrackerScenarioBuilder.
Definition at line 366 of file MisalignmentScenarioBuilder.cc.
Referenced by propagateParameters_().
|
protected |
Print all parameters and values for given set.
Definition at line 312 of file MisalignmentScenarioBuilder.cc.
References edm::ParameterSet::existsAs(), and edm::ParameterSet::getParameterNames().
Referenced by decodeMovements_().
|
protected |
Propagate global parameters to sub-parameters.
Definition at line 161 of file MisalignmentScenarioBuilder.cc.
References edm::ParameterSet::addParameter(), alignableObjectId_, edm::ParameterSet::copyFrom(), Exception, edm::ParameterSet::getParameter(), edm::ParameterSet::getParameterNames(), edm::ParameterSet::getParameterSetNames(), indent_, align::invalid, AlignableModifier::isPropagated(), isTopLevel_(), LogDebug, mergeParameters_(), possiblyPartOf(), rootName_(), AlCaHLTBitMon_QueryRunRegistry::string, AlignableObjectId::stringToId(), and theModifier.
Referenced by decodeMovements_().
|
protected |
Get root name of a parameter set (e.g. 'Rod' in 'Rods' or 'Rod1')
Definition at line 375 of file MisalignmentScenarioBuilder.cc.
References LogDebug, mps_fire::result, and AlCaHLTBitMon_QueryRunRegistry::string.
Referenced by TrackerScenarioBuilder::isTopLevel_(), isTopLevel_(), and propagateParameters_().
|
private |
Definition at line 92 of file MisalignmentScenarioBuilder.h.
Referenced by decodeMovements_(), and propagateParameters_().
|
mutableprotected |
Depth in hierarchy.
Definition at line 89 of file MisalignmentScenarioBuilder.h.
Referenced by decodeMovements_(), getParameterSet_(), Mixins.PrintOptions::indent(), Mixins.PrintOptions::indentation(), mergeParameters_(), propagateParameters_(), and Mixins.PrintOptions::unindent().
|
protected |
Helper class for random movements.
Definition at line 85 of file MisalignmentScenarioBuilder.h.
Referenced by MuonScenarioBuilder::applyScenario(), TrackerScenarioBuilder::applyScenario(), decodeMovements_(), and propagateParameters_().
|
protected |
Counter for applied modification.
Definition at line 87 of file MisalignmentScenarioBuilder.h.
Referenced by MuonScenarioBuilder::applyScenario(), TrackerScenarioBuilder::applyScenario(), and decodeMovements_().
|
protected |
Misalignment scenario to apply (from config file)
Definition at line 84 of file MisalignmentScenarioBuilder.h.
Referenced by MuonScenarioBuilder::applyScenario().