]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWGLF/RESONANCES/AliRsnCutPID.h
Added quantities for V0 daughters + modified cuts for V0 + modified cuts and train...
[u/mrichter/AliRoot.git] / PWGLF / RESONANCES / AliRsnCutPID.h
1 //
2 // Class AliRsnCutRange
3 //
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.
7 //
8 // authors: Martin Vala (martin.vala@cern.ch)
9 //          Alberto Pulvirenti (alberto.pulvirenti@ct.infn.it)
10 //
11
12 #ifndef ALIRSNCUTPID_H
13 #define ALIRSNCUTPID_H
14
15 #include "AliPID.h"
16 #include "AliRsnCut.h"
17
18 class AliRsnDaughter;
19
20 class AliRsnCutPID : public AliRsnCut {
21 public:
22
23    enum EDetector {
24       kITS,
25       kTPC,
26       kTRD,
27       kTOF,
28       kHMPID,
29       kDetectors
30    };
31
32    AliRsnCutPID();
33    AliRsnCutPID(const char *name, AliPID::EParticleType pid, Double_t probMin = 0.0, Bool_t perfectPID = kFALSE);
34    virtual ~AliRsnCutPID() {;};
35
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;}
39
40    void           IncludeDetector(EDetector det, Double_t threshold = 0., Bool_t goAbove = kTRUE);
41    void           ExcludeDetector(EDetector det) {if (CheckBounds(det)) fUseDetector[det] = kFALSE;}
42
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) const {if (i >= 0 && i < AliPID::kSPECIES) return fWeight[i]; return 0.0;}
47
48    virtual Bool_t IsSelected(TObject *object);
49
50 protected:
51
52    Bool_t   CheckBounds(EDetector det) const {return (det >= kITS && det < kDetectors);}
53    Bool_t   CheckThreshold(EDetector det, Double_t value) const;
54
55    Double_t              fPrior[AliPID::kSPECIES];        // prior probability
56    Double_t              fWeight[AliPID::kSPECIES];       // PID weights used for combinations
57
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
63
64    ClassDef(AliRsnCutPID, 1)
65 };
66
67 #endif