Use fastjet with root

Dear expert,
I’m trying to use fastjet inside a root macro.
I don’t have problems in compilation and running as long as I don’t include a particular file from the fastjet package (JetMedianBackgroundEstimator.hh)

Practically, in my code ana.h, if the line
#include <fastjet/tools/JetMedianBackgroundEstimator.hh> is commented from the block


#include <fastjet/PseudoJet.hh>
#include <fastjet/ClusterSequence.hh>
#include <fastjet/ClusterSequenceArea.hh>
#include <fastjet/Selector.hh>
#include <fastjet/tools/JetMedianBackgroundEstimator.hh>
#include <fastjet/tools/Subtractor.hh>


everything works, if it’s uncommented, then I get this error:
Error: Function SelectorIdentity() is not defined in current scope
fastjet/tools/JetMedianBackgroundEstimator.hh:122:
Error: Function SelectorIdentity() is not defined in current scope
fastjet/tools/JetMedianBackgroundEstimator.hh:122:

It’s strange that the example of fastjet using this file, works fine but there the compilation is done in a MakeFile and not in a root macro as I do:
gSystem->Load("/home/testa/libfastjet/lib/libfastjet.so");
gSystem->Load("/home/testa/libfastjet/lib/libfastjettools.so");
gSystem->AddIncludePath("-I/home/testa/libfastjet/include");
chain.Process(“ana.C+”)

Can anybody help me?

Thanks,
Marianna.

Hi Marianna,

The error seems to be issued from CINT which may be parsing different/more/less than the compiler. (CINT is used in the ACLiC case when calling rootcint to generate the dictionary. Adding the #include should not hurt the compiled case and thus should be okay to add to your code.

Cheers,
Philippe.