Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Mass invarint of ttbar pair by Pythia

  1. Sep 9, 2013 #1
    Hi all,

    I'm not so expert in C++, but I try to make a a simple program to calculate
    and plot the ttbar pair mass invariant distributtion by pythia in pp collition
    (pp -> ttbar), taking the events from .lhe file in pythia exampls.

    Now about the program attached here , i made the steps as following but
    nothing shown in the Histogram .. may be there is some thing wrong in the loop ..
    the steps :

    - booked the Histogram
    - start the event loop
    - defined t , tbar
    -start the particle loop
    - make a contour to find the pairs
    - calculate the invM.

    So any help about that ? to know how to make such program
    if any one knows about pythia ..

    Thank you,

    Attached Files:

  2. jcsd
  3. Sep 9, 2013 #2


    User Avatar
    2017 Award

    Staff: Mentor

    I would expect {}-brackets for this loop.
    If that is not the issue, add debug output in the loop (This should always be the first step if you cannot spot the issue). Do you get something meaningful from pythia? Do you get something meaningful for the histogram entry?

    The indentation is really messy.

    This does not check for pairs, two b without a bbar pass this test as well (okay, that is rare).

    What happened to the W boson from the top decay?
  4. Sep 10, 2013 #3

    The ask about W boson, i think you mean we should to take into account the decay of the first generation
    particles, so i defined before the particle loop a variable "iTop " and inside the loop
    " if (pythia.event.id() == 6) iTop = i;" , i think that should work,

    If : if (N+n >1) { --} dosn't account for the pair , what could be the probable loop ? or how to calculate the mass of these pairs ?

  5. Sep 10, 2013 #4


    User Avatar
    2017 Award

    Staff: Mentor

    Your topic is "invariant mass of ttbar pair", but you calculate a mass based on b-quarks. As far as I can see, you are missing the energy and momentum of the two W.

    "if (N+n >1)" -> "if (N >0 && n>0)"
    Just check if both a b and a bbar are present in the event.
  6. Sep 10, 2013 #5

    Any way thank you for your comments, i may use another tool to do this calculation until i know better in c++.

Share this great discussion with others via Reddit, Google+, Twitter, or Facebook