Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clarify DST explorer lesson #230

Open
alexpearce opened this issue Dec 20, 2016 · 0 comments
Open

Clarify DST explorer lesson #230

alexpearce opened this issue Dec 20, 2016 · 0 comments
Labels

Comments

@alexpearce
Copy link
Member

Vanya reported a problem with the DST explorer lesson:

Lesson 5 (05-interactive-dst.html) contains a wrong statement, that
(according to some recent posts) already causes confusion:

The easiest way to use it is to add it to your first.py
script and re-run it with ipython -i first.py
00035742_00000002_1.allstreams.dst. This will list a large
number of TES locations, but even so there are some which
you have to know about. Another oddity is that some
locations are "packed", for example:
/Event/AllStreams/pPhys/Particles. You can not access these
directly at this location. Instead you have to know what
location the contents will get unpacked to when you want to
use it. Often you can just try removing the small p from the
location (/Event/AllStreams/Phys/Particles).

The last statement in this paragraph is wrong. (Likely the author used
analogy with "pRec" and "pSim", where one has 1-to-1 correspondence, but
for "pPhys" i ti snot true. "Unpacked" names also contain the stripping
line name or selection name, e.g. "/Event/AllStreams/Phys/StdAllLoosePions"

I asked if it is then the case the .../Phys/Particles will never exist, instead only locations like .../Phys/<selection name>/Particles will exist, to which he replied:

Yes, it is right - many individual particle containers are packed into the
single "packed" blob. There are three ways to get the actual names:

  1. remember them (if one was smart enough with the naming of stripping
    lines, it is probably the simplest option)

  2. use dst-dump with option "-f"

  3. get lists of links from packed object in bender, and each link with
    pattern "*/Particles" points to the actual container to be unpacked.

        In [5]: packed =
        get('/Event/PromptD2PiPi.StripTrig/pPhys/Particles')
    
        In [6]: packed.links()
        Out[6]:
        {'/Event/PromptD2PiPi.StripTrig/Phys/D2hhPromptD2PiPiD2hhHlt2TOS/Particles',
       	 '/Event/PromptD2PiPi.StripTrig/Phys/D2hhPromptD2PiPiSel/decayVertices',
       	 '/Event/PromptD2PiPi.StripTrig/Phys/D2hhPromptDst2D2PiPiLine/Particles',
       	 '/Event/PromptD2PiPi.StripTrig/Phys/D2hhPromptDst2D2PiPiLine/decayVertices',
       	 '/Event/PromptD2PiPi.StripTrig/Phys/StdAllNoPIDsPions/Particles',
       	 '/Event/Rec/ProtoP/Charged'}
    

We should make this clear in the lessons.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant