GSI Forum
GSI Helmholtzzentrum für Schwerionenforschung

Home » PANDA » PandaRoot » Analysis » [FIXED] RhoCandidate - probability connection ?
[FIXED] RhoCandidate - probability connection ? [message #15337] Fri, 23 August 2013 15:05 Go to next message
Ronald Kunne is currently offline  Ronald Kunne
Messages: 32
Registered: October 2009
continuous participant
From: *in2p3.fr
Hi there !

Is there a way to go from the RhoCandidates in a RhoCandList to the corresponding PndPidProbability, to have access to the probability information stored there ?

Typically I want to do something like:
RhoCandList eplus;

while (theAnalysis->GetEvent() && i++<nevts)  {

  theAnalysis->FillList(eplus,"ElectronAllPlus");

  for (j=0;j<eplus.GetLength();j++) {
     Int_t pointer = eplus[j]->Pointer();    // hypothetical connection
     PndPidProbability *prob = (PndPidProbability*)emc_array->At(pointer);
     Float_t proba  = prob->GetElectronPidProb();
  }

}



Thanks in advance,
Ronald Kunne

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

Report message to a moderator

Re: RhoCandidate - probability connection ? [message #15338 is a reply to message #15337] Fri, 23 August 2013 15:14 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*
The candidate should have the following data members:

  virtual Float_t               GetElectronPidLH() const=0;
  virtual Float_t               GetMuonPidLH() const=0;
  virtual Float_t               GetPionPidLH() const=0;
  virtual Float_t               GetKaonPidLH() const=0;
  virtual Float_t               GetProtonPidLH() const=0;


In theory they should be filled by the FillList. I don't know if this works.
Re: RhoCandidate - probability connection ? [message #15339 is a reply to message #15337] Fri, 23 August 2013 16:07 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: *adsl.alicedsl.de
Hi Ronald,


after the PID values have been stored in the RhoCandidate by the PndAnaPidCombiner (or PndAnalysis::FillList, which does this internally), you should be able to access the Pid Probs by

RhoCandList list;
...
list[i]->GetPidInfo(0); // Electron Prob
list[i]->GetPidInfo(1); // Muon Prob
list[i]->GetPidInfo(2); // Pion Prob
list[i]->GetPidInfo(3); // Kaon Prob
list[i]->GetPidInfo(4); // Proton Prob



Best,
Klaus
Re: RhoCandidate - probability connection ? [message #15340 is a reply to message #15339] Fri, 23 August 2013 16:42 Go to previous messageGo to next message
Ronald Kunne is currently offline  Ronald Kunne
Messages: 32
Registered: October 2009
continuous participant
From: *in2p3.fr
Quoting Klaus:
RhoCandList list;
...
list[i]->GetPidInfo(0); // Electron Prob
list[i]->GetPidInfo(1); // Muon Prob
list[i]->GetPidInfo(2); // Pion Prob
list[i]->GetPidInfo(3); // Kaon Prob
list[i]->GetPidInfo(4); // Proton Prob


Thank you. But.... I had actually found these and discarded them before I asked the question, as it gives back exact 0's and 1's.

With the code
 for (j=0;j<eplus.GetLength();j++) {
   cout << "probs:" ;
     for (k=0;k<5;k++) {
         cout << " " <<  eplus[j]->GetPidInfo(k);
     }
     cout << endl;
 }


the results is
probs: 0 0 1 0 0 for pi+pi- events
probs: 1 0 0 0 0 for e+e- events

[Updated on: Fri, 23 August 2013 16:43]

Report message to a moderator

Re: RhoCandidate - probability connection ? [message #15341 is a reply to message #15340] Fri, 23 August 2013 16:44 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*
Using EmcBayes?
Re: RhoCandidate - probability connection ? [message #15342 is a reply to message #15341] Fri, 23 August 2013 17:02 Go to previous messageGo to next message
Ronald Kunne is currently offline  Ronald Kunne
Messages: 32
Registered: October 2009
continuous participant
From: *in2p3.fr
Stefano Spataro wrote on Fri, 23 August 2013 16:44

Using EmcBayes?


Right. That's the solution.
Now I understand 2.2.3 in the Rho tutorial !

Thanks for helping me out on that one.
Re: RhoCandidate - probability connection ? [message #15343 is a reply to message #15342] Fri, 23 August 2013 17:08 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*
I supposed you were using the ideal association, and there you have only probability 0 or 1.
Re: RhoCandidate - probability connection ? [message #15344 is a reply to message #15343] Fri, 23 August 2013 17:12 Go to previous message
Ronald Kunne is currently offline  Ronald Kunne
Messages: 32
Registered: October 2009
continuous participant
From: *in2p3.fr
Stefano Spataro wrote on Fri, 23 August 2013 17:08

I supposed you were using the ideal association, and there you have only probability 0 or 1.



You suppose correct Embarassed
Previous Topic: [WONTFIX] Tutorial macro - trunk
Next Topic: [FIXED] PndAnalysis::McTruthMatch always returns false, again ....
Goto Forum:
  


Current Time: Sat Jun 22 05:56:12 CEST 2024

Total time taken to generate the page: 0.00967 seconds