]>
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" | |
41 | ||
1d7681da | 42 | #include "Riostream.h" |
04236e67 | 43 | ClassImp(AliT0QADataMakerRec) |
44 | ||
45 | //____________________________________________________________________________ | |
46 | AliT0QADataMakerRec::AliT0QADataMakerRec() : | |
4e25ac79 | 47 | AliQADataMakerRec(AliQAv1::GetDetName(AliQAv1::kT0), |
3c85c814 | 48 | "T0 Quality Assurance Data Maker"), |
49 | fnEvent(0) | |
04236e67 | 50 | |
51 | { | |
52 | // ctor | |
1d7681da | 53 | for (Int_t i=0; i<6; i++) { |
54 | fNumTriggers[i]=0; | |
55 | fNumTriggersCal[i]=0; | |
04236e67 | 56 | } |
b9024d69 | 57 | for (Int_t i=0; i<24; i++) |
58 | { | |
59 | feffC[i]=0; | |
60 | feffA[i]=0; | |
61 | } | |
04236e67 | 62 | } |
63 | ||
64 | //____________________________________________________________________________ | |
65 | AliT0QADataMakerRec::AliT0QADataMakerRec(const AliT0QADataMakerRec& qadm) : | |
3c85c814 | 66 | AliQADataMakerRec(), |
67 | fnEvent(0) | |
68 | ||
04236e67 | 69 | { |
70 | //copy ctor | |
1d7681da | 71 | SetName((const char*)qadm.GetName()) ; |
04236e67 | 72 | SetTitle((const char*)qadm.GetTitle()); |
73 | } | |
74 | ||
75 | //__________________________________________________________________ | |
76 | AliT0QADataMakerRec& AliT0QADataMakerRec::operator = (const AliT0QADataMakerRec& qadm ) | |
77 | { | |
78 | // Equal operator. | |
79 | this->~AliT0QADataMakerRec(); | |
80 | new(this) AliT0QADataMakerRec(qadm); | |
81 | return *this; | |
82 | } | |
83 | //____________________________________________________________________________ | |
4e25ac79 | 84 | void AliT0QADataMakerRec::EndOfDetectorCycle(AliQAv1::TASKINDEX_t task, TObjArray ** list) |
04236e67 | 85 | { |
86 | //Detector specific actions at end of cycle | |
87 | // do the QA checking | |
4e25ac79 | 88 | AliQAChecker::Instance()->Run(AliQAv1::kT0, task, list) ; |
57acd2d2 | 89 | for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++) { |
eca4fa66 | 90 | if (! AliQAv1::Instance(AliQAv1::GetDetIndex(GetName()))->IsEventSpecieSet(AliRecoParam::ConvertIndex(specie)) ) |
91 | continue ; | |
5e232cd6 | 92 | SetEventSpecie(AliRecoParam::ConvertIndex(specie)) ; |
4e25ac79 | 93 | if ( task == AliQAv1::kRAWS ) { |
57acd2d2 | 94 | const Char_t *triggers[6] = {"mean", "vertex","ORA","ORC","central","semi-central"}; |
95 | for (Int_t itr=0; itr<6; itr++) { | |
96 | GetRawsData(197)->Fill(triggers[itr], fNumTriggersCal[itr]); | |
97 | GetRawsData(197)->SetBinContent(itr+1, fNumTriggersCal[itr]); | |
98 | } | |
57acd2d2 | 99 | } |
100 | } | |
04236e67 | 101 | } |
102 | ||
103 | //____________________________________________________________________________ | |
104 | void AliT0QADataMakerRec::StartOfDetectorCycle() | |
105 | { | |
106 | //Detector specific actions at start of cycle | |
b9024d69 | 107 | fnEvent=0; |
04236e67 | 108 | |
109 | } | |
110 | ||
111 | //____________________________________________________________________________ | |
112 | void AliT0QADataMakerRec::InitRaws() | |
113 | { | |
114 | // create Raw histograms in Raw subdir | |
7d297381 | 115 | const Bool_t expert = kTRUE ; |
116 | const Bool_t saveCorr = kTRUE ; | |
117 | const Bool_t image = kTRUE ; | |
118 | ||
1d7681da | 119 | TString timename, ampname, qtcname, ledname; |
120 | TString timeCalname, ampCalname, ledCalname, qtcCalname; | |
04236e67 | 121 | |
86c020af | 122 | TH1F* fhRefPoint = new TH1F("hRefPoint","Ref Point", 10,1252170, 1252180); |
7d297381 | 123 | Add2RawsList( fhRefPoint,0, !expert, image, !saveCorr); |
86c020af | 124 | |
1d7681da | 125 | TH1F *fhRawCFD[24]; TH1F * fhRawLEDamp[24]; |
126 | TH1F *fhRawQTC[24]; TH1F * fhRawLED[24]; | |
127 | TH1F *fhRawCFDcal[24]; TH1F * fhRawLEDampcal[24]; | |
128 | TH1F *fhRawQTCcal[24]; TH1F * fhRawLEDcal[24]; | |
86c020af | 129 | |
04236e67 | 130 | for (Int_t i=0; i<24; i++) |
131 | { | |
132 | timename ="hRawCFD"; | |
1d7681da | 133 | ledname = "hRawLED"; |
04236e67 | 134 | qtcname = "hRawQTC"; |
1d7681da | 135 | ampname = "hRawLEDminCFD"; |
04236e67 | 136 | timename += i; |
137 | ampname += i; | |
138 | qtcname += i; | |
1d7681da | 139 | ledname += i; |
db72ff3b | 140 | fhRawCFD[i] = new TH1F(timename.Data(), Form("%s;Time [ns];Counts", timename.Data()),500,-250,250); |
7d297381 | 141 | Add2RawsList( fhRawCFD[i],i+1, !expert, image, !saveCorr); |
db72ff3b | 142 | fhRawLED[i] = new TH1F(ledname.Data(), Form("%s;Time [ns];Counts", ledname.Data()),2000,-1000,1000); |
7d297381 | 143 | Add2RawsList( fhRawLED[i],i+24+1, !expert, image, !saveCorr); |
db72ff3b | 144 | fhRawLEDamp[i] = new TH1F(ampname.Data(), Form("%s;Amplitude [ADC counts];Counts", ampname.Data()),100,300,600); |
7d297381 | 145 | Add2RawsList( fhRawLEDamp[i],i+48+1, !expert, image, !saveCorr); |
db72ff3b | 146 | fhRawQTC[i] = new TH1F(qtcname.Data(), Form("%s;Charge [??];Counts", qtcname.Data()),1500,1000,7000); |
7d297381 | 147 | Add2RawsList( fhRawQTC[i],i+72+1, !expert, image, !saveCorr); |
04236e67 | 148 | } |
db72ff3b | 149 | TH1F* fhRawTrigger = new TH1F("hRawTrigger"," phys triggers;Trigger #;Counts",5,0,5); |
7d297381 | 150 | Add2RawsList(fhRawTrigger ,97, !expert, image, !saveCorr); |
1d7681da | 151 | |
f628b9d2 | 152 | TH1F* fhRawMean = new TH1F("hRawMean","online mean signal;;??", 100,2400,2500); |
7d297381 | 153 | Add2RawsList( fhRawMean,98, !expert, image, !saveCorr); |
db72ff3b | 154 | TH1F* fhRawVertex = new TH1F("hRawVertex","online vertex signal;??;??", 100,0,600); |
7d297381 | 155 | Add2RawsList( fhRawVertex,99, !expert, image, !saveCorr); |
db72ff3b | 156 | TH1F* fhRawORA = new TH1F("hRawORA","online OR A;??;??", 100,2500,2800); |
7d297381 | 157 | Add2RawsList( fhRawORA,100, !expert, image, !saveCorr); |
db72ff3b | 158 | TH1F* fhRawORC = new TH1F("hRawORC","online OR C;??;??", 100,2000,2300); |
7d297381 | 159 | Add2RawsList( fhRawORC,101, !expert, image, !saveCorr); |
1d7681da | 160 | |
5ed41460 | 161 | for (Int_t i=0; i<24; i++) |
162 | { | |
163 | // for events with trigger CALIBRATION_EVENT | |
164 | timeCalname ="hRawCFDcal"; | |
1d7681da | 165 | ledCalname = "hRawLEDcal"; |
166 | ampCalname = "hRawLEDminCFDcal"; | |
5ed41460 | 167 | qtcCalname = "hRawQTCcal"; |
168 | timeCalname += i; | |
1d7681da | 169 | ledCalname += i; |
5ed41460 | 170 | ampCalname += i; |
171 | qtcCalname += i; | |
db72ff3b | 172 | fhRawCFDcal[i] = new TH1F(timeCalname.Data(), Form("%s;Time [ns];Counts", timeCalname.Data()),2000,-1000,1000); |
7d297381 | 173 | Add2RawsList( fhRawCFDcal[i],101+i+1, !expert, image, !saveCorr); |
db72ff3b | 174 | fhRawLEDcal[i] = new TH1F(ledCalname.Data(), Form("%s;Time [ns];Counts", ledCalname.Data()),2000,-1000,1000); |
7d297381 | 175 | Add2RawsList( fhRawLEDcal[i],101+i+24+1, !expert, image, !saveCorr); |
db72ff3b | 176 | fhRawLEDampcal[i] = new TH1F(ampCalname.Data(), Form("%s;Amplitude [ADC counts];Counts", ampCalname.Data()),300,300,600); |
7d297381 | 177 | Add2RawsList( fhRawLEDampcal[i],101+i+48+1, !expert, image, !saveCorr); |
db72ff3b | 178 | fhRawQTCcal[i] = new TH1F(qtcCalname.Data(), Form("%s;Charge [??];Counts",qtcCalname.Data()),1000,0,7000); |
7d297381 | 179 | Add2RawsList( fhRawQTCcal[i],101+i+72+1, !expert, image, !saveCorr); |
5ed41460 | 180 | } |
1d7681da | 181 | |
182 | TH1F* fhRawTriggerCal = new TH1F("hRawTriggerCal"," laser triggers",6,0,6); | |
7d297381 | 183 | Add2RawsList(fhRawTriggerCal ,197 , !expert, !image, saveCorr); |
1d7681da | 184 | |
db72ff3b | 185 | TH1F* fhRawMeanCal = new TH1F("hRawMeanCal","online mean signal, calibration event;??;??", |
54f32a55 | 186 | 10000,0,10000); |
1d7681da | 187 | Add2RawsList( fhRawMeanCal,198); |
5ed41460 | 188 | TH1F* fhRawVertexCal = new TH1F("hRawVertexCal","online vertex signal, calibration even ", |
54f32a55 | 189 | 10000,0,10000); |
7d297381 | 190 | Add2RawsList( fhRawVertexCal,199, !expert, image, !saveCorr); |
db72ff3b | 191 | TH1F* fhRawORAcal = new TH1F("hRawORAcal","online OR A;??;??", 10000,0,10000); |
7d297381 | 192 | Add2RawsList( fhRawORAcal,200, !expert, image, !saveCorr ); |
db72ff3b | 193 | TH1F* fhRawORCcal = new TH1F("hRawORCcal","online OR C;??;??", 10000,0,10000); |
7d297381 | 194 | Add2RawsList( fhRawORCcal,201, !expert, image, !saveCorr); |
db72ff3b | 195 | TH1F* fhMultcal = new TH1F("hMultcal","full mulltiplicity;Multiplicity;Entries", 10000,0,10000); |
7d297381 | 196 | Add2RawsList( fhMultcal,202, !expert, image, !saveCorr ); |
db72ff3b | 197 | TH1F* fhMultScal = new TH1F("hMultScal","full multiplicity with semi-central trigger;Multiplicity;Entries", |
54f32a55 | 198 | 10000,0,10000); |
7d297381 | 199 | Add2RawsList( fhMultScal,203, !expert, image, !saveCorr); |
db72ff3b | 200 | TH1F* fhMultCcal = new TH1F("hMultCcal","full multiplicity with central trigger;Multiplicity;Entries", |
5ed41460 | 201 | 1000,0,10000); |
7d297381 | 202 | Add2RawsList( fhMultCcal,204, !expert, image, !saveCorr); |
1d7681da | 203 | |
b9024d69 | 204 | // TH2F* fhEffCFD = new TH2F("hEffCFD"," CFD time",24, 0 ,24, |
205 | // 100,-500,500); | |
db72ff3b | 206 | TH2F* fhEffCFD = new TH2F("hEffCFD"," CFD time;Time [ns];Counts",24, 0 ,24, 50, 0,5); |
eca4fa66 | 207 | fhEffCFD->SetOption("COLZ"); |
7d297381 | 208 | Add2RawsList( fhEffCFD,205, !expert, !image, saveCorr); |
db72ff3b | 209 | TH2F* fhEffLED = new TH2F("hEffLED","LED time;Time [ns];Counts",24, 0 ,24, |
b9024d69 | 210 | 100, 0, 5); |
211 | //100,-500,500); | |
eca4fa66 | 212 | fhEffLED->SetOption("COLZ"); |
7d297381 | 213 | Add2RawsList( fhEffLED,206, !expert, !image, saveCorr); |
f628b9d2 | 214 | TH2F* fhEffQTC = new TH2F("hEffQTC","QTC amplitude%s;Amplitude [ADC counts];Counts",24, 0 ,24, 100,0,7000); |
eca4fa66 | 215 | fhEffQTC->SetOption("COLZ"); |
7d297381 | 216 | Add2RawsList( fhEffQTC,207, !expert, !image, saveCorr); |
f628b9d2 | 217 | //eyes guide line |
b9024d69 | 218 | // TH2F* fhLineQTC = new TH2F("hLineQTC","QTC amplitude boeder",24, 0 ,24, |
219 | // 100,0,7000); | |
7d297381 | 220 | // Add2RawsList( fhLineQTC,208, !expert, !image, saveCorr); |
eca4fa66 | 221 | const Char_t *triggers[6] = {"mean", "vertex","ORA","ORC","central","semi-central"}; |
222 | for (Int_t itr=0; itr<6; itr++) { | |
223 | GetRawsData(197)->Fill(triggers[itr], fNumTriggersCal[itr]); | |
224 | GetRawsData(197)->SetBinContent(itr+1, fNumTriggersCal[itr]); | |
225 | } | |
44ed7a66 | 226 | } |
227 | ||
228 | //____________________________________________________________________________ | |
229 | void AliT0QADataMakerRec::InitDigits() | |
230 | { | |
231 | // create Digits histograms in Digits subdir | |
232 | const Bool_t expert = kTRUE ; | |
233 | const Bool_t image = kTRUE ; | |
234 | ||
f628b9d2 | 235 | TH2F * fhDigCFD = new TH2F("fhDigCFD", " CFD digits; #PMT; CFD digits[#channels]",25,-0.5,24.5,100,0,1000); |
eca4fa66 | 236 | fhDigCFD->SetOption("COLZ"); |
f628b9d2 | 237 | Add2DigitsList( fhDigCFD,0, !expert, image); |
238 | TH2F *fhDigLEDamp = new TH2F("fhDigLEDamp", " LED-CFD digits; #PMT; LED-CFD amplitude ",25,-0.5,24.5,100,100,1000); | |
eca4fa66 | 239 | fhDigLEDamp->SetOption("COLZ"); |
44ed7a66 | 240 | Add2DigitsList( fhDigLEDamp,1, !expert, image); |
f628b9d2 | 241 | TH2F * fhDigQTC = new TH2F("fhDigQTC", " QTC digits; #PMT; QTC amplitude",25,-0.5,24.5,100,100,10000); |
eca4fa66 | 242 | fhDigQTC->SetOption("COLZ"); |
db72ff3b | 243 | Add2DigitsList( fhDigQTC,2, !expert, image);} |
04236e67 | 244 | |
245 | //____________________________________________________________________________ | |
246 | ||
247 | void AliT0QADataMakerRec::InitRecPoints() | |
248 | { | |
249 | // create cluster histograms in RecPoint subdir | |
7d297381 | 250 | const Bool_t expert = kTRUE ; |
251 | const Bool_t image = kTRUE ; | |
1d7681da | 252 | |
db72ff3b | 253 | TH2F* fhRecCFD = new TH2F("hRecCFD"," CFD time;Time [ns];Counts",24, 0 ,24, |
b9024d69 | 254 | 100,-50,50); |
eca4fa66 | 255 | fhRecCFD->SetOption("COLZ"); |
7d297381 | 256 | Add2RecPointsList ( fhRecCFD,0, !expert, image); |
b9024d69 | 257 | |
db72ff3b | 258 | TH2F* fhRecAmpDiff = new TH2F("hRecAmpDiff"," LED-CFD min QTC amplitude;Amplitude [ADC counts];Counts", |
b9024d69 | 259 | 24, 0 ,24, 200,-10,10); |
eca4fa66 | 260 | fhRecAmpDiff->SetOption("COLZ"); |
7d297381 | 261 | Add2RecPointsList (fhRecAmpDiff, 1, !expert, image); |
04236e67 | 262 | |
f628b9d2 | 263 | TH1F *fhMean = new TH1F("hMean","online - rec mean;online - rec mean[#channels];",2000, -1000, 1000); |
7d297381 | 264 | Add2RecPointsList ( fhMean,2, !expert, image); |
eca4fa66 | 265 | |
266 | } | |
04236e67 | 267 | |
268 | //____________________________________________________________________________ | |
269 | void AliT0QADataMakerRec::InitESDs() | |
270 | { | |
271 | //create ESDs histograms in ESDs subdir | |
7d297381 | 272 | const Bool_t expert = kTRUE ; |
273 | const Bool_t image = kTRUE ; | |
274 | ||
f628b9d2 | 275 | TH1F *fhESDMean = new TH1F("hESDmean"," ESD mean; mean time[%channels]",1000,0,1000); |
7d297381 | 276 | Add2ESDsList(fhESDMean, 0, !expert, image) ; |
f628b9d2 | 277 | TH1F * fhESDVertex = new TH1F("hESDvertex","ESDvertex; vertex[cm];",82,-30,30); |
7d297381 | 278 | Add2ESDsList(fhESDVertex, 1, !expert, image) ; |
c724dd64 | 279 | |
04236e67 | 280 | |
281 | } | |
282 | ||
283 | //____________________________________________________________________________ | |
284 | void AliT0QADataMakerRec::MakeRaws( AliRawReader* rawReader) | |
285 | { | |
eca4fa66 | 286 | |
287 | // Check id histograms already created for this Event Specie | |
288 | if ( ! GetRawsData(0) ) | |
289 | InitRaws() ; | |
290 | ||
78328afd | 291 | rawReader->Reset() ; |
04236e67 | 292 | //fills QA histos for RAW |
5ed41460 | 293 | Int_t shift=0; |
b9024d69 | 294 | Float_t effic ; |
295 | ||
86c020af | 296 | AliT0RawReader *start = new AliT0RawReader(rawReader); |
297 | // start->Next(); | |
298 | if (! start->Next()) | |
5379c4a3 | 299 | AliDebug(AliQAv1::GetQADebugLevel(),Form(" no raw data found!!")); |
86c020af | 300 | else |
301 | { | |
b9024d69 | 302 | fnEvent++; |
303 | ||
5ed41460 | 304 | UInt_t type =rawReader->GetType(); |
305 | // cout<<" !!!!! new event type = "<<type<<endl; | |
86c020af | 306 | Int_t allData[110][5]; |
307 | for (Int_t i0=0; i0<105; i0++) | |
308 | { | |
309 | for (Int_t j0=0; j0<5; j0++) allData[i0][j0]=0; | |
04236e67 | 310 | } |
86c020af | 311 | for (Int_t i=0; i<105; i++) |
312 | for (Int_t iHit=0; iHit<5; iHit++) | |
313 | allData[i][iHit]= start->GetData(i,iHit); | |
314 | ||
1d7681da | 315 | if (allData[0][0]>0) GetRawsData(0) -> Fill( allData[0][0]); |
316 | // allData[0][0] = allData[0][0] - 7000; | |
317 | if (type == 8) shift=101; | |
f6c2d5e2 | 318 | if (type == 7) shift=0; |
1d7681da | 319 | |
86c020af | 320 | for (Int_t ik = 0; ik<12; ik++){ |
321 | for (Int_t iHt=0; iHt<5; iHt++){ | |
1d7681da | 322 | //cfd |
323 | if(allData[ik+1][iHt]>0) | |
324 | GetRawsData(shift+ik+1) -> | |
325 | Fill(allData[ik+1][iHt]-allData[1][0]); | |
326 | //led | |
327 | if(allData[ik+13][iHt] > 0 && allData[13][iHt]>0) | |
328 | GetRawsData(shift+ik+24+1)-> | |
329 | Fill(allData[ik+13][iHt]-allData[13][iHt]); | |
330 | //led -cfd | |
331 | ||
332 | if(allData[ik+13][iHt] > 0 && allData[ik+1][iHt] >0 ) | |
333 | GetRawsData(shift+ik+48+1)-> | |
334 | Fill(allData[ik+13][iHt]-allData[ik+1][iHt]); | |
335 | //qtc | |
336 | if(allData[2*ik+25][iHt] > 0 && allData[2*ik+26][iHt] > 0) | |
337 | GetRawsData(shift+ik+72+1)-> | |
338 | Fill(allData[2*ik+25][iHt]-allData[2*ik+26][iHt]); | |
339 | ||
5ed41460 | 340 | |
b9024d69 | 341 | if(type == 8 && allData[ik+1][iHt]>0 ) feffC[ik]++; |
342 | if(type == 8 && allData[ik+13][iHt]>0 ) feffA[ik]++; | |
343 | // GetRawsData(206)->Fill(ik,allData[ik+13][iHt]-allData[13][0]); | |
1d7681da | 344 | if(type == 8 && (allData[2*ik+25][iHt]>0 && allData[2*ik+26][iHt]>0) ) |
345 | GetRawsData(207)->Fill(ik,allData[2*ik+25][iHt]-allData[2*ik+26][iHt]); | |
04236e67 | 346 | } |
b9024d69 | 347 | effic = Float_t(feffC[ik])/Float_t(fnEvent); |
348 | GetRawsData(205)->Fill(ik,effic ); | |
349 | effic = Float_t(feffA[ik])/Float_t(fnEvent); | |
350 | GetRawsData(206)->Fill(ik,effic ); | |
351 | // printf("CFD efficiency for PMT %i = %f \n", ik, effic); | |
86c020af | 352 | } |
86c020af | 353 | for (Int_t ik = 12; ik<24; ik++) { |
354 | for (Int_t iHt=0; iHt<5; iHt++) { | |
1d7681da | 355 | if(allData[ik+45][iHt]>0) |
356 | //cfd | |
357 | GetRawsData(shift+ik+1)-> | |
358 | Fill(allData[ik+45][iHt]-allData[57][0]); | |
359 | //qtc | |
360 | if(allData[2*ik+57][iHt]>0 && allData[2*ik+58][iHt]>0) | |
361 | GetRawsData(shift+ik+72+1)-> | |
362 | Fill(allData[2*ik+57][iHt]-allData[2*ik+58][iHt]); | |
363 | //led | |
364 | if(allData[ik+57][iHt] > 0 ) | |
365 | GetRawsData(shift+ik+24+1)-> | |
366 | Fill(allData[ik+57][iHt]-allData[69][iHt]); | |
367 | //led-cfd | |
368 | if(allData[ik+57][iHt] > 0 &&allData[ik+45][iHt]>0) | |
369 | GetRawsData(shift+ik+48+1)-> | |
370 | Fill(allData[ik+57][iHt]-allData[ik+45][iHt]); | |
371 | ||
b9024d69 | 372 | if(type == 8 && allData[ik+45][iHt]>0 ) feffC[ik]++; |
373 | ||
374 | if(type == 8 && allData[ik+57][iHt]>0 ) feffA[ik]++; | |
375 | // GetRawsData(206)->Fill(ik,allData[ik+57][iHt]-allData[69][0]); | |
376 | if(type == 8 && (allData[2*ik+57][iHt]>0 && allData[2*ik+58][iHt]>0) ) | |
377 | GetRawsData(207)->Fill(ik,allData[2*ik+57][iHt]-allData[2*ik+58][iHt]); | |
86c020af | 378 | } |
b9024d69 | 379 | effic = Float_t(feffC[ik])/Float_t(fnEvent); |
380 | GetRawsData(205)->Fill(ik,effic ); | |
381 | effic = Float_t(feffA[ik])/Float_t(fnEvent); | |
382 | GetRawsData(206)->Fill(ik,effic ); | |
383 | // printf("CFD efficiency for PMT %i = %f \n", ik, effic); } | |
86c020af | 384 | } |
b9024d69 | 385 | |
1d7681da | 386 | Int_t trChannel[6] = {49,50,51,52,55,56}; |
f6c2d5e2 | 387 | if(type == 7) |
5ed41460 | 388 | { |
1d7681da | 389 | for (Int_t iHt=0; iHt<6; iHt++) { |
390 | for (Int_t itr=0; itr<6; itr++) { | |
391 | if(allData[trChannel[itr]][iHt]>0) fNumTriggers[itr]++; | |
392 | } | |
f6c2d5e2 | 393 | } |
5ed41460 | 394 | } |
395 | if(type == 8) | |
396 | { | |
f6c2d5e2 | 397 | for (Int_t iHt=0; iHt<5; iHt++) { |
1d7681da | 398 | for (Int_t itr=0; itr<6; itr++) { |
399 | if(allData[trChannel[itr]][iHt]>0) | |
400 | { | |
401 | ||
402 | GetRawsData(198+itr)->Fill(allData[trChannel[itr]][iHt]-allData[1][0]); | |
403 | ||
404 | fNumTriggersCal[itr]++; | |
405 | } | |
406 | } | |
b9024d69 | 407 | if(allData[53][iHt]>0 && allData[54][iHt]>0) |
408 | GetRawsData(204)->Fill(allData[53][iHt]-allData[54][iHt]); | |
f6c2d5e2 | 409 | } |
1d7681da | 410 | } |
411 | ||
f628b9d2 | 412 | delete start; |
b9024d69 | 413 | } |
86c020af | 414 | } |
1d7681da | 415 | |
416 | ||
04236e67 | 417 | |
44ed7a66 | 418 | //____________________________________________________________________________ |
419 | void AliT0QADataMakerRec::MakeDigits( TTree *digitsTree) | |
420 | { | |
421 | //fills QA histos for Digits | |
422 | ||
eca4fa66 | 423 | // Check id histograms already created for this Event Specie |
424 | if ( ! GetDigitsData(0) ) | |
425 | InitDigits() ; | |
426 | ||
44ed7a66 | 427 | TArrayI *digCFD = new TArrayI(24); |
428 | TArrayI *digLED = new TArrayI(24); | |
429 | TArrayI *digQT0 = new TArrayI(24); | |
430 | TArrayI *digQT1 = new TArrayI(24); | |
431 | Int_t refpoint=0; | |
432 | ||
433 | TBranch *brDigits=digitsTree->GetBranch("T0"); | |
434 | AliT0digit *fDigits = new AliT0digit() ; | |
435 | if (brDigits) { | |
436 | brDigits->SetAddress(&fDigits); | |
437 | }else{ | |
438 | AliError(Form("EXEC Branch T0 digits not found")); | |
439 | return; | |
440 | } | |
441 | digitsTree->GetEvent(0); | |
442 | digitsTree->GetEntry(0); | |
443 | brDigits->GetEntry(0); | |
444 | fDigits->GetTimeCFD(*digCFD); | |
445 | fDigits->GetTimeLED(*digLED); | |
446 | fDigits->GetQT0(*digQT0); | |
447 | fDigits->GetQT1(*digQT1); | |
448 | refpoint = fDigits->RefPoint(); | |
449 | for (Int_t i=0; i<24; i++) | |
450 | { | |
451 | if (digCFD->At(i)>0) { | |
452 | Int_t cfd=digCFD->At(i)- refpoint; | |
453 | GetDigitsData(0) ->Fill(i,cfd); | |
f628b9d2 | 454 | GetDigitsData(1) -> Fill(i, (digLED->At(i) - digCFD->At(i))); |
44ed7a66 | 455 | GetDigitsData(2) -> Fill(i, (digQT1->At(i) - digQT0->At(i))); |
456 | } | |
457 | } | |
458 | ||
459 | delete digCFD; | |
460 | delete digLED; | |
461 | delete digQT0; | |
462 | delete digQT1; | |
463 | ||
464 | } | |
465 | ||
04236e67 | 466 | //____________________________________________________________________________ |
467 | void AliT0QADataMakerRec::MakeRecPoints(TTree * clustersTree) | |
468 | { | |
469 | //fills QA histos for clusters | |
470 | ||
446d6ec4 | 471 | AliT0RecPoint* frecpoints= new AliT0RecPoint (); |
f628b9d2 | 472 | if (!frecpoints) { |
04236e67 | 473 | AliError("Reconstruct Fill ESD >> no recpoints found"); |
474 | return; | |
475 | } | |
476 | TBranch *brRec =clustersTree ->GetBranch("T0"); | |
477 | if (brRec) { | |
478 | brRec->SetAddress(&frecpoints); | |
479 | }else{ | |
f628b9d2 | 480 | AliError(Form("EXEC Branch T0 rec not found ")); |
481 | return; | |
04236e67 | 482 | } |
483 | ||
eca4fa66 | 484 | // Check id histograms already created for this Event Specie |
485 | if ( ! GetRecPointsData(0) ) | |
486 | InitRecPoints() ; | |
487 | ||
04236e67 | 488 | brRec->GetEntry(0); |
f628b9d2 | 489 | |
04236e67 | 490 | for ( Int_t i=0; i<24; i++) { |
1d7681da | 491 | if(i<12) |
b9024d69 | 492 | GetRecPointsData(0) -> Fill(i, frecpoints -> GetTime(i) - frecpoints -> GetTime(0)); |
1d7681da | 493 | if(i>11) |
b9024d69 | 494 | GetRecPointsData(0) -> Fill(i, frecpoints -> GetTime(i) - frecpoints -> GetTime(12)); |
495 | GetRecPointsData(1) -> Fill( i, frecpoints -> GetAmp(i) - frecpoints->AmpLED(i)); | |
04236e67 | 496 | } |
b9024d69 | 497 | Double_t mmm=frecpoints->GetOnlineMean()- frecpoints->GetMeanTime(); |
f628b9d2 | 498 | GetRecPointsData(2) ->Fill(mmm); |
04236e67 | 499 | |
500 | } | |
501 | ||
502 | //____________________________________________________________________________ | |
503 | void AliT0QADataMakerRec::MakeESDs(AliESDEvent * esd) | |
504 | { | |
505 | //fills QA histos for ESD | |
f628b9d2 | 506 | |
eca4fa66 | 507 | // Check id histograms already created for this Event Specie |
508 | if ( ! GetESDsData(0) ) | |
509 | InitESDs() ; | |
510 | ||
04236e67 | 511 | GetESDsData(0) -> Fill(esd->GetT0()); |
512 | GetESDsData(1)-> Fill(esd->GetT0zVertex()); | |
f628b9d2 | 513 | |
04236e67 | 514 | } |