CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_1/src/Alignment/MillePedeAlignmentAlgorithm/src/RunRangeDependentPedeLabeler.h

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   
00066   unsigned int paramNumFromLabel(unsigned int paramLabel) const;
00068   unsigned int alignableLabelFromLabel(unsigned int label) const;
00071   Alignable* alignableFromLabel(unsigned int label) const;
00074   unsigned int lasBeamIdFromLabel(unsigned int label) const;
00075   const RunRange& runRangeFromLabel(unsigned int label) const;
00076 
00077  private:
00078 
00079   typedef std::map<Alignable*, unsigned int>          AlignableToIdMap;
00080   typedef AlignableToIdMap::value_type                AlignableToIdPair;
00081   typedef std::vector<RunRange>                       RunRangeVector;
00082   typedef std::map<unsigned int, RunRangeVector>      RunRangeParamMap;
00083   typedef std::map<Alignable*, RunRangeParamMap>      AlignableToRunRangeRangeMap;
00084   typedef AlignableToRunRangeRangeMap::value_type     AlignableToRunRangeRangePair;
00085   typedef std::map<unsigned int, Alignable*>          IdToAlignableMap;
00086   typedef std::map<unsigned int, unsigned int>        UintUintMap;
00087 
00088   unsigned int runRangeIndexFromLabel(unsigned int label) const;
00089 
00090   std::vector<std::string> decompose(const std::string &s, std::string::value_type delimiter) const;
00091   std::vector<unsigned int> convertParamSel(const std::string &selString) const;
00092   unsigned int buildRunRangeDependencyMap(AlignableTracker *aliTracker, AlignableMuon* aliMuon,
00093                                      AlignableExtras *extras,
00094                                      const edm::ParameterSet &config);
00095 
00097   unsigned int buildMap(const std::vector<Alignable*> &alis);
00099   unsigned int buildReverseMap();
00100 
00101   // data members
00102   AlignableToIdMap            theAlignableToIdMap; 
00103   AlignableToRunRangeRangeMap theAlignableToRunRangeRangeMap; 
00104   IdToAlignableMap            theIdToAlignableMap; 
00105   UintUintMap                 theLasBeamToLabelMap;  
00106   UintUintMap                 theLabelToLasBeamMap; 
00107 };
00108 
00109 #endif