6 lepsToken_ (consumes<
edm::
View<
reco::RecoCandidate>>(cfg.getParameter<
edm::InputTag>(
"leps"))),
7 jetsToken_ (consumes<
std::vector<
pat::
Jet> >(cfg.getParameter<
edm::InputTag>(
"jets"))),
8 metsToken_ (consumes<
std::vector<
pat::
MET> >(cfg.getParameter<
edm::InputTag>(
"mets"))),
9 maxNJets_(cfg.getParameter<
int>(
"maxNJets")),
10 maxNComb_(cfg.getParameter<
int>(
"maxNComb"))
12 produces<std::vector<std::vector<int> > >();
13 produces<std::vector<double> >(
"Discriminators");
14 produces<std::string >(
"Method");
15 produces<int >(
"NumberOfConsideredJets");
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
virtual void produce(edm::Event &evt, const edm::EventSetup &setup)
edm::EDGetTokenT< std::vector< pat::MET > > metsToken_
void evaluateTtSemiLepJetComb(PhysicsTools::Variable::ValueList &values, const TtSemiLepJetComb &jetComb)
edm::EDGetTokenT< std::vector< pat::Jet > > jetsToken_
#define MVA_COMPUTER_CONTAINER_IMPLEMENT(N)
TtSemiLepJetCombMVAComputer(const edm::ParameterSet &)
Common calculator class to keep multivariate analysis variables for jet combinations in semi-leptonic...
~TtSemiLepJetCombMVAComputer()
bool next_combination(BidIt n_begin, BidIt n_end, BidIt r_begin, BidIt r_end)