25 std::unique_ptr<std::vector<std::vector<int> > > pOut (
new std::vector<std::vector<int> >);
26 std::unique_ptr<std::vector<double> > pOutDisc(
new std::vector<double>);
27 std::unique_ptr<std::string > pOutMeth(
new std::string);
28 std::unique_ptr<int > pJetsConsidered(
new int);
36 std::vector<PhysicsTools::Calibration::VarProcessor*> processors
37 = (calibContainer->find(
"ttSemiLepJetCombMVA")).getProcessors();
38 *pOutMeth = ( processors[ processors.size()-3 ] )->getInstanceName();
55 if( leptons->empty() || mets->empty() || jets->size() <
nPartons ) {
56 std::vector<int> invalidCombi;
58 invalidCombi.push_back( -1 );
59 pOut->push_back( invalidCombi );
61 pOutDisc->push_back( 0. );
63 *pJetsConsidered = jets->size();
64 evt.
put(
std::move(pJetsConsidered),
"NumberOfConsideredJets");
73 std::vector<int> jetIndices;
74 for(
unsigned int i=0;
i<jets->size(); ++
i){
79 jetIndices.push_back(
i);
82 std::vector<int> combi;
86 typedef std::pair<double, std::vector<int> > discCombPair;
87 std::list<discCombPair> discCombList;
90 for(
int cnt = 0; cnt < TMath::Factorial( combi.size() ); ++cnt){
104 discCombList.push_back( std::make_pair(discrim, combi) );
107 next_permutation( combi.begin() , combi.end() );
117 unsigned int iDiscComb = 0;
118 typedef std::list<discCombPair>::reverse_iterator discCombIterator;
119 for(discCombIterator discCombPair = discCombList.rbegin(); discCombPair != discCombList.rend(); ++discCombPair) {
121 pOut ->push_back( discCombPair->second );
122 pOutDisc->push_back( discCombPair->first );
127 evt.
put(
std::move(pJetsConsidered),
"NumberOfConsideredJets");
Analysis-level MET class.
static const unsigned int nPartons
edm::EDGetTokenT< edm::View< reco::RecoCandidate > > lepsToken_
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
bool getByToken(EDGetToken token, Handle< PROD > &result) const
def setup(process, global_tag, zero_tesla=False)
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
void get(HolderT &iHolder) const
PhysicsTools::MVAComputerCache mvaComputer
edm::EDGetTokenT< std::vector< pat::MET > > metsToken_
void evaluateTtSemiLepJetComb(PhysicsTools::Variable::ValueList &values, const TtSemiLepJetComb &jetComb)
edm::EDGetTokenT< std::vector< pat::Jet > > jetsToken_
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)