14 if( p4s.size() < 2 )
return 0;
16 std::vector<double> pTs;
20 const double sumPT = accumulate( pTs.begin(), pTs.end(), double(0) );
21 const LorentzV sumP4 = accumulate( p4s.begin(), p4s.end(),
LorentzV() );
23 return 0.5 * ( sumPT - DsumPT ) /
sqrt( sumPT*sumPT - sumP4.Perp2() );
27 std::vector<double>
diff( 1<<(pTs.size()-1) , 0. );
28 for(
unsigned i=0;
i < diff.size();
i++)
29 for(
unsigned j=0; j < pTs.size(); j++)
30 diff[
i] += pTs[j] * ( 1 - 2 * (
int(
i>>j)&1) ) ;
32 return fabs( *min_element( diff.begin(), diff.end(),
33 [](
auto x,
auto y){
return fabs(
x) < fabs(
y);} ) );
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