remove option C for Clear for trigger array for the moment, causes malloc error
[u/mrichter/AliRoot.git] / PWG2 / RESONANCES / AliRsnCutESDCutMultiplicity.cxx
... / ...
CommitLineData
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
14ClassImp(AliRsnCutESDCutMultiplicity)
15
16//_________________________________________________________________________________________________
17AliRsnCutESDCutMultiplicity::AliRsnCutESDCutMultiplicity() :
18 AliRsnCut(AliRsnCut::kEvent),
19 fCuts()
20{
21//
22// Default constructor.
23//
24}
25
26//_________________________________________________________________________________________________
27AliRsnCutESDCutMultiplicity::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//_________________________________________________________________________________________________
38Bool_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}