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