19 std::vector<int32_t> slots = channelPSet.getUntrackedParameter<std::vector<int32_t> >(
"slot");
20 std::vector<int32_t> fibers = channelPSet.getUntrackedParameter<std::vector<int32_t> >(
"fiber");
21 std::vector<int32_t> fiberChannels = channelPSet.getUntrackedParameter<std::vector<int32_t> >(
"fiber_channel");
22 for (
unsigned int i = 0;
i < crates.size(); ++
i) {
23 _channels.push_back({crates[
i], slots[
i], fibers[
i], fiberChannels[
i]});
40 for (
auto& it_gid : gids) {
46 if ((eid.
crateId() == it_channel.crate) && (eid.
slot() == it_channel.slot) && (eid.
fiberIndex() == it_channel.fiber) && (eid.
fiberChanId() == it_channel.fiberChannel)) {
53 histoname = std::to_string(it_eid.crateId()) +
"-" + std::to_string(it_eid.slot()) +
"-" + std::to_string(it_eid.fiberIndex()) +
"-" + std::to_string(it_eid.fiberChanId());
55 _cADC[it_eid] = ib.
book1D( histoname.c_str(), histoname.c_str(), 256, 0, 256);
56 _cADC[it_eid]->setAxisTitle(
"ADC", 1);
57 _cADC[it_eid]->setAxisTitle(
"N", 2);
60 _cADC_vs_TS[it_eid] = ib.
book2D( histoname.c_str(), histoname.c_str(), 10, 0, 10, 64, 0, 256);
65 _cTDCTime[it_eid] = ib.
book1D( histoname.c_str(), histoname.c_str(), 500, 0., 250.);
66 _cTDCTime[it_eid]->setAxisTitle(
"TDC time [ns]", 1);
70 _cTDC[it_eid] = ib.
book1D( histoname.c_str(), histoname.c_str(), 64, -0.5, 63.5);
71 _cTDC[it_eid]->setAxisTitle(
"TDC", 1);
81 edm::LogError(
"Collection QIE10DigiCollection for ZDC isn't available" 84 for (
auto it = digis->
begin(); it != digis->
end(); it++ ) {
97 if (digi[
i].le_tdc() <= 50.) {
98 double tdctime = 25. *
i + 0.5 * digi[
i].le_tdc();
int adc(sample_type sample)
get the ADC sample (12 bits)
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)
#define DEFINE_FWK_MODULE(type)
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 &)
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
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...
void setCurrentFolder(const std::string &fullpath)
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