GSI Forum
GSI Helmholtzzentrum für Schwerionenforschung

Home » PANDA » PandaRoot » Analysis » [FIXED] PndAnalysis::McTruthMatch always returns false, again ....
[FIXED] PndAnalysis::McTruthMatch always returns false, again .... [message #15003] Tue, 23 July 2013 16:25 Go to next message
Simone Esch is currently offline  Simone Esch
Messages: 37
Registered: August 2010
Location: Forschungszentrum Jülich...
continuous participant

From: *ext.kfa-juelich.de
Hi all,

i have again the problem that McTruthMatch always returns false, but at another level.

Now I try to match the whole decaytree of my Lambda LambdaBar decay.

What I do:

RhoCandList ppbarsystem;

ppbarsystem.Combine(lambda, lambdabar);
ppbarsystem.SetType(88888);

for(int b=0;b<ppbarsystem.GetLength();b++)
{

    if(theAnalysis->McTruthMatch(ppbarsystem[b],2,true))
		{
		// fill some histogram
		}
}



Output created:

Info in <PndMcTruthMatch::MctMatch>: Investigating in particle with pdg: 88888 and 2 daughters
Info in <PndMcTruthMatch::MctMatch>: Investigating in particle with pdg: 3122 and 2 daughters
Info in <PndMcTruthMatch::MctMatch>: Investigating in particle with pdg: 2212 and 0 daughters
Info in <PndMcTruthMatch::MctMatch>: accepted final state by PDG code (pdg=2212)
Info in <PndMcTruthMatch::MctMatch>: Investigating in particle with pdg: -211 and 0 daughters
Info in <PndMcTruthMatch::MctMatch>: accepted final state by PDG code (pdg=-211)
Info in <PndMcTruthMatch::MctMatch>: Particle 3122 reached level of matching, leaves, tree topology and intermediate particle types are matched 
Info in <PndMcTruthMatch::MctMatch>: Investigating in particle with pdg: -3122 and 2 daughters
Info in <PndMcTruthMatch::MctMatch>: Investigating in particle with pdg: -2212 and 0 daughters
Info in <PndMcTruthMatch::MctMatch>: accepted final state by PDG code (pdg=-2212)
Info in <PndMcTruthMatch::MctMatch>: Investigating in particle with pdg: 211 and 0 daughters
Info in <PndMcTruthMatch::MctMatch>: accepted final state by PDG code (pdg=211)
Info in <PndMcTruthMatch::MctMatch>: Particle -3122 reached level of matching, leaves, tree topology and intermediate particle types are matched 
Info in <PndMcTruthMatch::MctMatch>: rejected by not existing MC truth of daughter zero


This appears for all my llbar combinations.
Seems that the MCTruth tree is not build. Should this work and something is going wrong, or am I doing something wrong?

Best regards

Simone

[Updated on: Fri, 23 August 2013 17:42] by Moderator

Report message to a moderator

Re: PndAnalysis::McTruthMatch always returns false, again .... [message #15007 is a reply to message #15003] Wed, 24 July 2013 08:36 Go to previous messageGo to next message
Klaus Götzen is currently offline  Klaus Götzen
Messages: 293
Registered: June 2006
Location: GSI
first-grade participant
From: *gsi.de
Hi Simone,


I observe very similar problems. I believe this it due to a mismatch of the PDG codes used by EvtGen and those in TDatabasePDG.

Could you try to run with

  theAnalysis->SetVerbose(1);


I get some errors like

-W- CreateMcCandidate: strange PDG code:30443


Should be in your case 88888. Can you confirm this?


Best,
Klaus
Re: PndAnalysis::McTruthMatch always returns false, again .... [message #15008 is a reply to message #15007] Wed, 24 July 2013 09:28 Go to previous messageGo to next message
Simone Esch is currently offline  Simone Esch
Messages: 37
Registered: August 2010
Location: Forschungszentrum Jülich...
continuous participant

From: *ext.kfa-juelich.de
Hello Klaus,

yes, I can confirm this. Would it help to insert the PDG code before in the files?

############################### Begin of Event Analysis Exec 
-W- CreateMcCandidate: strange PDG code:88888
Info in <PndAnalysis::BuildMcCands()>: Now setting truth (0x7f9c2a2487c0) to candidate (uid=1)
Info in <PndAnalysis::BuildMcCands()>: Now setting truth (0x7f9c2a2494d0) to candidate (uid=2)
Info in <PndAnalysis::BuildMcCands()>: Now setting truth (0x7f9c2a24b3a0) to candidate (uid=3)
Info in <PndAnalysis::BuildMcCands()>: Now setting truth (0x7f9c2a24bd90) to candidate (uid=4)
Info in <PndAnalysis::BuildMcCands()>: Now setting truth (0x7f9c2a24c650) to candidate (uid=5)
Info in <PndAnalysis::BuildMcCands()>: Now setting truth (0x7f9c2a2ba0a0) to candidate (uid=6)
Info in <PndAnalysis::BuildMcCands()>: Now setting truth (0x7f9c2a2ba7c0) to candidate (uid=7)
Info in <PndAnalysis::BuildMcCands()>: Now setting truth (0x7f9c2a2baa20) to candidate (uid=8)
Info in <PndAnalysis::BuildMcCands()>: Now setting truth (0x7f9c2a2bbf80) to candidate (uid=9)
Info in <PndAnalysis::BuildMcCands()>: Now setting truth (0x7f9c2a2bc440) to candidate (uid=10)
Info in <PndAnalysis::BuildMcCands()>: Now setting truth (0x7f9c2a248c50) to candidate (uid=11)
Info in <PndAnalysis::BuildMcCands()>: Now setting truth (0x7f9c2a2b6300) to candidate (uid=12)
Info in <PndAnalysis::BuildMcCands()>: Now setting truth (0x7f9c2a2b6530) to candidate (uid=13)
Info in <PndAnalysis::BuildMcCands()>: Now setting truth (0x7f9c2a2b7710) to candidate (uid=14)
Info in <PndAnalysis::GetEvent()>: Finished loading event fEvtCount=4.
smallest chi2 263.672
filling histos 
Info in <PndMcTruthMatch::MctMatch>: Investigating in particle with pdg: 88888 and 2 daughters
Info in <PndMcTruthMatch::MctMatch>: Investigating in particle with pdg: 3122 and 2 daughters
Info in <PndMcTruthMatch::MctMatch>: Investigating in particle with pdg: 2212 and 0 daughters
Info in <PndMcTruthMatch::MctMatch>: accepted final state by PDG code (pdg=2212)
Info in <PndMcTruthMatch::MctMatch>: Investigating in particle with pdg: -211 and 0 daughters
Info in <PndMcTruthMatch::MctMatch>: accepted final state by PDG code (pdg=-211)
Info in <PndMcTruthMatch::MctMatch>: Particle 3122 reached level of matching, leaves, tree topology and intermediate particle types are matched 
Info in <PndMcTruthMatch::MctMatch>: Investigating in particle with pdg: -3122 and 2 daughters
Info in <PndMcTruthMatch::MctMatch>: Investigating in particle with pdg: -2212 and 0 daughters
Info in <PndMcTruthMatch::MctMatch>: accepted final state by PDG code (pdg=-2212)
Info in <PndMcTruthMatch::MctMatch>: Investigating in particle with pdg: 211 and 0 daughters
Info in <PndMcTruthMatch::MctMatch>: accepted final state by PDG code (pdg=211)
Info in <PndMcTruthMatch::MctMatch>: Particle -3122 reached level of matching, leaves, tree topology and intermediate particle types are matched 
Info in <PndMcTruthMatch::MctMatch>: rejected by not existing MC truth of daughter zero


In addition I have a new problem.
In the next line my analysis task crashes with the following output :

 *** Break *** segmentation violation
sed: RE error: illegal byte sequence



===========================================================
There was a crash.
This is the entire stack trace of all threads:
===========================================================

Thread 1 (process 72203):
#0  0x00007fff8bb906ac in wait4 ()
#1  0x00007fff8c34a03a in system ()
#2  0x000000010dad5f0f in TUnixSystem::StackTrace ()
#3  0x000000010dad3d67 in TUnixSystem::DispatchSignals ()
#4  <signal handler called>
#5  RhoCandidate::NDaughters (this=0x0) at /Users/simone/fairroot/pandaroot_newest/rho/RhoBase/RhoCandidate.cxx:969
#6  0x000000011377929d in PndAnalysis::MctMatch (this=0x7f9c2a1178b0, c=0x0, mct=
0x7f9c2a117a48, level=2, verbose=true) at /Users/simone/fairroot/pandaroot_newest/PndTools/AnalysisTools/PndAnalysis.cxx:783
#7  0x0000000113779680 in PndAnalysis::McTruthMatch (this=0x7f9c2a1178b0, list=
0x7fff521d7f40, level=2, verbose=<value temporarily unavailable, due to optimizations>) at /Users/simone/fairroot/pandaroot_newest/PndTools/AnalysisTools/PndAnalysis.cxx:774
===========================================================


The lines below might hint at the cause of the crash.
If they do not help you then please submit a bug report at
http://root.cern.ch/bugs. Please post the ENTIRE stack trace
from above as an attachment in addition to anything else
that might help us fixing this issue.
===========================================================
#5  RhoCandidate::NDaughters (this=0x0) at /Users/simone/fairroot/pandaroot_newest/rho/RhoBase/RhoCandidate.cxx:969
#6  0x000000011377929d in PndAnalysis::MctMatch (this=0x7f9c2a1178b0, c=0x0, mct=
0x7f9c2a117a48, level=2, verbose=true) at /Users/simone/fairroot/pandaroot_newest/PndTools/AnalysisTools/PndAnalysis.cxx:783
#7  0x0000000113779680 in PndAnalysis::McTruthMatch (this=0x7f9c2a1178b0, list=
0x7fff521d7f40, level=2, verbose=<value temporarily unavailable, due to optimizations>) at /Users/simone/fairroot/pandaroot_newest/PndTools/AnalysisTools/PndAnalysis.cxx:774
===========================================================



This is not correlated with the verbose level, I had this before. I cant see a correlation with my code. Sometimes the codes runs without a crash, sometimes not Sad

Best Regards

Simone
Re: PndAnalysis::McTruthMatch always returns false, again .... [message #15010 is a reply to message #15008] Wed, 24 July 2013 09:53 Go to previous messageGo to next message
Klaus Götzen is currently offline  Klaus Götzen
Messages: 293
Registered: June 2006
Location: GSI
first-grade participant
From: *gsi.de
Hi,


this apparently is a bug I just spotted in PndAnalysis. I'll try to fix it in trunk.

You can try as a workaround to use the method 'McTruthMatch(RhoCandidate)' instead 'McTruthMatch(RhoCandList)' for the time being.


Best,
Klaus
Re: PndAnalysis::McTruthMatch always returns false, again .... [message #15011 is a reply to message #15010] Wed, 24 July 2013 10:02 Go to previous messageGo to next message
StefanoSpataro is currently offline  StefanoSpataro
Messages: 2736
Registered: June 2005
Location: Torino
first-grade participant

From: 2.235.190*
Why PndAnalysis::fVerbose is static?

[sorry, wrong topic]

[Updated on: Wed, 24 July 2013 10:14]

Report message to a moderator

Re: PndAnalysis::McTruthMatch always returns false, again .... [message #15012 is a reply to message #15010] Wed, 24 July 2013 10:05 Go to previous messageGo to next message
Simone Esch is currently offline  Simone Esch
Messages: 37
Registered: August 2010
Location: Forschungszentrum Jülich...
continuous participant

From: *ext.kfa-juelich.de
Hello Klaus,

I didnt recognise that I used McTruthMatch(RhoCandList), with McTruthMatch(RhoCandList) it works.

Re: PndAnalysis::McTruthMatch always returns false, again .... [message #15013 is a reply to message #15011] Wed, 24 July 2013 10:10 Go to previous messageGo to next message
Simone Esch is currently offline  Simone Esch
Messages: 37
Registered: August 2010
Location: Forschungszentrum Jülich...
continuous participant

From: *ext.kfa-juelich.de
Hello Stefano,

The static definition of fVerbose makes some problem for my code. Maybe you have similar problems.
I opend a new topix due to this in the Bugs forum
( https://forum.gsi.de/index.php?t=tree&th=3938&start=0&rid=15 62&S=ab06a719b66b530ae5b7a8f7a9f6cdd3)

Best Regards

Simone
Re: PndAnalysis::McTruthMatch always returns false, again .... [message #15015 is a reply to message #15012] Wed, 24 July 2013 10:14 Go to previous messageGo to next message
Klaus Götzen is currently offline  Klaus Götzen
Messages: 293
Registered: June 2006
Location: GSI
first-grade participant
From: *gsi.de
Hi,


if you update trunk/PndTools/AnalysisTools, you get the fixed version (which works for me fine).

Why fVerbose is static, I actually either don't understand. Most likely Ralf had some reason to put it like this, but he's in vacations the rest of this week.


Best,
Klaus
Re: PndAnalysis::McTruthMatch always returns false, again .... [message #15016 is a reply to message #15015] Wed, 24 July 2013 10:46 Go to previous messageGo to next message
Simone Esch is currently offline  Simone Esch
Messages: 37
Registered: August 2010
Location: Forschungszentrum Jülich...
continuous participant

From: *ext.kfa-juelich.de
The fixed for the McTruthMatch(RhoCandList) function works also fine for me.
Re: PndAnalysis::McTruthMatch always returns false, again .... [message #15046 is a reply to message #15007] Tue, 30 July 2013 15:04 Go to previous messageGo to next message
Simone Esch is currently offline  Simone Esch
Messages: 37
Registered: August 2010
Location: Forschungszentrum Jülich...
continuous participant

From: *ext.kfa-juelich.de
Hi Klaus, Hi all

Quote:

I believe this it due to a mismatch of the PDG codes used by EvtGen and those in TDatabasePDG.


Can't I insert somehow the 88888 pdg code in the database manualy so that the match works?

I saw in this post:
https://forum.gsi.de/index.php?t=tree&goto=14689&rid=1562&S= ab06a719b66b530ae5b7a8f7a9f6cdd3&srch=TDatabasePDG#msg_14689
that one can do it, but I dont know what to fill in for some the variables.
virtual TParticlePDG*   AddParticle(const char*  Name,
                                    const char*  Title,
                                    Double_t     Mass,
                                    Bool_t       Stable,
                                    Double_t     DecayWidth,
                                    Double_t     Charge,
                                    const char*  ParticleClass,
                                    Int_t        PdgCode,
                                    Int_t        Anti=-1,
                                    Int_t        TrackingCode=0);


Does someone know?

best regards

simone
Re: PndAnalysis::McTruthMatch always returns false, again .... [message #15050 is a reply to message #15046] Tue, 30 July 2013 15:53 Go to previous messageGo to next message
Klaus Götzen is currently offline  Klaus Götzen
Messages: 293
Registered: June 2006
Location: GSI
first-grade participant
From: *gsi.de
Hi Simone,


you could try something like

TDatabasePDG::Instance()->AddParticle("pbarpSystem","pbarpSystem",1.9,kFALSE,0.1,0,"",88888)

I think, for the truth match only the pdg code is important anyways.


Best regards,
Klaus
Re: PndAnalysis::McTruthMatch always returns false, again .... [message #15058 is a reply to message #15050] Tue, 30 July 2013 21:57 Go to previous messageGo to next message
StefanoSpataro is currently offline  StefanoSpataro
Messages: 2736
Registered: June 2005
Location: Torino
first-grade participant

From: 2.235.190*
Maybe it would be good to prepare some class who is doing such initialization for all our strange states (pbarpsystem, pbarpsystem012, pbardsystem...), in order to avoid possible problems (i.e. evtgen with geant4 with SetStoreTree).
Maybe some function is gconfig folder?
Re: PndAnalysis::McTruthMatch always returns false, again .... [message #15069 is a reply to message #15050] Wed, 31 July 2013 10:45 Go to previous messageGo to next message
Simone Esch is currently offline  Simone Esch
Messages: 37
Registered: August 2010
Location: Forschungszentrum Jülich...
continuous participant

From: *ext.kfa-juelich.de
Hi all!

I added the line Klaus suggested to the Init() function of my analysis task.
The warning of the strange PDG code is gone, but Match still doesnt work. Sad
Re: PndAnalysis::McTruthMatch always returns false, again .... [message #15070 is a reply to message #15069] Wed, 31 July 2013 10:53 Go to previous messageGo to next message
Klaus Götzen is currently offline  Klaus Götzen
Messages: 293
Registered: June 2006
Location: GSI
first-grade participant
From: 140.181.10*
Hi Simone,


there is still a (known) bug in the tree match.

I'm going to discuss with Ralf (who is supposed to be back from vacations tomorrow) about a fix for MC match which worked for my psi(2S), but it's some kind of preliminary.

Unfortunately we have a problem with our linux farm at the moment, when it's fixed I can send you the patched source of PndAnalysis.cxx.


Best,
Klaus
Re: PndAnalysis::McTruthMatch always returns false, again .... [message #15347 is a reply to message #15070] Fri, 23 August 2013 17:17 Go to previous messageGo to next message
StefanoSpataro is currently offline  StefanoSpataro
Messages: 2736
Registered: June 2005
Location: Torino
first-grade participant

From: 2.235.190*
This should be fixed, right?
Re: PndAnalysis::McTruthMatch always returns false, again .... [message #15348 is a reply to message #15347] Fri, 23 August 2013 17:29 Go to previous message
Klaus Götzen is currently offline  Klaus Götzen
Messages: 293
Registered: June 2006
Location: GSI
first-grade participant
From: *adsl.alicedsl.de
Yes, this is supposed to work now. At least it does for the tutorial macros.
Previous Topic: [FIXED] RhoCandidate - probability connection ?
Next Topic: [FIXED] Mc Truth Match
Goto Forum:
  


Current Time: Wed Dec 04 05:00:41 CET 2024

Total time taken to generate the page: 0.00737 seconds