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");
19 produces<int >(
"NumberOfConsideredJets");
29 std::auto_ptr<std::vector<std::vector<int> > > pOut (
new std::vector<std::vector<int> >);
30 std::auto_ptr<std::vector<double> > pOutDisc(
new std::vector<double>);
31 std::auto_ptr<std::string > pOutMeth(
new std::string);
32 std::auto_ptr<int > pJetsConsidered(
new int);
39 setup.get<TtSemiLepJetCombMVARcd>().
get( calibContainer );
40 std::vector<PhysicsTools::Calibration::VarProcessor*> processors
41 = (calibContainer->find(
"ttSemiLepJetCombMVA")).getProcessors();
42 *pOutMeth = ( processors[ processors.size()-3 ] )->getInstanceName();
43 evt.
put(pOutMeth,
"Method");
59 if( leptons->empty() || mets->empty() || jets->size() <
nPartons ) {
60 std::vector<int> invalidCombi;
62 invalidCombi.push_back( -1 );
63 pOut->push_back( invalidCombi );
65 pOutDisc->push_back( 0. );
66 evt.
put(pOutDisc,
"Discriminators");
67 *pJetsConsidered = jets->size();
68 evt.
put(pJetsConsidered,
"NumberOfConsideredJets");
77 std::vector<int> jetIndices;
78 for(
unsigned int i=0;
i<jets->size(); ++
i){
83 jetIndices.push_back(
i);
86 std::vector<int> combi;
90 typedef std::pair<double, std::vector<int> > discCombPair;
91 std::list<discCombPair> discCombList;
94 for(
int cnt = 0; cnt < TMath::Factorial( combi.size() ); ++cnt){
108 discCombList.push_back( std::make_pair(discrim, combi) );
111 next_permutation( combi.begin() , combi.end() );
121 unsigned int iDiscComb = 0;
122 typedef std::list<discCombPair>::reverse_iterator discCombIterator;
123 for(discCombIterator discCombPair = discCombList.rbegin(); discCombPair != discCombList.rend(); ++discCombPair) {
125 pOut ->push_back( discCombPair->second );
126 pOutDisc->push_back( discCombPair->first );
130 evt.
put(pOutDisc,
"Discriminators");
131 evt.
put(pJetsConsidered,
"NumberOfConsideredJets");
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)
void setup(std::vector< TH2F > &depth, std::string name, std::string units="")