10 leps_ (cfg.getParameter<edm::InputTag>(
"leps")),
11 jets_ (cfg.getParameter<edm::InputTag>(
"jets")),
12 mets_ (cfg.getParameter<edm::InputTag>(
"mets")),
13 maxNJets_(cfg.getParameter<int>(
"maxNJets")),
14 maxNComb_(cfg.getParameter<int>(
"maxNComb"))
16 produces< std::vector<std::vector<int> > >();
17 produces< std::vector<double> >(
"Discriminators");
18 produces< std::string >(
"Method");
28 std::auto_ptr< std::vector<std::vector<int> > >pOut (
new std::vector<std::vector<int> >);
29 std::auto_ptr< std::vector<double> >pOutDisc(
new std::vector<double>);
30 std::auto_ptr< std::string >pOutMeth(
new std::string);
37 setup.get<TtSemiLepJetCombMVARcd>().
get( calibContainer );
38 std::vector<PhysicsTools::Calibration::VarProcessor*> processors
39 = (calibContainer->find(
"ttSemiLepJetCombMVA")).getProcessors();
40 *pOutMeth = ( processors[ processors.size()-3 ] )->getInstanceName();
41 evt.
put(pOutMeth,
"Method");
57 if( leptons->empty() || mets->empty() || jets->size() <
nPartons ) {
58 std::vector<int> invalidCombi;
60 invalidCombi.push_back( -1 );
61 pOut->push_back( invalidCombi );
63 pOutDisc->push_back( 0. );
64 evt.
put(pOutDisc,
"Discriminators");
73 std::vector<int> jetIndices;
74 for(
unsigned int i=0;
i<jets->size(); ++
i){
76 jetIndices.push_back(
i);
79 std::vector<int> combi;
83 typedef std::pair<double, std::vector<int> > discCombPair;
84 std::list<discCombPair> discCombList;
87 for(
int cnt = 0; cnt < TMath::Factorial( combi.size() ); ++cnt){
101 discCombList.push_back( std::make_pair(discrim, combi) );
104 next_permutation( combi.begin() , combi.end() );
114 unsigned int iDiscComb = 0;
115 typedef std::list<discCombPair>::reverse_iterator discCombIterator;
116 for(discCombIterator discCombPair = discCombList.rbegin(); discCombPair != discCombList.rend(); ++discCombPair) {
118 pOut ->push_back( discCombPair->second );
119 pOutDisc->push_back( discCombPair->first );
123 evt.
put(pOutDisc,
"Discriminators");
Analysis-level MET class.
static const unsigned int nPartons
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
PhysicsTools::MVAComputerCache mvaComputer
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
virtual void produce(edm::Event &evt, const edm::EventSetup &setup)
void evaluateTtSemiLepJetComb(PhysicsTools::Variable::ValueList &values, const TtSemiLepJetComb &jetComb)
#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)