]>
Commit | Line | Data |
---|---|---|
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 | ||
21 | class AliESDEvent; | |
22 | class TH2F; | |
23 | class TH1F; | |
24 | class TCollection; | |
25 | class AliTriggerAnalysis; | |
26 | class AliAnalysisTaskSE; | |
27 | class AliESDtrackCuts; | |
28 | ||
29 | class AliAnalysisCentralitySelector : public AliAnalysisCuts | |
30 | { | |
31 | public: | |
32 | ||
5c808fa6 | 33 | AliAnalysisCentralitySelector() : AliAnalysisCuts("CentralityCuts", "Centrality Cuts"), fIsMC (0), fCentrEstimator(""), fCentrBin(-1), fMultMin(0), fMultMax(1000000), fUseMultRange(kFALSE), fUseV0CutRange(kFALSE), fUseSPDOuterRange(kFALSE), fUsePercentile(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);} | |
8797f8b6 | 40 | |
41 | Bool_t IsCentralityBinSelected(AliESDEvent* aEsd, AliESDtrackCuts * trackCuts); | |
e886738f | 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; } | |
5c808fa6 | 49 | void SetCentralityBin(Int_t bin) { fCentrBin = bin; } // uses 10% percentiles |
8797f8b6 | 50 | void SetCentralityBin(Float_t min, Float_t max) { fMultMin = min; fMultMax = max; fUsePercentile=kTRUE;}// maybe don't need this |
51 | // void SetPercentile(Bool_t flag = kTRUE){fUsePercentile = flag;} | |
e886738f | 52 | virtual void Print(Option_t* option = "") const ; |
53 | virtual Long64_t Merge(TCollection* list){list->GetEntries();return 0;} | |
54 | ||
55 | protected: | |
56 | Bool_t fIsMC; // flag if MC is analyzed | |
57 | TString fCentrEstimator; // Centrality estimator for AliCentrality | |
58 | Int_t fCentrBin; // centrality bin to be selected | |
59 | Float_t fMultMin ; // Minimum multiplicity, because on MC we cut on tracks rather than on the estimator . Also used for other estimators | |
60 | Float_t fMultMax ; // Maximum multiplicity, because on MC we cut on tracks rather than on the estimator . Also used for other estimators | |
61 | Bool_t fUseMultRange; // if true, use track bins rather than multiplicity estimator | |
62 | Bool_t fUseV0CutRange; // if true, use v0 range rather than multiplicity estimator | |
e886738f | 63 | Bool_t fUseSPDOuterRange; // if true, use SPD outer cluster range rather than multiplicity estimator |
5c808fa6 | 64 | Bool_t fUsePercentile; // if true, use the specified centrality percentile |
e886738f | 65 | |
65d683e2 | 66 | ClassDef(AliAnalysisCentralitySelector, 2) |
e886738f | 67 | |
68 | private: | |
69 | AliAnalysisCentralitySelector(const AliAnalysisCentralitySelector&); // not implemented | |
70 | AliAnalysisCentralitySelector& operator=(const AliAnalysisCentralitySelector&); // not implemented | |
71 | }; | |
72 | ||
73 | #endif |