]> git.uio.no Git - u/mrichter/AliRoot.git/blame - ZDC/AliZDCQADataMakerRec.cxx
Fixing bug #57328
[u/mrichter/AliRoot.git] / ZDC / AliZDCQADataMakerRec.cxx
CommitLineData
075a0e70 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 **************************************************************************/
fdc38bb2 15
16///////////////////////////////////////////////////////////////////////
17// //
18// Produces the data needed to calculate the ZDC quality assurance. //
19// QA objects are 1 & 2 Dimensional histograms. //
20// author: C. Oppedisano //
21// //
22///////////////////////////////////////////////////////////////////////
23
075a0e70 24// --- ROOT system ---
25#include <TClonesArray.h>
26#include <TFile.h>
27#include <TH1F.h>
28#include <TH2F.h>
29#include <TProfile.h>
30#include <Riostream.h>
31// --- Standard library ---
32
33// --- AliRoot header files ---
34#include "AliLog.h"
35#include "AliQAChecker.h"
f5e4ee59 36#include "AliZDCReco.h"
78328afd 37#include "AliRawReader.h"
075a0e70 38#include "AliZDCQADataMakerRec.h"
39#include "AliZDCRawStream.h"
44ed7a66 40#include "AliZDCDigit.h"
075a0e70 41#include "AliESDZDC.h"
42#include "AliESDEvent.h"
43
44ClassImp(AliZDCQADataMakerRec)
45
46//____________________________________________________________________________
47 AliZDCQADataMakerRec::AliZDCQADataMakerRec() :
eca4fa66 48 AliQADataMakerRec(AliQAv1::GetDetName(AliQAv1::kZDC), "ZDC Quality Assurance Data Maker"),
49 fDigit(0)
075a0e70 50{
51 // ctor
52}
53
54//____________________________________________________________________________
55AliZDCQADataMakerRec::AliZDCQADataMakerRec(const AliZDCQADataMakerRec& qadm) :
eca4fa66 56 AliQADataMakerRec(),
57 fDigit(0)
075a0e70 58{
59 //copy ctor
60 SetName((const char*)qadm.GetName());
61 SetTitle((const char*)qadm.GetTitle());
62}
63
64//__________________________________________________________________
65AliZDCQADataMakerRec& AliZDCQADataMakerRec::operator = (const AliZDCQADataMakerRec& qadm )
66{
67 // Equal operator.
68 this->~AliZDCQADataMakerRec();
69 new(this) AliZDCQADataMakerRec(qadm);
70 return *this;
71}
72
44ed7a66 73//____________________________________________________________________________
74void AliZDCQADataMakerRec::InitDigits()
75{
76 // create Digits histograms in Digits subdir
77 //
78 const Bool_t expert = kTRUE ;
79 const Bool_t image = kTRUE ;
80
81 // ------------------- HIGH GAIN CHAIN ---------------------------
b72460a5 82 TH1F * hDigitPMCZNC = new TH1F("hDigitPMCZNC", "Digit common ZNC PMT;Amplitude [ADC counts];Counts",100, 0., 1000.);
83 TH1F * hDigitPMCZNA = new TH1F("hDigitPMCZNA", "Digit common ZNA PMT;Amplitude [ADC counts];Counts",100, 0., 1000.);
84 TH1F * hDigitPMCZPC = new TH1F("hDigitPMCZPC", "Digit common ZPC PMT;Amplitude [ADC counts];Counts",100, 0., 1000.);
85 TH1F * hDigitPMCZPA = new TH1F("hDigitPMCZPA", "Digit common ZPA PMT;Amplitude [ADC counts];Counts",100, 0., 1000.);
86 TH1F * hDigitPMZEM1 = new TH1F("hDigitPMZEM1", "Digit ZEM1 PMT;Amplitude [ADC counts];Counts",100, 0., 1000.);
87 TH1F * hDigitPMZEM2 = new TH1F("hDigitPMZEM2", "Digit ZEM2 PMT;Amplitude [ADC counts];Counts",100, 0., 1000.);
88 Add2DigitsList(hDigitPMCZNC, 0 , !expert, image);
89 Add2DigitsList(hDigitPMCZNA, 1 , !expert, image);
90 Add2DigitsList(hDigitPMCZPC, 2, !expert, image);
91 Add2DigitsList(hDigitPMCZPA, 3, !expert, image);
92 Add2DigitsList(hDigitPMZEM1, 4, !expert, image);
93 Add2DigitsList(hDigitPMZEM2, 5, !expert, image);
44ed7a66 94 //
95 // ------------------- LOW GAIN CHAIN ---------------------------
b72460a5 96 TH1F * hDigitPMCZNClg = new TH1F("hDigitPMCZNClg", "Digit common lg ZNC PMT;Amplitude [ADC counts];Counts",100, 0., 4000.);
97 TH1F * hDigitPMCZNAlg = new TH1F("hDigitPMCZNAlg", "Digit common lg ZNA PMT;Amplitude [ADC counts];Counts",100, 0., 4000.);
98 TH1F * hDigitPMCZPClg = new TH1F("hDigitPMCZPClg", "Digit common lg ZPC PMT;Amplitude [ADC counts];Counts",100, 0., 4000.);
99 TH1F * hDigitPMCZPAlg = new TH1F("hDigitPMCZPAlg", "Digit common lg ZPA PMT;Amplitude [ADC counts];Counts",100, 0., 4000.);
100 TH1F * hDigitPMZEM1lg = new TH1F("hDigitPMZEM1lg", "Digit ZEM1 PMT lg;Amplitude [ADC counts];Counts",100, 0., 4000.);
101 TH1F * hDigitPMZEM2lg = new TH1F("hDigitPMZEM2lg", "Digit ZEM2 PMT lg;Amplitude [ADC counts];Counts",100, 0., 4000.);
102 Add2DigitsList(hDigitPMCZNClg, 6, expert, !image);
103 Add2DigitsList(hDigitPMCZNAlg, 7, expert, !image);
104 Add2DigitsList(hDigitPMCZPClg, 8, expert, !image);
105 Add2DigitsList(hDigitPMCZPAlg, 9, expert, !image);
106 Add2DigitsList(hDigitPMZEM1lg, 10, !expert, image);
107 Add2DigitsList(hDigitPMZEM2lg, 11, !expert, image);
44ed7a66 108 //
b72460a5 109 // ------------------- HIGH GAIN CHAIN ---------------------------
110 TH1F * hDigitPM1ZNC = new TH1F("hDigitPM1ZNC", "Digit PM1 ZNC;Amplitude [ADC counts];Counts",100, 0., 1000.);
111 TH1F * hDigitPM2ZNC = new TH1F("hDigitPM2ZNC", "Digit PM2 ZNC;Amplitude [ADC counts];Counts",100, 0., 1000.);
112 TH1F * hDigitPM3ZNC = new TH1F("hDigitPM3ZNC", "Digit PM3 ZNC;Amplitude [ADC counts];Counts",100, 0., 1000.);
113 TH1F * hDigitPM4ZNC = new TH1F("hDigitPM4ZNC", "Digit PM4 ZNC;Amplitude [ADC counts];Counts",100, 0., 1000.);
114 Add2DigitsList(hDigitPM1ZNC, 12, !expert, image);
115 Add2DigitsList(hDigitPM2ZNC, 13, !expert, image);
116 Add2DigitsList(hDigitPM3ZNC, 14, !expert, image);
117 Add2DigitsList(hDigitPM4ZNC, 15, !expert, image);
118 //
119 TH1F * hDigitPM1ZPC = new TH1F("hDigitPM1ZPC", "Digit PM1 ZPC;Amplitude [ADC counts];Counts",100, 0., 1000.);
120 TH1F * hDigitPM2ZPC = new TH1F("hDigitPM2ZPC", "Digit PM2 ZPC;Amplitude [ADC counts];Counts",100, 0., 1000.);
121 TH1F * hDigitPM3ZPC = new TH1F("hDigitPM3ZPC", "Digit PM3 ZPC;Amplitude [ADC counts];Counts",100, 0., 1000.);
122 TH1F * hDigitPM4ZPC = new TH1F("hDigitPM4ZPC", "Digit PM4 ZPC;Amplitude [ADC counts];Counts",100, 0., 1000.);
123 Add2DigitsList(hDigitPM1ZPC, 16, !expert, image);
124 Add2DigitsList(hDigitPM2ZPC, 17, !expert, image);
125 Add2DigitsList(hDigitPM3ZPC, 18, !expert, image);
126 Add2DigitsList(hDigitPM4ZPC, 19, !expert, image);
127 //
128 TH1F * hDigitPM1ZNA = new TH1F("hDigitPM1ZNA", "Digit PM1 ZNA;Amplitude [ADC counts];Counts",100, 0., 1000.);
129 TH1F * hDigitPM2ZNA = new TH1F("hDigitPM2ZNA", "Digit PM2 ZNA;Amplitude [ADC counts];Counts",100, 0., 1000.);
130 TH1F * hDigitPM3ZNA = new TH1F("hDigitPM3ZNA", "Digit PM3 ZNA;Amplitude [ADC counts];Counts",100, 0., 1000.);
131 TH1F * hDigitPM4ZNA = new TH1F("hDigitPM4ZNA", "Digit PM4 ZNA;Amplitude [ADC counts];Counts",100, 0., 1000.);
132 Add2DigitsList(hDigitPM1ZNA, 20, !expert, image);
133 Add2DigitsList(hDigitPM2ZNA, 21, !expert, image);
134 Add2DigitsList(hDigitPM3ZNA, 22, !expert, image);
135 Add2DigitsList(hDigitPM4ZNA, 23, !expert, image);
136 //
137 TH1F * hDigitPM1ZPA = new TH1F("hDigitPM1ZPA", "Digit PM1 ZPA;Amplitude [ADC counts];Counts",100, 0., 1000.);
138 TH1F * hDigitPM2ZPA = new TH1F("hDigitPM2ZPA", "Digit PM2 ZPA;Amplitude [ADC counts];Counts",100, 0., 1000.);
139 TH1F * hDigitPM3ZPA = new TH1F("hDigitPM3ZPA", "Digit PM3 ZPA;Amplitude [ADC counts];Counts",100, 0., 1000.);
140 TH1F * hDigitPM4ZPA = new TH1F("hDigitPM4ZPA", "Digit PM4 ZPA;Amplitude [ADC counts];Counts",100, 0., 1000.);
141 Add2DigitsList(hDigitPM1ZPA, 24, !expert, image);
142 Add2DigitsList(hDigitPM2ZPA, 25, !expert, image);
143 Add2DigitsList(hDigitPM3ZPA, 26, !expert, image);
144 Add2DigitsList(hDigitPM4ZPA, 27, !expert, image);
44ed7a66 145 //
b72460a5 146 // ------------------- LOW GAIN CHAIN ---------------------------
147 TH1F * hDigitPM1ZNClg = new TH1F("hDigitPM1ZNClg", "Digit PM1 ZNC lg;Amplitude [ADC counts];Counts",100, 0., 1000.);
148 TH1F * hDigitPM2ZNClg = new TH1F("hDigitPM2ZNClg", "Digit PM2 ZNC lg;Amplitude [ADC counts];Counts",100, 0., 1000.);
149 TH1F * hDigitPM3ZNClg = new TH1F("hDigitPM3ZNClg", "Digit PM3 ZNC lg;Amplitude [ADC counts];Counts",100, 0., 1000.);
150 TH1F * hDigitPM4ZNClg = new TH1F("hDigitPM4ZNClg", "Digit PM4 ZNC lg;Amplitude [ADC counts];Counts",100, 0., 1000.);
151 Add2DigitsList(hDigitPM1ZNClg, 28, !expert, image);
152 Add2DigitsList(hDigitPM2ZNClg, 29, !expert, image);
153 Add2DigitsList(hDigitPM3ZNClg, 30, !expert, image);
154 Add2DigitsList(hDigitPM4ZNClg, 31, !expert, image);
155 //
156 TH1F * hDigitPM1ZPClg = new TH1F("hDigitPM1ZPClg", "Digit PM1 ZPC lg;Amplitude [ADC counts];Counts",100, 0., 1000.);
157 TH1F * hDigitPM2ZPClg = new TH1F("hDigitPM2ZPClg", "Digit PM2 ZPC lg;Amplitude [ADC counts];Counts",100, 0., 1000.);
158 TH1F * hDigitPM3ZPClg = new TH1F("hDigitPM3ZPClg", "Digit PM3 ZPC lg;Amplitude [ADC counts];Counts",100, 0., 1000.);
159 TH1F * hDigitPM4ZPClg = new TH1F("hDigitPM4ZPClg", "Digit PM4 ZPC lg;Amplitude [ADC counts];Counts",100, 0., 1000.);
160 Add2DigitsList(hDigitPM1ZPClg, 32, !expert, image);
161 Add2DigitsList(hDigitPM2ZPClg, 33, !expert, image);
162 Add2DigitsList(hDigitPM3ZPClg, 34, !expert, image);
163 Add2DigitsList(hDigitPM4ZPClg, 35, !expert, image);
164 //
165 TH1F * hDigitPM1ZNAlg = new TH1F("hDigitPM1ZNAlg", "Digit PM1 ZNA lg;Amplitude [ADC counts];Counts",100, 0., 1000.);
166 TH1F * hDigitPM2ZNAlg = new TH1F("hDigitPM2ZNAlg", "Digit PM2 ZNA lg;Amplitude [ADC counts];Counts",100, 0., 1000.);
167 TH1F * hDigitPM3ZNAlg = new TH1F("hDigitPM3ZNAlg", "Digit PM3 ZNA lg;Amplitude [ADC counts];Counts",100, 0., 1000.);
168 TH1F * hDigitPM4ZNAlg = new TH1F("hDigitPM4ZNAlg", "Digit PM4 ZNA lg;Amplitude [ADC counts];Counts",100, 0., 1000.);
169 Add2DigitsList(hDigitPM1ZNAlg, 36, !expert, image);
170 Add2DigitsList(hDigitPM2ZNAlg, 37, !expert, image);
171 Add2DigitsList(hDigitPM3ZNAlg, 38, !expert, image);
172 Add2DigitsList(hDigitPM4ZNAlg, 39, !expert, image);
173 //
174 TH1F * hDigitPM1ZPAlg = new TH1F("hDigitPM1ZPAlg", "Digit PM1 ZPA lg;Amplitude [ADC counts];Counts",100, 0., 1000.);
175 TH1F * hDigitPM2ZPAlg = new TH1F("hDigitPM2ZPAlg", "Digit PM2 ZPA lg;Amplitude [ADC counts];Counts",100, 0., 1000.);
176 TH1F * hDigitPM3ZPAlg = new TH1F("hDigitPM3ZPAlg", "Digit PM3 ZPA lg;Amplitude [ADC counts];Counts",100, 0., 1000.);
177 TH1F * hDigitPM4ZPAlg = new TH1F("hDigitPM4ZPAlg", "Digit PM4 ZPA lg;Amplitude [ADC counts];Counts",100, 0., 1000.);
178 Add2DigitsList(hDigitPM1ZPAlg, 40, !expert, image);
179 Add2DigitsList(hDigitPM2ZPAlg, 41, !expert, image);
180 Add2DigitsList(hDigitPM3ZPAlg, 42, !expert, image);
181 Add2DigitsList(hDigitPM4ZPAlg, 43, !expert, image);
213a7d34 182
44ed7a66 183}
184
f5e4ee59 185//____________________________________________________________________________
186void AliZDCQADataMakerRec::InitRecPoints()
187{
188 // create Digits histograms in Digits subdir
189 const Bool_t expert = kTRUE ;
190 const Bool_t image = kTRUE ;
191 //
192 // ------------------- HIGH GAIN CHAIN ---------------------------
193 TH1F * hRecZNCTot = new TH1F("hRecZNCTot", "Rec signal in ZNC;Amplitude [ADC counts];Counts", 100, 0., 6000.);
194 TH1F * hRecZNATot = new TH1F("hRecZNATot", "Rec signal in ZNA;Amplitude [ADC counts];Counts", 100, 0., 6000.);
195 TH1F * hRecZPCTot = new TH1F("hRecZPCTot", "Rec signal in ZPC;Amplitude [ADC counts];Counts", 100, 0., 10000.);
196 TH1F * hRecZPATot = new TH1F("hRecZPATot", "Rec signal in ZPA;Amplitude [ADC counts];Counts", 100, 0., 10000.);
197 Add2RecPointsList(hRecZNCTot, 0, expert, !image);
198 Add2RecPointsList(hRecZNATot, 1, expert, !image);
199 Add2RecPointsList(hRecZPCTot, 2, expert, !image);
200 Add2RecPointsList(hRecZPATot, 3, expert, !image);
201 //
202 TH1F * hRecSumQZNC = new TH1F("hRecSumQZNC", "Rec summed 4 ZNC quadrants;Amplitude [ADC counts];Counts",100, 0., 4000.);
203 TH1F * hRecSumQZNA = new TH1F("hRecSumQZNA", "Rec summed 4 ZNA quadrants;Amplitude [ADC counts];Counts",100, 0., 4000.);
204 TH1F * hRecSumQZPC = new TH1F("hRecSumQZPC", "Rec summed 4 ZPC quadrants;Amplitude [ADC counts];Counts",100, 0., 4000.);
205 TH1F * hRecSumQZPA = new TH1F("hRecSumQZPA", "Rec summed 4 ZPA quadrants;Amplitude [ADC counts];Counts",100, 0., 4000.);
206 Add2RecPointsList(hRecSumQZNC, 4, expert, !image);
207 Add2RecPointsList(hRecSumQZNA, 5, expert, !image);
208 Add2RecPointsList(hRecSumQZPC, 6, expert, !image);
209 Add2RecPointsList(hRecSumQZPA, 7, expert, !image);
210 //
211 TH1F * hRecPMCZNC = new TH1F("hRecPMCZNC", "Rec common ZNC PMT;Amplitude [ADC counts];Counts",100, 0., 4000.);
212 TH1F * hRecPMCZNA = new TH1F("hRecPMCZNA", "Rec common ZNA PMT;Amplitude [ADC counts];Counts",100, 0., 4000.);
213 TH1F * hRecPMCZPC = new TH1F("hRecPMCZPC", "Rec common ZPC PMT;Amplitude [ADC counts];Counts",100, 0., 4000.);
214 TH1F * hRecPMCZPA = new TH1F("hRecPMCZPA", "Rec common ZPA PMT;Amplitude [ADC counts];Counts",100, 0., 4000.);
215 Add2RecPointsList(hRecPMCZNC, 8 , !expert, image);
216 Add2RecPointsList(hRecPMCZNA, 9 , !expert, image);
217 Add2RecPointsList(hRecPMCZPC, 10, !expert, image);
218 Add2RecPointsList(hRecPMCZPA, 11, !expert, image);
219}
220
221
222//____________________________________________________________________________
223void AliZDCQADataMakerRec::InitRaws()
224{
225 // create Digits histograms in Digits subdir
226 const Bool_t expert = kTRUE ;
227 const Bool_t image = kTRUE ;
228 //
229 // ------------------- HIGH GAIN CHAIN ---------------------------
b72460a5 230 TH1F * hRawPMCZNC = new TH1F("hRawPMCZNC", "Raw common ZNC PMT;Amplitude [ADC counts];Counts",100, 0., 1000.);
231 TH1F * hRawPMCZNA = new TH1F("hRawPMCZNA", "Raw common ZNA PMT;Amplitude [ADC counts];Counts",100, 0., 1000.);
232 TH1F * hRawPMCZPC = new TH1F("hRawPMCZPC", "Raw common ZPC PMT;Amplitude [ADC counts];Counts",100, 0., 1000.);
233 TH1F * hRawPMCZPA = new TH1F("hRawPMCZPA", "Raw common ZPA PMT;Amplitude [ADC counts];Counts",100, 0., 1000.);
234 TH1F * hRawPMZEM1 = new TH1F("hRawPMZEM1", "Raw ZEM1 PMT;Amplitude [ADC counts];Counts",100, 0., 1000.);
235 TH1F * hRawPMZEM2 = new TH1F("hRawPMZEM2", "Raw ZEM2 PMT;Amplitude [ADC counts];Counts",100, 0., 1000.);
236 Add2RawsList(hRawPMCZNC, 0 , !expert, image);
237 Add2RawsList(hRawPMCZNA, 1 , !expert, image);
238 Add2RawsList(hRawPMCZPC, 2, !expert, image);
239 Add2RawsList(hRawPMCZPA, 3, !expert, image);
240 Add2RawsList(hRawPMZEM1, 4, !expert, image);
241 Add2RawsList(hRawPMZEM2, 5, !expert, image);
f5e4ee59 242 //
243 // ------------------- LOW GAIN CHAIN ---------------------------
c2bb665a 244 TH1F * hRawPMCZNClg = new TH1F("hRawPMCZNClg", "Raw common lg ZNC PMT;Amplitude [ADC counts];Counts",100, 0., 1000.);
245 TH1F * hRawPMCZNAlg = new TH1F("hRawPMCZNAlg", "Raw common lg ZNA PMT;Amplitude [ADC counts];Counts",100, 0., 1000.);
246 TH1F * hRawPMCZPClg = new TH1F("hRawPMCZPClg", "Raw common lg ZPC PMT;Amplitude [ADC counts];Counts",100, 0., 1000.);
247 TH1F * hRawPMCZPAlg = new TH1F("hRawPMCZPAlg", "Raw common lg ZPA PMT;Amplitude [ADC counts];Counts",100, 0., 1000.);
248 TH1F * hRawPMZEM1lg = new TH1F("hRawPMZEM1lg", "Raw ZEM1 PMT lg;Amplitude [ADC counts];Counts",100, 0., 1000.);
249 TH1F * hRawPMZEM2lg = new TH1F("hRawPMZEM2lg", "Raw ZEM2 PMT lg;Amplitude [ADC counts];Counts",100, 0., 1000.);
b72460a5 250 Add2RawsList(hRawPMCZNClg, 6, expert, !image);
251 Add2RawsList(hRawPMCZNAlg, 7, expert, !image);
252 Add2RawsList(hRawPMCZPClg, 8, expert, !image);
253 Add2RawsList(hRawPMCZPAlg, 9, expert, !image);
254 Add2RawsList(hRawPMZEM1lg, 10, !expert, image);
255 Add2RawsList(hRawPMZEM2lg, 11, !expert, image);
f5e4ee59 256 //
b72460a5 257 // ------------------- HIGH GAIN CHAIN ---------------------------
258 TH1F * hRawPM1ZNC = new TH1F("hRawPM1ZNC", "Raw PM1 ZNC;Amplitude [ADC counts];Counts",100, 0., 1000.);
259 TH1F * hRawPM2ZNC = new TH1F("hRawPM2ZNC", "Raw PM2 ZNC;Amplitude [ADC counts];Counts",100, 0., 1000.);
260 TH1F * hRawPM3ZNC = new TH1F("hRawPM3ZNC", "Raw PM3 ZNC;Amplitude [ADC counts];Counts",100, 0., 1000.);
261 TH1F * hRawPM4ZNC = new TH1F("hRawPM4ZNC", "Raw PM4 ZNC;Amplitude [ADC counts];Counts",100, 0., 1000.);
262 Add2RawsList(hRawPM1ZNC, 12, !expert, image);
263 Add2RawsList(hRawPM2ZNC, 13, !expert, image);
264 Add2RawsList(hRawPM3ZNC, 14, !expert, image);
265 Add2RawsList(hRawPM4ZNC, 15, !expert, image);
266 //
267 TH1F * hRawPM1ZPC = new TH1F("hRawPM1ZPC", "Raw PM1 ZPC;Amplitude [ADC counts];Counts",100, 0., 1000.);
268 TH1F * hRawPM2ZPC = new TH1F("hRawPM2ZPC", "Raw PM2 ZPC;Amplitude [ADC counts];Counts",100, 0., 1000.);
269 TH1F * hRawPM3ZPC = new TH1F("hRawPM3ZPC", "Raw PM3 ZPC;Amplitude [ADC counts];Counts",100, 0., 1000.);
270 TH1F * hRawPM4ZPC = new TH1F("hRawPM4ZPC", "Raw PM4 ZPC;Amplitude [ADC counts];Counts",100, 0., 1000.);
271 Add2RawsList(hRawPM1ZPC, 16, !expert, image);
272 Add2RawsList(hRawPM2ZPC, 17, !expert, image);
273 Add2RawsList(hRawPM3ZPC, 18, !expert, image);
274 Add2RawsList(hRawPM4ZPC, 19, !expert, image);
275 //
276 TH1F * hRawPM1ZNA = new TH1F("hRawPM1ZNA", "Raw PM1 ZNA;Amplitude [ADC counts];Counts",100, 0., 1000.);
277 TH1F * hRawPM2ZNA = new TH1F("hRawPM2ZNA", "Raw PM2 ZNA;Amplitude [ADC counts];Counts",100, 0., 1000.);
278 TH1F * hRawPM3ZNA = new TH1F("hRawPM3ZNA", "Raw PM3 ZNA;Amplitude [ADC counts];Counts",100, 0., 1000.);
279 TH1F * hRawPM4ZNA = new TH1F("hRawPM4ZNA", "Raw PM4 ZNA;Amplitude [ADC counts];Counts",100, 0., 1000.);
280 Add2RawsList(hRawPM1ZNA, 20, !expert, image);
281 Add2RawsList(hRawPM2ZNA, 21, !expert, image);
282 Add2RawsList(hRawPM3ZNA, 22, !expert, image);
283 Add2RawsList(hRawPM4ZNA, 23, !expert, image);
284 //
285 TH1F * hRawPM1ZPA = new TH1F("hRawPM1ZPA", "Raw PM1 ZPA;Amplitude [ADC counts];Counts",100, 0., 1000.);
286 TH1F * hRawPM2ZPA = new TH1F("hRawPM2ZPA", "Raw PM2 ZPA;Amplitude [ADC counts];Counts",100, 0., 1000.);
287 TH1F * hRawPM3ZPA = new TH1F("hRawPM3ZPA", "Raw PM3 ZPA;Amplitude [ADC counts];Counts",100, 0., 1000.);
288 TH1F * hRawPM4ZPA = new TH1F("hRawPM4ZPA", "Raw PM4 ZPA;Amplitude [ADC counts];Counts",100, 0., 1000.);
289 Add2RawsList(hRawPM1ZPA, 24, !expert, image);
290 Add2RawsList(hRawPM2ZPA, 25, !expert, image);
291 Add2RawsList(hRawPM3ZPA, 26, !expert, image);
292 Add2RawsList(hRawPM4ZPA, 27, !expert, image);
f5e4ee59 293 //
b72460a5 294 // ------------------- LOW GAIN CHAIN ---------------------------
295 TH1F * hRawPM1ZNClg = new TH1F("hRawPM1ZNClg", "Raw PM1 ZNC lg;Amplitude [ADC counts];Counts",100, 0., 1000.);
296 TH1F * hRawPM2ZNClg = new TH1F("hRawPM2ZNClg", "Raw PM2 ZNC lg;Amplitude [ADC counts];Counts",100, 0., 1000.);
297 TH1F * hRawPM3ZNClg = new TH1F("hRawPM3ZNClg", "Raw PM3 ZNC lg;Amplitude [ADC counts];Counts",100, 0., 1000.);
298 TH1F * hRawPM4ZNClg = new TH1F("hRawPM4ZNClg", "Raw PM4 ZNC lg;Amplitude [ADC counts];Counts",100, 0., 1000.);
299 Add2RawsList(hRawPM1ZNClg, 28, !expert, image);
300 Add2RawsList(hRawPM2ZNClg, 29, !expert, image);
301 Add2RawsList(hRawPM3ZNClg, 30, !expert, image);
302 Add2RawsList(hRawPM4ZNClg, 31, !expert, image);
303 //
304 TH1F * hRawPM1ZPClg = new TH1F("hRawPM1ZPClg", "Raw PM1 ZPC lg;Amplitude [ADC counts];Counts",100, 0., 1000.);
305 TH1F * hRawPM2ZPClg = new TH1F("hRawPM2ZPClg", "Raw PM2 ZPC lg;Amplitude [ADC counts];Counts",100, 0., 1000.);
306 TH1F * hRawPM3ZPClg = new TH1F("hRawPM3ZPClg", "Raw PM3 ZPC lg;Amplitude [ADC counts];Counts",100, 0., 1000.);
307 TH1F * hRawPM4ZPClg = new TH1F("hRawPM4ZPClg", "Raw PM4 ZPC lg;Amplitude [ADC counts];Counts",100, 0., 1000.);
308 Add2RawsList(hRawPM1ZPClg, 32, !expert, image);
309 Add2RawsList(hRawPM2ZPClg, 33, !expert, image);
310 Add2RawsList(hRawPM3ZPClg, 34, !expert, image);
311 Add2RawsList(hRawPM4ZPClg, 35, !expert, image);
312 //
313 TH1F * hRawPM1ZNAlg = new TH1F("hRawPM1ZNAlg", "Raw PM1 ZNA lg;Amplitude [ADC counts];Counts",100, 0., 1000.);
314 TH1F * hRawPM2ZNAlg = new TH1F("hRawPM2ZNAlg", "Raw PM2 ZNA lg;Amplitude [ADC counts];Counts",100, 0., 1000.);
315 TH1F * hRawPM3ZNAlg = new TH1F("hRawPM3ZNAlg", "Raw PM3 ZNA lg;Amplitude [ADC counts];Counts",100, 0., 1000.);
316 TH1F * hRawPM4ZNAlg = new TH1F("hRawPM4ZNAlg", "Raw PM4 ZNA lg;Amplitude [ADC counts];Counts",100, 0., 1000.);
317 Add2RawsList(hRawPM1ZNAlg, 36, !expert, image);
318 Add2RawsList(hRawPM2ZNAlg, 37, !expert, image);
319 Add2RawsList(hRawPM3ZNAlg, 38, !expert, image);
320 Add2RawsList(hRawPM4ZNAlg, 39, !expert, image);
321 //
322 TH1F * hRawPM1ZPAlg = new TH1F("hRawPM1ZPAlg", "Raw PM1 ZPA lg;Amplitude [ADC counts];Counts",100, 0., 1000.);
323 TH1F * hRawPM2ZPAlg = new TH1F("hRawPM2ZPAlg", "Raw PM2 ZPA lg;Amplitude [ADC counts];Counts",100, 0., 1000.);
324 TH1F * hRawPM3ZPAlg = new TH1F("hRawPM3ZPAlg", "Raw PM3 ZPA lg;Amplitude [ADC counts];Counts",100, 0., 1000.);
325 TH1F * hRawPM4ZPAlg = new TH1F("hRawPM4ZPAlg", "Raw PM4 ZPA lg;Amplitude [ADC counts];Counts",100, 0., 1000.);
326 Add2RawsList(hRawPM1ZPAlg, 40, !expert, image);
327 Add2RawsList(hRawPM2ZPAlg, 41, !expert, image);
328 Add2RawsList(hRawPM3ZPAlg, 42, !expert, image);
329 Add2RawsList(hRawPM4ZPAlg, 43, !expert, image);
f5e4ee59 330}
331
075a0e70 332//____________________________________________________________________________
333void AliZDCQADataMakerRec::InitESDs()
334{
335 //Booking ESDs histograms
336 //
b72460a5 337 const Bool_t expert = kTRUE ;
338 const Bool_t image = kTRUE ;
7d297381 339
075a0e70 340 TH2F * hZNC = new TH2F("hZNC", "Centroid in ZNC", 100, -5.,5.,100,-5.,5.);
341 TH2F * hZNA = new TH2F("hZNA", "Centroid in ZNA", 100, -5.,5.,100,-5.,5.);
7d297381 342 Add2ESDsList(hZNC, 0, !expert, image);
343 Add2ESDsList(hZNA, 1, !expert, image);
075a0e70 344 //
fdc38bb2 345 // ------------------- HIGH GAIN CHAIN ---------------------------
3d26d59b 346 TH1F * hESDZNCTot = new TH1F("hESDZNCTot", "Energy in ZNC", 100, 0., 6000.);
3d26d59b 347 TH1F * hESDZNATot = new TH1F("hESDZNATot", "Energy in ZNA", 100, 0., 6000.);
fdc38bb2 348 TH1F * hESDZPCTot = new TH1F("hESDZPCTot", "Energy in ZPC", 100, 0., 10000.);
3d26d59b 349 TH1F * hESDZPATot = new TH1F("hESDZPATot", "Energy in ZPA", 100, 0., 10000.);
f5e4ee59 350 Add2ESDsList(hESDZNCTot, 2, expert, !image);
351 Add2ESDsList(hESDZNATot, 3, expert, !image);
352 Add2ESDsList(hESDZPCTot, 4, expert, !image);
353 Add2ESDsList(hESDZPATot, 5, expert, !image);
075a0e70 354 //
3d26d59b 355 TH1F * hESDSumQZNC = new TH1F("hESDSumQZNC", "Sum of 4 ZNC energy",100, 0., 4000.);
3d26d59b 356 TH1F * hESDSumQZNA = new TH1F("hESDSumQZNA", "Sum of 4 ZNA energy",100, 0., 4000.);
fdc38bb2 357 TH1F * hESDSumQZPC = new TH1F("hESDSumQZPC", "Sum of 4 ZPC energy",100, 0., 4000.);
3d26d59b 358 TH1F * hESDSumQZPA = new TH1F("hESDSumQZPA", "Sum of 4 ZPA energy",100, 0., 4000.);
7d297381 359 Add2ESDsList(hESDSumQZNC, 6, expert, !image);
360 Add2ESDsList(hESDSumQZNA, 7, expert, !image);
361 Add2ESDsList(hESDSumQZPC, 8, expert, !image);
362 Add2ESDsList(hESDSumQZPA, 9, expert, !image);
075a0e70 363 //
3d26d59b 364 TH1F * hESDPMCZNC = new TH1F("hESDPMCZNC", "Energy in common ZNC PMT",100, 0., 4000.);
3d26d59b 365 TH1F * hESDPMCZNA = new TH1F("hESDPMCZNA", "Energy in common ZNA PMT",100, 0., 4000.);
fdc38bb2 366 TH1F * hESDPMCZPC = new TH1F("hESDPMCZPC", "Energy in common ZPC PMT",100, 0., 4000.);
3d26d59b 367 TH1F * hESDPMCZPA = new TH1F("hESDPMCZPA", "Energy in common ZPA PMT",100, 0., 4000.);
f5e4ee59 368 Add2ESDsList(hESDPMCZNC, 10, !expert, image);
369 Add2ESDsList(hESDPMCZNA, 11, !expert, image);
370 Add2ESDsList(hESDPMCZPC, 12, !expert, image);
371 Add2ESDsList(hESDPMCZPA, 13, !expert, image);
075a0e70 372 //
213a7d34 373 // ------------------- LOW GAIN CHAIN ---------------------------
3d26d59b 374 TH1F * hESDZNCTotlg = new TH1F("hESDZNCTotlg", "ESD lg signal in ZNC", 100, 0., 6000.);
375 TH1F * hESDZNATotlg = new TH1F("hESDZNATotlg", "ESD lg signal in ZNA", 100, 0., 6000.);
376 TH1F * hESDZPCTotlg = new TH1F("hESDZPCTotlg", "ESD lg signal in ZPC", 100, 0., 10000.);
377 TH1F * hESDZPATotlg = new TH1F("hESDZPATotlg", "ESD lg signal in ZPA", 100, 0., 10000.);
f5e4ee59 378 Add2ESDsList(hESDZNCTotlg, expert, !image);
379 Add2ESDsList(hESDZNATotlg, expert, !image);
380 Add2ESDsList(hESDZPCTotlg, expert, !image);
381 Add2ESDsList(hESDZPATotlg, expert, !image);
075a0e70 382 //
3d26d59b 383 TH1F * hESDSumQZNClg = new TH1F("hESDSumQZNClg", "Sum of 4 lg ZNC sectors",100, 0., 4000.);
3d26d59b 384 TH1F * hESDSumQZNAlg = new TH1F("hESDSumQZNAlg", "Sum of 4 lg ZNA sectors",100, 0., 4000.);
fdc38bb2 385 TH1F * hESDSumQZPClg = new TH1F("hESDSumQZPClg", "Sum of 4 lg ZPC sectors",100, 0., 4000.);
3d26d59b 386 TH1F * hESDSumQZPAlg = new TH1F("hESDSumQZPAlg", "Sum of 4 lg ZPA sectors",100, 0., 4000.);
7d297381 387 Add2ESDsList(hESDSumQZNClg, 18, expert, !image);
388 Add2ESDsList(hESDSumQZNAlg, 19, expert, !image);
389 Add2ESDsList(hESDSumQZPClg, 20, expert, !image);
390 Add2ESDsList(hESDSumQZPAlg, 21, expert, !image);
075a0e70 391 //
3d26d59b 392 TH1F * hESDPMCZNClg = new TH1F("hESDPMCZNClg", "Signal in common ZNC lg PMT",100, 0., 4000.);
3d26d59b 393 TH1F * hESDPMCZNAlg = new TH1F("hESDPMCZNAlg", "Signal in common ZNA lg PMT",100, 0., 4000.);
fdc38bb2 394 TH1F * hESDPMCZPClg = new TH1F("hESDPMCZPClg", "Signal in common ZPC lg PMT",100, 0., 4000.);
3d26d59b 395 TH1F * hESDPMCZPAlg = new TH1F("hESDPMCZPAlg", "Signal in common ZPA lg PMT",100, 0., 4000.);
7d297381 396 Add2ESDsList(hESDPMCZNClg, 22, expert, !image);
397 Add2ESDsList(hESDPMCZNAlg, 23, expert, !image);
398 Add2ESDsList(hESDPMCZPClg, 24, expert, !image);
213a7d34 399 Add2ESDsList(hESDPMCZPAlg, 25, expert, !image);
075a0e70 400}
075a0e70 401
44ed7a66 402//___________________________________________________________________________
f5e4ee59 403void AliZDCQADataMakerRec::MakeDigits(TTree *digitTree)
44ed7a66 404{
b72460a5 405 // Check id histograms already created for this Event Specie
406 if(!GetDigitsData(0)) InitDigits() ;
407
44ed7a66 408 TBranch * branch = digitTree->GetBranch("ZDC");
409 if(!branch){
410 AliError("ZDC branch in Digit Tree not found");
411 return;
412 }
eca4fa66 413
eca4fa66 414
415 branch->SetAddress(&fDigit);
44ed7a66 416
b19cc8d0 417 Long64_t ndig = digitTree->GetEntries();
b72460a5 418
419 for(Int_t i=0; i<ndig; i++){
44ed7a66 420 digitTree->GetEntry(i);
b72460a5 421 if(fDigit->GetSector(0)==1 && fDigit->GetSector(1)!=5){
422 if(fDigit->GetSector(1)==0){
423 GetDigitsData(0)->Fill(fDigit->GetADCValue(0));
424 GetDigitsData(6)->Fill(fDigit->GetADCValue(1));
425 }
426 else if(fDigit->GetSector(1)==1){
427 GetDigitsData(12)->Fill(fDigit->GetADCValue(0));
428 GetDigitsData(28)->Fill(fDigit->GetADCValue(1));
429 }
430 else if(fDigit->GetSector(1)==2){
431 GetDigitsData(13)->Fill(fDigit->GetADCValue(0));
432 GetDigitsData(29)->Fill(fDigit->GetADCValue(1));
44ed7a66 433 }
b72460a5 434 else if(fDigit->GetSector(1)==3){
435 GetDigitsData(14)->Fill(fDigit->GetADCValue(0));
436 GetDigitsData(30)->Fill(fDigit->GetADCValue(1));
437 }
438 else if(fDigit->GetSector(1)==4){
439 GetDigitsData(15)->Fill(fDigit->GetADCValue(0));
440 GetDigitsData(31)->Fill(fDigit->GetADCValue(1));
44ed7a66 441 }
442 }
443 else if(fDigit->GetSector(0)==2){
b72460a5 444 if(fDigit->GetSector(1)==0){
445 GetDigitsData(2)->Fill(fDigit->GetADCValue(0));
446 GetDigitsData(8)->Fill(fDigit->GetADCValue(1));
447 }
448 else if(fDigit->GetSector(1)==1){
449 GetDigitsData(16)->Fill(fDigit->GetADCValue(0));
450 GetDigitsData(32)->Fill(fDigit->GetADCValue(1));
451 }
452 else if(fDigit->GetSector(1)==2){
453 GetDigitsData(17)->Fill(fDigit->GetADCValue(0));
454 GetDigitsData(33)->Fill(fDigit->GetADCValue(1));
44ed7a66 455 }
b72460a5 456 else if(fDigit->GetSector(1)==3){
457 GetDigitsData(18)->Fill(fDigit->GetADCValue(0));
458 GetDigitsData(34)->Fill(fDigit->GetADCValue(1));
459 }
460 else if(fDigit->GetSector(1)==4){
461 GetDigitsData(19)->Fill(fDigit->GetADCValue(0));
462 GetDigitsData(35)->Fill(fDigit->GetADCValue(1));
44ed7a66 463 }
464 }
b72460a5 465 else if(fDigit->GetSector(0)==3){
466 if(fDigit->GetSector(1)==1){
467 GetDigitsData(4)->Fill(fDigit->GetADCValue(0));
468 GetDigitsData(10)->Fill(fDigit->GetADCValue(1));
469 }
470 else if(fDigit->GetSector(1)==2){
471 GetDigitsData(5)->Fill(fDigit->GetADCValue(0));
472 GetDigitsData(11)->Fill(fDigit->GetADCValue(1));
473 }
474 }
475 else if(fDigit->GetSector(0)==4 && fDigit->GetSector(1)!=5){
476 if(fDigit->GetSector(1)==0){
477 GetDigitsData(1)->Fill(fDigit->GetADCValue(0));
478 GetDigitsData(7)->Fill(fDigit->GetADCValue(1));
479 }
480 else if(fDigit->GetSector(1)==1){
481 GetDigitsData(20)->Fill(fDigit->GetADCValue(0));
482 GetDigitsData(36)->Fill(fDigit->GetADCValue(1));
483 }
484 else if(fDigit->GetSector(1)==2){
485 GetDigitsData(21)->Fill(fDigit->GetADCValue(0));
486 GetDigitsData(37)->Fill(fDigit->GetADCValue(1));
44ed7a66 487 }
b72460a5 488 else if(fDigit->GetSector(1)==3){
489 GetDigitsData(22)->Fill(fDigit->GetADCValue(0));
490 GetDigitsData(38)->Fill(fDigit->GetADCValue(1));
491 }
492 else if(fDigit->GetSector(1)==4){
493 GetDigitsData(23)->Fill(fDigit->GetADCValue(0));
494 GetDigitsData(39)->Fill(fDigit->GetADCValue(1));
44ed7a66 495 }
496 }
497 else if(fDigit->GetSector(0)==5){
b72460a5 498 if(fDigit->GetSector(1)==0){
499 GetDigitsData(3)->Fill(fDigit->GetADCValue(0));
500 GetDigitsData(9)->Fill(fDigit->GetADCValue(1));
501 }
502 else if(fDigit->GetSector(1)==1){
503 GetDigitsData(24)->Fill(fDigit->GetADCValue(0));
504 GetDigitsData(40)->Fill(fDigit->GetADCValue(1));
505 }
506 else if(fDigit->GetSector(1)==2){
507 GetDigitsData(25)->Fill(fDigit->GetADCValue(0));
508 GetDigitsData(41)->Fill(fDigit->GetADCValue(1));
44ed7a66 509 }
b72460a5 510 else if(fDigit->GetSector(1)==3){
511 GetDigitsData(26)->Fill(fDigit->GetADCValue(0));
512 GetDigitsData(42)->Fill(fDigit->GetADCValue(1));
513 }
514 else if(fDigit->GetSector(1)==4){
515 GetDigitsData(27)->Fill(fDigit->GetADCValue(0));
516 GetDigitsData(43)->Fill(fDigit->GetADCValue(1));
44ed7a66 517 }
518 }
519 }
44ed7a66 520}
521
f5e4ee59 522//____________________________________________________________________________
523void AliZDCQADataMakerRec::MakeRecPoints(TTree * clustersTree)
524{
525 // Filling QA histos from RecPoints
526
527 TBranch *branch = clustersTree->GetBranch("ZDC");
528 if(!branch){
529 AliError("Can't get the ZDC branch for rec points!");
530 return;
531 }
532
533 if(!GetRecPointsData(0)) InitRecPoints() ;
534
535 Float_t sum_ZNC=0., sum_ZNA=0., sum_ZPC=0., sum_ZPA=0.;
536 Float_t sumQ_ZNC=0., sumQ_ZNA=0., sumQ_ZPC=0., sumQ_ZPA=0.;
537
538 AliZDCReco reco;
539 AliZDCReco* preco = &reco;
540 clustersTree->SetBranchAddress("ZDC", &preco);
541
542 clustersTree->GetEntry(0);
543 for(Int_t i=0; i<5; i++){
544 sum_ZNC += reco.GetZN1HREnTow(i);
545 sum_ZPC += reco.GetZN2HREnTow(i);
546 sum_ZNA += reco.GetZP1HREnTow(i);
547 sum_ZPA += reco.GetZP2HREnTow(i);
548 if(i==0){
549 GetRecPointsData(8)->Fill(reco.GetZN1HREnTow(i));
550 GetRecPointsData(9)->Fill(reco.GetZN2HREnTow(i));
551 GetRecPointsData(10)->Fill(reco.GetZP1HREnTow(i));
552 GetRecPointsData(11)->Fill(reco.GetZP2HREnTow(i));
553 }
554 else{
555 sumQ_ZNC += reco.GetZN1HREnTow(i);
556 sumQ_ZPC += reco.GetZN2HREnTow(i);
557 sumQ_ZNA += reco.GetZP1HREnTow(i);
558 sumQ_ZPA += reco.GetZP2HREnTow(i);
559 }
560 }
561
562 GetRecPointsData(0)->Fill(sum_ZNC);
563 GetRecPointsData(1)->Fill(sum_ZPC);
564 GetRecPointsData(2)->Fill(sum_ZNA);
565 GetRecPointsData(3)->Fill(sum_ZPA);
566 //
567 GetRecPointsData(4)->Fill(sumQ_ZNC);
568 GetRecPointsData(5)->Fill(sumQ_ZPC);
569 GetRecPointsData(6)->Fill(sumQ_ZNA);
570 GetRecPointsData(7)->Fill(sumQ_ZPA);
571
572}
573
574//____________________________________________________________________________
575void AliZDCQADataMakerRec::MakeRaws(AliRawReader *rawReader)
576{
577 // Filling Raws QA histos
578 //
579 // Check if histograms already created for this Event Specie
580 if(!GetRawsData(0)) InitRaws();
b72460a5 581
f5e4ee59 582 AliZDCRawStream stream(rawReader);
583 while(stream.Next()){
584 if(stream.IsADCDataWord() &&
585 (stream.GetADCModule()==0 || stream.GetADCModule()==1)){
b72460a5 586
587 if(stream.GetSector(0)==1 && stream.GetSector(1)!=5){
588 if(stream.GetSector(1)==0){
589 if(stream.GetADCGain()==0) GetRawsData(0)->Fill(stream.GetADCValue());
590 else if(stream.GetADCGain()==1) GetRawsData(6)->Fill(stream.GetADCValue());
591 }
592 else if(stream.GetSector(1)==1){
593 if(stream.GetADCGain()==0) GetRawsData(12)->Fill(stream.GetADCValue());
594 else if(stream.GetADCGain()==1) GetRawsData(28)->Fill(stream.GetADCValue());
595 }
596 else if(stream.GetSector(1)==2){
597 if(stream.GetADCGain()==0) GetRawsData(13)->Fill(stream.GetADCValue());
598 else if(stream.GetADCGain()==1) GetRawsData(29)->Fill(stream.GetADCValue());
f5e4ee59 599 }
b72460a5 600 else if(stream.GetSector(1)==3){
601 if(stream.GetADCGain()==0) GetRawsData(14)->Fill(stream.GetADCValue());
602 else if(stream.GetADCGain()==1) GetRawsData(30)->Fill(stream.GetADCValue());
603 }
604 else if(stream.GetSector(1)==4){
605 if(stream.GetADCGain()==0) GetRawsData(15)->Fill(stream.GetADCValue());
606 else if(stream.GetADCGain()==1) GetRawsData(31)->Fill(stream.GetADCValue());
f5e4ee59 607 }
608 }
b72460a5 609 else if(stream.GetSector(0)==2){
610 if(stream.GetSector(1)==0){
611 if(stream.GetADCGain()==0) GetRawsData(2)->Fill(stream.GetADCValue());
612 else if(stream.GetADCGain()==1) GetRawsData(8)->Fill(stream.GetADCValue());
613 }
614 else if(stream.GetSector(1)==1){
615 if(stream.GetADCGain()==0) GetRawsData(16)->Fill(stream.GetADCValue());
616 else if(stream.GetADCGain()==1) GetRawsData(32)->Fill(stream.GetADCValue());
617 }
618 else if(stream.GetSector(1)==2){
619 if(stream.GetADCGain()==0) GetRawsData(17)->Fill(stream.GetADCValue());
620 else if(stream.GetADCGain()==1) GetRawsData(33)->Fill(stream.GetADCValue());
621 }
622 else if(stream.GetSector(1)==3){
623 if(stream.GetADCGain()==0) GetRawsData(18)->Fill(stream.GetADCValue());
624 else if(stream.GetADCGain()==1) GetRawsData(34)->Fill(stream.GetADCValue());
625 }
626 else if(stream.GetSector(1)==4){
627 if(stream.GetADCGain()==0) GetRawsData(19)->Fill(stream.GetADCValue());
628 else if(stream.GetADCGain()==1) GetRawsData(35)->Fill(stream.GetADCValue());
629 }
630 }
631 else if(stream.GetSector(0)==3){
632 if(stream.GetSector(1)==1){ // ZEM1
633 if(stream.GetADCGain()==0) GetRawsData(4)->Fill(stream.GetADCValue());
f5e4ee59 634 else GetRawsData(10)->Fill(stream.GetADCValue());
635 }
b72460a5 636 else if(stream.GetSector(1)==2){ // ZEM2
637 if(stream.GetADCGain()==0) GetRawsData(5)->Fill(stream.GetADCValue());
638 else GetRawsData(11)->Fill(stream.GetADCValue());
f5e4ee59 639 }
640 }
b72460a5 641 else if(stream.GetSector(0)==4 && stream.GetSector(1)!=5){
642 if(stream.GetSector(1)==0){
643 if(stream.GetADCGain()==0) GetRawsData(1)->Fill(stream.GetADCValue());
644 else if(stream.GetADCGain()==1) GetRawsData(7)->Fill(stream.GetADCValue());
645 }
646 else if(stream.GetSector(1)==1){
647 if(stream.GetADCGain()==0) GetRawsData(20)->Fill(stream.GetADCValue());
648 else if(stream.GetADCGain()==1) GetRawsData(36)->Fill(stream.GetADCValue());
649 }
650 else if(stream.GetSector(1)==2){
651 if(stream.GetADCGain()==0) GetRawsData(21)->Fill(stream.GetADCValue());
652 else if(stream.GetADCGain()==1) GetRawsData(37)->Fill(stream.GetADCValue());
f5e4ee59 653 }
b72460a5 654 else if(stream.GetSector(1)==3){
655 if(stream.GetADCGain()==0) GetRawsData(22)->Fill(stream.GetADCValue());
656 else if(stream.GetADCGain()==1) GetRawsData(38)->Fill(stream.GetADCValue());
657 }
658 else if(stream.GetSector(1)==4){
659 if(stream.GetADCGain()==0) GetRawsData(23)->Fill(stream.GetADCValue());
660 else if(stream.GetADCGain()==1) GetRawsData(39)->Fill(stream.GetADCValue());
f5e4ee59 661 }
662 }
663 else if(stream.GetSector(0)==5){
b72460a5 664 if(stream.GetSector(1)==0){
665 if(stream.GetADCGain()==0) GetRawsData(3)->Fill(stream.GetADCValue());
666 else if(stream.GetADCGain()==1) GetRawsData(9)->Fill(stream.GetADCValue());
667 }
668 else if(stream.GetSector(1)==1){
669 if(stream.GetADCGain()==0) GetRawsData(24)->Fill(stream.GetADCValue());
670 else if(stream.GetADCGain()==1) GetRawsData(40)->Fill(stream.GetADCValue());
671 }
672 else if(stream.GetSector(1)==2){
673 if(stream.GetADCGain()==0) GetRawsData(25)->Fill(stream.GetADCValue());
674 else if(stream.GetADCGain()==1) GetRawsData(41)->Fill(stream.GetADCValue());
675 }
676 else if(stream.GetSector(1)==3){
677 if(stream.GetADCGain()==0) GetRawsData(26)->Fill(stream.GetADCValue());
678 else if(stream.GetADCGain()==1) GetRawsData(42)->Fill(stream.GetADCValue());
f5e4ee59 679 }
b72460a5 680 else if(stream.GetSector(1)==4){
681 if(stream.GetADCGain()==0) GetRawsData(27)->Fill(stream.GetADCValue());
682 else if(stream.GetADCGain()==1) GetRawsData(43)->Fill(stream.GetADCValue());
f5e4ee59 683 }
684 }
685 }
b72460a5 686
f5e4ee59 687 }
b72460a5 688
f5e4ee59 689// stream.Delete();
690}
691
075a0e70 692//____________________________________________________________________________
693void AliZDCQADataMakerRec::MakeESDs(AliESDEvent * esd)
694{
695 // make QA data from ESDs
696 //
eca4fa66 697
698 // Check id histograms already created for this Event Specie
b72460a5 699 if(!GetESDsData(0))
eca4fa66 700 InitESDs() ;
701
075a0e70 702 AliESDZDC * zdcESD = esd->GetESDZDC();
703 //
b72460a5 704 TString beamType = esd->GetBeamType();
fab7bea4 705 const Double_t *centr_ZNC, *centr_ZNA;
b72460a5 706 if(((beamType.CompareTo("pp"))==0) || ((beamType.CompareTo("p-p"))==0)
707 ||((beamType.CompareTo("PP"))==0) || ((beamType.CompareTo("P-P"))==0)){
fab7bea4 708 Float_t beamEne = esd->GetBeamEnergy();
709 centr_ZNC = zdcESD->GetZNCCentroidInPbPb(beamEne);
710 centr_ZNA = zdcESD->GetZNACentroidInPbPb(beamEne);
7fb6778e 711 //
712 GetESDsData(0)->Fill(centr_ZNC[0], centr_ZNC[1]);
713 GetESDsData(1)->Fill(centr_ZNA[0], centr_ZNA[1]);
b72460a5 714 }
715 else if((beamType.CompareTo("A-A")) == 0){
fab7bea4 716 centr_ZNC = zdcESD->GetZNCCentroidInpp();
717 centr_ZNA = zdcESD->GetZNACentroidInpp();
7fb6778e 718 //
719 GetESDsData(0)->Fill(centr_ZNC[0], centr_ZNC[1]);
720 GetESDsData(1)->Fill(centr_ZNA[0], centr_ZNA[1]);
721 }
722 else{
723 GetESDsData(0)->Fill(0., 0.);
724 GetESDsData(1)->Fill(0., 0.);
b72460a5 725 }
2b6cdc43 726
075a0e70 727 //
728 GetESDsData(2)->Fill(esd->GetZDCN1Energy());
fdc38bb2 729 GetESDsData(3)->Fill(esd->GetZDCN2Energy());
730 GetESDsData(4)->Fill(esd->GetZDCP1Energy());
075a0e70 731 GetESDsData(5)->Fill(esd->GetZDCP2Energy());
732 //
fdc38bb2 733 Double_t sumQZNC=0., sumQZPC=0., sumQZNA=0., sumQZPA=0.;
213a7d34 734 Double_t sumQZNC_lg=0., sumQZPC_lg=0., sumQZNA_lg=0., sumQZPA_lg=0.;
075a0e70 735 //
fdc38bb2 736 const Double_t *towZNC, *towZPC, *towZNA, *towZPA;
213a7d34 737 const Double_t *towZNC_lg, *towZPC_lg, *towZNA_lg, *towZPA_lg;
075a0e70 738 //
fdc38bb2 739 towZNC = zdcESD->GetZN1TowerEnergy();
740 towZPC = zdcESD->GetZP1TowerEnergy();
741 towZNA = zdcESD->GetZN2TowerEnergy();
742 towZPA = zdcESD->GetZP2TowerEnergy();
075a0e70 743 //
213a7d34 744 towZNC_lg = zdcESD->GetZN1TowerEnergyLR();
fdc38bb2 745 towZPC_lg = zdcESD->GetZP1TowerEnergyLR();
746 towZNA_lg = zdcESD->GetZN2TowerEnergyLR();
213a7d34 747 towZPA_lg = zdcESD->GetZP2TowerEnergyLR();
075a0e70 748 //
749 for(Int_t i=0; i<5; i++){
750 if(i==0){
fdc38bb2 751 GetESDsData(10)->Fill(towZNC[i]);
752 GetESDsData(11)->Fill(towZNA[i]);
753 GetESDsData(12)->Fill(towZPC[i]);
754 GetESDsData(13)->Fill(towZPA[i]);
075a0e70 755 //
213a7d34 756 GetESDsData(22)->Fill(towZNC_lg[i]);
fdc38bb2 757 GetESDsData(23)->Fill(towZNA_lg[i]);
758 GetESDsData(24)->Fill(towZPC_lg[i]);
213a7d34 759 GetESDsData(25)->Fill(towZPA_lg[i]);
075a0e70 760 }
761 else{
fdc38bb2 762 sumQZNC += towZNC[i];
763 sumQZPC += towZPC[i];
764 sumQZNA += towZNA[i];
765 sumQZPA += towZPA[i];
075a0e70 766 //
213a7d34 767 sumQZNC_lg += towZNC_lg[i];
fdc38bb2 768 sumQZPC_lg += towZPC_lg[i];
769 sumQZNA_lg += towZNA_lg[i];
213a7d34 770 sumQZPA_lg += towZPA_lg[i];
075a0e70 771 }
772 }
fdc38bb2 773 GetESDsData(6)->Fill(sumQZNC);
774 GetESDsData(7)->Fill(sumQZNA);
775 GetESDsData(8)->Fill(sumQZPC);
776 GetESDsData(9)->Fill(sumQZPA);
075a0e70 777 //
213a7d34 778 GetESDsData(18)->Fill(sumQZNC_lg);
fdc38bb2 779 GetESDsData(19)->Fill(sumQZNA_lg);
780 GetESDsData(20)->Fill(sumQZPC_lg);
213a7d34 781 GetESDsData(21)->Fill(sumQZPA_lg);
075a0e70 782}
783
784//____________________________________________________________________________
785void AliZDCQADataMakerRec::StartOfDetectorCycle()
786{
787 //Detector specific actions at start of cycle
788
789}
790
791//____________________________________________________________________________
4e25ac79 792void AliZDCQADataMakerRec::EndOfDetectorCycle(AliQAv1::TASKINDEX_t task, TObjArray ** list)
075a0e70 793{
794 //Detector specific actions at end of cycle
795 // do the QA checking
4e25ac79 796 AliQAChecker::Instance()->Run(AliQAv1::kZDC, task, list) ;
075a0e70 797}
798
fab7bea4 799