CMS 3D CMS Logo

AlcaBeamMonitor.h
Go to the documentation of this file.
1 #ifndef DQM_BeamMonitor_AlcaBeamMonitor_h
2 #define DQM_BeamMonitor_AlcaBeamMonitor_h
3 
9 // C++
10 #include <map>
11 #include <vector>
12 #include <string>
13 // CMS
26 
27 class BeamFitter;
28 class PVFitter;
29 
30 namespace alcabeammonitor {
31  struct NoCache {};
32 } // namespace alcabeammonitor
33 
34 class AlcaBeamMonitor : public DQMOneEDAnalyzer<edm::LuminosityBlockCache<alcabeammonitor::NoCache>> {
35 public:
38 
39 protected:
40  void bookHistograms(DQMStore::IBooker&, edm::Run const&, edm::EventSetup const&) override;
41  void analyze(const edm::Event& iEvent, const edm::EventSetup& iSetup) override;
42  std::shared_ptr<alcabeammonitor::NoCache> globalBeginLuminosityBlock(const edm::LuminosityBlock& iLumi,
43  const edm::EventSetup& iSetup) const override;
44  void globalEndLuminosityBlock(const edm::LuminosityBlock& iLumi, const edm::EventSetup& iSetup) override;
45  void dqmEndRun(edm::Run const&, edm::EventSetup const&) override;
46 
47 private:
48  //Typedefs
49  // BF,BS...
50  typedef std::map<std::string, reco::BeamSpot> BeamSpotContainer;
51  // x,y,z,sigmax(y,z)... [run,lumi] Histo name
52  typedef std::map<std::string, std::map<std::string, std::map<std::string, MonitorElement*>>> HistosContainer;
53  // x,y,z,sigmax(y,z)... [run,lumi] Histo name
54  typedef std::map<std::string, std::map<std::string, std::map<std::string, int>>> PositionContainer;
55 
56  //Parameters
62 
63  //Service variables
65  std::unique_ptr<BeamFitter> theBeamFitter_;
66  std::unique_ptr<PVFitter> thePVFitter_;
68  mutable std::vector<int> processedLumis_;
69 
70  // MonitorElements:
73  //mutable MonitorElement* theValuesContainer_;
74 
75  //Containers
79  std::vector<std::string> varNamesV_; //x,y,z,sigmax(y,z)
80  std::multimap<std::string, std::string> histoByCategoryNames_; //run, lumi
81  mutable std::vector<reco::VertexCollection> vertices_;
82 };
83 
84 #endif
AlcaBeamMonitor::bookHistograms
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
Definition: AlcaBeamMonitor.cc:99
AlcaBeamMonitor::HistosContainer
std::map< std::string, std::map< std::string, std::map< std::string, MonitorElement * > > > HistosContainer
Definition: AlcaBeamMonitor.h:52
AlcaBeamMonitor::vertices_
std::vector< reco::VertexCollection > vertices_
Definition: AlcaBeamMonitor.h:81
edm::LuminosityBlock
Definition: LuminosityBlock.h:50
edm::Run
Definition: Run.h:45
edm::EDGetTokenT< reco::VertexCollection >
AlcaBeamMonitor::numberOfProcessedLumis_
int numberOfProcessedLumis_
Definition: AlcaBeamMonitor.h:67
AlcaBeamMonitor::PositionContainer
std::map< std::string, std::map< std::string, std::map< std::string, int > > > PositionContainer
Definition: AlcaBeamMonitor.h:54
DQMOneEDAnalyzer
Definition: DQMOneEDAnalyzer.h:20
DQMStore.h
dqm::legacy::MonitorElement
Definition: MonitorElement.h:461
AlcaBeamMonitor
Definition: AlcaBeamMonitor.h:34
alcabeammonitor
Definition: AlcaBeamMonitor.h:30
AlcaBeamMonitor::globalEndLuminosityBlock
void globalEndLuminosityBlock(const edm::LuminosityBlock &iLumi, const edm::EventSetup &iSetup) override
Definition: AlcaBeamMonitor.cc:317
AlcaBeamMonitor::monitorName_
std::string monitorName_
Definition: AlcaBeamMonitor.h:57
ESGetToken.h
LuminosityBlockID.h
DQMOneEDAnalyzer.h
AlcaBeamMonitor::varNamesV_
std::vector< std::string > varNamesV_
Definition: AlcaBeamMonitor.h:79
BeamSpotObjects.h
BeamSpotObjectsRcd.h
BeamSpot.h
AlcaBeamMonitor::beamSpotsMap_
BeamSpotContainer beamSpotsMap_
Definition: AlcaBeamMonitor.h:76
AlcaBeamMonitor::numberOfValuesToSave_
int numberOfValuesToSave_
Definition: AlcaBeamMonitor.h:64
BeamFitter
Definition: BeamFitter.h:41
AlcaBeamMonitor::dqmEndRun
void dqmEndRun(edm::Run const &, edm::EventSetup const &) override
Definition: AlcaBeamMonitor.cc:491
AlcaBeamMonitor::globalBeginLuminosityBlock
std::shared_ptr< alcabeammonitor::NoCache > globalBeginLuminosityBlock(const edm::LuminosityBlock &iLumi, const edm::EventSetup &iSetup) const override
Definition: AlcaBeamMonitor.cc:223
AlcaBeamMonitor::AlcaBeamMonitor
AlcaBeamMonitor(const edm::ParameterSet &)
Definition: AlcaBeamMonitor.cc:31
edm::ConfigurationDescriptions
Definition: ConfigurationDescriptions.h:28
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
Vertex.h
AlcaBeamMonitor::hD0Phi0_
MonitorElement * hD0Phi0_
Definition: AlcaBeamMonitor.h:71
AlcaBeamMonitor::BeamSpotContainer
std::map< std::string, reco::BeamSpot > BeamSpotContainer
Definition: AlcaBeamMonitor.h:50
edm::ParameterSet
Definition: ParameterSet.h:47
Event.h
AlcaBeamMonitor::primaryVertexLabel_
const edm::EDGetTokenT< reco::VertexCollection > primaryVertexLabel_
Definition: AlcaBeamMonitor.h:58
iEvent
int iEvent
Definition: GenABIO.cc:224
PVFitter
Definition: PVFitter.h:45
AlcaBeamMonitor::processedLumis_
std::vector< int > processedLumis_
Definition: AlcaBeamMonitor.h:68
edm::EventSetup
Definition: EventSetup.h:57
AlcaBeamMonitor::scalerLabel_
const edm::EDGetTokenT< reco::BeamSpot > scalerLabel_
Definition: AlcaBeamMonitor.h:60
edm::ESGetToken< BeamSpotObjects, BeamSpotObjectsRcd >
AlcaBeamMonitor::histoByCategoryNames_
std::multimap< std::string, std::string > histoByCategoryNames_
Definition: AlcaBeamMonitor.h:80
VertexFwd.h
AlcaBeamMonitor::analyze
void analyze(const edm::Event &iEvent, const edm::EventSetup &iSetup) override
Definition: AlcaBeamMonitor.cc:275
AlcaBeamMonitor::thePVFitter_
std::unique_ptr< PVFitter > thePVFitter_
Definition: AlcaBeamMonitor.h:66
AlcaBeamMonitor::theBeamFitter_
std::unique_ptr< BeamFitter > theBeamFitter_
Definition: AlcaBeamMonitor.h:65
AlcaBeamMonitor::trackLabel_
const edm::EDGetTokenT< reco::TrackCollection > trackLabel_
Definition: AlcaBeamMonitor.h:59
AlcaBeamMonitor::positionsMap_
PositionContainer positionsMap_
Definition: AlcaBeamMonitor.h:78
Frameworkfwd.h
AlcaBeamMonitor::fillDescriptions
static void fillDescriptions(edm::ConfigurationDescriptions &)
Definition: AlcaBeamMonitor.cc:84
alcabeammonitor::NoCache
Definition: AlcaBeamMonitor.h:31
AlcaBeamMonitor::histosMap_
HistosContainer histosMap_
Definition: AlcaBeamMonitor.h:77
dqm::implementation::IBooker
Definition: DQMStore.h:43
ParameterSet.h
edm::Event
Definition: Event.h:73
AlcaBeamMonitor::beamSpotToken_
const edm::ESGetToken< BeamSpotObjects, BeamSpotObjectsRcd > beamSpotToken_
Definition: AlcaBeamMonitor.h:61
AlcaBeamMonitor::hDxyBS_
MonitorElement * hDxyBS_
Definition: AlcaBeamMonitor.h:72