CMS 3D CMS Logo

/afs/cern.ch/work/a/aaltunda/public/www/CMSSW_6_2_5/src/Calibration/TkAlCaRecoProducers/interface/AlcaBeamSpotManager.h

Go to the documentation of this file.
00001 #ifndef AlcaBeamSpotManager_H
00002 #define AlcaBeamSpotManager_H
00003 
00012 #include "FWCore/ParameterSet/interface/ParameterSet.h"
00013 #include "DataFormats/BeamSpot/interface/BeamSpot.h"
00014 #include "FWCore/Framework/interface/LuminosityBlock.h"
00015 //#include "DataFormats/Provenance/interface/LuminosityBlockID.h"
00016 #include <string>
00017 #include <map>
00018 #include <utility>
00019 
00020 
00021 class AlcaBeamSpotManager{
00022  public:
00023   AlcaBeamSpotManager         (void);
00024   AlcaBeamSpotManager         (const edm::ParameterSet&);
00025   virtual ~AlcaBeamSpotManager(void);
00026 
00027   void reset(void);   
00028   void readLumi(const edm::LuminosityBlock&);   
00029   void createWeightedPayloads(void);   
00030   const std::map<edm::LuminosityBlockNumber_t,reco::BeamSpot>& getPayloads(void){return beamSpotMap_;}   
00031 
00032   typedef std::map<edm::LuminosityBlockNumber_t,reco::BeamSpot>::iterator bsMap_iterator;
00033  private:
00034   reco::BeamSpot         weight  (const bsMap_iterator& begin,
00035                                   const bsMap_iterator& end);
00036   void                   weight  (double& mean,double& meanError,const double& val,const double& valError);
00037   std::pair<float,float> delta   (const float& x, const float& xError, const float& nextX, const float& nextXError);
00038   float                  deltaSig(const float& num, const float& den);
00039   std::map<edm::LuminosityBlockNumber_t,reco::BeamSpot> beamSpotMap_;
00040 
00041   std::string beamSpotOutputBase_;
00042   std::string beamSpotModuleName_;
00043   std::string beamSpotLabel_;
00044 
00045 };
00046 
00047 #endif