173e9408eafce8f4b07b16c6a899dfb8f071399a
[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 SetCentralityV0A123(Float_t cent) {fCentralityV0A123 = cent;} 
29   void SetCentralityV0C(Float_t cent) {fCentralityV0C = cent;} 
30   void SetCentralityV0MEq(Float_t cent) {fCentralityV0MEq = cent;} 
31   void SetCentralityV0AEq(Float_t cent) {fCentralityV0AEq = cent;} 
32   void SetCentralityV0CEq(Float_t cent) {fCentralityV0CEq = cent;} 
33   void SetCentralityFMD(Float_t cent) {fCentralityFMD = cent;}
34   void SetCentralityTRK(Float_t cent) {fCentralityTRK = cent;}
35   void SetCentralityTKL(Float_t cent) {fCentralityTKL = cent;}
36   void SetCentralityCL0(Float_t cent) {fCentralityCL0 = cent;}
37   void SetCentralityCL1(Float_t cent) {fCentralityCL1 = cent;}
38   void SetCentralityCND(Float_t cent) {fCentralityCND = cent;}
39   void SetCentralityZNA(Float_t cent) {fCentralityZNA = cent;}
40   void SetCentralityZNC(Float_t cent) {fCentralityZNC = cent;}
41   void SetCentralityZPA(Float_t cent) {fCentralityZPA = cent;}
42   void SetCentralityZPC(Float_t cent) {fCentralityZPC = cent;}
43   void SetCentralityNPA(Float_t cent) {fCentralityNPA = cent;}
44   void SetCentralityV0MvsFMD(Float_t cent) {fCentralityV0MvsFMD = cent;}
45   void SetCentralityTKLvsV0M(Float_t cent) {fCentralityTKLvsV0M = cent;}
46   void SetCentralityZEMvsZDC(Float_t cent) {fCentralityZEMvsZDC = cent;}
47
48   void SetCentralityV0Mtrue(Float_t cent) {fCentralityV0Mtrue = cent;} 
49   void SetCentralityV0Atrue(Float_t cent) {fCentralityV0Atrue = cent;} 
50   void SetCentralityV0Ctrue(Float_t cent) {fCentralityV0Ctrue = cent;} 
51   void SetCentralityFMDtrue(Float_t cent) {fCentralityFMDtrue = cent;}
52   void SetCentralityTRKtrue(Float_t cent) {fCentralityTRKtrue = cent;}
53   void SetCentralityTKLtrue(Float_t cent) {fCentralityTKLtrue = cent;}
54   void SetCentralityCL0true(Float_t cent) {fCentralityCL0true = cent;}
55   void SetCentralityCL1true(Float_t cent) {fCentralityCL1true = cent;}
56   void SetCentralityCNDtrue(Float_t cent) {fCentralityCNDtrue = cent;}
57   void SetCentralityZNAtrue(Float_t cent) {fCentralityZNAtrue = cent;}
58   void SetCentralityZNCtrue(Float_t cent) {fCentralityZNCtrue = cent;}
59   void SetCentralityZPAtrue(Float_t cent) {fCentralityZPAtrue = cent;}
60   void SetCentralityZPCtrue(Float_t cent) {fCentralityZPCtrue = cent;}
61
62   /// get centrality result
63   Float_t GetCentralityPercentile(const char *method) const;
64   Int_t   GetCentralityClass10(const char *method) const;
65   Int_t   GetCentralityClass5(const char *method) const;
66   Bool_t  IsEventInCentralityClass(Float_t a, Float_t b, const char *method) const;
67
68   Float_t GetCentralityPercentileUnchecked(const char *method) const;
69   Int_t   GetCentralityClass10Unchecked(const char *method) const;
70   Int_t   GetCentralityClass5Unchecked(const char *method) const;
71   Bool_t  IsEventInCentralityClassUnchecked(Float_t a, Float_t b, const char *method) const;
72
73   Int_t GetQuality() const;
74   void  Reset();
75
76  private:
77   Int_t   fQuality; // Quality of centrality determination
78   Float_t fCentralityV0M;   // Centrality from V0A+V0C
79   Float_t fCentralityV0A;   // Centrality from V0A
80   Float_t fCentralityV0A123;// Centrality from V0A123
81   Float_t fCentralityV0C;   // Centrality from V0C
82   Float_t fCentralityV0MEq; // Centrality from V0A+V0C equalized channel
83   Float_t fCentralityV0AEq; // Centrality from V0A equalized channel
84   Float_t fCentralityV0CEq; // Centrality from V0C equalized channel
85   Float_t fCentralityFMD;   // Centrality from FMD
86   Float_t fCentralityTRK;   // Centrality from tracks
87   Float_t fCentralityTKL;   // Centrality from tracklets
88   Float_t fCentralityCL0;   // Centrality from Clusters in layer 0
89   Float_t fCentralityCL1;   // Centrality from Clusters in layer 1
90   Float_t fCentralityCND;   // Centrality from tracks (candle condition)
91   Float_t fCentralityZNA;   // Centrality from ZNA
92   Float_t fCentralityZNC;   // Centrality from ZNC
93   Float_t fCentralityZPA;   // Centrality from ZPA
94   Float_t fCentralityZPC;   // Centrality from ZPC
95   Float_t fCentralityNPA;   // Centrality from Npart (MC)
96   Float_t fCentralityV0MvsFMD;   // Centrality from V0 vs FMD
97   Float_t fCentralityTKLvsV0M;   // Centrality from tracklets vs V0
98   Float_t fCentralityZEMvsZDC;   // Centrality from ZEM vs ZDC
99
100   Float_t fCentralityV0Mtrue;   // Centrality from true (sim) V0A+V0C
101   Float_t fCentralityV0Atrue;   // Centrality from true (sim) V0A
102   Float_t fCentralityV0Ctrue;   // Centrality from true (sim) V0C
103   Float_t fCentralityV0MEqtrue; // Centrality from true (sim) V0A+V0C equalized channels
104   Float_t fCentralityV0AEqtrue; // Centrality from true (sim) V0A equalized channels
105   Float_t fCentralityV0CEqtrue; // Centrality from true (sim) V0C equalized channels
106   Float_t fCentralityFMDtrue;   // Centrality from true (sim) FMD
107   Float_t fCentralityTRKtrue;   // Centrality from true (sim) tracks
108   Float_t fCentralityTKLtrue;   // Centrality from true (sim) tracklets
109   Float_t fCentralityCL0true;   // Centrality from true (sim) Clusters in layer 0
110   Float_t fCentralityCL1true;   // Centrality from true (sim) Clusters in layer 1
111   Float_t fCentralityCNDtrue;   // Centrality from true (sim) tracks (candle condition)
112   Float_t fCentralityZNAtrue;   // Centrality from true (sim) ZNA
113   Float_t fCentralityZNCtrue;   // Centrality from true (sim) ZNC
114   Float_t fCentralityZPAtrue;   // Centrality from true (sim) ZNA
115   Float_t fCentralityZPCtrue;   // Centrality from true (sim) ZNC
116
117   ClassDef(AliCentrality, 9)
118 };
119 #endif //ALICENTRALITY_H