41 std::unordered_map<uint32_t, dqm::reco::MonitorElement*>
timeHisto;
42 std::unordered_map<uint32_t, dqm::reco::MonitorElement*>
db;
43 std::unordered_map<uint32_t, dqm::reco::MonitorElement*>
sampic;
44 std::unordered_map<uint32_t, dqm::reco::MonitorElement*>
channel;
68 const std::vector<edm::InputTag>&
tags,
85 : digiTags_(iConfig.getParameter<std::
vector<edm::
InputTag>>(
"totemTimingDigiTags")),
86 RecHitTags_(iConfig.getParameter<std::
vector<edm::
InputTag>>(
"totemTimingRecHitTags")),
109 if (timingRecHit->empty()) {
110 edm::LogWarning(
"PPSDiamondSampicTimingCalibrationPCLWorker:dqmAnalyze")
111 <<
"No rechits retrieved from the event content.";
115 for (
const auto& digis : *timingDigi) {
117 for (
const auto& digi : digis) {
118 histos.
db.at(detId.rawId())->
Fill(digi.hardwareBoardId());
119 histos.
sampic.at(detId.rawId())->
Fill(digi.hardwareSampicId());
120 histos.
channel.at(detId.rawId())->
Fill(digi.hardwareChannelId());
124 for (
const auto&
recHits : *timingRecHit) {
126 for (
const auto& recHit :
recHits)
141 for (
auto it =
geom.beginSensor(); it !=
geom.endSensor(); ++it) {
150 histos.
db[detid.
rawId()] = ibook.
bookInt(path +
"/" + ch_name +
"db");
160 desc.
add<std::vector<edm::InputTag>>(
"totemTimingDigiTags", {
edm::InputTag(
"totemTimingRawToDigi",
"TotemTiming")})
161 ->setComment(
"input tag for the PPS diamond detectors digi");
162 desc.
add<std::vector<edm::InputTag>>(
"totemTimingRecHitTags", {
edm::InputTag(
"totemTimingRecHits")})
163 ->setComment(
"input tag for the PPS diamond detectors rechits");
164 desc.
add<
std::string>(
"folder",
"AlCaReco/PPSDiamondSampicTimingCalibrationPCL")
165 ->setComment(
"output path for the various DQM plots");
166 descriptions.
add(
"PPSDiamondSampicTimingCalibrationPCLWorker", desc);
171 template <
typename T>
174 const std::vector<edm::InputTag>&
tags,
176 bool foundProduct =
false;
177 for (
unsigned int i = 0;
i < tokens.size();
i++)
181 edm::LogInfo(
"searchForProduct") <<
"Found a product with " << tags[
i];
std::unordered_map< uint32_t, dqm::reco::MonitorElement * > timeHisto
virtual void setCurrentFolder(std::string const &fullpath)
#define DEFINE_FWK_MODULE(type)
const std::vector< edm::InputTag > RecHitTags_
void channelName(std::string &name, NameFlag flag=nFull) const
std::unordered_map< uint32_t, dqm::reco::MonitorElement * > db
const std::string folder_
PPSDiamondSampicTimingCalibrationPCLWorker(const edm::ParameterSet &)
~PPSDiamondSampicTimingCalibrationPCLWorker() override
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
constexpr uint32_t rawId() const
get the raw id
std::unordered_map< uint32_t, dqm::reco::MonitorElement * > channel
std::vector< edm::EDGetTokenT< edm::DetSetVector< TotemTimingDigi > > > totemTimingDigiTokens_
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
bool getData(T &iHolder) const
Handle< PROD > getHandle(EDGetTokenT< PROD > token) const
bool searchForProduct(edm::Event const &iEvent, const std::vector< edm::EDGetTokenT< T >> &tokens, const std::vector< edm::InputTag > &tags, edm::Handle< T > &handle) const
void Fill(HcalDetId &id, double val, std::vector< TH2F > &depth)
ParameterDescriptionBase * add(U const &iLabel, T const &value)
static bool check(unsigned int raw)
returns true if the raw ID is a PPS-timing one
Log< level::Info, false > LogInfo
void dqmAnalyze(edm::Event const &, edm::EventSetup const &, Histograms_PPSDiamondSampicTimingCalibrationPCLWorker const &) const override
MonitorElement * bookInt(TString const &name, FUNC onbooking=NOOP())
void add(std::string const &label, ParameterSetDescription const &psetDescription)
const edm::ESGetToken< CTPPSGeometry, VeryForwardRealGeometryRecord > geomEsToken_
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &, Histograms_PPSDiamondSampicTimingCalibrationPCLWorker &) const override
Detector ID class for CTPPS Timing Diamond detectors. Bits [19:31] : Assigend in CTPPSDetId Calss Bit...
std::unordered_map< uint32_t, dqm::reco::MonitorElement * > sampic
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.
std::vector< edm::EDGetTokenT< edm::DetSetVector< TotemTimingRecHit > > > totemTimingRecHitTokens_
const std::vector< edm::InputTag > digiTags_