GSI Forum
GSI Helmholtzzentrum für Schwerionenforschung

Home » PANDA » PandaRoot » Analysis » [FIXED] Mc Truth Match
Re: Mc Truth Match [message #15326 is a reply to message #15325] Fri, 23 August 2013 12:38 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*
Ok, I found that the tutorial analysis macro is not loading the ascii param file.
Can you try the following:

        // *** initialization
        FairRunAna* fRun = new FairRunAna();
        FairRuntimeDb* rtdb = fRun->GetRuntimeDb();
        fRun->SetInputFile(inPidFile);

+       TString anaParFile = gSystem->Getenv("VMCWORKDIR");
+       anaParFile +=  "/macro/params/all.par";
+       FairParAsciiFileIo* parIo1 = new FairParAsciiFileIo();
+       parIo1->open(anaParFile.Data(),"in");
        
        FairParRootFileIo* parIO = new FairParRootFileIo();
        parIO->open(inParFile);
        rtdb->setFirstInput(parIO);
+       rtdb->setSecondInput(parIo1);
        
        rtdb->setOutput(parIO);


Please add the "+" lines in your analysis macro, and let me know.

(I realized that by default the "clear" value for Loose is 0.2, and that you were not loading the updated pidana.par).

After you should see:

-I- FairRunTimeDB::InitContainer() ANAPidSelections
ANAPidSelections initialized from Ascii file

[Updated on: Fri, 23 August 2013 12:40]

Report message to a moderator

Re: Mc Truth Match [message #15327 is a reply to message #15326] Fri, 23 August 2013 12:47 Go to previous messageGo to next message
MartinJGaluska is currently offline  MartinJGaluska
Messages: 203
Registered: March 2010
Location: Germany
first-grade participant
From: *physik.uni-giessen.de
Thank you very much Stefano!

I have just tried that fix and now I do not see any difference between Loose and Tight any more in all simulations that I investigated previously.
Re: Mc Truth Match [message #15329 is a reply to message #15323] Fri, 23 August 2013 13:10 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,


just a comment to the missing McTruth. The values of 0.2 for all particle species are the default values, i.e. you don't have any knowledge about the true particle type.

If not McTruth object can be assigned (what sometimes happens for whatever reason), the defaults are not altered anymore, even in PidAlgoIdealCharged.

One could think about excluding those particles from the list. Any opinions?


Best,
Klaus
Re: Mc Truth Match [message #15330 is a reply to message #15329] Fri, 23 August 2013 13:15 Go to previous messageGo to next message
MartinJGaluska is currently offline  MartinJGaluska
Messages: 203
Registered: March 2010
Location: Germany
first-grade participant
From: *physik.uni-giessen.de
Maybe PidAlgoIdealCharged could assign 0 for all of the 5 particle hypotheses we currently have if the track is not associated to any mc truth track or to a track which is neither electron, nor muon, pion, proton or kaon? Then it should also not matter which numerical value Loose corresponds to.
Re: Mc Truth Match [message #15331 is a reply to message #15329] Fri, 23 August 2013 13:19 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*
Once you merge more than 1 algorithm, if one algorithm is not able to provide a selection (prob = 0.2), the 2nd algorithm will provide a number and in the pid moltiplication the 2nd will win. In this sense the track has not to be rejected (i.e. an emc algorith w/o emc signal).

If you multiply the ideal algo with a real algo, you can do purity/eficiecny calculation in an easy way. For this reason we decided to set the prob at 0.2 and not to exclude them.
Re: Mc Truth Match [message #15332 is a reply to message #15330] Fri, 23 August 2013 13:22 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*
Setting the pdfs at zero bring to a division by zero (pdf/sum(pdf)=0), and it crashes once you calcualte the probability.
Re: Mc Truth Match [message #15333 is a reply to message #15332] Fri, 23 August 2013 13:43 Go to previous messageGo to next message
MartinJGaluska is currently offline  MartinJGaluska
Messages: 203
Registered: March 2010
Location: Germany
first-grade participant
From: *physik.uni-giessen.de
Ah, ok, I did not know that. It makes sense to me now. Smile
Re: Mc Truth Match [message #15334 is a reply to message #15239] Fri, 23 August 2013 14:04 Go to previous messageGo to next message
Simon Reiter is currently offline  Simon Reiter
Messages: 44
Registered: May 2013
continuous participant
From: *wlan.uni-giessen.de
I suggest to let the probabilities at 0.2 to get a sum of 1. But what about implementing a check if all probabilities are the same, and set the pdg information to 0? I guess this can implemented in PndAnaPidSelector::Accept, or?
Re: Mc Truth Match [message #15335 is a reply to message #15334] Fri, 23 August 2013 14:10 Go to previous messageGo to next message
MartinJGaluska is currently offline  MartinJGaluska
Messages: 203
Registered: March 2010
Location: Germany
first-grade participant
From: *physik.uni-giessen.de
The pdg information is a (mass) hypothesis which is needed for calculating invariant masses of resonances and so on. Therefore, it should be assigned to what you specify when you use FillList if the probability of the track being the particle species you asked for is >= your desired probability.

Of course, one can filter the list lateron using McTruthMatch for instance to filter out wrong assignments for efficiency calculations and so on.
Re: Mc Truth Match [message #15336 is a reply to message #15332] Fri, 23 August 2013 14:38 Go to previous messageGo to next message
MartinJGaluska is currently offline  MartinJGaluska
Messages: 203
Registered: March 2010
Location: Germany
first-grade participant
From: *physik.uni-giessen.de
How about introducing a sixth category: "Charged, other than electron, muon, pion, kaon, proton"? PidAlgoIdealCharged could set all probabilities to 0 and the sixth probability to 1. Or would that introduce other problems?

[Updated on: Fri, 23 August 2013 15:01]

Report message to a moderator

Re: Mc Truth Match [message #15346 is a reply to message #15335] Fri, 23 August 2013 17:15 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*
Apart from the "fake" definition,
can I flag this topic as "FIXED"?
Re: Mc Truth Match [message #15349 is a reply to message #15346] Fri, 23 August 2013 17:31 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
This depends on whether we want to change structure or add another PID type different to e, mu, pi, K, p.
Previous Topic: [FIXED] PndAnalysis::McTruthMatch always returns false, again ....
Next Topic: [FIXED] Bug in RhoCandList (?)
Goto Forum:
  


Current Time: Sat Feb 24 21:49:56 CET 2024

Total time taken to generate the page: 0.00997 seconds