#ifndef ALITRDPIDPARAMS_H
#define ALITRDPIDPARAMS_H
#ifndef ROOT_TNamed
#include <TNamed.h>
#endif
class TList;
class TSortedList;
class AliTRDPIDParams : public TNamed{
public:
AliTRDPIDParams();
AliTRDPIDParams(const char *name);
AliTRDPIDParams(const AliTRDPIDParams &);
virtual ~AliTRDPIDParams();
virtual void Print(Option_t *) const;
void AddCentralityClass(Double_t minCentrality, Double_t maxCentrality);
Bool_t GetThresholdParameters(Int_t ntracklets, Double_t efficiency, Double_t *params, Double_t centrality = -1) const;
void SetThresholdParameters(Int_t ntracklets, Double_t effMin, Double_t effMax, Double_t *params, Double_t centrality = -1);
class AliTRDPIDThresholds : public TObject{
public:
AliTRDPIDThresholds();
AliTRDPIDThresholds(Int_t nTracklets, Double_t effMin, Double_t effMax, Double_t *params = NULL);
AliTRDPIDThresholds(Int_t nTracklets, Double_t eff, Double_t *params = NULL);
AliTRDPIDThresholds(const AliTRDPIDThresholds &);
AliTRDPIDThresholds &operator=(const AliTRDPIDThresholds &);
virtual ~AliTRDPIDThresholds() {}
Int_t GetNTracklets() const { return fNTracklets; }
Double_t GetElectronEfficiency(Int_t step = 0) const { if(step == 0) return fEfficiency[0]; else return fEfficiency[1]; }
const Double_t *GetThresholdParams() const { return fParams; }
virtual Bool_t IsSortable() const { return kTRUE; }
virtual Int_t Compare(const TObject *ref) const;
virtual Bool_t IsEqual(const TObject *ref) const;
private:
Int_t fNTracklets;
Double_t fEfficiency[2];
Double_t fParams[4];
ClassDef(AliTRDPIDThresholds, 1);
};
class AliTRDPIDCentrality : public TObject{
public:
AliTRDPIDCentrality();
AliTRDPIDCentrality(Double_t minCentrality, Double_t maxCentrality);
AliTRDPIDCentrality(const AliTRDPIDCentrality &ref);
AliTRDPIDCentrality &operator=(const AliTRDPIDCentrality &ref);
virtual ~AliTRDPIDCentrality();
Double_t GetMinCentrality() const { return fMinCentrality; };
Double_t GetMaxCentrality() const { return fMaxCentrality; };
void SetThresholdParameters(Int_t ntracklets, Double_t effMin, Double_t effMax, Double_t *params);
Bool_t GetThresholdParameters(Int_t ntracklets, Double_t efficiency, Double_t *params) const;
void Print(Option_t *) const;
private:
TSortedList *fEntries;
Double_t fMinCentrality;
Double_t fMaxCentrality;
ClassDef(AliTRDPIDCentrality, 1);
};
private:
AliTRDPIDCentrality *FindCentrality(Double_t centrality) const;
AliTRDPIDParams &operator=(const AliTRDPIDParams &);
static const Double_t kVerySmall;
TList *fEntries;
ClassDef(AliTRDPIDParams, 2);
};
#endif