|
[Rivet-svn] r3341 - trunk/src/Projectionsblackhole at projects.hepforge.org blackhole at projects.hepforge.orgTue Sep 6 03:42:49 BST 2011
Author: buckley Date: Tue Sep 6 03:42:49 2011 New Revision: 3341 Log: More cosmetics, missed in the last commit Modified: trunk/src/Projections/LeptonClusters.cc Modified: trunk/src/Projections/LeptonClusters.cc ============================================================================== --- trunk/src/Projections/LeptonClusters.cc Tue Sep 6 03:38:22 2011 (r3340) +++ trunk/src/Projections/LeptonClusters.cc Tue Sep 6 03:42:49 2011 (r3341) @@ -6,6 +6,7 @@ namespace Rivet { + LeptonClusters::LeptonClusters(const FinalState& photons, const FinalState& signal, double dRmax, bool cluster, const std::vector<std::pair<double, double> >& etaRanges, @@ -21,6 +22,7 @@ addProjection(signal, "Signal"); } + int LeptonClusters::compare(const Projection& p) const { // Compare the two as final states (for pT and eta cuts) const LeptonClusters& other = dynamic_cast<const LeptonClusters&>(p); @@ -42,11 +44,11 @@ _clusteredLeptons.clear(); const FinalState& signal = applyProjection<FinalState>(e, "Signal"); - ParticleVector bareleptons=signal.particles(); - if (bareleptons.size()==0) return; + ParticleVector bareleptons = signal.particles(); + if (bareleptons.empty()) return; vector<ClusteredLepton> allClusteredLeptons; - for (size_t i=0; i<bareleptons.size(); ++i) { + for (size_t i = 0; i < bareleptons.size(); ++i) { allClusteredLeptons.push_back(ClusteredLepton(bareleptons[i])); } @@ -54,8 +56,8 @@ foreach (const Particle& photon, photons.particles()) { const FourMomentum p_P = photon.momentum(); double dRmin=_dRmax; - int idx=-1; - for (size_t i=0; i<bareleptons.size(); ++i) { + int idx = -1; + for (size_t i = 0; i < bareleptons.size(); ++i) { FourMomentum p_l = bareleptons[i].momentum(); // Only cluster photons around *charged* signal particles if (PID::threeCharge(bareleptons[i].pdgId()) == 0) continue; @@ -63,10 +65,10 @@ double dR=deltaR(p_l, p_P); if (dR < dRmin) { dRmin=dR; - idx=i; + idx = i; } } - if (idx>-1) { + if (idx > -1) { if (_cluster) allClusteredLeptons[idx].addPhoton(photon, _cluster); } }
More information about the Rivet-svn mailing list |