Skip to content

Commit

Permalink
Merge pull request #31387 from perrotta/removeUnneededZvtxfitValues
Browse files Browse the repository at this point in the history
Avoid computing unnneded quantities in HLTPixlMBForAlignmentFilter
  • Loading branch information
cmsbuild committed Sep 9, 2020
2 parents 9b95822 + b59aadc commit 06d7c18
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions HLTrigger/special/plugins/HLTPixlMBForAlignmentFilter.cc
Expand Up @@ -90,19 +90,14 @@ bool HLTPixlMBForAlignmentFilter::hltFilter(edm::Event& iEvent,
auto apixl(tracks->begin());
auto epixl(tracks->end());
int itrk = 0;
double zvtxfit = 0.0;
double zvtxfit2 = 0.0;
if (tracks->size() >= min_trks_) {
etastore.clear();
phistore.clear();
itstore.clear();
for (auto ipixl = apixl; ipixl != epixl; ipixl++) {
const double& ztrk1 = ipixl->vz();
const double& etatrk1 = ipixl->momentum().eta();
const double& phitrk1 = ipixl->momentum().phi();
const double& pttrk1 = ipixl->pt();
zvtxfit = zvtxfit + ztrk1;
zvtxfit2 = zvtxfit2 + ztrk1 * ztrk1;
if (pttrk1 > min_Pt_) {
// the *store-vectors store the tracks above pt-cut
// itstore is the position in the original collection
Expand All @@ -113,12 +108,6 @@ bool HLTPixlMBForAlignmentFilter::hltFilter(edm::Event& iEvent,
}
itrk++;
}
if (itrk > 0) {
// implement proper vertex fit here ?
zvtxfit = zvtxfit / itrk;
zvtxfit2 = zvtxfit2 / itrk;
zvtxfit2 = sqrt(zvtxfit2 - zvtxfit * zvtxfit);
}
// locisol is the position in the *store vectors
vector<int> locisol;
if (itstore.size() > 1) {
Expand Down

0 comments on commit 06d7c18

Please sign in to comment.