2 // Class AliRsnCutRange
4 // General implementation of cuts which check a value inside a range.
5 // This range can be defined by two integers or two doubles.
6 // A user-friendly enumeration allows to define what is checked.
8 // authors: Martin Vala (martin.vala@cern.ch)
9 // Alberto Pulvirenti (alberto.pulvirenti@ct.infn.it)
12 #ifndef ALIRSNCUTPID_H
13 #define ALIRSNCUTPID_H
16 #include "AliRsnCut.h"
20 class AliRsnCutPID : public AliRsnCut
35 AliRsnCutPID(const char *name, AliPID::EParticleType pid, Double_t probMin = 0.0, Bool_t perfectPID = kFALSE);
36 virtual ~AliRsnCutPID() {;};
38 void SetDefault(Bool_t yn = kTRUE) {fUseDefault = yn;}
39 void SetPrior(Int_t i, Double_t value) {if (i >= 0 && i < AliPID::kSPECIES) fPrior[i] = value;}
40 void SetPerfect(Bool_t yn = kTRUE) {fPerfect = yn;}
42 void IncludeDetector(EDetector det, Double_t threshold = 0., Bool_t goAbove = kTRUE);
43 void ExcludeDetector(EDetector det) {if (CheckBounds(det)) fUseDetector[det] = kFALSE;}
45 Bool_t ComputeWeights(AliRsnDaughter *daughter);
46 Int_t RealisticPID(AliRsnDaughter * const daughter, Double_t &prob);
47 Int_t PerfectPID(AliRsnDaughter * const daughter);
48 Double_t GetWeight(Int_t i) {if (i>=0&&i<AliPID::kSPECIES) return fWeight[i]; return 0.0;}
50 virtual Bool_t IsSelected(TObject *object);
54 Bool_t CheckBounds(EDetector det) const {return (det >= kITS && det < kDetectors);}
55 Bool_t CheckThreshold(EDetector det, Double_t value);
57 Double_t fPrior[AliPID::kSPECIES]; // prior probability
58 Double_t fWeight[AliPID::kSPECIES]; // PID weights used for combinations
60 Bool_t fPerfect; // choice to use perfect PID
61 Bool_t fUseDefault; // choice to use default combined PID weights (or customized)
62 Bool_t fUseDetector[kDetectors]; // flag to include/exclude each single detector
63 Double_t fPtThreshold[kDetectors]; // pT threshold above/below which a detector is considered
64 Double_t fGoAboveThreshold[kDetectors]; // to choose if detector is used balow or above threshold
66 ClassDef(AliRsnCutPID, 1)