]>
Commit | Line | Data |
---|---|---|
da3e2cdb | 1 | /*************************************************************************** |
2 | fbellini@cern.ch - last modified on 06/08/2012 | |
3 | ||
4 | Macro to add monitoring histograms for track and PID cuts to the rsn task | |
5 | Tuned for monitoring TOF KStar analysis of PbPb 2010 data | |
6 | /***************************************************************************/ | |
7 | ||
8 | ||
9 | void AddMonitorOutput(Bool_t useMCMon = 0, TObjArray *mon=0,TString opt="",AliRsnLoopDaughter *lm=0) | |
10 | { | |
11 | ||
12 | // Multiplicity/centrality | |
13 | AliRsnValueEvent *multi = new AliRsnValueEvent("multi",AliRsnValueEvent::kMult); | |
58a1c9a4 | 14 | multi->SetBins(0.0, 400.0, 1); |
da3e2cdb | 15 | // Momentum |
16 | AliRsnValueDaughter *axisMomTPC = new AliRsnValueDaughter("pTPC", AliRsnValueDaughter::kPtpc); | |
17 | axisMomTPC->SetBins(0.0, 10.0, 0.01); | |
18 | AliRsnValueDaughter *axisMomP = new AliRsnValueDaughter("p", AliRsnValueDaughter::kP); | |
19 | axisMomP->SetBins(0.0, 10.0, 0.01); | |
20 | // Momentum Pt | |
21 | AliRsnValueDaughter *axisMomPt = new AliRsnValueDaughter("pt", AliRsnValueDaughter::kPt); | |
22 | axisMomPt->SetBins(0.0,10.0,0.01); | |
23 | // Eta | |
24 | AliRsnValueDaughter *axisMomEta = new AliRsnValueDaughter("eta", AliRsnValueDaughter::kEta); | |
58a1c9a4 | 25 | axisMomEta->SetBins(-1.0, 1.0, 0.1); |
eec5d1ed | 26 | //ITS clusters |
27 | AliRsnValueDaughter *axisITScls = new AliRsnValueDaughter("ITScls", AliRsnValueDaughter::kNITSclusters); | |
28 | axisITScls->SetBins(0.0, 10.0, 1.0); | |
29 | //TPC clusters | |
30 | AliRsnValueDaughter *axisTPCcls = new AliRsnValueDaughter("TPCcls", AliRsnValueDaughter::kNTPCclusters); | |
31 | axisTPCcls->SetBins(0.0, 300.0, 1.0); | |
32 | //ITS chi2 | |
33 | AliRsnValueDaughter *axisITSchi2 = new AliRsnValueDaughter("ITSchi2", AliRsnValueDaughter::kITSchi2); | |
34 | axisITSchi2->SetBins(0.0, 10.0, 0.1); | |
35 | //TPC chi2 | |
36 | AliRsnValueDaughter *axisTPCchi2 = new AliRsnValueDaughter("TPCchi2", AliRsnValueDaughter::kTPCchi2); | |
37 | axisTPCchi2->SetBins(0.0, 10.0, 0.1); | |
38 | //DCA xy | |
39 | AliRsnValueDaughter *axisDCAxy = new AliRsnValueDaughter("DCAxy", AliRsnValueDaughter::kDCAXY); | |
51a8daf6 | 40 | axisDCAxy->SetBins(-2.0, 2.0, 0.1); |
eec5d1ed | 41 | //DCA z |
42 | AliRsnValueDaughter *axisDCAz = new AliRsnValueDaughter("DCAz", AliRsnValueDaughter::kDCAZ); | |
51a8daf6 | 43 | axisDCAz->SetBins(-10.0, 10.0, 0.1); |
da3e2cdb | 44 | |
45 | /* dEdx tpc */ | |
46 | AliRsnValueDaughter *axisSigTPC = new AliRsnValueDaughter("sTPC", AliRsnValueDaughter::kTPCsignal); | |
47 | axisSigTPC->SetBins(0.0, 500.0, 2.0); | |
48 | // kTPCnsigmaPi | |
49 | AliRsnValueDaughter *axisTPCnsigmaPi = new AliRsnValueDaughter("pi", AliRsnValueDaughter::kTPCnsigmaPi); | |
58a1c9a4 | 50 | axisTPCnsigmaPi->SetBins(-10.,10., 0.1); |
da3e2cdb | 51 | // kTPCnsigmaK |
52 | AliRsnValueDaughter *axisTPCnsigmaK = new AliRsnValueDaughter("K", AliRsnValueDaughter::kTPCnsigmaK); | |
58a1c9a4 | 53 | axisTPCnsigmaK->SetBins(-10.,10., 0.1); |
da3e2cdb | 54 | // kTPCnsigmaP |
55 | AliRsnValueDaughter *axisTPCnsigmaP = new AliRsnValueDaughter("p", AliRsnValueDaughter::kTPCnsigmaP); | |
58a1c9a4 | 56 | axisTPCnsigmaP->SetBins(-10.,10., 0.1); |
da3e2cdb | 57 | |
58 | /* tof signal - time */ | |
59 | AliRsnValueDaughter *axisSigTOF = new AliRsnValueDaughter("sTOF", AliRsnValueDaughter::kTOFsignal); | |
60 | axisSigTOF->SetBins(10000.0, 50000.0, 250);//in ps | |
61 | // kTOFnsigmaPi | |
62 | AliRsnValueDaughter *axisTOFnsigmaPi = new AliRsnValueDaughter("pi", AliRsnValueDaughter::kTOFnsigmaPi); | |
58a1c9a4 | 63 | axisTOFnsigmaPi->SetBins(-10.,10., 0.1); |
da3e2cdb | 64 | // kTOFnsigmaK |
65 | AliRsnValueDaughter *axisTOFnsigmaK = new AliRsnValueDaughter("K", AliRsnValueDaughter::kTOFnsigmaK); | |
58a1c9a4 | 66 | axisTOFnsigmaK->SetBins(-10.,10., 0.1); |
da3e2cdb | 67 | // kTOFnsigmaP |
68 | AliRsnValueDaughter *axisTOFnsigmaP = new AliRsnValueDaughter("p", AliRsnValueDaughter::kTOFnsigmaP); | |
58a1c9a4 | 69 | axisTOFnsigmaP->SetBins(-10.,10., 0.1); |
da3e2cdb | 70 | |
71 | /****************************************************************/ | |
72 | /*************** MONITOR AOB ********************/ | |
73 | /****************************************************************/ | |
74 | AliRsnListOutput *outMonitorPTvsMult = new AliRsnListOutput("PtVsMult",AliRsnListOutput::kHistoDefault); | |
75 | outMonitorPTvsMult->AddValue(axisMomPt); | |
76 | outMonitorPTvsMult->AddValue(multi); | |
77 | if (mon) mon->Add(outMonitorPTvsMult); | |
78 | if (lm) lm->AddOutput(outMonitorPTvsMult); | |
79 | ||
80 | // if (lm) lm->SetTrueMC(kTRUE); | |
81 | /****************************************************************/ | |
82 | /*************** MONITOR kinematics ********************/ | |
83 | /****************************************************************/ | |
84 | // output: TH1D for momentum | |
85 | AliRsnListOutput *outMonitorP = new AliRsnListOutput("P", AliRsnListOutput::kHistoDefault); | |
86 | outMonitorP->AddValue(axisMomP); | |
87 | if (mon) mon->Add(outMonitorP); | |
88 | if (lm) lm->AddOutput(outMonitorP); | |
89 | ||
90 | // output: TH1D for pt | |
91 | AliRsnListOutput *outMonitorPt = new AliRsnListOutput("Pt", AliRsnListOutput::kHistoDefault); | |
92 | outMonitorPt->AddValue(axisMomPt); | |
93 | if (mon) mon->Add(outMonitorPt); | |
94 | if (lm) lm->AddOutput(outMonitorPt); | |
95 | ||
96 | // output: TH1D for pseudorapidity | |
97 | AliRsnListOutput *outMonitorEta = new AliRsnListOutput("Eta", AliRsnListOutput::kHistoDefault); | |
98 | outMonitorEta->AddValue(axisMomEta); | |
99 | if (mon) mon->Add(outMonitorEta); | |
100 | if (lm) lm->AddOutput(outMonitorEta); | |
101 | ||
eec5d1ed | 102 | /****************************************************************/ |
103 | /*************** MONITOR TRACK QUALITY ********************/ | |
104 | /****************************************************************/ | |
105 | // output: 2D histogram of DCAxy vs pt | |
106 | AliRsnListOutput *outMonitorDCAxy = new AliRsnListOutput("DCAxyVsPt", AliRsnListOutput::kHistoDefault); | |
107 | outMonitorDCAxy->AddValue(axisMomPt); | |
108 | outMonitorDCAxy->AddValue(axisDCAxy); | |
109 | if (mon) mon->Add(outMonitorDCAxy); | |
110 | if (lm) lm->AddOutput(outMonitorDCAxy); | |
111 | ||
51a8daf6 | 112 | // output: 2D histogram of DCAz vs P |
eec5d1ed | 113 | AliRsnListOutput *outMonitorDCAz = new AliRsnListOutput("DCAzVsP", AliRsnListOutput::kHistoDefault); |
114 | outMonitorDCAz->AddValue(axisMomP); | |
115 | outMonitorDCAz->AddValue(axisDCAz); | |
116 | if (mon) mon->Add(outMonitorDCAz); | |
117 | if (lm) lm->AddOutput(outMonitorDCAz); | |
118 | ||
119 | // output: 2D histogram of ITS cls vs pt | |
120 | AliRsnListOutput *outMonitorITScls = new AliRsnListOutput("ITSclsVsPt", AliRsnListOutput::kHistoDefault); | |
121 | outMonitorITScls->AddValue(axisMomPt); | |
122 | outMonitorITScls->AddValue(axisITScls); | |
123 | if (mon) mon->Add(outMonitorITScls); | |
124 | if (lm) lm->AddOutput(outMonitorITScls); | |
125 | ||
126 | // output: 2D histogram of TPC cls vs. pt | |
127 | AliRsnListOutput *outMonitorTPCcls = new AliRsnListOutput("TPCclsVsPt", AliRsnListOutput::kHistoDefault); | |
128 | outMonitorTPCcls->AddValue(axisMomPt); | |
129 | outMonitorTPCcls->AddValue(axisTPCcls); | |
130 | if (mon) mon->Add(outMonitorTPCcls); | |
131 | if (lm) lm->AddOutput(outMonitorTPCcls); | |
132 | ||
133 | // output: 2D histogram of TPC cls vs. TPC momentum | |
134 | AliRsnListOutput *outMonitorTPCclsVsPtpc = new AliRsnListOutput("TPCclsVsPtpc", AliRsnListOutput::kHistoDefault); | |
135 | outMonitorTPCclsVsPtpc->AddValue(axisMomTPC); | |
136 | outMonitorTPCclsVsPtpc->AddValue(axisTPCcls); | |
137 | if (mon) mon->Add(outMonitorTPCclsVsPtpc); | |
138 | if (lm) lm->AddOutput(outMonitorTPCclsVsPtpc); | |
139 | ||
140 | // output: 2D histogram of ITS chi2 vs pt | |
141 | AliRsnListOutput *outMonitorITSchi2 = new AliRsnListOutput("ITSchi2VsPt", AliRsnListOutput::kHistoDefault); | |
142 | outMonitorITSchi2->AddValue(axisMomPt); | |
143 | outMonitorITSchi2->AddValue(axisITSchi2); | |
144 | if (mon) mon->Add(outMonitorITSchi2); | |
145 | if (lm) lm->AddOutput(outMonitorITSchi2); | |
146 | ||
147 | // output: 2D histogram of TPC chi2 vs. pt | |
148 | AliRsnListOutput *outMonitorTPCchi2 = new AliRsnListOutput("TPCchi2VsPt", AliRsnListOutput::kHistoDefault); | |
149 | outMonitorTPCchi2->AddValue(axisMomPt); | |
150 | outMonitorTPCchi2->AddValue(axisTPCchi2); | |
151 | if (mon) mon->Add(outMonitorTPCchi2); | |
152 | if (lm) lm->AddOutput(outMonitorTPCchi2); | |
153 | ||
154 | // output: 2D histogram of TPC chi2 vs. TPC momentum | |
155 | AliRsnListOutput *outMonitorTPCchi2VsPtpc = new AliRsnListOutput("TPCchi2VsPtpc", AliRsnListOutput::kHistoDefault); | |
156 | outMonitorTPCchi2VsPtpc->AddValue(axisMomTPC); | |
157 | outMonitorTPCchi2VsPtpc->AddValue(axisTPCchi2); | |
158 | if (mon) mon->Add(outMonitorTPCchi2VsPtpc); | |
159 | if (lm) lm->AddOutput(outMonitorTPCchi2VsPtpc); | |
160 | ||
da3e2cdb | 161 | /****************************************************************/ |
162 | /*************** MONITOR TPC ********************/ | |
163 | /****************************************************************/ | |
164 | // output: 2D histogram of TPC signal vs. TPC momentum | |
165 | AliRsnListOutput *outMonitordEdxTPC = new AliRsnListOutput("dEdx_VsPtpc", AliRsnListOutput::kHistoDefault); | |
166 | outMonitordEdxTPC->AddValue(axisMomTPC); | |
167 | outMonitordEdxTPC->AddValue(axisSigTPC); | |
168 | if (mon) mon->Add(outMonitordEdxTPC); | |
169 | if (lm) lm->AddOutput(outMonitordEdxTPC); | |
170 | ||
171 | // output: 2D histogram of TPC nsigma pi vs. TPC momentum | |
172 | AliRsnListOutput *outMonitorTPCnsigmaPi = new AliRsnListOutput("TPC_nsigmaPi_VsPtpc", AliRsnListOutput::kHistoDefault); | |
173 | outMonitorTPCnsigmaPi->AddValue(axisMomTPC); | |
174 | outMonitorTPCnsigmaPi->AddValue(axisTPCnsigmaPi); | |
175 | if (mon) mon->Add(outMonitorTPCnsigmaPi); | |
176 | if (lm) lm->AddOutput(outMonitorTPCnsigmaPi); | |
177 | ||
178 | // output: 2D histogram of TPC nsigma K vs. TPC momentum | |
179 | AliRsnListOutput *outMonitorTPCnsigmaK = new AliRsnListOutput("TPC_nsigmaK_VsPtpc", AliRsnListOutput::kHistoDefault); | |
180 | outMonitorTPCnsigmaK->AddValue(axisMomTPC); | |
181 | outMonitorTPCnsigmaK->AddValue(axisTPCnsigmaK); | |
182 | if (mon) mon->Add(outMonitorTPCnsigmaK); | |
183 | if (lm) lm->AddOutput(outMonitorTPCnsigmaK); | |
184 | ||
185 | // output: 2D histogram of TPC nsigma pro vs. TPC momentum | |
186 | AliRsnListOutput *outMonitorTPCnsigmaP = new AliRsnListOutput("TPC_nsigmaPro_VsPtpc", AliRsnListOutput::kHistoDefault); | |
187 | outMonitorTPCnsigmaP->AddValue(axisMomTPC); | |
188 | outMonitorTPCnsigmaP->AddValue(axisTPCnsigmaP); | |
189 | if (mon) mon->Add(outMonitorTPCnsigmaP); | |
190 | if (lm) lm->AddOutput(outMonitorTPCnsigmaP); | |
191 | ||
192 | /****************************************************************/ | |
193 | /*************** MONITOR TOF ********************/ | |
194 | /****************************************************************/ | |
195 | // output: 2D histogram of TOF signal vs. momentum | |
196 | AliRsnListOutput *outMonitorTimeTOF = new AliRsnListOutput("time_VsP", AliRsnListOutput::kHistoDefault); | |
197 | outMonitorTimeTOF->AddValue(axisMomP); | |
198 | outMonitorTimeTOF->AddValue(axisSigTOF); | |
199 | if (mon) mon->Add(outMonitorTimeTOF); | |
200 | if (lm) lm->AddOutput(outMonitorTimeTOF); | |
201 | ||
202 | // output: 2D histogram of TOF signal vs. pt | |
203 | AliRsnListOutput *outMonitorTimeTOFPt = new AliRsnListOutput("time_VsPt", AliRsnListOutput::kHistoDefault); | |
204 | outMonitorTimeTOFPt->AddValue(axisMomPt); | |
205 | outMonitorTimeTOFPt->AddValue(axisSigTOF); | |
206 | if (mon) mon->Add(outMonitorTimeTOFPt); | |
207 | if (lm) lm->AddOutput(outMonitorTimeTOFPt); | |
208 | ||
209 | if (!opt.Contains("NoTOFSIGMA")) { | |
210 | // output: 2D histogram of TOF Nsigma pi vs. TPC momentum | |
211 | AliRsnListOutput *outMonitorTOFnsigmaPi = new AliRsnListOutput("TOF_nsigmaPi_vsP", AliRsnListOutput::kHistoDefault); | |
212 | outMonitorTOFnsigmaPi->AddValue(axisMomP); | |
213 | outMonitorTOFnsigmaPi->AddValue(axisTOFnsigmaPi); | |
214 | if (mon) mon->Add(outMonitorTOFnsigmaPi); | |
215 | if (lm) lm->AddOutput(outMonitorTOFnsigmaPi); | |
216 | ||
217 | // output: 2D histogram of TOF signal vs. TOF momentum | |
218 | AliRsnListOutput *outMonitorTOFnsigmaK = new AliRsnListOutput("TOF_nsigmaK_vsP", AliRsnListOutput::kHistoDefault); | |
219 | outMonitorTOFnsigmaK->AddValue(axisMomP); | |
220 | outMonitorTOFnsigmaK->AddValue(axisTOFnsigmaK); | |
221 | if (mon) mon->Add(outMonitorTOFnsigmaK); | |
222 | if (lm) lm->AddOutput(outMonitorTOFnsigmaK); | |
223 | ||
224 | // output: 2D histogram of TOF signal vs. TOF momentum | |
225 | AliRsnListOutput *outMonitorTOFnsigmaP = new AliRsnListOutput("TOF_nsigmaPro_vsP", AliRsnListOutput::kHistoDefault); | |
226 | outMonitorTOFnsigmaP->AddValue(axisMomP); | |
227 | outMonitorTOFnsigmaP->AddValue(axisTOFnsigmaP); | |
228 | if (mon) mon->Add(outMonitorTOFnsigmaP); | |
229 | if (lm) lm->AddOutput(outMonitorTOFnsigmaP); | |
230 | } | |
231 | ||
232 | /****************************************************************/ | |
233 | /*************** MONITOR MC ********************/ | |
234 | /****************************************************************/ | |
235 | if (useMCMon) { | |
236 | //Momentum | |
237 | AliRsnValueDaughter *axisMomPMC = new AliRsnValueDaughter("pMC", AliRsnValueDaughter::kP); | |
238 | axisMomPMC->SetUseMCInfo(kTRUE); | |
239 | axisMomPMC->SetBins(0.0,10.0,0.01); | |
240 | // Momentum Pt | |
241 | AliRsnValueDaughter *axisMomPtMC = new AliRsnValueDaughter("ptMC", AliRsnValueDaughter::kPt); | |
242 | axisMomPtMC->SetUseMCInfo(kTRUE); | |
243 | axisMomPtMC->SetBins(0.0,10.0,0.01); | |
244 | // Eta | |
245 | AliRsnValueDaughter *axisEtaMC = new AliRsnValueDaughter("etaMC", AliRsnValueDaughter::kEta); | |
246 | axisEtaMC->SetUseMCInfo(kTRUE); | |
58a1c9a4 | 247 | axisEtaMC->SetBins(-1.0,1.0,0.1); |
da3e2cdb | 248 | |
249 | // output: 2D histo for kine acceptance | |
250 | AliRsnListOutput *outMonitorPtVsEtaMC = new AliRsnListOutput("Pt_VsEtaMC", AliRsnListOutput::kHistoDefault); | |
251 | outMonitorPtVsEtaMC->AddValue(axisMomPtMC); | |
252 | outMonitorPtVsEtaMC->AddValue(axisEtaMC); | |
253 | if (mon) mon->Add(outMonitorPtVsEtaMC); | |
254 | if (lm) lm->AddOutput(outMonitorPtVsEtaMC); | |
255 | ||
256 | // output: 1D histo pt from MC | |
257 | AliRsnListOutput *outMonitorPtMC = new AliRsnListOutput("PtMC", AliRsnListOutput::kHistoDefault); | |
258 | outMonitorPtMC->AddValue(axisMomPtMC); | |
259 | if (mon) mon->Add(outMonitorPtMC); | |
260 | if (lm) lm->AddOutput(outMonitorPtMC); | |
261 | ||
262 | // output: 1D histo eta from MC | |
263 | AliRsnListOutput *outMonitorEtaMC = new AliRsnListOutput("EtaMC", AliRsnListOutput::kHistoDefault); | |
264 | outMonitorEtaMC->AddValue(axisEtaMC); | |
265 | if (mon) mon->Add(outMonitorEtaMC); | |
266 | if (lm) lm->AddOutput(outMonitorEtaMC); | |
267 | ||
268 | // output: 1D histo pt from MC | |
269 | AliRsnListOutput *outMonitorPtMC = new AliRsnListOutput("PtMC", AliRsnListOutput::kHistoDefault); | |
270 | outMonitorPtMC->AddValue(axisMomPtMC); | |
271 | if (mon) mon->Add(outMonitorPtMC); | |
272 | if (lm) lm->AddOutput(outMonitorPtMC); | |
273 | } | |
274 | ||
275 | } |