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 */
8 ///////////////////////////////////////////////////////////////////////////////
10 // Container for the distributions of dE/dx and the time bin of the //
11 // max. cluster for electrons and pions //
14 // Prashant Shukla <shukla@pi0.physi.uni-heidelberg.de> //
16 ///////////////////////////////////////////////////////////////////////////////
24 class AliTRDCalPIDLQRef;
26 class AliTRDCalPIDLQ : public TNamed {
28 friend class AliTRDCalPIDLQRef;
33 AliTRDCalPIDLQ(const Text_t *name, const Text_t *title);
34 AliTRDCalPIDLQ(const AliTRDCalPIDLQ& pd);
35 virtual ~AliTRDCalPIDLQ();
36 AliTRDCalPIDLQ &operator=(const AliTRDCalPIDLQ &c);
38 virtual void Copy(TObject &c) const;
40 Bool_t ReadReferences(Char_t *responseFile);
41 void SetMeanChargeRatio(Double_t ratio) { fMeanChargeRatio = ratio; }
43 Double_t GetMeanChargeRatio() const { return fMeanChargeRatio; }
44 Double_t GetMomentum(Int_t ip) const { return (ip<0 || ip>=fNMom) ? -1. : fTrackMomentum[ip]; }
45 Double_t GetLength(Int_t il) const { return (il<0 || il>=fNLength) ? -1. : fTrackSegLength[il]; }
46 //Double_t GetMean(Int_t iType, Int_t ip) const;
47 //Double_t GetNormalization(Int_t iType, Int_t ip) const;
49 TH1* GetHistogram(Int_t iType, Int_t ip/*, Int_t il*/) const;
50 TH1* GetHistogramT(Int_t iType, Int_t ip) const;
52 Double_t GetProbability(Int_t spec, Double_t mom, Double_t *dedx, Double_t length) const;
53 Double_t GetProbabilityT(Int_t spec, Double_t mom, Int_t timbin) const;
54 //Int_t GetNbins() const { return fNbins; }
55 //Double_t GetBinSize() const { return fBinSize; }
56 Bool_t WriteReferences(Char_t *File="TRDPIDHistograms.root", Char_t *dir =".");
63 inline Int_t GetHistID(Int_t part, Int_t mom/*, Int_t length=0*/) const { return part*fNMom + mom; }
64 void SaveMaxTimeBin(const Int_t mom, const char *fn);
68 static Char_t *fpartName[5]; //! Names of particle species
69 static Char_t *fpartSymb[5]; //! Symbols of particle species
70 Int_t fNMom; // Number of momenta
71 Int_t fNLength; // Number of track segment length intervals
73 Double_t *fTrackMomentum; //[fNMom] Track momenta for which response functions are available
74 Double_t *fTrackSegLength; //[fNLength] Track segment lengths for which response functions are available
75 Int_t fNTimeBins; // Number of time bins
77 Double_t fMeanChargeRatio; // Ratio of mean charge from real Det. to prob. dist.
78 Int_t fNbins; // Number of energy bins
79 Double_t fBinSize; // Size of energy bin
81 TObjArray *fHistdEdx; // Prob. of dEdx for 5 particles and for several momenta
82 TObjArray *fHistTimeBin; // Prob. of max time bin for 5 particles and for several momenta
87 AliTRDCalPIDLQRef *fEstimator; //!
89 ClassDef(AliTRDCalPIDLQ, 2) // The TRD PID response container class