1 /**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
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 **************************************************************************/
17 // Produces the data needed to calculate the quality assurance
18 // All data must be mergeable objects
19 // Handles ESDs and Raws
20 // Histos defined will be used for Raw Data control and monitoring
22 // --- ROOT system ---
23 #include <TClonesArray.h>
30 #include <TParameter.h>
31 #include <TTimeStamp.h>
33 // --- Standard library ---
35 // --- AliRoot header files ---
36 #include "AliESDEvent.h"
38 #include "AliCDBManager.h"
39 #include "AliCDBStorage.h"
40 #include "AliCDBEntry.h"
41 #include "AliVZEROQADataMakerRec.h"
42 #include "AliQAChecker.h"
43 #include "AliRawReader.h"
44 #include "AliVZERORawStream.h"
45 #include "AliVZEROdigit.h"
46 #include "AliVZEROReconstructor.h"
47 #include "AliVZEROTrending.h"
48 #include "AliVZEROCalibData.h"
52 ClassImp(AliVZEROQADataMakerRec)
54 //____________________________________________________________________________
55 AliVZEROQADataMakerRec::AliVZEROQADataMakerRec() :
56 AliQADataMakerRec(AliQAv1::GetDetName(AliQAv1::kVZERO), "VZERO Quality Assurance Data Maker"),
61 fTrendingUpdateEvent(0),
63 fTrendingUpdateTime(0),
71 AliDebug(AliQAv1::GetQADebugLevel(), "Construct VZERO QA Object");
72 for(Int_t i=0;i<8;i++){
73 fChargePerRing[i] = 0.;
76 for(Int_t i=0; i<64; i++){
79 fChargePerChannel[i] = 0.;
80 fFlagPerChannel[i] = 0.;
81 fMeanChargePerChannel[i] = 0.;
82 fMeanFlagPerChannel[i] = 0.;
85 for(Int_t i=0; i<128; i++){
89 //____________________________________________________________________________
90 AliVZEROQADataMakerRec::AliVZEROQADataMakerRec(const AliVZEROQADataMakerRec& qadm) :
96 fTrendingUpdateEvent(0),
98 fTrendingUpdateTime(0),
106 SetName((const char*)qadm.GetName()) ;
107 SetTitle((const char*)qadm.GetTitle());
110 //__________________________________________________________________
111 AliVZEROQADataMakerRec& AliVZEROQADataMakerRec::operator = (const AliVZEROQADataMakerRec& qadm )
115 this->~AliVZEROQADataMakerRec();
116 new(this) AliVZEROQADataMakerRec(qadm);
120 //____________________________________________________________________________
121 AliVZEROCalibData* AliVZEROQADataMakerRec::GetCalibData() const
124 AliCDBManager *man = AliCDBManager::Instance();
126 AliCDBEntry *entry=0;
128 entry = man->Get("VZERO/Calib/Data",fRun);
130 AliWarning("Load of calibration data from default storage failed!");
131 AliWarning("Calibration data will be loaded from local storage ($ALICE_ROOT)");
133 man->SetDefaultStorage("local://$ALICE_ROOT/OCDB");
134 entry = man->Get("VZERO/Calib/Data",fRun);
136 // Retrieval of data in directory VZERO/Calib/Data:
138 AliVZEROCalibData *calibdata = 0;
140 if (entry) calibdata = (AliVZEROCalibData*) entry->GetObject();
141 if (!calibdata) AliFatal("No calibration data from calibration database !");
148 //____________________________________________________________________________
149 void AliVZEROQADataMakerRec::EndOfDetectorCycle(AliQAv1::TASKINDEX_t task, TObjArray ** list)
151 // Detector specific actions at end of cycle
152 // Does the QA checking
154 AliQAChecker::Instance()->Run(AliQAv1::kVZERO, task, list) ;
156 if(task == AliQAv1::kRAWS){
157 TTimeStamp currentTime;
158 fCycleStopTime = currentTime.GetSec();
159 if(fCycleStopTime-fCycleStartTime>0.) fMonitorRate = fNTotEvents/(fCycleStopTime-fCycleStartTime);
160 //printf("%d event have been monitored -> Monitoring Rate = %f Hz\n",fNTotEvents,fMonitorRate);
161 Bool_t update = kFALSE;
162 if(!fTrendingUpdateEvent) {
164 } else if ((TMath::Abs(fTrendingUpdateTime * fMonitorRate - fTrendingUpdateEvent) / fTrendingUpdateEvent) > 0.1){
167 if(update) fTrendingUpdateEvent = (size_t)(fTrendingUpdateTime * fMonitorRate);
168 //printf("Update trending information every %d events\n",fTrendingUpdateEvent);
172 for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++) {
173 if (! IsValidEventSpecie(specie, list))
175 SetEventSpecie(AliRecoParam::ConvertIndex(specie)) ;
176 if(task == AliQAv1::kRAWS){
177 int nMaxBin = GetRawsData(kPedestalTimeInt0)->GetNbinsY();
178 if(fCurrentCycle%nMaxBin==0) {
179 GetRawsData(kPedestalTimeInt0)->Reset();
180 GetRawsData(kPedestalTimeInt1)->Reset();
181 GetRawsData(kChargeEoITimeInt0)->Reset();
182 GetRawsData(kChargeEoITimeInt1)->Reset();
186 for(Int_t iChannel=0; iChannel<64; iChannel++) {
187 for(Int_t integrator=0;integrator<2;integrator++){
188 sprintf(name,"Ped_%d_%d",iChannel,integrator);
189 hProj = ((TH2I*)GetRawsData((integrator == 0 ? kPedestalCycleInt0 : kPedestalCycleInt1)))->ProjectionY(name,iChannel+1,iChannel+1);
190 ((TH2D*)GetRawsData((integrator == 0 ? kPedestalTimeInt0 : kPedestalTimeInt1)))->Fill((double)iChannel,(double)(fCurrentCycle%nMaxBin),(double)hProj->GetMean());
193 sprintf(name,"Charge_%d_%d",iChannel,integrator);
194 hProj = ((TH2I*)GetRawsData((integrator == 0 ? kChargeEoICycleInt0 : kChargeEoICycleInt1)))->ProjectionY(name,iChannel+1,iChannel+1);
195 ((TH2D*)GetRawsData((integrator == 0 ? kChargeEoITimeInt0 : kChargeEoITimeInt1)))->Fill((double)iChannel,(double)(fCurrentCycle%nMaxBin),hProj->GetMean());
199 } else if (task == AliQAv1::kESDS) {
204 //____________________________________________________________________________
205 void AliVZEROQADataMakerRec::InitESDs()
207 // Creates histograms to control ESDs
209 const Bool_t expert = kTRUE ;
210 const Bool_t image = kTRUE ;
216 h1i = new TH1I("H1I_Cell_Multiplicity_V0A", "Cell Multiplicity in V0A;Multiplicity (Nb of Cell);Counts", 35, 0, 35) ;
217 Add2ESDsList(h1i, kCellMultiV0A, !expert, image) ;
219 h1i = new TH1I("H1I_Cell_Multiplicity_V0C", "Cell Multiplicity in V0;Multiplicity (Nb of Cell);Counts", 35, 0, 35) ;
220 Add2ESDsList(h1i, kCellMultiV0C, !expert, image) ;
222 h1d = new TH1D("H1D_MIP_Multiplicity_V0A", "MIP Multiplicity in V0A;Multiplicity (Nb of MIP);Counts", 1000, 0, 1000) ;
223 Add2ESDsList(h1d, kMIPMultiV0A, !expert, image) ;
225 h1d = new TH1D("H1D_MIP_Multiplicity_V0C", "MIP Multiplicity in V0C;Multiplicity (Nb of MIP);Counts", 1000, 0, 1000) ;
226 Add2ESDsList(h1d, kMIPMultiV0C, !expert, image) ;
228 h2d = new TH2D("H2D_MIP_Multiplicity_Channel", "MIP Multiplicity per Channel;Channel;Multiplicity (Nb of MIP)",64, 0, 64, 100, 0, 100) ;
229 Add2ESDsList(h2d, kMIPMultiChannel, !expert, image) ;
231 h1d = new TH1D("H1D_BBFlag_Counters", "BB Flag Counters;Channel;Counts",64, 0, 64) ;
232 Add2ESDsList(h1d, kBBFlag, !expert, image) ;
234 h1d = new TH1D("H1D_BGFlag_Counters", "BG Flag Counters;Channel;Counts",64, 0, 64) ;
235 Add2ESDsList(h1d, kBGFlag, !expert, image) ;
237 h2d = new TH2D("H2D_Charge_Channel", "ADC Charge per channel;Channel;Charge (ADC counts)",64, 0, 64, 1024, 0, 1024) ;
238 Add2ESDsList(h2d, kChargeChannel, !expert, image) ;
240 h2d = new TH2D("H2D_Time_Channel", "Time per channel;Channel;Time (ns)",64, 0, 64, 820, 0, 410) ;
241 Add2ESDsList(h2d, kTimeChannel, !expert, image) ;
243 h1d = new TH1D("H1D_V0A_Time", "Mean V0A Time;Time (ns);Counts",2048, 0., 409.6);
244 Add2ESDsList(h1d,kESDV0ATime, !expert, image);
246 h1d = new TH1D("H1D_V0C_Time", "Mean V0C Time;Time (ns);Counts",2048, 0., 409.6);
247 Add2ESDsList(h1d,kESDV0CTime, !expert, image);
249 h1d = new TH1D("H1D_Diff_Time", "Diff Time V0A - V0C;Diff Time V0A - V0C (ns);Counts",2*2048, -409.6, 409.6);
250 Add2ESDsList(h1d,kESDDiffTime, !expert, image);
254 //____________________________________________________________________________
255 void AliVZEROQADataMakerRec::InitRaws()
257 // Creates RAW histograms in Raws subdir
259 const Bool_t expert = kTRUE ;
260 const Bool_t saveCorr = kTRUE ;
261 const Bool_t image = kTRUE ;
263 char name[50] , title[100];
264 const Int_t kNintegrator = 2;
266 const Int_t kNTdcTimeBins = 1280;
267 const Int_t kTdcTimeMin = 0.;
268 const Int_t kTdcTimeMax = 125.;
269 const Int_t kNTdcWidthBins = 128;
270 const Int_t kTdcWidthMin = 0;
271 const Int_t kTdcWidthMax = 50.;
272 const Int_t kNChargeBins = 1024;
273 const Int_t kChargeMin = 0;
274 const Int_t kChargeMax = 1024;
275 const Int_t kNChannelBins = 64;
276 const Int_t kChannelMin = 0;
277 const Int_t kChannelMax = 64;
278 const Int_t kNPedestalBins = 200;
279 const Int_t kPedestalMin = 0;
280 const Int_t kPedestalMax = 200;
281 const Int_t kTimeMin = 0;
282 const Int_t kTimeMax = 100;
283 const Int_t kNMIPBins = 200;
284 const Int_t kMIPMin = 0;
285 const Int_t kMIPMax = 200;
291 AliVZEROTrending * trend;
295 // Creation of Cell Multiplicity Histograms
296 h1i = new TH1I("H1I_Multiplicity_V0A", "Cell Multiplicity in V0A;# of Cells;Entries", 35, 0, 35) ;
297 Add2RawsList(h1i,kMultiV0A, expert, image, saveCorr); iHisto++;
298 h1i = new TH1I("H1I_Multiplicity_V0C", "Cell Multiplicity in V0C;# of Cells;Entries", 35, 0, 35) ;
299 Add2RawsList(h1i,kMultiV0C, expert, image, saveCorr); iHisto++;
301 // Creation of Total Charge Histograms
302 h1d = new TH1D("H1D_Charge_V0A", "Total Charge in V0A;Charge [ADC counts];Counts", 2048, 0, 32768) ;
303 Add2RawsList(h1d,kChargeV0A, expert, image, saveCorr); iHisto++;
304 h1d = new TH1D("H1D_Charge_V0C", "Total Charge in V0C;Charge [ADC counts];Counts", 2048, 0, 32768) ;
305 Add2RawsList(h1d,kChargeV0C, expert, image, saveCorr); iHisto++;
306 h1d = new TH1D("H1D_Charge_V0", "Total Charge in V0;Charge [ADC counts];Counts", 2048, 0, 65536) ;
307 Add2RawsList(h1d,kChargeV0, expert, image, saveCorr); iHisto++;
309 // Creation of MIP Histograms
310 h1d = new TH1D("H1D_MIP_V0A", "Total MIP in V0A;Charge [MIP];Counts", 2*kNMIPBins,kMIPMin ,32*kMIPMax) ;
311 Add2RawsList(h1d,kRawMIPV0A, expert, image, saveCorr); iHisto++;
312 h1d = new TH1D("H1D_MIP_V0C", "Total MIP in V0C;Charge [MIP];Counts", 2*kNMIPBins,kMIPMin ,32*kMIPMax) ;
313 Add2RawsList(h1d,kRawMIPV0C, expert, image, saveCorr); iHisto++;
314 h1d = new TH1D("H1D_MIP_V0", "Total MIP in V0;Charge [MIP];Counts", 2*kNMIPBins,kMIPMin ,32*kMIPMax) ;
315 Add2RawsList(h1d,kRawMIPV0, expert, image, saveCorr); iHisto++;
316 h2d = new TH2D("H2D_MIP_Channel", "Nb of MIP per channel;Channel;# of Mips", kNChannelBins, kChannelMin, kChannelMax,kNMIPBins,kMIPMin ,kMIPMax) ;
317 Add2RawsList(h2d,kRawMIPChannel, expert, !image, !saveCorr); iHisto++;
321 // Creation of Charge EoI histogram
322 sprintf(name,"H2D_ChargeEoI");
323 sprintf(title,"Charge Event of Interest;Channel;Charge [ADC counts]");
324 h2d = new TH2D(name, title,kNChannelBins, kChannelMin, kChannelMax, kNChargeBins, kChargeMin, kChargeMax);
325 Add2RawsList(h2d,kChargeEoI, !expert, image, !saveCorr); iHisto++;
327 for(Int_t iInt=0;iInt<kNintegrator;iInt++){
328 // Creation of Pedestal histograms
329 sprintf(name,"H2I_Pedestal_Int%d",iInt);
330 sprintf(title,"Pedestal (Int%d);Channel;Pedestal [ADC counts]",iInt);
331 h2i = new TH2I(name, title,kNChannelBins, kChannelMin, kChannelMax,kNPedestalBins,kPedestalMin ,kPedestalMax );
332 Add2RawsList(h2i,(iInt == 0 ? kPedestalInt0 : kPedestalInt1), expert, !image, !saveCorr); iHisto++;
334 // Creation of temporary Pedestal histo used for the mean versus time histogram. This histogram will be reset at the end of each cycle
335 sprintf(name,"H2I_Pedestal_CycleInt%d",iInt);
336 sprintf(title,"One Cycle Pedestal (Int%d);Pedestal [ADC counts];Counts",iInt);
337 h2i = new TH2I(name, title,kNChannelBins, kChannelMin, kChannelMax,kNPedestalBins,kPedestalMin ,kPedestalMax );
338 Add2RawsList(h2i,(iInt == 0 ? kPedestalCycleInt0 : kPedestalCycleInt1), expert, !image, !saveCorr); iHisto++;
340 // Creation of Pedestal versus time graph.
341 sprintf(name,"H2D_Pedestal_Time_Int%d",iInt);
342 sprintf(title,"Pedestal Versus Time (Int%d);Time [ns];Pedestal [ADC counts]",iInt);
343 h2d = new TH2D(name, title,kNChannelBins, kChannelMin, kChannelMax,kTimeMax,kTimeMin ,kTimeMax );
344 Add2RawsList(h2d,(iInt == 0 ? kPedestalTimeInt0 : kPedestalTimeInt1), expert, !image, !saveCorr); iHisto++;
346 // Creation of Charge EoI histograms
347 sprintf(name,"H2I_ChargeEoI_Int%d",iInt);
348 sprintf(title,"Charge EoI (Int%d);Channel;Charge [ADC counts]",iInt);
349 h2i = new TH2I(name, title,kNChannelBins, kChannelMin, kChannelMax, kNChargeBins, kChargeMin, kChargeMax);
350 Add2RawsList(h2i,(iInt == 0 ? kChargeEoIInt0 : kChargeEoIInt1), expert, image, !saveCorr); iHisto++;
352 // Creation of temporary Charge EoI histograms used for the mean versus time histogram. This histogram will be reset at the end of each cycle
353 sprintf(name,"H2I_ChargeEoI_CycleInt%d",iInt);
354 sprintf(title,"One Cycle Charge EoI (Int%d);Charge [ADC counts];Counts",iInt);
355 h2i = new TH2I(name, title,kNChannelBins, kChannelMin, kChannelMax, kNChargeBins, kChargeMin, kChargeMax);
356 Add2RawsList(h2i,(iInt == 0 ? kChargeEoICycleInt0 : kChargeEoICycleInt1), expert, !image, !saveCorr); iHisto++;
358 // Creation of Charge EoI versus time graphs
359 sprintf(name,"H2D_ChargeEoI_Time_Int%d",iInt);
360 sprintf(title,"Charge EoI Versus Time (Int%d);Channel;Time",iInt);
361 h2d = new TH2D(name, title,kNChannelBins, kChannelMin, kChannelMax,kTimeMax,kTimeMin ,kTimeMax );
362 Add2RawsList(h2d,(iInt == 0 ? kChargeEoITimeInt0 : kChargeEoITimeInt1), expert, !image, !saveCorr); iHisto++;
364 sprintf(name,"H2I_ChargeEoI_BB_Int%d",iInt);
365 sprintf(title,"Charge EoI w/ BB Flag (Int%d);Channel;Charge [ADC counts]",iInt);
366 h2i = new TH2I(name, title,kNChannelBins, kChannelMin, kChannelMax, kNChargeBins, kChargeMin, kChargeMax);
367 Add2RawsList(h2i,(iInt == 0 ? kChargeEoIBBInt0 : kChargeEoIBBInt1), expert, !image, !saveCorr); iHisto++;
369 sprintf(name,"H2I_ChargeEoI_BG_Int%d",iInt);
370 sprintf(title,"Charge EoI w/ BG Flag (Int%d);Channel;Charge [ADC counts]",iInt);
371 h2i = new TH2I(name, title,kNChannelBins, kChannelMin, kChannelMax, kNChargeBins, kChargeMin, kChargeMax);
372 Add2RawsList(h2i,(iInt == 0 ? kChargeEoIBGInt0: kChargeEoIBGInt1), expert, !image, !saveCorr); iHisto++;
374 // Creation of Charge versus LHC Clock histograms
375 sprintf(name,"H2D_ChargeVsClock_Int%d",iInt);
376 sprintf(title,"Charge Versus LHC-Clock (Int%d);Channel;LHCClock;Charge [ADC counts]",iInt);
377 h2d = new TH2D(name, title,kNChannelBins, kChannelMin, kChannelMax,21, -10.5, 10.5 );
378 Add2RawsList(h2d,(iInt == 0 ? kChargeVsClockInt0 : kChargeVsClockInt1 ), expert, !image, !saveCorr); iHisto++;
380 // Creation of Minimum Bias Charge histograms
381 for(Int_t iBB=0;iBB<2;iBB++){
382 for(Int_t iBG=0;iBG<2;iBG++){
383 sprintf(name,"H2I_ChargeMB_BB%d_BG%d_Int%d",iBB,iBG,iInt);
384 sprintf(title,"MB Charge (BB=%d, BG=%d, Int=%d);Channel;Charge [ADC counts]",iBB,iBG,iInt);
385 h2i = new TH2I(name, title,kNChannelBins, kChannelMin, kChannelMax,kNChargeBins, kChargeMin, kChargeMax);
389 if(iBG==0) idx = kChargeMBBB0BG0Int0;
390 else idx = kChargeMBBB0BG1Int0;
392 if(iBG==0) idx = kChargeMBBB1BG0Int0;
393 else idx = kChargeMBBB1BG1Int0;
397 if(iBG==0) idx = kChargeMBBB0BG0Int1;
398 else idx = kChargeMBBB0BG1Int1;
400 if(iBG==0) idx = kChargeMBBB1BG0Int1;
401 else idx = kChargeMBBB1BG1Int1;
404 Add2RawsList(h2i,idx, expert, !image, !saveCorr); iHisto++;
410 // Creation of Time histograms
411 sprintf(name,"H2I_Width");
412 sprintf(title,"HPTDC Width;Channel;Width [ns]");
413 h2i = new TH2I(name, title,kNChannelBins, kChannelMin, kChannelMax, kNTdcWidthBins, kTdcWidthMin, kTdcWidthMax);
414 Add2RawsList(h2i,kWidth, expert, !image, !saveCorr); iHisto++;
416 sprintf(name,"H2I_Width_BB");
417 sprintf(title,"HPTDC Width w/ BB Flag condition;Channel;Width [ns]");
418 h2i = new TH2I(name, title,kNChannelBins, kChannelMin, kChannelMax, kNTdcWidthBins, kTdcWidthMin, kTdcWidthMax);
419 Add2RawsList(h2i,kWidthBB, expert, !image, !saveCorr); iHisto++;
421 sprintf(name,"H2I_Width_BG");
422 sprintf(title,"HPTDC Width w/ BG Flag condition;Channel;Width [ns]");
423 h2i = new TH2I(name, title,kNChannelBins, kChannelMin, kChannelMax, kNTdcWidthBins, kTdcWidthMin, kTdcWidthMax);
424 Add2RawsList(h2i,kWidthBG, expert, !image, !saveCorr); iHisto++;
426 sprintf(name,"H2I_HPTDCTime");
427 sprintf(title,"HPTDC Time;Channel;Leading Time [ns]");
428 h2i = new TH2I(name, title,kNChannelBins, kChannelMin, kChannelMax, kNTdcTimeBins, kTdcTimeMin, kTdcTimeMax);
429 Add2RawsList(h2i,kHPTDCTime, expert, image, !saveCorr); iHisto++;
431 sprintf(name,"H2I_HPTDCTime_BB");
432 sprintf(title,"HPTDC Time w/ BB Flag condition;Channel;Leading Time [ns]");
433 h2i = new TH2I(name, title,kNChannelBins, kChannelMin, kChannelMax, kNTdcTimeBins, kTdcTimeMin, kTdcTimeMax);
434 Add2RawsList(h2i,kHPTDCTimeBB, !expert, image, !saveCorr); iHisto++;
436 sprintf(name,"H2I_HPTDCTime_BG");
437 sprintf(title,"HPTDC Time w/ BG Flag condition;Channel;Leading Time [ns]");
438 h2i = new TH2I(name, title,kNChannelBins, kChannelMin, kChannelMax, kNTdcTimeBins, kTdcTimeMin, kTdcTimeMax);
439 Add2RawsList(h2i,kHPTDCTimeBG, !expert, image, !saveCorr); iHisto++;
441 sprintf(name,"H1D_V0A_Time");
442 sprintf(title,"V0A Time;Time [ns];Counts");
443 h1d = new TH1D(name, title,kNTdcTimeBins, kTdcTimeMin, kTdcTimeMax);
444 Add2RawsList(h1d,kV0ATime, expert, !image, saveCorr); iHisto++;
446 sprintf(name,"H1D_V0C_Time");
447 sprintf(title,"V0C Time;Time [ns];Counts");
448 h1d = new TH1D(name, title,kNTdcTimeBins, kTdcTimeMin, kTdcTimeMax);
449 Add2RawsList(h1d,kV0CTime, expert, !image, saveCorr); iHisto++;
451 sprintf(name,"H1D_Diff_Time");
452 sprintf(title,"Diff V0A-V0C Time;Time [ns];Counts");
453 h1d = new TH1D(name, title,2*kNTdcTimeBins, -kTdcTimeMax, kTdcTimeMax);
454 Add2RawsList(h1d,kDiffTime, expert, !image, saveCorr); iHisto++;
456 // Creation of Flag versus LHC Clock histograms
458 sprintf(name,"H1D_BBFlagPerChannel");
459 sprintf(title,"BB-Flags Versus Channel;Channel;BB Flags Count");
460 h1d = new TH1D(name, title,kNChannelBins, kChannelMin, kChannelMax );
461 Add2RawsList(h1d,kBBFlagsPerChannel, !expert, image, !saveCorr); iHisto++;
463 sprintf(name,"H2D_BBFlagVsClock");
464 sprintf(title,"BB-Flags Versus LHC-Clock;Channel;LHC Clocks");
465 h2d = new TH2D(name, title,kNChannelBins, kChannelMin, kChannelMax,21, -10.5, 10.5 );
466 Add2RawsList(h2d,kBBFlagVsClock, expert, !image, !saveCorr); iHisto++;
468 sprintf(name,"H2D_BGFlagVsClock");
469 sprintf(title,"BG-Flags Versus LHC-Clock;Channel;LHC Clocks");
470 h2d = new TH2D(name, title,kNChannelBins, kChannelMin, kChannelMax,21, -10.5, 10.5 );
471 Add2RawsList(h2d,kBGFlagVsClock, expert, !image, !saveCorr); iHisto++;
473 sprintf(name,"TREND_MeanChargePerRing");
474 sprintf(title,"Mean Charge per Event and per Ring versus time ");
475 trend = new AliVZEROTrending(name, title);
476 Add2RawsList(trend,kRawMeanChargePerRing, expert, !image, !saveCorr); iHisto++;
478 sprintf(name,"TREND_MeanFlagPerRing");
479 sprintf(title,"Mean Flag per Event and per Ring versus time ");
480 trend = new AliVZEROTrending(name, title);
481 Add2RawsList(trend,kRawMeanFlagPerRing, expert, !image, !saveCorr); iHisto++;
483 sprintf(name,"H1D_DQMFlag");
484 sprintf(title,"Current Flag per Event / Mean Flag per Event ");
485 h1d = new TH1D(name, title, kNChannelBins, kChannelMin, kChannelMax);
486 h1d->SetFillColor(29);
487 h1d->SetLineWidth(2);
488 h1d->GetXaxis()->SetLabelSize(0.06);
489 h1d->GetXaxis()->SetNdivisions(808,kFALSE);
490 h1d->GetXaxis()->SetBinLabel(4, "V0C");h1d->GetXaxis()->SetBinLabel(5, "R0");
491 h1d->GetXaxis()->SetBinLabel(12, "V0C");h1d->GetXaxis()->SetBinLabel(13, "R1");
492 h1d->GetXaxis()->SetBinLabel(20, "V0C");h1d->GetXaxis()->SetBinLabel(21, "R2");
493 h1d->GetXaxis()->SetBinLabel(28, "V0C");h1d->GetXaxis()->SetBinLabel(29, "R3");
494 h1d->GetXaxis()->SetBinLabel(36, "V0A");h1d->GetXaxis()->SetBinLabel(37, "R0");
495 h1d->GetXaxis()->SetBinLabel(44, "V0A");h1d->GetXaxis()->SetBinLabel(45, "R1");
496 h1d->GetXaxis()->SetBinLabel(52, "V0A");h1d->GetXaxis()->SetBinLabel(53, "R2");
497 h1d->GetXaxis()->SetBinLabel(60, "V0A");h1d->GetXaxis()->SetBinLabel(61, "R3");
498 h1d->GetXaxis()->CenterTitle();
499 h1d->GetXaxis()->SetTitleOffset(0.8);
500 h1d->GetXaxis()->SetNdivisions(808,kFALSE);
501 Add2RawsList(h1d,kRawDQMFlag, expert, image, !saveCorr); iHisto++;
503 sprintf(name,"H1D_DQMCharge");
504 sprintf(title,"Current Charge per Event / Mean Charge per Event ");
505 h1d = new TH1D(name, title, kNChannelBins, kChannelMin, kChannelMax);
506 h1d->SetFillColor(29);
507 h1d->SetLineWidth(2);
508 h1d->GetXaxis()->SetLabelSize(0.06);
509 h1d->GetXaxis()->SetNdivisions(808,kFALSE);
510 h1d->GetXaxis()->SetBinLabel(4, "V0C");h1d->GetXaxis()->SetBinLabel(5, "R0");
511 h1d->GetXaxis()->SetBinLabel(12, "V0C");h1d->GetXaxis()->SetBinLabel(13, "R1");
512 h1d->GetXaxis()->SetBinLabel(20, "V0C");h1d->GetXaxis()->SetBinLabel(21, "R2");
513 h1d->GetXaxis()->SetBinLabel(28, "V0C");h1d->GetXaxis()->SetBinLabel(29, "R3");
514 h1d->GetXaxis()->SetBinLabel(36, "V0A");h1d->GetXaxis()->SetBinLabel(37, "R0");
515 h1d->GetXaxis()->SetBinLabel(44, "V0A");h1d->GetXaxis()->SetBinLabel(45, "R1");
516 h1d->GetXaxis()->SetBinLabel(52, "V0A");h1d->GetXaxis()->SetBinLabel(53, "R2");
517 h1d->GetXaxis()->SetBinLabel(60, "V0A");h1d->GetXaxis()->SetBinLabel(61, "R3");
518 h1d->GetXaxis()->CenterTitle();
519 h1d->GetXaxis()->SetTitleOffset(0.8);
520 h1d->GetXaxis()->SetNdivisions(808,kFALSE);
521 Add2RawsList(h1d,kRawDQMCharge, expert, image, !saveCorr); iHisto++;
523 AliDebug(AliQAv1::GetQADebugLevel(), Form("%d Histograms has been added to the Raws List",iHisto));
526 //____________________________________________________________________________
527 void AliVZEROQADataMakerRec::InitDigits()
529 // create Digits histograms in Digits subdir
530 const Bool_t expert = kTRUE ;
531 const Bool_t image = kTRUE ;
539 // create Digits histograms in Digits subdir
540 TH1I * h0 = new TH1I("hDigitMultiplicity", "Digits multiplicity distribution in VZERO;# of Digits;Entries", 100, 0, 99) ;
542 Add2DigitsList(h0, 0, !expert, image) ;
544 for (Int_t i=0; i<64; i++)
546 sprintf(tDCname, "hDigitTDC%d", i);
547 sprintf(texte,"Digit TDC in cell %d; TDC value;Entries",i);
548 fhDigTDC[i] = new TH1I(tDCname,texte,300,0.,149.);
550 sprintf(aDCname,"hDigitADC%d",i);
551 sprintf(texte,"Digit ADC in cell %d;ADC value;Entries",i);
552 fhDigADC[i]= new TH1I(aDCname,texte,1024,0.,1023.);
554 Add2DigitsList(fhDigTDC[i],i+1, !expert, image);
555 Add2DigitsList(fhDigADC[i],i+1+64, !expert, image);
559 //____________________________________________________________________________
560 void AliVZEROQADataMakerRec::MakeDigits()
562 // makes data from Digits
564 GetDigitsData(0)->Fill(fDigitsArray->GetEntriesFast()) ;
565 TIter next(fDigitsArray) ;
566 AliVZEROdigit *aVZERODigit ;
567 while ( (aVZERODigit = dynamic_cast<AliVZEROdigit *>(next())) ) {
568 Int_t aPMNumber = aVZERODigit->PMNumber();
569 GetDigitsData(aPMNumber +1)->Fill( aVZERODigit->Time()) ; // in 100 of picoseconds
570 GetDigitsData(aPMNumber +1+64)->Fill( aVZERODigit->ADC()) ;
575 //____________________________________________________________________________
576 void AliVZEROQADataMakerRec::MakeDigits(TTree *digitTree)
578 // makes data from Digit Tree
581 fDigitsArray->Clear() ;
583 fDigitsArray = new TClonesArray("AliVZEROdigit", 1000) ;
585 TBranch * branch = digitTree->GetBranch("VZERODigit") ;
587 AliWarning("VZERO branch in Digit Tree not found") ;
589 branch->SetAddress(&fDigitsArray) ;
590 branch->GetEntry(0) ;
596 //____________________________________________________________________________
597 void AliVZEROQADataMakerRec::MakeESDs(AliESDEvent * esd)
599 // Creates QA data from ESDs
601 UInt_t eventType = esd->GetEventType();
605 AliESDVZERO *esdVZERO=esd->GetVZEROData();
607 if (!esdVZERO) break;
609 GetESDsData(kCellMultiV0A)->Fill(esdVZERO->GetNbPMV0A());
610 GetESDsData(kCellMultiV0C)->Fill(esdVZERO->GetNbPMV0C());
611 GetESDsData(kMIPMultiV0A)->Fill(esdVZERO->GetMTotV0A());
612 GetESDsData(kMIPMultiV0C)->Fill(esdVZERO->GetMTotV0C());
614 Float_t timeV0A = 0., timeV0C = 0., diffTime;
615 Int_t iTimeV0A = 0, iTimeV0C = 0;
617 for(Int_t i=0;i<64;i++) {
618 GetESDsData(kMIPMultiChannel)->Fill((Float_t) i,(Float_t) esdVZERO->GetMultiplicity(i));
619 GetESDsData(kChargeChannel)->Fill((Float_t) i,(Float_t) esdVZERO->GetAdc(i));
620 if(esdVZERO->GetBBFlag(i)) GetESDsData(kBBFlag)->Fill((Float_t) i);
621 if(esdVZERO->GetBGFlag(i)) GetESDsData(kBGFlag)->Fill((Float_t) i);
623 Float_t time = (Float_t) esdVZERO->GetTime(i)/10.; //Convert in ns: 1 TDC channel = 100ps
624 GetESDsData(kTimeChannel)->Fill((Float_t) i,time);
636 if(iTimeV0A>0) timeV0A /= iTimeV0A;
638 if(iTimeV0C>0) timeV0C /= iTimeV0C;
640 if(timeV0A<0. || timeV0C<0.) diffTime = -10000.;
641 else diffTime = timeV0A - timeV0C;
643 GetESDsData(kESDV0ATime)->Fill(timeV0A);
644 GetESDsData(kESDV0CTime)->Fill(timeV0C);
645 GetESDsData(kESDDiffTime)->Fill(diffTime);
652 //____________________________________________________________________________
653 void AliVZEROQADataMakerRec::MakeRaws(AliRawReader* rawReader)
655 // Fills histograms with Raws, computes average ADC values dynamically (pedestal subtracted)
657 // Check id histograms already created for this Event Specie
658 if ( ! GetRawsData(kPedestalInt0) )
662 AliVZERORawStream* rawStream = new AliVZERORawStream(rawReader);
663 if(!(rawStream->Next())) return;
665 eventTypeType eventType = rawReader->GetType();
669 Double_t timeV0A =0., timeV0C = 0.;
670 UInt_t itimeV0A=0, itimeV0C=0;
671 Double_t chargeV0A=0., chargeV0C=0.;
672 Double_t mipV0A=0., mipV0C=0.;
674 Double_t diffTime=-100000.;
682 if(fNSubEvents++>=fTrendingUpdateEvent && fTrendingUpdateEvent>0) {
698 for(Int_t iChannel=0; iChannel<64; iChannel++) { // BEGIN : Loop over channels
700 offlineCh = rawStream->GetOfflineChannel(iChannel);
702 // Fill Pedestal histograms
704 for(Int_t j=15; j<21; j++) {
705 if((rawStream->GetBGFlag(iChannel,j) || rawStream->GetBBFlag(iChannel,j))) iFlag++;
708 if(iFlag == 0){ //No Flag found
709 for(Int_t j=15; j<21; j++){
710 pedestal= (Int_t) rawStream->GetPedestal(iChannel, j);
711 integrator = rawStream->GetIntegratorFlag(iChannel, j);
713 GetRawsData((integrator == 0 ? kPedestalInt0 : kPedestalInt1))->Fill(offlineCh,pedestal);
714 GetRawsData((integrator == 0 ? kPedestalCycleInt0 : kPedestalCycleInt1))->Fill(offlineCh,pedestal);
718 // Fill Charge EoI histograms
720 adc[offlineCh] = 0.0;
722 // Search for the maximum charge in the train of 21 LHC clocks
723 // regardless of the integrator which has been operated:
726 Float_t adcPedSub[21];
727 for(Int_t iClock=0; iClock<21; iClock++){
728 Bool_t iIntegrator = rawStream->GetIntegratorFlag(iChannel,iClock);
729 Int_t k = offlineCh+64*iIntegrator;
731 //printf(Form("clock = %d adc = %f ped %f\n",iClock,rawStream->GetPedestal(iChannel,iClock),fPedestal[k]));
733 adcPedSub[iClock] = rawStream->GetPedestal(iChannel,iClock) - fCalibData->GetPedestal(k);
734 // if(adcPedSub[iClock] <= GetRecoParam()->GetNSigmaPed()*fCalibData->GetSigma(k)) {
735 if(adcPedSub[iClock] <= 2.*fCalibData->GetSigma(k)) {
736 adcPedSub[iClock] = 0;
739 // if(iClock < GetRecoParam()->GetStartClock() || iClock > GetRecoParam()->GetEndClock()) continue;
740 if(iClock < 8 || iClock > 12) continue;
741 if(adcPedSub[iClock] > maxadc) {
742 maxadc = adcPedSub[iClock];
746 //printf(Form("Channel %d (online), %d (offline)\n",iChannel,j));
748 // Int_t start = imax - GetRecoParam()->GetNPreClocks();
749 Int_t start = imax - 2;
750 if (start < 0) start = 0;
751 // Int_t end = imax + GetRecoParam()->GetNPostClocks();
752 Int_t end = imax + 1;
753 if (end > 20) end = 20;
754 for(Int_t iClock = start; iClock <= end; iClock++) {
755 adc[offlineCh] += adcPedSub[iClock];
761 charge = rawStream->GetPedestal(iChannel,iClock); // Charge at the maximum
763 integrator = rawStream->GetIntegratorFlag(iChannel,iClock);
764 BBFlag = rawStream->GetBBFlag(iChannel, iClock);
765 BGFlag = rawStream->GetBGFlag(iChannel,iClock );
766 Int_t board = AliVZEROCalibData::GetBoardNumber(offlineCh);
767 time = rawStream->GetTime(iChannel)*fCalibData->GetTimeResolution(board);
768 width = rawStream->GetWidth(iChannel)*fCalibData->GetWidthResolution(board);
770 GetRawsData(kChargeEoI)->Fill(offlineCh,adc[offlineCh]);
772 GetRawsData((integrator == 0 ? kChargeEoIInt0 : kChargeEoIInt1))->Fill(offlineCh,charge);
773 if(BBFlag) GetRawsData((integrator == 0 ? kChargeEoIBBInt0 : kChargeEoIBBInt1))->Fill(offlineCh,charge);
774 if(BGFlag) GetRawsData((integrator == 0 ? kChargeEoIBGInt0 : kChargeEoIBGInt1))->Fill(offlineCh,charge);
776 hProj = ((TH2I*)GetRawsData((integrator == 0 ? kPedestalInt0 : kPedestalInt1)))->ProjectionY("",offlineCh+1,offlineCh+1);
777 Double_t ped = hProj->GetMean();
778 Double_t sigma = hProj->GetRMS();
781 Double_t chargeEoI = charge - ped;
783 // Calculation of the number of MIP
784 Double_t mipEoI = chargeEoI * fCalibData->GetMIPperADC(offlineCh);
786 int side = offlineCh/32;
787 int ring = (offlineCh - 32*side) / 8;
789 fFlagPerRing[side*4 + ring] += 1;
790 fFlagPerChannel[offlineCh] += 1;
793 if((chargeEoI > 2.*sigma) && !(time <1.e-6)){
794 fChargePerRing[side*4 + ring] += chargeEoI;
795 fChargePerChannel[offlineCh] += chargeEoI;
796 ((TH2I*)GetRawsData((integrator == 0 ? kChargeEoICycleInt0 : kChargeEoICycleInt1)))->Fill(offlineCh,chargeEoI);
797 ((TH2D*)GetRawsData(kRawMIPChannel))->Fill(offlineCh,mipEoI);
800 chargeV0C += chargeEoI;
804 chargeV0A += chargeEoI;
809 // Fill Charge Minimum Bias Histograms
812 for(Int_t iBunch=0; iBunch<10; iBunch++){
813 integrator = rawStream->GetIntMBFlag(iChannel, iBunch);
814 BBFlag = rawStream->GetBBMBFlag(iChannel, iBunch);
815 BGFlag = rawStream->GetBGMBFlag(iChannel, iBunch);
816 MBCharge = rawStream->GetChargeMB(iChannel, iBunch);
820 if(BGFlag==0) idx = kChargeMBBB0BG0Int0;
821 else idx = kChargeMBBB0BG1Int0;
823 if(BGFlag==0) idx = kChargeMBBB1BG0Int0;
824 else idx = kChargeMBBB1BG1Int0;
828 if(BGFlag==0) idx = kChargeMBBB0BG0Int1;
829 else idx = kChargeMBBB0BG1Int1;
831 if(BGFlag==0) idx = kChargeMBBB1BG0Int1;
832 else idx = kChargeMBBB1BG1Int1;
835 GetRawsData(idx)->Fill(offlineCh,MBCharge);
838 // Fill HPTDC Time Histograms
840 BBFlag = rawStream->GetBBFlag(iChannel, 10);
841 BGFlag = rawStream->GetBGFlag(iChannel, 10);
852 GetRawsData(kHPTDCTime)->Fill(offlineCh,time);
853 GetRawsData(kWidth)->Fill(offlineCh,width);
855 GetRawsData(kHPTDCTimeBB)->Fill(offlineCh,time);
856 GetRawsData(kWidthBB)->Fill(offlineCh,width);
859 GetRawsData(kHPTDCTimeBG)->Fill(offlineCh,time);
860 GetRawsData(kWidthBG)->Fill(offlineCh,width);
863 // Fill Flag and Charge Versus LHC-Clock histograms
865 for(Int_t iEvent=0; iEvent<21; iEvent++){
866 charge = rawStream->GetPedestal(iChannel,iEvent);
867 integrator = rawStream->GetIntegratorFlag(iChannel,iEvent);
868 BBFlag = rawStream->GetBBFlag(iChannel, iEvent);
869 BGFlag = rawStream->GetBGFlag(iChannel,iEvent );
871 ((TH2*) GetRawsData((integrator == 0 ? kChargeVsClockInt0 : kChargeVsClockInt1 )))->Fill(offlineCh,(float)iEvent-10,(float)charge);
872 ((TH2*) GetRawsData(kBBFlagVsClock))->Fill(offlineCh,(float)iEvent-10,(float)BBFlag);
873 ((TH2*) GetRawsData(kBGFlagVsClock))->Fill(offlineCh,(float)iEvent-10,(float)BGFlag);
874 if(iEvent==10) ((TH1*) GetRawsData(kBBFlagsPerChannel))->Fill(offlineCh,(float)BBFlag);
877 }// END of Loop over channels
879 if(itimeV0A>0) timeV0A /= itimeV0A;
881 if(itimeV0C>0) timeV0C /= itimeV0C;
883 if(timeV0A<0. || timeV0C<0.) diffTime = -10000.;
884 else diffTime = timeV0A - timeV0C;
886 GetRawsData(kV0ATime)->Fill(timeV0A);
887 GetRawsData(kV0CTime)->Fill(timeV0C);
888 GetRawsData(kDiffTime)->Fill(diffTime);
890 GetRawsData(kMultiV0A)->Fill(mulV0A);
891 GetRawsData(kMultiV0C)->Fill(mulV0C);
893 GetRawsData(kChargeV0A)->Fill(chargeV0A);
894 GetRawsData(kChargeV0C)->Fill(chargeV0C);
895 GetRawsData(kChargeV0)->Fill(chargeV0A + chargeV0C);
897 GetRawsData(kRawMIPV0A)->Fill(mipV0A);
898 GetRawsData(kRawMIPV0C)->Fill(mipV0C);
899 GetRawsData(kRawMIPV0)->Fill(mipV0A + mipV0C);
902 } // END of SWITCH : EVENT TYPE
905 TParameter<double> * p = dynamic_cast<TParameter<double>*>(GetParameterList()->FindObject(Form("%s_%s_%s", GetName(), AliQAv1::GetTaskName(AliQAv1::kRAWS).Data(), GetRawsData(kMultiV0A)->GetName()))) ;
906 if (p) p->SetVal((double)mulV0A) ;
908 p = dynamic_cast<TParameter<double>*>(GetParameterList()->FindObject(Form("%s_%s_%s", GetName(), AliQAv1::GetTaskName(AliQAv1::kRAWS).Data(), GetRawsData(kMultiV0C)->GetName()))) ;
909 if (p) p->SetVal((double)mulV0C) ;
911 p = dynamic_cast<TParameter<double>*>(GetParameterList()->FindObject(Form("%s_%s_%s", GetName(), AliQAv1::GetTaskName(AliQAv1::kRAWS).Data(), GetRawsData(kChargeV0A)->GetName()))) ;
912 if (p) p->SetVal((double)chargeV0A) ;
914 p = dynamic_cast<TParameter<double>*>(GetParameterList()->FindObject(Form("%s_%s_%s", GetName(), AliQAv1::GetTaskName(AliQAv1::kRAWS).Data(), GetRawsData(kChargeV0C)->GetName()))) ;
915 if (p) p->SetVal((double)chargeV0C) ;
917 p = dynamic_cast<TParameter<double>*>(GetParameterList()->FindObject(Form("%s_%s_%s", GetName(), AliQAv1::GetTaskName(AliQAv1::kRAWS).Data(), GetRawsData(kChargeV0)->GetName()))) ;
918 if (p) p->SetVal((double)(chargeV0A + chargeV0C)) ;
920 p = dynamic_cast<TParameter<double>*>(GetParameterList()->FindObject(Form("%s_%s_%s", GetName(), AliQAv1::GetTaskName(AliQAv1::kRAWS).Data(), GetRawsData(kRawMIPV0A)->GetName()))) ;
921 if (p) p->SetVal((double)mipV0A) ;
923 p = dynamic_cast<TParameter<double>*>(GetParameterList()->FindObject(Form("%s_%s_%s", GetName(), AliQAv1::GetTaskName(AliQAv1::kRAWS).Data(), GetRawsData(kRawMIPV0C)->GetName()))) ;
924 if (p) p->SetVal((double)mipV0C) ;
926 p = dynamic_cast<TParameter<double>*>(GetParameterList()->FindObject(Form("%s_%s_%s", GetName(), AliQAv1::GetTaskName(AliQAv1::kRAWS).Data(), GetRawsData(kRawMIPV0)->GetName()))) ;
927 if (p) p->SetVal((double)(mipV0A + mipV0C)) ;
929 p = dynamic_cast<TParameter<double>*>(GetParameterList()->FindObject(Form("%s_%s_%s", GetName(), AliQAv1::GetTaskName(AliQAv1::kRAWS).Data(), GetRawsData(kV0ATime)->GetName()))) ;
930 if (p) p->SetVal((double)timeV0A) ;
932 p = dynamic_cast<TParameter<double>*>(GetParameterList()->FindObject(Form("%s_%s_%s", GetName(), AliQAv1::GetTaskName(AliQAv1::kRAWS).Data(), GetRawsData(kV0CTime)->GetName()))) ;
933 if (p) p->SetVal((double)timeV0C) ;
935 p = dynamic_cast<TParameter<double>*>(GetParameterList()->FindObject(Form("%s_%s_%s", GetName(), AliQAv1::GetTaskName(AliQAv1::kRAWS).Data(), GetRawsData(kDiffTime)->GetName()))) ;
936 if (p) p->SetVal((double)diffTime) ;
938 delete rawStream; rawStream = 0x0;
943 //____________________________________________________________________________
944 void AliVZEROQADataMakerRec::StartOfDetectorCycle()
946 // Detector specific actions at start of cycle
948 // Reset of the histogram used - to have the trend versus time -
950 fCalibData = GetCalibData();
953 h = GetRawsData(kPedestalCycleInt0);
955 h = GetRawsData(kPedestalCycleInt1);
957 h = GetRawsData(kChargeEoICycleInt0);
959 h = GetRawsData(kChargeEoICycleInt1);
962 TTimeStamp currentTime;
963 fCycleStartTime = currentTime.GetSec();
968 //-------------------------------------------------------------------------------------------------
969 void AliVZEROQADataMakerRec::AddTrendingEntry(){
970 //printf("AddTrendingEntry\n");
973 // Normalize to the number of events
974 for(int i=0; i<8;i++){
975 // fChargePerRing[i] *= TMath::Power(10.,i)/fTrendingUpdateEvent;
976 // fFlagPerRing[i] *= TMath::Power(10.,i)/fTrendingUpdateEvent;
977 fChargePerRing[i] /= fTrendingUpdateEvent;
978 fFlagPerRing[i] /= fTrendingUpdateEvent;
981 GetRawsData(kRawDQMCharge)->Reset();
982 GetRawsData(kRawDQMFlag)->Reset();
984 for(int i=0; i<64;i++){
985 fChargePerChannel[i] /= fTrendingUpdateEvent;
986 fFlagPerChannel[i] /= fTrendingUpdateEvent;
988 if(fMeanChargePerChannel[i]) GetRawsData(kRawDQMCharge)->Fill(i,fChargePerChannel[i]/fMeanChargePerChannel[i]);
989 else GetRawsData(kRawDQMCharge)->Fill(i,0.);
991 if(fMeanFlagPerChannel[i]) GetRawsData(kRawDQMFlag)->Fill(i,fFlagPerChannel[i]/fMeanFlagPerChannel[i]);
992 else GetRawsData(kRawDQMFlag)->Fill(i,0.);
994 fMeanChargePerChannel[i] = (fMeanChargePerChannel[i] * (fNTrendingUpdates-1) + fChargePerChannel[i]) / fNTrendingUpdates;
995 fMeanFlagPerChannel[i] = (fMeanFlagPerChannel[i] * (fNTrendingUpdates-1) + fFlagPerChannel[i]) / fNTrendingUpdates;
999 TTimeStamp currentTime;
1000 ((AliVZEROTrending*)GetRawsData(kRawMeanChargePerRing))->AddEntry(fChargePerRing, currentTime.GetSec());
1001 ((AliVZEROTrending*)GetRawsData(kRawMeanFlagPerRing))->AddEntry(fFlagPerRing, currentTime.GetSec());
1002 //moMeanFlagPerRing->AddEntry(fFlagPerRing, currentTime.GetSec());
1004 // Put back counters to zero
1005 for(int i=0; i<8;i++){
1006 fChargePerRing[i] = 0.;
1007 fFlagPerRing[i] = 0.;
1009 for(int i=0; i<64;i++){
1010 fChargePerChannel[i] = 0.;
1011 fFlagPerChannel[i] = 0.;