]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWGLF/SPECTRA/Nuclei/B2/macros/MeanNtrk.C
move MeanNtrk to an external macro to be reused
[u/mrichter/AliRoot.git] / PWGLF / SPECTRA / Nuclei / B2 / macros / MeanNtrk.C
1 /**************************************************************************
2  * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
3  *                                                                        *
4  * Author: The ALICE Off-line Project.                                    *
5  * Contributors are mentioned in the code where appropriate.              *
6  *                                                                        *
7  * Permission to use, copy, modify and distribute this software and its   *
8  * documentation strictly for non-commercial purposes is hereby granted   *
9  * without fee, provided that the above copyright notice appears in all   *
10  * copies and that both the copyright notice and this permission notice   *
11  * appear in the supporting documentation. The authors make no claims     *
12  * about the suitability of this software for any purpose. It is          *
13  * provided "as is" without express or implied warranty.                  *
14  **************************************************************************/
15
16 // average track multiplicity
17 // author: Eulogio Serradilla <eulogio.serradilla@cern.ch>
18
19 #if !defined(__CINT__) || defined(__MAKECINT__)
20 #include <Riostream.h>
21 #include <TString.h>
22 #endif
23
24 Double_t GetMeanNtrk08(const TString& period);
25 Double_t GetMeanNtrk05(const TString& period);
26 Double_t GetV0ANDMeanNtrk08(const TString& period);
27 Double_t GetV0ANDMeanNtrk05(const TString& period);
28
29 Double_t MeanNtrk(const TString& period, Double_t eta, Bool_t v0and)
30 {
31 //
32 // average track multiplicity for the given period and speudorapidity
33 //
34         Double_t mntrk = 1;
35         
36         TString periodl = period;
37         periodl.ToLower();
38         
39         if(TMath::Abs(eta) > 0.51)
40         {
41                 mntrk = (v0and) ? GetV0ANDMeanNtrk08(periodl) : GetMeanNtrk08(periodl);
42         }
43         else
44         {
45                 mntrk = (v0and) ? GetV0ANDMeanNtrk05(periodl) : GetMeanNtrk05(periodl);
46         }
47         
48         if(mntrk == 1)
49         {
50                 std::cerr << "Warning in MeanNtrk: no <Ntrk> for period " << period << " and |eta| < " << eta << std::endl;
51         }
52         
53         return mntrk;
54 }
55
56 Double_t GetMeanNtrk08(const TString& period)
57 {
58 //
59 // average track multiplicity for |eta| < 0.8
60 //
61         if(period == "lhc10b")   return 9.68887; // pass3
62         if(period == "lhc10c")   return 9.66970; // pass3
63         if(period == "lhc10d")   return 9.47466; // pass2
64         if(period == "lhc10e")   return 9.55678; // pass2
65         
66         // MC
67         if(period == "lhc10f6a") return 7.15259;
68         if(period == "lhc10e21") return 7.69483;
69         
70         return 1;
71 }
72
73 Double_t GetMeanNtrk05(const TString& period)
74 {
75 //
76 // average track multiplicity for |eta| < 0.5
77 //
78         if(period == "lhc10c900")    return 3.70158; // pass3
79         if(period == "lhc10b_pass2") return 9.86258;
80         if(period == "lhc10c_pass2") return 9.61402;
81         if(period == "lhc10b")       return 5.96104; // pass3
82         if(period == "lhc10c")       return 5.94719; // pass3
83         if(period == "lhc10d")       return 5.82333; // pass2
84         if(period == "lhc10e")       return 5.89367; // pass2
85         if(period == "lhc11a_wosdd") return 4.28597; // pass3
86         if(period == "lhc11a_wsdd")  return 4.69927; // pass4
87         
88         // MC
89         if(period == "lhc10e13")            return 3.13712;
90         if(period == "lhc10f6a")            return 4.41362;
91         if(period == "lhc10e21")            return 4.74991;
92         if(period == "lhc11e3a_plus_wosdd") return 3.37669;
93         if(period == "lhc11e3a_plus_wsdd")  return 3.47885;
94         
95         if(period == "lhc12a5a")            return 29.264;
96         if(period == "lhc12a5bb")           return 31.0288;
97         if(period == "lhc12a5bc")           return 30.6888;
98         if(period == "lhc12a5bd")           return 30.3528;
99         if(period == "lhc12a5be")           return 29.9859;
100         if(period == "lhc12a5c_wsdd")       return 27.5981;
101         
102         return 1;
103 }
104
105 Double_t GetV0ANDMeanNtrk08(const TString& period)
106 {
107 //
108 // average track multiplicity for |eta| < 0.8 (V0AND)
109 //
110         if(period == "lhc10b")   return 10.0630; // pass3
111         if(period == "lhc10c")   return 10.0292; // pass3
112         if(period == "lhc10d")   return 9.77129; // pass2
113         if(period == "lhc10e")   return 9.90511; // pass2
114         
115         // MC
116         if(period == "lhc10f6a") return 7.5087;
117         if(period == "lhc10e21") return 7.91423;
118         
119         return 1;
120 }
121
122 Double_t GetV0ANDMeanNtrk05(const TString& period)
123 {
124 //
125 // average track multiplicity for |eta| < 0.5 (V0AND)
126 //
127         if(period =="lhc10c900")    return 3.84362; // pass3
128         if(period =="lhc10b")       return 6.18470; // pass3
129         if(period =="lhc10c")       return 6.16175; // pass3
130         if(period =="lhc10d")       return 6.03108; // pass2
131         if(period =="lhc10e")       return 6.10384; // pass2
132         if(period =="lhc11a_wosdd") return 4.40312; // pass3
133         if(period =="lhc11a_wsdd")  return 4.87609; // pass4
134         
135         // MC
136         if(period =="lhc10e13")            return 3.33273;
137         if(period =="lhc10f6a")            return 4.80771;
138         if(period =="lhc10e21")            return 4.91967;
139         if(period =="lhc11e3a_plus_wosdd") return 3.4774;
140         if(period =="lhc11e3a_plus_wsdd")  return 3.6467;
141         
142         if(period =="lhc12a5a")            return 29.3414;
143         if(period =="lhc12a5bb")           return 31.1514;
144         if(period =="lhc12a5bc")           return 30.7877;
145         if(period =="lhc12a5bd")           return 30.4706;
146         if(period =="lhc12a5be")           return 30.1013;
147         if(period =="lhc12a5c_wsdd")       return 27.6921;
148         
149         return 1;
150 }