]>
Commit | Line | Data |
---|---|---|
d0282f3d | 1 | // |
2 | // Class AliRsnCutESDCutMultiplicity | |
3 | // | |
4 | // Cuts on event multiplicity computed from number o tracks passing | |
5 | // the ESDtrackCuts defined as data member. | |
6 | // | |
7 | // authors: Martin Vala (martin.vala@cern.ch) | |
8 | // Alberto Pulvirenti (alberto.pulvirenti@ct.infn.it) | |
9 | // | |
10 | ||
11 | #include "AliRsnEvent.h" | |
12 | #include "AliRsnCutESDCutMultiplicity.h" | |
13 | ||
14 | ClassImp(AliRsnCutESDCutMultiplicity) | |
15 | ||
16 | //_________________________________________________________________________________________________ | |
17 | AliRsnCutESDCutMultiplicity::AliRsnCutESDCutMultiplicity() : | |
18 | AliRsnCut(AliRsnCut::kEvent), | |
19 | fCuts() | |
20 | { | |
21 | // | |
22 | // Default constructor. | |
23 | // | |
24 | } | |
25 | ||
26 | //_________________________________________________________________________________________________ | |
27 | AliRsnCutESDCutMultiplicity::AliRsnCutESDCutMultiplicity | |
28 | (const char *name, Int_t min, Int_t max) : | |
29 | AliRsnCut(name, AliRsnCut::kEvent, min, max), | |
30 | fCuts() | |
31 | { | |
32 | // | |
33 | // Main constructor. | |
34 | // | |
35 | } | |
36 | ||
37 | //_________________________________________________________________________________________________ | |
38 | Bool_t AliRsnCutESDCutMultiplicity::IsSelected(TObject *obj1, TObject* /*obj2*/) | |
39 | { | |
40 | // | |
41 | // Cut checker. | |
42 | // | |
43 | ||
44 | // coherence check | |
45 | AliRsnEvent *event = dynamic_cast<AliRsnEvent*>(obj1); | |
46 | if (!event) return kFALSE; | |
47 | AliESDEvent *esd = event->GetRefESD(); | |
48 | if (!esd) return kFALSE; | |
49 | ||
50 | // count the tracks passing the cut | |
51 | fCutValueI = fCuts.CountAcceptedTracks(esd); | |
52 | return OkRangeI(); | |
53 | } |