47 const std::vector<edm::InputTag>&
tags,
62 dqmDir_(iConfig.getParameter<
std::
string>(
"dqmDir")) {
78 for (
auto it =
geom.beginSensor(); it !=
geom.endSensor(); ++it) {
85 iHists.
leadingTime[detid.
rawId()] = iBooker.
book1D(
"t_" + ch_name, ch_name +
";t (ns);Entries", 1200, -60., 60.);
86 iHists.
toT[detid.
rawId()] = iBooker.
book1D(
"tot_" + ch_name, ch_name +
";ToT (ns);Entries", 100, -20., 20.);
88 iBooker.
book2D(
"tvstot_" + ch_name, ch_name +
";ToT (ns);t (ns)", 240, 0., 60., 450, -20., 25.);
102 if (dsv_rechits->empty()) {
103 edm::LogWarning(
"PPSTimingCalibrationPCLWorker:dqmAnalyze") <<
"No rechits retrieved from the event content.";
106 for (
const auto& ds_rechits : *dsv_rechits) {
110 <<
"Pad with detId=" << detid <<
" is not set to be monitored.";
113 for (
const auto& rechit : ds_rechits) {
115 if (rechit.time() == 0. || rechit.toT() < 0.)
118 iHists.
toT.at(detid.rawId())->
Fill(rechit.toT());
128 desc.add<std::vector<edm::InputTag>>(
"diamondRecHitTags", {
edm::InputTag(
"ctppsDiamondRecHits")})
129 ->setComment(
"input tag for the PPS diamond detectors rechits");
131 ->setComment(
"output path for the various DQM plots");
136 template <
typename T>
139 const std::vector<edm::InputTag>&
tags,
141 bool foundProduct =
false;
142 for (
unsigned int i = 0;
i < tokens.size();
i++)
143 if (
auto h =
iEvent.getHandle(tokens[
i])) {
void addWithDefaultLabel(ParameterSetDescription const &psetDescription)
bool searchForProduct(edm::Event const &iEvent, const std::vector< edm::EDGetTokenT< T >> &tokens, const std::vector< edm::InputTag > &tags, edm::Handle< T > &handle) const
virtual void setCurrentFolder(std::string const &fullpath)
std::vector< edm::EDGetTokenT< edm::DetSetVector< CTPPSDiamondRecHit > > > diamondRecHitTokens_
MonitorMap leadingTimeVsToT
static void fillDescriptions(edm::ConfigurationDescriptions &)
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
const std::string dqmDir_
void Fill(HcalDetId &id, double val, std::vector< TH2F > &depth)
#define DEFINE_FWK_MODULE(type)
bool getData(T &iHolder) const
void channelName(std::string &name, NameFlag flag=nFull) const
const edm::ESGetToken< CTPPSGeometry, VeryForwardRealGeometryRecord > geomEsToken_
static bool check(unsigned int raw)
returns true if the raw ID is a PPS-timing one
const std::vector< edm::InputTag > RecHitTags_
Log< level::Info, false > LogInfo
constexpr uint32_t rawId() const
get the raw id
MonitorElement * book2D(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, FUNC onbooking=NOOP())
PPSTimingCalibrationPCLWorker(const edm::ParameterSet &)
void bookHistograms(DQMStore::IBooker &, const edm::Run &, const edm::EventSetup &, TimingCalibrationHistograms &) const override
Detector ID class for CTPPS Timing Diamond detectors. Bits [19:31] : Assigend in CTPPSDetId Calss Bit...
Log< level::Warning, false > LogWarning
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
void dqmAnalyze(const edm::Event &, const edm::EventSetup &, const TimingCalibrationHistograms &) const override