Skip to content
Snippets Groups Projects
Commit 790bdcfc authored by scott snyder's avatar scott snyder Committed by scott snyder
Browse files

DerivationFrameworkSUSY: Fix clang warnings.

    
Don't use references in a range-for if the object must be copised.
parent caad4ab7
No related branches found
No related tags found
No related merge requests found
/*
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
*/
#include "DerivationFrameworkSUSY/SUSYGenFilterTool.h"
......@@ -139,7 +139,7 @@ namespace DerivationFramework {
// Get HT
genFiltHT = -1;
for (const auto& tj : *truthjets) {
for (const auto tj : *truthjets) {
if ( tj->pt()>m_MinJetPt && fabs(tj->eta())<m_MaxJetEta ) {
ATH_MSG_VERBOSE("Adding truth jet with pt " << tj->pt()
<< ", eta " << tj->eta()
......@@ -150,7 +150,7 @@ namespace DerivationFramework {
}
float MEx(0.), MEy(0.);
for (const auto& tp : *tpc){
for (const auto tp : *tpc){
int pdgid = tp->pdgId();
if (tp->barcode() >= m_SimBarcodeOffset) continue; // Particle is from G4
if (pdgid==21 && tp->e()==0) continue; // Work around for an old generator bug
......
/*
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
*/
#include "DerivationFrameworkSUSY/SUSYSignalTagger.h"
......@@ -98,7 +98,7 @@ namespace DerivationFramework {
if (!truthP || truthP->empty()) {
return false;
}
for (const auto& tp : *truthP) {
for (const auto tp : *truthP) {
//check ifSUSY particle
if ((abs(tp->pdgId()) > 1000000 && abs(tp->pdgId()) < 1000007) || // squarkL
......@@ -138,7 +138,7 @@ namespace DerivationFramework {
if (!firstsp && !secondsp) return false; // should find none or two
if (firstsp && firstsp->nChildren() == 1) {
for (const auto& tp : *truthP) {
for (const auto tp : *truthP) {
if (tp->barcode() == firstsp->child(0)->barcode() && tp->pdgId() != firstsp->pdgId()) {
firstsp = tp;
break;
......@@ -147,7 +147,7 @@ namespace DerivationFramework {
}
if (secondsp && secondsp->nChildren() == 1) {
for (const auto& tp : *truthP) {
for (const auto tp : *truthP) {
if (tp->barcode() == secondsp->child(0)->barcode() && tp->pdgId() != secondsp->pdgId()) {
secondsp = tp;
break;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment