Skip to content

Commit f33615e

Browse files
committed
Suggested fixes for a few possible trivial mistakes
1 parent d50809a commit f33615e

File tree

2 files changed

+4
-19
lines changed

2 files changed

+4
-19
lines changed

L1Trigger/L1TTrackMatch/plugins/L1TkEmParticleProducer.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ float L1TkEmParticleProducer::CorrectedEta(float eta, float zv) const {
266266
} else {
267267
if (theta > 0)
268268
delta = ZEcal;
269-
if (theta < 0)
269+
else
270270
delta = -ZEcal;
271271
}
272272

L1Trigger/L1TTrackMatch/plugins/L1TkFastVertexProducer.cc

Lines changed: 3 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -309,25 +309,10 @@ void L1TkFastVertexProducer::produce(edm::StreamID, edm::Event& iEvent, const ed
309309

310310
// sliding windows... maximize bin i + i-1 + i+1
311311

312-
float zvtx_sliding = -999;
313-
float sigma_max = -999;
314-
int imax = -999;
312+
float zvtx_sliding;
313+
float sigma_max;
314+
int imax;
315315
int nb = htmp.GetNbinsX();
316-
for (int i = 2; i <= nb - 1; i++) {
317-
float a0 = htmp.GetBinContent(i - 1);
318-
float a1 = htmp.GetBinContent(i);
319-
float a2 = htmp.GetBinContent(i + 1);
320-
float sigma = a0 + a1 + a2;
321-
if (sigma > sigma_max) {
322-
sigma_max = sigma;
323-
imax = i;
324-
float z0 = htmp.GetBinCenter(i - 1);
325-
float z1 = htmp.GetBinCenter(i);
326-
float z2 = htmp.GetBinCenter(i + 1);
327-
zvtx_sliding = (a0 * z0 + a1 * z1 + a2 * z2) / sigma;
328-
}
329-
}
330-
331316
std::vector<int> found;
332317
found.reserve(nVtx_);
333318
for (int ivtx = 0; ivtx < nVtx_; ivtx++) {

0 commit comments

Comments
 (0)