36 dcsStatus_{consumes<DcsStatusCollection>(
39 ps.getUntrackedParameter<
InputTag>(
"scalarBSCollection"))},
40 trkSrc_{consumes<reco::TrackCollection>(
41 ps.getUntrackedParameter<
InputTag>(
"pixelTracks"))},
43 nCosmicTrk_{ps.getUntrackedParameter<
int>(
"nCosmicTrk")},
45 debug_{ps.getUntrackedParameter<
bool>(
"Debug")},
46 onlineMode_{ps.getUntrackedParameter<
bool>(
"OnlineMode")},
47 doTest_{ps.getUntrackedParameter<
bool>(
"doTest")},
57 monitorName_ = ps.getUntrackedParameter<
string>(
"monitorName");
65 desc.
addUntracked<
string>(
"monitorName",
"BeamSpotProblemMonitor");
76 oDesc.
add(
"dqmBeamSpotProblemMonitor",desc);
87 const string coord{
"BeamSpotStatus"};
89 string histName(coord +
"_lumi");
90 string histTitle(coord);
91 const string ytitle(
"Problem (-1) / OK (1)");
92 const string xtitle(
"Lumisection");
123 edm::LogInfo(
"BeamSpotProblemMonitor") <<
"beginLuminosityBlock:: Next Lumi to Fit: " <<
nextlumi_ << endl;
129 edm::LogInfo(
"BeamSpotProblemMonitor") <<
" beginLuminosityBlock:: Next Lumi to Fit: " <<
nextlumi_ << endl;
133 edm::LogInfo(
"BeamSpotProblemMonitor") <<
" beginLuminosityBlock:: Begin of Lumi: " << nthlumi << endl;
145 edm::LogInfo(
"BeamSpotProblemMonitor") <<
"analyze:: Spilt event from previous lumi section!" << std::endl;
149 edm::LogInfo(
"BeamSpotProblemMonitor") <<
"analyze:: Spilt event from next lumi section!!!" << std::endl;
159 std::array<bool,6> dcsTk;
160 for (
auto &
e: dcsTk) {
e=
true; }
161 for (
auto const&
status: *dcsStatus ) {
171 for (
auto status: dcsTk) {
182 for (
auto const&
track : *trackCollection) {
196 bool fallBackToDB=
false;
200 if (!handleScaler->empty()) {
201 spotOnline = * ( handleScaler->begin() );
204 if ( spotOnline.
x() == 0. &&
205 spotOnline.
y() == 0. &&
206 spotOnline.
z() == 0. &&
232 int currentlumi = nextlumi;
233 lastlumi = currentlumi;
256 int LSgap_bs = currentlumi/
fitNLumi_ - countLS_bs;
257 if (currentlumi%
fitNLumi_ == 0)LSgap_bs--;
261 for (
int ig = 0; ig < LSgap_bs; ig++) {
294 edm::LogInfo(
"BeamSpotProblemMonitor") <<
"endLuminosityBlock:: Lumi of the last event before endLuminosityBlock: " << nthlumi << endl;
300 if(
debug_)
edm::LogInfo(
"BeamSpotProblemMonitor") <<
"endRun:: Clearing all the Maps "<<endl;
LuminosityBlockID id() const
void beginLuminosityBlock(const edm::LuminosityBlock &lumiSeg, const edm::EventSetup &context) override
T getUntrackedParameter(std::string const &, T const &) const
const edm::EDGetTokenT< BeamSpotOnlineCollection > scalertag_
const QReport * getQReport(const std::string &qtname) const
get QReport corresponding to <qtname> (null pointer if QReport does not exist)
void setBinContent(int binx, double content)
set content of bin (1-D)
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)
edm::LuminosityBlockNumber_t luminosityBlock() const
void endLuminosityBlock(const edm::LuminosityBlock &lumiSeg, const edm::EventSetup &c) override
MonitorElement * beamSpotStatusLumiAll_
LuminosityBlockNumber_t luminosityBlock() const
void ShiftFillLast(double y, double ye=0., int32_t xscale=1)
#define DEFINE_FWK_MODULE(type)
void setCurrentFolder(std::string const &fullpath)
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
MonitorElement * book1D(Args &&...args)
void endRun(const edm::Run &r, const edm::EventSetup &c) override
void Reset()
reset ME (ie. contents, errors, etc)
const int alarmONThreshold_
LuminosityBlockNumber_t luminosityBlock() const
void add(std::string const &label, ParameterSetDescription const &psetDescription)
const edm::EDGetTokenT< DcsStatusCollection > dcsStatus_
const edm::EDGetTokenT< reco::TrackCollection > trkSrc_
void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
MonitorElement * beamSpotError_
const int alarmOFFThreshold_