Skip to content

Commit 87a5cb5

Browse files
Benedikt Volkelchiarazampolli
authored andcommitted
Update similarity check
Avoid some potentially weird behaviour with default initialisation of axes in higher dimensions
1 parent a4e4475 commit 87a5cb5

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

RelVal/ReleaseValidation.C

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,9 @@ bool PotentiallySameHistograms(TH1* hA, TH1* hB)
207207
return false;
208208
}
209209

210-
if (!PotentiallySameAxes(hA->GetXaxis(), hB->GetXaxis()) || !PotentiallySameAxes(hA->GetYaxis(), hB->GetYaxis()) || !PotentiallySameAxes(hA->GetZaxis(), hB->GetZaxis())) {
210+
if (!PotentiallySameAxes(hA->GetXaxis(), hB->GetXaxis()) ||
211+
(dynamic_cast<TH2*>(hA) && !PotentiallySameAxes(hA->GetYaxis(), hB->GetYaxis())) ||
212+
(dynamic_cast<TH3*>(hA) && !PotentiallySameAxes(hA->GetZaxis(), hB->GetZaxis()))) {
211213
// some axes are different
212214
return false;
213215
}
@@ -374,8 +376,6 @@ void CompareHistos(TH1* hA, TH1* hB, int whichTest, double valChi2, double valMe
374376
hTests->SetStats(000);
375377
hTests->SetMinimum(-1E-6);
376378

377-
int nEventsA = hA->GetEntries();
378-
int nEventsB = hB->GetEntries();
379379
double integralA = hA->Integral();
380380
double integralB = hB->Integral();
381381

0 commit comments

Comments
 (0)