88 onlineMetaDataDigisToken_(consumes(
config.getParameter<
edm::
InputTag>(
"onlineMetaDataDigis"))),
89 lumi_binning_(getHistoPSet(
93 ls_binning_(getHistoLSPSet(
95 doPixelLumi_(
config.getParameter<
bool>(
"doPixelLumi")),
101 useBPixLayer1_(doPixelLumi_ ?
config.getParameter<
bool>(
"useBPixLayer1") :
false),
102 minNumberOfPixelsPerCluster_(doPixelLumi_ ?
config.getParameter<
int>(
"minNumberOfPixelsPerCluster") : -1),
103 minPixelClusterCharge_(doPixelLumi_ ?
config.getParameter<double>(
"minPixelClusterCharge") : -1.),
104 pixelCluster_binning_(doPixelLumi_ ? getHistoPSet(
config.getParameter<
edm::
ParameterSet>(
"histoPSet")
110 lumi_factor_per_bx_(useBPixLayer1_
116 pset.getParameter<int32_t>(
"nbins"),
117 pset.getParameter<
double>(
"xmin"),
118 pset.getParameter<
double>(
"xmax"),
123 return MEbinning{
pset.getParameter<int32_t>(
"nbins"), -0.5,
pset.getParameter<int32_t>(
"nbins") - 0.5};
133 auto me = booker.
book1D(
"numberOfPixelClustersVsLS",
134 "number of pixel clusters vs lumisection",
138 me->setAxisTitle(
"lumisection", 1);
139 me->setAxisTitle(
"number of pixel clusters", 2);
143 "number of pixel clusters vs online lumi",
149 me->setAxisTitle(
"online inst lumi E30 [Hz cm^{-2}]", 1);
150 me->setAxisTitle(
"number of pixel clusters", 2);
154 "pixel-lumi vs lumisection",
160 me->setAxisTitle(
"lumisection", 1);
161 me->setAxisTitle(
"pixel-based inst lumi E30 [Hz cm^{-2}]", 2);
165 "pixel-lumi vs online lumi",
171 me->setAxisTitle(
"online inst lumi E30 [Hz cm^{-2}]", 1);
172 me->setAxisTitle(
"pixel-based inst lumi E30 [Hz cm^{-2}]", 2);
177 "online lumi vs lumisection",
183 me->setAxisTitle(
"lumisection", 1);
184 me->setAxisTitle(
"online inst lumi E30 [Hz cm^{-2}]", 2);
188 "online pileup vs lumisection",
194 me->setAxisTitle(
"lumisection", 1);
195 me->setAxisTitle(
"online pileup", 2);
202 int const ls =
event.id().luminosityBlock();
204 float online_lumi = -1.f;
205 float online_pu = -1.f;
208 if (lumiScalersHandle.isValid() and not lumiScalersHandle->empty()) {
209 auto const scalit = lumiScalersHandle->begin();
210 online_lumi = scalit->instantLumi();
211 online_pu = scalit->pileup();
212 }
else if (onlineMetaDataDigisHandle.isValid()) {
213 online_lumi = onlineMetaDataDigisHandle->instLumi();
214 online_pu = onlineMetaDataDigisHandle->avgPileUp();
220 size_t pixel_clusters = 0;
221 float pixel_lumi = -1.f;
230 DetId detid = pixCluDet->detId();
233 if (tTopo.layer(detid) == 1) {
238 for (
auto pixClu = pixCluDet->begin(); pixClu != pixCluDet->end(); ++pixClu) {
249 histograms.numberOfPixelClustersVsLS->Fill(
ls, pixel_clusters);
250 histograms.numberOfPixelClustersVsLumi->Fill(online_lumi, pixel_clusters);
252 histograms.pixelLumiVsLumi->Fill(online_lumi, pixel_lumi);
275 desc.add<
bool>(
"doPixelLumi",
false);
276 desc.add<
bool>(
"useBPixLayer1",
false);
277 desc.add<
int>(
"minNumberOfPixelsPerCluster", 2);
278 desc.add<
double>(
"minPixelClusterCharge", 15000.);
304 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
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())
#define DEFINE_FWK_MODULE(type)
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, int const nbins, double const xmin, double const xmax)
static void fillHistoLSPSetDescription(edm::ParameterSetDescription &pset, int const nbins)
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_