Go to the documentation of this file.00001 #ifndef Alignment_CommonAlignmentAlgorithm_AlignmentAlgorithmBase_h
00002 #define Alignment_CommonAlignmentAlgorithm_AlignmentAlgorithmBase_h
00003
00009
00010 #include <vector>
00011 #include <utility>
00012
00013 class AlignableTracker;
00014 class AlignableMuon;
00015 class AlignableExtras;
00016 class AlignmentParameterStore;
00017 class IntegratedCalibrationBase;
00018 class Trajectory;
00019
00020
00021
00022
00023
00024
00025 #include "CondCore/DBCommon/interface/Time.h"
00026 #include "Alignment/LaserAlignment/interface/TsosVectorCollection.h"
00027 #include "DataFormats/Alignment/interface/TkFittedLasBeamCollectionFwd.h"
00028 #include "DataFormats/Alignment/interface/AliClusterValueMapFwd.h"
00029
00030 namespace edm { class EventID; class RunID; class EventSetup; class ParameterSet; }
00031 namespace reco { class Track; class BeamSpot; }
00032
00033 class AlignmentAlgorithmBase
00034 {
00035
00036 public:
00037
00038 typedef std::pair<const Trajectory*, const reco::Track*> ConstTrajTrackPair;
00039 typedef std::vector< ConstTrajTrackPair > ConstTrajTrackPairCollection;
00040 typedef cond::RealTimeType<cond::runnumber>::type RunNumber;
00041 typedef std::pair<RunNumber,RunNumber> RunRange;
00042
00044 struct EventInfo {
00045 EventInfo(const edm::EventID &eventId,
00046 const ConstTrajTrackPairCollection &trajTrackPairs,
00047 const reco::BeamSpot &beamSpot,
00048 const AliClusterValueMap *clusterValueMap)
00049 : eventId_(eventId), trajTrackPairs_(trajTrackPairs), beamSpot_(beamSpot), clusterValueMap_(clusterValueMap) {}
00050
00051 const edm::EventID &eventId_;
00052 const ConstTrajTrackPairCollection &trajTrackPairs_;
00053 const reco::BeamSpot &beamSpot_;
00054 const AliClusterValueMap *clusterValueMap_;
00055 };
00056
00058 struct EndRunInfo {
00059 EndRunInfo(const edm::RunID &runId, const TkFittedLasBeamCollection *tkLasBeams,
00060 const TsosVectorCollection *tkLasBeamTsoses)
00061 : runId_(runId), tkLasBeams_(tkLasBeams), tkLasBeamTsoses_(tkLasBeamTsoses) {}
00062 const edm::RunID &runId_;
00063 const TkFittedLasBeamCollection *tkLasBeams_;
00064 const TsosVectorCollection *tkLasBeamTsoses_;
00065 };
00066
00068 AlignmentAlgorithmBase(const edm::ParameterSet& cfg);
00069
00071 virtual ~AlignmentAlgorithmBase() {};
00072
00074 virtual void initialize( const edm::EventSetup& setup,
00075 AlignableTracker* tracker,
00076 AlignableMuon* muon,
00077 AlignableExtras* extras,
00078 AlignmentParameterStore* store ) = 0;
00083 virtual bool addCalibrations(const std::vector<IntegratedCalibrationBase*> &iCals){return false;}
00084
00087 virtual void startNewLoop() {}
00088
00090 virtual void terminate() = 0;
00091
00093 virtual void run( const edm::EventSetup &setup, const EventInfo &eventInfo) = 0;
00094
00096 virtual void beginRun(const edm::EventSetup &setup) {};
00097
00099 virtual void endRun(const EndRunInfo &runInfo, const edm::EventSetup &setup) {};
00100
00102 virtual void beginLuminosityBlock(const edm::EventSetup &setup) {};
00103
00105 virtual void endLuminosityBlock(const edm::EventSetup &setup) {};
00106
00109 virtual bool setParametersForRunRange(const RunRange& rr) { return false; };
00110 };
00111
00112 #endif