15 if( p4s.size() < 2 )
return 0;
17 std::vector<double> pTs;
21 const double sumPT = accumulate( pTs.begin(), pTs.end(), double(0) );
22 const LorentzV sumP4 = accumulate( p4s.begin(), p4s.end(),
LorentzV() );
24 return 0.5 * ( sumPT - DsumPT ) /
sqrt( sumPT*sumPT - sumP4.Perp2() );
28 std::vector<double>
diff( 1<<(pTs.size()-1) , 0. );
29 for(
unsigned i=0;
i < diff.size();
i++)
30 for(
unsigned j=0; j < pTs.size(); j++)
31 diff[
i] += pTs[j] * ( 1 - 2 * (
int(
i>>j)&1) ) ;
33 return fabs( *min_element( diff.begin(), diff.end(),
fabs_less() ) );
static double minimum_deltaSumPT(const std::vector< double > &pTs)
Container::value_type value_type
ROOT::Math::LorentzVector< ROOT::Math::PtEtaPhiM4D< double > > LorentzV
double operator()(const LVs &p4s) const