I would like to create a RDataFrame instance that only contains the “columns” or “branches” that I specify, and not all the branches that are found inside my “AnalysisTree”.
I try the following, by specifying the third argument of the RDataFrame
constructor. However, I don’t get the effect I would expect. I would expect that GetColumnNames
would return just the name of column “optics_efficiency” that I specified in the third argument.
root [2] ROOT::RDataFrame d("AnalysisTree", "BabyIAXO_TrueWolterMicromegasTest_00368.root", {"optics_efficiency"} )
(ROOT::RDataFrame &) A data frame built on top of the AnalysisTree dataset.
Default branch: optics_efficiency
root [3] d.GetColumnNames()
(ROOT::RDF::ColumnNames_t) { "afterOptics_R", "afterOptics_posX", "afterOptics_posY", "afterOptics_posZ", "axionPhoton_coherenceLength", "axionPhoton_fieldAverage", "axionPhoton_probability", "axionPhoton_transmission", "boreExitGate_transmission", "eventID", "final_R", "final_energy", "final_phiAngle", "final_posX", "final_posY", "final_posZ", "final_thetaAngle", "initial_R", "initial_energy", "initial_phiAngle", "initial_posX", "initial_posY", "initial_posZ", "initial_thetaAngle", "magnetEntrance_R", "magnetEntrance_posX", "magnetEntrance_posY", "magnetEntrance_posZ", "magnetExit_R", "magnetExit_posX", "magnetExit_posY", "magnetExit_posZ", "offset_R", "offset_posX", "offset_posY", "offset_posZ", "optics_efficiency", "runOrigin", "subEventID", "subEventTag", "subRunOrigin", "timeStamp", "window_transmission" }
root [4]
I am guessing right? Or this should be done some other way?
Thanks!