Giter Site home page Giter Site logo

Comments (4)

chrisburr avatar chrisburr commented on May 11, 2024

I can reproduce this with:

lb-run DaVinci/v44r2 ipython

Then run:

from __future__ import print_function
from Configurables import DecayTreeTuple
from DecayTreeTuple.Configuration import *

dtt = DecayTreeTuple()
print(dtt.setDescriptorTemplate('[D*(2010)+ -> ${D0}(D0 -> ${Kminus}K- ${Kplus}K+) ${pisoft}pi+]CC'))
print(dtt.Decay)
print()
dtt = DecayTreeTuple()
print(dtt.setDescriptorTemplate('[${Dstar}D*(2010)+ -> ${D0}(D0 -> ${Kminus}K- ${Kplus}K+) ${pisoft}pi+]CC'))
print(dtt.Decay)

The output is, the D0 is only flagged if the D*(2010)+ also included:

{'pisoft': TupleToolDecay('DecayTreeTuple.pisoft'), 'D0': TupleToolDecay('DecayTreeTuple.D0'), 'Kplus': TupleToolDecay('DecayTreeTuple.Kplus'), 'Kminus': TupleToolDecay('DecayTreeTuple.Kminus')}
[D*(2010)+ -> (D0 -> ^K- ^K+) ^pi+]CC

{'Dstar': TupleToolDecay('DecayTreeTuple.Dstar'), 'pisoft': TupleToolDecay('DecayTreeTuple.pisoft'), 'D0': TupleToolDecay('DecayTreeTuple.D0'), 'Kplus': TupleToolDecay('DecayTreeTuple.Kplus'), 'Kminus': TupleToolDecay('DecayTreeTuple.Kminus')}
[D*(2010)+ -> ^(D0 -> ^K- ^K+) ^pi+]CC

from starterkit-lessons.

smaccolini avatar smaccolini commented on May 11, 2024

The bug has been fixed in the branch setDescriptorTemplate_Bug_Fix and we are waiting for merging into the master branch [1].
Using

lb-run DaVinci/v50r0 ipithon

and running

dtt = DecayTreeTuple()
print(dtt.setDescriptorTemplate('[D*(2010)+ -> ${D0}(D0 -> ${Kminus}K- ${Kplus}K+) ${pisoft}pi+]CC'))
print(dtt.Decay)
print()
dtt = DecayTreeTuple()
print(dtt.setDescriptorTemplate('[${Dstar}D*(2010)+ -> ${D0}(D0 -> ${Kminus}K- ${Kplus}K+) ${pisoft}pi+]CC'))
print(dtt.Decay)`

One will obtain

{'pisoft': TupleToolDecay('DecayTreeTuple.pisoft'), 'D0': TupleToolDecay('DecayTreeTuple.D0'), 'Kplus': TupleToolDecay('DecayTreeTuple.Kplus'), 'Kminus': TupleToolDecay('DecayTreeTuple.Kminus')}
[D*(2010)+ -> ^(D0 -> ^K- ^K+) ^pi+]CC
{'Dstar': TupleToolDecay('DecayTreeTuple.Dstar'), 'pisoft': TupleToolDecay('DecayTreeTuple.pisoft'), 'D0': TupleToolDecay('DecayTreeTuple.D0'), 'Kplus': TupleToolDecay('DecayTreeTuple.Kplus'), 'Kminus': TupleToolDecay('DecayTreeTuple.Kminus')}
[D*(2010)+ -> ^(D0 -> ^K- ^K+) ^pi+]CC

In addition we found another bug in the fact that the '^' it is not deleted for the primary decays if they are more than one (chained with '||'). In fact running

dtt = DecayTreeTuple()
print(setDescriptorTemplate(dtt,'[${Dstar}D*(2010)+ -> ${D0}(D0 -> ${Kminus}K- ${Kplus}K+) ${pisoft}pi+]CC || [${Ds}D_s+ -> ${Kminus_Ds}K- ${Kplus_Ds}K+ ${pi}pi+]CC'))
print(dtt.Decay)

One obtains

{'Kplus_Ds': TupleToolDecay('DecayTreeTuple.Kplus_Ds'), 'pisoft': TupleToolDecay('DecayTreeTuple.pisoft'), 'Kplus': TupleToolDecay('DecayTreeTuple.Kplus'), 'Kminus_Ds': TupleToolDecay('DecayTreeTuple.Kminus_Ds'), 'Dstar': TupleToolDecay('DecayTreeTuple.Dstar'), 'pi': TupleToolDecay('DecayTreeTuple.pi'), 'Ds': TupleToolDecay('DecayTreeTuple.Ds'), 'D0': TupleToolDecay('DecayTreeTuple.D0'), 'Kminus': TupleToolDecay('DecayTreeTuple.Kminus')}
[D*(2010)+ -> ^(D0 -> ^K- ^K+) ^pi+]CC || [^D_s+ -> ^K- ^K+ ^pi+]CC

With the fix instead, one will obtain

{'Kplus_Ds': TupleToolDecay('DecayTreeTuple.Kplus_Ds'), 'pisoft': TupleToolDecay('DecayTreeTuple.pisoft'), 'Kplus': TupleToolDecay('DecayTreeTuple.Kplus'), 'Kminus_Ds': TupleToolDecay('DecayTreeTuple.Kminus_Ds'), 'Dstar': TupleToolDecay('DecayTreeTuple.Dstar'), 'pi': TupleToolDecay('DecayTreeTuple.pi'), 'Ds': TupleToolDecay('DecayTreeTuple.Ds'), 'D0': TupleToolDecay('DecayTreeTuple.D0'), 'Kminus': TupleToolDecay('DecayTreeTuple.Kminus')}
[D*(2010)+ -> ^(D0 -> ^K- ^K+) ^pi+]CC || [D_s+ -> ^K- ^K+ ^pi+]CC

[1] = https://gitlab.cern.ch/lhcb/Analysis/merge_requests/348

from starterkit-lessons.

eduardo-rodrigues avatar eduardo-rodrigues commented on May 11, 2024

This MR never made it, unfortunately! Hopefully the new MR https://gitlab.cern.ch/lhcb/Analysis/merge_requests/388 fixes the bug and makes sure the corresponsing test is working again.

from starterkit-lessons.

chrisburr avatar chrisburr commented on May 11, 2024

Closing as lhcb/Analysis#388 was merged.

from starterkit-lessons.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.