Hi @SiewYan,
the error message means you are calling TMath::Log (a function that takes a double) with an argument that is an RVec (i.e. a vector). I guess your CleanJet_pt column is an array and not a single double?
Changing TMath::Log to log might solve the error. TMath::Exp will probably have the same issue.
RDataFrame reads arrays as RVecs, more information on RVec is available here and at “Reading and manipulating collections” in the RDataFrame user guide.
Hi @eguiraud, thanks for the hints, i manage to make it run!
However, I have a general condition in my cuts, ‘Jet_btagDeepB[CleanJet_jetIdx] > 0.1522’ in my definition of column. While i run with it and do
hf.Histo1D(“test” ).GetPtr()
I got an error : runtime_error: Cannot index RVec with condition vector of different size
By specifying the index of CleanJet_jetIdx i manage to solve it. However, is there a way to use it without specifying the index since the code is meant to run on inclusive ntuple.