47 const std::vector<edm::InputTag>&
tags,
62 dqmDir_(iConfig.getParameter<
std::
string>(
"dqmDir")) {
78 for (
auto it =
geom.beginSensor(); it !=
geom.endSensor(); ++it) {
84 iHists.
leadingTime[detid.
rawId()] = iBooker.
book1D(
"t_" + ch_name, ch_name +
";t (ns);Entries", 1200, -60., 60.);
85 iHists.
toT[detid.
rawId()] = iBooker.
book1D(
"tot_" + ch_name, ch_name +
";ToT (ns);Entries", 100, -20., 20.);
87 iBooker.
book2D(
"tvstot_" + ch_name, ch_name +
";ToT (ns);t (ns)", 240, 0., 60., 450, -20., 25.);
101 if (dsv_rechits->empty()) {
102 edm::LogWarning(
"PPSTimingCalibrationPCLWorker:dqmAnalyze") <<
"No rechits retrieved from the event content.";
105 for (
const auto& ds_rechits : *dsv_rechits) {
109 <<
"Pad with detId=" << detid <<
" is not set to be monitored.";
112 for (
const auto& rechit : ds_rechits) {
114 if (rechit.time() == 0. || rechit.toT() < 0.)
117 iHists.
toT.at(detid.rawId())->
Fill(rechit.toT());
127 desc.add<std::vector<edm::InputTag>>(
"diamondRecHitTags", {
edm::InputTag(
"ctppsDiamondRecHits")})
128 ->setComment(
"input tag for the PPS diamond detectors rechits");
130 ->setComment(
"output path for the various DQM plots");
135 template <
typename T>
138 const std::vector<edm::InputTag>&
tags,
140 bool foundProduct =
false;
141 for (
unsigned int i = 0;
i < tokens.size();
i++)
142 if (
auto h =
iEvent.getHandle(tokens[
i])) {
void addWithDefaultLabel(ParameterSetDescription const &psetDescription)
T const & getData(const ESGetToken< T, R > &iToken) const noexcept(false)
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)
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