33 scalertag_{consumes<BeamSpotOnlineCollection>(ps.getUntrackedParameter<
InputTag>(
"scalarBSCollection"))},
34 trkSrc_{consumes<reco::TrackCollection>(ps.getUntrackedParameter<
InputTag>(
"pixelTracks"))},
36 nCosmicTrk_{ps.getUntrackedParameter<
int>(
"nCosmicTrk")},
38 debug_{ps.getUntrackedParameter<
bool>(
"Debug")},
39 onlineMode_{ps.getUntrackedParameter<
bool>(
"OnlineMode")},
40 doTest_{ps.getUntrackedParameter<
bool>(
"doTest")},
49 monitorName_ = ps.getUntrackedParameter<
string>(
"monitorName");
57 desc.
addUntracked<
string>(
"monitorName",
"BeamSpotProblemMonitor");
68 oDesc.
add(
"dqmBeamSpotProblemMonitor", desc);
76 const string coord{
"BeamSpotStatus"};
78 string histName(coord +
"_lumi");
80 const string ytitle(
"Problem (-1) / OK (1)");
81 const string xtitle(
"Lumisection");
97 beamSpotError_ = iB.
book1D(
"BeamSpotError",
"ERROR: Beamspot missing from scalars", 20, 0.5, 20.5);
110 edm::LogInfo(
"BeamSpotProblemMonitor") <<
"dqmBeginLuminosityBlock:: Next Lumi to Fit: " <<
nextlumi_ << endl;
116 edm::LogInfo(
"BeamSpotProblemMonitor") <<
" dqmBeginLuminosityBlock:: Next Lumi to Fit: " <<
nextlumi_ << endl;
121 edm::LogInfo(
"BeamSpotProblemMonitor") <<
" dqmBeginLuminosityBlock:: Begin of Lumi: " << nthlumi << endl;
129 edm::LogInfo(
"BeamSpotProblemMonitor") <<
"analyze:: Spilt event from previous lumi section!" << std::endl;
133 edm::LogInfo(
"BeamSpotProblemMonitor") <<
"analyze:: Spilt event from next lumi section!!!" << std::endl;
142 std::array<bool, 6> dcsTk;
143 for (
auto&
e : dcsTk) {
146 for (
auto const&
status : *dcsStatus) {
162 for (
auto status : dcsTk) {
172 for (
auto const&
track : *trackCollection) {
173 if (
track.pt() > 1.0)
186 bool fallBackToDB =
false;
189 if (!handleScaler->empty()) {
190 spotOnline = *(handleScaler->begin());
193 if (spotOnline.
x() == 0. && spotOnline.
y() == 0. && spotOnline.
z() == 0. && spotOnline.
width_x() == 0. &&
204 if (allTkOn && fallBackToDB) {
207 if (allTkOn && (!fallBackToDB)) {
223 int currentlumi = nextlumi;
224 lastlumi = currentlumi;
245 int LSgap_bs = currentlumi /
fitNLumi_ - countLS_bs;
250 for (
int ig = 0; ig < LSgap_bs; ig++) {
272 if (beamSpotQReport) {
285 <<
"dqmEndLuminosityBlock:: Lumi of the last event before dqmEndLuminosityBlock: " << nthlumi << endl;
291 edm::LogInfo(
"BeamSpotProblemMonitor") <<
"dqmEndRun:: Clearing all the Maps " << endl;
LuminosityBlockID id() const
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX)
T getUntrackedParameter(std::string const &, T const &) const
const edm::EDGetTokenT< BeamSpotOnlineCollection > scalertag_
void dqmEndRun(const edm::Run &r, const edm::EventSetup &c) override
ParameterDescriptionBase * addUntracked(U const &iLabel, T const &value)
MonitorElement * beamSpotStatusLumi_
static void fillDescriptions(edm::ConfigurationDescriptions &)
bool getByToken(EDGetToken token, Handle< PROD > &result) const
void fillPlots(int &, int &, int)
void setCurrentFolder(std::string const &fullpath)
edm::LuminosityBlockNumber_t luminosityBlock() const
MonitorElement * beamSpotStatusLumiAll_
const QReport * getQReport(const std::string &qtname) const
get QReport corresponding to <qtname> (null pointer if QReport does not exist)
LuminosityBlockNumber_t luminosityBlock() const
virtual void Reset()
reset ME (ie. contents, errors, etc)
DQM_DEPRECATED void ShiftFillLast(double y, double ye=0., int32_t xscale=1)
#define DEFINE_FWK_MODULE(type)
BeamSpotProblemMonitor(const edm::ParameterSet &)
void bookHistograms(DQMStore::IBooker &i, const edm::Run &r, const edm::EventSetup &c) override
void analyze(const edm::Event &e, const edm::EventSetup &c) override
const int alarmONThreshold_
virtual void setBinContent(int binx, double content)
set content of bin (1-D)
LuminosityBlockNumber_t luminosityBlock() const
void add(std::string const &label, ParameterSetDescription const &psetDescription)
const edm::EDGetTokenT< DcsStatusCollection > dcsStatus_
void dqmEndLuminosityBlock(const edm::LuminosityBlock &lumiSeg, const edm::EventSetup &c) override
void dqmBeginLuminosityBlock(const edm::LuminosityBlock &lumiSeg, const edm::EventSetup &context) override
const edm::EDGetTokenT< reco::TrackCollection > trkSrc_
MonitorElement * beamSpotError_
virtual void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
const int alarmOFFThreshold_