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