1 /**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
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 **************************************************************************/
16 // PID Response class for the TRD detector
17 // Based on 1D Likelihood approach
18 // For further information see implementation file
20 #ifndef ALITRDPIDRESPONSE_H
21 #define ALITRDPIDRESPONSE_H
33 class AliTRDPIDResponse : public TObject {
35 enum ETRDPIDResponseStatus {
38 enum ETRDPIDResponseDef {
42 AliTRDPIDResponse(const Char_t *filename = NULL);
43 AliTRDPIDResponse(const AliTRDPIDResponse &ref);
44 AliTRDPIDResponse& operator=(const AliTRDPIDResponse &);
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;
50 Bool_t IsOwner() const {return TestBit(kIsOwner);}
53 void SetPIDmethod(Int_t m) {fPIDmethod=m;}
54 void SetGainNormalisationFactor(Double_t gainFactor) { fGainNormalisationFactor = gainFactor; }
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);
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
69 ClassDef(AliTRDPIDResponse, 2) // Tool for TRD PID