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  bool perLSsaving_; //to avoid nanoDQMIO crashing, driven by DQMServices/Core/python/DQMStore_cfi.py
63 
64  //Service variables
66  std::unique_ptr<BeamFitter> theBeamFitter_;
67  std::unique_ptr<PVFitter> thePVFitter_;
69  mutable std::vector<int> processedLumis_;
70 
71  // MonitorElements:
74  //mutable MonitorElement* theValuesContainer_;
75 
76  //Containers
80  std::vector<std::string> varNamesV_; //x,y,z,sigmax(y,z)
81  std::multimap<std::string, std::string> histoByCategoryNames_; //run, lumi
82  mutable std::vector<reco::VertexCollection> vertices_;
83 };
84 
85 #endif
AlcaBeamMonitor::bookHistograms
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
Definition: AlcaBeamMonitor.cc:103
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:82
edm::LuminosityBlock
Definition: LuminosityBlock.h:50
edm::Run
Definition: Run.h:45
edm::EDGetTokenT< reco::VertexCollection >
AlcaBeamMonitor::numberOfProcessedLumis_
int numberOfProcessedLumis_
Definition: AlcaBeamMonitor.h:68
AlcaBeamMonitor::PositionContainer
std::map< std::string, std::map< std::string, std::map< std::string, int > > > PositionContainer
Definition: AlcaBeamMonitor.h:54
AlcaBeamMonitor::perLSsaving_
bool perLSsaving_
Definition: AlcaBeamMonitor.h:62
DQMOneEDAnalyzer
Definition: DQMOneEDAnalyzer.h:20
DQMStore.h
dqm::legacy::MonitorElement
Definition: MonitorElement.h:462
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:321
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:80
BeamSpotObjects.h
BeamSpotObjectsRcd.h
BeamSpot.h
AlcaBeamMonitor::beamSpotsMap_
BeamSpotContainer beamSpotsMap_
Definition: AlcaBeamMonitor.h:77
AlcaBeamMonitor::numberOfValuesToSave_
int numberOfValuesToSave_
Definition: AlcaBeamMonitor.h:65
BeamFitter
Definition: BeamFitter.h:41
AlcaBeamMonitor::dqmEndRun
void dqmEndRun(edm::Run const &, edm::EventSetup const &) override
Definition: AlcaBeamMonitor.cc:495
AlcaBeamMonitor::globalBeginLuminosityBlock
std::shared_ptr< alcabeammonitor::NoCache > globalBeginLuminosityBlock(const edm::LuminosityBlock &iLumi, const edm::EventSetup &iSetup) const override
Definition: AlcaBeamMonitor.cc:227
AlcaBeamMonitor::AlcaBeamMonitor
AlcaBeamMonitor(const edm::ParameterSet &)
Definition: AlcaBeamMonitor.cc:31
edm::ConfigurationDescriptions
Definition: ConfigurationDescriptions.h:28
AlcaBeamMonitor::hD0Phi0_
MonitorElement * hD0Phi0_
Definition: AlcaBeamMonitor.h:72
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:69
edm::EventSetup
Definition: EventSetup.h:58
AlcaBeamMonitor::scalerLabel_
const edm::EDGetTokenT< reco::BeamSpot > scalerLabel_
Definition: AlcaBeamMonitor.h:60
edm::ESGetToken< BeamSpotObjects, BeamSpotObjectsRcd >
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
AlcaBeamMonitor::histoByCategoryNames_
std::multimap< std::string, std::string > histoByCategoryNames_
Definition: AlcaBeamMonitor.h:81
VertexFwd.h
AlcaBeamMonitor::analyze
void analyze(const edm::Event &iEvent, const edm::EventSetup &iSetup) override
Definition: AlcaBeamMonitor.cc:279
AlcaBeamMonitor::thePVFitter_
std::unique_ptr< PVFitter > thePVFitter_
Definition: AlcaBeamMonitor.h:67
AlcaBeamMonitor::theBeamFitter_
std::unique_ptr< BeamFitter > theBeamFitter_
Definition: AlcaBeamMonitor.h:66
AlcaBeamMonitor::trackLabel_
const edm::EDGetTokenT< reco::TrackCollection > trackLabel_
Definition: AlcaBeamMonitor.h:59
AlcaBeamMonitor::positionsMap_
PositionContainer positionsMap_
Definition: AlcaBeamMonitor.h:79
Vertex.h
Frameworkfwd.h
AlcaBeamMonitor::fillDescriptions
static void fillDescriptions(edm::ConfigurationDescriptions &)
Definition: AlcaBeamMonitor.cc:87
alcabeammonitor::NoCache
Definition: AlcaBeamMonitor.h:31
AlcaBeamMonitor::histosMap_
HistosContainer histosMap_
Definition: AlcaBeamMonitor.h:78
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:73