]> git.uio.no Git - u/mrichter/AliRoot.git/blob - TRD/Cal/AliTRDCalPID.h
First implementation of neural network PID
[u/mrichter/AliRoot.git] / TRD / Cal / AliTRDCalPID.h
1 #ifndef ALITRDCALPID_H
2 #define ALITRDCALPID_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 // Authors:                                                                  //
11 //                                                                           //
12 //  Alex Bercuci <A.Bercuci@gsi.de>                                          //
13 //  Alex Wilk <wilka@uni-muenster.de>                                        //
14 //  Prashant Shukla <shukla@pi0.physi.uni-heidelberg.de>                     //
15 //                                                                           //
16 ///////////////////////////////////////////////////////////////////////////////
17
18 #ifndef ROOT_TNamed
19 #include <TNamed.h>
20 #endif
21
22 class AliTRDCalPID : public TNamed
23 {
24
25  public:
26
27   enum {
28     kNMom   = 11,
29     kNPlane = 6
30   };
31
32   AliTRDCalPID();
33   AliTRDCalPID(const Text_t *name, const Text_t *title);
34   virtual         ~AliTRDCalPID();
35
36   virtual Bool_t   LoadReferences(Char_t *refFile) = 0;
37   static  Double_t GetMomentum(Int_t ip)            
38                                                       { return (ip<0 || ip>=kNMom) 
39                                                         ? -1.0 
40                                                         : fTrackMomentum[ip]; 
41                                                       }
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, Float_t *dedx
44                                 , Float_t length, Int_t plane) const = 0;
45   static  Char_t  *GetPartName(Int_t i)               { return fPartName[i]; }
46   static  Char_t  *GetPartSymb(Int_t i)               { return fPartSymb[i]; }
47
48           void     SetPartName(Int_t i, Char_t *name) { fPartName[i] = name; }
49           void     SetPartSymb(Int_t i, Char_t *symb) { fPartSymb[i] = symb; }
50
51  protected:
52
53   virtual void     Init() = 0;
54   virtual Int_t    GetModelID(Int_t mom, Int_t spec, Int_t plane) const = 0;
55
56  private:
57
58   AliTRDCalPID(const AliTRDCalPID& pd);
59   AliTRDCalPID    &operator=(const AliTRDCalPID &c);
60
61  protected:
62
63   static  Char_t   *fPartName[5];          //! Names of particle species
64   static  Char_t   *fPartSymb[5];          //! Symbols of particle species
65
66   static  Float_t   fTrackMomentum[kNMom]; //  Track momenta for which response functions are available
67   TObjArray        *fModel;                //  Model for probability estimate
68
69   ClassDef(AliTRDCalPID, 3)                //  Base class for TRD PID methods
70
71 };
72 #endif