CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_1/src/Alignment/MillePedeAlignmentAlgorithm/interface/PedeLabelerBase.h

Go to the documentation of this file.
00001 #ifndef Alignment_MillePedeAlignmentAlgorithm_PedeLabelerBase_h
00002 #define Alignment_MillePedeAlignmentAlgorithm_PedeLabelerBase_h
00003 
00015 #include "FWCore/ParameterSet/interface/ParameterSet.h"
00016 
00017 #include "Alignment/CommonAlignmentAlgorithm/interface/AlignmentAlgorithmBase.h"
00018 #include "TrackingTools/TrajectoryState/interface/TrajectoryStateOnSurface.h"
00019 
00020 #include "CondFormats/Common/interface/Time.h"
00021 
00022 class Alignable;
00023 class AlignableTracker;
00024 class AlignableMuon;
00025 class AlignableExtras;
00026 
00027 /***************************************
00028 ****************************************/
00029 class PedeLabelerBase
00030 {
00031  public:
00032 
00033   typedef AlignmentAlgorithmBase::RunNumber  RunNumber;
00034   typedef AlignmentAlgorithmBase::RunRange   RunRange;
00035   typedef std::vector<RunRange>              RunRanges;
00036 
00037   class TopLevelAlignables
00038   {
00039   public:
00040     TopLevelAlignables(AlignableTracker *aliTracker,
00041                        AlignableMuon *aliMuon,
00042                        AlignableExtras *extras)
00043       :aliTracker_(aliTracker), aliMuon_(aliMuon), aliExtras_(extras) {}
00044     AlignableTracker *aliTracker_;
00045     AlignableMuon *aliMuon_;
00046     AlignableExtras *aliExtras_;
00047   };
00048 
00050   PedeLabelerBase(const TopLevelAlignables& alignables,
00051                   const edm::ParameterSet & config);
00053   virtual ~PedeLabelerBase() {}
00054     
00058   virtual unsigned int alignableLabel(Alignable *alignable) const = 0;
00063   virtual unsigned int alignableLabelFromParamAndInstance(Alignable *alignable,
00064                                                           unsigned int param,
00065                                                           unsigned int instance) const = 0;
00066   virtual unsigned int lasBeamLabel(unsigned int lasBeamId) const = 0;
00068   virtual unsigned int parameterLabel(unsigned int aliLabel, unsigned int parNum) const = 0;
00071   virtual unsigned int parameterLabel(Alignable *alignable, unsigned int parNum,
00072                                       const AlignmentAlgorithmBase::EventInfo &eventInfo,
00073                                       const TrajectoryStateOnSurface &tsos) const = 0;
00075   virtual bool hasSplitParameters(Alignable *alignable) const = 0;
00077   virtual unsigned int numberOfParameterInstances(Alignable *alignable,
00078                                                   int param=-1) const = 0;
00079 
00081   virtual unsigned int paramNumFromLabel(unsigned int paramLabel) const = 0;
00083   virtual unsigned int alignableLabelFromLabel(unsigned int label) const = 0;
00086   virtual Alignable* alignableFromLabel(unsigned int label) const = 0;
00089   virtual unsigned int lasBeamIdFromLabel(unsigned int label) const = 0;
00090   virtual const RunRange& runRangeFromLabel(unsigned int label) const {
00091     return theOpenRunRange;
00092   }
00093   
00094   static const unsigned int theMaxNumParam;
00095   static const unsigned int theParamInstanceOffset;
00096   static const unsigned int theMinLabel;
00097 
00098  protected:
00099 
00100   const RunRange theOpenRunRange;
00101 };
00102 
00103 #endif