FairRoot/PandaRoot
PndPidProbability.cxx
Go to the documentation of this file.
1 // //
3 // PndPidProbability //
4 // //
5 // Definition of the Panda pid probabilities . //
6 // //
7 // Author: Ralf Kliemt, Dresden/Turin/Bonn, 01.09.09 //
8 // //
10 
11 #include "PndPidProbability.h"
12 
13 
15  fElectronPdf(0.2),
16  fMuonPdf(0.2),
17  fPionPdf(0.2),
18  fKaonPdf(0.2),
19  fProtonPdf(0.2),
20  fIndex(-1)
21 {}
22 
24  fElectronPdf(e),
25  fMuonPdf(mu),
26  fPionPdf(pi),
27  fKaonPdf(k),
28  fProtonPdf(p),
29  fIndex(idx)
30 {}
31 
33 {
34 }
35 
37 {
38  return PndPidProbability(
40  a.GetMuonPdf() * fMuonPdf,
41  a.GetPionPdf() * fPionPdf,
42  a.GetKaonPdf() * fKaonPdf,
44  a.GetIndex() );
45 }
47 {
49  fMuonPdf *= a.GetMuonPdf();
50  fPionPdf *= a.GetPionPdf();
51  fKaonPdf *= a.GetKaonPdf();
52  fProtonPdf *= a.GetProtonPdf();
53  return *this;
54 }
55 
57 {
58  std::cout <<"PndPidProbability pdf's: "
59  <<"p(e)="<<fElectronPdf<<" "
60  <<"p(mu)="<<fMuonPdf<<" "
61  <<"p(pi)="<<fPionPdf<<" "
62  <<"p(K)="<<fKaonPdf<<" "
63  <<"p(P)="<<fProtonPdf<<" "
64  <<"index="<<fIndex
65  <<std::endl;
66 }
67 
69 {
70  fElectronPdf = 0.2 ;
71  fMuonPdf = 0.2 ;
72  fPionPdf = 0.2 ;
73  fKaonPdf = 0.2 ;
74  fProtonPdf = 0.2 ;
75  fIndex = -1;
76 }
77 
79 {
80  Double_t scalefactor = GetSumProb();
81  if (scalefactor == 0) return;
82  scalefactor = N / scalefactor;
83  fElectronPdf*=scalefactor;
84  fMuonPdf*=scalefactor;
85  fPionPdf*=scalefactor;
86  fKaonPdf*=scalefactor;
87  fProtonPdf*=scalefactor;
88  return;
89 }
90 
91 
93 
Double_t p
Definition: anasim.C:58
PndPidProbability operator*(const PndPidProbability &a)
#define pi
Definition: createSTT.C:60
Double_t GetKaonPdf() const
Int_t GetIndex() const
int idx[MAX]
Definition: autocutx.C:38
Double_t GetElectronPdf() const
Int_t a
Definition: anaLmdDigi.C:126
Double_t
Double_t GetSumProb(PndPidProbability *flux=NULL) const
PndPidProbability & operator*=(const PndPidProbability &a)
Double_t GetMuonPdf() const
void NormalizeTo(Double_t N=1.)
Double_t GetProtonPdf() const
ClassImp(PndAnaContFact)
Double_t GetPionPdf() const