15path =
'root://eospublic.cern.ch//eos/opendata/cms/derived-data/AOD2NanoAODOutreachTool/Run2012BC_DoubleMuParked_Muons.root'
25df = df.Filter(
'nMuon == 2')\
26 .Filter(
'Muon_charge[0] != Muon_charge[1]')\
27 .Define(
'Dimuon_mass',
'InvariantMass(Muon_pt, Muon_eta, Muon_phi, Muon_mass)')\
28 .Filter(
'Dimuon_mass > 70')\
32print(
'\nApproximate mass of the Z boson: {:.2f} GeV\n'.format(
33 df.Mean(
'Dimuon_mass').GetValue()))
36df.Describe().Print(shortFormat=
True)
ROOT's RDataFrame offers a high level interface for analyses of data stored in TTree,...