]> git.uio.no Git - u/mrichter/AliRoot.git/blame - TRD/AliTRDCalPIDLQ.h
- Volume name attribute replaced with volume path
[u/mrichter/AliRoot.git] / TRD / AliTRDCalPIDLQ.h
CommitLineData
cc7cef99 1#ifndef ALITRDCALPIDLQ_H
2#define ALITRDCALPIDLQ_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
13#include <TNamed.h>
14#include <AliPID.h>
15
16class TH1F;
17class TObjArray;
18
19class AliTRDCalPIDLQ : public TNamed {
20 public:
21 AliTRDCalPIDLQ();
22 AliTRDCalPIDLQ(const Text_t *name, const Text_t *title);
23
24 AliTRDCalPIDLQ(const AliTRDCalPIDLQ& pd); // Copy Constructor
25 virtual ~AliTRDCalPIDLQ(); // Destructor
26
27 AliTRDCalPIDLQ &operator=(const AliTRDCalPIDLQ &c);
28 virtual void Copy(TObject &c) const;
29
30 Double_t GetMeanChargeRatio() const { return fMeanChargeRatio; }
31
32 Double_t GetMomentum(Int_t ip) const {return fTrackMomentum[ip];}
33 // Gets the momentum for given histogram number ip
34 Double_t GetMean(Int_t iType, Int_t ip) const;
35 // Particle type is iType and histogram number is ip
36 Double_t GetNormalization(Int_t iType, Int_t ip) const;
37
38 TH1F* GetHistogram(Int_t iType, Int_t ip) const;
39
40 Double_t GetProbability(Int_t iType, Double_t mom, Double_t dedx) const;
41 // Gets the Probability of having dedx
42 Double_t GetProbabilityT(Int_t iType, Double_t mom, Int_t timbin) const;
43 // Gets the Probability of having timbin
44 Int_t GetNbins() const {return fNbins;} // Number of Energy bins
45 Double_t GetBinSize() const {return fBinSize;} // Size of Energy bin
46
47 Bool_t ReadData(Char_t *responseFile); // Read histograms
48 // Update the histograms from responseFile
49 void SetMeanChargeRatio(Double_t ratio) { fMeanChargeRatio = ratio; }
50
51 protected:
52 void Init(); // Reset data
53 void CleanUp(); // Delete pointers;
54 inline Int_t GetHistID(Int_t particle, Int_t mom) const { return particle*fNMom + mom; }
55
56 static Char_t *fpartName[AliPID::kSPECIES]; //! Names of particle species
57
58 Int_t fNMom; // Number of momenta
59 Double_t* fTrackMomentum; //[fNMom] Track momenta for which response functions are available
60 Double_t fMeanChargeRatio; // Ratio of mean charge from real Det. to prob. dist.
61
62 Int_t fNbins; // Number of Energy bins
63 Double_t fBinSize; // Size of Energy bin
64
65 TObjArray *fHistdEdx; //-> Prob. of dEdx for 5 particles (e, pi, muon, kaon, proton) and for several momenta
66 TObjArray *fHistTimeBin; //-> Prob. of max time bin for 5 particles (e, pi, muon, kaon, proton) and for several momenta
67
68 ClassDef(AliTRDCalPIDLQ, 1)
69};
70
71
72#endif
73