CMS 3D CMS Logo

KalmanAlignmentAlgorithm.h

Go to the documentation of this file.
00001 #ifndef Alignment_KalmanAlignmentAlgorithm_KalmanAlignmentAlgorithm_h
00002 #define Alignment_KalmanAlignmentAlgorithm_KalmanAlignmentAlgorithm_h
00003 
00004 #include "Alignment/CommonAlignment/interface/Alignable.h"
00005 #include "Alignment/CommonAlignmentAlgorithm/interface/AlignmentAlgorithmBase.h"
00006 #include "Alignment/ReferenceTrajectories/interface/TrajectoryFactoryBase.h"
00007 
00008 #include "Alignment/KalmanAlignmentAlgorithm/interface/KalmanAlignmentSetup.h"
00009 #include "Alignment/KalmanAlignmentAlgorithm/interface/KalmanAlignmentTrackRefitter.h"
00010 
00011 #include <set>
00012 
00017 
00018 class AlignableNavigator;
00019 class AlignmentParameterSelector;
00020 class TrajectoryFitter;
00021 
00022 class KalmanAlignmentAlgorithm : public AlignmentAlgorithmBase
00023 {
00024 
00025 public:
00026 
00027   typedef TrajectoryFactoryBase::ReferenceTrajectoryPtr ReferenceTrajectoryPtr;
00028   typedef TrajectoryFactoryBase::ReferenceTrajectoryCollection ReferenceTrajectoryCollection;
00029   typedef TrajectoryFactoryBase::ExternalPredictionCollection ExternalPredictionCollection;
00030 
00031   typedef KalmanAlignmentTracklet::TrackletPtr TrackletPtr;
00032   typedef std::vector< TrackletPtr > TrackletCollection;
00033 
00034   typedef KalmanAlignmentSetup AlignmentSetup;
00035   typedef std::vector< AlignmentSetup* > AlignmentSetupCollection;
00036 
00037 
00038   KalmanAlignmentAlgorithm( const edm::ParameterSet& config );
00039   virtual ~KalmanAlignmentAlgorithm( void );
00040 
00043   virtual void produce( edm::Event&, const edm::EventSetup& ) {}
00044 
00045   virtual void initialize( const edm::EventSetup& setup, 
00046                            AlignableTracker* tracker,
00047                            AlignableMuon* muon,
00048                            AlignmentParameterStore* store );
00049 
00050   virtual void terminate( void );
00051 
00052   virtual void run( const edm::EventSetup& setup,
00053                     const ConstTrajTrackPairCollection& tracks );
00054 
00055   inline bool operator()( const Alignable* a1, const Alignable* a2 ) const { return ( a1->id() < a2->id() ); }
00056 
00057 private:
00058 
00059   void initializeAlignmentParameters( const edm::EventSetup& setup );
00060 
00061   void initializeAlignmentSetups( const edm::EventSetup& setup );
00062 
00063   inline const PropagationDirection getDirection( const std::string& dir ) const
00064     { return ( dir == "alongMomentum" ) ? alongMomentum : oppositeToMomentum; }
00065 
00066   inline const PropagationDirection oppositeDirection( const PropagationDirection dir ) const
00067     { return ( dir == alongMomentum ) ? oppositeToMomentum : alongMomentum; }
00068 
00069   const KalmanAlignmentSetup::SortingDirection getSortingDirection( const std::string& sortDir ) const;
00070 
00071   edm::ParameterSet theConfiguration;
00072 
00073   AlignmentSetupCollection theAlignmentSetups;
00074 
00075   KalmanAlignmentTrackRefitter* theRefitter;
00076 
00077   AlignmentParameterStore* theParameterStore;
00078   AlignableNavigator* theNavigator;
00079   AlignmentParameterSelector* theSelector;
00080 
00081 };
00082 
00083 #endif

Generated on Tue Jun 9 17:24:03 2009 for CMSSW by  doxygen 1.5.4