]> git.uio.no Git - u/mrichter/AliRoot.git/blob - TRD/Cal/AliTRDCalPIDLQ.h
First round of effc++ changes
[u/mrichter/AliRoot.git] / TRD / Cal / AliTRDCalPIDLQ.h
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 /* $Id$ */
7
8 ///////////////////////////////////////////////////////////////////////////////
9 //                                                                           //
10 // Container for the distributions of dE/dx and the time bin of the          //
11 // max. cluster for electrons and pions                                      //
12 //                                                                           //
13 // Author:                                                                   //
14 //   Prashant Shukla <shukla@pi0.physi.uni-heidelberg.de>                    //
15 //                                                                           //
16 ///////////////////////////////////////////////////////////////////////////////
17
18 #include <TNamed.h>
19
20 class TH1F;
21 class TObjArray;
22
23 class AliTRDCalPIDLQ : public TNamed {
24
25  public:
26
27   AliTRDCalPIDLQ(); 
28   AliTRDCalPIDLQ(const Text_t *name, const Text_t *title);
29   AliTRDCalPIDLQ(const AliTRDCalPIDLQ& pd);
30   virtual          ~AliTRDCalPIDLQ();              
31   AliTRDCalPIDLQ    &operator=(const AliTRDCalPIDLQ &c);
32
33   virtual void       Copy(TObject &c) const;
34
35           Bool_t     ReadData(Char_t *responseFile);     
36           void       SetMeanChargeRatio(Double_t ratio)     { fMeanChargeRatio = ratio;  }  
37
38           Double_t   GetMeanChargeRatio() const             { return fMeanChargeRatio;   } 
39           Double_t   GetMomentum(Int_t ip) const            { return fTrackMomentum[ip]; }
40           Double_t   GetMean(Int_t iType, Int_t ip) const;        
41           Double_t   GetNormalization(Int_t iType, Int_t ip) const;
42
43           TH1F      *GetHistogram(Int_t iType, Int_t ip) const;
44           TH1F      *GetHistogramT(Int_t iType, Int_t ip) const;
45
46           Double_t   GetProbability(Int_t iType, Double_t mom, Double_t dedx) const;
47           Double_t   GetProbabilityT(Int_t iType, Double_t mom, Int_t timbin) const;
48           Int_t      GetNbins() const                       { return fNbins;   }        
49           Double_t   GetBinSize() const                     { return fBinSize; } 
50
51  protected:
52
53           void       Init();      
54           void       CleanUp();   
55   inline  Int_t      GetHistID(Int_t part, Int_t mom) const { return part*fNMom + mom; }
56     
57   static  Char_t    *fpartName[5];                 //! Names of particle species
58     
59           Int_t      fNMom;                        //  Number of momenta  
60           Double_t  *fTrackMomentum;               //[fNMom] Track momenta for which response functions are available
61           Double_t   fMeanChargeRatio;             //  Ratio of mean charge from real Det. to prob. dist.
62
63           Int_t      fNbins;                       //  Number of energy bins
64           Double_t   fBinSize;                     //  Size of energy bin
65     
66           TObjArray *fHistdEdx;                    //  Prob. of dEdx for 5 particles and for several momenta
67           TObjArray *fHistTimeBin;                 //  Prob. of max time bin for 5 particles and for several momenta
68     
69   ClassDef(AliTRDCalPIDLQ, 1)                      //  The TRD PID response container class
70
71 };
72
73 #endif
74