Go to the documentation of this file.00001 #ifndef RUNRANGEDEPENDENTPEDELABELER_H
00002 #define RUNRANGEDEPENDENTPEDELABELER_H
00003
00016 #include <vector>
00017 #include <map>
00018
00019 #include <Alignment/MillePedeAlignmentAlgorithm/interface/PedeLabelerBase.h>
00020
00021 #include "CondFormats/Common/interface/Time.h"
00022
00023 #include "FWCore/ParameterSet/interface/ParameterSet.h"
00024
00025 namespace edm {
00026 class EventID;
00027 }
00028
00029
00030
00031 class RunRangeDependentPedeLabeler : public PedeLabelerBase
00032 {
00033 public:
00034
00036 RunRangeDependentPedeLabeler(const PedeLabelerBase::TopLevelAlignables& alignables,
00037 const edm::ParameterSet& config);
00039 ~RunRangeDependentPedeLabeler();
00040
00044 unsigned int alignableLabel(Alignable *alignable) const;
00049 unsigned int alignableLabelFromParamAndInstance(Alignable *alignable,
00050 unsigned int param,
00051 unsigned int instance) const;
00052 unsigned int lasBeamLabel(unsigned int lasBeamId) const;
00054 unsigned int parameterLabel(unsigned int aliLabel, unsigned int parNum) const;
00057 unsigned int parameterLabel(Alignable *alignable, unsigned int parNum,
00058 const AlignmentAlgorithmBase::EventInfo &eventInfo,
00059 const TrajectoryStateOnSurface &tsos) const;
00061 bool hasSplitParameters(Alignable *alignable) const;
00063 unsigned int numberOfParameterInstances(Alignable *alignable, int param=-1) const;
00064 unsigned int maxNumberOfParameterInstances() const { return theMaxNumberOfParameterInstances; }
00065
00067 unsigned int paramNumFromLabel(unsigned int paramLabel) const;
00069 unsigned int alignableLabelFromLabel(unsigned int label) const;
00072 Alignable* alignableFromLabel(unsigned int label) const;
00075 unsigned int lasBeamIdFromLabel(unsigned int label) const;
00076 const RunRange& runRangeFromLabel(unsigned int label) const;
00077
00078 private:
00079
00080 typedef std::map<Alignable*, unsigned int> AlignableToIdMap;
00081 typedef AlignableToIdMap::value_type AlignableToIdPair;
00082 typedef std::vector<RunRange> RunRangeVector;
00083 typedef std::map<unsigned int, RunRangeVector> RunRangeParamMap;
00084 typedef std::map<Alignable*, RunRangeParamMap> AlignableToRunRangeRangeMap;
00085 typedef AlignableToRunRangeRangeMap::value_type AlignableToRunRangeRangePair;
00086 typedef std::map<unsigned int, Alignable*> IdToAlignableMap;
00087 typedef std::map<unsigned int, unsigned int> UintUintMap;
00088
00089 unsigned int runRangeIndexFromLabel(unsigned int label) const;
00090
00091 std::vector<std::string> decompose(const std::string &s, std::string::value_type delimiter) const;
00092 std::vector<unsigned int> convertParamSel(const std::string &selString) const;
00093 unsigned int buildRunRangeDependencyMap(AlignableTracker *aliTracker, AlignableMuon* aliMuon,
00094 AlignableExtras *extras,
00095 const edm::ParameterSet &config);
00096
00098 unsigned int buildMap(const std::vector<Alignable*> &alis);
00100 unsigned int buildReverseMap();
00101
00102
00103 AlignableToIdMap theAlignableToIdMap;
00104 AlignableToRunRangeRangeMap theAlignableToRunRangeRangeMap;
00105 IdToAlignableMap theIdToAlignableMap;
00106 UintUintMap theLasBeamToLabelMap;
00107 UintUintMap theLabelToLasBeamMap;
00108 unsigned int theMaxNumberOfParameterInstances;
00109 };
00110
00111 #endif