00001
00002
00003
00004
00005
00006
00007
00008
00009
00011
00012 #include "jbltools/kinfit/TwoB4JPairing.h"
00013
00014 #include <iostream>
00015 #include "jbltools/kinfit/JetFitObject.h"
00016
00017 TwoB4JPairing::TwoB4JPairing (JetFitObject *jets_[]) {
00018
00019 for (int i = 0; i < NJETS; ++i) jets[i] = jets_[i];
00020 iperm = 0;
00021
00022
00023
00024 int perms[NPERM][NJETS] = {{1, 2, 3, 4, 5, 6},
00025 {1, 3, 2, 4, 5, 6},
00026 {1, 4, 2, 3, 5, 6},
00027 {1, 2, 3, 4, 6, 5},
00028 {1, 3, 2, 4, 6, 5},
00029 {1, 4, 2, 3, 6, 5}};
00030
00031 for (int i = 0; i < NPERM; ++i)
00032 for (int j = 0; j < NJETS; ++j)
00033 permutations[i][j] = perms[i][j];
00034
00035 }
00036
00037 int TwoB4JPairing::nextPermutation (JetFitObject *permObjects[]) {
00038
00039 for (int ijet = 0; ijet < NJETS; ++ijet) {
00040 permObjects[ijet] = jets[permutations[iperm][ijet]-1];
00041 }
00042
00043 ++iperm;
00044 return iperm;
00045 }
00046
00047
00048
00049