[Rivet] inRange trouble

Hendrik Hoeth hendrik.hoeth at cern.ch
Thu Sep 22 08:58:19 BST 2011


Hi guys,

our dear Jenkins build system throws up in ATLAS_2011_I919017, and for a
good reason. That analysis has 50 lines of the style

  if (inRange(jetpt/GeV, 10, 15)) { ... }

and the compiler tells us that it's not a good idea to put a double into
a function that takes an integer argument:

  passing 'double' for argument 1 to 'bool Rivet::inRange(int, int, int, Rivet::RangeBoundary, Rivet::RangeBoundary)'

So, what do we do? Right now the function is templated, so that the
first three arguments have the same type. Adding an inRange(double, <T>, <T>)
won't work, because it introduces an ambiguity. Getting rid of the
templates altogether means we need to introduce a loooong list of
inRange functions.

Any ideas, other than porting Rivet to python?

Cheers,

   Hendrik

-- 
A man without a dream in his heart already has one foot in the grave.


More information about the Rivet mailing list