]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWG2/RESONANCES/AliRsnCutPID.h
Update to the analysis on MC data only.
[u/mrichter/AliRoot.git] / PWG2 / RESONANCES / AliRsnCutPID.h
CommitLineData
2dab9030 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
18class AliRsnDaughter;
19
20class AliRsnCutPID : public AliRsnCut
21{
22 public:
23
24 enum EDetector
25 {
26 kITS,
27 kTPC,
28 kTRD,
29 kTOF,
30 kHMPID,
31 kDetectors
32 };
33
34 AliRsnCutPID();
35 AliRsnCutPID(const char *name, AliPID::EParticleType pid, Double_t probMin = 0.0, Bool_t perfectPID = kFALSE);
36 virtual ~AliRsnCutPID() {;};
37
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;}
41
42 void IncludeDetector(EDetector det, Double_t threshold = 0., Bool_t goAbove = kTRUE);
43 void ExcludeDetector(EDetector det) {if (CheckBounds(det)) fUseDetector[det] = kFALSE;}
2e521c29 44
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;}
2dab9030 49
50 virtual Bool_t IsSelected(TObject *obj1, TObject *obj2 = 0x0);
51
52 protected:
53
54 Bool_t CheckBounds(EDetector det) const {return (det >= kITS && det < kDetectors);}
55 Bool_t CheckThreshold(EDetector det, Double_t value);
2dab9030 56
57 Double_t fPrior[AliPID::kSPECIES]; // prior probability
58 Double_t fWeight[AliPID::kSPECIES]; // PID weights used for combinations
59
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
65
66 ClassDef(AliRsnCutPID, 1)
67};
68
69#endif