Removing deprecated linearization and MC rescaling (now part of the centrality framework)
[u/mrichter/AliRoot.git] / PWG2 / SPECTRA / LambdaK0PbPb / AliAnalysisCentralitySelector.h
CommitLineData
e886738f 1#ifndef ALIANALYSISCENTRALITYSELECTOR_H
2#define ALIANALYSISCENTRALITYSELECTOR_H
3
4/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5 * See cxx source for full Copyright notice */
6
7//-------------------------------------------------------------------------
8// AliAnalysisCentralitySelector
9//
10// This class selects collision candidates from data runs, applying selection cuts on triggers
11// and background rejection based on the content of the ESD
12//
13// Author: Michele Floris, CERN
14//-------------------------------------------------------------------------
15
16#include <AliAnalysisCuts.h>
17#include <AliLog.h>
18
19#define VERBOSE_STAT
20
21class AliESDEvent;
22class TH2F;
23class TH1F;
24class TCollection;
25class AliTriggerAnalysis;
26class AliAnalysisTaskSE;
27class AliESDtrackCuts;
28
29class AliAnalysisCentralitySelector : public AliAnalysisCuts
30{
31public:
32
65d683e2 33 AliAnalysisCentralitySelector() : fIsMC (0), fCentrEstimator(""), fCentrBin(-1), fMultMin(0), fMultMax(1000000), fUseMultRange(kFALSE), fUseV0CutRange(kFALSE), fUseSPDOuterRange(kFALSE) {;}
e886738f 34 virtual ~AliAnalysisCentralitySelector(){}
35
36 // AliAnalysisCuts interface
37 virtual UInt_t GetSelectionMask(const TObject* obj) { return (UInt_t) IsCentralityBinSelected((AliESDEvent*) obj, NULL); }
38 virtual Bool_t IsSelected(TList*) { AliFatal("Not implemented"); return kFALSE; }
39 virtual Bool_t IsSelected(TObject* obj) {return (UInt_t) IsCentralityBinSelected ( (AliESDEvent*) obj, NULL);}
40
41 Bool_t IsCentralityBinSelected(AliESDEvent* aEsd, AliESDtrackCuts * trackCuts);
42
43 void SetIsMC(Bool_t flag = kTRUE, Int_t multMin = 0, Int_t multMax=10000) { fIsMC = flag; fMultMin = multMin; fMultMax = multMax; }
44 void SetMultRange(Int_t multMin = 0, Int_t multMax=10000) { fMultMin = multMin; fMultMax = multMax; }
45 void SetUseMultRange(Bool_t flag = kTRUE) {fUseMultRange = flag;}
46 void SetUseV0Range(Bool_t flag = kTRUE) {fUseV0CutRange = flag;}
47 void SetUseSPDOuterRange(Bool_t flag = kTRUE) {fUseSPDOuterRange = flag;}
48 void SetCentralityEstimator(const char * estimator) { fCentrEstimator = estimator; }
49 void SetCentralityBin(Int_t bin) { fCentrBin = bin; }
50 virtual void Print(Option_t* option = "") const ;
51 virtual Long64_t Merge(TCollection* list){list->GetEntries();return 0;}
52
53protected:
54 Bool_t fIsMC; // flag if MC is analyzed
55 TString fCentrEstimator; // Centrality estimator for AliCentrality
56 Int_t fCentrBin; // centrality bin to be selected
57 Float_t fMultMin ; // Minimum multiplicity, because on MC we cut on tracks rather than on the estimator . Also used for other estimators
58 Float_t fMultMax ; // Maximum multiplicity, because on MC we cut on tracks rather than on the estimator . Also used for other estimators
59 Bool_t fUseMultRange; // if true, use track bins rather than multiplicity estimator
60 Bool_t fUseV0CutRange; // if true, use v0 range rather than multiplicity estimator
e886738f 61 Bool_t fUseSPDOuterRange; // if true, use SPD outer cluster range rather than multiplicity estimator
62
65d683e2 63 ClassDef(AliAnalysisCentralitySelector, 2)
e886738f 64
65 private:
66 AliAnalysisCentralitySelector(const AliAnalysisCentralitySelector&); // not implemented
67 AliAnalysisCentralitySelector& operator=(const AliAnalysisCentralitySelector&); // not implemented
68};
69
70#endif