GSI Forum
GSI Helmholtzzentrum für Schwerionenforschung

Home » PANDA » PandaRoot » Bugs, Fixes, Releases » [FIXED] MC truth
[FIXED] MC truth [message #15836] Thu, 06 February 2014 14:18 Go to next message
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 #15837 is a reply to message #15836] Thu, 06 February 2014 15:35 Go to previous messageGo to next message
StefanoSpataro is currently offline  StefanoSpataro
Messages: 2736
Registered: June 2005
Location: Torino
first-grade participant

From: *to.infn.it
Which pandaroot version/release are you using?
Re: MC truth [message #15838 is a reply to message #15836] Thu, 06 February 2014 16:43 Go to previous messageGo to next message
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 #15839 is a reply to message #15838] Thu, 06 February 2014 16:45 Go to previous messageGo to next message
StefanoSpataro is currently offline  StefanoSpataro
Messages: 2736
Registered: June 2005
Location: Torino
first-grade participant

From: *to.infn.it
Yes, we stated that there was a bug in the tracking code. Please use the last release jan14.
Re: MC truth [message #15840 is a reply to message #15839] Fri, 07 February 2014 11:34 Go to previous messageGo to next message
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 #15841 is a reply to message #15840] Fri, 07 February 2014 12:06 Go to previous messageGo to next message
StefanoSpataro is currently offline  StefanoSpataro
Messages: 2736
Registered: June 2005
Location: Torino
first-grade participant

From: *to.infn.it
As stated in wiki:

https://panda-wiki.gsi.de/foswiki/bin/view/Computing/PandaRoot#Suggested _version_of_the_code

Suggested version of the code

External packages apr13
PandaRoot release jan14
(updated on 02/02/2014)
Re: MC truth [message #15842 is a reply to message #15841] Fri, 07 February 2014 13:18 Go to previous messageGo to next message
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 #15843 is a reply to message #15842] Fri, 07 February 2014 19:43 Go to previous messageGo to next message
StefanoSpataro is currently offline  StefanoSpataro
Messages: 2736
Registered: June 2005
Location: Torino
first-grade participant

From: *to.infn.it
Exaclty, there was a bug in tracking which was fixed after the last Collaboration Meeting.
Re: MC truth [message #16010 is a reply to message #15843] Wed, 19 March 2014 17:43 Go to previous messageGo to next message
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 #16011 is a reply to message #16010] Wed, 19 March 2014 19:09 Go to previous messageGo to next message
StefanoSpataro is currently offline  StefanoSpataro
Messages: 2736
Registered: June 2005
Location: Torino
first-grade participant

From: 93.48.238*
Karin Schönning wrote on Wed, 19 March 2014 17:43
I switched the fairroot base to v13.12 in order to be able to run simulations with extended target.


What do you mean? You can use the extended target also with the previous version. The new trunk is already linked to 13.12 since a while. Which version of the code are you using?
Re: MC truth [message #16012 is a reply to message #16011] Wed, 19 March 2014 22:28 Go to previous messageGo to next message
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?
Re: MC truth [message #16016 is a reply to message #16012] Fri, 21 March 2014 09:44 Go to previous message
StefanoSpataro is currently offline  StefanoSpataro
Messages: 2736
Registered: June 2005
Location: Torino
first-grade participant

From: 93.48.224*
Again,
I have not understood which are the features of the FairPrimaryGenerator which were not present before, since as far as I know there are no big differences.

Second, if you use "hybrid" installations I cannot be sure that everything was done properly, and nobody can check. It is also possible that you were using simulation files or parameters made with the previous version and reconstruction done with the other.

I suggest to check what is going wrong with the last trunk, so that everybody can check, and to report in a new thread (or to modify the first message), since this is [FIXED].
Previous Topic: sim_complete.C in this mrnings versions
Next Topic: doubt in simulation file
Goto Forum:
  


Current Time: Thu Mar 28 22:07:09 CET 2024

Total time taken to generate the page: 0.01224 seconds