Corrected protection.
[u/mrichter/AliRoot.git] / STEER / AliTRDPIDResponse.h
CommitLineData
ffb1ee30 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
31class TObjArray;
32class AliVTrack;
33class AliTRDPIDResponse : public TObject {
34public:
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;}
b439f460 48 Bool_t GetResponse(Int_t n, Double_t *dedx, Float_t *p, Double_t prob[AliPID::kSPECIES], Bool_t kNorm=kTRUE) const;
ffb1ee30 49
50 Bool_t IsOwner() const {return TestBit(kIsOwner);}
51
52 void SetOwner();
53 void SetPIDmethod(Int_t m) {fPIDmethod=m;}
ce5d6908 54 void SetGainNormalisationFactor(Double_t gainFactor) { fGainNormalisationFactor = gainFactor; }
ffb1ee30 55
ffb1ee30 56private:
b439f460 57 Bool_t CookdEdx(Double_t *in, Double_t *out) const;
58 Int_t GetLowerMomentumBin(Double_t p) const;
1bbef4ba 59 Double_t GetProbabilitySingleLayer(Int_t species, Double_t plocal, Double_t dEdx) const;
ffb1ee30 60 Bool_t Load(const Char_t *filename = NULL);
61
62 static const Double_t fgkPBins[kNPBins];
63 TObjArray *fReferences; // Container for reference distributions
1bbef4ba 64 Int_t fMapRefHists[AliPID::kSPECIES][kNPBins];
ffb1ee30 65 // Map for the position of a given historgam in the container
ce5d6908 66 Double_t fGainNormalisationFactor; // Gain normalisation factor
ffb1ee30 67 UChar_t fPIDmethod; // PID method selector
68
1bbef4ba 69 ClassDef(AliTRDPIDResponse, 2) // Tool for TRD PID
ffb1ee30 70};
71#endif
72