28 if (
a.eta() !=
b.eta())
30 if (
a.phi() !=
b.phi())
34 cout <<
"COMPARISON FAILURE: \n";
35 cout <<
"A: pt = " <<
a.pt() <<
" eta = " <<
a.eta() <<
" phi = " <<
a.phi() <<
"\n";
36 cout <<
"B: pt = " <<
b.pt() <<
" eta = " <<
b.eta() <<
" phi = " <<
b.phi() <<
"\n";
39 if (
a.hwPt() !=
b.hwPt())
41 if (
a.hwEta() !=
b.hwEta())
43 if (
a.hwPhi() !=
b.hwPhi())
47 cout <<
"COMPARISON FAILURE: \n";
48 cout <<
"A: hwPt = " <<
a.hwPt() <<
" hwEta = " <<
a.hwEta() <<
" hwPhi = " <<
a.hwPhi() <<
"\n";
49 cout <<
"B: hwPt = " <<
b.hwPt() <<
" hwEta = " <<
b.hwEta() <<
" hwPhi = " <<
b.hwPhi() <<
"\n";
52 if (
a.hwQual() !=
b.hwQual())
54 if (
a.hwIso() !=
b.hwIso())
57 cout <<
"COMPARISON FAILURE: \n";
58 cout <<
"A: hwQual = " <<
a.hwQual() <<
" hwIso = " <<
a.hwIso() <<
"\n";
59 cout <<
"B: hwQual = " <<
b.hwQual() <<
" hwIso = " <<
b.hwIso() <<
"\n";
75 void endJob()
override;
135 cout <<
"L1T Summary for " << tag_ <<
"\n";
136 cout <<
"DEBUG: egCheck: " << egCheck_ <<
"\n";
137 cout <<
"DEBUG: tauCheck: " << tauCheck_ <<
"\n";
138 cout <<
"DEBUG: jetCheck: " << jetCheck_ <<
"\n";
139 cout <<
"DEBUG: sumCheck: " << sumCheck_ <<
"\n";
140 cout <<
"DEBUG: muonCheck: " << muonCheck_ <<
"\n";
141 cout <<
"DEBUG: algCheck: " << algCheck_ <<
"\n";
199 cout <<
"L1TComparison Module output for " << tag_ <<
"\n";
203 iEvent.getByToken(egTokenA_, XTMPA);
205 iEvent.getByToken(egTokenB_, XTMPB);
208 LogWarning(
"MissingProduct") <<
"L1Upgrade e-gamma's not found." << std::endl;
211 if (bxZeroOnly_ && (ibx != 0))
213 if (ibx < XTMPB->getFirstBX())
217 int sizeA = XTMPA->
size(ibx);
218 int sizeB = XTMPB->
size(ibx);
219 if (sizeA != sizeB) {
220 cout <<
"L1T COMPARISON FAILURE: collections have different sizes for bx = " << ibx <<
"\n";
222 auto itB = XTMPB->
begin(ibx);
223 for (
auto itA = XTMPA->
begin(ibx); itA != XTMPA->
end(ibx); ++itA) {
239 iEvent.getByToken(tauTokenA_, XTMPA);
241 iEvent.getByToken(tauTokenB_, XTMPB);
244 LogWarning(
"MissingProduct") <<
"L1Upgrade tau's not found." << std::endl;
247 if (bxZeroOnly_ && (ibx != 0))
249 if (ibx < XTMPB->getFirstBX())
253 int sizeA = XTMPA->
size(ibx);
254 int sizeB = XTMPB->
size(ibx);
255 if (sizeA != sizeB) {
256 cout <<
"L1T COMPARISON FAILURE: collections have different sizes for bx = " << ibx <<
"\n";
258 auto itB = XTMPB->
begin(ibx);
259 for (
auto itA = XTMPA->
begin(ibx); itA != XTMPA->
end(ibx); ++itA) {
275 iEvent.getByToken(jetTokenA_, XTMPA);
277 iEvent.getByToken(jetTokenB_, XTMPB);
280 LogWarning(
"MissingProduct") <<
"L1Upgrade jet's not found." << std::endl;
283 if (bxZeroOnly_ && (ibx != 0))
285 if (ibx < XTMPB->getFirstBX())
289 int sizeA = XTMPA->
size(ibx);
290 int sizeB = XTMPB->
size(ibx);
291 if (sizeA != sizeB) {
292 cout <<
"L1T COMPARISON FAILURE: collections have different sizes for bx = " << ibx <<
"\n";
294 auto itB = XTMPB->
begin(ibx);
295 for (
auto itA = XTMPA->
begin(ibx); itA != XTMPA->
end(ibx); ++itA) {
311 iEvent.getByToken(sumTokenA_, XTMPA);
313 iEvent.getByToken(sumTokenB_, XTMPB);
316 LogWarning(
"MissingProduct") <<
"L1Upgrade sum's not found." << std::endl;
319 if (bxZeroOnly_ && (ibx != 0))
321 if (ibx < XTMPB->getFirstBX())
325 int sizeA = XTMPA->
size(ibx);
326 int sizeB = XTMPB->
size(ibx);
328 if (sizeA != sizeB) {
329 cout <<
"L1T COMPARISON WARNING: sums collections have different sizes for bx = " << ibx <<
"\n";
330 cout <<
"L1T COMPARISON WARNING: sums collections A size = " << sizeA
331 <<
" sums collection B size = " << sizeB <<
"\n";
332 cout <<
"L1T COMPARISON WARNING: known issue because packer has not been udpated for Minbias\n";
334 for (
auto itA = XTMPA->
begin(ibx); itA != XTMPA->
end(ibx); ++itA) {
335 cout <<
"L1T COMPARISON : EtSum type: A = " << itA->getType() <<
"\n";
337 for (
auto itB = XTMPB->
begin(ibx); itB != XTMPB->
end(ibx); ++itB) {
338 cout <<
"L1T COMPARISON : EtSum type: B = " << itB->getType() <<
"\n";
347 if (sizeA != sizeB) {
348 cout <<
"L1T COMPARISON FAILURE: collections have different sizes for bx = " << ibx <<
"\n";
350 auto itB = XTMPB->
begin(ibx);
351 for (
auto itA = XTMPA->
begin(ibx); itA != XTMPA->
end(ibx); ++itA) {
352 cout <<
"L1T COMPARISON : EtSum type: A = " << itA->getType() <<
" vs B = " << itB->getType() <<
"\n";
353 if (itA->getType() != itB->getType()) {
354 cout <<
"L1T COMPARISON FAILURE: Different types .... EtSum type:" << itA->getType() <<
" vs "
355 << itB->getType() <<
"\n";
358 cout <<
"L1T COMPARISON WARNING: (known issue) sum of type " << itA->getType()
359 <<
" when emulated has a dummy value (pending proper emulation)"
364 cout <<
"L1T COMPARISON FAILURE: for type " << itA->getType() <<
"\n";
372 cout <<
"L1T COMPARISON WARNING: (known issue) not checking sum of type " << itA->getType() <<
"\n";
383 iEvent.getByToken(muonTokenA_, XTMPA);
385 iEvent.getByToken(muonTokenB_, XTMPB);
388 LogWarning(
"MissingProduct") <<
"L1Upgrade muon's not found." << std::endl;
391 if (bxZeroOnly_ && (ibx != 0))
393 if (ibx < XTMPB->getFirstBX())
397 int sizeA = XTMPA->
size(ibx);
398 int sizeB = XTMPB->
size(ibx);
399 if (sizeA != sizeB) {
400 cout <<
"L1T COMPARISON FAILURE: collections have different sizes for bx = " << ibx <<
"\n";
402 auto itB = XTMPB->
begin(ibx);
403 for (
auto itA = XTMPA->
begin(ibx); itA != XTMPA->
end(ibx); ++itA) {
421 cout <<
"INFO: L1T Comparison for " << tag_ <<
"\n";
422 cout <<
"INFO: count of successful comparison for each type follows:\n";
424 cout <<
"eg: " << egCount_ <<
"\n";
426 cout <<
"tau: " << tauCount_ <<
"\n";
428 cout <<
"jet: " << jetCount_ <<
"\n";
430 cout <<
"sum: " << sumCount_ <<
"\n";
432 cout <<
"muon: " << muonCount_ <<
"\n";
433 cout <<
"INFO: count of failed comparison for each type follows:\n";
435 cout <<
"eg: " << egFails_ <<
"\n";
437 cout <<
"tau: " << tauFails_ <<
"\n";
439 cout <<
"jet: " << jetFails_ <<
"\n";
441 cout <<
"sum: " << sumFails_ <<
"\n";
443 cout <<
"muon: " << muonFails_ <<
"\n";
446 if (egCheck_ && ((egFails_ > 0) || (egCount_ <= 0)))
448 if (tauCheck_ && ((tauFails_ > 0) || (tauCount_ <= 0)))
450 if (jetCheck_ && ((jetFails_ > 0) || (jetCount_ <= 0)))
452 if (sumCheck_ && ((sumFails_ > 0) || (sumCount_ <= 0)))
454 if (muonCheck_ && ((muonFails_ > 0) || (muonCount_ <= 0)))
458 cout <<
"SUMMARY: L1T Comparison for " << tag_ <<
" was FAILURE\n";
460 cout <<
"SUMMARY: L1T Comparison for " << tag_ <<
" was SUCCESS\n";