CMS 3D CMS Logo

List of all members | Public Member Functions
TtSemiSimpleBestJetComb Class Reference

Simple method to get the correct jet combination in semileptonic ttbar events. More...

#include "TopQuarkAnalysis/TopLeptonSelection/interface/TtSemiSimpleBestJetComb.h"

Public Member Functions

int operator() (std::vector< TtSemiEvtSolution > &)
 
 TtSemiSimpleBestJetComb ()
 
 ~TtSemiSimpleBestJetComb ()
 

Detailed Description

Simple method to get the correct jet combination in semileptonic ttbar events.

This method starts from a vector of fitted TtSemiEvtSolutions. This class returns the solution with the highest probChi^2 value. In case that there are more possibilities (eg when only a hadrW constraint was applied), the correct hadronic b is assumed to be the one with the smallest DR angle wrt the Whadr direction.

Author
Jan Heyninck
Version
Id
TtSemiSimpleBestJetComb.h,v 1.3 2007/09/20 18:03:21 lowette Exp

Definition at line 32 of file TtSemiSimpleBestJetComb.h.

Constructor & Destructor Documentation

◆ TtSemiSimpleBestJetComb()

TtSemiSimpleBestJetComb::TtSemiSimpleBestJetComb ( )

Definition at line 6 of file TtSemiSimpleBestJetComb.cc.

6 {}

◆ ~TtSemiSimpleBestJetComb()

TtSemiSimpleBestJetComb::~TtSemiSimpleBestJetComb ( )

Definition at line 8 of file TtSemiSimpleBestJetComb.cc.

8 {}

Member Function Documentation

◆ operator()()

int TtSemiSimpleBestJetComb::operator() ( std::vector< TtSemiEvtSolution > &  sols)

Definition at line 10 of file TtSemiSimpleBestJetComb.cc.

10  {
11  // search the highest probChi^2 value in the among the different jet combination solutions
12  double maxProbChi2 = 0;
13  for (unsigned int s = 0; s < sols.size(); s++)
14  maxProbChi2 = std::max(maxProbChi2, sols[s].getProbChi2());
15 
16  //search indices of original solutions with highest probChi2 value
17  std::vector<unsigned int> indices;
18  indices.clear();
19  for (unsigned int s = 0; s < sols.size(); s++) {
20  if (fabs(sols[s].getProbChi2() - maxProbChi2) < 0.0001)
21  indices.push_back(s);
22  }
23 
24  int bestSol = -999;
25  if (maxProbChi2 > 0.) {
26  if (indices.size() == 1)
27  bestSol = indices[0];
28  if (indices.size() == 2) {
29  //typically only light jets constraints applied, so still b-jet ambiguity to resolve
30  // -> look at DPhi(Whadr,bhadr) and choose smallest value
31  double DPhi_Wb0 = fabs(sols[indices[0]].getFitHadW().phi() - sols[indices[0]].getFitHadb().phi());
32  double DPhi_Wb1 = fabs(sols[indices[1]].getFitHadW().phi() - sols[indices[1]].getFitHadb().phi());
33  if (DPhi_Wb0 > 3.1415)
34  DPhi_Wb0 = 2. * 3.1415 - DPhi_Wb0;
35  if (DPhi_Wb1 > 3.1415)
36  DPhi_Wb1 = 2. * 3.1415 - DPhi_Wb1;
37  if (DPhi_Wb0 < DPhi_Wb1) {
38  bestSol = indices[0];
39  } else {
40  bestSol = indices[1];
41  }
42  }
43  }
44  return bestSol;
45 }

References bTagCombinedSVVariables_cff::indices, SiStripPI::max, phi, and alignCSCRings::s.

bTagCombinedSVVariables_cff.indices
indices
Definition: bTagCombinedSVVariables_cff.py:67
alignCSCRings.s
s
Definition: alignCSCRings.py:92
SiStripPI::max
Definition: SiStripPayloadInspectorHelper.h:169
DDAxes::phi