Go to the documentation of this file.00001 #ifndef PEDELABELER_H
00002 #define PEDELABELER_H
00003
00016 #include <vector>
00017 #include <map>
00018
00019 #include <Alignment/MillePedeAlignmentAlgorithm/interface/PedeLabelerBase.h>
00020
00021 #include "FWCore/ParameterSet/interface/ParameterSet.h"
00022
00023
00024
00025 class PedeLabeler : public PedeLabelerBase
00026 {
00027 public:
00028
00030 PedeLabeler(const PedeLabelerBase::TopLevelAlignables &alignables,
00031 const edm::ParameterSet &config);
00033 ~PedeLabeler();
00034
00038 unsigned int alignableLabel(Alignable *alignable) const;
00039 unsigned int alignableLabelFromParamAndInstance(Alignable *alignable,
00040 unsigned int param,
00041 unsigned int instance) const;
00042 unsigned int lasBeamLabel(unsigned int lasBeamId) const;
00043 unsigned int parameterLabel(unsigned int aliLabel, unsigned int parNum) const;
00044 unsigned int parameterLabel(Alignable *alignable, unsigned int parNum,
00045 const AlignmentAlgorithmBase::EventInfo &eventInfo,
00046 const TrajectoryStateOnSurface &tsos) const {
00047 return parameterLabel(alignableLabel(alignable), parNum);
00048 }
00049 bool hasSplitParameters(Alignable *alignable) const { return false; }
00050 unsigned int numberOfParameterInstances(Alignable *alignable,
00051 int param=-1) const { return 1; }
00052
00054 unsigned int paramNumFromLabel(unsigned int paramLabel) const;
00056 unsigned int alignableLabelFromLabel(unsigned int label) const;
00059 Alignable* alignableFromLabel(unsigned int label) const;
00062 unsigned int lasBeamIdFromLabel(unsigned int label) const;
00063
00064 private:
00065 typedef std::map <Alignable*, unsigned int> AlignableToIdMap;
00066 typedef AlignableToIdMap::value_type AlignableToIdPair;
00067 typedef std::map <unsigned int, Alignable*> IdToAlignableMap;
00068 typedef std::map <unsigned int, unsigned int> UintUintMap;
00069
00071 unsigned int buildMap(const std::vector<Alignable*> &alis);
00073 unsigned int buildReverseMap();
00074
00075
00076 AlignableToIdMap theAlignableToIdMap;
00077 IdToAlignableMap theIdToAlignableMap;
00078 UintUintMap theLasBeamToLabelMap;
00079 UintUintMap theLabelToLasBeamMap;
00080 };
00081
00082 #endif