99 produces<std::vector<TtHadEvtSolution> >();
120 bool jetsFound =
false;
124 if (
jets->size() >= 6)
130 std::vector<TtHadEvtSolution>* evtsols =
new std::vector<TtHadEvtSolution>();
132 for (
unsigned int p = 0;
p < 3;
p++) {
133 for (
unsigned int q =
p + 1;
q < 4;
q++) {
134 for (
unsigned int j =
q + 1;
j < 5;
j++) {
135 for (
unsigned int k =
j + 1;
k < 6;
k++) {
136 for (
unsigned int bh = 0; bh !=
jets->size(); bh++) {
137 if (!(bh ==
p || bh ==
q || bh ==
j || bh ==
k)) {
138 for (
unsigned int bbarh = 0; bbarh !=
jets->size(); bbarh++) {
139 if (!(bbarh ==
p || bbarh ==
q || bbarh ==
j || bbarh ==
k) && !(bbarh == bh)) {
143 std::vector<TtHadEvtSolution> asol;
147 asol[0].setHadp(
jets,
p);
148 asol[0].setHadq(
jets,
q);
149 asol[0].setHadj(
jets,
j);
150 asol[0].setHadk(
jets,
k);
151 asol[0].setHadb(
jets, bh);
152 asol[0].setHadbbar(
jets, bbarh);
156 asol[1].setHadp(
jets,
p);
157 asol[1].setHadq(
jets,
j);
158 asol[1].setHadj(
jets,
q);
159 asol[1].setHadk(
jets,
k);
160 asol[1].setHadb(
jets, bh);
161 asol[1].setHadbbar(
jets, bbarh);
165 asol[2].setHadp(
jets,
p);
166 asol[2].setHadq(
jets,
k);
167 asol[2].setHadj(
jets,
j);
168 asol[2].setHadk(
jets,
q);
169 asol[2].setHadb(
jets, bh);
170 asol[2].setHadbbar(
jets, bbarh);
173 for (
unsigned int i = 0;
i != asol.size();
i++) {
179 std::cout <<
"Fitting needed to decide on best solution, enable fitting!" << std::endl;
183 for (
unsigned int i = 0;
i != asol.size();
i++) {
184 (*myLRSignalSelObservables)(asol[
i]);
189 for (
unsigned int i = 0;
i != asol.size();
i++) {
190 (*myLRSignalSelCalc)(asol[
i]);
195 for (
unsigned int i = 0;
i != asol.size();
i++) {
196 (*myLRJetCombObservables)(asol[
i]);
201 for (
unsigned int i = 0;
i != asol.size();
i++) {
202 (*myLRJetCombCalc)(asol[
i]);
209 for (
unsigned int i = 0;
i != asol.size();
i++) {
210 evtsols->push_back(asol[
i]);
222 int simpleBestJetComb = (*mySimpleBestJetComb)(*evtsols);
224 for (
size_t s = 0;
s < evtsols->size();
s++) {
225 (*evtsols)[
s].setSimpleBestJetComb(simpleBestJetComb);
228 int bestSolution = -999;
229 int bestSolutionChangeW1Q = -999;
230 int bestSolutionChangeW2Q = -999;
233 std::vector<const reco::Candidate*> quarks;
240 quarks.push_back(&
genp);
241 quarks.push_back(&genq);
242 quarks.push_back(&genb);
243 quarks.push_back(&genj);
244 quarks.push_back(&genk);
245 quarks.push_back(&genbbar);
246 std::vector<const reco::Candidate*>
jets;
247 for (
size_t s = 0;
s < evtsols->size();
s++) {
255 jets.push_back(&jetp);
256 jets.push_back(&jetq);
257 jets.push_back(&jetbh);
258 jets.push_back(&jetj);
259 jets.push_back(&jetk);
260 jets.push_back(&jetbbar);
262 (*evtsols)[
s].setGenEvt(
genEvt);
277 bestSolutionChangeW2Q = 0;
280 bestSolutionChangeW1Q = 0;
284 bestSolutionChangeW1Q = 1;
289 bestSolutionChangeW2Q = 1;
292 bestSolutionChangeW1Q = 1;
296 bestSolutionChangeW1Q = 0;
301 bestSolutionChangeW2Q = 0;
304 bestSolutionChangeW1Q = 0;
307 bestSolutionChangeW1Q = 1;
312 for (
size_t s = 0;
s < evtsols->size();
s++) {
313 (*evtsols)[
s].setMCBestJetComb(bestSolution);
314 (*evtsols)[
s].setMCChangeW1Q(bestSolutionChangeW1Q);
315 (*evtsols)[
s].setMCChangeW2Q(bestSolutionChangeW2Q);
322 std::unique_ptr<std::vector<TtHadEvtSolution> > pOut(evtsols);
325 std::cout <<
"No calibrated solutions built, because only " <<
jets->size() <<
" were present";
327 std::unique_ptr<std::vector<TtHadEvtSolution> > pOut(evtsols);
T getParameter(std::string const &) const
genp
produce generated paricles in acceptance #
TtHadLRSignalSelObservables * myLRSignalSelObservables
TtHadSimpleBestJetComb * mySimpleBestJetComb
TtFullHadKinFitter * myKinFitter
std::vector< int > lrJetCombObs_
TtHadEvtSolution addKinFitInfo(TtHadEvtSolution *asol)
add kin fit information to the old event solution (in for legacy reasons)
edm::EDGetTokenT< std::vector< pat::Jet > > jetSrcToken_
std::string lrSignalSelFile_
Steering class for the overall hadronic top likelihood.
std::string lrJetCombFile_
TtHadLRJetCombCalc * myLRJetCombCalc
std::vector< unsigned int > constraints_
Class to calculate the jet combination LR value and purity from a root-file with fit functions...
Based on the TtSemiSimpleBestJetComb.by: Jan Heyninck version: TtSemiSimpleBestJetComb.cc,v 1.2 2007/06/09 01:17:40 lowette Exp.
edm::EDGetTokenT< TtGenEvent > genEvtToken_
TtHadEvtSolutionMaker(const edm::ParameterSet &iConfig)
constructor
TtHadLRJetCombObservables * myLRJetCombObservables
#define DEFINE_FWK_MODULE(type)
void produce(edm::Event &iEvent, const edm::EventSetup &iSetup) override
~TtHadEvtSolutionMaker() override
destructor
int getMatchForParton(const unsigned int part, const unsigned int comb=0)
void setJetParametrisation(int jp)
TtHadLRSignalSelCalc * myLRSignalSelCalc
double getSumDistances(const unsigned int comb=0)
double getDistanceForParton(const unsigned int part, const unsigned int comb=0)
std::vector< int > lrSignalSelObs_