IO fixes for the new root release. Deleting the list posted at the task output now...
[u/mrichter/AliRoot.git] / PWG2 / RESONANCES / AliRsnCut.h
CommitLineData
06351446 1/**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
3 * See cxx source for full Copyright notice *
4 **************************************************************************/
5
6//=========================================================================
7// Class AliRsnCut
8//
9// General implementation of a single cut strategy, which can be:
10// - a value contained in a given interval [--> IsBetween()]
11// - a value equal to a given reference [--> IsEqual() ]
12// In all cases, the reference value(s) is (are) given as data members
13// and each kind of cut requires a given value type (Int, UInt, Double),
14// but the cut check procedure is then automatized and chosen thanks to
15// an enumeration of the implemented cut types.
16// At the end, the user (or any other point which uses this object) has
17// to use the method IsSelected() to check if this cut has been passed.
18//
19// authors: Martin Vala (martin.vala@cern.ch)
20// Alberto Pulvirenti (alberto.pulvirenti@ct.infn.it)
21//=========================================================================
22
23#ifndef ALIRSNCUT_H
24#define ALIRSNCUT_H
25
26#include "TNamed.h"
27
28class AliRsnDaughter;
29class AliRsnPairParticle;
30class AliRsnPairDef;
31
32class AliRsnCut : public TNamed
33{
34public:
35 enum ERsnCutType
36 {
37 kMomentum = 0,
38 kTransMomentum,
39 kEta,
40 kRadialImpactParam,
41 kMomentumMC,
42 kTransMomentumMC,
43 kEtaMC,
44 kRestMomentum,
45 kNSigma,
46 kNSigmaCalculate,
47 kStatus,
48 kIsPdgEqual,
49 kIsLabelEqual,
50 kIsTruePair,
51 kChargePos,
52 kChargeNeg,
53 kPIDType,
54 kLastCutType
55 };
56
57 enum ERsnCutVarType
58 {
59 kDouble_t = 0,
60 kInt_t,
61 kUInt_t
62 };
63
64 enum ECutSetType
65 {
66 kParticle = 0,
67 kPair,
68 kMixEventFinderCut,
69 kLastCutSetIndex
70 };
71
72 AliRsnCut();
73 AliRsnCut (const char *name, const char *title, ERsnCutType type);
74 AliRsnCut (const char *name, const char *title, ERsnCutType type, Double_t min, Double_t max = 1e-100);
75 AliRsnCut (const char *name, const char *title, ERsnCutType type, Int_t min, Int_t max = 32767);
76 AliRsnCut (const char *name, const char *title, ERsnCutType type, UInt_t min, UInt_t max = 65534);
77
78 ~AliRsnCut();
79
80 void SetCutValues (ERsnCutType type, const Double_t& theValue, const Double_t& theValue2);
81 void SetCutValues (ERsnCutType type, const Int_t& theValue, const Int_t& theValue2);
82 void SetCutValues (ERsnCutType type, const UInt_t& theValue, const UInt_t& theValue2);
83
84 Bool_t IsSelected (ECutSetType type, AliRsnDaughter *daughter);
85 Bool_t IsSelected (ECutSetType type, AliRsnPairParticle *pair);
86
87 void PrintAllValues();
88
89 Bool_t IsBetween (const Double_t &theValue);
90 Bool_t IsEqual (const Int_t &theValue);
91 Bool_t IsEqual (const UInt_t &theValue);
92 Bool_t IsEqual (const Double_t &theValue);
93
94private:
95
96 Bool_t CheckRestMomentum(AliRsnPairParticle *pair);
97
98 Double_t fDMin; // min. double value
99 Double_t fDMax; // max. double value
100 Int_t fIMin; // min. int value
101 Int_t fIMax; // max. int value
102 UInt_t fUIMin; // min. uint value
103 UInt_t fUIMax; // max. uint value
104
105 ERsnCutType fRsnCutType; // cut type
106 ERsnCutVarType fRsnCutVarType; // variable type
107
108 static const Double_t fgkDSmallNumber; // small double value
109 static const Double_t fgkDBigNumber; // big double value
110 static const Int_t fgkIBigNumber; // big int value
111
112 ClassDef (AliRsnCut, 1)
113};
114
115#endif