17 std::vector<int32_t> slots = channelPSet.getUntrackedParameter<std::vector<int32_t> >(
"slot");
18 std::vector<int32_t> fibers = channelPSet.getUntrackedParameter<std::vector<int32_t> >(
"fiber");
19 std::vector<int32_t> fiberChannels = channelPSet.getUntrackedParameter<std::vector<int32_t> >(
"fiber_channel");
20 for (
unsigned int i = 0;
i < crates.size(); ++
i) {
21 _channels.push_back({crates[
i], slots[
i], fibers[
i], fiberChannels[
i]});
36 for (
auto& it_gid : gids) {
42 if ((eid.
crateId() == it_channel.crate) && (eid.
slot() == it_channel.slot) &&
50 histoname = std::to_string(it_eid.crateId()) +
"-" + std::to_string(it_eid.slot()) +
"-" +
51 std::to_string(it_eid.fiberIndex()) +
"-" + std::to_string(it_eid.fiberChanId());
53 _cADC[it_eid] = ib.
book1D(histoname.c_str(), histoname.c_str(), 256, 0, 256);
54 _cADC[it_eid]->setAxisTitle(
"ADC", 1);
55 _cADC[it_eid]->setAxisTitle(
"N", 2);
58 _cADC_vs_TS[it_eid] = ib.
book2D(histoname.c_str(), histoname.c_str(), 10, 0, 10, 64, 0, 256);
63 _cTDCTime[it_eid] = ib.
book1D(histoname.c_str(), histoname.c_str(), 500, 0., 250.);
64 _cTDCTime[it_eid]->setAxisTitle(
"TDC time [ns]", 1);
67 _cTDC[it_eid] = ib.
book1D(histoname.c_str(), histoname.c_str(), 64, -0.5, 63.5);
68 _cTDC[it_eid]->setAxisTitle(
"TDC", 1);
78 for (
auto it = digis->
begin(); it != digis->
end(); it++) {
91 if (digi[
i].le_tdc() <= 50.) {
92 double tdctime = 25. *
i + 0.5 * digi[
i].le_tdc();
int samples() const
total number of samples in the digi
std::map< HcalElectronicsId, MonitorElement * > _cADC
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
FCDTask(edm::ParameterSet const &)
bool getByToken(EDGetToken token, Handle< PROD > &result) const
void initialize(HcalElectronicsMap const *, ElectronicsMapType etype=fHcalElectronicsMap)
const_iterator begin() const
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
uint32_t lookup(DetId const &)
#define DEFINE_FWK_MODULE(type)
void setCurrentFolder(std::string const &fullpath)
std::vector< HcalElectronicsId > _fcd_eids
std::map< HcalElectronicsId, MonitorElement * > _cTDCTime
MonitorElement * book1D(Args &&...args)
DetId detid() const
Get the detector id.
std::vector< HcalGenericDetId > allPrecisionId() const
constexpr int crateId() const
get the readout VME crate number
constexpr int adc(sample_type sample)
get the ADC sample (12 bits)
bool operator==(const FCDTask::FCDChannel &lhs, const FCDTask::FCDChannel &rhs)
constexpr int fiberIndex() const
get the fiber index. For VME 1-8 (which of eight fibers carried by a spigot), for uTCA fibers are zer...
std::vector< FCDChannel > _channels
MonitorElement * book2D(Args &&...args)
std::map< HcalElectronicsId, MonitorElement * > _cADC_vs_TS
const_iterator end() const
constexpr int slot() const
get the htr or uHTR slot
edm::EDGetTokenT< QIE10DigiCollection > _tokQIE10
const HcalElectronicsMap * getHcalMapping() const
constexpr int fiberChanId() const
get the fiber channel id (which of channels on a fiber)
HcalElectronicsMap const * _emap
std::map< HcalElectronicsId, MonitorElement * > _cTDC
Readout chain identification for Hcal.
hcaldqm::electronicsmap::ElectronicsMap _ehashmap
void analyze(edm::Event const &, edm::EventSetup const &) override
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override