___Hello everyone, I have been having issues when running RDataFrame on 2018 CMS Data using PyROOT. One of the conditions for an event to be considered is that either the HLT_Photon175 or HLT_Photon110EB_TightID_TightIso triggers must be active. I use the RDF filter
Rdf = Rdf.Filter("(HLT_Photon110EB_TightID_TightIso > 0.0 || HLT_Photon175 > 0.0)")
to filter based on this requirement, which works as intended when I apply it to Monte Carlo trees. When I apply this trigger in Data however I get the error
Error in TTreeReaderValueBase::CreateProxy(): The tree does not have a branch called HLT_Photon110EB_TightID_TightIso. You could check with TTree::Print() for available branches.
I can confirm absolutely that HLT_Photon110EB_TightID_TightIso is present in the tree. Also strangely this error does not crash the program, though it does repeat itself an enormous number of times, I suspect once for each event for which the trigger is not present. First I suspected that the issue was due to the HLT_Photon110EB_TightID_TightIso being implemented partway into the 2018 run, so I implemented an earlier filter requiring the run# to be within the valid range for the trigger but the error persisted.
Is there a way to have RDF check if a branch is present before accessing it. Preferably I would be able to just store the value of HLT_Photon110EB_TightID_TightIso as 0 if it is not present since there are events which pass HLT_Photon175 outside the run range of HLT_Photon110EB_TightID_TightIso.
ROOT Version: 6.18/04
Python 2.7.15