|
43 | 43 | #include <cmath> |
44 | 44 | #include <experimental/type_traits> |
45 | 45 | #include <string> |
| 46 | +#include <utility> |
46 | 47 | #include <vector> |
47 | 48 |
|
48 | 49 | using namespace o2; |
@@ -429,8 +430,9 @@ struct CorrelationTask { |
429 | 430 | if (cfgTriggerCharge != 0) { |
430 | 431 | if (cfgTriggerCharge * track1.sign() < 0) |
431 | 432 | continue; |
432 | | - } else if (track1.sign() == 0) |
| 433 | + } else if (track1.sign() == 0) { |
433 | 434 | continue; // reject neutral MC particles |
| 435 | + } |
434 | 436 | } |
435 | 437 | } else if constexpr (std::experimental::is_detected<HasSign, typename TTracks1::iterator>::value) { |
436 | 438 | // Check reco objects that have the sign attribute. There are no neutrals to deal with. |
@@ -465,8 +467,9 @@ struct CorrelationTask { |
465 | 467 | // TParticlePDG *p = pdg->GetParticle(track1.pdgCode()); |
466 | 468 | // target->getTriggerHist()->Fill(step, track1.pt(), multiplicity, posZ, p->Mass(), triggerWeight); |
467 | 469 | target->getTriggerHist()->Fill(step, track1.pt(), multiplicity, posZ, 1.8, triggerWeight); |
468 | | - } else |
| 470 | + } else { |
469 | 471 | LOGF(fatal, "Can not fill mass axis without invMass column. Disable cfgMassAxis."); |
| 472 | + } |
470 | 473 | } else { |
471 | 474 | target->getTriggerHist()->Fill(step, track1.pt(), multiplicity, posZ, triggerWeight); |
472 | 475 | } |
@@ -559,8 +562,9 @@ struct CorrelationTask { |
559 | 562 | if (cfgAssociatedCharge != 0) { |
560 | 563 | if (cfgAssociatedCharge * track2.sign() < 0) |
561 | 564 | continue; |
562 | | - } else if (track2.sign() == 0) // mc particles come in neutrals, need to check explicitly |
| 565 | + } else if (track2.sign() == 0) { // mc particles come in neutrals, need to check explicitly |
563 | 566 | continue; |
| 567 | + } |
564 | 568 | } |
565 | 569 |
|
566 | 570 | if constexpr (std::experimental::is_detected<HasSign, typename TTracks1::iterator>::value && std::experimental::is_detected<HasSign, typename TTracks2::iterator>::value) { |
@@ -608,8 +612,9 @@ struct CorrelationTask { |
608 | 612 | else if constexpr (std::experimental::is_detected<HasPDGCode, typename TTracks1::iterator>::value) { |
609 | 613 | // TParticlePDG *p = pdg->GetParticle(track1.pdgCode()); //TODO: get the mass for the PDG properly |
610 | 614 | target->getPairHist()->Fill(step, track1.eta() - track2.eta(), track2.pt(), track1.pt(), multiplicity, deltaPhi, posZ, 1.8, associatedWeight); // p->Mass() |
611 | | - } else |
| 615 | + } else { |
612 | 616 | LOGF(fatal, "Can not fill mass axis without invMass column. Disable cfgMassAxis."); |
| 617 | + } |
613 | 618 | } else { |
614 | 619 | target->getPairHist()->Fill(step, track1.eta() - track2.eta(), track2.pt(), track1.pt(), multiplicity, deltaPhi, posZ, associatedWeight); |
615 | 620 | } |
|
0 commit comments