StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StProbPidTraits.h
1 
5 /***************************************************************************
6  *
7  * $Id: StProbPidTraits.h,v 2.6 2013/12/17 15:07:34 fisyak Exp $
8  *
9  * Author:
10  ***************************************************************************
11  *
12  * Description: Yuri Fisyak, Oct 2002
13  * keep track Likelihood for each mass hypothesis
14  *
15  **************************************************************************/
16 #ifndef StProbPidTraits_hh
17 #define StProbPidTraits_hh
18 #include "StDetectorId.h"
19 #include "StTrackPidTraits.h"
20 #include "TArrayF.h"
21 #include "StParticleDefinition.hh"
22 #include "StPidParticleDefinition.h"
23 
25 public:
26  StProbPidTraits(const Int_t NDF=0, const StDetectorId Id=kUnknownId, const StPidParticle N=KPidParticles,
27  const Float_t *PidArray = 0, Double_t *Fractions = 0);
28  virtual ~StProbPidTraits();
29  Int_t GetNDF() {return mNDF;}
30  TArrayF *GetPidArray() {return mPidArray;}
31  Double_t GetProbability(Int_t PartId) ;
32  Double_t GetChi2Prob(Int_t PartId) const; //
33  Double_t GetSum() { return mSum;}
34  void SetFractions(Double_t *Fractions) {mFractions = Fractions; mSum = 0;}
35  void SetNDF(Int_t ndf) {mNDF = ndf;}
36  void Print(Option_t *opt = "") const;
37  static StParticleDefinition *mPidParticleDefinitions[KPidParticles];
38 
39  protected:
40  Int_t mNDF;
41  TArrayF *mPidArray;
42  Double_t mSum;
43  Double_t *mFractions;
44  Double_t mProbability[KPidParticles];
45 
46  ClassDef(StProbPidTraits,1)
47 };
48 #endif