87 lumiScalersToken_(consumes<LumiScalersCollection>(
config.getParameter<
edm::InputTag>(
"scalers"))),
88 lumi_binning_(getHistoPSet(
94 doPixelLumi_(
config.getParameter<
bool>(
"doPixelLumi")),
98 useBPixLayer1_(doPixelLumi_ ?
config.getParameter<
bool>(
"useBPixLayer1") :
false),
99 minNumberOfPixelsPerCluster_(doPixelLumi_ ?
config.getParameter<
int>(
"minNumberOfPixelsPerCluster") : -1),
100 minPixelClusterCharge_(doPixelLumi_ ?
config.getParameter<
double>(
"minPixelClusterCharge") : -1.),
107 if (useBPixLayer1_) {
133 auto me = booker.
book1D(
"numberOfPixelClustersVsLS",
134 "number of pixel clusters vs LS",
138 me->setAxisTitle(
"LS", 1);
139 me->setAxisTitle(
"number of pixel clusters", 2);
140 histograms.numberOfPixelClustersVsLS =
me;
143 "number of pixel clusters vs scal lumi",
149 me->setAxisTitle(
"scal inst lumi E30 [Hz cm^{-2}]", 1);
150 me->setAxisTitle(
"number of pixel clusters", 2);
151 histograms.numberOfPixelClustersVsLumi =
me;
160 me->setAxisTitle(
"LS", 1);
161 me->setAxisTitle(
"pixel-based inst lumi E30 [Hz cm^{-2}]", 2);
162 histograms.pixelLumiVsLS =
me;
165 "pixel-lumi vs scal lumi",
171 me->setAxisTitle(
"scal inst lumi E30 [Hz cm^{-2}]", 1);
172 me->setAxisTitle(
"pixel-based inst lumi E30 [Hz cm^{-2}]", 2);
173 histograms.pixelLumiVsLumi =
me;
183 me->setAxisTitle(
"LS", 1);
184 me->setAxisTitle(
"scal inst lumi E30 [Hz cm^{-2}]", 2);
185 histograms.lumiVsLS =
me;
194 me->setAxisTitle(
"LS", 1);
195 me->setAxisTitle(
"scal PU", 2);
196 histograms.puVsLS =
me;
202 int ls =
event.id().luminosityBlock();
204 float scal_lumi = -1.;
208 if (lumiScalers.
isValid() and not lumiScalers->empty()) {
209 auto scalit = lumiScalers->begin();
210 scal_lumi = scalit->instantLumi();
211 scal_pu = scalit->pileup();
216 histograms.lumiVsLS->Fill(ls, scal_lumi);
217 histograms.puVsLS->Fill(ls, scal_pu);
220 size_t pixel_clusters = 0;
221 float pixel_lumi = -1.;
230 for (
auto pixCluDet = pixelClusters->begin(); pixCluDet != pixelClusters->end(); ++pixCluDet) {
231 DetId detid = pixCluDet->detId();
234 if (tTopo.layer(detid) == 1) {
239 for (
auto pixClu = pixCluDet->begin(); pixClu != pixCluDet->end(); ++pixClu) {
251 histograms.numberOfPixelClustersVsLS->Fill(ls, pixel_clusters);
252 histograms.numberOfPixelClustersVsLumi->Fill(scal_lumi, pixel_clusters);
253 histograms.pixelLumiVsLS->Fill(ls, pixel_lumi);
254 histograms.pixelLumiVsLumi->Fill(scal_lumi, pixel_lumi);
259 pset.
add<
int>(
"nbins");
260 pset.
add<
double>(
"xmin");
261 pset.
add<
double>(
"xmax");
271 desc.
add<
bool>(
"doPixelLumi",
false);
272 desc.
add<
bool>(
"useBPixLayer1",
false);
273 desc.
add<
int>(
"minNumberOfPixelsPerCluster", 2);
274 desc.
add<
double>(
"minPixelClusterCharge", 15000.);
279 histoPSet.
add(
"pixelClusterPSet", pixelClusterPSet);
299 descriptions.
add(
"lumiMonitor", desc);
edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > const trkTopoToken_
static MEbinning getHistoPSet(const edm::ParameterSet &pset)
virtual void setCurrentFolder(std::string const &fullpath)
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &, Histograms &) const override
~LumiMonitor() override=default
float minPixelClusterCharge_
#define DEFINE_FWK_MODULE(type)
ls_binning_(getHistoPSet(iConfig.getParameter< edm::ParameterSet >("histoPSet").getParameter< edm::ParameterSet >("lsPSet")))
edm::EDGetTokenT< edmNew::DetSetVector< SiPixelCluster > > pixelClustersToken_
static constexpr double FREQ_ORBIT
dqm::reco::DQMStore DQMStore
bool getData(T &iHolder) const
edm::EDGetTokenT< LumiSummary > lumiSummaryToken_
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
static constexpr double SECONDS_PER_LS
edm::EDGetTokenT< LumiScalersCollection > lumiScalersToken_
MonitorElement * bookProfile(TString const &name, TString const &title, int nchX, double lowX, double highX, int, double lowY, double highY, char const *option="s", FUNC onbooking=NOOP())
MEbinning pixellumi_binning_
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum) ...
static void fillHistoLSPSetDescription(edm::ParameterSetDescription &pset)
ParameterDescriptionBase * add(U const &iLabel, T const &value)
static void fillHistoPSetDescription(edm::ParameterSetDescription &pset)
dqm::legacy::MonitorElement MonitorElement
static MEbinning getHistoLSPSet(const edm::ParameterSet &pset)
T getParameter(std::string const &) const
void add(std::string const &label, ParameterSetDescription const &psetDescription)
MEbinning pixelCluster_binning_
tuple config
parse the configuration file
static constexpr double rXSEC_PIXEL_CLUSTER
void dqmAnalyze(edm::Event const &, edm::EventSetup const &, Histograms const &) const override
static constexpr double CM2_TO_NANOBARN
float lumi_factor_per_bx_
int minNumberOfPixelsPerCluster_
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
static constexpr double XSEC_PIXEL_CLUSTER
LumiMonitor(const edm::ParameterSet &)