Skip to content
Snippets Groups Projects
Commit f3553305 authored by Eduardo Rodrigues's avatar Eduardo Rodrigues
Browse files

Merge branch 'modernize-ftc' into 'master'

replace BOOST_FOREACH with range-based for loops

Follow changes in Phys!54

See merge request !50
parents c0be9398 db2ffa11
No related branches found
No related tags found
2 merge requests!74Future merge master,!50replace BOOST_FOREACH with range-based for loops
......@@ -505,7 +505,7 @@ StatusCode BTaggingAnalysis::execute() {
//calculate min IP wrt all pileup vtxs
double IPPU = 10000;
double ipval(0), iperr(0) ;
double ipval(0), iperr(0) ;
m_util->calcIP( axp, PileUpVtx, ipval, iperr );
if(iperr) IPPU=ipval/iperr;
//cal IP wrt different PU
......@@ -763,7 +763,7 @@ StatusCode BTaggingAnalysis::execute() {
if(isTrueSecondaryOS) {
MC_OS_muon_type = 2;
}
}//if( mcp )
pMCID .push_back(MCID);
......@@ -966,7 +966,7 @@ BTaggingAnalysis::choosePrimary(const Particle* AXB,
} else if(m_ChoosePV=="PVbyIP") { //cheated sel needs this
debug()<<"PVbyIP criteria";
m_util->calcIP(AXB, *iv, ip, iperr);
var=fabs(ip);
var=fabs(ip);
} else if(m_ChoosePV=="PVbyIPs") {
debug()<<"PVbyIPs criteria";
m_util->calcIP(AXB, *iv, ip, iperr);
......@@ -974,7 +974,7 @@ BTaggingAnalysis::choosePrimary(const Particle* AXB,
err()<<"IPerror zero or nan, skip vertex: "<<iperr<<endmsg;
continue;
}
var=fabs(ip/iperr);
var=fabs(ip/iperr);
} else {
err()<<"Invalid option ChoosePVCriterium: "<<m_ChoosePV<<endmsg;
return PileUpVtx;
......@@ -1111,7 +1111,7 @@ BTaggingAnalysis::chooseCandidates(const Particle::Range& parts,
using TaggingHelpers::toString;
SameTrackStatus isSame = TaggingHelpers::DifferentParticles;
clones.clear();
BOOST_FOREACH(const LHCb::Particle* q, vtags) {
for(const LHCb::Particle* q: vtags) {
isSame = isSameTrack(*p, *q);
if (!isSame) continue;
// only skip all the rest if actually same track
......@@ -1187,7 +1187,7 @@ BTaggingAnalysis::chooseCandidates(const Particle::Range& parts,
// resulting order does not depend on sort implementation)
std::stable_sort(clones.begin(), clones.end(),dummy::byIncreasingQual);
// remove all potential clones from vtags
BOOST_FOREACH(const LHCb::Particle* q, clones) {
for(const LHCb::Particle* q: clones) {
// find potential clone in vtags
Particle::ConstVector::iterator it =
std::find(vtags.begin(), vtags.end(), q);
......@@ -1683,7 +1683,7 @@ void BTaggingAnalysis::FillSeedInfo(Tuple& tuple, const RecVertex* RecVert,
std::vector<Vertex>& svertices,
const Particle *&SVpart1,
const Particle *&SVpart2 ) {
//look for a secondary Vtx due to opposite B (inclusive sec vertex)
std::vector<float>
pBOVtx_x(0), pBOVtx_y(0), pBOVtx_z(0), pBOVtx_chi2(0), pBOVtx_zerr(0),
......
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