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