CMS 3D CMS Logo

/data/doxygen/doxygen-1.7.3/gen/CMSSW_4_2_8/src/DQM/BeamMonitor/plugins/AlcaBeamMonitor.h

Go to the documentation of this file.
00001 #ifndef DQM_BeamMonitor_AlcaBeamMonitor_h
00002 #define DQM_BeamMonitor_AlcaBeamMonitor_h
00003 
00011 // C++
00012 #include <map>
00013 #include <vector>
00014 #include <string>
00015 // CMS
00016 #include "FWCore/Framework/interface/Frameworkfwd.h"
00017 #include "FWCore/Framework/interface/EDAnalyzer.h"
00018 #include "FWCore/Framework/interface/Event.h"
00019 #include "FWCore/ParameterSet/interface/ParameterSet.h"
00020 #include "DQMServices/Core/interface/DQMStore.h"
00021 #include "DQMServices/Core/interface/MonitorElement.h"
00022 #include "DataFormats/Provenance/interface/LuminosityBlockID.h"
00023 #include "DataFormats/BeamSpot/interface/BeamSpot.h"
00024 #include "DataFormats/VertexReco/interface/Vertex.h"
00025 #include "DataFormats/VertexReco/interface/VertexFwd.h"
00026 
00027 class BeamFitter;
00028 class PVFitter;
00029 
00030 class AlcaBeamMonitor : public edm::EDAnalyzer {
00031  public:
00032   AlcaBeamMonitor( const edm::ParameterSet& );
00033   ~AlcaBeamMonitor();
00034 
00035  protected:
00036 
00037   void beginJob            (void);
00038   void beginRun            (const edm::Run& iRun,              const edm::EventSetup& iSetup);
00039   void analyze             (const edm::Event& iEvent,          const edm::EventSetup& iSetup);
00040   void beginLuminosityBlock(const edm::LuminosityBlock& iLumi, const edm::EventSetup& iSetup);
00041   void endLuminosityBlock  (const edm::LuminosityBlock& iLumi, const edm::EventSetup& iSetup);
00042   void endRun              (const edm::Run& iRun,              const edm::EventSetup& iSetup);
00043   void endJob              (const edm::LuminosityBlock& iLumi, const edm::EventSetup& iSetup);
00044   
00045  private:
00046   //Typedefs
00047   //                BF,BS...         
00048   typedef std::map<std::string,reco::BeamSpot>  BeamSpotContainer;
00049   //                x,y,z,sigmax(y,z)... [run,lumi]          Histo name      
00050   typedef std::map<std::string,std::map<std::string,std::map<std::string,MonitorElement*> > > HistosContainer;
00051   //                x,y,z,sigmax(y,z)... [run,lumi]          Histo name      
00052   typedef std::map<std::string,std::map<std::string,std::map<std::string,int> > > PositionContainer;
00053 
00054   //Parameters
00055   edm::ParameterSet parameters_;
00056   std::string       monitorName_;
00057   edm::InputTag     primaryVertexLabel_;
00058   edm::InputTag     beamSpotLabel_;
00059   edm::InputTag     trackLabel_;
00060   edm::InputTag     scalerLabel_;
00061 
00062   //Service variables
00063   int         numberOfValuesToSave_;
00064   DQMStore*   dbe_;
00065   BeamFitter* theBeamFitter_;
00066   PVFitter*   thePVFitter_;
00067   
00068   // MonitorElements:
00069   MonitorElement* hD0Phi0_;
00070   MonitorElement* hDxyBS_;
00071   MonitorElement* theValuesContainer_;
00072 
00073   //Containers
00074   BeamSpotContainer                      beamSpotsMap_;
00075   HistosContainer                        histosMap_;
00076   PositionContainer                      positionsMap_;
00077   std::vector<std::string>               varNamesV_; //x,y,z,sigmax(y,z)
00078   std::multimap<std::string,std::string> histoByCategoryNames_; //run, lumi
00079   std::vector<reco::VertexCollection>    vertices_;
00080   
00081 };
00082 
00083 #endif
00084