20 std::unique_ptr<std::vector<std::vector<int>>> pOut(
new std::vector<std::vector<int>>);
21 std::unique_ptr<std::vector<double>> pOutDisc(
new std::vector<double>);
22 std::unique_ptr<std::string> pOutMeth(
new std::string);
23 std::unique_ptr<int> pJetsConsidered(
new int);
31 std::vector<PhysicsTools::Calibration::VarProcessor*> processors =
32 (calibContainer->find(
"ttSemiLepJetCombMVA")).getProcessors();
33 *pOutMeth = (processors[processors.size() - 3])->getInstanceName();
50 if (leptons->empty() || mets->empty() || jets->size() <
nPartons) {
51 std::vector<int> invalidCombi;
53 invalidCombi.push_back(-1);
54 pOut->push_back(invalidCombi);
56 pOutDisc->push_back(0.);
58 *pJetsConsidered = jets->size();
59 evt.
put(
std::move(pJetsConsidered),
"NumberOfConsideredJets");
68 std::vector<int> jetIndices;
69 for (
unsigned int i = 0;
i < jets->size(); ++
i) {
74 jetIndices.push_back(
i);
77 std::vector<int> combi;
81 typedef std::pair<double, std::vector<int>> discCombPair;
82 std::list<discCombPair> discCombList;
85 for (
int cnt = 0; cnt < TMath::Factorial(combi.size()); ++cnt) {
98 discCombList.push_back(std::make_pair(discrim, combi));
100 next_permutation(combi.begin(), combi.end());
109 unsigned int iDiscComb = 0;
110 typedef std::list<discCombPair>::reverse_iterator discCombIterator;
111 for (discCombIterator discCombPair = discCombList.rbegin(); discCombPair != discCombList.rend(); ++discCombPair) {
114 pOut->push_back(discCombPair->second);
115 pOutDisc->push_back(discCombPair->first);
120 evt.
put(
std::move(pJetsConsidered),
"NumberOfConsideredJets");
Analysis-level MET class.
static const unsigned int nPartons
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
bool getByToken(EDGetToken token, Handle< PROD > &result) const
edm::EDGetTokenT< std::vector< pat::Jet > > jetsToken_
PRODUCT const & get(ESGetToken< PRODUCT, T > const &iToken) const
edm::EDGetTokenT< std::vector< pat::MET > > metsToken_
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
PhysicsTools::MVAComputerCache mvaComputer
void evaluateTtSemiLepJetComb(PhysicsTools::Variable::ValueList &values, const TtSemiLepJetComb &jetComb)
Common calculator class to keep multivariate analysis variables for jet combinations in semi-leptonic...
edm::EDGetTokenT< edm::View< reco::RecoCandidate > > lepsToken_
bool next_combination(BidIt n_begin, BidIt n_end, BidIt r_begin, BidIt r_end)