]>
Commit | Line | Data |
---|---|---|
b63357a0 | 1 | // |
2 | // This cut definition works on mini-pairs for the 'mini' subpackage. | |
3 | // Since cuts on mini-pairs can usually be just kinematic selections | |
4 | // or kinematic comparisons between 4-momenta of daughters, they are all | |
5 | // implemented in this class, by the use of an enumeration which allows | |
6 | // the user to choose between all possibilities. | |
7 | // | |
8 | ||
9 | #include <Riostream.h> | |
10 | ||
11 | #include "AliRsnMiniPair.h" | |
12 | #include "AliRsnCutMiniPair.h" | |
13 | ||
14 | ClassImp(AliRsnCutMiniPair) | |
15 | ||
16 | //__________________________________________________________________________________________________ | |
17 | AliRsnCutMiniPair::AliRsnCutMiniPair(const char *name, EType type) : | |
18 | AliRsnCut(name, AliRsnTarget::kMother), | |
19 | fType(type) | |
20 | { | |
21 | // | |
22 | // Constructor | |
23 | // | |
24 | } | |
25 | ||
26 | //__________________________________________________________________________________________________ | |
27 | Bool_t AliRsnCutMiniPair::IsSelected(TObject *obj) | |
28 | { | |
29 | // | |
30 | // Global check | |
31 | // | |
32 | ||
61f275d1 | 33 | AliRsnMiniPair *pair = dynamic_cast<AliRsnMiniPair *>(obj); |
b63357a0 | 34 | if (!pair) { |
35 | AliError("This cut applies only to mini-pairs"); | |
36 | return kFALSE; | |
37 | } | |
61f275d1 | 38 | |
b63357a0 | 39 | switch (fType) { |
40 | case kRapidityRange: | |
41 | fCutValueD = pair->Y(0); | |
42 | return OkRangeD(); | |
43 | case kRapidityRangeMC: | |
44 | fCutValueD = pair->Y(1); | |
45 | return OkRangeD(); | |
46 | case kMomentumComparison: | |
47 | AliWarning("TODO: implement this"); | |
48 | return kTRUE; | |
49 | default: | |
50 | AliWarning("Undefined enum value"); | |
51 | return kTRUE; | |
52 | } | |
53 | } |