Skip to content

Commit

Permalink
Merge pull request #34578 from OzAmram/Remove_0T_2d_template_warning_…
Browse files Browse the repository at this point in the history
…backport

Remove 0 t 2d template warning backport
  • Loading branch information
cmsbuild authored Jul 22, 2021
2 parents 452e208 + 03a0b68 commit e09e497
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,8 @@ std::shared_ptr<const SiPixel2DTemplateDBObject> SiPixel2DTemplateDBObjectESProd

const auto& dbobject = iRecord.get(dbToken_);

if (std::fabs(theMagField - dbobject.sVector()[22]) > 0.1)
if ((theMagField > 0.1) && (std::fabs(theMagField - dbobject.sVector()[22]) > 0.1))
//2D templates not actually used at 0T, so don't print warning
edm::LogWarning("UnexpectedMagneticFieldUsingNonIdealPixel2DTemplate")
<< "Magnetic field is " << theMagField << " Template Magnetic field is " << dbobject.sVector()[22];

Expand Down

0 comments on commit e09e497

Please sign in to comment.