Skip to content

Commit

Permalink
There is no use to fill negative values to log scaled axes, just do n…
Browse files Browse the repository at this point in the history
…othing if comparison can't be done
  • Loading branch information
Long committed Nov 25, 2022
1 parent 22513e4 commit a1d3341
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 22 deletions.
8 changes: 4 additions & 4 deletions DQM/HcalCommon/interface/ValueQuantity.h
Original file line number Diff line number Diff line change
Expand Up @@ -202,8 +202,8 @@ namespace hcaldqm {
{fADC_256_4, -0.5},
{fEtlog2, 0.},
{fDiffRatio, -2.5},
{fCPUenergy, -1},
{fGPUenergy, -1},
{fCPUenergy, 0},
{fGPUenergy, 0},
};
const std::map<ValueQuantityType, double> max_value = {
{fN, 1000},
Expand Down Expand Up @@ -333,8 +333,8 @@ namespace hcaldqm {
{fADC_256_4, 64},
{fEtlog2, 9},
{fDiffRatio, 50},
{fCPUenergy, 1005},
{fGPUenergy, 1005},
{fCPUenergy, 1000},
{fGPUenergy, 1000},
};
class ValueQuantity : public Quantity {
public:
Expand Down
21 changes: 3 additions & 18 deletions DQM/HcalTasks/plugins/HcalGPUComparisonTask.cc
Original file line number Diff line number Diff line change
Expand Up @@ -96,24 +96,9 @@ HcalGPUComparisonTask::HcalGPUComparisonTask(edm::ParameterSet const& ps)
auto const chbhe_ref = e.getHandle(tokHBHE_ref_);
auto const chbhe_target = e.getHandle(tokHBHE_target_);

if (not(chbhe_ref.isValid() and chbhe_target.isValid())) {
if (chbhe_target.isValid()) {
edm::LogWarning("HcalGPUComparisonTask")
<< "The CPU HBHERecHitCollection " << tagHBHE_ref_.encode() << " is not available";

for (auto const& rh : *chbhe_target)
energyGPUvsCPU_subdet_.fill(rh.id(), -0.5, rh.energy());
} else if (chbhe_ref.isValid()) {
edm::LogWarning("HcalGPUComparisonTask")
<< "The GPU HBHERecHitCollection " << tagHBHE_target_.encode() << " is not available";

for (auto const& rh : *chbhe_ref)
energyGPUvsCPU_subdet_.fill(rh.id(), rh.energy(), -0.5);
} else {
edm::LogWarning("HcalGPUComparisonTask")
<< "Neither CPU nor GPU RecHit Collection available, will not fill this event.";
}

if (not(chbhe_ref.isValid() or chbhe_target.isValid())) {
edm::LogWarning("HcalGPUComparisonTask")
<< "Either CPU or GPU RecHit Collection is available, will not fill this event.";
return;
}

Expand Down

0 comments on commit a1d3341

Please sign in to comment.