]> git.uio.no Git - u/mrichter/AliRoot.git/blame - EMCAL/AliEMCALPID.h
Updated macros
[u/mrichter/AliRoot.git] / EMCAL / AliEMCALPID.h
CommitLineData
dc293ae9 1#ifndef AliEMCALPID_H
2#define AliEMCALPID_H
3
4/* $Id$ */
5/* History of cvs commits:
6 *
7 * $Log$
af885e0f 8 * Revision 1.12 2007/02/20 20:17:43 hristov
9 * Corrected array size, removed warnings (icc)
10 *
d69ab345 11 * Revision 1.11 2006/12/19 08:49:35 gustavo
12 * New PID class for EMCAL, bayesian analysis done with ESD data, PID information filled when calling AliEMCALPID in AliEMCALReconstructor::FillESD()
13 *
dc293ae9 14 *
15 */
16
17///////////////////////////////////////////////////////////////////////////////
18// Class AliEMCALPID
19///////////////////////////////////////////////////////////////////////////////
20
21#include "TTask.h"
22#include "TArrayD.h"
af885e0f 23#include "AliESDEvent.h"
dc293ae9 24#include "AliPID.h"
25
26class AliEMCALPID : public TTask {
27
28public:
29
30 AliEMCALPID();
31 virtual ~AliEMCALPID() { }
32
af885e0f 33 void RunPID(AliESDEvent *esd);
dc293ae9 34 void ComputePID(Double_t energy, Double_t lambda0); // give the PID of a cluster
35 TArrayD DistLambda0(Double_t energy, Int_t nature); // compute lambda0 distributions
36
37 Double_t GetPID(Int_t idx) const {if (idx>=0&&idx<3) return fPID[idx]; else return 0.;}
38 Double_t GetPIDFinal(Int_t idx) const {if (idx>=0&&idx<AliPID::kSPECIESN) return fPIDFinal[idx]; else return 0.;}
39 Double_t GetPIDWeight(Int_t idx) const {if (idx>=0&&idx<3) return fPIDWeight[idx]; else return 0.;}
40
41 void SetPID(Double_t val, Int_t idx) {if (idx>=0&&idx<3) fPID[idx] = val;}
42 void SetPIDFinal(Double_t val, Int_t idx) {if (idx>=0&&idx<AliPID::kSPECIESN) fPIDFinal[idx] = val;}
43 void SetPIDWeight(Double_t val, Int_t idx) {if (idx>=0&&idx<3) fPIDWeight[idx] = val;}
44 void SetPrintInfo(Bool_t yesno) {fPrintInfo = yesno;}
45 void SetReconstructor(Bool_t yesno) {fReconstructor = yesno;}
46 private:
47
48 Double_t Polynomial(Double_t x, Double_t *params);
49
50 Bool_t fPrintInfo; // flag to decide if details about PID must be printed
51
52 Double_t fGamma[6][6]; // Parameter to Compute PID
53 Double_t fHadron[6][6]; // Parameter to Compute PID
54 Double_t fPiZero5to10[6][6]; // Parameter to Compute PID
55 Double_t fPiZero10to60[6][6]; // Parameter to Compute PID
56
57 Float_t fPID[3];
58
d69ab345 59 Float_t fPIDFinal[AliPID::kSPECIESN+1]; // final PID format
dc293ae9 60 Float_t fPIDWeight[3]; // order: gamma, pi0, hadrons,
61 Double_t fProbGamma; // probility to be a Gamma
62 Double_t fProbPiZero; // probility to be a PiO
63 Double_t fProbHadron; // probility to be a Hadron
64 Bool_t fReconstructor; //Fill esdcalocluster when called from EMCALReconstructor
65
66 ClassDef(AliEMCALPID, 0)
67};
68
69#endif // ALIEMCALPID_H