]>
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(); | |
669ee453 | 46 | case kRapidityFiducialRegion: |
47 | fCutValueD = pair->Y(0); | |
48 | fRefPtValueD = pair->Pt(0); | |
49 | return OkRangeD(); | |
50 | case kRapidityFiducialRegionMC: | |
51 | fCutValueD = pair->Y(1); | |
52 | fRefPtValueD = pair->Pt(1); | |
53 | return OkRangeD(); | |
b63357a0 | 54 | case kMomentumComparison: |
55 | AliWarning("TODO: implement this"); | |
56 | return kTRUE; | |
213adb92 | 57 | case kDCAproduct: |
58 | fCutValueD = pair->DCAProduct(); | |
59 | return OkRangeD(); | |
b63357a0 | 60 | default: |
61 | AliWarning("Undefined enum value"); | |
62 | return kTRUE; | |
63 | } | |
64 | } |