gordonwatts / xaod_usage

Book describing how to use the xAOD ATLAS ServiceX Backend
MIT License
1 stars 2 forks source link

Secondary Vertex Example for BPhysics #10

Open gordonwatts opened 2 years ago

gordonwatts commented 2 years ago

From Peter O:

Use this b-physics xAOD file: root://eosatlas.cern.ch//eos/atlas/user/d/daits/mc16_13TeV/DAOD_BPHY4/mc16.999031.P8BEG_23lo_ggX18p4_Upsilon1Smumu_4mu_3pt2.deriv.DAOD_BPHY4.e8304_a875_r10724_r10726_p3712_pUM999999/DAOD_BPHY4.999031._000001.pool.root.1

Some example PyROOT code:

PyROOT code example

for event in xrange(nEntries):
    t.GetEntry(event)

    for BPHY4Quads in t.BPHY4Quads:
        mass = BPHY4Quads.auxdataConst['float']('QUAD_mass')
        mindices = [int() for  in BPHY4Quads.auxdataConst['string']('CombinationCode')]
...
    closevalue = sorted(((_.chiSquared(), ) for  in t.BPHY4Quads if _.auxdataConst['string']('ChargeCode').count('+')==2),
                        )