Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DD4hep] Fix DDFilteredView unit test for DD4hep with Geant4 units #32721

Merged
merged 1 commit into from Jan 23, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 4 additions & 3 deletions DetectorDescription/DDCMS/test/DDFilteredView.cppunit.cc
Expand Up @@ -111,12 +111,13 @@ void testDDFilteredView::checkFilteredView() {
count++;
}

std::cout << "Get LongFL from hf as string values:\n";
std::cout << "Get LongFL from hf as numerically evaluated string values:\n";
count = 0;
std::vector<std::string> sLongFL = fview.get<std::vector<std::string>>("hf", "LongFL");
for (auto const& i : sLongFL) {
std::cout << "LongFL " << i << " == " << refsLongFL_[count] << "\n";
CPPUNIT_ASSERT(abs(std::stod(i) - std::stod(refsLongFL_[count])) < 10e-6);
double dblVal = std::stod(i) / dd4hep::cm; // Convert DD4hep units to cm
std::cout << "LongFL " << dblVal << " == " << refsLongFL_[count] << "\n";
CPPUNIT_ASSERT(abs(dblVal - std::stod(refsLongFL_[count])) < 10e-6);
count++;
}

Expand Down