21 dataLabel_(ps.getParameter<
edm::InputTag>(
"dataSource")),
23 emulLabel_(ps.getParameter<
edm::InputTag>(
"emulSource")),
27 histFolder_(ps.getParameter<
std::
string>(
"histFolder")),
28 tpFillThreshold_(ps.getUntrackedParameter<
int>(
"etDistributionsFillThreshold", 0))
55 event.getByToken(
fedRawData_, fedRawDataCollection);
56 bool caloLayer1OutOfRun{
true};
57 bool caloLayer2OutOfRun{
true};
58 if (fedRawDataCollection.
isValid()) {
59 caloLayer1OutOfRun =
false;
60 caloLayer2OutOfRun =
false;
61 for(
int iFed=1354; iFed<1360; iFed+=2) {
63 if ( fedRawData.
size() == 0 ) {
64 caloLayer1OutOfRun =
true;
69 if ( fedRawData.
size() == 0 ) {
70 caloLayer2OutOfRun =
true;
74 if ( caloLayer1OutOfRun
or caloLayer2OutOfRun ) {
82 for (
auto iter = dataTowers->
begin(0); iter != dataTowers->
end(0); ++iter) {
83 const auto& tower = *iter;
84 int eta = tower.hwEta();
85 if ( eta == 29 ) eta = 30;
86 if ( eta == -29 ) eta = -30;
87 dataTowerSet.emplace(eta, tower.hwPhi(), tower.hwPt() + (tower.hwEtRatio()<<9) + (tower.hwQual()<<12),
true);
94 for (
auto iter = emulTowers->
begin(0); iter != emulTowers->
end(0); ++iter) {
95 const auto& tower = *iter;
96 emulTowerSet.emplace(tower.hwEta(), tower.hwPhi(), tower.hwPt() + (tower.hwEtRatio()<<9) + (tower.hwQual()<<12),
false);
103 bool etMsmThisEvent{
false};
104 bool erMsmThisEvent{
false};
105 bool fbMsmThisEvent{
false};
106 bool towerCountMsmThisEvent{
false};
108 if ( dataTowerSet.size() != emulTowerSet.size() ) {
112 towerCountMsmThisEvent =
true;
115 auto dataIter = dataTowerSet.begin();
116 auto emulIter = emulTowerSet.begin();
117 while ( dataIter != dataTowerSet.end() && emulIter != emulTowerSet.end() ) {
118 auto dataTower = *(dataIter++);
119 auto emulTower = *(emulIter++);
120 assert(dataTower.ieta_==emulTower.ieta_ && dataTower.iphi_==emulTower.iphi_);
124 if (
abs(dataTower.ieta_) >= 30 ) {
130 if ( dataTower.data_ == emulTower.data_ ) {
137 if ( dataTower.et() != emulTower.et() ) {
145 etMsmThisEvent =
true;
148 if ( dataTower.er() != emulTower.er() ) {
152 erMsmThisEvent =
true;
155 if ( dataTower.fb() != emulTower.fb() ) {
160 fbMsmThisEvent =
true;
180 if ( etMsmThisEvent
or erMsmThisEvent
or fbMsmThisEvent
or towerCountMsmThisEvent ) {
187 std::string eventString{std::to_string(
id.
run()) +
":" + std::to_string(
id.luminosityBlock()) +
":" + std::to_string(
id.
event())};
201 for (
size_t ibin=1, imatch=
lastMismatchIndex_; ibin<=20; ibin++, imatch=(imatch+19)%20) {
203 for(
int itype=0; itype<4; ++itype) {
221 title +=
";Raw ET value";
222 return ibooker.
book1D(name,
title, 512, -0.5, 511.5);
225 title +=
";#Delta raw ET value";
226 return ibooker.
book1D(name,
title, 1023, -511.5, 511.5);
229 return ibooker.
book2D(name,
title, 512, -0.5, 511.5, 512, -0.5, 511.5);
232 title +=
";i#eta;i#phi";
233 return ibooker.
book2D(name,
title, 83, -41.5, 41.5, 72, 0.5, 72.5);
243 mismatchesPerBxMod9_ = ibooker.
book1D(
"mismatchesPerBxMod9",
"CaloLayer1 data-emulator mismatch per bx%9;Bunch crossing mod 9;Counts", 9, -0.5, 8.5);
247 dataOcc_ = bookOccupancy(
"dataOcc",
"Tower Occupancy for Data");
248 emulOcc_ = bookOccupancy(
"emulOcc",
"Tower Occupancy for Emulator");
249 matchOcc_ = bookOccupancy(
"matchOcc",
"Tower Occupancy for Data/Emulator Full Matches");
250 failureOccEtMismatch_ = bookOccupancy(
"failureOccEtMismatch",
"Tower Occupancy for Data/Emulator ET Mismatch");
251 failureOccEtDataZero_ = bookOccupancy(
"failureOccEtDataZero",
"Tower Occupancy for Data ET Zero, Emul Nonzero");
252 failureOccEtEmulZero_ = bookOccupancy(
"failureOccEtEmulZero",
"Tower Occupancy for Data ET Nonzero, Emul Zero");
253 failureOccErMismatch_ = bookOccupancy(
"failureOccErMismatch",
"Tower Occupancy for Data/Emulator ET Ratio Mismatch");
254 failureOccFbMismatch_ = bookOccupancy(
"failureOccFbMismatch",
"Tower Occupancy for Data/Emulator Feature Bit Mismatch");
259 emulEtDistribution_ = bookEt(
"emulEtDistribution",
"ET distribution for towers in emulator");
260 etCorrelation_ = bookEtCorrelation(
"EtCorrelation",
"Et correlation for all towers;Data tower Et;Emulator tower Et");
261 matchEtDistribution_ = bookEt(
"matchEtDistribution",
"ET distribution for towers matched between data and emulator");
262 etMismatchDiff_ = bookEtDiff(
"etMismatchDiff",
"ET difference (data-emulator) for ET mismatches");
263 fbCorrelation_ = ibooker.
book2D(
"FbCorrelation",
"Feature Bit correlation for BE;Data;Emulator", 16, -0.5, 15.5, 16, -0.5, 15.5);
264 fbCorrelationHF_ = ibooker.
book2D(
"FbCorrelationHF",
"Feature Bit correlation for HF;Data;Emulator", 16, -0.5, 15.5, 16, -0.5, 15.5);
268 const int nLumis = 2000;
269 etMismatchByLumi_ = ibooker.
book1D(
"etMismatchByLumi",
"ET Mismatch counts per lumi section;LumiSection;Counts", nLumis, .5, nLumis+0.5);
270 erMismatchByLumi_ = ibooker.
book1D(
"erMismatchByLumi",
"ET Ratio Mismatch counts per lumi section;LumiSection;Counts", nLumis, .5, nLumis+0.5);
271 fbMismatchByLumi_ = ibooker.
book1D(
"fbMismatchByLumi",
"Feature Bit Mismatch counts per lumi section;LumiSection;Counts", nLumis, .5, nLumis+0.5);
273 etMismatchesPerBx_ = ibooker.
book1D(
"etMismatchesPerBx",
"ET Mismatch counts per bunch crossing", 3564, -.5, 3563.5);
274 erMismatchesPerBx_ = ibooker.
book1D(
"erMismatchesPerBx",
"ET Ratio Mismatch counts per bunch crossing", 3564, -.5, 3563.5);
275 fbMismatchesPerBx_ = ibooker.
book1D(
"fbMismatchesPerBx",
"Feature Bit Mismatch counts per bunch crossing", 3564, -.5, 3563.5);
279 "Log of last 20 mismatches (use json tool to copy/paste)",
LuminosityBlockID id() const
const_iterator end(int bx) const
void setBinContent(int binx, double content)
set content of bin (1-D)
std::array< double, NSummaryColumns > dataEmulNumerator_
edm::EDGetTokenT< l1t::CaloTowerBxCollection > emulSource_
edm::EDGetTokenT< l1t::CaloTowerBxCollection > dataSource_
void endLuminosityBlock(const edm::LuminosityBlock &, const edm::EventSetup &) override
MonitorElement * erMismatchesPerBx_
L1TdeStage2CaloLayer1(const edm::ParameterSet &ps)
MonitorElement * fbCorrelationHF_
void dqmBeginRun(const edm::Run &, const edm::EventSetup &) override
edm::EDGetTokenT< HcalTrigPrimDigiCollection > hcalTowers_
int bunchCrossing() const
MonitorElement * fbMismatchesPerBx_
MonitorElement * emulOcc_
LuminosityBlockNumber_t luminosityBlock() const
MonitorElement * dataEmulSummary_
MonitorElement * failureOccErMismatch_
size_t size() const
Lenght of the data buffer in bytes.
MonitorElement * fbCorrelation_
~L1TdeStage2CaloLayer1() override
void updateMismatch(const edm::Event &e, int mismatchType)
MonitorElement * dataEtDistributionFBMismatch_
std::set< SimpleTower > SimpleTowerSet
const FEDRawData & FEDData(int fedid) const
retrieve data for fed
MonitorElement * failureOccEtDataZero_
void setCurrentFolder(std::string const &fullpath)
MonitorElement * matchEtDistribution_
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e< void, edm::EventID const &, edm::Timestamp const & > We also list in braces which AR_WATCH_USING_METHOD_ is used for those or
MonitorElement * failureOccEtMismatch_
void analyze(const edm::Event &e, const edm::EventSetup &c) override
MonitorElement * dataEtDistribution_
MonitorElement * book1D(Args &&...args)
Abs< T >::type abs(const T &t)
MonitorElement * emulEtDistribution_
MonitorElement * erMismatchByLumi_
MonitorElement * etMismatchDiff_
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger but the state exists so we define the behavior If all triggers are the negative crieriion will lead to accepting the event(this again matches the behavior of"!*"before the partial wildcard feature was incorporated).The per-event"cost"of each negative criterion with multiple relevant triggers is about the same as!*was in the past
MonitorElement * etMismatchesPerBx_
MonitorElement * dataOcc_
MonitorElement * book2D(Args &&...args)
MonitorElement * etMismatchByLumi_
void beginLuminosityBlock(const edm::LuminosityBlock &, const edm::EventSetup &) override
std::array< std::pair< std::string, int >, 20 > last20MismatchArray_
LuminosityBlockNumber_t luminosityBlock() const
MonitorElement * matchOcc_
MonitorElement * last20Mismatches_
MonitorElement * mismatchesPerBxMod9_
size_t lastMismatchIndex_
MonitorElement * failureOccFbMismatch_
double dataEmulDenominator_
MonitorElement * failureOccEtEmulZero_
MonitorElement * etCorrelation_
const_iterator begin(int bx) const
edm::EDGetTokenT< FEDRawDataCollection > fedRawData_
void bookHistograms(DQMStore::IBooker &ibooker, const edm::Run &, const edm::EventSetup &) override
MonitorElement * towerCountMismatchesPerBx_
MonitorElement * fbMismatchByLumi_