9 maxNJets_(
cfg.getParameter<
int>(
"maxNJets")),
10 maxNComb_(
cfg.getParameter<
int>(
"maxNComb")) {
11 produces<std::vector<std::vector<int>>>();
12 produces<std::vector<double>>(
"Discriminators");
13 produces<std::string>(
"Method");
14 produces<int>(
"NumberOfConsideredJets");
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();
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");