File indexing completed on 2024-04-06 11:56:34
0001 #ifndef MomentumDEPENDENTPEDELABELER_H
0002 #define MomentumDEPENDENTPEDELABELER_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 "Alignment/CommonAlignment/interface/Utilities.h"
0022 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0023
0024
0025
0026 class MomentumDependentPedeLabeler : public PedeLabelerBase {
0027 public:
0028
0029 MomentumDependentPedeLabeler(const PedeLabelerBase::TopLevelAlignables &alignables, const edm::ParameterSet &config);
0030
0031 ~MomentumDependentPedeLabeler() override;
0032
0033
0034
0035
0036 unsigned int alignableLabel(const Alignable *alignable) const override;
0037
0038
0039
0040
0041 unsigned int alignableLabelFromParamAndInstance(const Alignable *alignable,
0042 unsigned int param,
0043 unsigned int instance) const override;
0044 unsigned int lasBeamLabel(unsigned int lasBeamId) const override;
0045
0046 unsigned int parameterLabel(unsigned int aliLabel, unsigned int parNum) const override;
0047
0048
0049 unsigned int parameterLabel(Alignable *alignable,
0050 unsigned int parNum,
0051 const AlignmentAlgorithmBase::EventInfo &eventInfo,
0052 const TrajectoryStateOnSurface &tsos) const override;
0053
0054 bool hasSplitParameters(Alignable *alignable) const override;
0055
0056 unsigned int numberOfParameterInstances(Alignable *alignable, int param = -1) const override;
0057 unsigned int maxNumberOfParameterInstances() const override { return theMaxNumberOfParameterInstances; }
0058
0059
0060 unsigned int paramNumFromLabel(unsigned int paramLabel) const override;
0061
0062 unsigned int alignableLabelFromLabel(unsigned int label) const override;
0063
0064
0065 Alignable *alignableFromLabel(unsigned int label) const override;
0066
0067
0068 unsigned int lasBeamIdFromLabel(unsigned int label) const override;
0069
0070 private:
0071 typedef std::map<Alignable *, unsigned int, AlignableComparator> AlignableToIdMap;
0072 typedef AlignableToIdMap::value_type AlignableToIdPair;
0073 typedef std::pair<float, float> MomentumRange;
0074 typedef std::vector<MomentumRange> MomentumRangeVector;
0075 typedef std::map<unsigned int, MomentumRangeVector> MomentumRangeParamMap;
0076 typedef std::map<Alignable *, MomentumRangeParamMap, AlignableComparator> AlignableToMomentumRangeMap;
0077 typedef AlignableToMomentumRangeMap::value_type AlignableToMomentumRangePair;
0078 typedef std::map<unsigned int, Alignable *> IdToAlignableMap;
0079 typedef std::map<unsigned int, unsigned int> UintUintMap;
0080
0081 std::vector<std::string> decompose(const std::string &s, std::string::value_type delimiter) const;
0082 std::vector<unsigned int> convertParamSel(const std::string &selString) const;
0083 unsigned int buildMomentumDependencyMap(AlignableTracker *aliTracker,
0084 AlignableMuon *aliMuon,
0085 AlignableExtras *extras,
0086 const edm::ParameterSet &config);
0087
0088
0089 unsigned int buildMap(const align::Alignables &);
0090
0091 unsigned int buildReverseMap();
0092
0093
0094 AlignableToIdMap theAlignableToIdMap;
0095 AlignableToMomentumRangeMap theAlignableToMomentumRangeMap;
0096 IdToAlignableMap theIdToAlignableMap;
0097 UintUintMap theLasBeamToLabelMap;
0098 UintUintMap theLabelToLasBeamMap;
0099 const MomentumRange theOpenMomentumRange;
0100 unsigned int theMaxNumberOfParameterInstances;
0101 };
0102
0103 #endif