]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWGLF/SPECTRA/Nuclei/B2/macros/CreateHistograms.C
Merge branch 'master' of https://git.cern.ch/reps/AliRoot
[u/mrichter/AliRoot.git] / PWGLF / SPECTRA / Nuclei / B2 / macros / CreateHistograms.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 // macro for creating histograms
17 // author: Eulogio Serradilla <eulogio.serradilla@cern.ch>
18
19 #if !defined(__CINT__) || defined(__MAKECINT__)
20 #include <TH1D.h>
21 #include <TH2D.h>
22 #include <TMath.h>
23 #include <TString.h>
24 #include "AliLnHistoMap.h"
25 #endif
26
27 AliLnHistoMap* CreateHistograms(const TString& species, const TString& binSize, Bool_t simulation, Double_t maxDCAxy, Double_t maxEta, Double_t maxY, Bool_t heavyIons)
28 {
29 //
30 // Define an create the histograms for the analysis
31 //
32         AliLnHistoMap* hMap = new AliLnHistoMap();
33         
34         Int_t A = 1;
35         if(species == "Deuteron")    A = 2;
36         else if(species == "Triton") A = 3;
37         else if(species == "He3")    A = 3;
38         else if(species == "Alpha")  A = 4;
39         
40         TString particle[] = { Form("Anti%s",species.Data()), species };
41         
42         // pt
43         Int_t nptbins = 100;
44         Double_t* ptbins;
45         
46         if(binSize == "d_900GeV")
47         {
48                 nptbins = 11;
49                 ptbins  = new Double_t[nptbins+1];
50                 Double_t bin[] = { 0., 0.3, 0.4, 0.5, 0.7, 0.9, 1.1, 1.3, 1.5, 1.7, 1.9, 2.1 };
51                 for(Int_t i=0; i<nptbins+1; ++i) ptbins[i] = A*bin[i];
52         }
53         else if(binSize == "d_2.76TeV")
54         {
55                 nptbins = 22;
56                 ptbins  = new Double_t[nptbins+1];
57                 Double_t bin[] = { 0., 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1.0, 1.2, 1.4, 1.6, 1.8, 2.0, 2.2, 2.4, 2.6, 2.8, 3.0, 3.2, 3.4 };
58                 for(Int_t i=0; i<nptbins+1; ++i) ptbins[i] = A*bin[i];
59         }
60         else if(binSize == "d_7TeV")
61         {
62                 nptbins = 48;
63                 ptbins  = new Double_t[nptbins+1];
64                 Double_t bin[] = { 0., 0.05, 0.10, 0.15, 0.20, 0.25, 0.30, 0.35, 0.40, 0.45, 0.50, 0.55, 0.60, 0.65, 0.70, 0.75, 0.80, 0.85, 0.90, 0.95, 1.00, 1.05, 1.10, 1.15, 1.20, 1.25, 1.30, 1.40, 1.50, 1.60, 1.70, 1.80, 1.90, 2.00, 2.10, 2.20, 2.30, 2.40, 2.50, 2.60, 2.70, 2.80, 2.90, 3.00, 3.10, 3.20, 3.30, 3.40, 3.50 };
65                 for(Int_t i=0; i<nptbins+1; ++i) ptbins[i] = A*bin[i];
66         }
67         else if(binSize=="He3_7TeV")
68         {
69                 nptbins = 5;
70                 ptbins  = new Double_t[nptbins+1];
71                 Double_t bin[] = { 0., 0.4, 0.6, 1.0, 2.0, 3.0 };
72                 for(Int_t i=0; i<nptbins+1; ++i) ptbins[i] = A*bin[i];
73         }
74         else
75         {
76                 nptbins = 100;
77                 ptbins  = new Double_t[nptbins+1];
78                 Double_t binwidth = 0.1;
79                 for(Int_t i=0; i<nptbins+1; ++i) ptbins[i] = 0 + (A*binwidth)*i;
80         }
81         
82         // eta and rapidity
83         Int_t etaBins = 300;
84         Double_t etaMin = -1.5;
85         Double_t etaMax = 1.5;
86         
87         // phi
88         Int_t phiBins = 180;
89         Double_t phiMin = 0.;
90         Double_t phiMax = 2.*TMath::Pi();
91         
92         // DCA distribution bin width = 0.001 cm
93         Int_t dcaxyBins = 2.*maxDCAxy/0.001;
94         Double_t dcaxyMin = -maxDCAxy;
95         Double_t dcaxyMax = maxDCAxy;
96         
97         Int_t dcazBins = 1300;
98         Double_t dcazMin = -3.25;
99         Double_t dcazMax = 3.25;
100         
101         // m2 bins
102         Int_t m2Bins = 400;
103         Double_t m2Min = 0;
104         Double_t m2Max = 20;
105         Double_t dm2Min = -10;
106         Double_t dm2Max = 10;
107         
108         // t bins
109         Int_t tBins = 500;
110         Double_t tMin = 0;
111         Double_t tMax = 100;
112         Double_t dtMin = -10;
113         Double_t dtMax = 10;
114         
115         // track multiplicity
116         Int_t ntrkBins = 200;
117         Double_t ntrkMin = 0;
118         Double_t ntrkMax = 200;
119         
120         Int_t zmultBins = 150;
121         Double_t zmultMin = 0;
122         Double_t zmultMax = 15;
123         
124         if(heavyIons)
125         {
126                 ntrkBins = 2000;
127                 ntrkMin  = 0;
128                 ntrkMax  = 2000;
129                 
130                 zmultBins = 2000;
131                 zmultMin = 0;
132                 zmultMax = 200;
133         }
134         
135         // ITS and TPC dE/dx
136         Int_t dEdxBins = 3000;
137         Double_t mindEdx = 0.001;
138         Double_t maxdEdx = 3000.001;
139         
140         // stats
141         
142         TH1D* hStats = new TH1D(species + "_Stats", "Stats", 8, 0, 8);
143         
144         hStats->GetXaxis()->SetBinLabel(1,"Events");
145         hStats->GetXaxis()->SetBinLabel(2,"Trig");
146         hStats->GetXaxis()->SetBinLabel(3,"Ana");
147         hStats->GetXaxis()->SetBinLabel(4,"Vtx");
148         hStats->GetXaxis()->SetBinLabel(5,"Vz");
149         hStats->GetXaxis()->SetBinLabel(6,"Vxy");
150         hStats->GetXaxis()->SetBinLabel(7,"VertexerZ");
151         hStats->GetXaxis()->SetBinLabel(8,"NoPileUp");
152         
153         hStats->SetStats(0);
154         hMap->Add( species + "_Stats", (TObject*)hStats);
155         
156         if(simulation)
157         {
158                 // PID table
159                 
160                 TH2D* hPidTable = new TH2D(species + "_Stats_PID_Table", "Particle table (Row: PID, Col: MC)", 10,0,10,10,0,10);
161                 
162                 hPidTable->GetXaxis()->SetBinLabel(1,"e");
163                 hPidTable->GetXaxis()->SetBinLabel(2,"#mu");
164                 hPidTable->GetXaxis()->SetBinLabel(3,"#pi");
165                 hPidTable->GetXaxis()->SetBinLabel(4,"K");
166                 hPidTable->GetXaxis()->SetBinLabel(5,"p");
167                 hPidTable->GetXaxis()->SetBinLabel(6,"d");
168                 hPidTable->GetXaxis()->SetBinLabel(7,"t");
169                 hPidTable->GetXaxis()->SetBinLabel(8,"h");
170                 hPidTable->GetXaxis()->SetBinLabel(9,"#alpha");
171                 hPidTable->GetXaxis()->SetBinLabel(10,"sum");
172                 
173                 hPidTable->GetYaxis()->SetBinLabel(1,"e");
174                 hPidTable->GetYaxis()->SetBinLabel(2,"#mu");
175                 hPidTable->GetYaxis()->SetBinLabel(3,"#pi");
176                 hPidTable->GetYaxis()->SetBinLabel(4,"K");
177                 hPidTable->GetYaxis()->SetBinLabel(5,"p");
178                 hPidTable->GetYaxis()->SetBinLabel(6,"d");
179                 hPidTable->GetYaxis()->SetBinLabel(7,"t");
180                 hPidTable->GetYaxis()->SetBinLabel(8,"h");
181                 hPidTable->GetYaxis()->SetBinLabel(9,"#alpha");
182                 hPidTable->GetYaxis()->SetBinLabel(10,"sum");
183                 
184                 hPidTable->SetStats(0);
185                 hMap->Add( species + "_Stats_PID_Table", (TObject*)hPidTable);
186         }
187         
188         TH1D* hStatsPid = new TH1D(species + "_Stats_PID", "Stats PID", 9, 0, 9);
189         hStatsPid->GetXaxis()->SetBinLabel(1,"e");
190         hStatsPid->GetXaxis()->SetBinLabel(2,"#mu");
191         hStatsPid->GetXaxis()->SetBinLabel(3,"#pi");
192         hStatsPid->GetXaxis()->SetBinLabel(4,"K");
193         hStatsPid->GetXaxis()->SetBinLabel(5,"p");
194         hStatsPid->GetXaxis()->SetBinLabel(6,"d");
195         hStatsPid->GetXaxis()->SetBinLabel(7,"t");
196         hStatsPid->GetXaxis()->SetBinLabel(8,"h");
197         hStatsPid->GetXaxis()->SetBinLabel(9,"#alpha");
198         hStatsPid->SetStats(0);
199         hMap->Add( species + "_Stats_PID", (TObject*)hStatsPid);
200         
201         // multiplicity
202         
203         hMap->Add( species + "_Event_Ntrk", ntrkBins, ntrkMin, ntrkMax, Form("Track multiplicity (all events, |#eta|< %.1f)",maxEta), "N_{trk}", "Events");
204         hMap->Add( species + "_Event_Zmult", zmultBins, zmultMin, zmultMax, Form("KNO multiplicity (all events, |#eta|< %.1f)", maxEta), "N_{trk}/<N_{trk}>", "Events");
205         hMap->Add( species + "_Ana_Event_Ntrk", ntrkBins, ntrkMin, ntrkMax, Form("Track multiplicity (|#eta|< %.1f)", maxEta), "N_{trk}", "Events");
206         hMap->Add( species + "_Ana_Event_Zmult", zmultBins, zmultMin, zmultMax, Form("KNO multiplicity (|#eta|< %.1f)", maxEta), "N_{trk}/<N_{trk}>", "Events");
207         
208         for(Int_t i=0; i<2; ++i)
209         {
210                 hMap->Add( particle[i] + "_PID_Ntrk_pTPC", nptbins, ptbins, ntrkBins, ntrkMin, ntrkMax, particle[i] + " candidates " + Form("(|#eta|< %.1f)", maxEta), "p_{TPC}/Z (GeV/c)", "N_{trk}");
211                 
212                 hMap->Add( particle[i] + "_PID_Zmult_pTPC", nptbins, ptbins, zmultBins, zmultMin, zmultMax, particle[i] + " candidates " + Form("(|#eta|< %.1f)", maxEta), "p_{TPC}/Z (GeV/c)", "z_{mult}");
213                 
214                 if(simulation)
215                 {
216                         hMap->Add( particle[i] + "_Gen_Nch", ntrkBins, ntrkMin, ntrkMax, Form("Primary %ss (|#eta|< %.1f)", particle[i].Data(), maxEta), "N_{ch}");
217                         
218                         hMap->Add( particle[i] + "_Sim_Ntrk", ntrkBins, ntrkMin, ntrkMax, particle[i] + Form("s (|#eta|< %.1f)", maxEta), "N_{trk}");
219                 }
220         }
221         
222         if(simulation)
223         {
224                 hMap->Add( species + "_Ana_Event_Nch_Ntrk",  ntrkBins, ntrkMin, ntrkMax,  ntrkBins, ntrkMin, ntrkMax, Form("Track multiplicity (|#eta|< %.1f)", maxEta), "N_{trk}", "N_{ch}");
225         }
226         
227         hMap->Add( species + "_Vertex_XZ", 500, -50., 50., 800, -1., 1., "Primary Vertex", "Z (cm)", "X (cm)");
228         hMap->Add( species + "_Vertex_YZ", 500, -50., 50., 800, -1., 1., "Primary Vertex", "Z (cm)", "Y (cm)");
229         hMap->Add( species + "_Vertex_YX", 800, -1., 1., 800, -1., 1., "Primary Vertex", "X (cm)", "Y (cm)");
230         
231         hMap->Add( species + "_Ana_Vertex_XZ", 500, -50., 50., 800, -1., 1., "Primary Vertex", "Z (cm)", "X (cm)");
232         hMap->Add( species + "_Ana_Vertex_YZ", 500, -50., 50., 800, -1., 1., "Primary Vertex", "Z (cm)", "Y (cm)");
233         hMap->Add( species + "_Ana_Vertex_YX", 800, -1., 1., 800, -1., 1., "Primary Vertex", "X (cm)", "Y (cm)");
234         
235         if(heavyIons)
236         {
237                 hMap->Add( species + "_V0_Mult", 1000, 0, 100000., "Corrected V0 Multiplicity", "V0M", "Events");
238                 hMap->Add( species + "_V0_Scaled_Mult", 1000, 0, 10000., "Corrected Scaled V0 Multiplicity", "V0SM", "Events");
239         
240                 hMap->Add( species + "_Ana_V0_Mult", 1000, 0, 100000., "Corrected V0 Multiplicity (after centrality sel.)", "V0M", "Events");
241                 hMap->Add( species + "_Ana_V0_Scaled_Mult", 1000, 0, 10000., "Corrected Scaled V0 Multiplicity (after centrality sel.)", "V0SM", "Events");
242         }
243         
244         // positive and negative
245         
246         Bool_t logx = 1;
247         Bool_t logy = 1;
248         
249         for(Int_t i=0; i<2; ++i)
250         {
251                 // detector signals
252                 
253                 hMap->Add( particle[i] + "_ITS_dEdx_P", 1000, 0.001, 10.001, dEdxBins, mindEdx, maxdEdx, "", "p/Z (GeV/c)", "dE/dx",logx,logy);
254                 hMap->Add( particle[i] + "_TPC_dEdx_P", 1000, 0.001, 10.001, dEdxBins, mindEdx, maxdEdx, "", "p_{TPC}/Z (GeV/c)", "dE/dx",logx,logy);
255                 hMap->Add( particle[i] + "_TOF_Beta_P", 1000, 0.001, 10.001, 1200, 0.001, 1.2, "", "p_{TOF}/Z (GeV/c)", "#beta",logx,logy);
256                 hMap->Add( particle[i] + "_TOF_Mass_P", 1000, 0.001, 10.001, 500, 0.01, 5., "", "p_{TOF}/Z (GeV/c)", "Mass (GeV/c^{2})");
257                 
258                 // TrackCuts
259                 
260                 hMap->Add( particle[i] + "_TrackCuts_DCAxy", 200, -4, 4, "Track cuts", "DCA_{xy} (cm)");
261                 hMap->Add( particle[i] + "_TrackCuts_DCAz", 200, -6, 6, "Track cuts", "DCA_{z} (cm)");
262                 hMap->Add( particle[i] + "_TrackCuts_NSigma", 200, 0, 10, "Track cuts", "N_{#sigma}");
263                 
264                 hMap->Add( particle[i] + "_TrackCuts_ITSchi2PerCls", 200, 0, 40, "Track cuts", "ITS #chi^{2} / Cluster");
265                 
266                 hMap->Add( particle[i] + "_TrackCuts_TPCncls", 200, 0, 200, "Track cuts", "TPC clusters");
267                 hMap->Add( particle[i] + "_TrackCuts_TPCxRowsOverF", 200, 0, 2, "Track cuts", "TPC crossedRows/Findable");
268                 hMap->Add( particle[i] + "_TrackCuts_TPCxRows", 200, 0, 200, "Track cuts", "TPC crossed rows");
269                 hMap->Add( particle[i] + "_TrackCuts_TPCchi2PerCls", 200, 0, 20, "Track cuts", "TPC #chi^{2} / Cluster");
270                 hMap->Add( particle[i] + "_TrackCuts_TPCchi2Global", 200, -2, 38, "Track cuts", "#chi^{2} of constrained TPC vs global track");
271                 
272                 hMap->Add( particle[i] + "_Before_Phi_Eta", 400, -2, 2, 360, 0, 2.*TMath::Pi(), "Global tracks (before track cuts)", "#eta", "#phi (rad)");
273                 
274                 hMap->Add( particle[i] + "_After_Phi_Eta", 400, -2, 2, 360, 0, 2.*TMath::Pi(), "Global tracks (after track cuts)", "#eta", "#phi (rad)");
275                 
276                 // TRD and TOF absorption
277                 
278                 hMap->Add( particle[i] + "_PID_TRDin_Pt", nptbins, ptbins, particle[i] + " candidates (TRDin)", "p_{T} (GeV/c)");
279                 
280                 hMap->Add( particle[i] + "_PID_TOFin_Pt", nptbins, ptbins, particle[i] + " candidates (TOFin)", "p_{T} (GeV/c)");
281                 
282                 hMap->Add( particle[i] + "_PID_TRDin_TRDout_Pt", nptbins, ptbins, particle[i] + " candidates (TRDin-TRDout)", "p_{T} (GeV/c)");
283                 
284                 hMap->Add( particle[i] + "_PID_TRDin_TOFout_Pt", nptbins, ptbins, particle[i] + " candidates (TRDin-TOFout)", "p_{T} (GeV/c)");
285                 
286                 hMap->Add( particle[i] + "_PID_TOFin_TOFout_Pt", nptbins, ptbins, particle[i] + " candidates (TOFin-TOFout)", "p_{T} (GeV/c)");
287                 
288                 
289                 // pid with TOF
290                 
291                 hMap->Add( particle[i] + "_PID_M2_Pt", nptbins, ptbins, m2Bins, m2Min, m2Max, particle[i] + " candidates", "p_{T} (GeV/c)", "m^{2} (GeV^{2}/c^{4})");
292                 
293                 hMap->Add( particle[i] + "_PID_DM2_Pt", nptbins, ptbins, m2Bins, dm2Min, dm2Max, particle[i] + " candidates", "p_{T} (GeV/c)", "#Deltam^{2} (GeV^{2}/c^{4})");
294                 
295                 hMap->Add( particle[i] + "_PID_Time_Pt", nptbins, ptbins, tBins, tMin, tMax, particle[i] + " candidates", "p_{T} (GeV/c)", "t - t_{0} (ns)");
296                 
297                 hMap->Add( particle[i] + "_PID_DTime_Pt", nptbins, ptbins, tBins, dtMin, dtMax, particle[i] + " candidates", "p_{T} (GeV/c)", "t - <t> (ns)");
298                 
299                 // as a function of momentum
300                 hMap->Add( particle[i] + "_PID_DCAxy_Pt", nptbins, ptbins, dcaxyBins, dcaxyMin, dcaxyMax, particle[i] + " candidates", "p_{T} (GeV/c)", "sign #times DCA_{xy} (cm)");
301                 
302                 hMap->Add( particle[i] + "_PID_DCAz_Pt", nptbins, ptbins, dcazBins, dcazMin, dcazMax, particle[i] + " candidates", "p_{T} (GeV/c)", "sign #times DCA_{z} (cm)");
303                 
304                 hMap->Add( particle[i] + "_PID_NSigma_Pt", nptbins, ptbins, 200, 0., 10., particle[i] + " candidates", "p_{T} (GeV/c)", "N#sigma");
305                 
306                 if(simulation)
307                 {
308                         hMap->Add( particle[i] + "_Sim_PID_M2_Pt", nptbins, ptbins, m2Bins, m2Min, m2Max, Form("%s after PID", particle[i].Data()), "p_{T} (GeV/c)", "m^{2} (GeV^{2}/c^{4})");
309                         
310                         hMap->Add( particle[i] + "_Sim_Prim_DCAxy_Pt", nptbins, ptbins, dcaxyBins, dcaxyMin, dcaxyMax, Form("Primary %s", particle[i].Data()), "p_{T} (GeV/c)", "sign #times DCA_{xy} (cm)");
311                 
312                         hMap->Add( particle[i] + "_Sim_Fdwn_DCAxy_Pt", nptbins, ptbins, dcaxyBins, dcaxyMin, dcaxyMax, Form("Feed-down %s", particle[i].Data()), "p_{T} (GeV/c)", "sign #times DCA_{xy} (cm)");
313                         
314                         hMap->Add( particle[i] + "_Sim_Mat_DCAxy_Pt", nptbins, ptbins, dcaxyBins, dcaxyMin, dcaxyMax, Form("%s from materials", particle[i].Data()), "p_{T} (GeV/c)", "sign #times DCA_{xy} (cm)");
315                         
316                         // primaries
317                         hMap->Add( particle[i] + "_Sim_PID_Prim_DCAxy_Pt", nptbins, ptbins, dcaxyBins, dcaxyMin, dcaxyMax, Form("Primary %s after PID", particle[i].Data()), "p_{T} (GeV/c)", "sign #times DCA_{xy} (cm)");
318                 
319                         hMap->Add( particle[i] + "_Sim_PID_Prim_DCAz_Pt", nptbins, ptbins, dcazBins, dcazMin, dcazMax, Form("Primary %s after PID", particle[i].Data()), "p_{T} (GeV/c)", "sign #times DCA_{z} (cm)");
320                 
321                         hMap->Add( particle[i] + "_Sim_PID_Prim_NSigma_Pt", nptbins, ptbins, 200, 0., 10., Form("Primary %s after PID", particle[i].Data()), "p_{T} (GeV/c)", "N#sigma");
322                         
323                         // feed-down
324                         hMap->Add( particle[i] + "_Sim_PID_Fdwn_DCAxy_Pt", nptbins, ptbins, dcaxyBins, dcaxyMin, dcaxyMax, Form("Feed-down %s after PID", particle[i].Data()), "p_{T} (GeV/c)", "sign #times DCA_{xy} (cm)");
325                 
326                         hMap->Add( particle[i] + "_Sim_PID_Fdwn_DCAz_Pt", nptbins, ptbins, dcazBins, dcazMin, dcazMax, Form("Feed-down %s after PID", particle[i].Data()), "p_{T} (GeV/c)", "sign #times DCA_{z} (cm)");
327                 
328                         hMap->Add( particle[i] + "_Sim_PID_Fdwn_NSigma_Pt", nptbins, ptbins, 200, 0., 10., Form("Feed-down %s after PID", particle[i].Data()), "p_{T} (GeV/c)", "N#sigma");
329                         
330                         // secondaries from materials
331                         hMap->Add( particle[i] + "_Sim_PID_Mat_DCAxy_Pt", nptbins, ptbins, dcaxyBins, dcaxyMin, dcaxyMax, Form("%s from materials after PID", particle[i].Data()), "p_{T} (GeV/c)", "sign #times DCA_{xy} (cm)");
332                 
333                         hMap->Add( particle[i] + "_Sim_PID_Mat_DCAz_Pt", nptbins, ptbins, dcazBins, dcazMin, dcazMax, Form("%s from materials after PID", particle[i].Data()), "p_{T} (GeV/c)", "sign #times DCA_{z} (cm)");
334                 
335                         hMap->Add( particle[i] + "_Sim_PID_Mat_NSigma_Pt", nptbins, ptbins, 200, 0., 10., Form("%s from materials after PID", particle[i].Data()), "p_{T} (GeV/c)", "N#sigma");
336                         
337                         // fake tracks
338                         hMap->Add( particle[i] + "_Sim_PID_Fake_Prim_DCAxy_Pt", nptbins, ptbins, dcaxyBins, dcaxyMin, dcaxyMax, Form("Fake Primary %s after PID", particle[i].Data()), "p_{T} (GeV/c)", "sign #times DCA_{xy} (cm)");
339                         
340                         hMap->Add( particle[i] + "_Sim_PID_Fake_Fdwn_DCAxy_Pt", nptbins, ptbins, dcaxyBins, dcaxyMin, dcaxyMax, Form("Fake feed-down %s after PID", particle[i].Data()), "p_{T} (GeV/c)", "sign #times DCA_{xy} (cm)");
341                         
342                         hMap->Add( particle[i] + "_Sim_PID_Fake_Mat_DCAxy_Pt", nptbins, ptbins, dcaxyBins, dcaxyMin, dcaxyMax, Form("Fake %s from materials after PID", particle[i].Data()), "p_{T} (GeV/c)", "sign #times DCA_{xy} (cm)");
343                 }
344                 
345                 // identification
346                 
347                 hMap->Add( particle[i] + "_PID_ITSdEdx_P", 1000, 0.001, 10.001, 1500, mindEdx, maxdEdx, particle[i] + " candidates", "p/Z (GeV/c)", "dE/dx",logx,logy);
348                 
349                 hMap->Add( particle[i] + "_PID_TPCdEdx_P", 1000, 0.001, 10.001, 1500, mindEdx, maxdEdx, particle[i] + " candidates", "p_{TPC}/Z (GeV/c)", "dE/dx",logx,logy);
350                 
351                 hMap->Add( particle[i] + "_PID_Beta_P", 1000, 0.001, 10.001, 1200, 1.e-3, 1.2, particle[i] + " candidates", "p_{TOF}/Z (GeV/c)", "#beta",logx,logy);
352                 
353                 hMap->Add( particle[i] + "_PID_Mass_P", 1000, 0.001, 10.001, 500, 0.01, 5., particle[i] + " candidates", "p_{TOF}/Z (GeV/c)", "m (GeV/c^{2})");
354                 
355                 if(simulation)
356                 {
357                         hMap->Add( particle[i] + "_Sim_PID_Mass", 500, 0.01, 5., Form("%s after PID", particle[i].Data()), "m (GeV/c^{2})");
358                 }
359                 
360                 // results
361                 
362                 hMap->Add( particle[i] + "_PID_Pt_Y", etaBins, etaMin, etaMax, nptbins, ptbins, particle[i] + " candidates", "y", "p_{T} (GeV/c)");
363                 
364                 hMap->Add( particle[i] + "_PID_Pt", nptbins, ptbins, Form("%s candidates (|y| < %0.1f, 0 < #phi < 2#pi)", particle[i].Data(),maxY), "p_{T} (GeV/c)");
365                 
366                 hMap->Add( particle[i] + "_PID_TOFmatch_Pt", nptbins, ptbins, Form("%s candidates (|y| < %0.1f, TOFmatch)", particle[i].Data(),maxY), "p_{T} (GeV/c)");
367                 
368                 hMap->Add( Form("%s_PID_Y",particle[i].Data()), etaBins, etaMin, etaMax, Form("%s candidates (p_{T} > 0, 0 < #phi < 2#pi)",particle[i].Data()), "y");
369                 
370                 hMap->Add( particle[i] + "_PID_Phi", phiBins, phiMin, phiMax, Form("%s candidates (p_{T} > 0, |y| < %0.1f)",particle[i].Data(),maxY), "#phi (rad)");
371                 
372                 if(simulation)
373                 {
374                         hMap->Add( particle[i] + "_Sim_Pt", nptbins, ptbins, Form("%s (|y| < %0.1f, 0 < #phi < 2#pi)",particle[i].Data(),maxY), "p_{T} (GeV/c)");
375                         
376                         hMap->Add( particle[i] + "_Sim_Prim_Pt", nptbins, ptbins, Form("Primary %s (|y| < %0.1f, 0 < #phi < 2#pi)",particle[i].Data(),maxY), "p_{T} (GeV/c)");
377                         
378                         hMap->Add( particle[i] + "_Sim_Prim_Rec_Pt", nptbins, ptbins, Form("Primary %s (|y| < %0.1f, 0 < #phi < 2#pi, rec. pt)",particle[i].Data(),maxY), "p_{T} (GeV/c)");
379                         
380                         hMap->Add( particle[i] + "_Sim_Prim_Phi", phiBins, phiMin, phiMax, Form("Primary %s (p_{T} > 0, |y| < %0.1f)",particle[i].Data(),maxY), "#phi (rad)");
381                         
382                         hMap->Add( particle[i] + "_Sim_Prim_Y", etaBins, etaMin, etaMax, Form("Primary %s (p_{T} > 0, 0 < #phi < 2#pi)",particle[i].Data()), "y");
383                         
384                         hMap->Add( particle[i] + "_Sim_Fdwn_Pt", nptbins, ptbins, Form("Feed-down %s (|y| < %0.1f, 0 < #phi < 2#pi)",particle[i].Data(),maxY), "p_{T} (GeV/c)");
385                         
386                         hMap->Add( particle[i] + "_Sim_Mat_Pt", nptbins, ptbins, Form("%s from materials (|y| < %0.1f, 0 < #phi < 2#pi)",particle[i].Data(),maxY), "p_{T} (GeV/c)");
387                         
388                         hMap->Add( particle[i] + "_Sim_PID_Prim_Pt", nptbins, ptbins, Form("Primary %s after PID (|y| < %0.1f, 0 < #phi < 2#pi)",particle[i].Data(),maxY), "p_{T} (GeV/c)");
389                 
390                         hMap->Add( particle[i] + "_Sim_PID_Pt", nptbins, ptbins, Form("%s after PID (|y| < %0.1f, 0 < #phi < 2#pi)",particle[i].Data(),maxY), "p_{T} (GeV/c)");
391                 
392                         hMap->Add( particle[i] + "_Sim_PtY", etaBins, etaMin, etaMax, nptbins, ptbins, particle[i].Data(), "y", "p_{T} (GeV/c)");
393                         
394                         hMap->Add( particle[i] + "_Sim_Prim_M2_P", nptbins, ptbins, m2Bins, m2Min, m2Max, Form("Primary %s (|y| < %0.1f, 0 < #phi < 2#pi)",particle[i].Data(),maxY), "p (GeV/c)", "m^{2} (GeV^{2}/c^{4})");
395                         
396                         hMap->Add( particle[i] + "_Sim_Prim_M2_Pt", nptbins, ptbins, m2Bins, m2Min, m2Max, Form("Primary %s (|y| < %0.1f, 0 < #phi < 2#pi)",particle[i].Data(),maxY), "p_{T} (GeV/c)", "m^{2} (GeV^{2}/c^{4})");
397                         
398                         // unfolding
399                         
400                         hMap->Add( particle[i] + "_Response_Matrix",  nptbins, ptbins,  nptbins, ptbins, particle[i].Data(), "Measured p_{T} (GeV/c)", "True p_{T} (GeV/c)");
401                         
402                         hMap->Add( particle[i] + "_Prim_Response_Matrix",  nptbins, ptbins,  nptbins, ptbins, Form("Primary %s",particle[i].Data()), "Measured p_{T} (GeV/c)", "True p_{T} (GeV/c)");
403                         
404                         hMap->Add( particle[i] + "_Prim_DiffPt_RecPt",  400,0.,10.,  1000, -0.5, 0.5, Form("Primary %s",particle[i].Data()), "p_{T}^{rec} (GeV/c)", "p_{T}^{gen}-p_{T}^{rec} (GeV/c)");
405                         
406                         // fake tracks
407                         hMap->Add( particle[i] + "_Sim_Fake_Pt", nptbins, ptbins, Form("Fake %s (|y| < %0.1f, 0 < #phi < 2#pi)",particle[i].Data(),maxY), "p_{T} (GeV/c)");
408                         
409                         hMap->Add( particle[i] + "_Sim_Fake_Prim_Pt", nptbins, ptbins, Form("Fake Primary %s (|y| < %0.1f, 0 < #phi < 2#pi)",particle[i].Data(),maxY), "p_{T} (GeV/c)");
410                         
411                         hMap->Add( particle[i] + "_Sim_Fake_Fdwn_Pt", nptbins, ptbins, Form("Fake Feed-down %s (|y| < %0.1f, 0 < #phi < 2#pi)",particle[i].Data(),maxY), "p_{T} (GeV/c)");
412                         
413                         hMap->Add( particle[i] + "_Sim_Fake_Mat_Pt", nptbins, ptbins, Form("Fake %s from materials (|y| < %0.1f, 0 < #phi < 2#pi)",particle[i].Data(),maxY), "p_{T} (GeV/c)");
414                         
415                         hMap->Add( particle[i] + "_Sim_PID_Fake_Pt", nptbins, ptbins, Form("Fake %s after PID (|y| < %0.1f, 0 < #phi < 2#pi)",particle[i].Data(),maxY), "p_{T} (GeV/c)");
416                 }
417         }
418         
419         // generation
420         
421         if(simulation)
422         {
423                 for(Int_t i=0; i<2; ++i)
424                 {
425                         hMap->Add( particle[i] + "_Gen_Prim_P", nptbins, ptbins, Form("Primary %s", particle[i].Data()), "p (GeV/c)");
426                         
427                         hMap->Add( particle[i] + "_Gen_Prim_Pt", nptbins, ptbins, Form("Primary %s", particle[i].Data()), "p_{T} (GeV/c)");
428                         
429                         hMap->Add( particle[i] + "_Gen_Prim_Y", 600, -12, 12, Form("Primary %s", particle[i].Data()), "y");
430                         
431                         hMap->Add( particle[i] + "_Gen_Prim_Eta", 600, -12, 12, Form("Primary %s", particle[i].Data()), "#eta");
432                         
433                         hMap->Add( particle[i] + "_Gen_Prim_Phi", phiBins, phiMin, phiMax, Form("Primary %s", particle[i].Data()), "#phi (rad)");
434                         
435                         hMap->Add( particle[i] + "_Gen_Prim_PtY", etaBins, etaMin, etaMax, nptbins, ptbins, Form("Primary %s", particle[i].Data()), "y", "p_{T} (GeV/c)");
436                         
437                         hMap->Add( particle[i] + "_Gen_Prim_EtaY", etaBins, etaMin, etaMax, etaBins, etaMin, etaMax, Form("Primary %s", particle[i].Data()), "y", "#eta");
438                         
439                         // in the phase space within the acceptance
440                         
441                         hMap->Add( particle[i] + "_Gen_PhS_Prim_P", nptbins, ptbins, Form("Primary %s (mult. events, |y| < %0.1f)",particle[i].Data(),maxY), "p (GeV/c)");
442                         
443                         hMap->Add( particle[i] + "_Gen_PhS_Prim_Pt", nptbins, ptbins, Form("Primary %s (mult. events, |y| < %0.1f)",particle[i].Data(),maxY), "p_{T} (GeV/c)");
444                         
445                         hMap->Add( particle[i] + "_Gen_Trig_Prim_Pt", nptbins, ptbins, Form("Primary %s (triggering events, |y| < %0.1f)", particle[i].Data(), maxY), "p_{T} (GeV/c)");
446                         
447                         hMap->Add( particle[i] + "_Gen_Vtx_Prim_Pt", nptbins, ptbins, Form("Primary %s (good vertex, |y| < %0.1f)", particle[i].Data(), maxY), "p_{T} (GeV/c)");
448                         
449                         hMap->Add( particle[i] + "_Gen_NoTrig_Prim_Pt", nptbins, ptbins, Form("Primary %s (non-triggering events, |y| < %0.1f)", particle[i].Data(), maxY), "p_{T} (GeV/c)");
450                         
451                         hMap->Add( particle[i] + "_Gen_NoVtx_Prim_Pt", nptbins, ptbins, Form("Primary %s (no reconstructed vertex, |y| < %0.1f)", particle[i].Data(), maxY), "p_{T} (GeV/c)");
452                         
453                         // within the acceptance
454                         
455                         hMap->Add( particle[i] + "_Gen_Acc_Prim_P", nptbins, ptbins, Form("Primary %s (|y| < %0.1f and |#eta| < %0.1f)",particle[i].Data(),maxY,maxEta), "p (GeV/c)");
456                 
457                         hMap->Add( particle[i] + "_Gen_Acc_Prim_Pt", nptbins, ptbins, Form("Primary %s (|y| < %0.1f and |#eta| < %0.1f)",particle[i].Data(),maxY,maxEta), "p_{T} (GeV/c)");
458                 
459                         hMap->Add( particle[i] + "_Gen_Acc_Prim_Y", etaBins, etaMin, etaMax, Form("Primary %s (|#eta| < %0.1f)",particle[i].Data(),maxEta), "y");
460                 
461                         hMap->Add( particle[i] + "_Gen_Acc_Prim_Phi", phiBins, phiMin, phiMax, Form("Primary %s (|y|< %0.1f and |#eta| < %0.1f)",particle[i].Data(),maxY,maxEta), "#phi (rad)");
462                         
463                         hMap->Add( particle[i] + "_Gen_Acc_Prim_PtY", etaBins, etaMin, etaMax, nptbins, ptbins, Form("Primary %s",particle[i].Data()), "y", "p_{T} (GeV/c)");
464                 }
465         }
466         
467         delete [] ptbins;
468         
469         return hMap;
470 }