30 double maxProbChi2 = 0.;
31 for(
unsigned int s=0;
s<sols.size();
s++){
32 maxProbChi2 =
std::max(maxProbChi2,sols[
s].getProbChi2());
36 std::vector<unsigned int> indices;
38 for(
unsigned int s=0;
s<sols.size();
s++){
39 if(fabs(sols[
s].getProbChi2()-maxProbChi2) < 0.0001) indices.push_back(
s);
44 double prev_W1b = 999.;
45 double prev_W2b = 999.;
47 if(indices.size() == 1) bestSol = indices[0];
48 if(indices.size() > 1){
49 for(
unsigned int i=0;
i!=indices.size();
i++){
50 double DPhi_W1b0 = fabs(sols[indices[
i]].getFitHadW_plus().
phi()-sols[indices[
i]].getFitHadb().
phi());
51 double DPhi_W1b1 = fabs(sols[indices[
i]].getFitHadW_plus().
phi()-sols[indices[
i]].getFitHadbbar().
phi());
52 double DPhi_W2b0 = fabs(sols[indices[
i]].getFitHadW_minus().
phi()-sols[indices[
i]].getFitHadb().
phi());
53 double DPhi_W2b1 = fabs(sols[indices[
i]].getFitHadW_minus().
phi()-sols[indices[
i]].getFitHadbbar().
phi());
55 if(DPhi_W1b0>3.1415) DPhi_W1b0 = 2.*3.1415-DPhi_W1b0;
56 if(DPhi_W1b1>3.1415) DPhi_W1b1 = 2.*3.1415-DPhi_W1b1;
57 if(DPhi_W2b0>3.1415) DPhi_W2b0 = 2.*3.1415-DPhi_W2b0;
58 if(DPhi_W2b1>3.1415) DPhi_W2b1 = 2.*3.1415-DPhi_W2b1;
62 if(DPhi_W1b0<DPhi_W2b0 && DPhi_W1b1<DPhi_W2b1){
63 if(DPhi_W1b0<prev_W1b && DPhi_W1b1<prev_W2b){
67 if(DPhi_W1b0>DPhi_W2b0 && DPhi_W1b1>DPhi_W2b1){
68 if(DPhi_W2b0<prev_W1b && DPhi_W2b1<prev_W2b){
72 if((DPhi_W1b0<DPhi_W2b0 && DPhi_W1b1>DPhi_W2b1)||(DPhi_W1b0>DPhi_W2b0 && DPhi_W1b1<DPhi_W2b1)){
73 if((DPhi_W1b0+DPhi_W1b1)<(DPhi_W2b0+DPhi_W2b1)){
74 if(DPhi_W1b0<prev_W1b && DPhi_W1b1<prev_W2b){
78 if(DPhi_W2b0<prev_W1b && DPhi_W2b1<prev_W2b){
~TtHadSimpleBestJetComb()
int operator()(std::vector< TtHadEvtSolution > &)