4 using namespace hcaldqm;
5 using namespace hcaldqm::constants;
45 _emap = dbs->getHcalMapping();
46 std::vector<uint32_t> vVME;
47 std::vector<uint32_t> vuTCA;
48 std::vector<uint32_t> depth0;
215 "OccupancyCutDatavsBX",
221 "OccupancyCutEmulvsBX",
364 "OccupancyCutDatavsLS",
376 "OccupancyCutDatavsBX",
388 "OccupancyCutEmulvsLS",
400 "OccupancyCutEmulvsBX",
407 "OccupancyDataHF_depth",
413 "OccupancyEmulHFNoTDC_depth",
419 "OccupancyDataHF_ieta",
424 "OccupancyEmulHFNoTDC_ieta",
437 for (std::vector<int>::const_iterator it = vFEDsVME.begin(); it != vFEDsVME.end(); ++it) {
440 for (std::vector<int>::const_iterator it = vFEDsuTCA.begin(); it != vFEDsuTCA.end(); ++it) {
557 sprintf(aux,
"BIT%d", iii);
663 DQTask::_resetMonitors(uf);
703 int numHBHE(0), numHF(0), numCutHBHE(0), numCutHF(0);
704 int numCorrHBHE(0), numCorrHF(0);
705 int numMsmHBHE(0), numMsmHF(0);
706 int numMsnHBHE(0), numMsnHF(0), numMsnCutHBHE(0), numMsnCutHF(0);
709 uint32_t rawidHBHEValid = 0;
710 uint32_t rawidHFValid = 0;
732 rawidHFValid = tid.
rawId();
734 rawidHBHEValid = tid.
rawId();
744 if (jt != cemul->end())
753 int soiEt_d = it->t0().compressedEt();
756 soiFG_d[ibit] = it->t0().fineGrain(ibit) ? 1 : 0;
757 tid.
ietaAbs() >= 29 ? numHF++ : numHBHE++;
781 tid.
ietaAbs() >= 29 ? numCutHF++ : numCutHBHE++;
800 if (jt != cemul->end()) {
802 int soiEt_e = jt->SOI_compressedEt();
805 soiFG_e[ibit] = jt->t0().fineGrain(ibit) ? 1 : 0;
808 soiEt_d == 0 && soiEt_e == 0 ? 1 : double(
std::min(soiEt_d, soiEt_e)) / double(
std::max(soiEt_e, soiEt_d));
813 tid.
ietaAbs() >= 29 ? numCorrHF++ : numCorrHBHE++;
821 for (
int ci = 0; ci < 4; ci++) {
822 for (
int cj = 0; cj < 4; cj++) {
823 if (ci < it->
size() && cj < jt->
size()) {
824 if ((ci == cj) || (it->sample(ci).compressedEt() > 0 && jt->sample(cj).compressedEt() > 0)) {
826 tid, eid, 256 * ci + it->sample(ci).compressedEt(), 256 * cj + jt->sample(cj).compressedEt());
841 if (soiEt_d != soiEt_e) {
842 tid.
ietaAbs() >= 29 ? numMsmHF++ : numMsmHBHE++;
869 tid.
ietaAbs() >= 29 ? numMsnHF++ : numMsnHBHE++;
876 tid.
ietaAbs() >= 29 ? numMsnCutHF++ : numMsnCutHBHE++;
894 int soiEt_e = it->SOI_compressedEt();
904 if (rawidHFValid != 0 && rawidHBHEValid != 0) {
922 HcalTrigTowerDetId(rawidHBHEValid), _currentLS,
double(numMsmHBHE) /
double(numCorrHBHE));
972 rawidHFValid = tid.
rawId();
974 rawidHBHEValid = tid.
rawId();
983 int soiEt = it->SOI_compressedEt();
986 tid.
ietaAbs() >= 29 ? numHF++ : numHBHE++;
999 tid.
ietaAbs() >= 29 ? numCutHF++ : numCutHBHE++;
1018 if (!(it->zsMarkAndPass())) {
1020 if (jt == cdata->end()) {
1021 tid.
ietaAbs() >= 29 ? numMsnHF++ : numMsnHBHE++;
1030 tid.
ietaAbs() >= 29 ? numMsnCutHF++ : numMsnCutHBHE++;
1040 if (rawidHBHEValid != 0) {
1050 if (rawidHFValid != 0) {
1071 cdataL1Rec->begin(),
1078 const auto& sentTp = tpPair.first;
1079 const auto& recdTp = tpPair.second;
1080 const int ieta = sentTp.id().ieta();
1081 if (
abs(ieta) > 28 && sentTp.id().version() != 1)
1084 const bool towerMasked = recdTp.sample(0).raw() & (1 << 13);
1085 const bool linkError = recdTp.sample(0).raw() & (1 << 15);
1086 if (towerMasked || linkError)
1103 cdataL1Rec->begin(),
1110 const auto& sentTp = tpPair.first;
1111 const auto& recdTp = tpPair.second;
1112 const int ieta = sentTp.id().ieta();
1113 if (
abs(ieta) > 28 && sentTp.id().version() != 1)
1116 const bool towerMasked = recdTp.sample(0).raw() & (1 << 13);
1118 const bool linkError = recdTp.sample(0).raw() & (1 << 15);
1120 if (towerMasked || linkError) {
1132 const bool HetAgreement = sentTp.SOI_compressedEt() == recdTp.SOI_compressedEt();
1133 const bool Hfb1Agreement = sentTp.SOI_fineGrain() == recdTp.SOI_fineGrain();
1135 const bool Hfb2Agreement =
1136 (
abs(ieta) < 29) ?
true
1137 : (recdTp.SOI_compressedEt() == 0 || (sentTp.SOI_fineGrain(1) == recdTp.SOI_fineGrain(1)));
1138 if (!(HetAgreement && Hfb1Agreement && Hfb2Agreement)) {
1149 return DQTask::globalBeginLuminosityBlock(lb, es);
1156 auto lumiCache = luminosityBlockCache(lb.
index());
1162 for (std::vector<uint32_t>::const_iterator it =
_vhashFEDs.begin(); it !=
_vhashFEDs.end(); ++it) {
1169 for (uint32_t iflag = 0; iflag <
_vflags.size(); iflag++)
1220 for (std::vector<flag::Flag>::iterator ft =
_vflags.begin(); ft !=
_vflags.end(); ++ft) {
1242 DQTask::globalEndLuminosityBlock(lb, es);
void initialize(std::string const &folder, hashfunctions::HashType, quantity::Quantity *, quantity::Quantity *, int debug=0) override
hcaldqm::ContainerProf1D _cEtCorrRatiovsBX_TTSubdet
constexpr uint32_t rawId() const
hcaldqm::ContainerXXX< uint32_t > _xDataTotal
T getUntrackedParameter(std::string const &, T const &) const
hcaldqm::ContainerProf1D _cMsnCutEmulvsBX_TTSubdet
hcaldqm::Container1D _cEtEmul_TTSubdet
virtual void initialize(std::string const &folder, hashfunctions::HashType, quantity::Quantity *, quantity::Quantity *qy=new quantity::ValueQuantity(quantity::fN), int debug=0)
hcaldqm::ContainerSingleProf2D _cEtData_depthlike
hcaldqm::ContainerProf1D _cMsnDatavsBX_TTSubdet
double _thresh_FGMsmRate_high
hcaldqm::ContainerSingle2D _cOccupancyCutEmul_depthlike
hcaldqm::ContainerProf1D _cMsnDatavsLS_TTSubdet
virtual void book(DQMStore::IBooker &, std::string subsystem="Hcal", std::string aux="")
edm::InputTag _tagDataL1Rec
void fill(HcalDetId const &) override
std::pair< uint16_t, uint16_t > fed2crate(int fed)
LuminosityBlockIndex index() const
std::vector< uint32_t > _vhashFEDs
virtual void setCurrentFolder(std::string const &fullpath)
hcaldqm::ContainerProf1D _cEtMsmvsLS_TTSubdet
bool getByToken(EDGetToken token, Handle< PROD > &result) const
void initialize(HcalElectronicsMap const *, ElectronicsMapType etype=fHcalElectronicsMap)
hcaldqm::ContainerProf1D _cEtCutEmulvsLS_TTSubdet
hcaldqm::electronicsmap::ElectronicsMap _ehashmap
void fill(int, int) override
edm::EDGetTokenT< HcalTrigPrimDigiCollection > _tokData
#define DEFINE_FWK_MODULE(type)
std::vector< std::pair< HcalTriggerPrimitiveDigi, HcalTriggerPrimitiveDigi > > _vTPDigis_SentRec
MonitorElement * meUnknownIds1LS
constexpr uint32_t rawId() const
get the raw id
std::vector< T >::const_iterator const_iterator
hcaldqm::ContainerSingleProf2D _cEtCorrRatio_depthlike
hcaldqm::ContainerProf1D _cMsnCutDatavsBX_TTSubdet
int bunchCrossing() const
void globalEndLuminosityBlock(edm::LuminosityBlock const &, edm::EventSetup const &) override
virtual void initialize(std::string const &folder, quantity::Quantity *, quantity::Quantity *, quantity::Quantity *qz=new quantity::ValueQuantity(quantity::fN), int debug=0)
hcaldqm::Container2D _cSOIEtCorrEmulL1_TTSubdet
hcaldqm::ContainerProf1D _cMsnCutDatavsLS_TTSubdet
void book(DQMStore::IBooker &, HcalElectronicsMap const *, std::string subsystem="Hcal", std::string aux="") override
hcaldqm::ContainerSingle2D _cOccupancyCutData_depthlike
double _thresh_FGMsmRate_low
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
hcaldqm::ContainerProf1D _cOccupancyDatavsLS_TTSubdet
edm::EDGetTokenT< HcalTrigPrimDigiCollection > _tokEmulNoTDCCut
edm::EDGetTokenT< HcalTrigPrimDigiCollection > _tokDataL1Rec
hcaldqm::ContainerProf1D _cEtMsmRatiovsLS_TTSubdet
hcaldqm::ContainerSingle2D _cOccupancyEmul2x3_depthlike
hcaldqm::ContainerProf1D _cMsnEmulvsBX_TTSubdet
edm::ESGetToken< HcalDbService, HcalDbRecord > hcalDbServiceToken_
double _thresh_EtMsmRate_low
virtual void book(DQMStore::IBooker &, std::string subsystem="Hcal", std::string aux="")
hcaldqm::ContainerProf2D _cEtCorrRatio_ElectronicsuTCA
example_stream void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
std::vector< int > getFEDVMEList(HcalElectronicsMap const *)
hcaldqm::Container2D _cFGCorr_TTSubdet[hcaldqm::constants::NUM_FGBITS]
hcaldqm::ContainerXXX< uint32_t > _xDataMsn
uint32_t lookup(DetId const &)
hcaldqm::filter::HashFilter _filter_uTCA
MonitorElement * book1DD(TString const &name, TString const &title, int nchX, double lowX, double highX, FUNC onbooking=NOOP())
hcaldqm::Container2D _cSummaryvsLS_FED
virtual void fill(uint32_t)
edm::InputTag _tagEmulNoTDCCut
std::vector< hcaldqm::flag::Flag > _vflags
hcaldqm::ContainerSingle1D _cEtMsm_uHTR_L1T_LS
virtual void initialize(std::string const &folder, quantity::Quantity *, quantity::Quantity *qy=new quantity::ValueQuantity(quantity::fN), int debug=0)
virtual void setBinContent(int, int, int)
hcaldqm::ContainerXXX< uint32_t > _xEmulMsn
void _resetMonitors(hcaldqm::UpdateFreq) override
constexpr bool isVMEid() const
void dqmthrow(std::string const &msg) const
hcaldqm::ContainerProf1D _cEtMsmvsBX_TTSubdet
OutputIterator zip(InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, InputIterator2 last2, OutputIterator result, Compare comp)
TPTask(edm::ParameterSet const &)
hcaldqm::ContainerProf1D _cOccupancyDatavsBX_TTSubdet
hcaldqm::ContainerProf2D _cEtEmul_ElectronicsuTCA
hcaldqm::ContainerProf1D _cEtCorrRatiovsLS_TTSubdet
hcaldqm::ContainerSingle2D _cOccupancyData2x3_depthlike
hcaldqm::ContainerSingle2D _cFGMsm_depthlike
Abs< T >::type abs(const T &t)
hcaldqm::filter::HashFilter _filter_depth0
int const FIBER_uTCA_MIN1
hcaldqm::ContainerXXX< uint32_t > _xEtMsm
hcaldqm::Container2D _cEtMsm_ElectronicsuTCA
hcaldqm::Container2D _cOccupancyCutEmul_ElectronicsuTCA
std::shared_ptr< hcaldqm::Cache > globalBeginLuminosityBlock(edm::LuminosityBlock const &, edm::EventSetup const &) const override
LuminosityBlock const & getLuminosityBlock() const
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
hcaldqm::ContainerSingle2D _cOccupancy_HF_depth
UseScope< MonitorElementData::Scope::LUMI > UseLumiScope
hcaldqm::Container2D _cEtCutDatavsBX_TTSubdet
double _thresh_EtMsmRate_high
hcaldqm::ContainerProf1D _cOccupancyCutDatavsLS_TTSubdet
hcaldqm::Container2D _cOccupancyCutData_ElectronicsuTCA
HcalElectronicsMap const * _emap
hcaldqm::ContainerSingle2D _cSummaryvsLS
void initialize(std::string const &folder, quantity::Quantity *, quantity::Quantity *, quantity::Quantity *qz=new quantity::ValueQuantity(quantity::fN), int debug=0) override
hcaldqm::ContainerSingle2D _cOccupancyData_depthlike
hcaldqm::ContainerSingle2D _cEtMsm_depthlike
hcaldqm::Container2D _cSOIEtCorr_TTSubdet
hcaldqm::ContainerProf1D _cEtCutDatavsLS_TTSubdet
hcaldqm::Container2D _cMsnData_ElectronicsuTCA
hcaldqm::Container2D _cMsnEmul_ElectronicsuTCA
hcaldqm::ContainerProf1D _cOccupancyEmulvsBX_TTSubdet
hcaldqm::ContainerXXX< uint32_t > _xEmulTotal
hcaldqm::ContainerXXX< uint32_t > _xSentRecL1Msm
bool isFEDHBHE(HcalElectronicsId const &)
void fill(std::map< std::string, TH1 * > &h, const std::string &s, double x)
virtual void book(HcalElectronicsMap const *)
hcaldqm::Container2D _cFGMsm_ElectronicsuTCA
virtual void book(DQMStore::IBooker &, HcalElectronicsMap const *, std::string subsystem="Hcal", std::string aux="")
virtual void initialize(std::string const &folder, hashfunctions::HashType, quantity::Quantity *, quantity::Quantity *, quantity::Quantity *qz=new quantity::ValueQuantity(quantity::fN), int debug=0)
int version() const
get the version code for the trigger tower
hcaldqm::ContainerSingle2D _cEtMsm_uHTR_L1T_depthlike
void book(DQMStore::IBooker &, HcalElectronicsMap const *, std::string subsystem="Hcal", std::string aux="") override
std::vector< bool > _vFGBitsReady
hcaldqm::ContainerProf1D _cOccupancyCutEmulvsBX_TTSubdet
hcaldqm::ContainerXXX< uint32_t > _xFGMsm
hcaldqm::Container2D _cOccupancyEmul_ElectronicsuTCA
void initialize(std::string const &folder, hashfunctions::HashType, quantity::Quantity *, quantity::Quantity *, quantity::Quantity *qz=new quantity::ValueQuantity(quantity::fEnergy), int debug=0) override
void setBinContent(HcalDetId const &, int) override
hcaldqm::ContainerProf1D _cOccupancyCutDatavsBX_TTSubdet
hcaldqm::ContainerSingle1D _cOccupancyNoTDC_HF_ieta
hcaldqm::ContainerSingle2D _cOccupancyEmul_depthlike
hcaldqm::Container2D _cOccupancyData_ElectronicsuTCA
virtual STDTYPE & get(HcalDetId const &)
edm::EDGetTokenT< HcalTrigPrimDigiCollection > _tokEmul
hcaldqm::ContainerProf1D _cEtCutEmulvsBX_TTSubdet
std::vector< int > getFEDList(HcalElectronicsMap const *)
hcaldqm::Container2D _cEtCorr2x3_TTSubdet
std::vector< int > getFEDuTCAList(HcalElectronicsMap const *)
void fill(HcalDetId const &) override
hcaldqm::Container2D _cEtCorr_TTSubdet
virtual void initialize(FilterType ftype, hashfunctions::HashType htype, std::vector< uint32_t > const &)
hcaldqm::ContainerSingle2D _cOccupancyNoTDC_HF_depth
hcaldqm::ContainerSingleProf2D _cEtEmul_depthlike
hcaldqm::ContainerXXX< uint32_t > _xNumCorr
hcaldqm::filter::HashFilter _filter_VME
std::vector< uint32_t > _vcdaqEids
void _process(edm::Event const &, edm::EventSetup const &) override
hcaldqm::ContainerProf1D _cOccupancyEmulvsLS_TTSubdet
hcaldqm::ContainerProf1D _cOccupancyCutEmulvsLS_TTSubdet
virtual void fill(int, int)
virtual void initialize(hashfunctions::HashType, int debug=0)
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
hcaldqm::ContainerProf1D _cEtMsmRatiovsBX_TTSubdet
void book(DQMStore::IBooker &, HcalElectronicsMap const *, std::string subsystem="Hcal", std::string aux="") override
hcaldqm::ContainerSingleProf2D _cEtCutEmul_depthlike
hcaldqm::ContainerProf2D _cEtData_ElectronicsuTCA
hcaldqm::ContainerProf1D _cMsnEmulvsLS_TTSubdet
void book(DQMStore::IBooker &, std::string subsystem="Hcal", std::string aux="") override
hcaldqm::ContainerSingle1D _cOccupancy_HF_ieta
Readout chain identification for Hcal.
tuple size
Write out results.
hcaldqm::ContainerSingle2D _cMsnData_depthlike
bool isFEDHF(HcalElectronicsId const &)
int ietaAbs() const
get the absolute value of the tower ieta
hcaldqm::ContainerSingleProf2D _cEtCutData_depthlike
hcaldqm::Container1D _cEtData_TTSubdet
hcaldqm::ContainerSingle2D _cMsnEmul_depthlike
std::vector< std::pair< HcalTriggerPrimitiveDigi, HcalTriggerPrimitiveDigi > > _vEmulTPDigis_SentRec
hcaldqm::ContainerProf1D _cMsnCutEmulvsLS_TTSubdet