Skip to content

Commit

Permalink
remove test code
Browse files Browse the repository at this point in the history
  • Loading branch information
VinInn committed Feb 1, 2016
1 parent 8c2964a commit 01cc6c3
Showing 1 changed file with 1 addition and 36 deletions.
37 changes: 1 addition & 36 deletions CondFormats/EgammaObjects/interface/GBRTree.h
Expand Up @@ -82,50 +82,15 @@ inline double GBRTree::GetResponse(const float* vector) const {
return fResponses[TerminalIndex(vector)];
}

#include<cassert>
#define VI_REGRESSION
//_______________________________________________________________________
inline int GBRTree::TerminalIndex(const float* vector) const {

int index = 0;
int index = 0;
do {
auto r = fRightIndices[index];
auto l = fLeftIndices[index];
index = vector[fCutIndices[index]] > fCutVals[index] ? r : l;
} while (index>0);
// return -index;

#ifdef VI_REGRESSION
auto old = [&]()->int {
int index = 0;

unsigned char cutindex = fCutIndices[0];
float cutval = fCutVals[0];

while (true) {
if (vector[cutindex] > cutval) {
index = fRightIndices[index];
}
else {
index = fLeftIndices[index];
}

if (index>0) {
cutindex = fCutIndices[index];
cutval = fCutVals[index];
}
else {
return (-index);
}

}
};

assert (old()==-index);
#endif

return -index;

}

#endif

0 comments on commit 01cc6c3

Please sign in to comment.