Skip to content

Commit

Permalink
HTXS adding parentheses to functions
Browse files Browse the repository at this point in the history
  • Loading branch information
adewit committed Nov 25, 2019
1 parent ee10bb7 commit 5b34da7
Showing 1 changed file with 8 additions and 4 deletions.
Expand Up @@ -61,8 +61,9 @@ namespace Rivet {

/// @brief Checks whether the input particle has a child with a given PDGID
bool hasChild(const GenParticle *ptcl, int pdgID) {
for (auto child:Particle(*ptcl).children())
for (auto child:Particle(*ptcl).children()) {
if (child.pdgId()==pdgID) return true;
}
return false;
}

Expand All @@ -75,16 +76,19 @@ namespace Rivet {

/// @brief Return true is particle decays to quarks
bool quarkDecay(const Particle &p) {
for (auto child:p.children())
for (auto child:p.children()) {
if (PID::isQuark(child.pdgId())) return true;
}
return false;
}

/// @brief Return true if particle decays to charged leptons.
bool ChLeptonDecay(const Particle &p) {
for (auto child : p.children())
if (PID::isChLepton(child.pid()))
for (auto child : p.children()) {
if (PID::isChLepton(child.pdgId())) {
return true;
}
}
return false;
}

Expand Down

0 comments on commit 5b34da7

Please sign in to comment.