normal mode ordering btagged jets by eta

Bug #1699606 reported by Eric Gonzalez on 2017-06-21
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MadAnalysis 5
Undecided
Unassigned

Bug Description

I was doing an analysis in which I had to cut on btagged jets based on their eta, and the SampleAnalyzer could not compile and it gave me the following error:

SampleAnalyzer/User/Analyzer/user.cpp:498:53: error: use of undeclared identifier '_P_bETAorderingfinalstate'; did you mean '_P_jETAorderingfinalstate'?
  _P_b_I1I_ETAorderingfinalstate=SORTER->rankFilter(_P_bETAorderingfinalstate,1,ETAordering);

I examined the user.cpp file to see why this might be happening, I found this

 // Filling particle containers
  {
    for (MAuint32 i=0;i<event.rec()->jets().size();i++)
    {
      _P_jETAorderingfinalstate.push_back(&(event.rec()->jets()[i]));
      _P_jPTorderingfinalstate.push_back(&(event.rec()->jets()[i]));
      if (event.rec()->jets()[i].btag()) _P_bPTorderingfinalstate.push_back(&(event.rec()->jets()[i]));
    }
    for (MAuint32 i=0;i<event.rec()->photons().size();i++)
    {
    }
...

I think that when the particle containers are being filled, it neglects to fill the _P_bETAorderingfinalstate container so it runs into an error when trying to sort this container. I don't know how to fix this without going in by hand and modifying each user.cpp file; this would be inefficient since this analysis is a part of a script where I'm analyzing many regions.

Benjamin Fuks (fuks) on 2017-09-30
Changed in madanalysis5:
milestone: none → v1.6
status: New → Fix Committed
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers