File indexing completed on 2024-04-06 11:56:34
0001 #ifndef RUNRANGEDEPENDENTPEDELABELER_H
0002 #define RUNRANGEDEPENDENTPEDELABELER_H
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016 #include <vector>
0017 #include <map>
0018
0019 #include <Alignment/MillePedeAlignmentAlgorithm/interface/PedeLabelerBase.h>
0020
0021 #include "CondFormats/Common/interface/Time.h"
0022
0023 #include "Alignment/CommonAlignment/interface/Utilities.h"
0024 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0025
0026 namespace edm {
0027 class EventID;
0028 }
0029
0030
0031
0032 class RunRangeDependentPedeLabeler : public PedeLabelerBase {
0033 public:
0034
0035 RunRangeDependentPedeLabeler(const PedeLabelerBase::TopLevelAlignables &alignables, const edm::ParameterSet &config);
0036
0037 ~RunRangeDependentPedeLabeler() override;
0038
0039
0040
0041
0042 unsigned int alignableLabel(const Alignable *alignable) const override;
0043
0044
0045
0046
0047 unsigned int alignableLabelFromParamAndInstance(const Alignable *alignable,
0048 unsigned int param,
0049 unsigned int instance) const override;
0050 unsigned int lasBeamLabel(unsigned int lasBeamId) const override;
0051
0052 unsigned int parameterLabel(unsigned int aliLabel, unsigned int parNum) const override;
0053
0054
0055 unsigned int parameterLabel(Alignable *alignable,
0056 unsigned int parNum,
0057 const AlignmentAlgorithmBase::EventInfo &eventInfo,
0058 const TrajectoryStateOnSurface &tsos) const override;
0059
0060 bool hasSplitParameters(Alignable *alignable) const override;
0061
0062 unsigned int numberOfParameterInstances(Alignable *alignable, int param = -1) const override;
0063 unsigned int maxNumberOfParameterInstances() const override { return theMaxNumberOfParameterInstances; }
0064
0065
0066 unsigned int paramNumFromLabel(unsigned int paramLabel) const override;
0067
0068 unsigned int alignableLabelFromLabel(unsigned int label) const override;
0069
0070
0071 Alignable *alignableFromLabel(unsigned int label) const override;
0072
0073
0074 unsigned int lasBeamIdFromLabel(unsigned int label) const override;
0075 const RunRange &runRangeFromLabel(unsigned int label) const override;
0076
0077 private:
0078 typedef std::map<Alignable *, unsigned int, AlignableComparator> AlignableToIdMap;
0079 typedef AlignableToIdMap::value_type AlignableToIdPair;
0080 typedef std::vector<RunRange> RunRangeVector;
0081 typedef std::map<unsigned int, RunRangeVector> RunRangeParamMap;
0082 typedef std::map<Alignable *, RunRangeParamMap, AlignableComparator> AlignableToRunRangeRangeMap;
0083 typedef AlignableToRunRangeRangeMap::value_type AlignableToRunRangeRangePair;
0084 typedef std::map<unsigned int, Alignable *> IdToAlignableMap;
0085 typedef std::map<unsigned int, unsigned int> UintUintMap;
0086
0087 unsigned int runRangeIndexFromLabel(unsigned int label) const;
0088
0089 std::vector<std::string> decompose(const std::string &s, std::string::value_type delimiter) const;
0090 std::vector<unsigned int> convertParamSel(const std::string &selString) const;
0091 unsigned int buildRunRangeDependencyMap(AlignableTracker *aliTracker,
0092 AlignableMuon *aliMuon,
0093 AlignableExtras *extras,
0094 const edm::ParameterSet &config);
0095
0096
0097 unsigned int buildMap(const align::Alignables &);
0098
0099 unsigned int buildReverseMap();
0100
0101
0102 AlignableToIdMap theAlignableToIdMap;
0103 AlignableToRunRangeRangeMap theAlignableToRunRangeRangeMap;
0104 IdToAlignableMap theIdToAlignableMap;
0105 UintUintMap theLasBeamToLabelMap;
0106 UintUintMap theLabelToLasBeamMap;
0107 unsigned int theMaxNumberOfParameterInstances;
0108 };
0109
0110 #endif