This will be a long message.

I am trying to run simulation and analysis for the channel ppbar->D0D0bar->K-pi+K+pi-

I want to run this with no PID at all.

I am running this, and without using PID, i fill my list with 4 candidates(minus1, plus1, minus2, plus2) since I have 4 charged tracks.

I use the "KaonAllMinus", "PionAllPlus", "KaonAllPlus", "PionAllMinus" for my 4 candidates.

Now the problem I have is the following: I am running 35000 events with EvtGen. The possible combinations for the D0 without PID should be: K-pi+(the correct one) and K+pi-(the wrong one). There must not be other combinations since in the plot attached (Firstplot) you will see that there is a cut on the reconstructed mass at the limit of one pion and one kaon, thus no pi-pi+ and subsequently K-K+ are tried. In this way, I should get around 70000 (2 times the Kpi combinations) D0 mesons. What I get is 140000 events. So there is a double counting somewhere.

Now, I have also tried the same with "AllMinus", "AllPlus", "AllPlus", "AllMinus" for the minus1, plus1, plus2, minus2 candidates. There I would expect to have 4 times the combinations since besides the K-pi+ and the K+pi- now I also have pi-pi+ and k-k+..I can see that since the lower limit now is at the two pion masses and the number or reconstructed D0 is 4x35000 events.(Secondplot)

I have attached both plots and my analysis macro too.

Do you have any idea whether there is something wrong or whether I am doing something wrong?

Thank you in advance.

Alex]]>

maybe there is some misunderstanding in the keywords 'KaonAllPlus', 'PionAllPlus', etc. What happens e.g. for 'KaonAllPlus' is, that the energy components of the 4-vectors of all positively charged tracks (pi+ and K+ in your case) are set with the kaon mass hypothesis to sqrt(m_K^2 + p^2). So your lists 'plus1' and 'plus2' contain exactly the same (namely all positive) tracks, in the former with pion and in the latter with kaon mass set.

For the two positive and two negative tracks per event, you get then 4 t+ t- combinations (as you already wrote). The kinematic limit of m_K + m_pi in Firstplot.png is just the result of the fact, that one track in each combination has kaon mass, the other one pion mass, so the smallest possible invariant mass is m_K + m_pi by construction.

Concerning your approach with 'AllPlus' and 'AllMinus': Here, all tracks are assigned the default mass hypo, which is pion mass. Therefore the phase space limit is 2m_pi.

I hope this explanation clarifies things a bit.

Best regards,

Klaus]]>

Now I have a second question.

Is there a way to remove from my ntuple this double counting effect so that i get only the K-pi+ and the K+pi- combinations for e.g the D0 reconstruction?

Thanks again.]]>

actually it is not double counting. Double counting means (for my understanding), that you enter twice the same number (i.e. the same invariant mass) in your spectrum. This does not happen in your case. Considering all particles under all possible hypothesis is completely legitim and the only option, if an experiment does not have any means of PID.

Is it possible that you mean ideal PID instead of no PID? I.e. you only want true kaons in your plus2 list? To test that you could try

theAnalysis->FillList(plus1, "PionLoosePlus", "PidAlgoIdealCharged"); theAnalysis->FillList(minus1, "KaonLooseMinus", "PidAlgoIdealCharged"); theAnalysis->FillList(plus2, "KaonLoosePlus", "PidAlgoIdealCharged"); theAnalysis->FillList(minus2, "PionLooseMinus", "PidAlgoIdealCharged");

I guess this should work. Ideal PID assigns P=1 to the correct PID and P=0 to the others, and the Loose criterion cuts on P>0.25, thus selecting only the correct tracks. However, there might still be mis-ID even in truth matched PID (the track truth match is not perfect). Alternatively, you can apply a MC-truth match like explained here: https://panda-wiki.gsi.de/foswiki/bin/view/Computing/PandaRootRhoTutoria l#A_2.4._Monte_Carlo_Truth_Match. This takes into account the decay pattern D0 -> K- pi+ as well.

Essentially it works by e.g. adding a flag in your macro inside your D0/D0bar loop

theAnalysis->McTruthMatch(d0[j]); nd0->Column("d0mct", (int) (d0[j]->GetMcTruth()!=0) );

and plot with

root [0] nd0->Draw("d0m","d0mct")

Best,

Klaus]]>

Thanks anyway]]>