Interface for setting up custom monitoring lib policy (Requested by Jens).
[u/mrichter/AliRoot.git] / EMCAL / AliEMCALPIDUtils.h
CommitLineData
0c5b726e 1#ifndef ALIEMCALPIDUTILS_H
2#define ALIEMCALPIDUTILS_H
3
4/* $Id: AliEMCALPIDUtils.h 33808 2009-07-15 09:48:08Z gconesab $ */
5
6///////////////////////////////////////////////////////////////////////////////
7// Class AliEMCALPIDUtils
8// Compute PID weights for all the clusters
9///////////////////////////////////////////////////////////////////////////////
10
11//Root includes
12#include "TTask.h"
13class TArrayD ;
14
15//AliRoot includes
16#include "AliPID.h"
17
18class AliEMCALPIDUtils : public TTask {
19
20public:
21
22 AliEMCALPIDUtils();
23/* AliEMCALPIDUtils(Bool_t reconstructor); */
24 //virtual ~AliEMCALPIDUtils() { }
25
26 void ComputePID(Double_t energy, Double_t lambda0); // give the PID of a cluster
27
28 void InitParameters();
29 void SetLowFluxParam();
30 void SetHighFluxParam();
31
32 TArrayD DistLambda0(const Double_t energy, const Int_t nature) ; // compute lambda0 distributions
33
34 Double_t DistEnergy(const Double_t energy, const Int_t nature) ;
35
36 Double_t GetPID(Int_t idx) const {if (idx>=0&&idx<3) return fPID[idx]; else return 0.;}
37 Double_t GetPIDFinal(Int_t idx) const {if (idx>=0&&idx<AliPID::kSPECIESN) return fPIDFinal[idx]; else return 0.;}
38 Double_t GetPIDWeight(Int_t idx) const {if (idx>=0&&idx<3) return fPIDWeight[idx]; else return 0.;}
39
40 void SetPID(Double_t val, Int_t idx) {if (idx>=0&&idx<3) fPID[idx] = val;}
41 void SetPIDFinal(Double_t val, Int_t idx) {if (idx>=0&&idx<AliPID::kSPECIESN) fPIDFinal[idx] = val;}
42 void SetPIDWeight(Double_t val, Int_t idx) {if (idx>=0&&idx<3) fPIDWeight[idx] = val;}
43 void SetPrintInfo(Bool_t yesno) {fPrintInfo = yesno;}
44
45
46
47 private:
48
49 Double_t Polynomial(const Double_t x, const Double_t *params) const ;
50 Double_t Polynomialinv(const Double_t x, const Double_t *params) const ;
51 Double_t PolynomialMixed1(const Double_t x, const Double_t *params) const ;
52 Double_t PolynomialMixed2(const Double_t x, const Double_t *params) const ;
53 Double_t Polynomial0(const Double_t *params) const ;
54 Double_t PowerExp(const Double_t x, const Double_t *params) const ;
55
56protected:
57 Bool_t fPrintInfo; // flag to decide if details about PID must be printed
58
59 Double_t fGamma[6][6]; // Parameter to Compute PID for photons
60 Double_t fGamma1to10[6][6]; // Parameter to Compute PID not used
61 Double_t fHadron[6][6]; // Parameter to Compute PID for hadrons, 1 to 10 GeV
62 Double_t fHadron1to10[6][6]; // Parameter to Compute PID for hadrons, 1 to 10 GeV
63 Double_t fPiZero[6][6]; // Parameter to Compute PID for pi0
64 Double_t fHadronEnergyProb[6]; // Parameter to Compute PID for energy ponderation for hadrons
65 Double_t fPiZeroEnergyProb[6]; // Parameter to Compute PID for energy ponderation for Pi0
66 Double_t fGammaEnergyProb[6]; // Parameter to Compute PID for energy ponderation for gamma
67
68 Float_t fPID[3];
69
70 Float_t fPIDFinal[AliPID::kSPECIESN+1]; // final PID format
71 Float_t fPIDWeight[3]; // order: gamma, pi0, hadrons,
72 Double_t fProbGamma; // probility to be a Gamma
73 Double_t fProbPiZero; // probility to be a PiO
74 Double_t fProbHadron; // probility to be a Hadron
75 Double_t fWeightHadronEnergy; // Weight for a a Hadron to have a given energy (parametr from a flat distrib from 0 to 100)
76 Double_t fWeightGammaEnergy; // Weight for a Gamma to have a given energy (for the moment =1.)
77 Double_t fWeightPiZeroEnergy; // Weight for a Pi0 Hadron to have a given energy (for the moment =1.)
78
79 ClassDef(AliEMCALPIDUtils, 1)
80
81};
82
83#endif // ALIEMCALPIDUTILS_H
84
85