]> git.uio.no Git - u/mrichter/AliRoot.git/blob - STEER/STEERBase/AliTRDPIDResponseObject.h
- fast TRD PID implementation with muon constraints (Daniel Lohner)
[u/mrichter/AliRoot.git] / STEER / STEERBase / AliTRDPIDResponseObject.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 // Container for TRD PID Response Objects stored in the OADB
17 //
18 #ifndef ALITRDPIDRESPONSEOBJECT_H
19 #define ALITRDPIDRESPONSEOBJECT_H
20
21 #ifndef ROOT_TNamed
22 #include <TNamed.h>
23 #endif
24
25 #ifndef AliTRDPIDRESPONSE_H
26 #include "AliTRDPIDResponse.h"
27 #endif
28
29
30 class AliTRDPIDParams;
31 class AliTRDPIDReference;
32 class AliTRDPIDResponse;
33
34 class AliTRDPIDResponseObject : public TNamed{
35 public:
36     enum ETRDPIDResponseObjectStatus {
37         kIsOwner = BIT(14)
38     };
39
40     AliTRDPIDResponseObject();
41     AliTRDPIDResponseObject(const char *name);
42     AliTRDPIDResponseObject(const AliTRDPIDResponseObject &ref);
43     AliTRDPIDResponseObject &operator=(const AliTRDPIDResponseObject &ref);
44     virtual ~AliTRDPIDResponseObject();
45
46     virtual void Print(Option_t *opt) const;
47
48     void SetPIDParams(AliTRDPIDParams *params,AliTRDPIDResponse::ETRDPIDMethod method=AliTRDPIDResponse::kLQ1D);
49     void SetPIDReference(AliTRDPIDReference *params,AliTRDPIDResponse::ETRDPIDMethod method=AliTRDPIDResponse::kLQ1D);
50
51     // Derive reference
52     TObject *GetLowerReference(AliPID::EParticleType spec, Float_t p, Float_t &pLower,AliTRDPIDResponse::ETRDPIDMethod method=AliTRDPIDResponse::kLQ1D) const;
53     TObject *GetUpperReference(AliPID::EParticleType spec, Float_t p, Float_t &pUpper,AliTRDPIDResponse::ETRDPIDMethod method=AliTRDPIDResponse::kLQ1D) const;
54
55     Int_t GetNumberOfMomentumBins(AliTRDPIDResponse::ETRDPIDMethod method=AliTRDPIDResponse::kLQ1D) const;
56
57     // Derive threshold params
58     Bool_t GetThresholdParameters(Int_t ntracklets, Double_t efficiency, Double_t *params,Double_t centrality = -1,AliTRDPIDResponse::ETRDPIDMethod method=AliTRDPIDResponse::kLQ1D) const;
59
60     // Number of SlicesQ0
61     Int_t GetNSlicesQ0() const{return fNSlicesQ0;}
62     void SetNSlicesQ0(Int_t nsl){fNSlicesQ0=nsl;}
63
64 private:
65
66       AliTRDPIDParams *fPIDParams[AliTRDPIDResponse::kNMethod]; // Contains Thresholds
67       AliTRDPIDReference *fPIDReference[AliTRDPIDResponse::kNMethod]; // Contains References
68       Int_t fNSlicesQ0; // Number of Slices for Q0
69
70     ClassDef(AliTRDPIDResponseObject, 1);
71 };
72 #endif