56 if( leptons->empty() )
return;
66 if( mets->empty() )
return;
77 if( jets->size() <
nPartons )
return;
82 std::vector<int> matching;
86 if( matchingHandle->empty() )
88 <<
"Empty vector from jet-parton matching. This should not happen! \n";
89 matching = *(matchingHandle->begin());
90 if(matching.size() <
nPartons)
return;
93 for(
unsigned int i = 0;
i < matching.size(); ++
i) {
94 if(matching[
i] == -3)
continue;
95 if(matching[
i] < 0 || matching[
i] >= (
int)jets->size())
102 matching.push_back( -1 );
114 std::vector<int> jetIndices;
115 for(
unsigned int i=0;
i<jets->size(); ++
i) {
117 jetIndices.push_back(i);
120 std::vector<int> combi;
121 for(
unsigned int i = 0; i <
nPartons; ++
i)
133 for(
unsigned int cnt = 0; cnt < TMath::Factorial( combi.size() ); ++cnt) {
141 bool trueCombi =
false;
146 for(
unsigned int i = 0; i < matching.size(); ++
i) {
147 if(combi[i]!=matching[i] && matching[i]!=-3) {
155 values.
add(
"target", trueCombi);
160 next_permutation( combi.begin() , combi.end() );
PhysicsTools::MVAComputerCache mvaComputer
Analysis-level MET class.
static const unsigned int nPartons
WDecay::LeptonType leptonType_
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
void evaluateTtSemiLepJetComb(PhysicsTools::Variable::ValueList &values, const TtSemiLepJetComb &jetComb)
Common calculator class to keep multivariate analysis variables for jet combinations in semi-leptonic...
bool next_combination(BidIt n_begin, BidIt n_end, BidIt r_begin, BidIt r_end)
void setup(std::vector< TH2F > &depth, std::string name, std::string units="")