]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWGHF/hfe/AliHFEOADBThresholdsTRD.h
Merge branch 'master' of https://git.cern.ch/reps/AliRoot
[u/mrichter/AliRoot.git] / PWGHF / hfe / AliHFEOADBThresholdsTRD.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 thresholds stored in the OADB
17 //
18 #ifndef ALIHFEOADBTHRESHOLDSTRD_H
19 #define ALIHFEOADBTHRESHOLDSTRD_H
20
21 #ifndef ROOT_TNamed
22 #include <TNamed.h>
23 #endif
24
25 class TSortedList;
26
27 class AliHFEOADBThresholdsTRD : public TNamed{
28   public:
29     AliHFEOADBThresholdsTRD();
30     AliHFEOADBThresholdsTRD(const char *name);
31     virtual ~AliHFEOADBThresholdsTRD();
32     virtual void Print(Option_t *) const;
33
34     Bool_t GetThresholdParameters(Int_t ntracklets, Double_t efficiency, Double_t *params);
35     void SetThresholdParameters(Int_t ntracklets, Double_t efficiency, Double_t *params);
36
37   private:
38     class AliHFEthresholdParamsTRD : public TObject{
39       public:
40         AliHFEthresholdParamsTRD();
41         AliHFEthresholdParamsTRD(Int_t nTracklets, Double_t eff, Double_t *params = NULL);
42         AliHFEthresholdParamsTRD(const AliHFEthresholdParamsTRD &ref);
43         AliHFEthresholdParamsTRD &operator=(const AliHFEthresholdParamsTRD &ref);
44         virtual ~AliHFEthresholdParamsTRD() {}
45         
46         Int_t GetNTracklets() const { return fNTracklets; }
47         Double_t GetElectronEfficiency() const { return fEfficiency; }
48         const Double_t *GetThresholdParams() const { return fParams; }
49
50         virtual Bool_t IsSortable() const { return kTRUE; }
51         virtual Int_t Compare(const TObject *ref) const;
52         virtual Bool_t IsEqual(const TObject *ref) const;
53
54       private:
55         Int_t fNTracklets;      // Number of tracklets
56         Double_t fEfficiency;   // Efficiency level applied
57         Double_t fParams[4];    // Cut parameterization
58
59         ClassDef(AliHFEthresholdParamsTRD, 1);
60     };
61
62     static const Double_t fgkVerySmall;   // Comparison of efficiency values
63
64     AliHFEOADBThresholdsTRD(const AliHFEOADBThresholdsTRD &ref);
65     AliHFEOADBThresholdsTRD &operator=(const AliHFEOADBThresholdsTRD &ref);
66     
67     TSortedList *fEntries; // Container for Thresholds
68
69     ClassDef(AliHFEOADBThresholdsTRD, 1);
70 };
71 #endif
72