]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWGLF/SPECTRA/Nuclei/B2/macros/CreateHistograms.C
add mult. priors and histograms
[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, 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 ptBins = 100;
36         Double_t ptMin = 0.*A;
37         Double_t ptMax = 10.*A;
38         
39         // eta and rapidity
40         Int_t etaBins = 300;
41         Double_t etaMin = -1.5;
42         Double_t etaMax = 1.5;
43         
44         // phi
45         Int_t phiBins = 180;
46         Double_t phiMin = 0.;
47         Double_t phiMax = 2.*TMath::Pi();
48         
49         // DCA distribution bin width = 0.001 cm
50         Int_t dcaxyBins = 2.*maxDCAxy/0.001;
51         Double_t dcaxyMin = -maxDCAxy;
52         Double_t dcaxyMax = maxDCAxy;
53         
54         Int_t dcazBins = 1300;
55         Double_t dcazMin = -3.25;
56         Double_t dcazMax = 3.25;
57         
58         // m2 bins
59         Int_t m2Bins = 400;
60         Double_t m2Min = 0;
61         Double_t m2Max = 20;
62         
63         // track multiplicity
64         Int_t ntrkBins = 200;
65         Double_t ntrkMin = 0;
66         Double_t ntrkMax = 200;
67         
68         if(heavyIons)
69         {
70                 ntrkBins = 2000;
71                 ntrkMin  = 0;
72                 ntrkMax  = 2000;
73         }
74         
75         // ITS and TPC dE/dx
76         Int_t dEdxBins = 3000;
77         Double_t mindEdx = 0.001;
78         Double_t maxdEdx = 3000.001;
79         
80         // stats
81         
82         TH1D* hStats = new TH1D(species + "_Stats", "Stats", 8, 0, 8);
83         
84         hStats->GetXaxis()->SetBinLabel(1,"Events");
85         hStats->GetXaxis()->SetBinLabel(2,"Trig");
86         hStats->GetXaxis()->SetBinLabel(3,"Ana");
87         hStats->GetXaxis()->SetBinLabel(4,"Vtx");
88         hStats->GetXaxis()->SetBinLabel(5,"Vz");
89         hStats->GetXaxis()->SetBinLabel(6,"Vxy");
90         hStats->GetXaxis()->SetBinLabel(7,"VertexerZ");
91         hStats->GetXaxis()->SetBinLabel(8,"NoPileUp");
92         
93         hStats->SetStats(0);
94         hMap->Add( species + "_Stats", (TObject*)hStats);
95         
96         if(simulation)
97         {
98                 // PID table
99                 
100                 TH2D* hPidTable = new TH2D(species + "_Stats_PID_Table", "Particle table (Row: PID, Col: MC)", 10,0,10,10,0,10);
101                 
102                 hPidTable->GetXaxis()->SetBinLabel(1,"e");
103                 hPidTable->GetXaxis()->SetBinLabel(2,"#mu");
104                 hPidTable->GetXaxis()->SetBinLabel(3,"#pi");
105                 hPidTable->GetXaxis()->SetBinLabel(4,"K");
106                 hPidTable->GetXaxis()->SetBinLabel(5,"p");
107                 hPidTable->GetXaxis()->SetBinLabel(6,"d");
108                 hPidTable->GetXaxis()->SetBinLabel(7,"t");
109                 hPidTable->GetXaxis()->SetBinLabel(8,"h");
110                 hPidTable->GetXaxis()->SetBinLabel(9,"#alpha");
111                 hPidTable->GetXaxis()->SetBinLabel(10,"sum");
112                 
113                 hPidTable->GetYaxis()->SetBinLabel(1,"e");
114                 hPidTable->GetYaxis()->SetBinLabel(2,"#mu");
115                 hPidTable->GetYaxis()->SetBinLabel(3,"#pi");
116                 hPidTable->GetYaxis()->SetBinLabel(4,"K");
117                 hPidTable->GetYaxis()->SetBinLabel(5,"p");
118                 hPidTable->GetYaxis()->SetBinLabel(6,"d");
119                 hPidTable->GetYaxis()->SetBinLabel(7,"t");
120                 hPidTable->GetYaxis()->SetBinLabel(8,"h");
121                 hPidTable->GetYaxis()->SetBinLabel(9,"#alpha");
122                 hPidTable->GetYaxis()->SetBinLabel(10,"sum");
123                 
124                 hPidTable->SetStats(0);
125                 hMap->Add( species + "_Stats_PID_Table", (TObject*)hPidTable);
126         }
127         
128         TH1D* hStatsPid = new TH1D(species + "_Stats_PID", "Stats PID", 9, 0, 9);
129         hStatsPid->GetXaxis()->SetBinLabel(1,"e");
130         hStatsPid->GetXaxis()->SetBinLabel(2,"\\mu");
131         hStatsPid->GetXaxis()->SetBinLabel(3,"\\pi");
132         hStatsPid->GetXaxis()->SetBinLabel(4,"K");
133         hStatsPid->GetXaxis()->SetBinLabel(5,"p");
134         hStatsPid->GetXaxis()->SetBinLabel(6,"d");
135         hStatsPid->GetXaxis()->SetBinLabel(7,"t");
136         hStatsPid->GetXaxis()->SetBinLabel(8,"h");
137         hStatsPid->GetXaxis()->SetBinLabel(9,"\\alpha");
138         hStatsPid->SetStats(0);
139         hMap->Add( species + "_Stats_PID", (TObject*)hStatsPid);
140         
141         // multiplicity
142         
143         hMap->Add( species + "_Event_Ntrk", ntrkBins, ntrkMin, ntrkMax, Form("Track multiplicity (all events, |#eta|< %.1f)",maxEta), "N_{trk}", "Events");
144         hMap->Add( species + "_Ana_Event_Ntrk", ntrkBins, ntrkMin, ntrkMax, Form("Track multiplicity (|#eta|< %.1f)", maxEta), "N_{trk}", "Events");
145         
146         for(Int_t i=0; i<2; ++i)
147         {
148                 hMap->Add( particle[i] + "_PID_Ntrk_pTPC", ptBins, ptMin, ptMax, ntrkBins, ntrkMin, ntrkMax, particle[i] + " candidates " + Form("(|#eta|< %.1f)", maxEta), "p_{TPC}/Z (GeV/c)", "N_{trk}");
149                 
150                 hMap->Add( particle[i] + "_PID_Zmult_pTPC", ptBins, ptMin, ptMax, 400, 0, 20, particle[i] + " candidates " + Form("(|#eta|< %.1f)", maxEta), "p_{TPC}/Z (GeV/c)", "z_{mult}");
151                 
152                 if(simulation)
153                 {
154                         hMap->Add( particle[i] + "_Gen_Nch", ntrkBins, ntrkMin, ntrkMax, Form("Primary %ss (|#eta|< %.1f)", particle[i].Data(), maxEta), "N_{ch}");
155                         
156                         hMap->Add( particle[i] + "_Sim_Ntrk", ntrkBins, ntrkMin, ntrkMax, particle[i] + Form("s (|#eta|< %.1f)", maxEta), "N_{trk}");
157                 }
158         }
159         
160         if(simulation)
161         {
162                 hMap->Add( species + "_Ana_Event_Nch_Ntrk", 200, 0., 200., 200, 0., 200., Form("Track multiplicity (|#eta|< %.1f)", maxEta), "N_{trk}", "N_{ch}");
163         }
164         
165         hMap->Add( species + "_Vertex_XZ", 500, -50., 50., 800, -1., 1., "Primary Vertex", "Z (cm)", "X (cm)");
166         hMap->Add( species + "_Vertex_YZ", 500, -50., 50., 800, -1., 1., "Primary Vertex", "Z (cm)", "Y (cm)");
167         hMap->Add( species + "_Vertex_YX", 800, -1., 1., 800, -1., 1., "Primary Vertex", "X (cm)", "Y (cm)");
168         
169         hMap->Add( species + "_Ana_Vertex_XZ", 500, -50., 50., 800, -1., 1., "Primary Vertex", "Z (cm)", "X (cm)");
170         hMap->Add( species + "_Ana_Vertex_YZ", 500, -50., 50., 800, -1., 1., "Primary Vertex", "Z (cm)", "Y (cm)");
171         hMap->Add( species + "_Ana_Vertex_YX", 800, -1., 1., 800, -1., 1., "Primary Vertex", "X (cm)", "Y (cm)");
172         
173         if(heavyIons)
174         {
175                 hMap->Add( species + "_V0_Mult", 1000, 0, 100000., "Corrected V0 Multiplicity", "V0M", "Events");
176                 hMap->Add( species + "_V0_Scaled_Mult", 1000, 0, 10000., "Corrected Scaled V0 Multiplicity", "V0SM", "Events");
177         
178                 hMap->Add( species + "_Ana_V0_Mult", 1000, 0, 100000., "Corrected V0 Multiplicity (after centrality sel.)", "V0M", "Events");
179                 hMap->Add( species + "_Ana_V0_Scaled_Mult", 1000, 0, 10000., "Corrected Scaled V0 Multiplicity (after centrality sel.)", "V0SM", "Events");
180         }
181         
182         // positive and negative
183         
184         Bool_t logx = 1;
185         Bool_t logy = 1;
186         
187         for(Int_t i=0; i<2; ++i)
188         {
189                 // detector signals
190                 
191                 hMap->Add( particle[i] + "_ITS_dEdx_P", 1000, 0.001, 10.001, dEdxBins, mindEdx, maxdEdx, "", "p/Z (GeV/c)", "dE/dx",logx,logy);
192                 hMap->Add( particle[i] + "_TPC_dEdx_P", 1000, 0.001, 10.001, dEdxBins, mindEdx, maxdEdx, "", "p_{TPC}/Z (GeV/c)", "dE/dx",logx,logy);
193                 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);
194                 
195                 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})");
196                 
197                 // TrackCuts
198                 
199                 hMap->Add( particle[i] + "_TrackCuts_DCAxy", 200, -4, 4, "Track cuts", "DCA_{xy} (cm)");
200                 hMap->Add( particle[i] + "_TrackCuts_DCAz", 200, -6, 6, "Track cuts", "DCA_{z} (cm)");
201                 hMap->Add( particle[i] + "_TrackCuts_NSigma", 200, 0, 10, "Track cuts", "N_{#sigma}");
202                 
203                 hMap->Add( particle[i] + "_TrackCuts_ITSchi2PerCls", 200, 0, 40, "Track cuts", "ITS #chi^{2} / Cluster");
204                 
205                 hMap->Add( particle[i] + "_TrackCuts_TPCncls", 200, 0, 200, "Track cuts", "TPC clusters");
206                 hMap->Add( particle[i] + "_TrackCuts_TPCclsOverF", 200, 0, 2, "Track cuts", "TPC clusters/Findable");
207                 hMap->Add( particle[i] + "_TrackCuts_TPCxRows", 200, 0, 200, "Track cuts", "TPC crossed rows");
208                 hMap->Add( particle[i] + "_TrackCuts_TPCchi2PerCls", 200, 0, 20, "Track cuts", "TPC #chi^{2} / Cluster");
209                 hMap->Add( particle[i] + "_TrackCuts_TPCchi2Global", 200, -2, 38, "Track cuts", "#chi^{2} of constrained TPC vs global track");
210                 
211                 hMap->Add( particle[i] + "_Before_Phi_Eta", 400, -2, 2, 360, 0, 2.*TMath::Pi(), "Global tracks (before track cuts)", "#eta", "#phi (rad)");
212                 
213                 hMap->Add( particle[i] + "_After_Phi_Eta", 400, -2, 2, 360, 0, 2.*TMath::Pi(), "Global tracks (after track cuts)", "#eta", "#phi (rad)");
214                 
215                 // TRD and TOF absorption
216                 
217                 hMap->Add( particle[i] + "_PID_TRDin_Pt", ptBins, ptMin, ptMax, Form("%s candidates (TRDin)", particle[i].Data(),maxY), "p_{T} (GeV/c)");
218                 
219                 hMap->Add( particle[i] + "_PID_TOFin_Pt", ptBins, ptMin, ptMax, Form("%s candidates (TOFin)", particle[i].Data(),maxY), "p_{T} (GeV/c)");
220                 
221                 hMap->Add( particle[i] + "_PID_TRDin_TRDout_Pt", ptBins, ptMin, ptMax, Form("%s candidates (TRDin-TRDout)", particle[i].Data(),maxY), "p_{T} (GeV/c)");
222                 
223                 hMap->Add( particle[i] + "_PID_TRDin_TOFout_Pt", ptBins, ptMin, ptMax, Form("%s candidates (TRDin-TOFout)", particle[i].Data(),maxY), "p_{T} (GeV/c)");
224                 
225                 hMap->Add( particle[i] + "_PID_TOFin_TOFout_Pt", ptBins, ptMin, ptMax, Form("%s candidates (TOFin-TOFout)", particle[i].Data(),maxY), "p_{T} (GeV/c)");
226                 
227                 
228                 // pid with TOF
229                 
230                 hMap->Add( particle[i] + "_PID_M2_Pt", ptBins, ptMin, ptMax, m2Bins, m2Min, m2Max, particle[i] + " candidates", "p_{T} (GeV/c)", "m^{2} (GeV^{2}/c^{4})");
231                 
232                 // as a function of momentum
233                 hMap->Add( particle[i] + "_PID_DCAxy_Pt", ptBins, ptMin, ptMax, dcaxyBins, dcaxyMin, dcaxyMax, particle[i] + " candidates", "p_{T} (GeV/c)", "sign #times DCA_{xy} (cm)");
234                 
235                 hMap->Add( particle[i] + "_PID_DCAz_Pt", ptBins, ptMin, ptMax, dcazBins, dcazMin, dcazMax, particle[i] + " candidates", "p_{T} (GeV/c)", "sign #times DCA_{z} (cm)");
236                 
237                 hMap->Add( particle[i] + "_PID_NSigma_Pt", ptBins, ptMin, ptMax, 200, 0., 10., particle[i] + " candidates", "p_{T} (GeV/c)", "N\\sigma");
238                 
239                 if(simulation)
240                 {
241                         hMap->Add( particle[i] + "_Sim_PID_M2_Pt", ptBins, ptMin, ptMax, m2Bins, m2Min, m2Max, Form("%s after PID", particle[i].Data()), "p_{T} (GeV/c)", "m^{2} (GeV^{2}/c^{4})");
242                         
243                         hMap->Add( particle[i] + "_Sim_Prim_DCAxy_Pt", ptBins, ptMin, ptMax, dcaxyBins, dcaxyMin, dcaxyMax, Form("Primary %s", particle[i].Data()), "p_{T} (GeV/c)", "sign #times DCA_{xy} (cm)");
244                 
245                         hMap->Add( particle[i] + "_Sim_Fdwn_DCAxy_Pt", ptBins, ptMin, ptMax, dcaxyBins, dcaxyMin, dcaxyMax, Form("Feed-down %s", particle[i].Data()), "p_{T} (GeV/c)", "sign #times DCA_{xy} (cm)");
246                         
247                         hMap->Add( particle[i] + "_Sim_Mat_DCAxy_Pt", ptBins, ptMin, ptMax, dcaxyBins, dcaxyMin, dcaxyMax, Form("%s from materials", particle[i].Data()), "p_{T} (GeV/c)", "sign #times DCA_{xy} (cm)");
248                         
249                         // primaries
250                         hMap->Add( particle[i] + "_Sim_PID_Prim_DCAxy_Pt", ptBins, ptMin, ptMax, dcaxyBins, dcaxyMin, dcaxyMax, Form("Primary %s after PID", particle[i].Data()), "p_{T} (GeV/c)", "sign #times DCA_{xy} (cm)");
251                 
252                         hMap->Add( particle[i] + "_Sim_PID_Prim_DCAz_Pt", ptBins, ptMin, ptMax, dcazBins, dcazMin, dcazMax, Form("Primary %s after PID", particle[i].Data()), "p_{T} (GeV/c)", "sign #times DCA_{z} (cm)");
253                 
254                         hMap->Add( particle[i] + "_Sim_PID_Prim_NSigma_Pt", ptBins, ptMin, ptMax, 200, 0., 10., Form("Primary %s after PID", particle[i].Data()), "p_{T} (GeV/c)", "N\\sigma");
255                         
256                         // feed-down
257                         hMap->Add( particle[i] + "_Sim_PID_Fdwn_DCAxy_Pt", ptBins, ptMin, ptMax, dcaxyBins, dcaxyMin, dcaxyMax, Form("Feed-down %s after PID", particle[i].Data()), "p_{T} (GeV/c)", "sign #times DCA_{xy} (cm)");
258                 
259                         hMap->Add( particle[i] + "_Sim_PID_Fdwn_DCAz_Pt", ptBins, ptMin, ptMax, dcazBins, dcazMin, dcazMax, Form("Feed-down %s after PID", particle[i].Data()), "p_{T} (GeV/c)", "sign #times DCA_{z} (cm)");
260                 
261                         hMap->Add( particle[i] + "_Sim_PID_Fdwn_NSigma_Pt", ptBins, ptMin, ptMax, 200, 0., 10., Form("Feed-down %s after PID", particle[i].Data()), "p_{T} (GeV/c)", "N\\sigma");
262                         
263                         // secondaries from materials
264                         hMap->Add( particle[i] + "_Sim_PID_Mat_DCAxy_Pt", ptBins, ptMin, ptMax, dcaxyBins, dcaxyMin, dcaxyMax, Form("%s from materials after PID", particle[i].Data()), "p_{T} (GeV/c)", "sign #times DCA_{xy} (cm)");
265                 
266                         hMap->Add( particle[i] + "_Sim_PID_Mat_DCAz_Pt", ptBins, ptMin, ptMax, dcazBins, dcazMin, dcazMax, Form("%s from materials after PID", particle[i].Data()), "p_{T} (GeV/c)", "sign #times DCA_{z} (cm)");
267                 
268                         hMap->Add( particle[i] + "_Sim_PID_Mat_NSigma_Pt", ptBins, ptMin, ptMax, 200, 0., 10., Form("%s from materials after PID", particle[i].Data()), "p_{T} (GeV/c)", "N\\sigma");
269                         
270                         // fake tracks
271                         hMap->Add( particle[i] + "_Sim_PID_Fake_Prim_DCAxy_Pt", ptBins, ptMin, ptMax, dcaxyBins, dcaxyMin, dcaxyMax, Form("Fake Primary %s after PID", particle[i].Data()), "p_{T} (GeV/c)", "sign #times DCA_{xy} (cm)");
272                         
273                         hMap->Add( particle[i] + "_Sim_PID_Fake_Fdwn_DCAxy_Pt", ptBins, ptMin, ptMax, dcaxyBins, dcaxyMin, dcaxyMax, Form("Fake feed-down %s after PID", particle[i].Data()), "p_{T} (GeV/c)", "sign #times DCA_{xy} (cm)");
274                         
275                         hMap->Add( particle[i] + "_Sim_PID_Fake_Mat_DCAxy_Pt", ptBins, ptMin, ptMax, dcaxyBins, dcaxyMin, dcaxyMax, Form("Fake %s from materials after PID", particle[i].Data()), "p_{T} (GeV/c)", "sign #times DCA_{xy} (cm)");
276                 }
277                 
278                 // identification
279                 
280                 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);
281                 
282                 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);
283                 
284                 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);
285                 
286                 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})");
287                 
288                 if(simulation)
289                 {
290                         hMap->Add( particle[i] + "_Sim_PID_Mass", 500, 0.01, 5., Form("%s after PID", particle[i].Data()), "m (GeV/c^{2})");
291                 }
292                 
293                 // results
294                 
295                 hMap->Add( particle[i] + "_PID_Pt_Y", etaBins, etaMin, etaMax, ptBins, ptMin, ptMax, particle[i] + " candidates", "y", "p_{T} (GeV/c)");
296                 
297                 hMap->Add( particle[i] + "_PID_Pt", ptBins, ptMin, ptMax, Form("%s candidates (|y| < %0.1f, 0 < \\phi < 2\\pi)", particle[i].Data(),maxY), "p_{T} (GeV/c)");
298                 
299                 hMap->Add( particle[i] + "_PID_TOFmatch_Pt", ptBins, ptMin, ptMax, Form("%s candidates (|y| < %0.1f, TOFmatch)", particle[i].Data(),maxY), "p_{T} (GeV/c)");
300                 
301                 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");
302                 
303                 hMap->Add( particle[i] + "_PID_Phi", phiBins, phiMin, phiMax, Form("%s candidates (p_{T} > 0, |y| < %0.1f)",particle[i].Data(),maxY), "\\phi (rad)");
304                 
305                 if(simulation)
306                 {
307                         hMap->Add( particle[i] + "_Sim_Pt", ptBins, ptMin, ptMax, Form("%s (|y| < %0.1f, 0 < \\phi < 2\\pi)",particle[i].Data(),maxY), "p_{T} (GeV/c)");
308                         
309                         hMap->Add( particle[i] + "_Sim_Prim_Pt", ptBins, ptMin, ptMax, Form("Primary %s (|y| < %0.1f, 0 < \\phi < 2\\pi)",particle[i].Data(),maxY), "p_{T} (GeV/c)");
310                         
311                         hMap->Add( particle[i] + "_Sim_Prim_Rec_Pt", ptBins, ptMin, ptMax, Form("Primary %s (|y| < %0.1f, 0 < \\phi < 2\\pi, rec. pt)",particle[i].Data(),maxY), "p_{T} (GeV/c)");
312                         
313                         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)");
314                         
315                         hMap->Add( particle[i] + "_Sim_Prim_Y", etaBins, etaMin, etaMax, Form("Primary %s (p_{T} > 0, 0 < \\phi < 2\\pi)",particle[i].Data()), "y");
316                         
317                         hMap->Add( particle[i] + "_Sim_Fdwn_Pt", ptBins, ptMin, ptMax, Form("Feed-down %s (|y| < %0.1f, 0 < \\phi < 2\\pi)",particle[i].Data(),maxY), "p_{T} (GeV/c)");
318                         
319                         hMap->Add( particle[i] + "_Sim_Mat_Pt", ptBins, ptMin, ptMax, Form("%s from materials (|y| < %0.1f, 0 < \\phi < 2\\pi)",particle[i].Data(),maxY), "p_{T} (GeV/c)");
320                         
321                         hMap->Add( particle[i] + "_Sim_PID_Prim_Pt", ptBins, ptMin, ptMax, Form("Primary %s after PID (|y| < %0.1f, 0 < \\phi < 2\\pi)",particle[i].Data(),maxY), "p_{T} (GeV/c)");
322                 
323                         hMap->Add( particle[i] + "_Sim_PID_Pt", ptBins, ptMin, ptMax, Form("%s after PID (|y| < %0.1f, 0 < \\phi < 2\\pi)",particle[i].Data(),maxY), "p_{T} (GeV/c)");
324                 
325                         hMap->Add( particle[i] + "_Sim_PID_Prim_R", 200, 0., 200., Form("%s after PID (|y| < %0.1f, 0 < \\phi < 2\\pi)",particle[i].Data(),maxY), "R_{xyz} (cm)");
326                         
327                         hMap->Add( particle[i] + "_Sim_PtY", etaBins, etaMin, etaMax, ptBins, ptMin, ptMax, particle[i].Data(), "y", "p_{T} (GeV/c)");
328                         
329                         hMap->Add( particle[i] + "_Sim_Prim_M2_P", ptBins, ptMin, ptMax, 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})");
330                         
331                         hMap->Add( particle[i] + "_Sim_Prim_M2_Pt", ptBins, ptMin, ptMax, 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})");
332                         
333                         // unfolding
334                         
335                         hMap->Add( particle[i] + "_Response_Matrix",  ptBins, ptMin, ptMax,  ptBins, ptMin, ptMax, particle[i].Data(), "Measured p_{T} (GeV/c)", "True p_{T} (GeV/c)");
336                         
337                         hMap->Add( particle[i] + "_Prim_Response_Matrix",  ptBins, ptMin, ptMax,  ptBins, ptMin, ptMax, Form("Primary %s",particle[i].Data()), "Measured p_{T} (GeV/c)", "True p_{T} (GeV/c)");
338                         
339                         hMap->Add( particle[i] + "_Prim_DiffPt_RecPt",  ptBins, ptMin, ptMax,  1000, -0.5, 0.5, Form("Primary %s",particle[i].Data()), "p_{T}^{rec} (GeV/c)", "p_{T}^{gen}-p_{T}^{rec} (GeV/c)");
340                         
341                         // fake tracks
342                         hMap->Add( particle[i] + "_Sim_Fake_Pt", ptBins, ptMin, ptMax, Form("Fake %s (|y| < %0.1f, 0 < \\phi < 2\\pi)",particle[i].Data(),maxY), "p_{T} (GeV/c)");
343                         
344                         hMap->Add( particle[i] + "_Sim_Fake_Prim_Pt", ptBins, ptMin, ptMax, Form("Fake Primary %s (|y| < %0.1f, 0 < \\phi < 2\\pi)",particle[i].Data(),maxY), "p_{T} (GeV/c)");
345                         
346                         hMap->Add( particle[i] + "_Sim_Fake_Fdwn_Pt", ptBins, ptMin, ptMax, Form("Fake Feed-down %s (|y| < %0.1f, 0 < \\phi < 2\\pi)",particle[i].Data(),maxY), "p_{T} (GeV/c)");
347                         
348                         hMap->Add( particle[i] + "_Sim_Fake_Mat_Pt", ptBins, ptMin, ptMax, Form("Fake %s from materials (|y| < %0.1f, 0 < \\phi < 2\\pi)",particle[i].Data(),maxY), "p_{T} (GeV/c)");
349                         
350                         hMap->Add( particle[i] + "_Sim_PID_Fake_Pt", ptBins, ptMin, ptMax, Form("Fake %s after PID (|y| < %0.1f, 0 < \\phi < 2\\pi)",particle[i].Data(),maxY), "p_{T} (GeV/c)");
351                 }
352         }
353         
354         // generation
355         
356         if(simulation)
357         {
358                 for(Int_t i=0; i<2; ++i)
359                 {
360                         hMap->Add( particle[i] + "_Gen_Prim_P", ptBins, ptMin, ptMax, Form("Primary %s", particle[i].Data()), "p (GeV/c)");
361                         
362                         hMap->Add( particle[i] + "_Gen_Prim_Pt", ptBins, ptMin, ptMax, Form("Primary %s", particle[i].Data()), "p_{T} (GeV/c)");
363                         
364                         hMap->Add( particle[i] + "_Gen_Prim_Y", 600, -12, 12, Form("Primary %s", particle[i].Data()), "y");
365                         
366                         hMap->Add( particle[i] + "_Gen_Prim_Eta", 600, -12, 12, Form("Primary %s", particle[i].Data()), "#eta");
367                         
368                         hMap->Add( particle[i] + "_Gen_Prim_Phi", phiBins, phiMin, phiMax, Form("Primary %s", particle[i].Data()), "\\phi (rad)");
369                         
370                         hMap->Add( particle[i] + "_Gen_Prim_PtY", etaBins, etaMin, etaMax, ptBins, ptMin, ptMax, Form("Primary %s", particle[i].Data()), "y", "p_{T} (GeV/c)");
371                         
372                         hMap->Add( particle[i] + "_Gen_Prim_EtaY", etaBins, etaMin, etaMax, etaBins, etaMin, etaMax, Form("Primary %s", particle[i].Data()), "y", "#eta");
373                         
374                         // in the phase space within the acceptance
375                         
376                         hMap->Add( particle[i] + "_Gen_PhS_Prim_P", ptBins, ptMin, ptMax, Form("Primary %s (mult. events, |y| < %0.1f)",particle[i].Data(),maxY), "p (GeV/c)");
377                         
378                         hMap->Add( particle[i] + "_Gen_PhS_Prim_Pt", ptBins, ptMin, ptMax, Form("Primary %s (mult. events, |y| < %0.1f)",particle[i].Data(),maxY), "p_{T} (GeV/c)");
379                         
380                         hMap->Add( particle[i] + "_Gen_Trig_Prim_Pt", ptBins, ptMin, ptMax, Form("Primary %s (triggering events, |y| < %0.1f)", particle[i].Data(), maxY), "p_{T} (GeV/c)");
381                         
382                         hMap->Add( particle[i] + "_Gen_Vtx_Prim_Pt", ptBins, ptMin, ptMax, Form("Primary %s (good vertex, |y| < %0.1f)", particle[i].Data(), maxY), "p_{T} (GeV/c)");
383                         
384                         hMap->Add( particle[i] + "_Gen_NoTrig_Prim_Pt", ptBins, ptMin, ptMax, Form("Primary %s (non-triggering events, |y| < %0.1f)", particle[i].Data(), maxY), "p_{T} (GeV/c)");
385                         
386                         hMap->Add( particle[i] + "_Gen_NoVtx_Prim_Pt", ptBins, ptMin, ptMax, Form("Primary %s (no reconstructed vertex, |y| < %0.1f)", particle[i].Data(), maxY), "p_{T} (GeV/c)");
387                         
388                         // within the acceptance
389                         
390                         hMap->Add( particle[i] + "_Gen_Acc_Prim_P", ptBins, ptMin, ptMax, Form("Primary %s (|y| < %0.1f and |\\eta| < %0.1f)",particle[i].Data(),maxY,maxEta), "p (GeV/c)");
391                 
392                         hMap->Add( particle[i] + "_Gen_Acc_Prim_Pt", ptBins, ptMin, ptMax, Form("Primary %s (|y| < %0.1f and |\\eta| < %0.1f)",particle[i].Data(),maxY,maxEta), "p_{T} (GeV/c)");
393                 
394                         hMap->Add( particle[i] + "_Gen_Acc_Prim_Y", etaBins, etaMin, etaMax, Form("Primary %s (|\\eta| < %0.1f)",particle[i].Data(),maxEta), "y");
395                 
396                         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)");
397                         
398                         hMap->Add( particle[i] + "_Gen_Acc_Prim_PtY", etaBins, etaMin, etaMax, ptBins, ptMin, ptMax, Form("Primary %s",particle[i].Data()), "y", "p_{T} (GeV/c)");
399                 }
400         }
401         
402         return hMap;
403 }