GSI Forum
GSI Helmholtzzentrum für Schwerionenforschung

Home » PANDA » PandaRoot » Fast Simulations » question about tagging events
question about tagging events [message #17221] Fri, 29 August 2014 15:21 Go to next message
Alexandros is currently offline  Alexandros
Messages: 51
Registered: January 2014
Location: KVI
continuous participant
From: *kvi-cart.rug.nl
Hi,

I have a rather stupid question.

So, I am running some full simulations.
I want to compare some parameters(lets say mom, x position, etc) from the mc truth tree with the same parameters from my analysis tree..
The thing is that I want to compare these parameters for the same event number.
For example:
I simulate 10000 events and I get 6000 D0 in my analysis..
Is it possible to compare the parameters mentioned above for the same 6000 events both from my analysis and the mc truth??
I mean is there a tag somewhere so that the numbers I get are from the same event for both mc truth and analysis??
I hope you understood my question.

Thanks a lot
Re: question about tagging events [message #17222 is a reply to message #17221] Fri, 29 August 2014 17:03 Go to previous messageGo to next message
Elisabetta Prencipe (2) is currently offline  Elisabetta Prencipe (2)
Messages: 214
Registered: February 2013
first-grade participant
From: *hsi17.unitymediagroup.de
Hi Alexandros,

if I understood well your question, you are looking for something like in /tutorial/rho/tut_ana.C

for (j=0;j<jpsi.GetLength();++j)
{
if (theAnalysis->McTruthMatch(jpsi[j]))
{
hjpsim_reco->Fill( jpsi[j]->M() );
hjpsim_true->Fill( jpsi[j]->GetMcTruth()->M();
}
}

Here the example is related to the J/psi mass, reconstructed through pi+ pi-. jpsi = name of the combined list pi+ + pi-. hjpsim_reco and hjpsim_true are 2 histograms.
Is this what you asked?

[...there are never stupid questions Smile )

cheers, Elisabetta
Re: question about tagging events [message #17223 is a reply to message #17221] Fri, 29 August 2014 17:05 Go to previous message
Klaus Götzen is currently offline  Klaus Götzen
Messages: 293
Registered: June 2006
Location: GSI
first-grade participant
From: *gsi.de
Dear Alexandros,


the analysis framework (to be more precise PndAnalysis) provides a methode to do an MC truth match, i.e. to find the candidate in the MC truth list matching your reco'd candidate in case it was reconstructed properly. You can take a look here how it can be done: https://subversion.gsi.de/trac/fairroot/browser/pandaroot/trunk/macro/sc rut/PndScrutAnaTask.cxx#L203

Using that you can directly plot the true quantity against/together with the reconstructed quantity.


Best,
Klaus
Previous Topic: [FIXED] Problem with mass constraint fit for two gamma
Next Topic: One technical problem for vertex or 4c fitter in the analysis task
Goto Forum:
  


Current Time: Sat Dec 10 09:02:51 CET 2022

Total time taken to generate the page: 0.01064 seconds