]> git.uio.no Git - u/mrichter/AliRoot.git/blob - STEER/AliTRDPIDResponse.h
Added methods to set/get centrailty from clusters in outer layer, which is less noisy...
[u/mrichter/AliRoot.git] / STEER / AliTRDPIDResponse.h
1 /**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
3 *                                                                        *
4 * Author: The ALICE Off-line Project.                                    *
5 * Contributors are mentioned in the code where appropriate.              *
6 *                                                                        *
7 * Permission to use, copy, modify and distribute this software and its   *
8 * documentation strictly for non-commercial purposes is hereby granted   *
9 * without fee, provided that the above copyright notice appears in all   *
10 * copies and that both the copyright notice and this permission notice   *
11 * appear in the supporting documentation. The authors make no claims     *
12 * about the suitability of this software for any purpose. It is          *
13 * provided "as is" without express or implied warranty.                  *
14 **************************************************************************/
15 //
16 // PID Response class for the TRD detector
17 // Based on 1D Likelihood approach
18 // For further information see implementation file
19 //
20 #ifndef ALITRDPIDRESPONSE_H
21 #define ALITRDPIDRESPONSE_H
22
23 #ifndef ROOT_TObject
24 #include <TObject.h>
25 #endif
26
27 #ifndef ALIPID_H
28 #include "AliPID.h"
29 #endif
30
31 class TObjArray;
32 class AliVTrack;
33 class AliTRDPIDResponse : public TObject {
34 public:
35  enum ETRDPIDResponseStatus {
36    kIsOwner = BIT(14)
37  };
38  enum ETRDPIDResponseDef {
39    kNlayer = 6
40   ,kNPBins = 6
41  };
42  AliTRDPIDResponse(const Char_t *filename = NULL);
43  AliTRDPIDResponse(const AliTRDPIDResponse &ref);
44  AliTRDPIDResponse& operator=(const AliTRDPIDResponse &);
45  ~AliTRDPIDResponse();
46
47  Int_t     GetPIDmethod() const { return fPIDmethod;}
48  Bool_t    GetResponse(Int_t n, Double_t *dedx, Float_t *p, Double_t prob[AliPID::kSPECIES], Bool_t kNorm=kTRUE) const;
49
50  Bool_t    IsOwner() const {return TestBit(kIsOwner);}
51
52  void      SetOwner();
53  void      SetPIDmethod(Int_t m) {fPIDmethod=m;}
54  void      SetGainNormalisationFactor(Double_t gainFactor) { fGainNormalisationFactor = gainFactor; }
55
56 private:
57  Bool_t    CookdEdx(Double_t *in, Double_t *out) const;
58  Int_t     GetLowerMomentumBin(Double_t p) const;
59  Double_t  GetProbabilitySingleLayer(Int_t species, Double_t plocal, Double_t dEdx) const;
60  Bool_t    Load(const Char_t *filename = NULL);
61
62  static const Double_t fgkPBins[kNPBins];
63  TObjArray *fReferences; // Container for reference distributions
64  Int_t     fMapRefHists[AliPID::kSPECIES][kNPBins];     
65                          // Map for the position of a given historgam in the container 
66  Double_t  fGainNormalisationFactor;  // Gain normalisation factor
67  UChar_t   fPIDmethod;   // PID method selector  
68
69  ClassDef(AliTRDPIDResponse, 2)    // Tool for TRD PID
70 };
71 #endif
72