Kaon lists from PndEventReader::FillList are empty [message #13005] |
Thu, 02 February 2012 10:01 |
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 #13017 is a reply to message #13005] |
Thu, 02 February 2012 13:19 |
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 #13020 is a reply to message #13019] |
Thu, 02 February 2012 17:40 |
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).
|
|
|
|
|
|
|
|
|
|
|