EIC Software
Reference for
EIC
simulation and reconstruction software on GitHub
Home page
Related Pages
Modules
Namespaces
Classes
Files
External Links
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
PndPidProbability.h
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file PndPidProbability.h
1
#ifndef PNDPIDPROBABILITY_H
2
#define PNDPIDPROBABILITY_H
3
4
// //
5
// PndPidProbability //
6
// //
7
// Definition of the Panda pid probabilities . //
8
// //
9
// Author: Ralf Kliemt, Dresden/Turin/Bonn, 01.09.09 //
10
// //
12
13
#include <iostream>
14
#include "TObject.h"
15
16
class
PndPidProbability
:
public
TObject
17
{
18
19
public
:
20
21
PndPidProbability
();
22
PndPidProbability
(Double_t
e
, Double_t mu, Double_t
pi
, Double_t
k
, Double_t
p
, Int_t idx = -1);
23
~PndPidProbability
();
24
25
Double_t
GetElectronPdf
()
const
{
return
fElectronPdf
; }
26
Double_t
GetMuonPdf
()
const
{
return
fMuonPdf
; }
27
Double_t
GetPionPdf
()
const
{
return
fPionPdf
; }
28
Double_t
GetKaonPdf
()
const
{
return
fKaonPdf
; }
29
Double_t
GetProtonPdf
()
const
{
return
fProtonPdf
; }
30
Int_t
GetIndex
()
const
{
return
fIndex
;}
31
32
Double_t
GetElectronPidProb
(
PndPidProbability
* flux = NULL)
const
{
if
(flux==NULL) flux =
new
PndPidProbability
(0.2,0.2,0.2,0.2,0.2);
return
fElectronPdf
* flux->GetElectronPdf() /
GetSumProb
(flux); }
33
Double_t
GetMuonPidProb
(
PndPidProbability
* flux = NULL)
const
{
if
(flux==NULL) flux =
new
PndPidProbability
(0.2,0.2,0.2,0.2,0.2);
return
fMuonPdf
* flux->GetMuonPdf() /
GetSumProb
(flux); }
34
Double_t
GetPionPidProb
(
PndPidProbability
* flux = NULL)
const
{
if
(flux==NULL) flux =
new
PndPidProbability
(0.2,0.2,0.2,0.2,0.2);
return
fPionPdf
* flux->GetPionPdf() /
GetSumProb
(flux); }
35
Double_t
GetKaonPidProb
(
PndPidProbability
* flux = NULL)
const
{
if
(flux==NULL) flux =
new
PndPidProbability
(0.2,0.2,0.2,0.2,0.2);
return
fKaonPdf
* flux->GetKaonPdf() /
GetSumProb
(flux); }
36
Double_t
GetProtonPidProb
(
PndPidProbability
* flux = NULL)
const
{
if
(flux==NULL) flux =
new
PndPidProbability
(0.2,0.2,0.2,0.2,0.2);
return
fProtonPdf
* flux->GetProtonPdf() /
GetSumProb
(flux); }
37
38
Double_t
GetSumProb
(
PndPidProbability
* flux = NULL)
const
39
{
40
if
(flux==NULL) flux =
new
PndPidProbability
(0.2,0.2,0.2,0.2,0.2);
41
return
42
fElectronPdf
* flux->GetElectronPdf() +
43
fMuonPdf
* flux->GetMuonPdf() +
44
fPionPdf
* flux->GetPionPdf() +
45
fKaonPdf
* flux->GetKaonPdf() +
46
fProtonPdf
* flux->GetProtonPdf();
47
}
48
49
void
NormalizeTo
(Double_t
N
=1.);
50
51
void
SetElectronPdf
(Double_t val) {
fElectronPdf
= (Double_t) val; }
52
void
SetMuonPdf
(Double_t val) {
fMuonPdf
= (Double_t) val; }
53
void
SetPionPdf
(Double_t val) {
fPionPdf
= (Double_t) val; }
54
void
SetKaonPdf
(Double_t val) {
fKaonPdf
= (Double_t) val; }
55
void
SetProtonPdf
(Double_t val) {
fProtonPdf
= (Double_t) val; }
56
void
SetIndex
(Int_t idx) {
fIndex
= idx; }
57
58
PndPidProbability
&
operator*=
(
const
PndPidProbability
& a);
59
PndPidProbability
operator*
(
const
PndPidProbability
& a);
60
61
void
Print
();
62
void
Reset
();
63
protected
:
64
65
Double_t
fElectronPdf
;
// e Probability density function
66
Double_t
fMuonPdf
;
// mu Probability density function
67
Double_t
fPionPdf
;
// pi Probability density function
68
Double_t
fKaonPdf
;
// k Probability density function
69
Double_t
fProtonPdf
;
// p Probability density function
70
Int_t
fIndex
;
// Candidate Index
71
ClassDef(
PndPidProbability
,3)
//
72
73
};
74
75
76
77
#endif
78
79
EicRoot
blob
master
pnddata
PidData
PndPidProbability.h
Built by
Jin Huang
. updated:
Mon Jan 22 2024 12:43:37
using
1.8.2 with
EIC GitHub integration