[FIXED] MC truth [message #15836] |
Thu, 06 February 2014 14:18 |
Karin Schönning
Messages: 65 Registered: August 2012 Location: Uppsala University
|
continuous participant |
From: *physics.uu.se
|
|
Hej pandas,
my student and I are trying to simulate Psi(3770)->D+D-->pi+pi+K- pi-pi-K+. We would like to check each reconstructed pi+ candidate against the mc truth and see if its corresponding MC truth track has a D+ as its mother.
I tried this:
theAnalysis->FillList(piplus, "PionAllPlus");
int ipiprec =0;
int ipipmoth=0;
piplus.SetType(211);
for (k=0; k<piplus.GetLength(); ++k) {
if ( theAnalysis->McTruthMatch(piplus[k]) ) {
RhoCandidate *piptr=piplus[k]->GetMcTruth();
if(piptr && piptr->PdgCode()==211){
ipiprec++;
RhoCandidate *mother = 0;
mother = piptr->TheMother();
if (mother && mother->PdgCode()==411)
{
ipipmoth++;
}
}
}
}
cout<<" piprec: "<<ipiprec<<" , "<<" pipmoth: "<<ipipmoth<<endl;
From running 10 events I get the following output:
piprec: 2 , pipmoth: 2
piprec: 3 , pipmoth: 1
piprec: 2 , pipmoth: 2
piprec: 4 , pipmoth: 3
piprec: 0 , pipmoth: 0
piprec: 2 , pipmoth: 2
piprec: 4 , pipmoth: 4
piprec: 3 , pipmoth: 3
piprec: 1 , pipmoth: 0
meaning there are several events with more than 2 pi+ candidates coming from a D+ decay. Does anybody know why this happens/what I am doing wrong?
Cheers,
/Karin
[Updated on: Fri, 07 February 2014 19:44] by Moderator Report message to a moderator
|
|
|
|
Re: MC truth [message #15838 is a reply to message #15836] |
Thu, 06 February 2014 16:43 |
Karin Schönning
Messages: 65 Registered: August 2012 Location: Uppsala University
|
continuous participant |
From: *physics.uu.se
|
|
Oh, it's 22988 from the end of november last year, has this part been changed since then?
|
|
|
|
Re: MC truth [message #15840 is a reply to message #15839] |
Fri, 07 February 2014 11:34 |
Karin Schönning
Messages: 65 Registered: August 2012 Location: Uppsala University
|
continuous participant |
From: *physics.uu.se
|
|
Should one use the external packages from Dec13 or are there bugs in them as well?
|
|
|
|
Re: MC truth [message #15842 is a reply to message #15841] |
Fri, 07 February 2014 13:18 |
Karin Schönning
Messages: 65 Registered: August 2012 Location: Uppsala University
|
continuous participant |
From: *physics.uu.se
|
|
Thanks! Now the output is
piprec: 1 , pipmoth: 1
piprec: 1 , pipmoth: 1
piprec: 2 , pipmoth: 2
piprec: 2 , pipmoth: 2
piprec: 1 , pipmoth: 1
piprec: 0 , pipmoth: 0
piprec: 1 , pipmoth: 1
piprec: 1 , pipmoth: 1
piprec: 2 , pipmoth: 2
which is what I expect.
|
|
|
|
Re: MC truth [message #16010 is a reply to message #15843] |
Wed, 19 March 2014 17:43 |
Karin Schönning
Messages: 65 Registered: August 2012 Location: Uppsala University
|
continuous participant |
From: *physics.uu.se
|
|
Hi again,
I switched the fairroot base to v13.12 in order to be able to run simulations with extended target. Since then the problem came back: the MC truth match does not seem to work but in a few events the number of e.g. pions or kaons is larger than it should. Since i thought that the previous version I used when it worked, was v13.05 I switched back to that and recompiled, but the problem remained. Now it came to my mind that the fairrot version may have been a different one - unfortunately I forgot to keep record. Which version should be used?
Cheers,
/Karin
|
|
|
|
Re: MC truth [message #16012 is a reply to message #16011] |
Wed, 19 March 2014 22:28 |
Karin Schönning
Messages: 65 Registered: August 2012 Location: Uppsala University
|
continuous participant |
From: *05-69-7570701.cust.bredbandsbolaget.se
|
|
I discussed with Stefan Pfueger how to set the extended target and he asked me to check which version of fairroot I had in order to use the FairPrimaryGenerator the way he uses it. I did "svn info base" and I THINK (but this was about a month ago so I am not sure I remember correctly) that it was v13.05. Then I did an svn switch to v13.12. The extended target stuff worked but now since the MCtruth match gives some weird results I try to figure out why. This is the only change I have made since I had something which (seemed to) work (though I did not run so many events before as I did this time). I use the jan14 release of pandaroot. However, I have the same problem with v13.12 as with v13.05 so I was thinking that the problem is either that I use the wrong fairroot base version or the MC truth match still doesn't work perfectly with the jan14 release. Did anyone else have this problem?
|
|
|
|