1 /**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
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 **************************************************************************/
18 // AliFlowEventSimpleCuts:
19 // An event cut class for the flow framework
21 // origin: Mikolaj Krzewicki (mikolaj.krzewicki@cern.ch)
23 #include "AliFlowEventSimpleCuts.h"
24 #include "AliFlowEventSimple.h"
26 ClassImp(AliFlowEventSimpleCuts)
28 //-----------------------------------------------------------------------
29 AliFlowEventSimpleCuts::AliFlowEventSimpleCuts():
31 fCutCentralityPercentile(kFALSE),
32 fCentralityPercentileMax(100.),
33 fCentralityPercentileMin(0.)
38 //-----------------------------------------------------------------------
39 AliFlowEventSimpleCuts::AliFlowEventSimpleCuts(const char* name, const char* title):
41 fCutCentralityPercentile(kFALSE),
42 fCentralityPercentileMax(100.),
43 fCentralityPercentileMin(0.)
48 ////-----------------------------------------------------------------------
49 AliFlowEventSimpleCuts::AliFlowEventSimpleCuts(const AliFlowEventSimpleCuts& that):
51 fCutCentralityPercentile(that.fCutCentralityPercentile),
52 fCentralityPercentileMax(that.fCentralityPercentileMax),
53 fCentralityPercentileMin(that.fCentralityPercentileMin)
58 ////-----------------------------------------------------------------------
59 AliFlowEventSimpleCuts::~AliFlowEventSimpleCuts()
64 ////-----------------------------------------------------------------------
65 AliFlowEventSimpleCuts& AliFlowEventSimpleCuts::operator=(const AliFlowEventSimpleCuts& that)
68 if (this==&that) return *this;
70 fCutCentralityPercentile=that.fCutCentralityPercentile;
71 fCentralityPercentileMax=that.fCentralityPercentileMax;
72 fCentralityPercentileMin=that.fCentralityPercentileMin;
76 //-----------------------------------------------------------------------
77 Bool_t AliFlowEventSimpleCuts::IsSelected(TObject* obj, TObject* /*mcobj*/)
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)