File indexing completed on 2024-04-06 11:56:06
0001 #ifndef Alignment_CommonAlignment_MisalignmentScenarioBuilder_h
0002 #define Alignment_CommonAlignment_MisalignmentScenarioBuilder_h
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012 #include <vector>
0013
0014 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0015
0016 #include "Alignment/CommonAlignment/interface/AlignableModifier.h"
0017 #include "Alignment/CommonAlignment/interface/AlignableObjectId.h"
0018 #include "Alignment/CommonAlignment/interface/Utilities.h"
0019
0020
0021
0022 class MisalignmentScenarioBuilder {
0023 public:
0024
0025 MisalignmentScenarioBuilder(AlignableObjectId::Geometry);
0026
0027
0028 virtual ~MisalignmentScenarioBuilder() = default;
0029
0030
0031 virtual void applyScenario(const edm::ParameterSet& scenario) = 0;
0032
0033 protected:
0034
0035 void decodeMovements_(const edm::ParameterSet&, const align::Alignables&);
0036
0037
0038 void decodeMovements_(const edm::ParameterSet&, const align::Alignables&, const std::string& levelName);
0039
0040
0041 void applyMovements_(Alignable* alignable, const edm::ParameterSet& pSet);
0042
0043
0044 void mergeParameters_(edm::ParameterSet& localSet, const edm::ParameterSet& globalSet) const;
0045
0046
0047 void propagateParameters_(const edm::ParameterSet& pSet,
0048 const std::string& globalName,
0049 edm::ParameterSet& subSet) const;
0050
0051
0052
0053 edm::ParameterSet getParameterSet_(const std::string& name, const edm::ParameterSet& pSet) const;
0054
0055
0056
0057
0058 edm::ParameterSet getParameterSet_(const std::string& levelName, int iComponent, const edm::ParameterSet& pSet) const;
0059
0060
0061 bool hasParameter_(const std::string& name, const edm::ParameterSet& pSet) const;
0062
0063
0064 void printParameters_(const edm::ParameterSet& pSet, const bool showPsets = false) const;
0065
0066
0067 virtual bool isTopLevel_(const std::string& parameterSetName) const;
0068
0069
0070
0071 virtual bool possiblyPartOf(const std::string& subStruct, const std::string& largeStruct) const;
0072
0073
0074 const std::string rootName_(const std::string& parameterSetName) const;
0075
0076 protected:
0077 edm::ParameterSet theScenario;
0078 AlignableModifier theModifier;
0079
0080 int theModifierCounter{0};
0081
0082 mutable std::string indent_;
0083
0084 private:
0085 const AlignableObjectId alignableObjectId_;
0086 };
0087
0088 #endif