|
|
Go to the documentation of this file.
69 produces<std::vector<TtSemiEvtSolution> >();
91 bool leptonFound =
false;
106 bool metFound =
false;
113 bool jetsFound =
false;
116 if (
jets->size() >= 4)
122 std::vector<TtSemiEvtSolution>* evtsols =
new std::vector<TtSemiEvtSolution>();
123 if (leptonFound && metFound && jetsFound) {
131 for (
unsigned int bh = 0; bh <
nrCombJets; bh++) {
132 if (
q >
p && !(bh ==
p || bh ==
q)) {
133 for (
unsigned int bl = 0; bl <
nrCombJets; bl++) {
134 if (!(bl ==
p || bl ==
q || bl == bh)) {
156 if (
genEvt->numberOfBQuarks() ==
158 genEvt->numberOfLeptons() ==
164 (*myLRSignalSelObservables)(asol, *
jets);
170 (*myLRSignalSelCalc)(asol);
175 (*myLRJetCombObservables)(asol,
iEvent);
180 (*myLRJetCombCalc)(asol);
187 evtsols->push_back(asol);
197 int bestSolution = -999;
198 int bestSolutionChangeWQ = -999;
201 if (
genEvt->numberOfBQuarks() ==
203 genEvt->numberOfLeptons() ==
205 std::vector<const reco::Candidate*> quarks;
210 quarks.push_back(&
genp);
211 quarks.push_back(&genq);
212 quarks.push_back(&genbh);
213 quarks.push_back(&genbl);
214 std::vector<const reco::Candidate*> recjets;
215 for (
size_t s = 0;
s < evtsols->size();
s++) {
221 recjets.push_back(&jetp);
222 recjets.push_back(&jetq);
223 recjets.push_back(&jetbh);
224 recjets.push_back(&jetbl);
226 (*evtsols)[
s].setGenEvt(
genEvt);
235 bestSolutionChangeWQ = 0;
238 bestSolutionChangeWQ = 1;
243 for (
size_t s = 0;
s < evtsols->size();
s++) {
244 (*evtsols)[
s].setMCBestJetComb(bestSolution);
245 (*evtsols)[
s].setMCChangeWQ(bestSolutionChangeWQ);
250 int simpleBestJetComb = (*mySimpleBestJetComb)(*evtsols);
251 for (
size_t s = 0;
s < evtsols->size();
s++)
252 (*evtsols)[
s].setSimpleBestJetComb(simpleBestJetComb);
256 float bestLRVal = -1000000;
257 int bestSol = (*evtsols)[0].getLRBestJetComb();
258 for (
size_t s = 0;
s < evtsols->size();
s++) {
259 if ((*evtsols)[
s].getLRJetCombLRval() > bestLRVal) {
260 bestLRVal = (*evtsols)[
s].getLRJetCombLRval();
264 for (
size_t s = 0;
s < evtsols->size();
s++) {
265 (*evtsols)[
s].setLRBestJetComb(bestSol);
270 std::unique_ptr<std::vector<TtSemiEvtSolution> > pOut(evtsols);
283 std::unique_ptr<std::vector<TtSemiEvtSolution> > pOut(evtsols);
301 throw cms::Exception(
"WrongConfig") <<
"Chosen jet parametrization is not supported: " <<
val <<
"\n";
326 throw cms::Exception(
"WrongConfig") <<
"Chosen fit constraint is not supported: " <<
val <<
"\n";
333 std::vector<TtSemiLepKinFitter::Constraint>
result;
334 for (
unsigned i = 0;
i <
val.size(); ++
i) {
edm::EDGetTokenT< std::vector< pat::Muon > > muonSrcToken_
Steering class for the overall top-lepton likelihood.
TtSemiLepKinFitter::Constraint constraint(unsigned)
void setHadb(const edm::Handle< std::vector< pat::Jet > > &jet, int i)
genp
produce generated paricles in acceptance #
std::vector< int > lrSignalSelObs_
double getDistanceForParton(const unsigned int part, const unsigned int comb=0)
TtSemiLRSignalSelObservables * myLRSignalSelObservables
void setGenEvt(const edm::Handle< TtGenEvent > &aGenEvt)
TtSemiEvtSolution addKinFitInfo(TtSemiEvtSolution *asol)
add kin fit information to the old event solution (in for legacy reasons)
ConsumesCollector consumesCollector()
Use a ConsumesCollector to gather consumes information from helper functions.
std::string leptonFlavour_
std::string lrJetCombFile_
void setHadp(const edm::Handle< std::vector< pat::Jet > > &jet, int i)
Class to calculate the jet combination LR value and purity from a root-file with fit functions.
void setLeptonParametrisation(int lp)
void setMuon(const edm::Handle< std::vector< pat::Muon > > &muon, int i)
TtSemiLepKinFitter * myKinFitter
Class to calculate the jet combination LR value and purity from a root-file with fit functions.
TtSemiLRJetCombCalc * myLRJetCombCalc
std::vector< unsigned > constraints_
TtSemiLepKinFitter::Param param(unsigned)
int getMatchForParton(const unsigned int part, const unsigned int comb=0)
void setElectron(const edm::Handle< std::vector< pat::Electron > > &elec, int i)
edm::EDGetTokenT< TtGenEvent > genEvtToken_
Constraint
supported constraints
void produce(edm::Event &iEvent, const edm::EventSetup &iSetup) override
std::vector< int > lrJetCombObs_
void setJetCorrectionScheme(int scheme)
Simple method to get the correct jet combination in semileptonic ttbar events.
TtSemiLRSignalSelCalc * myLRSignalSelCalc
std::vector< TtSemiLepKinFitter::Constraint > constraints(std::vector< unsigned > &)
void setNeutrino(const edm::Handle< std::vector< pat::MET > > &met, int i)
edm::EDGetTokenT< std::vector< pat::Electron > > electronSrcToken_
~TtSemiEvtSolutionMaker() override
destructor
T getParameter(std::string const &) const
void setNeutrinoParametrisation(int mp)
void setJetParametrisation(int jp)
double getSumDistances(const unsigned int comb=0)
edm::EDGetTokenT< std::vector< pat::MET > > metSrcToken_
TtSemiLRJetCombObservables * myLRJetCombObservables
TtSemiSimpleBestJetComb * mySimpleBestJetComb
void setHadq(const edm::Handle< std::vector< pat::Jet > > &jet, int i)
std::string lrSignalSelFile_
void setLepb(const edm::Handle< std::vector< pat::Jet > > &jet, int i)
Param
supported parameterizations
TtSemiEvtSolutionMaker(const edm::ParameterSet &iConfig)
constructor
edm::EDGetTokenT< std::vector< pat::Jet > > jetSrcToken_