ROOT logo
/**************************************************************************
 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
 *                                                                        *
 * Author: The ALICE Off-line Project.                                    *
 * Contributors are mentioned in the code where appropriate.              *
 *                                                                        *
 * Permission to use, copy, modify and distribute this software and its   *
 * documentation strictly for non-commercial purposes is hereby granted   *
 * without fee, provided that the above copyright notice appears in all   *
 * copies and that both the copyright notice and this permission notice   *
 * appear in the supporting documentation. The authors make no claims     *
 * about the suitability of this software for any purpose. It is          *
 * provided "as is" without express or implied warranty.                  *
 **************************************************************************/

/* $Id$ */ 

// AliFlowEventSimpleCuts:
// An event cut class for the flow framework
//
// origin: Mikolaj Krzewicki (mikolaj.krzewicki@cern.ch)

#include "AliFlowEventSimpleCuts.h"
#include "AliFlowEventSimple.h"

ClassImp(AliFlowEventSimpleCuts)

//-----------------------------------------------------------------------
AliFlowEventSimpleCuts::AliFlowEventSimpleCuts():
  TNamed(),
  fCutCentralityPercentile(kFALSE),
  fCentralityPercentileMax(100.),
  fCentralityPercentileMin(0.)
{
  //constructor 
}

//-----------------------------------------------------------------------
AliFlowEventSimpleCuts::AliFlowEventSimpleCuts(const char* name, const char* title):
  TNamed(name, title),
  fCutCentralityPercentile(kFALSE),
  fCentralityPercentileMax(100.),
  fCentralityPercentileMin(0.)
{
  //constructor 
}

////-----------------------------------------------------------------------
AliFlowEventSimpleCuts::AliFlowEventSimpleCuts(const AliFlowEventSimpleCuts& that):
  TNamed(that),
  fCutCentralityPercentile(that.fCutCentralityPercentile),
  fCentralityPercentileMax(that.fCentralityPercentileMax),
  fCentralityPercentileMin(that.fCentralityPercentileMin)
{
  //copy ctor
}

////-----------------------------------------------------------------------
AliFlowEventSimpleCuts::~AliFlowEventSimpleCuts()
{
  //dtor
}

////-----------------------------------------------------------------------
AliFlowEventSimpleCuts& AliFlowEventSimpleCuts::operator=(const AliFlowEventSimpleCuts& that)
{
  //assignment
  if (this==&that) return *this;

  fCutCentralityPercentile=that.fCutCentralityPercentile;
  fCentralityPercentileMax=that.fCentralityPercentileMax;
  fCentralityPercentileMin=that.fCentralityPercentileMin;
  return *this;
}

//----------------------------------------------------------------------- 
Bool_t AliFlowEventSimpleCuts::IsSelected(TObject* obj, TObject* /*mcobj*/)
{
  //check cuts
  AliFlowEventSimple* event = dynamic_cast<AliFlowEventSimple*>(obj);
  if (!event) return kFALSE;  //when passed wrong type of object
  Double_t centrality = event->GetCentrality();
  if (centrality>=fCentralityPercentileMin && centrality<fCentralityPercentileMax)
    return kTRUE;
  return kFALSE;
}
 AliFlowEventSimpleCuts.cxx:1
 AliFlowEventSimpleCuts.cxx:2
 AliFlowEventSimpleCuts.cxx:3
 AliFlowEventSimpleCuts.cxx:4
 AliFlowEventSimpleCuts.cxx:5
 AliFlowEventSimpleCuts.cxx:6
 AliFlowEventSimpleCuts.cxx:7
 AliFlowEventSimpleCuts.cxx:8
 AliFlowEventSimpleCuts.cxx:9
 AliFlowEventSimpleCuts.cxx:10
 AliFlowEventSimpleCuts.cxx:11
 AliFlowEventSimpleCuts.cxx:12
 AliFlowEventSimpleCuts.cxx:13
 AliFlowEventSimpleCuts.cxx:14
 AliFlowEventSimpleCuts.cxx:15
 AliFlowEventSimpleCuts.cxx:16
 AliFlowEventSimpleCuts.cxx:17
 AliFlowEventSimpleCuts.cxx:18
 AliFlowEventSimpleCuts.cxx:19
 AliFlowEventSimpleCuts.cxx:20
 AliFlowEventSimpleCuts.cxx:21
 AliFlowEventSimpleCuts.cxx:22
 AliFlowEventSimpleCuts.cxx:23
 AliFlowEventSimpleCuts.cxx:24
 AliFlowEventSimpleCuts.cxx:25
 AliFlowEventSimpleCuts.cxx:26
 AliFlowEventSimpleCuts.cxx:27
 AliFlowEventSimpleCuts.cxx:28
 AliFlowEventSimpleCuts.cxx:29
 AliFlowEventSimpleCuts.cxx:30
 AliFlowEventSimpleCuts.cxx:31
 AliFlowEventSimpleCuts.cxx:32
 AliFlowEventSimpleCuts.cxx:33
 AliFlowEventSimpleCuts.cxx:34
 AliFlowEventSimpleCuts.cxx:35
 AliFlowEventSimpleCuts.cxx:36
 AliFlowEventSimpleCuts.cxx:37
 AliFlowEventSimpleCuts.cxx:38
 AliFlowEventSimpleCuts.cxx:39
 AliFlowEventSimpleCuts.cxx:40
 AliFlowEventSimpleCuts.cxx:41
 AliFlowEventSimpleCuts.cxx:42
 AliFlowEventSimpleCuts.cxx:43
 AliFlowEventSimpleCuts.cxx:44
 AliFlowEventSimpleCuts.cxx:45
 AliFlowEventSimpleCuts.cxx:46
 AliFlowEventSimpleCuts.cxx:47
 AliFlowEventSimpleCuts.cxx:48
 AliFlowEventSimpleCuts.cxx:49
 AliFlowEventSimpleCuts.cxx:50
 AliFlowEventSimpleCuts.cxx:51
 AliFlowEventSimpleCuts.cxx:52
 AliFlowEventSimpleCuts.cxx:53
 AliFlowEventSimpleCuts.cxx:54
 AliFlowEventSimpleCuts.cxx:55
 AliFlowEventSimpleCuts.cxx:56
 AliFlowEventSimpleCuts.cxx:57
 AliFlowEventSimpleCuts.cxx:58
 AliFlowEventSimpleCuts.cxx:59
 AliFlowEventSimpleCuts.cxx:60
 AliFlowEventSimpleCuts.cxx:61
 AliFlowEventSimpleCuts.cxx:62
 AliFlowEventSimpleCuts.cxx:63
 AliFlowEventSimpleCuts.cxx:64
 AliFlowEventSimpleCuts.cxx:65
 AliFlowEventSimpleCuts.cxx:66
 AliFlowEventSimpleCuts.cxx:67
 AliFlowEventSimpleCuts.cxx:68
 AliFlowEventSimpleCuts.cxx:69
 AliFlowEventSimpleCuts.cxx:70
 AliFlowEventSimpleCuts.cxx:71
 AliFlowEventSimpleCuts.cxx:72
 AliFlowEventSimpleCuts.cxx:73
 AliFlowEventSimpleCuts.cxx:74
 AliFlowEventSimpleCuts.cxx:75
 AliFlowEventSimpleCuts.cxx:76
 AliFlowEventSimpleCuts.cxx:77
 AliFlowEventSimpleCuts.cxx:78
 AliFlowEventSimpleCuts.cxx:79
 AliFlowEventSimpleCuts.cxx:80
 AliFlowEventSimpleCuts.cxx:81
 AliFlowEventSimpleCuts.cxx:82
 AliFlowEventSimpleCuts.cxx:83
 AliFlowEventSimpleCuts.cxx:84
 AliFlowEventSimpleCuts.cxx:85
 AliFlowEventSimpleCuts.cxx:86