]>
Commit | Line | Data |
---|---|---|
8fa6a5fa MK |
1 | /************************************************************************** |
2 | * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * | |
3 | * * | |
4 | * Author: The ALICE Off-line Project. * | |
5 | * Contributors are mentioned in the code where appropriate. * | |
6 | * * | |
7 | * Permission to use, copy, modify and distribute this software and its * | |
8 | * documentation strictly for non-commercial purposes is hereby granted * | |
9 | * without fee, provided that the above copyright notice appears in all * | |
10 | * copies and that both the copyright notice and this permission notice * | |
11 | * appear in the supporting documentation. The authors make no claims * | |
12 | * about the suitability of this software for any purpose. It is * | |
13 | * provided "as is" without express or implied warranty. * | |
14 | **************************************************************************/ | |
15 | ||
16 | /* $Id$ */ | |
17 | ||
18 | // AliFlowEventSimpleCuts: | |
19 | // An event cut class for the flow framework | |
20 | // | |
21 | // origin: Mikolaj Krzewicki (mikolaj.krzewicki@cern.ch) | |
22 | ||
23 | #include "AliFlowEventSimpleCuts.h" | |
24 | #include "AliFlowEventSimple.h" | |
25 | ||
26 | ClassImp(AliFlowEventSimpleCuts) | |
27 | ||
28 | //----------------------------------------------------------------------- | |
29 | AliFlowEventSimpleCuts::AliFlowEventSimpleCuts(): | |
30 | TNamed(), | |
31 | fCutCentralityPercentile(kFALSE), | |
32 | fCentralityPercentileMax(100.), | |
33 | fCentralityPercentileMin(0.) | |
34 | { | |
35 | //constructor | |
36 | } | |
37 | ||
38 | //----------------------------------------------------------------------- | |
39 | AliFlowEventSimpleCuts::AliFlowEventSimpleCuts(const char* name, const char* title): | |
40 | TNamed(name, title), | |
41 | fCutCentralityPercentile(kFALSE), | |
42 | fCentralityPercentileMax(100.), | |
43 | fCentralityPercentileMin(0.) | |
44 | { | |
45 | //constructor | |
46 | } | |
47 | ||
48 | ////----------------------------------------------------------------------- | |
49 | AliFlowEventSimpleCuts::AliFlowEventSimpleCuts(const AliFlowEventSimpleCuts& that): | |
50 | TNamed(that), | |
51 | fCutCentralityPercentile(that.fCutCentralityPercentile), | |
52 | fCentralityPercentileMax(that.fCentralityPercentileMax), | |
53 | fCentralityPercentileMin(that.fCentralityPercentileMin) | |
54 | { | |
55 | //copy ctor | |
56 | } | |
57 | ||
58 | ////----------------------------------------------------------------------- | |
59 | AliFlowEventSimpleCuts::~AliFlowEventSimpleCuts() | |
60 | { | |
61 | //dtor | |
62 | } | |
63 | ||
64 | ////----------------------------------------------------------------------- | |
65 | AliFlowEventSimpleCuts& AliFlowEventSimpleCuts::operator=(const AliFlowEventSimpleCuts& that) | |
66 | { | |
67 | //assignment | |
68 | if (this==&that) return *this; | |
69 | ||
70 | fCutCentralityPercentile=that.fCutCentralityPercentile; | |
71 | fCentralityPercentileMax=that.fCentralityPercentileMax; | |
72 | fCentralityPercentileMin=that.fCentralityPercentileMin; | |
73 | return *this; | |
74 | } | |
75 | ||
76 | //----------------------------------------------------------------------- | |
77 | Bool_t AliFlowEventSimpleCuts::IsSelected(TObject* obj, TObject* /*mcobj*/) | |
78 | { | |
79 | //check cuts | |
80 | AliFlowEventSimple* event = dynamic_cast<AliFlowEventSimple*>(obj); | |
81 | if (!event) return kFALSE; //when passed wrong type of object | |
82 | Double_t centrality = event->GetCentrality(); | |
83 | if (centrality>=fCentralityPercentileMin && centrality<fCentralityPercentileMax) | |
84 | return kTRUE; | |
85 | return kFALSE; | |
86 | } |