]> git.uio.no Git - u/mrichter/AliRoot.git/blame - STEER/STEERBase/AliTRDPIDParams.h
Bug corrected.
[u/mrichter/AliRoot.git] / STEER / STEERBase / AliTRDPIDParams.h
CommitLineData
ce487a7f 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 ALITRDPIDPARAMS_H
19#define ALITRDPIDPARAMS_H
20
21#ifndef ROOT_TNamed
22#include <TNamed.h>
23#endif
24
bd58d4b9 25class TList;
ce487a7f 26class TSortedList;
27
28class AliTRDPIDParams : public TNamed{
29 public:
30 AliTRDPIDParams();
31 AliTRDPIDParams(const char *name);
db0e2c5f 32 AliTRDPIDParams(const AliTRDPIDParams &);
ce487a7f 33 virtual ~AliTRDPIDParams();
34 virtual void Print(Option_t *) const;
35
bd58d4b9 36 void AddCentralityClass(Double_t minCentrality, Double_t maxCentrality);
37 Bool_t GetThresholdParameters(Int_t ntracklets, Double_t efficiency, Double_t *params, Double_t centrality = -1) const;
38 void SetThresholdParameters(Int_t ntracklets, Double_t effMin, Double_t effMax, Double_t *params, Double_t centrality = -1);
ce487a7f 39
40 private:
41 class AliTRDPIDThresholds : public TObject{
db0e2c5f 42 public:
bd58d4b9 43 AliTRDPIDThresholds();
44 AliTRDPIDThresholds(Int_t nTracklets, Double_t effMin, Double_t effMax, Double_t *params = NULL);
45 AliTRDPIDThresholds(Int_t nTracklets, Double_t eff, Double_t *params = NULL);
46 AliTRDPIDThresholds(const AliTRDPIDThresholds &);
47 AliTRDPIDThresholds &operator=(const AliTRDPIDThresholds &);
48 virtual ~AliTRDPIDThresholds() {}
db0e2c5f 49
bd58d4b9 50 Int_t GetNTracklets() const { return fNTracklets; }
51 Double_t GetElectronEfficiency(Int_t step = 0) const { if(step == 0) return fEfficiency[0]; else return fEfficiency[1]; }
52 const Double_t *GetThresholdParams() const { return fParams; }
ce487a7f 53
bd58d4b9 54 virtual Bool_t IsSortable() const { return kTRUE; }
55 virtual Int_t Compare(const TObject *ref) const;
56 virtual Bool_t IsEqual(const TObject *ref) const;
ce487a7f 57
db0e2c5f 58 private:
bd58d4b9 59 Int_t fNTracklets; //
60 Double_t fEfficiency[2]; //
61 Double_t fParams[4]; //
ce487a7f 62
bd58d4b9 63 ClassDef(AliTRDPIDThresholds, 1);
ce487a7f 64 };
65
bd58d4b9 66 class AliTRDPIDCentrality : public TObject{
67 public:
68 AliTRDPIDCentrality();
69 AliTRDPIDCentrality(Double_t minCentrality, Double_t maxCentrality);
70 AliTRDPIDCentrality(const AliTRDPIDCentrality &ref);
71 AliTRDPIDCentrality &operator=(const AliTRDPIDCentrality &ref);
72 virtual ~AliTRDPIDCentrality();
73
74 Double_t GetMinCentrality() const { return fMinCentrality; };
75 Double_t GetMaxCentrality() const { return fMaxCentrality; };
76
77 void SetThresholdParameters(Int_t ntracklets, Double_t effMin, Double_t effMax, Double_t *params);
78 Bool_t GetThresholdParameters(Int_t ntracklets, Double_t efficiency, Double_t *params) const;
79 void Print(Option_t *) const;
80 private:
81 TSortedList *fEntries; //
82 Double_t fMinCentrality; //
83 Double_t fMaxCentrality; //
84 ClassDef(AliTRDPIDCentrality, 1);
85 };
86
87 AliTRDPIDCentrality *FindCentrality(Double_t centrality) const;
db0e2c5f 88 AliTRDPIDParams &operator=(const AliTRDPIDParams &);
ce487a7f 89 static const Double_t kVerySmall;
bd58d4b9 90 TList *fEntries; //
ce487a7f 91
bd58d4b9 92 ClassDef(AliTRDPIDParams, 2);
ce487a7f 93};
94#endif
95
bd58d4b9 96