42 std::vector<double> vTimingRangeHB =
43 ps.
getUntrackedParameter<std::vector<double>>(
"thresh_timingreflm_HB", std::vector<double>({-70, -10.}));
44 std::vector<double> vTimingRangeHE =
45 ps.
getUntrackedParameter<std::vector<double>>(
"thresh_timingreflm_HE", std::vector<double>({-60., 0.}));
46 std::vector<double> vTimingRangeHO =
47 ps.
getUntrackedParameter<std::vector<double>>(
"thresh_timingreflm_HO", std::vector<double>({-50., 20.}));
48 std::vector<double> vTimingRangeHF =
49 ps.
getUntrackedParameter<std::vector<double>>(
"thresh_timingreflm_HF", std::vector<double>({-50., 20.}));
58 if (r.runAuxiliary().run() == 1)
66 std::vector<uint32_t> vhashVME;
67 std::vector<uint32_t> vhashuTCA;
68 std::vector<uint32_t> vhashC36;
259 "TimingDiff_DigiMinusLaserMon",
268 "LaserMonSumQ_Event",
272 "LaserMonTiming_Event",
276 "TimingDiff_DigiMinusLaserMon",
286 "Timing_DigivsLaserMon",
304 for (std::vector<int>::const_iterator it = vFEDsVME.begin(); it != vFEDsVME.end(); ++it)
307 for (std::vector<int>::const_iterator it = vFEDsuTCA.begin(); it != vFEDsuTCA.end(); ++it) {
413 for (std::vector<HcalGenericDetId>::const_iterator it = dids.begin(); it != dids.end(); ++it) {
414 if (!it->isHcalDetId())
445 if (!
eid.isVMEid()) {
464 for (std::vector<uint32_t>::const_iterator it =
_vhashFEDs.begin(); it !=
_vhashFEDs.end(); ++it) {
470 for (uint32_t iflag = 0; iflag <
_vflags.size(); iflag++)
497 for (std::vector<hcaldqm::flag::Flag>::iterator ft =
_vflags.begin(); ft !=
_vflags.end(); ++ft) {
520 if (!
e.getByToken(
_tokHO, c_ho))
527 int bx =
e.bunchCrossing();
532 _logger.
dqmthrow(
"QIE10DigiCollection for laserMonDigis isn't available.");
534 std::vector<int> laserMonADC;
540 double peakLaserMonADC = -1;
541 for (
unsigned int iTS = 0; iTS < laserMonADC.size(); ++iTS) {
542 if (laserMonADC[iTS] > peakLaserMonADC) {
543 peakLaserMonADC = laserMonADC[iTS];
548 double laserMonSumQ = 0;
549 double laserMonTiming = 0.;
552 int minTS =
std::max(0, peakTS - 3);
553 int maxTS =
std::min(
int(laserMonADC.size() - 1), peakTS + 3);
554 for (
int iTS = minTS; iTS <=
maxTS; ++iTS) {
556 laserMonSumQ += this_fC;
560 if (laserMonSumQ > 0.) {
561 laserMonTiming = laserMonTiming / laserMonSumQ;
573 int currentEvent =
e.eventAuxiliary().id().event();
590 double sumQ = hcaldqm::utilities::sumQDB<QIE11DataFrame>(
_dbService, digi_fC, did, digi, 0, digi.
samples() - 1);
595 double aveTS = hcaldqm::utilities::aveTSDB<QIE11DataFrame>(
_dbService, digi_fC, did, digi, 0, digi.samples() - 1);
602 for (
int i = 0;
i < digi.samples();
i++) {
605 eid,
i, hcaldqm::utilities::adc2fCDBMinusPedestal<QIE11DataFrame>(
_dbService, digi_fC, did, digi,
i));
611 double digiTimingSOI = (
aveTS - digi.presamples()) * 25.;
612 double deltaTiming = digiTimingSOI - laserMonTiming;
617 int currentEvent =
e.eventAuxiliary().id().event();
631 double sumQ = hcaldqm::utilities::sumQ<HODataFrame>(digi, 8.5, 0, digi.
size() - 1);
637 double aveTS = hcaldqm::utilities::aveTS<HODataFrame>(digi, 8.5, 0, digi.size() - 1);
644 for (
int i = 0;
i < digi.size();
i++) {
652 double digiTimingSOI = (
aveTS - digi.presamples()) * 25.;
653 double deltaTiming = digiTimingSOI - laserMonTiming;
658 int currentEvent =
e.eventAuxiliary().id().event();
679 double sumQ = hcaldqm::utilities::sumQDB<QIE10DataFrame>(
_dbService, digi_fC, did, digi, 0, digi.
samples() - 1);
685 double aveTS = hcaldqm::utilities::aveTSDB<QIE10DataFrame>(
_dbService, digi_fC, did, digi, 0, digi.samples() - 1);
693 for (
int i = 0;
i < digi.samples();
i++) {
696 eid, (
int)
i, hcaldqm::utilities::adc2fCDBMinusPedestal<QIE10DataFrame>(
_dbService, digi_fC, did, digi,
i));
702 double digiTimingSOI = (
aveTS - digi.presamples()) * 25.;
703 double deltaTiming = digiTimingSOI - laserMonTiming;
708 int currentEvent =
e.eventAuxiliary().id().event();
731 unsigned int digiIndex =
738 if (iLaserMonADC.empty()) {
740 for (
int i = 0;
i < totalNSamples; ++
i) {
741 iLaserMonADC.push_back(-1);
747 iLaserMonADC[totalIndex] = (digi[subindex].ok() ? digi[subindex].adc() : -1);
753 auto lumiCache = luminosityBlockCache(lb.
index());
760 DQTask::globalEndLuminosityBlock(lb, es);
void initialize(std::string const &folder, hashfunctions::HashType, quantity::Quantity *, quantity::Quantity *, int debug=0) override
hcaldqm::ContainerProf1D _cShapeCut_FEDSlot
constexpr DetId detid() const
Get the detector id.
double aveTS(DIGI const &digi, double ped=0, int i=0, int j=3)
hcaldqm::ContainerProf1D _cSignalvsEvent_SubdetPM
bool _isApplicable(edm::Event const &) override
hcaldqm::ContainerSingle1D _cLaserMonTiming
virtual void initialize(std::string const &folder, hashfunctions::HashType, quantity::Quantity *, quantity::Quantity *qy=new quantity::ValueQuantity(quantity::fN), int debug=0)
std::vector< hcaldqm::flag::Flag > _vflags
constexpr edm::DataFrame::id_type id() const
int maxTS(DIGI const &digi, double ped=0)
hcaldqm::ContainerProf2D _cTimingMean_FEDuTCA
hcaldqm::ContainerXXX< int > _xNBadTimingRefLM
virtual void book(DQMStore::IBooker &, std::string subsystem="Hcal", std::string aux="")
hcaldqm::ContainerXXX< double > _xSignalSum2
void fill(HcalDetId const &) override
std::pair< uint16_t, uint16_t > fed2crate(int fed)
std::vector< uint32_t > _vhashFEDs
hcaldqm::ContainerXXX< double > _xTimingRefLMSum
void initialize(HcalElectronicsMap const *, ElectronicsMapType etype=fHcalElectronicsMap)
hcaldqm::ContainerXXX< int > _xEntries
void dqmthrow(std::string const &msg) const
hcaldqm::Container1D _cTimingRMS_Subdet
double _laserMonThreshold
std::vector< T >::const_iterator const_iterator
hcaldqm::ContainerProf1D _cTimingvsEvent_SubdetPM
double _thresh_frac_timingreflm
virtual void initialize(std::string const &folder, quantity::Quantity *, quantity::Quantity *, quantity::Quantity *qz=new quantity::ValueQuantity(quantity::fN), int debug=0)
void book(DQMStore::IBooker &, HcalElectronicsMap const *, std::string subsystem="Hcal", std::string aux="") override
const HcalElectronicsMap * getHcalMapping() const
void _resetMonitors(hcaldqm::UpdateFreq) override
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
hcaldqm::ContainerXXX< double > _xSignalSum
hcaldqm::ContainerXXX< double > _xTimingSum
hcaldqm::Container2D _cMissing_depth
void initialize(std::string const &folder, quantity::Quantity *, quantity::Quantity *qy=new quantity::ValueQuantity(quantity::fN), int debug=0) override
hcaldqm::ContainerProf2D _cSignalMean_depth
constexpr DetId detid() const
Get the detector id.
hcaldqm::ContainerSingleProf1D _cLaserMonTiming_LS
hcaldqm::Container1D _cADC_SubdetPM
virtual void book(DQMStore::IBooker &, std::string subsystem="Hcal", std::string aux="")
example_stream void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
std::vector< int > getFEDVMEList(HcalElectronicsMap const *)
T getUntrackedParameter(std::string const &, T const &) const
hcaldqm::Container2D _cSummaryvsLS_FED
uint32_t lookup(DetId const &)
hcaldqm::ContainerProf2D _cTimingDiffLS_SubdetPM
constexpr HcalSubdetector subdet() const
get the subdetector
hcaldqm::Container1D _cTimingMean_Subdet
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
virtual void fill(uint32_t)
uint32_t valueUserWord(int iword) const
hcaldqm::ContainerProf2D _cTimingRMS_FEDuTCA
hcaldqm::ContainerProf2D _cSignalRMS_FEDuTCA
edm::EDGetTokenT< QIE10DigiCollection > _tokLaserMon
std::map< HcalSubdetector, std::pair< double, double > > _thresh_timingreflm
virtual void initialize(std::string const &folder, quantity::Quantity *, quantity::Quantity *qy=new quantity::ValueQuantity(quantity::fN), int debug=0)
void processLaserMon(edm::Handle< QIE10DigiCollection > &col, std::vector< int > &iLaserMonADC)
virtual void setBinContent(int, int, int)
hcaldqm::ContainerProf2D _cTimingDiffEvent_SubdetPM
hcaldqm::ContainerSingleProf1D _cLaserMonSumQ_LS
hcaldqm::filter::HashFilter _filter_uTCA
hcaldqm::ContainerXXX< int > _xNChs
edm::ESGetToken< HcalDbService, HcalDbRecord > hcalDbServiceToken_
edm::EDGetTokenT< QIE11DigiCollection > _tokQIE11
hcaldqm::ContainerSingleProf1D _cLaserMonTiming_Event
virtual void showOverflowX(bool showOverflow)
hcaldqm::ContainerSingle1D _cLaserMonSumQ
int const FIBER_uTCA_MIN1
edm::EDGetTokenT< HODigiCollection > _tokHO
#define DEFINE_FWK_MODULE(type)
double _thresh_min_lmsumq
const_iterator begin() const
virtual void showOverflowY(bool showOverflow)
hcaldqm::ContainerXXX< double > _xTimingRefLMSum2
virtual void showOverflowX(bool showOverflow)
HcalElectronicsMap const * _emap
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
uint8_t eventType() const
hcaldqm::ContainerProf1D _cSignalvsBX_SubdetPM
hcaldqm::ContainerSingle2D _cSummaryvsLS
edm::EDGetTokenT< QIE10DigiCollection > _tokQIE10
hcaldqm::Container2D _cMissing_FEDuTCA
void _process(edm::Event const &, edm::EventSetup const &) override
const_iterator end() const
const_iterator end() const
hcaldqm::Container1D _cSignalMean_Subdet
hcaldqm::ContainerProf1D _cSignalvsLS_SubdetPM
hcaldqm::ContainerProf1D _cTimingvsLS_SubdetPM
constexpr int samples() const
total number of samples in the digi
bool isFEDHBHE(HcalElectronicsId const &)
virtual void book(HcalElectronicsMap const *)
hcaldqm::ContainerProf2D _cSignalMean_FEDuTCA
hcaldqm::Container2D _cTiming_DigivsLaserMon_SubdetPM
virtual void book(DQMStore::IBooker &, HcalElectronicsMap const *, std::string subsystem="Hcal", std::string aux="")
uint8_t const EVENTTYPE_LASER
const_iterator begin() const
The iterator returned can not safely be used across threads.
virtual void initialize(std::string const &folder, hashfunctions::HashType, quantity::Quantity *, quantity::Quantity *, quantity::Quantity *qz=new quantity::ValueQuantity(quantity::fN), int debug=0)
hcaldqm::ContainerProf2D _cTimingMean_depth
void book(DQMStore::IBooker &, std::string subsystem="Hcal", std::string aux="") override
hcaldqm::electronicsmap::ElectronicsMap _ehashmap
edm::InputTag _tagLaserMon
void book(DQMStore::IBooker &, HcalElectronicsMap const *, std::string subsystem="Hcal", std::string aux="") override
constexpr uint32_t rawId() const
void initialize(std::string const &folder, hashfunctions::HashType, quantity::Quantity *, quantity::Quantity *, quantity::Quantity *qz=new quantity::ValueQuantity(quantity::fEnergy), int debug=0) override
boost::transform_iterator< IterHelp, boost::counting_iterator< int > > const_iterator
void globalEndLuminosityBlock(edm::LuminosityBlock const &, edm::EventSetup const &) override
void setBinContent(HcalDetId const &, int) override
LuminosityBlockIndex index() const
std::vector< int > _vLaserMonIPhi
constexpr int size() const
total number of samples in the digi
virtual STDTYPE & get(HcalDetId const &)
edm::ESHandle< HcalDbService > _dbService
std::vector< HcalGenericDetId > allPrecisionId() const
std::vector< int > getFEDList(HcalElectronicsMap const *)
edm::EDGetTokenT< HcalUMNioDigi > _tokuMN
std::vector< int > getFEDuTCAList(HcalElectronicsMap const *)
hcaldqm::Container1D _cSignalRMS_Subdet
void fill(HcalDetId const &) override
virtual void initialize(FilterType ftype, hashfunctions::HashType htype, std::vector< uint32_t > const &)
int getRBX(uint32_t iphi)
bool isFEDHO(HcalElectronicsId const &)
std::vector< uint32_t > _vcdaqEids
hcaldqm::ContainerSingleProf1D _cLaserMonSumQ_Event
hcaldqm::ContainerXXX< double > _xTimingSum2
virtual void initialize(hashfunctions::HashType, int debug=0)
void book(DQMStore::IBooker &, HcalElectronicsMap const *, std::string subsystem="Hcal", std::string aux="") override
hcaldqm::ContainerProf2D _cSignalRMS_depth
hcaldqm::filter::HashFilter _filter_VME
Readout chain identification for Hcal.
hcaldqm::ContainerProf1D _cTimingvsBX_SubdetPM
constexpr int iphi() const
get the cell iphi
bool isFEDHF(HcalElectronicsId const &)
LaserTask(edm::ParameterSet const &)
constexpr int samples() const
total number of samples in the digi
uint16_t *__restrict__ uint16_t const *__restrict__ adc
hcaldqm::ContainerProf2D _cTimingRMS_depth
double sumQ(DIGI const &digi, double ped, int i=0, int j=3)