CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_4_1_8_patch13/src/Alignment/MillePedeAlignmentAlgorithm/src/PedeLabeler.h

Go to the documentation of this file.
00001 #ifndef PEDELABELER_H
00002 #define PEDELABELER_H
00003 
00016 #include <vector>
00017 #include <map> 
00018 
00019 
00020 class Alignable;
00021 class AlignableExtras;
00022 
00023 /***************************************
00024 ****************************************/
00025 class PedeLabeler
00026 {
00027  public:
00029   PedeLabeler(const std::vector<Alignable*> &alis);
00031   PedeLabeler(Alignable *ali1, Alignable *ali2, AlignableExtras *extras);
00033   ~PedeLabeler();
00034     
00038   unsigned int alignableLabel(Alignable *alignable) const;
00039   unsigned int lasBeamLabel(unsigned int lasBeamId) const;
00040   unsigned int parameterLabel(unsigned int aliLabel, unsigned int parNum) const;
00041   
00043   unsigned int paramNumFromLabel(unsigned int paramLabel) const;
00045   unsigned int alignableLabelFromLabel(unsigned int label) const;
00048   Alignable* alignableFromLabel(unsigned int label) const;
00051   unsigned int lasBeamIdFromLabel(unsigned int label) const;
00052 
00053  private:
00054   typedef std::map <Alignable*, unsigned int> AlignableToIdMap;
00055   typedef AlignableToIdMap::value_type AlignableToIdPair;
00056   typedef std::map <unsigned int, Alignable*> IdToAlignableMap;
00057   typedef std::map <unsigned int, unsigned int> UintUintMap;
00058 
00059 
00061   unsigned int buildMap(const std::vector<Alignable*> &alis);
00063   unsigned int buildReverseMap();
00064 
00065   // data members
00066   AlignableToIdMap  myAlignableToIdMap; 
00067   IdToAlignableMap  myIdToAlignableMap; 
00068   UintUintMap       myLasBeamToLabelMap;  
00069   UintUintMap       myLabelToLasBeamMap; 
00070 
00071  public:
00072   static const unsigned int theMaxNumParam;
00073   static const unsigned int theMinLabel;
00074 };
00075 
00076 #endif