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 {
33 AliRsnCutPID(const char *name, AliPID::EParticleType pid, Double_t probMin = 0.0, Bool_t perfectPID = kFALSE);
34 virtual ~AliRsnCutPID() {;};
36 void SetDefault(Bool_t yn = kTRUE) {fUseDefault = yn;}
37 void SetPrior(Int_t i, Double_t value) {if (i >= 0 && i < AliPID::kSPECIES) fPrior[i] = value;}
38 void SetPerfect(Bool_t yn = kTRUE) {fPerfect = yn;}
40 void IncludeDetector(EDetector det, Double_t threshold = 0., Bool_t goAbove = kTRUE);
41 void ExcludeDetector(EDetector det) {if (CheckBounds(det)) fUseDetector[det] = kFALSE;}
43 Bool_t ComputeWeights(AliRsnDaughter *daughter);
44 Int_t RealisticPID(AliRsnDaughter * const daughter, Double_t &prob);
45 Int_t PerfectPID(AliRsnDaughter * const daughter);
46 Double_t GetWeight(Int_t i) {if (i >= 0 && i < AliPID::kSPECIES) return fWeight[i]; return 0.0;}
48 virtual Bool_t IsSelected(TObject *object);
52 Bool_t CheckBounds(EDetector det) const {return (det >= kITS && det < kDetectors);}
53 Bool_t CheckThreshold(EDetector det, Double_t value);
55 Double_t fPrior[AliPID::kSPECIES]; // prior probability
56 Double_t fWeight[AliPID::kSPECIES]; // PID weights used for combinations
58 Bool_t fPerfect; // choice to use perfect PID
59 Bool_t fUseDefault; // choice to use default combined PID weights (or customized)
60 Bool_t fUseDetector[kDetectors]; // flag to include/exclude each single detector
61 Double_t fPtThreshold[kDetectors]; // pT threshold above/below which a detector is considered
62 Double_t fGoAboveThreshold[kDetectors]; // to choose if detector is used balow or above threshold
64 ClassDef(AliRsnCutPID, 1)