GSI Forum
GSI Helmholtzzentrum für Schwerionenforschung

Home » PANDA » PandaRoot » Bugs, Fixes, Releases » Kaon lists from PndEventReader::FillList are empty
Kaon lists from PndEventReader::FillList are empty [message #13005] Thu, 02 February 2012 10:01 Go to next message
Marius Mertens is currently offline  Marius Mertens
Messages: 55
Registered: January 2009
continuous participant
From: *ikp.kfa-juelich.de
Hi all,

I recently updated PandaRoot from 13755 to 14281.
Now the FillList function of PndEventReader returns empty lists for "KaonVeryLoosePlus" and "KaonVeryLoosePlus" selection.
In the previous version the very same command worked well and pion selection also still fills the lists.
Can anybody hint me at what might have changed?

Cheers,

Marius
Re: Kaon lists from PndEventReader::FillList are empty [message #13006 is a reply to message #13005] Thu, 02 February 2012 10:26 Go to previous messageGo to next message
Ralf Kliemt is currently offline  Ralf Kliemt
Messages: 507
Registered: May 2007
Location: GSI, Darmstadt
first-grade participant

From: *pool.mediaWays.net
Hi Marius,

I did several changes in the Analysis tools. However, as far as I examined it in the svn after your call here, I did no changes involving the PndEventReader.
However, I incremented the class version number of PndPidProbability, because this class changed slightly. Let us know if that did the trick.

I suggest you have a look on PndAnalysis instead of PndEventReader. The usage is almost the same.

Cheers.
Ralf
Re: Kaon lists from PndEventReader::FillList are empty [message #13007 is a reply to message #13006] Thu, 02 February 2012 10:47 Go to previous messageGo to next message
Albrecht Gillitzer is currently offline  Albrecht Gillitzer
Messages: 49
Registered: March 2004
continuous participant
From: *ikp.kfa-juelich.de
Hi,

I can confirm the problem just reported by Marius. I see exactly the same feature: both K+ and K- (KaonVeryLoosePlus/Minus) lists are empty.
In addition I found that the "Charged" list contains only protons and charged pions. Obviously Kaons are no longer recognized as charged particles in the present trunk version!

Concerning the suggestion to use PndAnalysis instead of PndEvtReader: I suggest that we keept functions that work also working in newer releases unless there are serious arguments against using them any longer (this should be communicated beforehand), independent of the question whether or not alternative solutions exist.

Best regards,
Albrecht

Re: Kaon lists from PndEventReader::FillList are empty [message #13008 is a reply to message #13007] Thu, 02 February 2012 10:49 Go to previous messageGo to next message
Ralf Kliemt is currently offline  Ralf Kliemt
Messages: 507
Registered: May 2007
Location: GSI, Darmstadt
first-grade participant

From: *pool.mediaWays.net
Hello,

How do you determine if a candidate is a kaon? If it is via MC Truth, please make sure you get the correct number of charged particles in the charged list before. The mishap may occur in the MC-matching.

Ralf
Re: Kaon lists from PndEventReader::FillList are empty [message #13010 is a reply to message #13006] Thu, 02 February 2012 11:10 Go to previous messageGo to next message
Marius Mertens is currently offline  Marius Mertens
Messages: 55
Registered: January 2009
continuous participant
From: *ikp.kfa-juelich.de
Hi Ralf,

thanks for your reply. PndEventReader appears to use PndPidListMaker to fill the particle lists, so some changes there might affect the event reader as well.

I managed to replace PndEventReader with PndAnalysis for testing purposes only and here the kaons are found. However I must stress that the replacement I have done is only very rough and checking everything for consistency to be able to trust the results after such a rather severe change is not so trivial in a >1000 lines analysis macro, thus I second Albrecht's comment that working tools should only be replaced if there are really serious reasons.
Re: Kaon lists from PndEventReader::FillList are empty [message #13012 is a reply to message #13008] Thu, 02 February 2012 11:46 Go to previous messageGo to next message
Marius Mertens is currently offline  Marius Mertens
Messages: 55
Registered: January 2009
continuous participant
From: *ikp.kfa-juelich.de
Hi Ralf, according to Albrecht the kaons are already missing from the charged list.
Re: Kaon lists from PndEventReader::FillList are empty [message #13013 is a reply to message #13012] Thu, 02 February 2012 11:49 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
What is exactly the analysis code?
Re: Kaon lists from PndEventReader::FillList are empty [message #13016 is a reply to message #13013] Thu, 02 February 2012 12:44 Go to previous messageGo to next message
Marius Mertens is currently offline  Marius Mertens
Messages: 55
Registered: January 2009
continuous participant
From: *ikp.kfa-juelich.de
In my case it's identical to
/panda/user/m/mertens/macros/run_ana_evt8_grid.C
on the Grid, just executed locally. Albrecht derived his own analysis macro from that but has the same symptoms.
Re: Kaon lists from PndEventReader::FillList are empty [message #13017 is a reply to message #13005] Thu, 02 February 2012 13:19 Go to previous messageGo to next message
Ralf Kliemt is currently offline  Ralf Kliemt
Messages: 507
Registered: May 2007
Location: GSI, Darmstadt
first-grade participant

From: *pool.mediaWays.net
Hi.

I uploaded the incremented version number of PndPidProbability to the svn. I fear that changes in the class introduce the inability to read data produced with an earlier version.

-------------------------------------------

PndAnalysis requires you to set up and initialize a FairRunAna, as you would do it in other macros. E.g. like that:
  FairRunAna* fRun = new FairRunAna();
  FairRuntimeDb* rtdb = fRun->GetRuntimeDb();
  TString filetag = "MyTest_sim.root";
  filetag.ReplaceAll("_sim.root",".root");
  PndFileNameCreator namecreator(filetag.Data());
  TString simFile = namecreator.GetSimFileName();
  TString parFile = namecreator.GetParFileName();
  TString recoFile = namecreator.GetRecoFileName();
  TString tracksFile = namecreator.GetCustomFileName("tracks");
  TString pidFile = namecreator.GetCustomFileName("pid");
  TString histoFile = namecreator.GetCustomFileName("histos");
  TString evrdummy = namecreator.GetCustomFileName("evrdummy");
  fRun->SetInputFile(simFile);
  fRun->AddFriend(recoFile);
  fRun->AddFriend(tracksFile);
  fRun->AddFriend(pidFile);
  FairParRootFileIo* parIO = new FairParRootFileIo();
  parIO->open(parFile.Data());
  rtdb->setFirstInput(parIO);
  rtdb->setOutput(parIO);  
  fRun->SetOutputFile(evrdummy.Data());
  FairGeane* geane = new FairGeane();
  fRun->AddTask(geane);
  fRun->Init();  

You can find in macros/mvd/Tools.C a function doing that (with the namecreator): TString InitDefaultRun(TString filetag) While filetag is your *_sim.root file.

-------------------------------------------

Then create a PndAnalysis object, loop over the events and retrieve your lists as always in the eventreader:
  PndAnalysis* theAnalysis = new PndAnalysis(); //("SttMvdGemGenTrack","FTSTrkIdeal");
// you can put up to two strings, if you need an a speciic array containing PndTrack objects
  int evts = theAnalysis->GetEntries();
  while ((theAnalysis->GetEvent())&&(ievt++<evts))
  {    
    theAnalysis->FillList(mctracks,"McTruth");
    theAnalysis->FillList(pionp,"PionLoosePlus");
    theAnalysis->FillList(pionm,"PionLooseMinus");
// [... your analysis code ]
  }


-------------------------------------------

Now, the thing is that a new interfacing to PID inforation is implemented, and you should be able to do:
theAnalysis->FillList(pionp,"PionLoosePlus","PidAlgoMvd;PidAlgoStt;PidAlgoEmcBayes;PidAlgoDrc;PidAlgoDisc;PidAlgoMdtHardCuts");
//or
theAnalysis->FillList(pionp,"PionLoosePlus","PidAlgoIdealCharged"); //(default MC-PID algo)
//or
theAnalysis->FillList(pionp,"PionLoosePlus","PidMvaChargedProbability");//if you tried MVA or other combined PID algorithm


It depends what PID Associator task was running (you can run any and all in parallel(!) before. By default there is the PndPidIdealAssociatorTask in the macros, i presume. The names are the TClonesArray names (look into the root files or the classes). The ones separated by semicolon will be combined by Bayes theorem (multiply pdf).

The definition of "VeryLoose", "Loose", "Tight", "VeryTight" is done via the RTDB in macro/params/pidana.par. Be rminded that there is "All" and "Best", too.

Attention: You don't need to use the automatic FillList()! You can create Lists with "Charged" only and select by PID later, using PndAnaPidCombiner to write the desired PID combination to the TCandList (use function Apply()) and use PndAnaPidSelector as selector. This gives a bit more freedom. Both classes are used within FillList of PndAnalysis.


I hope to have helped.

Ralf
Re: Kaon lists from PndEventReader::FillList are empty [message #13019 is a reply to message #13017] Thu, 02 February 2012 16:39 Go to previous messageGo to next message
Albrecht Gillitzer is currently offline  Albrecht Gillitzer
Messages: 49
Registered: March 2004
continuous participant
From: *ikp.kfa-juelich.de
Hello,

For clarification:
I also checked Marius' analysis macro run_ana_evt8.C in macro/run/tdrct/psi3770 which had worked before, now with NEW data created with the full simulation chain in the present trunk version. It doesn't work anymore, the charged kaon lists are empty.
I do not see the reason to modify the previously working macros (used for the CT TDR benchmark channels!) in order to make them functional in an updated Pandaroot version. Could I kindly ask the person(s) responsable for the changes that disable these macros to please take care that the previous fuctionality is reestablished.

Albrecht
Re: Kaon lists from PndEventReader::FillList are empty [message #13020 is a reply to message #13019] Thu, 02 February 2012 17:40 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
Dear Albrecht,
first of all the new particle identification framework is developed and tested inside PndAnalysis, which is currently maintained by Ralf and was used for the MVD TDR. We know that PndEventReader is a bit obsolete but the last tutorial was using it; at present nobody is maintaining PndEventReader. This is the reason why we asked to move to PndAnalysis.

The macros used for the tracking TDr are working with the nov11 release, never tried with the trunk. The selection with "KaonVeryLoose" was never official, indeed neither my macros neither Elisa's neither Dima's are using it. "Charged" and TPidPlusSelector were the proper selections, and after you had to set the mass manually...at least this is what I was able to test. I was quite surprised to find that Marius analysis has the xxxVeryLoose selection, which I have never tried.

We have the problem to maintain PndEventReader, and test the new code and pid also there. It would be nice if maybe somebody for your group could take such responsibility if you think it is worth still to use it... but meanwhile to find what is going wrong could take some time. I don't know if Ralf has the time to check what needs to be changed in the PndEventReader.

I have tried my macro using PndEventreader with "Charged" as selection, and it is properly filled. If I use "KaonVeryLoose", then it is not filled. Why are you using such "kaon" selection, considering that there is no realistic pid probability for reconstructed data? Probably charged would do the job in the same way, and it seems to run (at least in my case).

Re: Kaon lists from PndEventReader::FillList are empty [message #13021 is a reply to message #13020] Thu, 02 February 2012 18:38 Go to previous messageGo to next message
Marius Mertens is currently offline  Marius Mertens
Messages: 55
Registered: January 2009
continuous participant
From: *ikp.kfa-juelich.de
Hi, just for clarification: The Charmonium tutorial used the "xxxVeryLoose" selections. When I wrote my analysis script, this was my source of information. Since what was written there worked pretty well and I found no contradicting sources, there was no reason for me to consider its contents unofficial or deprecated.
Re: Kaon lists from PndEventReader::FillList are empty [message #13022 is a reply to message #13005] Fri, 03 February 2012 09:43 Go to previous messageGo to next message
Ralf Kliemt is currently offline  Ralf Kliemt
Messages: 507
Registered: May 2007
Location: GSI, Darmstadt
first-grade participant

From: *cb.uni-bonn.de
Good Morning.

I think to have found the issue. Please update the Analysis Tools to trunk 14219.
The problem was a leftover addition to PndPidListMaker to support "best" and "all" criteria as well. This is now fixed and you should be able to use e.g. "KaonAllPlus" (all charged candidates, but with the kaon mass set) or "KaonBestPlus" (only particles with the Kaon pdf value being largest).

Sorry for any inconvenience.

Personal remark: STT TDR macros are not meant to be forward compatible. There is a fixed Fairsoft/PandaRoot release for that. The trunk is a development branch, which only has to compile. Anyway I'm glad you guys found that bug and stimulated a longish post on the PndAnalysis usage.

Cheers
Ralf
Re: Kaon lists from PndEventReader::FillList are empty [message #13023 is a reply to message #13022] Fri, 03 February 2012 13:01 Go to previous messageGo to next message
Albrecht Gillitzer is currently offline  Albrecht Gillitzer
Messages: 49
Registered: March 2004
continuous participant
From: *ikp.kfa-juelich.de
Hello,

I did an svn update (to revision 14319). The "xxxVeryLoosePlus/Minus" lists are still empty (now for all charged particles).
However the "Charged" list seems to be correctly filled, and the fact that I couldn't see the kaons there before was due to a stupid mistake on my side. It now works, and since I am using MC truth PID, I can live with the present status.

Cheers, Albrecht
Re: Kaon lists from PndEventReader::FillList are empty [message #13024 is a reply to message #13023] Fri, 03 February 2012 13:13 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.11*
Hi Albrecht,


I think was Ralf meant is, that you should replace 'KaonVeryLoosePlus' with 'KaonAllPlus' etc., and then it should work again.


Best,
Klaus
Re: Kaon lists from PndEventReader::FillList are empty [message #13025 is a reply to message #13023] Fri, 03 February 2012 13:13 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
Very nice, one problem less.
For the xxxVeryLoose in PndEventReader, first let's finish PndAnalysis and after let's see what is really the problem.
Re: Kaon lists from PndEventReader::FillList are empty [message #13026 is a reply to message #13005] Fri, 03 February 2012 13:41 Go to previous messageGo to next message
Ralf Kliemt is currently offline  Ralf Kliemt
Messages: 507
Registered: May 2007
Location: GSI, Darmstadt
first-grade participant

From: *cb.uni-bonn.de
Hi all,

I did not advise to use "All" Kaons. I just added that feature. Please update Analysis Tools to trunk 14320. I did my mistake twice. Now you should be able to see your "KaonLoosePlus" again.

Cheers.
Ralf
Re: Kaon lists from PndEventReader::FillList are empty [message #13028 is a reply to message #13026] Fri, 03 February 2012 14:22 Go to previous messageGo to next message
Albrecht Gillitzer is currently offline  Albrecht Gillitzer
Messages: 49
Registered: March 2004
continuous participant
From: *ikp.kfa-juelich.de
Hello,

I now updated to revision 14321 and got KaonVeryLoosePlus/Minus as well as PionVeryLoosePlus/Minus filled (both ...Plus and both ...Minus list with the same content).

Cheers, Albrecht
Re: Kaon lists from PndEventReader::FillList are empty [message #13058 is a reply to message #13005] Tue, 14 February 2012 10:42 Go to previous message
Ralf Kliemt is currently offline  Ralf Kliemt
Messages: 507
Registered: May 2007
Location: GSI, Darmstadt
first-grade participant

From: *pool.mediaWays.net
Hello Albrecht.

This is the expected behaviour. Try "Loose" to have some selection.

Cheers.
Ralf
Previous Topic: Bug in PndPidEmcBayesAssociatorTask?
Next Topic: problems with last r14811
Goto Forum:
  


Current Time: Sat Nov 30 02:33:32 CET 2024

Total time taken to generate the page: 0.01503 seconds