From d82ea71a9dc27a10df95f924a408e1ff14ebd96f Mon Sep 17 00:00:00 2001 From: mmusich Date: Fri, 17 Dec 2021 21:58:34 +0100 Subject: [PATCH] furthe simplify logic --- .../src/SiPixelLorentzAnglePCLWorker.cc | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/CalibTracker/SiPixelLorentzAngle/src/SiPixelLorentzAnglePCLWorker.cc b/CalibTracker/SiPixelLorentzAngle/src/SiPixelLorentzAnglePCLWorker.cc index d8c0c8445f732..b45003e1e30ee 100644 --- a/CalibTracker/SiPixelLorentzAngle/src/SiPixelLorentzAnglePCLWorker.cc +++ b/CalibTracker/SiPixelLorentzAngle/src/SiPixelLorentzAnglePCLWorker.cc @@ -450,12 +450,8 @@ void SiPixelLorentzAnglePCLWorker::analyze(edm::Event const& iEvent, edm::EventS double drdz = sqrt(1. + cotalpha * cotalpha + cotbeta * cotbeta); double clusterCharge_cut = clustChargeMaxPerLength_ * drdz; - float locBx = 1.; - if (cotbeta < 0.) - locBx = -1.; - float locBz = locBx; - if (cotalpha < 0.) - locBz = -locBx; + float locBx = (cotbeta < 0.) ? -1 : 1.; + float locBz = (cotalpha < 0.) ? -locBx : locBx; auto detId = detIdObj.rawId(); int DetId_index = -1;