CMS 3D CMS Logo

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

Go to the documentation of this file.
00001 #ifndef MomentumDEPENDENTPEDELABELER_H
00002 #define MomentumDEPENDENTPEDELABELER_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 MomentumDependentPedeLabeler : public PedeLabelerBase
00026 {
00027  public:
00028 
00030   MomentumDependentPedeLabeler(const PedeLabelerBase::TopLevelAlignables& alignables,
00031                                const edm::ParameterSet& config);
00033   ~MomentumDependentPedeLabeler();
00034   
00038   unsigned int alignableLabel(Alignable *alignable) const;
00043   unsigned int alignableLabelFromParamAndInstance(Alignable *alignable,
00044                                                   unsigned int param,
00045                                                   unsigned int instance) const;
00046   unsigned int lasBeamLabel(unsigned int lasBeamId) const;
00048   unsigned int parameterLabel(unsigned int aliLabel, unsigned int parNum) const;
00051   unsigned int parameterLabel(Alignable *alignable, unsigned int parNum,
00052                               const AlignmentAlgorithmBase::EventInfo &eventInfo,
00053                               const TrajectoryStateOnSurface &tsos) const;
00055   bool hasSplitParameters(Alignable *alignable) const;
00057   unsigned int numberOfParameterInstances(Alignable *alignable, int param=-1) const;
00058   
00060   unsigned int paramNumFromLabel(unsigned int paramLabel) const;
00062   unsigned int alignableLabelFromLabel(unsigned int label) const;
00065   Alignable* alignableFromLabel(unsigned int label) const;
00068   unsigned int lasBeamIdFromLabel(unsigned int label) const;
00069 
00070  private:
00071   typedef std::map <Alignable*, unsigned int> AlignableToIdMap;
00072   typedef AlignableToIdMap::value_type AlignableToIdPair;
00073   typedef std::pair <float,float> MomentumRange;
00074   typedef std::vector <MomentumRange> MomentumRangeVector;
00075   typedef std::map <unsigned int, MomentumRangeVector> MomentumRangeParamMap;
00076   typedef std::map <Alignable*, MomentumRangeParamMap> AlignableToMomentumRangeMap;
00077   typedef AlignableToMomentumRangeMap::value_type AlignableToMomentumRangePair;
00078   typedef std::map <unsigned int, Alignable*> IdToAlignableMap;
00079   typedef std::map <unsigned int, unsigned int> UintUintMap;
00080   
00081   std::vector<std::string> decompose(const std::string &s, std::string::value_type delimiter) const;
00082   std::vector<unsigned int> convertParamSel(const std::string &selString) const;
00083   unsigned int buildMomentumDependencyMap(AlignableTracker *aliTracker, AlignableMuon* aliMuon,
00084                                           AlignableExtras *extras,
00085                                           const edm::ParameterSet &config);
00086 
00088   unsigned int buildMap(const std::vector<Alignable*> &alis);
00090   unsigned int buildReverseMap();
00091 
00092   // data members
00093   AlignableToIdMap            theAlignableToIdMap; 
00094   AlignableToMomentumRangeMap theAlignableToMomentumRangeMap; 
00095   IdToAlignableMap            theIdToAlignableMap; 
00096   UintUintMap                 theLasBeamToLabelMap;  
00097   UintUintMap                 theLabelToLasBeamMap; 
00098   const MomentumRange         theOpenMomentumRange;
00099 };
00100 
00101 #endif