]>
Commit | Line | Data |
---|---|---|
04236e67 | 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 | ||
17 | /* $Id$ */ | |
18 | ||
19 | //--- | |
20 | // Produces the data needed to calculate the quality assurance. | |
1d7681da | 21 | // Alla.Maevskaya@cern.ch |
04236e67 | 22 | //--- |
23 | ||
24 | // --- ROOT system --- | |
25 | #include <TClonesArray.h> | |
26 | #include <TFile.h> | |
27 | #include <TH1F.h> | |
1d7681da | 28 | #include <TH2F.h> |
04236e67 | 29 | #include <TDirectory.h> |
30 | // --- Standard library --- | |
31 | ||
32 | // --- AliRoot header files --- | |
33 | #include "AliESDEvent.h" | |
34 | #include "AliLog.h" | |
35 | #include "AliT0digit.h" | |
36 | #include "AliT0hit.h" | |
37 | #include "AliT0RecPoint.h" | |
38 | #include "AliT0QADataMakerRec.h" | |
39 | #include "AliQAChecker.h" | |
40 | #include "AliT0RawReader.h" | |
332b9234 | 41 | #include "AliT0RecoParam.h" |
04236e67 | 42 | |
1d7681da | 43 | #include "Riostream.h" |
04236e67 | 44 | ClassImp(AliT0QADataMakerRec) |
45 | ||
46 | //____________________________________________________________________________ | |
47 | AliT0QADataMakerRec::AliT0QADataMakerRec() : | |
4e25ac79 | 48 | AliQADataMakerRec(AliQAv1::GetDetName(AliQAv1::kT0), |
3c85c814 | 49 | "T0 Quality Assurance Data Maker"), |
332b9234 | 50 | fnEventCal(0), |
51 | fnEventPhys(0) | |
04236e67 | 52 | |
53 | { | |
54 | // ctor | |
1d7681da | 55 | for (Int_t i=0; i<6; i++) { |
56 | fNumTriggers[i]=0; | |
57 | fNumTriggersCal[i]=0; | |
332b9234 | 58 | fTrEffCal[i] = 0; |
59 | fTrEffPhys[i] = 0; | |
60 | ||
04236e67 | 61 | } |
b9024d69 | 62 | for (Int_t i=0; i<24; i++) |
63 | { | |
64 | feffC[i]=0; | |
65 | feffA[i]=0; | |
394c1a6d | 66 | feffqtc[i]=0; |
67 | } | |
04236e67 | 68 | } |
69 | ||
70 | //____________________________________________________________________________ | |
71 | AliT0QADataMakerRec::AliT0QADataMakerRec(const AliT0QADataMakerRec& qadm) : | |
3c85c814 | 72 | AliQADataMakerRec(), |
332b9234 | 73 | fnEventCal(0), |
74 | fnEventPhys(0) | |
75 | ||
3c85c814 | 76 | |
04236e67 | 77 | { |
78 | //copy ctor | |
1d7681da | 79 | SetName((const char*)qadm.GetName()) ; |
04236e67 | 80 | SetTitle((const char*)qadm.GetTitle()); |
81 | } | |
82 | ||
83 | //__________________________________________________________________ | |
84 | AliT0QADataMakerRec& AliT0QADataMakerRec::operator = (const AliT0QADataMakerRec& qadm ) | |
85 | { | |
86 | // Equal operator. | |
87 | this->~AliT0QADataMakerRec(); | |
88 | new(this) AliT0QADataMakerRec(qadm); | |
89 | return *this; | |
90 | } | |
91 | //____________________________________________________________________________ | |
4e25ac79 | 92 | void AliT0QADataMakerRec::EndOfDetectorCycle(AliQAv1::TASKINDEX_t task, TObjArray ** list) |
04236e67 | 93 | { |
94 | //Detector specific actions at end of cycle | |
95 | // do the QA checking | |
4e25ac79 | 96 | AliQAChecker::Instance()->Run(AliQAv1::kT0, task, list) ; |
57acd2d2 | 97 | for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++) { |
6252ceeb | 98 | if (! IsValidEventSpecie(specie, list)) |
eca4fa66 | 99 | continue ; |
6252ceeb | 100 | SetEventSpecie(AliRecoParam::ConvertIndex(specie)) ; |
4e25ac79 | 101 | if ( task == AliQAv1::kRAWS ) { |
332b9234 | 102 | GetRawsData(0)->SetLabelSize(0.02); |
57acd2d2 | 103 | const Char_t *triggers[6] = {"mean", "vertex","ORA","ORC","central","semi-central"}; |
104 | for (Int_t itr=0; itr<6; itr++) { | |
332b9234 | 105 | if ( fnEventCal>0) |
106 | fTrEffCal[itr] = Float_t (fNumTriggersCal[itr])/Float_t (fnEventCal); | |
107 | if ( fnEventPhys>0) | |
108 | fTrEffPhys[itr] = Float_t (fNumTriggers[itr])/Float_t (fnEventPhys); | |
109 | ||
110 | GetRawsData(197)->Fill(triggers[itr], fTrEffCal[itr]); | |
111 | GetRawsData(197)->SetBinContent(itr+1, fTrEffCal[itr]); | |
112 | GetRawsData(97)->Fill(triggers[itr], fTrEffPhys[itr]); | |
113 | GetRawsData(97)->SetBinContent(itr+1, fTrEffPhys[itr]); | |
114 | ||
115 | } | |
116 | Float_t effic=0; | |
117 | for(Int_t ik=0; ik<24; ik++) | |
118 | { | |
119 | effic=0; | |
120 | effic = Float_t(feffC[ik])/Float_t(fnEventCal); | |
121 | GetRawsData(205)->SetBinContent(ik+1,effic) ; | |
122 | effic=0; | |
123 | effic = Float_t(feffA[ik])/Float_t(fnEventCal); | |
124 | GetRawsData(206)->SetBinContent(ik+1,effic ); | |
125 | effic=0; | |
126 | effic = Float_t(feffqtc[ik])/Float_t(fnEventCal); | |
127 | GetRawsData(207)->SetBinContent(ik+1, effic); | |
128 | } | |
129 | ||
57acd2d2 | 130 | } |
131 | } | |
04236e67 | 132 | } |
133 | ||
134 | //____________________________________________________________________________ | |
135 | void AliT0QADataMakerRec::StartOfDetectorCycle() | |
136 | { | |
137 | //Detector specific actions at start of cycle | |
332b9234 | 138 | |
04236e67 | 139 | |
140 | } | |
141 | ||
142 | //____________________________________________________________________________ | |
143 | void AliT0QADataMakerRec::InitRaws() | |
144 | { | |
145 | // create Raw histograms in Raw subdir | |
7d297381 | 146 | const Bool_t expert = kTRUE ; |
147 | const Bool_t saveCorr = kTRUE ; | |
148 | const Bool_t image = kTRUE ; | |
149 | ||
1d7681da | 150 | TString timename, ampname, qtcname, ledname; |
151 | TString timeCalname, ampCalname, ledCalname, qtcCalname; | |
332b9234 | 152 | TString qt1name, qt0name, qt1Calname, qt0Calname; |
04236e67 | 153 | |
86c020af | 154 | TH1F* fhRefPoint = new TH1F("hRefPoint","Ref Point", 10,1252170, 1252180); |
332b9234 | 155 | Add2RawsList( fhRefPoint,0, expert, image, !saveCorr); |
86c020af | 156 | |
1d7681da | 157 | TH1F *fhRawCFD[24]; TH1F * fhRawLEDamp[24]; |
158 | TH1F *fhRawQTC[24]; TH1F * fhRawLED[24]; | |
159 | TH1F *fhRawCFDcal[24]; TH1F * fhRawLEDampcal[24]; | |
332b9234 | 160 | TH1F *fhRawCFDcalpmt[24]; TH1F * fhRawLEDcalpmt[24]; |
161 | TH1F *fhRawCFDpmt[24]; TH1F * fhRawLEDpmt[24]; | |
1d7681da | 162 | TH1F *fhRawQTCcal[24]; TH1F * fhRawLEDcal[24]; |
332b9234 | 163 | TH1F *fhRawQT0cal[24]; TH1F *fhRawQT1cal[24]; |
164 | TH1F *fhRawQT1[24]; TH1F *fhRawQT0[24]; | |
86c020af | 165 | |
04236e67 | 166 | for (Int_t i=0; i<24; i++) |
167 | { | |
168 | timename ="hRawCFD"; | |
1d7681da | 169 | ledname = "hRawLED"; |
04236e67 | 170 | qtcname = "hRawQTC"; |
332b9234 | 171 | qt0name = "hRawQT0_"; |
172 | qt1name = "hRawQT1_"; | |
1d7681da | 173 | ampname = "hRawLEDminCFD"; |
332b9234 | 174 | timename += i+1; |
175 | ampname += i+1; | |
176 | qtcname += i+1; | |
177 | qt0name += i+1; | |
178 | qt1name += i+1; | |
179 | ledname += i+1; | |
180 | // fhRawCFD[i] = new TH1F(timename.Data(), Form("%s;CFD [#channels];Counts", timename.Data()),10000,0,10000); | |
181 | fhRawCFD[i] = new TH1F(timename.Data(), Form("%s;CFD [#channels];Counts", timename.Data()),10000,80000,100000); | |
394c1a6d | 182 | Add2RawsList( fhRawCFD[i],i+1, expert, !image, !saveCorr); |
332b9234 | 183 | fhRawLED[i] = new TH1F(ledname.Data(), Form("%s;LED[#channels];Counts", ledname.Data()),10000,80000,100000); |
394c1a6d | 184 | Add2RawsList( fhRawLED[i],i+24+1, expert, !image, !saveCorr); |
332b9234 | 185 | fhRawLEDamp[i] = new TH1F(ampname.Data(), Form("%s;LED-CFD [#channels];Counts", ampname.Data()),1000,0,1000); |
394c1a6d | 186 | Add2RawsList( fhRawLEDamp[i],i+48+1, expert, !image, !saveCorr); |
332b9234 | 187 | fhRawQTC[i] = new TH1F(qtcname.Data(), Form("%s;QTC[#channels];Counts", qtcname.Data()),10000,0,10000); |
188 | Add2RawsList( fhRawQTC[i],i+72+1, expert, !image, !saveCorr); | |
189 | // fhRawQT1[i] = new TH1F(qt1name.Data(), Form("%s;QT1[#channels];Counts", qtcname.Data()),10000,80000,100000); | |
190 | fhRawQT1[i] = new TH1F(qt1name.Data(), Form("%s;QT1[#channels];Counts", qtcname.Data()),10000,80000,100000); | |
191 | Add2RawsList( fhRawQT1[i],270+i, expert, !image, !saveCorr); | |
192 | fhRawQT0[i] = new TH1F(qt1name.Data(), Form("%s;QT0[#channels];Counts", qtcname.Data()),10000,80000,100000); | |
193 | // fhRawQT0[i] = new TH1F(qt1name.Data(), Form("%s;QT0[#channels];Counts", qtcname.Data()),10000,0,10000); | |
194 | Add2RawsList( fhRawQT0[i],270+24+i, expert, !image, !saveCorr); | |
04236e67 | 195 | } |
db72ff3b | 196 | TH1F* fhRawTrigger = new TH1F("hRawTrigger"," phys triggers;Trigger #;Counts",5,0,5); |
332b9234 | 197 | Add2RawsList(fhRawTrigger ,97, !expert, !image, !saveCorr); |
1d7681da | 198 | |
332b9234 | 199 | TH1F* fhRawMean = new TH1F("hRawMean","online mean signal, physics event;", 10000,80000,100000); |
394c1a6d | 200 | Add2RawsList( fhRawMean,98, expert, !image, !saveCorr); |
332b9234 | 201 | TH1F* fhRawVertex = new TH1F("hRawVertex","online vertex signal; counts", 10000,80000,100000); |
394c1a6d | 202 | Add2RawsList( fhRawVertex,99, expert, !image, !saveCorr); |
332b9234 | 203 | TH1F* fhRawORA = new TH1F("hRawORA","online OR A; counts", 10000,80000,100000); |
394c1a6d | 204 | Add2RawsList( fhRawORA,100, expert, !image, !saveCorr); |
332b9234 | 205 | TH1F* fhRawORC = new TH1F("hRawORC","online OR C;counts", 10000,80000,100000); |
394c1a6d | 206 | Add2RawsList( fhRawORC,101, expert, !image, !saveCorr); |
1d7681da | 207 | |
5ed41460 | 208 | for (Int_t i=0; i<24; i++) |
209 | { | |
210 | // for events with trigger CALIBRATION_EVENT | |
211 | timeCalname ="hRawCFDcal"; | |
1d7681da | 212 | ledCalname = "hRawLEDcal"; |
213 | ampCalname = "hRawLEDminCFDcal"; | |
5ed41460 | 214 | qtcCalname = "hRawQTCcal"; |
332b9234 | 215 | qt0Calname = "hRawQT0cal"; |
216 | qt1Calname = "hRawQT1cal"; | |
217 | timeCalname += i+1; | |
218 | ledCalname += i+1; | |
219 | ampCalname += i+1; | |
220 | qtcCalname += i+1; | |
221 | qt0Calname += i+1; | |
222 | qt1Calname += i+1; | |
223 | // fhRawCFDcal[i] = new TH1F(timeCalname.Data(), Form("%s;Time ;Counts", timeCalname.Data()),10000,0,10000); | |
224 | fhRawCFDcal[i] = new TH1F(timeCalname.Data(), Form("%s;Time ;Counts", timeCalname.Data()),10000,60000,80000); | |
225 | Add2RawsList( fhRawCFDcal[i],101+i+1, expert, !image, !saveCorr); | |
226 | // fhRawLEDcal[i] = new TH1F(ledCalname.Data(), Form("%s;Time ;Counts", ledCalname.Data()),10000,0,10000); | |
227 | fhRawLEDcal[i] = new TH1F(ledCalname.Data(), Form("%s;Time ;Counts", ledCalname.Data()),10000,60000,80000); | |
228 | Add2RawsList( fhRawLEDcal[i],101+i+24+1, expert, !image, !saveCorr); | |
394c1a6d | 229 | fhRawLEDampcal[i] = new TH1F(ampCalname.Data(), Form("%s;Amplitude [ADC counts];Counts", ampCalname.Data()),1000,0,1000); |
332b9234 | 230 | Add2RawsList( fhRawLEDampcal[i],101+i+48+1, expert, !image, !saveCorr); |
231 | fhRawQTCcal[i] = new TH1F(qtcCalname.Data(), Form("%s;Charge ;Counts",qtcCalname.Data()),10000,0,10000); | |
232 | Add2RawsList( fhRawQTCcal[i],101+i+72+1, expert, !image, !saveCorr); | |
233 | fhRawQT0cal[i] = new TH1F(qt0Calname.Data(), Form("%s;Charge ;Counts",qt0Calname.Data()),10000,60000,80000); | |
234 | //fhRawQT0cal[i] = new TH1F(qt0Calname.Data(), Form("%s;Charge ;Counts",qt0Calname.Data()),10000,0,10000); | |
235 | Add2RawsList( fhRawQT0cal[i],371+i, expert, !image, !saveCorr); | |
236 | fhRawQT1cal[i] = new TH1F(qt1Calname.Data(), Form("%s;Charge ;Counts",qt1Calname.Data()),10000,60000,80000); | |
237 | //fhRawQT1cal[i] = new TH1F(qt1Calname.Data(), Form("%s;Charge ;Counts",qt1Calname.Data()),10000,0,10000); | |
238 | Add2RawsList( fhRawQT1cal[i],i+371+24, expert, !image, !saveCorr); | |
5ed41460 | 239 | } |
1d7681da | 240 | |
332b9234 | 241 | //from PMT1 (equalizing) |
242 | for (Int_t i=0; i<24; i++) | |
243 | { | |
244 | // for events with trigger CALIBRATION_EVENT | |
245 | timeCalname ="hRawCFDcalpmt"; | |
246 | timename ="hRawCFDpmt"; | |
247 | timeCalname += i+1; | |
248 | ledCalname += i+1; | |
249 | timename += i+1; | |
250 | ledname += i+1; | |
251 | fhRawCFDcalpmt[i] = new TH1F(timeCalname.Data(), Form("%s;Time;Counts", timeCalname.Data()),2000,-1000,1000); | |
252 | Add2RawsList( fhRawCFDcalpmt[i],321+i , expert, !image, !saveCorr); | |
253 | ||
254 | fhRawCFDpmt[i] = new TH1F(timename.Data(), Form("%s;Time;Counts", timename.Data()),2000,-1000,1000); | |
255 | Add2RawsList( fhRawCFDcalpmt[i],220+i, expert, !image, !saveCorr); | |
256 | } | |
257 | ||
1d7681da | 258 | TH1F* fhRawTriggerCal = new TH1F("hRawTriggerCal"," laser triggers",6,0,6); |
332b9234 | 259 | Add2RawsList(fhRawTriggerCal ,197 , expert, image, !saveCorr); |
1d7681da | 260 | |
394c1a6d | 261 | TH1F* fhRawMeanCal = new TH1F("hRawMeanCal","online mean signal, calibration event", |
332b9234 | 262 | 10000,60000,80000); |
263 | Add2RawsList( fhRawMeanCal,198, expert, !image, !saveCorr); | |
264 | TH1F* fhRawVertexCal = new TH1F("hRawVertexCal","online vertex signal, calibration event ", 10000,60000,80000); | |
265 | // TH1F* fhRawVertexCal = new TH1F("hRawVertexCal","online vertex signal, calibration event ", 10000,0,10000); | |
394c1a6d | 266 | Add2RawsList( fhRawVertexCal,199, expert, !image, !saveCorr); |
332b9234 | 267 | TH1F* fhRawORAcal = new TH1F("hRawORAcal","laser OR A; counts", 10000,60000,80000); |
268 | // TH1F* fhRawORAcal = new TH1F("hRawORAcal","laser OR A; counts", 10000,0,10000); | |
394c1a6d | 269 | Add2RawsList( fhRawORAcal,200, expert, !image, !saveCorr ); |
332b9234 | 270 | TH1F* fhRawORCcal = new TH1F("hRawORCcal","laserOR C;counts ", 10000,60000,80000); |
271 | // TH1F* fhRawORCcal = new TH1F("hRawORCcal","laserOR C;counts ", 10000,0,10000); | |
394c1a6d | 272 | Add2RawsList( fhRawORCcal,201, expert, !image, !saveCorr); |
332b9234 | 273 | |
274 | //multiplicity trigger | |
275 | TH1F* fhMultcal = new TH1F("hMultcal","full mulltiplicity;Multiplicity;Entries", 10000,60000,80000); | |
394c1a6d | 276 | Add2RawsList( fhMultcal,202, expert, !image, !saveCorr ); |
db72ff3b | 277 | TH1F* fhMultScal = new TH1F("hMultScal","full multiplicity with semi-central trigger;Multiplicity;Entries", |
332b9234 | 278 | 10000,60000,80000); |
394c1a6d | 279 | Add2RawsList( fhMultScal,203, expert, !image, !saveCorr); |
db72ff3b | 280 | TH1F* fhMultCcal = new TH1F("hMultCcal","full multiplicity with central trigger;Multiplicity;Entries", |
332b9234 | 281 | 10000,60000,80000); |
394c1a6d | 282 | Add2RawsList( fhMultCcal,204, expert, !image, !saveCorr); |
1d7681da | 283 | |
332b9234 | 284 | |
285 | TH1F* fhEffCFD = new TH1F("hEffCFD","#PMT; #CFD counts/nEvents",24, 0 ,24); | |
286 | Add2RawsList( fhEffCFD,205, !expert, image, !saveCorr); | |
287 | TH1F* fhEffLED = new TH1F("hEffLED","#PMT; #LED counts/nEvent",24, 0 ,24); | |
288 | Add2RawsList( fhEffLED,206, !expert, image, !saveCorr); | |
289 | TH1F* fhEffQTC = new TH1F("hEffQTC","#PMT; QTC efficiency%s;",24, 0 ,24); | |
290 | Add2RawsList( fhEffQTC,207, !expert, image, !saveCorr); | |
291 | ||
292 | TH2F* fhCFDcal = new TH2F("hCFDcal","CFD laser; #PMT; CFD {#channnels}",25, 0 ,25, 5000,60000,80000); | |
293 | //TH2F* fhCFDcal = new TH2F("hCFDcal","CFD laser; #PMT; CFD {#channnels}",25, 0 ,25, 2000,0,10000); | |
394c1a6d | 294 | fhCFDcal->SetOption("COLZ"); |
332b9234 | 295 | Add2RawsList( fhCFDcal,208, expert, image, !saveCorr); |
296 | TH2F* fhLEDcal = new TH2F("hLEDcal","LED laser; #PMT; LED [#channnels]",25, 0 ,25, 5000,60000,80000); | |
297 | // TH2F* fhLEDcal = new TH2F("hLEDcal","LED laser; #PMT; LED [#channnels]",25, 0 ,25, 2000,0,10000); | |
394c1a6d | 298 | fhLEDcal->SetOption("COLZ"); |
332b9234 | 299 | Add2RawsList( fhLEDcal,209, expert, image, !saveCorr); |
394c1a6d | 300 | |
301 | const Char_t *triggers[6] = {"mean", "vertex","ORA","ORC","central","semi-central"}; | |
eca4fa66 | 302 | for (Int_t itr=0; itr<6; itr++) { |
303 | GetRawsData(197)->Fill(triggers[itr], fNumTriggersCal[itr]); | |
304 | GetRawsData(197)->SetBinContent(itr+1, fNumTriggersCal[itr]); | |
332b9234 | 305 | GetRawsData(97)->Fill(triggers[itr], fNumTriggers[itr]); |
306 | GetRawsData(97)->SetBinContent(itr+1, fNumTriggers[itr]); | |
eca4fa66 | 307 | } |
44ed7a66 | 308 | } |
309 | ||
310 | //____________________________________________________________________________ | |
311 | void AliT0QADataMakerRec::InitDigits() | |
312 | { | |
313 | // create Digits histograms in Digits subdir | |
314 | const Bool_t expert = kTRUE ; | |
315 | const Bool_t image = kTRUE ; | |
316 | ||
f628b9d2 | 317 | TH2F * fhDigCFD = new TH2F("fhDigCFD", " CFD digits; #PMT; CFD digits[#channels]",25,-0.5,24.5,100,0,1000); |
eca4fa66 | 318 | fhDigCFD->SetOption("COLZ"); |
f628b9d2 | 319 | Add2DigitsList( fhDigCFD,0, !expert, image); |
320 | TH2F *fhDigLEDamp = new TH2F("fhDigLEDamp", " LED-CFD digits; #PMT; LED-CFD amplitude ",25,-0.5,24.5,100,100,1000); | |
eca4fa66 | 321 | fhDigLEDamp->SetOption("COLZ"); |
394c1a6d | 322 | Add2DigitsList( fhDigLEDamp,1, !expert, !image); |
f628b9d2 | 323 | TH2F * fhDigQTC = new TH2F("fhDigQTC", " QTC digits; #PMT; QTC amplitude",25,-0.5,24.5,100,100,10000); |
eca4fa66 | 324 | fhDigQTC->SetOption("COLZ"); |
394c1a6d | 325 | Add2DigitsList( fhDigQTC,2, !expert, !image);} |
04236e67 | 326 | |
327 | //____________________________________________________________________________ | |
328 | ||
329 | void AliT0QADataMakerRec::InitRecPoints() | |
330 | { | |
331 | // create cluster histograms in RecPoint subdir | |
7d297381 | 332 | const Bool_t expert = kTRUE ; |
333 | const Bool_t image = kTRUE ; | |
1d7681da | 334 | |
db72ff3b | 335 | TH2F* fhRecCFD = new TH2F("hRecCFD"," CFD time;Time [ns];Counts",24, 0 ,24, |
b9024d69 | 336 | 100,-50,50); |
eca4fa66 | 337 | fhRecCFD->SetOption("COLZ"); |
7d297381 | 338 | Add2RecPointsList ( fhRecCFD,0, !expert, image); |
b9024d69 | 339 | |
db72ff3b | 340 | TH2F* fhRecAmpDiff = new TH2F("hRecAmpDiff"," LED-CFD min QTC amplitude;Amplitude [ADC counts];Counts", |
b9024d69 | 341 | 24, 0 ,24, 200,-10,10); |
eca4fa66 | 342 | fhRecAmpDiff->SetOption("COLZ"); |
7d297381 | 343 | Add2RecPointsList (fhRecAmpDiff, 1, !expert, image); |
04236e67 | 344 | |
f628b9d2 | 345 | TH1F *fhMean = new TH1F("hMean","online - rec mean;online - rec mean[#channels];",2000, -1000, 1000); |
7d297381 | 346 | Add2RecPointsList ( fhMean,2, !expert, image); |
eca4fa66 | 347 | |
348 | } | |
04236e67 | 349 | |
350 | //____________________________________________________________________________ | |
351 | void AliT0QADataMakerRec::InitESDs() | |
352 | { | |
353 | //create ESDs histograms in ESDs subdir | |
7d297381 | 354 | const Bool_t expert = kTRUE ; |
355 | const Bool_t image = kTRUE ; | |
356 | ||
f628b9d2 | 357 | TH1F *fhESDMean = new TH1F("hESDmean"," ESD mean; mean time[%channels]",1000,0,1000); |
7d297381 | 358 | Add2ESDsList(fhESDMean, 0, !expert, image) ; |
f628b9d2 | 359 | TH1F * fhESDVertex = new TH1F("hESDvertex","ESDvertex; vertex[cm];",82,-30,30); |
7d297381 | 360 | Add2ESDsList(fhESDVertex, 1, !expert, image) ; |
c724dd64 | 361 | |
04236e67 | 362 | |
363 | } | |
364 | ||
365 | //____________________________________________________________________________ | |
366 | void AliT0QADataMakerRec::MakeRaws( AliRawReader* rawReader) | |
367 | { | |
eca4fa66 | 368 | |
332b9234 | 369 | rawReader->Reset() ; |
04236e67 | 370 | //fills QA histos for RAW |
5ed41460 | 371 | Int_t shift=0; |
332b9234 | 372 | Int_t refPointParam = GetRecoParam()->GetRefPoint(); |
373 | Int_t refpoint = 0; | |
b9024d69 | 374 | |
86c020af | 375 | AliT0RawReader *start = new AliT0RawReader(rawReader); |
332b9234 | 376 | |
86c020af | 377 | if (! start->Next()) |
5379c4a3 | 378 | AliDebug(AliQAv1::GetQADebugLevel(),Form(" no raw data found!!")); |
86c020af | 379 | else |
380 | { | |
332b9234 | 381 | |
5ed41460 | 382 | UInt_t type =rawReader->GetType(); |
332b9234 | 383 | if (type == 8){ shift=101; fnEventCal++;} |
384 | if (type == 7){ shift=0; fnEventPhys++;} | |
86c020af | 385 | Int_t allData[110][5]; |
386 | for (Int_t i0=0; i0<105; i0++) | |
387 | { | |
388 | for (Int_t j0=0; j0<5; j0++) allData[i0][j0]=0; | |
04236e67 | 389 | } |
86c020af | 390 | for (Int_t i=0; i<105; i++) |
391 | for (Int_t iHit=0; iHit<5; iHit++) | |
392 | allData[i][iHit]= start->GetData(i,iHit); | |
393 | ||
332b9234 | 394 | if (allData[0][0] > 0 ) GetRawsData(0) -> Fill( allData[0][0]); |
395 | ||
396 | if (refPointParam < 0 ) refpoint=0; | |
397 | else | |
398 | refpoint = allData[0][0] - 5000; | |
399 | ||
86c020af | 400 | for (Int_t ik = 0; ik<12; ik++){ |
332b9234 | 401 | for (Int_t iHt=0; iHt<5; iHt++){ |
1d7681da | 402 | //cfd |
394c1a6d | 403 | if(allData[ik+1][iHt]>0) { |
332b9234 | 404 | GetRawsData(shift+ik+1) -> Fill(allData[ik+1][iHt]-refpoint); |
405 | GetRawsData(shift+ik+220) -> Fill(allData[ik+1][iHt]-allData[1][0]); | |
394c1a6d | 406 | if(type == 8 ) { |
407 | feffC[ik]++; | |
408 | GetRawsData(208)->Fill(ik+1, allData[ik+1][iHt]-refpoint); | |
409 | } | |
332b9234 | 410 | } |
411 | //led | |
394c1a6d | 412 | if(allData[ik+13][iHt] > 0) { |
332b9234 | 413 | GetRawsData(shift+ik+24+1)-> Fill(allData[ik+13][iHt]-refpoint); |
394c1a6d | 414 | if(type == 8 ) { |
415 | feffA[ik]++; | |
416 | GetRawsData(209)->Fill(ik+1, allData[ik+13][iHt]-refpoint); | |
417 | } | |
418 | } | |
1d7681da | 419 | //led -cfd |
420 | ||
421 | if(allData[ik+13][iHt] > 0 && allData[ik+1][iHt] >0 ) | |
422 | GetRawsData(shift+ik+48+1)-> | |
423 | Fill(allData[ik+13][iHt]-allData[ik+1][iHt]); | |
424 | //qtc | |
394c1a6d | 425 | if(allData[2*ik+25][iHt] > 0 || allData[2*ik+26][iHt] > 0) { |
1d7681da | 426 | GetRawsData(shift+ik+72+1)-> |
394c1a6d | 427 | Fill(allData[2*ik+26][iHt]-allData[2*ik+25][iHt]); |
332b9234 | 428 | GetRawsData(shift+ik+270)->Fill(allData[2*ik+26][iHt]); |
429 | GetRawsData(shift+ik+24+270)->Fill(allData[2*ik+25][iHt]); | |
430 | ||
394c1a6d | 431 | if(type == 8 ) feffqtc[ik]++; |
432 | } | |
04236e67 | 433 | } |
86c020af | 434 | } |
86c020af | 435 | for (Int_t ik = 12; ik<24; ik++) { |
332b9234 | 436 | for (Int_t iHt=0; iHt<5; iHt++) { |
394c1a6d | 437 | if(allData[ik+45][iHt]>0) { |
1d7681da | 438 | //cfd |
439 | GetRawsData(shift+ik+1)-> | |
394c1a6d | 440 | Fill(allData[ik+45][iHt]-refpoint); |
332b9234 | 441 | GetRawsData(shift+ik+220) -> Fill(allData[ik+45][iHt]-allData[57][0]); |
394c1a6d | 442 | if(type == 8 ) { |
443 | feffC[ik]++; | |
444 | GetRawsData(208)->Fill(ik+1, allData[ik+45][iHt]-refpoint); | |
445 | } | |
446 | } | |
1d7681da | 447 | //led |
394c1a6d | 448 | if(allData[ik+57][iHt] > 0 ) { |
332b9234 | 449 | GetRawsData(shift+ik+24+1)->Fill(allData[ik+57][iHt]-refpoint); |
394c1a6d | 450 | if(type == 8 ) { |
451 | feffA[ik]++; | |
452 | GetRawsData(209)->Fill(ik+1, allData[ik+57][iHt]-refpoint); | |
453 | } | |
454 | } | |
455 | //qtc | |
456 | if(allData[2*ik+57][iHt]>0 || allData[2*ik+58][iHt]>0) | |
457 | { | |
332b9234 | 458 | GetRawsData(shift+ik+72+1)-> Fill(allData[2*ik+58][iHt]-allData[2*ik+57][iHt]); |
459 | ||
460 | GetRawsData(shift+ik+270)->Fill(allData[2*ik+26][iHt]); | |
461 | GetRawsData(shift+ik+24+270)->Fill(allData[2*ik+25][iHt]); | |
394c1a6d | 462 | if(type == 8 ) feffqtc[ik]++; |
463 | } | |
464 | //led-cfd | |
1d7681da | 465 | if(allData[ik+57][iHt] > 0 &&allData[ik+45][iHt]>0) |
466 | GetRawsData(shift+ik+48+1)-> | |
467 | Fill(allData[ik+57][iHt]-allData[ik+45][iHt]); | |
86c020af | 468 | } |
469 | } | |
332b9234 | 470 | |
1d7681da | 471 | Int_t trChannel[6] = {49,50,51,52,55,56}; |
394c1a6d | 472 | |
332b9234 | 473 | if(type == 7) |
5ed41460 | 474 | { |
1d7681da | 475 | for (Int_t iHt=0; iHt<6; iHt++) { |
476 | for (Int_t itr=0; itr<6; itr++) { | |
332b9234 | 477 | if(allData[trChannel[itr]][iHt]>0) { |
478 | fNumTriggers[itr]++; | |
479 | GetRawsData(98+itr)->Fill(allData[trChannel[itr]][iHt]); | |
480 | } | |
1d7681da | 481 | } |
f6c2d5e2 | 482 | } |
5ed41460 | 483 | } |
394c1a6d | 484 | |
485 | if(type == 8) | |
332b9234 | 486 | { |
487 | for (Int_t iHt=0; iHt<5; iHt++) { | |
488 | for (Int_t itr=0; itr<6; itr++) { | |
489 | if(allData[trChannel[itr]][iHt]>0) | |
490 | { | |
491 | ||
492 | GetRawsData(198+itr)->Fill(allData[trChannel[itr]][iHt]); | |
493 | fNumTriggersCal[itr]++; | |
494 | } | |
495 | } | |
496 | if(allData[53][iHt]>0 && allData[54][iHt]>0) { | |
497 | GetRawsData(204)->Fill(allData[53][iHt]-allData[54][iHt]); | |
498 | if(allData[55][iHt]>0) GetRawsData(202)->Fill(allData[53][iHt]-allData[54][iHt]); | |
499 | if(allData[56][iHt]>0) GetRawsData(203)->Fill(allData[53][iHt]-allData[54][iHt]); | |
500 | } | |
1d7681da | 501 | } |
332b9234 | 502 | } |
394c1a6d | 503 | |
f628b9d2 | 504 | delete start; |
86c020af | 505 | } |
332b9234 | 506 | } |
507 | ||
1d7681da | 508 | |
04236e67 | 509 | |
44ed7a66 | 510 | //____________________________________________________________________________ |
511 | void AliT0QADataMakerRec::MakeDigits( TTree *digitsTree) | |
512 | { | |
513 | //fills QA histos for Digits | |
eca4fa66 | 514 | |
44ed7a66 | 515 | TArrayI *digCFD = new TArrayI(24); |
516 | TArrayI *digLED = new TArrayI(24); | |
517 | TArrayI *digQT0 = new TArrayI(24); | |
518 | TArrayI *digQT1 = new TArrayI(24); | |
519 | Int_t refpoint=0; | |
520 | ||
521 | TBranch *brDigits=digitsTree->GetBranch("T0"); | |
522 | AliT0digit *fDigits = new AliT0digit() ; | |
523 | if (brDigits) { | |
524 | brDigits->SetAddress(&fDigits); | |
525 | }else{ | |
526 | AliError(Form("EXEC Branch T0 digits not found")); | |
527 | return; | |
528 | } | |
529 | digitsTree->GetEvent(0); | |
530 | digitsTree->GetEntry(0); | |
531 | brDigits->GetEntry(0); | |
532 | fDigits->GetTimeCFD(*digCFD); | |
533 | fDigits->GetTimeLED(*digLED); | |
534 | fDigits->GetQT0(*digQT0); | |
535 | fDigits->GetQT1(*digQT1); | |
536 | refpoint = fDigits->RefPoint(); | |
537 | for (Int_t i=0; i<24; i++) | |
538 | { | |
539 | if (digCFD->At(i)>0) { | |
540 | Int_t cfd=digCFD->At(i)- refpoint; | |
541 | GetDigitsData(0) ->Fill(i,cfd); | |
f628b9d2 | 542 | GetDigitsData(1) -> Fill(i, (digLED->At(i) - digCFD->At(i))); |
44ed7a66 | 543 | GetDigitsData(2) -> Fill(i, (digQT1->At(i) - digQT0->At(i))); |
544 | } | |
545 | } | |
546 | ||
547 | delete digCFD; | |
548 | delete digLED; | |
549 | delete digQT0; | |
550 | delete digQT1; | |
551 | ||
552 | } | |
553 | ||
04236e67 | 554 | //____________________________________________________________________________ |
555 | void AliT0QADataMakerRec::MakeRecPoints(TTree * clustersTree) | |
556 | { | |
557 | //fills QA histos for clusters | |
558 | ||
446d6ec4 | 559 | AliT0RecPoint* frecpoints= new AliT0RecPoint (); |
f628b9d2 | 560 | if (!frecpoints) { |
394c1a6d | 561 | AliError(":MakeRecPoints >> no recpoints found"); |
04236e67 | 562 | return; |
563 | } | |
564 | TBranch *brRec =clustersTree ->GetBranch("T0"); | |
565 | if (brRec) { | |
566 | brRec->SetAddress(&frecpoints); | |
567 | }else{ | |
f628b9d2 | 568 | AliError(Form("EXEC Branch T0 rec not found ")); |
569 | return; | |
04236e67 | 570 | } |
eca4fa66 | 571 | |
04236e67 | 572 | brRec->GetEntry(0); |
f628b9d2 | 573 | |
04236e67 | 574 | for ( Int_t i=0; i<24; i++) { |
1d7681da | 575 | if(i<12) |
b9024d69 | 576 | GetRecPointsData(0) -> Fill(i, frecpoints -> GetTime(i) - frecpoints -> GetTime(0)); |
1d7681da | 577 | if(i>11) |
b9024d69 | 578 | GetRecPointsData(0) -> Fill(i, frecpoints -> GetTime(i) - frecpoints -> GetTime(12)); |
579 | GetRecPointsData(1) -> Fill( i, frecpoints -> GetAmp(i) - frecpoints->AmpLED(i)); | |
04236e67 | 580 | } |
b9024d69 | 581 | Double_t mmm=frecpoints->GetOnlineMean()- frecpoints->GetMeanTime(); |
f628b9d2 | 582 | GetRecPointsData(2) ->Fill(mmm); |
04236e67 | 583 | |
584 | } | |
585 | ||
586 | //____________________________________________________________________________ | |
587 | void AliT0QADataMakerRec::MakeESDs(AliESDEvent * esd) | |
588 | { | |
589 | //fills QA histos for ESD | |
f628b9d2 | 590 | |
04236e67 | 591 | GetESDsData(0) -> Fill(esd->GetT0()); |
592 | GetESDsData(1)-> Fill(esd->GetT0zVertex()); | |
f628b9d2 | 593 | |
04236e67 | 594 | } |