Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SimMuon/CSCDigitizer: replace function deprecated by std=c++17 #24665

Merged
merged 1 commit into from
Sep 28, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions SimMuon/CSCDigitizer/src/CSCGasCollisions.cc
Original file line number Diff line number Diff line change
Expand Up @@ -446,7 +446,7 @@ void CSCGasCollisions::writeSummary( int n_try, int n_steps, double sum_steps, f
}
}

int n_ic = count_if( elosses.begin(), elosses.end(), bind2nd(greater<float>(), eion) );
int n_ic = count_if( elosses.begin(), elosses.end(), [&](auto c){return c > this->eion;} );

edm::LogVerbatim("CSCDigitizer") << "[CSCGasCollisions] total no. of collision steps = " << n_steps;
edm::LogVerbatim("CSCDigitizer") << "[CSCGasCollisions] total sum of steps = " << sum_steps << " cm";
Expand Down Expand Up @@ -522,7 +522,7 @@ float CSCGasCollisions::lnEnergyLoss( float lnCollisions,
else {
// interpolate the value
std::vector<float>::const_iterator loside = find_if(collisions.begin(),
collisions.end(), bind2nd(less<float>(), lnCollisions));
collisions.end(), [&lnCollisions](auto c){return c < lnCollisions;});
std::vector<float>::difference_type ilo = loside - collisions.begin();
if ( ilo > 0 ) {
LogTrace(me) << ": using energy bin "
Expand All @@ -546,7 +546,7 @@ void CSCGasCollisions::fillCollisionsForThisGamma( float logGamma,
std::vector<float>& collisions ) const
{
std::vector<float>::const_iterator bigger = find_if(theGammaBins.begin(),
theGammaBins.end(), bind2nd(greater<float>(), logGamma));
theGammaBins.end(), [&logGamma](auto c){return c > logGamma;});

if ( bigger == theGammaBins.end() ) {
// use highest bin
Expand Down