CMS 3D CMS Logo

MisalignmentScenarioBuilder.h
Go to the documentation of this file.
1 #ifndef Alignment_CommonAlignment_MisalignmentScenarioBuilder_h
2 #define Alignment_CommonAlignment_MisalignmentScenarioBuilder_h
3 
11 
12 #include <vector>
13 
15 
19 
21 
23 public:
26 
28  virtual ~MisalignmentScenarioBuilder() = default;
29 
31  virtual void applyScenario(const edm::ParameterSet& scenario) = 0;
32 
33 protected: // Methods
36 
39 
41  void applyMovements_(Alignable* alignable, const edm::ParameterSet& pSet);
42 
44  void mergeParameters_(edm::ParameterSet& localSet, const edm::ParameterSet& globalSet) const;
45 
47  void propagateParameters_(const edm::ParameterSet& pSet,
48  const std::string& globalName,
49  edm::ParameterSet& subSet) const;
50 
54 
58  edm::ParameterSet getParameterSet_(const std::string& levelName, int iComponent, const edm::ParameterSet& pSet) const;
59 
61  bool hasParameter_(const std::string& name, const edm::ParameterSet& pSet) const;
62 
64  void printParameters_(const edm::ParameterSet& pSet, const bool showPsets = false) const;
65 
67  virtual bool isTopLevel_(const std::string& parameterSetName) const;
68 
71  virtual bool possiblyPartOf(const std::string& subStruct, const std::string& largeStruct) const;
72 
74  const std::string rootName_(const std::string& parameterSetName) const;
75 
76 protected: // Members
79 
81 
82  mutable std::string indent_;
83 
84 private:
86 };
87 
88 #endif
AlignableObjectId
Allows conversion between type and name, and vice-versa.
Definition: AlignableObjectId.h:13
AlignableModifier
Definition: AlignableModifier.h:23
MisalignmentScenarioBuilder::hasParameter_
bool hasParameter_(const std::string &name, const edm::ParameterSet &pSet) const
Check if given parameter exists in parameter set.
Definition: MisalignmentScenarioBuilder.cc:271
MisalignmentScenarioBuilder::~MisalignmentScenarioBuilder
virtual ~MisalignmentScenarioBuilder()=default
Destructor.
Alignable
Definition: Alignable.h:27
MisalignmentScenarioBuilder::alignableObjectId_
const AlignableObjectId alignableObjectId_
Definition: MisalignmentScenarioBuilder.h:85
AlignableModifier.h
MisalignmentScenarioBuilder::mergeParameters_
void mergeParameters_(edm::ParameterSet &localSet, const edm::ParameterSet &globalSet) const
Merge two sets of parameters into one (the first argument)
Definition: MisalignmentScenarioBuilder.cc:111
AlignableObjectId::Geometry
Geometry
Definition: AlignableObjectId.h:16
MisalignmentScenarioBuilder
Base class to build a scenario from configuration and apply to either tracker or muon.
Definition: MisalignmentScenarioBuilder.h:22
MisalignmentScenarioBuilder::theModifierCounter
int theModifierCounter
Counter for applied modification.
Definition: MisalignmentScenarioBuilder.h:80
cmsdt::scenario
scenario
Definition: constants.h:167
MisalignmentScenarioBuilder::applyMovements_
void applyMovements_(Alignable *alignable, const edm::ParameterSet &pSet)
Apply movements given by parameter set to given alignable.
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
edm::ParameterSet
Definition: ParameterSet.h:47
MisalignmentScenarioBuilder::theModifier
AlignableModifier theModifier
Helper class for random movements.
Definition: MisalignmentScenarioBuilder.h:78
MisalignmentScenarioBuilder::applyScenario
virtual void applyScenario(const edm::ParameterSet &scenario)=0
Apply misalignment scenario to the tracker (sub-system specific)
MisalignmentScenarioBuilder::propagateParameters_
void propagateParameters_(const edm::ParameterSet &pSet, const std::string &globalName, edm::ParameterSet &subSet) const
Propagate global parameters to sub-parameters.
Definition: MisalignmentScenarioBuilder.cc:142
MisalignmentScenarioBuilder::possiblyPartOf
virtual bool possiblyPartOf(const std::string &subStruct, const std::string &largeStruct) const
Definition: MisalignmentScenarioBuilder.cc:330
MisalignmentScenarioBuilder::isTopLevel_
virtual bool isTopLevel_(const std::string &parameterSetName) const
Check if given parameter is for a top-level structure.
Definition: MisalignmentScenarioBuilder.cc:314
Utilities.h
fwlog::levelName
const char * levelName(LogLevel)
Definition: fwLog.cc:32
AlignableObjectId.h
MisalignmentScenarioBuilder::getParameterSet_
edm::ParameterSet getParameterSet_(const std::string &name, const edm::ParameterSet &pSet) const
Definition: MisalignmentScenarioBuilder.cc:197
align::Alignables
std::vector< Alignable * > Alignables
Definition: Utilities.h:31
MisalignmentScenarioBuilder::printParameters_
void printParameters_(const edm::ParameterSet &pSet, const bool showPsets=false) const
Print all parameters and values for given set.
Definition: MisalignmentScenarioBuilder.cc:280
MisalignmentScenarioBuilder::MisalignmentScenarioBuilder
MisalignmentScenarioBuilder(AlignableObjectId::Geometry)
Constructor.
Definition: MisalignmentScenarioBuilder.cc:23
MisalignmentScenarioBuilder::theScenario
edm::ParameterSet theScenario
Misalignment scenario to apply (from config file)
Definition: MisalignmentScenarioBuilder.h:77
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17
MisalignmentScenarioBuilder::decodeMovements_
void decodeMovements_(const edm::ParameterSet &, const align::Alignables &)
Decode movements defined in given parameter set for given set of alignables.
Definition: MisalignmentScenarioBuilder.cc:28
MisalignmentScenarioBuilder::rootName_
const std::string rootName_(const std::string &parameterSetName) const
Get root name of a parameter set (e.g. 'Rod' in 'Rods' or 'Rod1')
Definition: MisalignmentScenarioBuilder.cc:336
ParameterSet.h
MisalignmentScenarioBuilder::indent_
std::string indent_
Depth in hierarchy.
Definition: MisalignmentScenarioBuilder.h:82