0f08967b5eb794989fbd2d670c4b219fdc75a8cb
[u/mrichter/AliRoot.git] / STEER / STEERBase / AliCentrality.h
1 //-*- Mode: C++ -*-
2 #ifndef ALICentrality_H
3 #define ALICentrality_H
4 /* This file is property of and copyright by the ALICE HLT Project        *
5  * ALICE Experiment at CERN, All rights reserved.                         *
6  * See cxx source for full Copyright notice                               */
7
8 //*****************************************************
9 //   Class AliCentrality
10 //   author: Alberica Toia
11 //*****************************************************
12
13 #include "TNamed.h"
14
15 class AliCentrality : public TNamed
16 {
17  public:
18
19   AliCentrality();  /// constructor
20   ~AliCentrality();  /// destructor
21   AliCentrality(const AliCentrality& cnt); /// copy constructor
22   AliCentrality& operator=(const AliCentrality& cnt);   /// assignment operator
23
24   /// set centrality result
25   void SetQuality(Int_t quality) {fQuality = quality;} 
26   void SetCentralityV0M(Float_t cent) {fCentralityV0M = cent;} 
27   void SetCentralityV0A(Float_t cent) {fCentralityV0A = cent;} 
28   void SetCentralityV0C(Float_t cent) {fCentralityV0C = cent;} 
29   void SetCentralityFMD(Float_t cent) {fCentralityFMD = cent;}
30   void SetCentralityTRK(Float_t cent) {fCentralityTRK = cent;}
31   void SetCentralityTKL(Float_t cent) {fCentralityTKL = cent;}
32   void SetCentralityCL0(Float_t cent) {fCentralityCL0 = cent;}
33   void SetCentralityCL1(Float_t cent) {fCentralityCL1 = cent;}
34   void SetCentralityCND(Float_t cent) {fCentralityCND = cent;}
35   void SetCentralityZNA(Float_t cent) {fCentralityZNA = cent;}
36   void SetCentralityNPA(Float_t cent) {fCentralityNPA = cent;}
37   void SetCentralityV0MvsFMD(Float_t cent) {fCentralityV0MvsFMD = cent;}
38   void SetCentralityTKLvsV0M(Float_t cent) {fCentralityTKLvsV0M = cent;}
39   void SetCentralityZEMvsZDC(Float_t cent) {fCentralityZEMvsZDC = cent;}
40
41   void SetCentralityV0Mtrue(Float_t cent) {fCentralityV0Mtrue = cent;} 
42   void SetCentralityV0Atrue(Float_t cent) {fCentralityV0Atrue = cent;} 
43   void SetCentralityV0Ctrue(Float_t cent) {fCentralityV0Ctrue = cent;} 
44   void SetCentralityFMDtrue(Float_t cent) {fCentralityFMDtrue = cent;}
45   void SetCentralityTRKtrue(Float_t cent) {fCentralityTRKtrue = cent;}
46   void SetCentralityTKLtrue(Float_t cent) {fCentralityTKLtrue = cent;}
47   void SetCentralityCL0true(Float_t cent) {fCentralityCL0true = cent;}
48   void SetCentralityCL1true(Float_t cent) {fCentralityCL1true = cent;}
49   void SetCentralityCNDtrue(Float_t cent) {fCentralityCNDtrue = cent;}
50   void SetCentralityZNAtrue(Float_t cent) {fCentralityZNAtrue = cent;}
51
52   /// get centrality result
53   Float_t GetCentralityPercentile(const char *method) const;
54   Int_t   GetCentralityClass10(const char *method) const;
55   Int_t   GetCentralityClass5(const char *method) const;
56   Bool_t  IsEventInCentralityClass(Float_t a, Float_t b, const char *method) const;
57
58   Float_t GetCentralityPercentileUnchecked(const char *method) const;
59   Int_t   GetCentralityClass10Unchecked(const char *method) const;
60   Int_t   GetCentralityClass5Unchecked(const char *method) const;
61   Bool_t  IsEventInCentralityClassUnchecked(Float_t a, Float_t b, const char *method) const;
62
63   Int_t GetQuality() const;
64   void  Reset();
65
66  private:
67   Int_t   fQuality; // Quality of centrality determination
68   Float_t fCentralityV0M;   // Centrality from V0A+V0C
69   Float_t fCentralityV0A;   // Centrality from V0A
70   Float_t fCentralityV0C;   // Centrality from V0C
71   Float_t fCentralityFMD;   // Centrality from FMD
72   Float_t fCentralityTRK;   // Centrality from tracks
73   Float_t fCentralityTKL;   // Centrality from tracklets
74   Float_t fCentralityCL0;   // Centrality from Clusters in layer 0
75   Float_t fCentralityCL1;   // Centrality from Clusters in layer 1
76   Float_t fCentralityCND;   // Centrality from tracks (candle condition)
77   Float_t fCentralityZNA;   // Centrality from ZNA
78   Float_t fCentralityNPA;   // Centrality from Npart (MC)
79   Float_t fCentralityV0MvsFMD;   // Centrality from V0 vs FMD
80   Float_t fCentralityTKLvsV0M;   // Centrality from tracklets vs V0
81   Float_t fCentralityZEMvsZDC;   // Centrality from ZEM vs ZDC
82
83   Float_t fCentralityV0Mtrue;   // Centrality from true (sim) V0A+V0C
84   Float_t fCentralityV0Atrue;   // Centrality from true (sim) V0A
85   Float_t fCentralityV0Ctrue;   // Centrality from true (sim) V0C
86   Float_t fCentralityFMDtrue;   // Centrality from true (sim) FMD
87   Float_t fCentralityTRKtrue;   // Centrality from true (sim) tracks
88   Float_t fCentralityTKLtrue;   // Centrality from true (sim) tracklets
89   Float_t fCentralityCL0true;   // Centrality from true (sim) Clusters in layer 0
90   Float_t fCentralityCL1true;   // Centrality from true (sim) Clusters in layer 1
91   Float_t fCentralityCNDtrue;   // Centrality from true (sim) tracks (candle condition)
92   Float_t fCentralityZNAtrue;   // Centrality from true (sim) ZNA
93
94   ClassDef(AliCentrality, 6)
95 };
96 #endif //ALICENTRALITY_H