3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
8 ///////////////////////////////////////////////////////////////////////////////
12 // Alex Bercuci <A.Bercuci@gsi.de> //
13 // Alex Wilk <wilka@uni-muenster.de> //
14 // Prashant Shukla <shukla@pi0.physi.uni-heidelberg.de> //
16 ///////////////////////////////////////////////////////////////////////////////
22 class AliTRDCalPID : public TNamed
34 AliTRDCalPID(const Text_t *name, const Text_t *title);
35 virtual ~AliTRDCalPID();
37 virtual Bool_t LoadReferences(Char_t *refFile) = 0;
38 static Double_t GetMomentum(Int_t ip) {
39 return (ip<0 || ip>=kNMom) ? -1.0 : fgTrackMomentum[ip]; }
40 static Double_t GetMomentumBinning(Int_t ip) {
41 return (ip<0 || ip>=kNMom+1) ? -1.0 : fgTrackMomentumBinning[ip]; }
42 virtual TObject *GetModel(Int_t ip, Int_t iType, Int_t iPlane) const = 0;
43 virtual Double_t GetProbability(Int_t spec, Float_t mom
44 , const Float_t * const dedx
45 , Float_t length, Int_t plane) const = 0;
46 static Color_t GetPartColor(Int_t i) { return fgPartColor[i]; }
47 static Int_t GetPartIndex(Int_t pdg);
48 static const Char_t *GetPartName(Int_t i) { return fPartName[i]; }
49 static const Char_t *GetPartSymb(Int_t i) { return fPartSymb[i]; }
51 void SetPartName(Int_t i, const Char_t *name) { fPartName[i] = name; }
52 void SetPartSymb(Int_t i, const Char_t *symb) { fPartSymb[i] = symb; }
56 virtual void Init() = 0;
57 virtual Int_t GetModelID(Int_t mom, Int_t spec, Int_t plane) const = 0;
59 static const Char_t *fPartName[AliPID::kSPECIES]; //! Names of particle species
60 static const Char_t *fPartSymb[AliPID::kSPECIES]; //! Symbols of particle species
61 static Color_t fgPartColor[AliPID::kSPECIES]; //! Colors of particle species
62 static Float_t fgTrackMomentum[kNMom]; // Track momenta for which response functions are available
63 static Float_t fgTrackMomentumBinning[kNMom+1]; // Defines the start and the endpoints of the momentum bins
64 TObjArray *fModel; // Model for probability estimate
68 AliTRDCalPID(const AliTRDCalPID& pd);
69 AliTRDCalPID &operator=(const AliTRDCalPID &c);
71 ClassDef(AliTRDCalPID, 4) // Base class for TRD PID methods