]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWG2/RESONANCES/AliRsnCutPID.h
Major upgrade to the package, in order to speed-up the execution and remove some...
[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;}
44
45 virtual Bool_t IsSelected(TObject *obj1, TObject *obj2 = 0x0);
46
47 protected:
48
49 Bool_t CheckBounds(EDetector det) const {return (det >= kITS && det < kDetectors);}
50 Bool_t CheckThreshold(EDetector det, Double_t value);
51 Bool_t ComputeWeights(AliRsnDaughter *daughter);
52
53 Double_t fPrior[AliPID::kSPECIES]; // prior probability
54 Double_t fWeight[AliPID::kSPECIES]; // PID weights used for combinations
55
56 Bool_t fPerfect; // choice to use perfect PID
57 Bool_t fUseDefault; // choice to use default combined PID weights (or customized)
58 Bool_t fUseDetector[kDetectors]; // flag to include/exclude each single detector
59 Double_t fPtThreshold[kDetectors]; // pT threshold above/below which a detector is considered
60 Double_t fGoAboveThreshold[kDetectors]; // to choose if detector is used balow or above threshold
61
62 ClassDef(AliRsnCutPID, 1)
63};
64
65#endif