CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_6_1_1/src/Alignment/CommonAlignmentAlgorithm/interface/IntegratedCalibrationBase.h

Go to the documentation of this file.
00001 #ifndef Alignment_CommonAlignmentAlgorithm_IntegratedCalibrationBase_h
00002 #define Alignment_CommonAlignmentAlgorithm_IntegratedCalibrationBase_h
00003 
00023 #include "Alignment/CommonAlignmentAlgorithm/interface/AlignmentAlgorithmBase.h"
00024 
00025 #include <vector>
00026 #include <utility>
00027 #include <string>
00028 
00029 class AlignableTracker;
00030 class AlignableMuon;
00031 class AlignableExtras;
00032 
00033 class TrajectoryStateOnSurface;
00034 class TransientTrackingRecHit;
00035 
00036 namespace edm { class EventSetup; class ParameterSet; } 
00037 
00038 class IntegratedCalibrationBase
00039 {
00040 public:
00041 
00042   typedef AlignmentAlgorithmBase::EventInfo EventInfo;
00043   typedef std::pair<double,double> Values; 
00044   typedef std::pair<Values, unsigned int> ValuesIndexPair; 
00045 
00047   explicit IntegratedCalibrationBase(const edm::ParameterSet &cfg);
00048   
00050   virtual ~IntegratedCalibrationBase() {};
00051 
00053   virtual unsigned int numParameters() const = 0;
00054 
00058   virtual std::vector<Values> derivatives(const TransientTrackingRecHit &hit,
00059                                           const TrajectoryStateOnSurface &tsos,
00060                                           const edm::EventSetup &setup,
00061                                           const EventInfo &eventInfo) const;
00062 
00067   virtual unsigned int derivatives(std::vector<ValuesIndexPair> &outDerivInds,
00068                                    const TransientTrackingRecHit &hit,
00069                                    const TrajectoryStateOnSurface &tsos,
00070                                    const edm::EventSetup &setup,
00071                                    const EventInfo &eventInfo) const = 0;
00072 
00075   virtual bool setParameter(unsigned int index, double value) = 0;
00076 
00079   virtual bool setParameterError(unsigned int index, double value) = 0;
00080 
00083   virtual double getParameter(unsigned int index) const = 0;
00084 
00087   virtual double getParameterError(unsigned int index) const = 0;
00088 
00091   virtual void beginOfJob(const AlignableTracker *tracker,
00092                           const AlignableMuon *muon,
00093                           const AlignableExtras *extras) {};
00094 
00098   virtual void startNewLoop() {};
00099 
00103   virtual void endOfLoop() {};
00104 
00109   virtual void endOfJob() = 0;
00110 
00111   /* /// called at begin of run */
00112   /* virtual void beginRun(const edm::EventSetup &setup) {}; */
00113 
00114   /* /// called at end of run - order of arguments like in EDProducer etc. */
00115   /* virtual void endRun(const EndRunInfo &runInfo, const edm::EventSetup &setup) {}; */
00116 
00117   /* /// called at begin of luminosity block (no lumi block info passed yet) */
00118   /* virtual void beginLuminosityBlock(const edm::EventSetup &setup) {}; */
00119 
00120   /* /// called at end of luminosity block (no lumi block info passed yet) */
00121   /* virtual void endLuminosityBlock(const edm::EventSetup &setup) {}; */
00122 
00124   const std::string& name() const { return name_;} // non-virtual since refering to private member
00125 
00126  private:
00127   const std::string name_; 
00128 };
00129 
00130 #endif