]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWG2/RESONANCES/AliRsnCutTrackQuality.h
Improved functionality of AliRsnDaughterDef::MatchesDaughter()
[u/mrichter/AliRoot.git] / PWG2 / RESONANCES / AliRsnCutTrackQuality.h
CommitLineData
35e49ca5 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 ALIRSNCUTTRACKQUALITY_H
13#define ALIRSNCUTTRACKQUALITY_H
14
15#include <TMath.h>
16#include <TString.h>
17
18#include "AliRsnCut.h"
19
20class AliESDtrack;
21class AliAODTrack;
22
2a1c7696 23class AliRsnCutTrackQuality : public AliRsnCut {
24public:
25
26 AliRsnCutTrackQuality(const char *name = "AliRsncutTrackQuality");
27 AliRsnCutTrackQuality(const AliRsnCutTrackQuality& copy);
28 AliRsnCutTrackQuality& operator=(const AliRsnCutTrackQuality& copy);
29 virtual ~AliRsnCutTrackQuality() { }
30
31 void DisableAll();
32
33 void AddStatusFlag(ULong_t f, Bool_t on) {if (on) fFlagsOn = fFlagsOn | f; else fFlagsOff = fFlagsOff | f;}
34 void SetStatusFlags(ULong_t f, Bool_t on) {if (on) fFlagsOn = f; else fFlagsOff = f;}
35 void SetPtRange(Double_t a, Double_t b) {fPt[0] = TMath::Min(a, b); fPt[1] = TMath::Max(a, b);}
36 void SetEtaRange(Double_t a, Double_t b) {fEta[0] = TMath::Min(a, b); fEta[1] = TMath::Max(a, b);}
37
38 void SetDCARPtFormula(const char *formula) {fDCARptFormula = formula; fDCARfixed = kFALSE;}
39 void SetDCARmax(Double_t value) {fDCARmax = value; fDCARptFormula = ""; fDCARfixed = kTRUE;}
40 void SetDCAZPtFormula(const char *formula) {fDCAZptFormula = formula; fDCAZfixed = kFALSE;}
41 void SetDCAZmax(Double_t value) {fDCAZmax = value; fDCAZptFormula = ""; fDCAZfixed = kTRUE;}
42
43 void SetSPDminNClusters(Int_t value) {fSPDminNClusters = value;}
44 void SetITSminNClusters(Int_t value) {fITSminNClusters = value;}
45 void SetITSmaxChi2(Double_t value) {fITSmaxChi2 = value;}
46
47 void SetTPCminNClusters(Int_t value) {fTPCminNClusters = value;}
48 void SetTPCmaxChi2(Double_t value) {fTPCmaxChi2 = value;}
49
50 void SetRejectKinkDaughters(Bool_t yn = kTRUE) {fRejectKinkDaughters = yn;}
51
52 virtual Bool_t IsSelected(TObject *obj);
53 virtual void Print(const Option_t *option = "") const;
54
55protected:
56
57 Bool_t CheckESD(AliESDtrack *track);
58 Bool_t CheckAOD(AliAODTrack *track);
59
60 ULong_t fFlagsOn; // status flags which must be ON (used AliESDtrack ones, connected with '|')
61 ULong_t fFlagsOff; // status flags which must be OFF (used AliESDtrack ones, connected with '|')
62 Double_t fPt[2]; // pt range
63 Double_t fEta[2]; // eta range
64 Bool_t fRejectKinkDaughters; // switch to kTRUE if daughters of kinks must be rejected
65
66 Bool_t fDCARfixed; // flag to switch between fixed and pt-dependent DCA cut
67 TString fDCARptFormula; // expression to compute transverse DCA sigma w.r. to pt
68 Double_t fDCARmax; // maximum value for transverse DCA
69
70 Bool_t fDCAZfixed; // flag to switch between fixed and pt-dependent DCA cut
71 TString fDCAZptFormula; // expression to compute longitudinal DCA sigma w.r. to pt
72 Double_t fDCAZmax; // maximum value for longitudinal DCA
73
74 Int_t fSPDminNClusters; // minimum number of required clusters in SPD
75 Int_t fITSminNClusters; // minimum number of required clusters in ITS
76 Double_t fITSmaxChi2; // maximum chi2 / number of clusters in ITS
77
78 Int_t fTPCminNClusters; // minimum number of required clusters in TPC
79 Double_t fTPCmaxChi2; // maximum chi2 / number of clusters in TPC
80
81 ClassDef(AliRsnCutTrackQuality, 1)
35e49ca5 82};
83
84#endif