34 std::vector<TtSemiLepKinFitter::Constraint>
constraints(std::vector<unsigned>&);
114 produces<std::vector<TtSemiEvtSolution> >();
136 bool leptonFound =
false;
151 bool metFound =
false;
158 bool jetsFound =
false;
161 if (
jets->size() >= 4)
167 std::vector<TtSemiEvtSolution>* evtsols =
new std::vector<TtSemiEvtSolution>();
168 if (leptonFound && metFound && jetsFound) {
176 for (
unsigned int bh = 0; bh <
nrCombJets; bh++) {
177 if (
q >
p && !(bh ==
p || bh ==
q)) {
178 for (
unsigned int bl = 0; bl <
nrCombJets; bl++) {
179 if (!(bl ==
p || bl ==
q || bl == bh)) {
201 if (
genEvt->numberOfBQuarks() ==
203 genEvt->numberOfLeptons() ==
209 (*myLRSignalSelObservables)(asol, *
jets);
215 (*myLRSignalSelCalc)(asol);
220 (*myLRJetCombObservables)(asol,
iEvent);
225 (*myLRJetCombCalc)(asol);
232 evtsols->push_back(asol);
242 int bestSolution = -999;
243 int bestSolutionChangeWQ = -999;
246 if (
genEvt->numberOfBQuarks() ==
248 genEvt->numberOfLeptons() ==
250 std::vector<const reco::Candidate*> quarks;
255 quarks.push_back(&
genp);
256 quarks.push_back(&genq);
257 quarks.push_back(&genbh);
258 quarks.push_back(&genbl);
259 std::vector<const reco::Candidate*> recjets;
260 for (
size_t s = 0;
s < evtsols->size();
s++) {
266 recjets.push_back(&jetp);
267 recjets.push_back(&jetq);
268 recjets.push_back(&jetbh);
269 recjets.push_back(&jetbl);
271 (*evtsols)[
s].setGenEvt(
genEvt);
280 bestSolutionChangeWQ = 0;
283 bestSolutionChangeWQ = 1;
288 for (
size_t s = 0;
s < evtsols->size();
s++) {
289 (*evtsols)[
s].setMCBestJetComb(bestSolution);
290 (*evtsols)[
s].setMCChangeWQ(bestSolutionChangeWQ);
295 int simpleBestJetComb = (*mySimpleBestJetComb)(*evtsols);
296 for (
size_t s = 0;
s < evtsols->size();
s++)
297 (*evtsols)[
s].setSimpleBestJetComb(simpleBestJetComb);
301 float bestLRVal = -1000000;
302 int bestSol = (*evtsols)[0].getLRBestJetComb();
303 for (
size_t s = 0;
s < evtsols->size();
s++) {
304 if ((*evtsols)[
s].getLRJetCombLRval() > bestLRVal) {
305 bestLRVal = (*evtsols)[
s].getLRJetCombLRval();
309 for (
size_t s = 0;
s < evtsols->size();
s++) {
310 (*evtsols)[
s].setLRBestJetComb(bestSol);
315 std::unique_ptr<std::vector<TtSemiEvtSolution> > pOut(evtsols);
328 std::unique_ptr<std::vector<TtSemiEvtSolution> > pOut(evtsols);
346 throw cms::Exception(
"WrongConfig") <<
"Chosen jet parametrization is not supported: " <<
val <<
"\n";
371 throw cms::Exception(
"WrongConfig") <<
"Chosen fit constraint is not supported: " <<
val <<
"\n";
378 std::vector<TtSemiLepKinFitter::Constraint>
result;
379 for (
unsigned i = 0;
i <
val.size(); ++
i) {
void setLepb(const edm::Handle< std::vector< pat::Jet > > &jet, int i)
T getParameter(std::string const &) const
TtSemiLRJetCombCalc * myLRJetCombCalc
edm::EDGetTokenT< std::vector< pat::Electron > > electronSrcToken_
Param
supported parameterizations
genp
produce generated paricles in acceptance #
TtSemiLepKinFitter * myKinFitter
TtSemiLRJetCombObservables * myLRJetCombObservables
#define DEFINE_FWK_MODULE(type)
TtSemiSimpleBestJetComb * mySimpleBestJetComb
std::vector< unsigned > constraints_
void setGenEvt(const edm::Handle< TtGenEvent > &aGenEvt)
TtSemiLepKinFitter::Param param(unsigned)
void produce(edm::Event &iEvent, const edm::EventSetup &iSetup) override
edm::EDGetTokenT< std::vector< pat::Muon > > muonSrcToken_
Simple method to get the correct jet combination in semileptonic ttbar events.
void setHadp(const edm::Handle< std::vector< pat::Jet > > &jet, int i)
void setLeptonParametrisation(int lp)
void setMuon(const edm::Handle< std::vector< pat::Muon > > &muon, int i)
Class to calculate the jet combination LR value and purity from a root-file with fit functions...
~TtSemiEvtSolutionMaker() override
destructor
void setJetCorrectionScheme(int scheme)
ConsumesCollector consumesCollector()
Use a ConsumesCollector to gather consumes information from helper functions.
edm::EDGetTokenT< std::vector< pat::MET > > metSrcToken_
void setJetParametrisation(int jp)
Class to calculate the jet combination LR value and purity from a root-file with fit functions...
TtSemiEvtSolutionMaker(const edm::ParameterSet &iConfig)
constructor
void setElectron(const edm::Handle< std::vector< pat::Electron > > &elec, int i)
std::string lrSignalSelFile_
TtSemiEvtSolution addKinFitInfo(TtSemiEvtSolution *asol)
add kin fit information to the old event solution (in for legacy reasons)
Steering class for the overall top-lepton likelihood.
edm::EDGetTokenT< std::vector< pat::Jet > > jetSrcToken_
TtSemiLepKinFitter::Constraint constraint(unsigned)
int getMatchForParton(const unsigned int part, const unsigned int comb=0)
void setNeutrinoParametrisation(int mp)
edm::EDGetTokenT< TtGenEvent > genEvtToken_
void setNeutrino(const edm::Handle< std::vector< pat::MET > > &met, int i)
std::vector< int > lrSignalSelObs_
std::vector< TtSemiLepKinFitter::Constraint > constraints(std::vector< unsigned > &)
TtSemiLRSignalSelObservables * myLRSignalSelObservables
double getSumDistances(const unsigned int comb=0)
void setHadb(const edm::Handle< std::vector< pat::Jet > > &jet, int i)
std::string leptonFlavour_
std::string lrJetCombFile_
std::vector< int > lrJetCombObs_
void setHadq(const edm::Handle< std::vector< pat::Jet > > &jet, int i)
Constraint
supported constraints
TtSemiLRSignalSelCalc * myLRSignalSelCalc
double getDistanceForParton(const unsigned int part, const unsigned int comb=0)