56 produces<std::vector<TtHadEvtSolution> >();
77 bool jetsFound =
false;
81 if (
jets->size() >= 6)
87 std::vector<TtHadEvtSolution>* evtsols =
new std::vector<TtHadEvtSolution>();
89 for (
unsigned int p = 0;
p < 3;
p++) {
90 for (
unsigned int q =
p + 1;
q < 4;
q++) {
91 for (
unsigned int j =
q + 1;
j < 5;
j++) {
92 for (
unsigned int k =
j + 1;
k < 6;
k++) {
93 for (
unsigned int bh = 0; bh !=
jets->size(); bh++) {
94 if (!(bh ==
p || bh ==
q || bh ==
j || bh ==
k)) {
95 for (
unsigned int bbarh = 0; bbarh !=
jets->size(); bbarh++) {
96 if (!(bbarh ==
p || bbarh ==
q || bbarh ==
j || bbarh ==
k) && !(bbarh == bh)) {
100 std::vector<TtHadEvtSolution> asol;
104 asol[0].setHadp(
jets,
p);
105 asol[0].setHadq(
jets,
q);
106 asol[0].setHadj(
jets,
j);
107 asol[0].setHadk(
jets,
k);
108 asol[0].setHadb(
jets, bh);
109 asol[0].setHadbbar(
jets, bbarh);
113 asol[1].setHadp(
jets,
p);
114 asol[1].setHadq(
jets,
j);
115 asol[1].setHadj(
jets,
q);
116 asol[1].setHadk(
jets,
k);
117 asol[1].setHadb(
jets, bh);
118 asol[1].setHadbbar(
jets, bbarh);
122 asol[2].setHadp(
jets,
p);
123 asol[2].setHadq(
jets,
k);
124 asol[2].setHadj(
jets,
j);
125 asol[2].setHadk(
jets,
q);
126 asol[2].setHadb(
jets, bh);
127 asol[2].setHadbbar(
jets, bbarh);
130 for (
unsigned int i = 0;
i != asol.size();
i++) {
136 std::cout <<
"Fitting needed to decide on best solution, enable fitting!" << std::endl;
140 for (
unsigned int i = 0;
i != asol.size();
i++) {
141 (*myLRSignalSelObservables)(asol[
i]);
146 for (
unsigned int i = 0;
i != asol.size();
i++) {
147 (*myLRSignalSelCalc)(asol[
i]);
152 for (
unsigned int i = 0;
i != asol.size();
i++) {
153 (*myLRJetCombObservables)(asol[
i]);
158 for (
unsigned int i = 0;
i != asol.size();
i++) {
159 (*myLRJetCombCalc)(asol[
i]);
166 for (
unsigned int i = 0;
i != asol.size();
i++) {
167 evtsols->push_back(asol[
i]);
179 int simpleBestJetComb = (*mySimpleBestJetComb)(*evtsols);
181 for (
size_t s = 0;
s < evtsols->size();
s++) {
182 (*evtsols)[
s].setSimpleBestJetComb(simpleBestJetComb);
185 int bestSolution = -999;
186 int bestSolutionChangeW1Q = -999;
187 int bestSolutionChangeW2Q = -999;
190 std::vector<const reco::Candidate*> quarks;
197 quarks.push_back(&
genp);
198 quarks.push_back(&genq);
199 quarks.push_back(&genb);
200 quarks.push_back(&genj);
201 quarks.push_back(&genk);
202 quarks.push_back(&genbbar);
203 std::vector<const reco::Candidate*>
jets;
204 for (
size_t s = 0;
s < evtsols->size();
s++) {
212 jets.push_back(&jetp);
213 jets.push_back(&jetq);
214 jets.push_back(&jetbh);
215 jets.push_back(&jetj);
216 jets.push_back(&jetk);
217 jets.push_back(&jetbbar);
219 (*evtsols)[
s].setGenEvt(
genEvt);
234 bestSolutionChangeW2Q = 0;
237 bestSolutionChangeW1Q = 0;
241 bestSolutionChangeW1Q = 1;
246 bestSolutionChangeW2Q = 1;
249 bestSolutionChangeW1Q = 1;
253 bestSolutionChangeW1Q = 0;
258 bestSolutionChangeW2Q = 0;
261 bestSolutionChangeW1Q = 0;
264 bestSolutionChangeW1Q = 1;
269 for (
size_t s = 0;
s < evtsols->size();
s++) {
270 (*evtsols)[
s].setMCBestJetComb(bestSolution);
271 (*evtsols)[
s].setMCChangeW1Q(bestSolutionChangeW1Q);
272 (*evtsols)[
s].setMCChangeW2Q(bestSolutionChangeW2Q);
279 std::unique_ptr<std::vector<TtHadEvtSolution> >
pOut(evtsols);
282 std::cout <<
"No calibrated solutions built, because only " <<
jets->size() <<
" were present";
284 std::unique_ptr<std::vector<TtHadEvtSolution> >
pOut(evtsols);