Added methods for finding a given module in the DDL map (F. Prino)
[u/mrichter/AliRoot.git] / STEER / AliPID.h
CommitLineData
304864ab 1#ifndef ALIPID_H
2#define ALIPID_H
3
4/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5 * See cxx source for full Copyright notice */
6
7///////////////////////////////////////////////////////////////////////////////
8/// //
9/// particle id probability densities //
10/// //
11///////////////////////////////////////////////////////////////////////////////
12
13/* $Id$ */
14
15
16#include <TObject.h>
17
18
19class AliPID : public TObject {
20 public:
21 enum {
22 kSPECIES = 5, // Number of particle species recognized by the PID
23 kSPECIESN = 10 // Number of charged+neutral particle species recognized by the PHOS/EMCAL PID
24 };
25 enum EParticleType {
26 kElectron = 0,
27 kMuon = 1,
28 kPion = 2,
29 kKaon = 3,
30 kProton = 4,
31 kPhoton = 5,
32 kPi0 = 6,
33 kNeutron = 7,
34 kKaon0 = 8,
35 kEleCon = 9,
36 kUnknown = 10
37 };
38 static Float_t ParticleMass(Int_t iType)
39 {return fgkParticleMass[iType];};
40 static const char* ParticleName(Int_t iType)
41 {return fgkParticleName[iType];};
42 static Int_t ParticleCode(Int_t iType)
43 {return fgkParticleCode[iType];};
44
45 AliPID();
46 AliPID(const Double_t* probDensity, Bool_t charged = kTRUE);
47 AliPID(const Float_t* probDensity, Bool_t charged = kTRUE);
48 AliPID(const AliPID& pid);
49 AliPID& operator = (const AliPID& pid);
50
51 Double_t GetProbability(EParticleType iType,
52 const Double_t* prior) const;
53 Double_t GetProbability(EParticleType iType) const;
54 void GetProbabilities(Double_t* probabilities,
55 const Double_t* prior) const;
56 void GetProbabilities(Double_t* probabilities) const;
57 EParticleType GetMostProbable(const Double_t* prior) const;
58 EParticleType GetMostProbable() const;
59
3088e2dd 60 void SetProbabilities(const Double_t* probabilities,
61 Bool_t charged = kTRUE);
62
304864ab 63 static void SetPriors(const Double_t* prior,
64 Bool_t charged = kTRUE);
65 static void SetPrior(EParticleType iType, Double_t prior);
66
304864ab 67 AliPID& operator *= (const AliPID& pid);
68
69 private:
a9bbb414 70
71 void Init();
72
304864ab 73 Bool_t fCharged; // flag for charged/neutral
74 Double_t fProbDensity[kSPECIESN]; // probability densities
75 static Double_t fgPrior[kSPECIESN]; // a priori probabilities
76
a9bbb414 77 static /*const*/ Float_t fgkParticleMass[kSPECIESN+1]; // particle masses
304864ab 78 static const char* fgkParticleName[kSPECIESN+1]; // particle names
79 static const Int_t fgkParticleCode[kSPECIESN+1]; // particle codes
80
81 ClassDef(AliPID, 1) // particle id probability densities
82};
83
84
85AliPID operator * (const AliPID& pid1, const AliPID& pid2);
86
87
88#endif