83 onlineMetaDataDigisToken_(consumes(
config.getParameter<
edm::
InputTag>(
"onlineMetaDataDigis"))),
84 lumi_binning_(getHistoPSet(
88 ls_binning_(getHistoLSPSet(
90 doPixelLumi_(
config.getParameter<
bool>(
"doPixelLumi")),
96 useBPixLayer1_(doPixelLumi_ ?
config.getParameter<
bool>(
"useBPixLayer1") :
false),
97 minNumberOfPixelsPerCluster_(doPixelLumi_ ?
config.getParameter<
int>(
"minNumberOfPixelsPerCluster") : -1),
98 minPixelClusterCharge_(doPixelLumi_ ?
config.getParameter<double>(
"minPixelClusterCharge") : -1.),
105 lumi_factor_per_bx_(useBPixLayer1_
111 pset.getParameter<int32_t>(
"nbins"),
112 pset.getParameter<
double>(
"xmin"),
113 pset.getParameter<
double>(
"xmax"),
118 return MEbinning{
pset.getParameter<int32_t>(
"nbins"), -0.5,
pset.getParameter<int32_t>(
"nbins") - 0.5};
128 auto me = booker.
book1D(
"numberOfPixelClustersVsLS",
129 "number of pixel clusters vs lumisection",
133 me->setAxisTitle(
"lumisection", 1);
134 me->setAxisTitle(
"number of pixel clusters", 2);
138 "number of pixel clusters vs online lumi",
144 me->setAxisTitle(
"online inst lumi E30 [Hz cm^{-2}]", 1);
145 me->setAxisTitle(
"number of pixel clusters", 2);
149 "pixel-lumi vs lumisection",
155 me->setAxisTitle(
"lumisection", 1);
156 me->setAxisTitle(
"pixel-based inst lumi E30 [Hz cm^{-2}]", 2);
160 "pixel-lumi vs online lumi",
166 me->setAxisTitle(
"online inst lumi E30 [Hz cm^{-2}]", 1);
167 me->setAxisTitle(
"pixel-based inst lumi E30 [Hz cm^{-2}]", 2);
172 "online lumi vs lumisection",
178 me->setAxisTitle(
"lumisection", 1);
179 me->setAxisTitle(
"online inst lumi E30 [Hz cm^{-2}]", 2);
183 "online pileup vs lumisection",
189 me->setAxisTitle(
"lumisection", 1);
190 me->setAxisTitle(
"online pileup", 2);
197 int const ls =
event.id().luminosityBlock();
199 float online_lumi = -1.f;
200 float online_pu = -1.f;
203 if (lumiScalersHandle.isValid() and not lumiScalersHandle->empty()) {
204 auto const scalit = lumiScalersHandle->begin();
205 online_lumi = scalit->instantLumi();
206 online_pu = scalit->pileup();
207 }
else if (onlineMetaDataDigisHandle.isValid()) {
208 online_lumi = onlineMetaDataDigisHandle->instLumi();
209 online_pu = onlineMetaDataDigisHandle->avgPileUp();
215 size_t pixel_clusters = 0;
216 float pixel_lumi = -1.f;
226 DetId detid = pixCluDet->detId();
229 if (tTopo.layer(detid) == 1) {
234 for (
auto pixClu = pixCluDet->begin(); pixClu != pixCluDet->end(); ++pixClu) {
246 histograms.numberOfPixelClustersVsLS->Fill(
ls, pixel_clusters);
247 histograms.numberOfPixelClustersVsLumi->Fill(online_lumi, pixel_clusters);
249 histograms.pixelLumiVsLumi->Fill(online_lumi, pixel_lumi);
254 pset.add<
int>(
"nbins");
255 pset.add<
double>(
"xmin");
256 pset.add<
double>(
"xmax");
267 desc.add<
bool>(
"doPixelLumi",
false);
268 desc.add<
bool>(
"useBPixLayer1",
false);
269 desc.add<
int>(
"minNumberOfPixelsPerCluster", 2);
270 desc.add<
double>(
"minPixelClusterCharge", 15000.);
295 descriptions.
add(
"lumiMonitor",
desc);
MEbinning const pixelCluster_binning_
edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > const trkTopoToken_
T getParameter(std::string const &) const
static MEbinning getHistoPSet(const edm::ParameterSet &pset)
std::string const folderName_
edm::EDGetTokenT< edmNew::DetSetVector< SiPixelCluster > > const pixelClustersToken_
int const minNumberOfPixelsPerCluster_
virtual void setCurrentFolder(std::string const &fullpath)
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &, Histograms &) const override
~LumiMonitor() override=default
#define DEFINE_FWK_MODULE(type)
static constexpr double FREQ_ORBIT
float const minPixelClusterCharge_
MEbinning const pu_binning_
dqm::reco::DQMStore DQMStore
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
static constexpr double SECONDS_PER_LS
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())
static void fillHistoLSPSetDescription(edm::ParameterSetDescription &pset)
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum) ...
static void fillHistoPSetDescription(edm::ParameterSetDescription &pset)
dqm::legacy::MonitorElement MonitorElement
static MEbinning getHistoLSPSet(const edm::ParameterSet &pset)
void add(std::string const &label, ParameterSetDescription const &psetDescription)
edm::EDGetTokenT< LumiScalersCollection > const lumiScalersToken_
Pixel cluster – collection of neighboring pixels above threshold.
MEbinning const ls_binning_
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 const lumi_factor_per_bx_
MEbinning const pixellumi_binning_
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
MEbinning const lumi_binning_
bool const useBPixLayer1_
LumiMonitor(const edm::ParameterSet &)
edm::EDGetTokenT< OnlineLuminosityRecord > const onlineMetaDataDigisToken_