Home » PANDA » PandaRoot » Bugs, Fixes, Releases » [FIXED] MC truth
[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
|
|
|
Goto Forum:
Current Time: Thu Dec 12 18:45:33 CET 2024
Total time taken to generate the page: 0.00769 seconds
|