]> git.uio.no Git - u/mrichter/AliRoot.git/blame - TRD/AliTRDprobdist.h
New offline PID code by Prashant
[u/mrichter/AliRoot.git] / TRD / AliTRDprobdist.h
CommitLineData
33a848f6 1#ifndef ALITRDPROBDIST_H
2#define ALITRDPROBDIST_H
3/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
5/*-----------------------------------------------------------------
6 Class for dE/dx and Time Bin of Max. Cluster for Electrons and
7 pions in TRD.
8 It is instantiated in class AliTRDpidESD for particle identification
9 in TRD
10 Prashant Shukla <shukla@pi0.physi.uni-heidelberg.de>
11 -----------------------------------------------------------------*/
12
defc9040 13#include <TNamed.h>
14#include <TFile.h>
15#include <TH1F.h>
33a848f6 16
defc9040 17const Int_t kNMom=11;
33a848f6 18
defc9040 19class AliTRDprobdist : public TNamed {
33a848f6 20 public:
defc9040 21 AliTRDprobdist(Char_t *responseFile="$ALICE_ROOT/TRD/TRDdEdxHistogramsV1.root");
22 // Main Constructor
23 AliTRDprobdist(const AliTRDprobdist& pd); // Copy Constructor
24 virtual ~AliTRDprobdist(); // Destructor
25
26 Double_t GetADCNorm() const {return fADCNorm;} // Get ADC Normalization
27
28 Double_t GetMomentum(Int_t ip) const {return fTrackMomentum[ip];}
29 // Gets the momentum for given histogram number ip
30 Double_t GetMean(Int_t iType, Int_t ip) const;
31 // Particle type is iType and histogram number is ip
32 Double_t GetNormalization(Int_t iType, Int_t ip) const;
33
34 TH1F* GetHistogram(Int_t iType, Int_t ip) const;
35
36 Double_t GetProbability(Int_t iType, Double_t mom, Double_t dedx) const;
37 // Gets the Probability of having dedx
38 Double_t GetProbabilityT(Int_t iType, Double_t mom, Int_t timbin) const;
39 // Gets the Probability of having timbin
40
41 Int_t GetNbins() const {return fNbins;} // Number of Energy bins
42 Double_t GetBinSize() const {return fBinSize;} // Size of Energy bin
43
44 Bool_t UpdateData(Char_t *responseFile) {return ReadData(responseFile);}
45 // Update the histograms from responseFile
46 void SetADCNorm(Double_t norm){fADCNorm=norm;} // Set ADC Normalization
47
33a848f6 48 protected:
defc9040 49 Bool_t ReadData(Char_t *responseFile); // Reads Data
50 Char_t *fpartName[5]; // Names of particle species
51 Double_t fADCNorm; // Ratio of mean charge from real Det. to prob. dist.
33a848f6 52 Int_t fNMom; // Number of momenta
defc9040 53 Double_t fTrackMomentum[kNMom]; // Track Momentum
54
55 Int_t fNbins; // Number of Energy bins
56 Double_t fBinSize; // Size of Energy bin
33a848f6 57
defc9040 58 TH1F *fh1dEdxEL[kNMom]; // Prob. of dEdx for e
59 TH1F *fh1dEdxPI[kNMom]; // Prob. of dEdx for pi
60 TH1F *fh1dEdxMU[kNMom]; // Prob. of dEdx for muon
61 TH1F *fh1dEdxKA[kNMom]; // Prob. of dEdx for Kaon
62 TH1F *fh1dEdxPR[kNMom]; // Prob. of dEdx for proton
63 TH1F *fh1MaxTimBinEL[kNMom]; // Prob. of max Time Bin for e
64 TH1F *fh1MaxTimBinPI[kNMom]; // Prob. of max Time Bin for pi
33a848f6 65 ClassDef(AliTRDprobdist,1)
66};
67
68
69#endif
70