]> git.uio.no Git - u/mrichter/AliRoot.git/blame - VZERO/AliVZEROQADataMakerRec.cxx
Use double precision everywhere (Federico)
[u/mrichter/AliRoot.git] / VZERO / AliVZEROQADataMakerRec.cxx
CommitLineData
508b9fc0 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
6bec7c7c 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
508b9fc0 21
22// --- ROOT system ---
23#include <TClonesArray.h>
24#include <TFile.h>
25#include <TH1F.h>
26#include <TH1I.h>
4da80b8c 27#include <TH2I.h>
9bd82f77 28#include <TH2D.h>
29#include <TGraph.h>
f81355e3 30#include <TParameter.h>
508b9fc0 31
32// --- Standard library ---
33
34// --- AliRoot header files ---
35#include "AliESDEvent.h"
36#include "AliLog.h"
1e376713 37#include "AliCDBManager.h"
38#include "AliCDBStorage.h"
39#include "AliCDBEntry.h"
508b9fc0 40#include "AliVZEROQADataMakerRec.h"
41#include "AliQAChecker.h"
4da80b8c 42#include "AliRawReader.h"
508b9fc0 43#include "AliVZERORawStream.h"
5192f264 44#include "AliVZEROdigit.h"
508b9fc0 45#include "AliVZEROReconstructor.h"
9bd82f77 46#include "event.h"
508b9fc0 47
48
49ClassImp(AliVZEROQADataMakerRec)
50
51//____________________________________________________________________________
52 AliVZEROQADataMakerRec::AliVZEROQADataMakerRec() :
4e25ac79 53 AliQADataMakerRec(AliQAv1::GetDetName(AliQAv1::kVZERO), "VZERO Quality Assurance Data Maker"),
9bd82f77 54 fCalibData(0x0),
1e376713 55 fEvent(0)
56
508b9fc0 57{
6bec7c7c 58 // Constructor
59
5379c4a3 60 AliDebug(AliQAv1::GetQADebugLevel(), "Construct VZERO QA Object");
1e376713 61
62 for(Int_t i=0; i<64; i++){
63 fEven[i] = 0;
64 fOdd[i] = 0; }
65
66 for(Int_t i=0; i<128; i++){
6bec7c7c 67 fADCmean[i] = 0.0; }
508b9fc0 68}
69
70//____________________________________________________________________________
1e376713 71 AliVZEROQADataMakerRec::AliVZEROQADataMakerRec(const AliVZEROQADataMakerRec& qadm) :
72 AliQADataMakerRec(),
9bd82f77 73 fCalibData(0x0),
1e376713 74 fEvent(0)
75
508b9fc0 76{
6bec7c7c 77 // Copy constructor
78
1e376713 79 SetName((const char*)qadm.GetName()) ;
80 SetTitle((const char*)qadm.GetTitle());
508b9fc0 81}
82
83//__________________________________________________________________
84AliVZEROQADataMakerRec& AliVZEROQADataMakerRec::operator = (const AliVZEROQADataMakerRec& qadm )
85{
86 // Equal operator
6bec7c7c 87
508b9fc0 88 this->~AliVZEROQADataMakerRec();
89 new(this) AliVZEROQADataMakerRec(qadm);
90 return *this;
91}
1e376713 92
93//____________________________________________________________________________
94AliVZEROCalibData* AliVZEROQADataMakerRec::GetCalibData() const
95
96{
5f650de8 97 AliCDBManager *man = AliCDBManager::Instance();
6bec7c7c 98
5f650de8 99 AliCDBEntry *entry=0;
1e376713 100
5f650de8 101 entry = man->Get("VZERO/Calib/Data",fRun);
102 if(!entry){
103 AliWarning("Load of calibration data from default storage failed!");
104 AliWarning("Calibration data will be loaded from local storage ($ALICE_ROOT)");
105
106 man->SetDefaultStorage("local://$ALICE_ROOT/OCDB");
107 entry = man->Get("VZERO/Calib/Data",fRun);
108 }
109 // Retrieval of data in directory VZERO/Calib/Data:
1e376713 110
5f650de8 111 AliVZEROCalibData *calibdata = 0;
1e376713 112
5f650de8 113 if (entry) calibdata = (AliVZEROCalibData*) entry->GetObject();
114 if (!calibdata) AliFatal("No calibration data from calibration database !");
1e376713 115
5f650de8 116 return calibdata;
1e376713 117}
5f650de8 118
119
508b9fc0 120
121//____________________________________________________________________________
4e25ac79 122void AliVZEROQADataMakerRec::EndOfDetectorCycle(AliQAv1::TASKINDEX_t task, TObjArray ** list)
508b9fc0 123{
6bec7c7c 124 // Detector specific actions at end of cycle
125 // Does the QA checking
126
4e25ac79 127 AliQAChecker::Instance()->Run(AliQAv1::kVZERO, task, list) ;
57acd2d2 128
129 for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++) {
eca4fa66 130 if (! AliQAv1::Instance(AliQAv1::GetDetIndex(GetName()))->IsEventSpecieSet(AliRecoParam::ConvertIndex(specie)) )
131 continue ;
5e232cd6 132 SetEventSpecie(AliRecoParam::ConvertIndex(specie)) ;
4e25ac79 133 if(task == AliQAv1::kRAWS){
6bec7c7c 134 int nMaxBin = GetRawsData(kPedestalTimeInt0)->GetNbinsY();
57acd2d2 135 if(fCurrentCycle%nMaxBin==0) {
136 GetRawsData(kPedestalTimeInt0)->Reset();
137 GetRawsData(kPedestalTimeInt1)->Reset();
138 GetRawsData(kChargeEoITimeInt0)->Reset();
139 GetRawsData(kChargeEoITimeInt1)->Reset();
140 }
141 TH1D* hProj;
142 char name[50];
143 for(Int_t iChannel=0; iChannel<64; iChannel++) {
144 for(Int_t integrator=0;integrator<2;integrator++){
145 sprintf(name,"Ped_%d_%d",iChannel,integrator);
146 hProj = ((TH2I*)GetRawsData((integrator == 0 ? kPedestalCycleInt0 : kPedestalCycleInt1)))->ProjectionY(name,iChannel+1,iChannel+1);
147 ((TH2D*)GetRawsData((integrator == 0 ? kPedestalTimeInt0 : kPedestalTimeInt1)))->Fill((double)iChannel,(double)(fCurrentCycle%nMaxBin),(double)hProj->GetMean());
148 delete hProj;
149
150 sprintf(name,"Charge_%d_%d",iChannel,integrator);
151 hProj = ((TH2I*)GetRawsData((integrator == 0 ? kChargeEoICycleInt0 : kChargeEoICycleInt1)))->ProjectionY(name,iChannel+1,iChannel+1);
152 ((TH2D*)GetRawsData((integrator == 0 ? kChargeEoITimeInt0 : kChargeEoITimeInt1)))->Fill((double)iChannel,(double)(fCurrentCycle%nMaxBin),hProj->GetMean());
153 delete hProj;
154 }
155 }
4e25ac79 156 } else if (task == AliQAv1::kESDS) {
57acd2d2 157 }
9bd82f77 158 }
508b9fc0 159}
160
161//____________________________________________________________________________
162void AliVZEROQADataMakerRec::InitESDs()
163{
6bec7c7c 164 // Creates histograms to control ESDs
165
7d297381 166 const Bool_t expert = kTRUE ;
167 const Bool_t image = kTRUE ;
9bd82f77 168
6bec7c7c 169 TH2D * h2d;
170 TH1I * h1i;
171 TH1D * h1d;
9bd82f77 172
db72ff3b 173 h1i = new TH1I("H1I_Cell_Multiplicity_V0A", "Cell Multiplicity in V0A;Multiplicity (Nb of Cell);Counts", 35, 0, 35) ;
7d297381 174 Add2ESDsList(h1i, kCellMultiV0A, !expert, image) ;
4da80b8c 175
db72ff3b 176 h1i = new TH1I("H1I_Cell_Multiplicity_V0C", "Cell Multiplicity in V0;Multiplicity (Nb of Cell);Counts", 35, 0, 35) ;
7d297381 177 Add2ESDsList(h1i, kCellMultiV0C, !expert, image) ;
9bd82f77 178
db72ff3b 179 h1d = new TH1D("H1D_MIP_Multiplicity_V0A", "MIP Multiplicity in V0A;Multiplicity (Nb of MIP);Counts", 1000, 0, 1000) ;
7d297381 180 Add2ESDsList(h1d, kMIPMultiV0A, !expert, image) ;
9bd82f77 181
db72ff3b 182 h1d = new TH1D("H1D_MIP_Multiplicity_V0C", "MIP Multiplicity in V0C;Multiplicity (Nb of MIP);Counts", 1000, 0, 1000) ;
7d297381 183 Add2ESDsList(h1d, kMIPMultiV0C, !expert, image) ;
28fdf12c 184
db72ff3b 185 h2d = new TH2D("H2D_MIP_Multiplicity_Channel", "MIP Multiplicity per Channel;Channel;Multiplicity (Nb of MIP)",64, 0, 64, 100, 0, 100) ;
7d297381 186 Add2ESDsList(h2d, kMIPMultiChannel, !expert, image) ;
9bd82f77 187
db72ff3b 188 h1d = new TH1D("H1D_BBFlag_Counters", "BB Flag Counters;Channel;Counts",64, 0, 64) ;
7d297381 189 Add2ESDsList(h1d, kBBFlag, !expert, image) ;
9bd82f77 190
db72ff3b 191 h1d = new TH1D("H1D_BGFlag_Counters", "BG Flag Counters;Channel;Counts",64, 0, 64) ;
7d297381 192 Add2ESDsList(h1d, kBGFlag, !expert, image) ;
9bd82f77 193
db72ff3b 194 h2d = new TH2D("H2D_Charge_Channel", "ADC Charge per channel;Channel;Charge (ADC counts)",64, 0, 64, 1024, 0, 1024) ;
7d297381 195 Add2ESDsList(h2d, kChargeChannel, !expert, image) ;
9bd82f77 196
db72ff3b 197 h2d = new TH2D("H2D_Time_Channel", "Time per channel;Channel;Time (ns)",64, 0, 64, 820, 0, 410) ;
7d297381 198 Add2ESDsList(h2d, kTimeChannel, !expert, image) ;
9bd82f77 199
db72ff3b 200 h1d = new TH1D("H1D_V0A_Time", "Mean V0A Time;Time (ns);Counts",2048, 0., 409.6);
7d297381 201 Add2ESDsList(h1d,kESDV0ATime, !expert, image);
9bd82f77 202
db72ff3b 203 h1d = new TH1D("H1D_V0C_Time", "Mean V0C Time;Time (ns);Counts",2048, 0., 409.6);
7d297381 204 Add2ESDsList(h1d,kESDV0CTime, !expert, image);
9bd82f77 205
db72ff3b 206 h1d = new TH1D("H1D_Diff_Time", "Diff Time V0A - V0C;Diff Time V0A - V0C (ns);Counts",2*2048, -409.6, 409.6);
7d297381 207 Add2ESDsList(h1d,kESDDiffTime, !expert, image);
9bd82f77 208
28fdf12c 209}
508b9fc0 210
211//____________________________________________________________________________
4da80b8c 212 void AliVZEROQADataMakerRec::InitRaws()
213 {
6bec7c7c 214 // Creates RAW histograms in Raws subdir
215
7d297381 216 const Bool_t expert = kTRUE ;
217 const Bool_t saveCorr = kTRUE ;
218 const Bool_t image = kTRUE ;
9bd82f77 219
6bec7c7c 220 char name[50] , title[100];
221 const Int_t kNintegrator = 2;
9bd82f77 222
6bec7c7c 223 const Int_t kNTdcTimeBins = 2048;
224 const Int_t kTdcTimeMin = 0;
225 const Int_t kTdcTimeMax = 4096;
226 const Int_t kNTdcWidthBins = 128;
227 const Int_t kTdcWidthMin = 0;
228 const Int_t kTdcWidthMax = 128;
229 const Int_t kNChargeBins = 1024;
230 const Int_t kChargeMin = 0;
231 const Int_t kChargeMax = 1024;
232 const Int_t kNChannelBins = 64;
233 const Int_t kChannelMin = 0;
234 const Int_t kChannelMax = 64;
235 const Int_t kNPedestalBins = 200;
236 const Int_t kPedestalMin = 0;
237 const Int_t kPedestalMax = 200;
238 const Int_t kTimeMin = 0;
239 const Int_t kTimeMax = 100;
240 const Int_t kNMIPBins = 200;
241 const Int_t kMIPMin = 0;
242 const Int_t kMIPMax = 200;
243
244 TH2I * h2i;
245 TH2D * h2d;
246 TH1I * h1i;
247 TH1D * h1d;
248
249 int iHisto =0;
9bd82f77 250
6bec7c7c 251 // Creation of Cell Multiplicity Histograms
db72ff3b 252 h1i = new TH1I("H1I_Multiplicity_V0A", "Cell Multiplicity in V0A;# of Cells;Entries", 35, 0, 35) ;
7d297381 253 Add2RawsList(h1i,kMultiV0A, !expert, image, saveCorr); iHisto++;
db72ff3b 254 h1i = new TH1I("H1I_Multiplicity_V0C", "Cell Multiplicity in V0C;# of Cells;Entries", 35, 0, 35) ;
7d297381 255 Add2RawsList(h1i,kMultiV0C, !expert, image, saveCorr); iHisto++;
9bd82f77 256
6bec7c7c 257 // Creation of Total Charge Histograms
db72ff3b 258 h1d = new TH1D("H1D_Charge_V0A", "Total Charge in V0A;Charge [ADC counts];Counts", 2048, 0, 32768) ;
7d297381 259 Add2RawsList(h1d,kChargeV0A, !expert, image, saveCorr); iHisto++;
db72ff3b 260 h1d = new TH1D("H1D_Charge_V0C", "Total Charge in V0C;Charge [ADC counts];Counts", 2048, 0, 32768) ;
7d297381 261 Add2RawsList(h1d,kChargeV0C, !expert, image, saveCorr); iHisto++;
db72ff3b 262 h1d = new TH1D("H1D_Charge_V0", "Total Charge in V0;Charge [ADC counts];Counts", 2048, 0, 65536) ;
7d297381 263 Add2RawsList(h1d,kChargeV0, !expert, image, saveCorr); iHisto++;
9bd82f77 264
265 // Creation of MIP Histograms
db72ff3b 266 h1d = new TH1D("H1D_MIP_V0A", "Total MIP in V0A;Charge [MIP];Counts", 2*kNMIPBins,kMIPMin ,32*kMIPMax) ;
7d297381 267 Add2RawsList(h1d,kRawMIPV0A, !expert, image, saveCorr); iHisto++;
db72ff3b 268 h1d = new TH1D("H1D_MIP_V0C", "Total MIP in V0C;Charge [MIP];Counts", 2*kNMIPBins,kMIPMin ,32*kMIPMax) ;
7d297381 269 Add2RawsList(h1d,kRawMIPV0C, !expert, image, saveCorr); iHisto++;
db72ff3b 270 h1d = new TH1D("H1D_MIP_V0", "Total MIP in V0;Charge [MIP];Counts", 2*kNMIPBins,kMIPMin ,32*kMIPMax) ;
7d297381 271 Add2RawsList(h1d,kRawMIPV0, !expert, image, saveCorr); iHisto++;
db72ff3b 272 h2d = new TH2D("H2D_MIP_Channel", "Nb of MIP per channel;Channel;# of Mips", kNChannelBins, kChannelMin, kChannelMax,kNMIPBins,kMIPMin ,kMIPMax) ;
7d297381 273 Add2RawsList(h2d,kRawMIPChannel, expert, !image, !saveCorr); iHisto++;
9bd82f77 274
275
d62942e8 276 for(Int_t iInt=0;iInt<kNintegrator;iInt++){
9bd82f77 277 // Creation of Pedestal histograms
6bec7c7c 278 sprintf(name,"H2I_Pedestal_Int%d",iInt);
db72ff3b 279 sprintf(title,"Pedestal (Int%d);Pedestal [ADC counts];Counts",iInt);
6bec7c7c 280 h2i = new TH2I(name, title,kNChannelBins, kChannelMin, kChannelMax,kNPedestalBins,kPedestalMin ,kPedestalMax );
7d297381 281 Add2RawsList(h2i,(iInt == 0 ? kPedestalInt0 : kPedestalInt1), expert, !image, !saveCorr); iHisto++;
9bd82f77 282
6bec7c7c 283 // Creation of temporary Pedestal histo used for the mean versus time histogram. This histogram will be reset at the end of each cycle
284 sprintf(name,"H2I_Pedestal_CycleInt%d",iInt);
db72ff3b 285 sprintf(title,"One Cycle Pedestal (Int%d);Pedestal [ADC counts];Counts",iInt);
6bec7c7c 286 h2i = new TH2I(name, title,kNChannelBins, kChannelMin, kChannelMax,kNPedestalBins,kPedestalMin ,kPedestalMax );
7d297381 287 Add2RawsList(h2i,(iInt == 0 ? kPedestalCycleInt0 : kPedestalCycleInt1), expert, !image, !saveCorr); iHisto++;
9bd82f77 288
6bec7c7c 289 // Creation of Pedestal versus time graph.
290 sprintf(name,"H2D_Pedestal_Time_Int%d",iInt);
db72ff3b 291 sprintf(title,"Pedestal Versus Time (Int%d);Time [ns];Pedestal [ADC counts]",iInt);
6bec7c7c 292 h2d = new TH2D(name, title,kNChannelBins, kChannelMin, kChannelMax,kTimeMax,kTimeMin ,kTimeMax );
7d297381 293 Add2RawsList(h2d,(iInt == 0 ? kPedestalTimeInt0 : kPedestalTimeInt1), expert, !image, !saveCorr); iHisto++;
9bd82f77 294
295 // Creation of Charge EoI histograms
6bec7c7c 296 sprintf(name,"H2I_ChargeEoI_Int%d",iInt);
db72ff3b 297 sprintf(title,"Charge EoI (Int%d);Charge [ADC counts];Counts",iInt);
6bec7c7c 298 h2i = new TH2I(name, title,kNChannelBins, kChannelMin, kChannelMax, kNChargeBins, kChargeMin, kChargeMax);
7d297381 299 Add2RawsList(h2i,(iInt == 0 ? kChargeEoIInt0 : kChargeEoIInt1), !expert, image, !saveCorr); iHisto++;
9bd82f77 300
301 // Creation of temporary Charge EoI histograms used for the mean versus time histogram. This histogram will be reset at the end of each cycle
6bec7c7c 302 sprintf(name,"H2I_ChargeEoI_CycleInt%d",iInt);
db72ff3b 303 sprintf(title,"One Cycle Charge EoI (Int%d);Charge [ADC counts];Counts",iInt);
6bec7c7c 304 h2i = new TH2I(name, title,kNChannelBins, kChannelMin, kChannelMax, kNChargeBins, kChargeMin, kChargeMax);
7d297381 305 Add2RawsList(h2i,(iInt == 0 ? kChargeEoICycleInt0 : kChargeEoICycleInt1), expert, !image, !saveCorr); iHisto++;
9bd82f77 306
6bec7c7c 307 // Creation of Charge EoI versus time graphs
308 sprintf(name,"H2D_ChargeEoI_Time_Int%d",iInt);
db72ff3b 309 sprintf(title,"Charge EoI Versus Time (Int%d);Time [ns];Charge [ADC counts]",iInt);
6bec7c7c 310 h2d = new TH2D(name, title,kNChannelBins, kChannelMin, kChannelMax,kTimeMax,kTimeMin ,kTimeMax );
7d297381 311 Add2RawsList(h2d,(iInt == 0 ? kChargeEoITimeInt0 : kChargeEoITimeInt1), expert, !image, !saveCorr); iHisto++;
f81355e3 312
6bec7c7c 313 sprintf(name,"H2I_ChargeEoI_BB_Int%d",iInt);
db72ff3b 314 sprintf(title,"Charge EoI w/ BB Flag (Int%d);??;Charge [ADC counts]",iInt);
6bec7c7c 315 h2i = new TH2I(name, title,kNChannelBins, kChannelMin, kChannelMax, kNChargeBins, kChargeMin, kChargeMax);
7d297381 316 Add2RawsList(h2i,(iInt == 0 ? kChargeEoIBBInt0 : kChargeEoIBBInt1), expert, !image, !saveCorr); iHisto++;
f81355e3 317
6bec7c7c 318 sprintf(name,"H2I_ChargeEoI_BG_Int%d",iInt);
db72ff3b 319 sprintf(title,"Charge EoI w/ BG Flag (Int%d);??;Charge [ADC counts]",iInt);
6bec7c7c 320 h2i = new TH2I(name, title,kNChannelBins, kChannelMin, kChannelMax, kNChargeBins, kChargeMin, kChargeMax);
7d297381 321 Add2RawsList(h2i,(iInt == 0 ? kChargeEoIBGInt0: kChargeEoIBGInt1), expert, !image, !saveCorr); iHisto++;
9bd82f77 322
323 // Creation of Charge versus LHC Clock histograms
6bec7c7c 324 sprintf(name,"H2D_ChargeVsClock_Int%d",iInt);
db72ff3b 325 sprintf(title,"Charge Versus LHC-Clock (Int%d);Tine [ns];Charge [ADC counts]",iInt);
6bec7c7c 326 h2d = new TH2D(name, title,kNChannelBins, kChannelMin, kChannelMax,21, -10.5, 10.5 );
7d297381 327 Add2RawsList(h2d,(iInt == 0 ? kChargeVsClockInt0 : kChargeVsClockInt1 ), expert, !image, !saveCorr); iHisto++;
9bd82f77 328
6bec7c7c 329 // Creation of Minimum Bias Charge histograms
330 for(Int_t iBB=0;iBB<2;iBB++){
d62942e8 331 for(Int_t iBG=0;iBG<2;iBG++){
6bec7c7c 332 sprintf(name,"H2I_ChargeMB_BB%d_BG%d_Int%d",iBB,iBG,iInt);
db72ff3b 333 sprintf(title,"MB Charge (BB=%d, BG=%d, Int=%d);Charge [ADC counts];Counts",iBB,iBG,iInt);
6bec7c7c 334 h2i = new TH2I(name, title,kNChannelBins, kChannelMin, kChannelMax,kNChargeBins, kChargeMin, kChargeMax);
9bd82f77 335 int idx;
336 if(iInt==0){
337 if(iBB==0){
6bec7c7c 338 if(iBG==0) idx = kChargeMBBB0BG0Int0;
339 else idx = kChargeMBBB0BG1Int0;
9bd82f77 340 } else {
6bec7c7c 341 if(iBG==0) idx = kChargeMBBB1BG0Int0;
342 else idx = kChargeMBBB1BG1Int0;
9bd82f77 343 }
344 } else {
345 if(iBB==0){
6bec7c7c 346 if(iBG==0) idx = kChargeMBBB0BG0Int1;
347 else idx = kChargeMBBB0BG1Int1;
9bd82f77 348 } else {
6bec7c7c 349 if(iBG==0) idx = kChargeMBBB1BG0Int1;
350 else idx = kChargeMBBB1BG1Int1;
9bd82f77 351 }
352 }
7d297381 353 Add2RawsList(h2i,idx, expert, !image, !saveCorr); iHisto++;
9bd82f77 354 }
6bec7c7c 355 }
9bd82f77 356
357 }
358
6bec7c7c 359 // Creation of Time histograms
360 sprintf(name,"H2I_Width");
db72ff3b 361 sprintf(title,"HPTDC Width;Width [ns];Counts");
6bec7c7c 362 h2i = new TH2I(name, title,kNChannelBins, kChannelMin, kChannelMax, kNTdcWidthBins, kTdcWidthMin, kTdcWidthMax);
7d297381 363 Add2RawsList(h2i,kWidth, expert, !image, !saveCorr); iHisto++;
9bd82f77 364
6bec7c7c 365 sprintf(name,"H2I_Width_BB");
db72ff3b 366 sprintf(title,"HPTDC Width w/ BB Flag condition;??;Width [ns]");
6bec7c7c 367 h2i = new TH2I(name, title,kNChannelBins, kChannelMin, kChannelMax, kNTdcWidthBins, kTdcWidthMin, kTdcWidthMax);
7d297381 368 Add2RawsList(h2i,kWidthBB, expert, !image, !saveCorr); iHisto++;
9bd82f77 369
6bec7c7c 370 sprintf(name,"H2I_Width_BG");
db72ff3b 371 sprintf(title,"HPTDC Width w/ BG Flag condition??;Width [ns]");
6bec7c7c 372 h2i = new TH2I(name, title,kNChannelBins, kChannelMin, kChannelMax, kNTdcWidthBins, kTdcWidthMin, kTdcWidthMax);
7d297381 373 Add2RawsList(h2i,kWidthBG, expert, !image, !saveCorr); iHisto++;
9bd82f77 374
6bec7c7c 375 sprintf(name,"H2I_HPTDCTime");
db72ff3b 376 sprintf(title,"HPTDC Time;??;Width [ns]");
6bec7c7c 377 h2i = new TH2I(name, title,kNChannelBins, kChannelMin, kChannelMax, kNTdcTimeBins, kTdcTimeMin, kTdcTimeMax);
7d297381 378 Add2RawsList(h2i,kHPTDCTime, !expert, image, !saveCorr); iHisto++;
9bd82f77 379
6bec7c7c 380 sprintf(name,"H2I_HPTDCTime_BB");
db72ff3b 381 sprintf(title,"HPTDC Time w/ BB Flag condition;??;Width [ns]");
6bec7c7c 382 h2i = new TH2I(name, title,kNChannelBins, kChannelMin, kChannelMax, kNTdcTimeBins, kTdcTimeMin, kTdcTimeMax);
7d297381 383 Add2RawsList(h2i,kHPTDCTimeBB, expert, !image, !saveCorr); iHisto++;
9bd82f77 384
6bec7c7c 385 sprintf(name,"H2I_HPTDCTime_BG");
db72ff3b 386 sprintf(title,"HPTDC Time w/ BG Flag condition;??;Width [ns]");
6bec7c7c 387 h2i = new TH2I(name, title,kNChannelBins, kChannelMin, kChannelMax, kNTdcTimeBins, kTdcTimeMin, kTdcTimeMax);
7d297381 388 Add2RawsList(h2i,kHPTDCTimeBG, expert, !image, !saveCorr); iHisto++;
9bd82f77 389
6bec7c7c 390 sprintf(name,"H1D_V0A_Time");
db72ff3b 391 sprintf(title,"V0A Time;Time [ns];Counts");
6bec7c7c 392 h1d = new TH1D(name, title,kNTdcTimeBins, kTdcTimeMin/10, kTdcTimeMax/10);
7d297381 393 Add2RawsList(h1d,kV0ATime, !expert, !image, saveCorr); iHisto++;
9bd82f77 394
6bec7c7c 395 sprintf(name,"H1D_V0C_Time");
db72ff3b 396 sprintf(title,"V0C Time;Time [ns];Counts");
6bec7c7c 397 h1d = new TH1D(name, title,kNTdcTimeBins, kTdcTimeMin/10, kTdcTimeMax/10);
7d297381 398 Add2RawsList(h1d,kV0CTime, !expert, !image, saveCorr); iHisto++;
9bd82f77 399
6bec7c7c 400 sprintf(name,"H1D_Diff_Time");
db72ff3b 401 sprintf(title,"Diff V0A-V0C Time;Time [ns];Counts");
6bec7c7c 402 h1d = new TH1D(name, title,2*kNTdcTimeBins, -kTdcTimeMax/10, kTdcTimeMax/10);
7d297381 403 Add2RawsList(h1d,kDiffTime, !expert, !image, saveCorr); iHisto++;
9bd82f77 404
9bd82f77 405 // Creation of Flag versus LHC Clock histograms
6bec7c7c 406 sprintf(name,"H2D_BBFlagVsClock");
db72ff3b 407 sprintf(title,"BB-Flags Versus LHC-Clock;Time [ns];??");
6bec7c7c 408 h2d = new TH2D(name, title,kNChannelBins, kChannelMin, kChannelMax,21, -10.5, 10.5 );
7d297381 409 Add2RawsList(h2d,kBBFlagVsClock, expert, !image, !saveCorr); iHisto++;
9bd82f77 410
6bec7c7c 411 sprintf(name,"H2D_BGFlagVsClock");
db72ff3b 412 sprintf(title,"BG-Flags Versus LHC-Clock;Time [ns];??");
6bec7c7c 413 h2d = new TH2D(name, title,kNChannelBins, kChannelMin, kChannelMax,21, -10.5, 10.5 );
7d297381 414 Add2RawsList(h2d,kBGFlagVsClock, expert, !image, !saveCorr); iHisto++;
9bd82f77 415
5379c4a3 416 AliDebug(AliQAv1::GetQADebugLevel(), Form("%d Histograms has been added to the Raws List",iHisto));
4da80b8c 417 }
508b9fc0 418
44ed7a66 419//____________________________________________________________________________
420void AliVZEROQADataMakerRec::InitDigits()
421{
422 // create Digits histograms in Digits subdir
423 const Bool_t expert = kTRUE ;
424 const Bool_t image = kTRUE ;
425
426 char TDCname[100];
427 char ADCname[100];
428 TH1I *fhDigTDC[64];
429 TH1I *fhDigADC[64];
430 char texte[100];
431
432 // create Digits histograms in Digits subdir
db72ff3b 433 TH1I * h0 = new TH1I("hDigitMultiplicity", "Digits multiplicity distribution in VZERO;# of Digits;Entries", 100, 0, 99) ;
44ed7a66 434 h0->Sumw2() ;
435 Add2DigitsList(h0, 0, !expert, image) ;
436
437 for (Int_t i=0; i<64; i++)
438 {
439 sprintf(TDCname, "hDigitTDC%d", i);
db72ff3b 440 sprintf(texte,"Digit TDC in cell %d; TDC value;Entries",i);
44ed7a66 441 fhDigTDC[i] = new TH1I(TDCname,texte,300,0.,149.);
442
443 sprintf(ADCname,"hDigitADC%d",i);
db72ff3b 444 sprintf(texte,"Digit ADC in cell %d;ADC value;Entries",i);
44ed7a66 445 fhDigADC[i]= new TH1I(ADCname,texte,1024,0.,1023.);
446
447 Add2DigitsList(fhDigTDC[i],i+1, !expert, image);
448 Add2DigitsList(fhDigADC[i],i+1+64, !expert, image);
449 }
450}
451
452//____________________________________________________________________________
453void AliVZEROQADataMakerRec::MakeDigits(TClonesArray * digits)
454{
455 // makes data from Digits
456
eca4fa66 457 // Check id histograms already created for this Event Specie
458 if ( ! GetDigitsData(0) )
459 InitDigits() ;
460
44ed7a66 461 GetDigitsData(0)->Fill(digits->GetEntriesFast()) ;
462 TIter next(digits) ;
463 AliVZEROdigit *VZERODigit ;
464 while ( (VZERODigit = dynamic_cast<AliVZEROdigit *>(next())) ) {
465 Int_t PMNumber = VZERODigit->PMNumber();
466 GetDigitsData(PMNumber +1)->Fill( VZERODigit->Time()) ; // in 100 of picoseconds
467 GetDigitsData(PMNumber +1+64)->Fill( VZERODigit->ADC()) ;
468 }
469}
470
471
472//____________________________________________________________________________
473void AliVZEROQADataMakerRec::MakeDigits(TTree *digitTree)
474{
475 // makes data from Digit Tree
476
477 TClonesArray * digits = new TClonesArray("AliVZEROdigit", 1000) ;
478
479 TBranch * branch = digitTree->GetBranch("VZERODigit") ;
480 if ( ! branch ) {
481 AliWarning("VZERO branch in Digit Tree not found") ;
482 } else {
483 branch->SetAddress(&digits) ;
484 branch->GetEntry(0) ;
485 MakeDigits(digits) ;
486 }
487}
488
489
508b9fc0 490//____________________________________________________________________________
491void AliVZEROQADataMakerRec::MakeESDs(AliESDEvent * esd)
492{
6bec7c7c 493 // Creates QA data from ESDs
494
eca4fa66 495 // Check id histograms already created for this Event Specie
496 if ( ! GetESDsData(kCellMultiV0A) )
497 InitESDs() ;
498
6bec7c7c 499 UInt_t eventType = esd->GetEventType();
508b9fc0 500
6bec7c7c 501 switch (eventType){
9bd82f77 502 case PHYSICS_EVENT:
6bec7c7c 503 AliESDVZERO *esdVZERO=esd->GetVZEROData();
508b9fc0 504
6bec7c7c 505 if (!esdVZERO) break;
9bd82f77 506
507 GetESDsData(kCellMultiV0A)->Fill(esdVZERO->GetNbPMV0A());
508 GetESDsData(kCellMultiV0C)->Fill(esdVZERO->GetNbPMV0C());
509 GetESDsData(kMIPMultiV0A)->Fill(esdVZERO->GetMTotV0A());
510 GetESDsData(kMIPMultiV0C)->Fill(esdVZERO->GetMTotV0C());
511
6bec7c7c 512 Float_t timeV0A = 0., timeV0C = 0., diffTime;
513 Int_t iTimeV0A = 0, iTimeV0C = 0;
9bd82f77 514
6bec7c7c 515 for(Int_t i=0;i<64;i++) {
9bd82f77 516 GetESDsData(kMIPMultiChannel)->Fill((Float_t) i,(Float_t) esdVZERO->GetMultiplicity(i));
517 GetESDsData(kChargeChannel)->Fill((Float_t) i,(Float_t) esdVZERO->GetAdc(i));
518 if(esdVZERO->GetBBFlag(i)) GetESDsData(kBBFlag)->Fill((Float_t) i);
519 if(esdVZERO->GetBGFlag(i)) GetESDsData(kBGFlag)->Fill((Float_t) i);
520
6bec7c7c 521 Float_t time = (Float_t) esdVZERO->GetTime(i)/10.; //Convert in ns: 1 TDC channel = 100ps
522 GetESDsData(kTimeChannel)->Fill((Float_t) i,time);
9bd82f77 523
6bec7c7c 524 if(time>0.){
9bd82f77 525 if (i<32) {
526 iTimeV0C++;
6bec7c7c 527 timeV0C += time;
9bd82f77 528 }else{
529 iTimeV0A++;
6bec7c7c 530 timeV0A += time;
9bd82f77 531 }
532 }
533 }
6bec7c7c 534 if(iTimeV0A>0) timeV0A /= iTimeV0A;
535 else timeV0A = -1.;
536 if(iTimeV0C>0) timeV0C /= iTimeV0C;
537 else timeV0C = -1.;
538 if(timeV0A<0. || timeV0C<0.) diffTime = -10000.;
539 else diffTime = timeV0A - timeV0C;
9bd82f77 540
6bec7c7c 541 GetESDsData(kESDV0ATime)->Fill(timeV0A);
542 GetESDsData(kESDV0CTime)->Fill(timeV0C);
543 GetESDsData(kESDDiffTime)->Fill(diffTime);
9bd82f77 544
6bec7c7c 545 break;
9bd82f77 546 }
28fdf12c 547
508b9fc0 548}
549
550//____________________________________________________________________________
4da80b8c 551 void AliVZEROQADataMakerRec::MakeRaws(AliRawReader* rawReader)
552 {
6bec7c7c 553 // Fills histograms with Raws, computes average ADC values dynamically (pedestal subtracted)
1e376713 554
eca4fa66 555 // Check id histograms already created for this Event Specie
556 if ( ! GetRawsData(kPedestalInt0) )
557 InitRaws() ;
558
559 rawReader->Reset() ;
f81355e3 560 AliVZERORawStream* rawStream = new AliVZERORawStream(rawReader);
4da80b8c 561 rawStream->Next();
1e376713 562
6bec7c7c 563 eventTypeType eventType = rawReader->GetType();
9bd82f77 564
6bec7c7c 565 Int_t mulV0A = 0 ;
566 Int_t mulV0C = 0 ;
567 Double_t timeV0A =0., timeV0C = 0.;
568 UInt_t itimeV0A=0, itimeV0C=0;
569 Double_t chargeV0A=0., chargeV0C=0.;
570 Double_t mipV0A=0., mipV0C=0.;
9bd82f77 571
6bec7c7c 572 Double_t diffTime=-100000.;
9bd82f77 573
574
6bec7c7c 575 switch (eventType){
576 case PHYSICS_EVENT:
577 Int_t iFlag=0;
578 Int_t pedestal;
579 Int_t integrator;
580 Bool_t BBFlag;
9bd82f77 581 Bool_t BGFlag;
6bec7c7c 582 UInt_t time, width;
583 Int_t MBCharge, charge;
584 Int_t offlineCh;
585 TH1D * hProj;
9bd82f77 586
d62942e8 587 for(Int_t iChannel=0; iChannel<64; iChannel++) { // BEGIN : Loop over channels
9bd82f77 588
6bec7c7c 589 offlineCh = rawStream->GetOfflineChannel(iChannel);
9bd82f77 590
6bec7c7c 591 // Fill Pedestal histograms
592
593 for(Int_t j=15; j<21; j++) {
9bd82f77 594 if((rawStream->GetBGFlag(iChannel,j) || rawStream->GetBBFlag(iChannel,j))) iFlag++;
6bec7c7c 595 }
9bd82f77 596
6bec7c7c 597 if(iFlag == 0){ //No Flag found
d62942e8 598 for(Int_t j=15; j<21; j++){
9bd82f77 599 pedestal=rawStream->GetPedestal(iChannel, j);
600 integrator = rawStream->GetIntegratorFlag(iChannel, j);
601
6bec7c7c 602 GetRawsData((integrator == 0 ? kPedestalInt0 : kPedestalInt1))->Fill(offlineCh,pedestal);
603 GetRawsData((integrator == 0 ? kPedestalCycleInt0 : kPedestalCycleInt1))->Fill(offlineCh,pedestal);
9bd82f77 604 }
6bec7c7c 605 }
9bd82f77 606
6bec7c7c 607 // Fill Charge EoI histograms
608
609 // Look for the maximum in the LHC clock train
610 charge = 0;
9bd82f77 611 Int_t iClock = 0;
612 Int_t iCharge = 0;
d62942e8 613 for(Int_t iEvent=0; iEvent<21; iEvent++){
9bd82f77 614 iCharge = rawStream->GetPedestal(iChannel,iEvent);
6bec7c7c 615 if(iCharge>charge) {
616 charge = iCharge;
9bd82f77 617 iClock = iEvent;
618 }
619 } // End of maximum searching procedure
620
6bec7c7c 621 integrator = rawStream->GetIntegratorFlag(iChannel,iClock);
9bd82f77 622 BBFlag = rawStream->GetBBFlag(iChannel, iClock);
623 BGFlag = rawStream->GetBGFlag(iChannel,iClock );
624
6bec7c7c 625 GetRawsData((integrator == 0 ? kChargeEoIInt0 : kChargeEoIInt1))->Fill(offlineCh,charge);
626 if(BBFlag) GetRawsData((integrator == 0 ? kChargeEoIBBInt0 : kChargeEoIBBInt1))->Fill(offlineCh,charge);
627 if(BGFlag) GetRawsData((integrator == 0 ? kChargeEoIBGInt0 : kChargeEoIBGInt1))->Fill(offlineCh,charge);
9bd82f77 628
6bec7c7c 629 hProj = ((TH2I*)GetRawsData((integrator == 0 ? kPedestalInt0 : kPedestalInt1)))->ProjectionY("",offlineCh+1,offlineCh+1);
630 Double_t ped = hProj->GetMean();
631 Double_t sigma = hProj->GetRMS();
632 delete hProj;
9bd82f77 633
6bec7c7c 634 Double_t chargeEoI = charge - ped;
9bd82f77 635
6bec7c7c 636 // Calculation of the number of MIP
637 Double_t mipEoI = chargeEoI * fCalibData->GetMIPperADC(offlineCh);
9bd82f77 638
639
6bec7c7c 640 if(charge<1023 && chargeEoI > 5.*sigma){
641 ((TH2I*)GetRawsData((integrator == 0 ? kChargeEoICycleInt0 : kChargeEoICycleInt1)))->Fill(offlineCh,chargeEoI);
642 ((TH2D*)GetRawsData(kRawMIPChannel))->Fill(offlineCh,mipEoI);
643 if(offlineCh<32) {
9bd82f77 644 mulV0C++;
6bec7c7c 645 chargeV0C += chargeEoI;
646 mipV0C += mipEoI;
647 } else {
9bd82f77 648 mulV0A++;
6bec7c7c 649 chargeV0A += chargeEoI;
650 mipV0A += mipEoI;
9bd82f77 651 }
6bec7c7c 652 }
9bd82f77 653
6bec7c7c 654 // Fill Charge Minimum Bias Histograms
655
656 int idx;
657 for(Int_t iBunch=0; iBunch<10; iBunch++){
9bd82f77 658 integrator = rawStream->GetIntMBFlag(iChannel, iBunch);
6bec7c7c 659 BBFlag = rawStream->GetBBMBFlag(iChannel, iBunch);
660 BGFlag = rawStream->GetBGMBFlag(iChannel, iBunch);
9bd82f77 661 MBCharge = rawStream->GetChargeMB(iChannel, iBunch);
662
663 if(integrator==0){
664 if(BBFlag==0){
6bec7c7c 665 if(BGFlag==0) idx = kChargeMBBB0BG0Int0;
666 else idx = kChargeMBBB0BG1Int0;
9bd82f77 667 } else {
6bec7c7c 668 if(BGFlag==0) idx = kChargeMBBB1BG0Int0;
669 else idx = kChargeMBBB1BG1Int0;
9bd82f77 670 }
671 } else {
672 if(BBFlag==0){
6bec7c7c 673 if(BGFlag==0) idx = kChargeMBBB0BG0Int1;
674 else idx = kChargeMBBB0BG1Int1;
9bd82f77 675 } else {
6bec7c7c 676 if(BGFlag==0) idx = kChargeMBBB1BG0Int1;
677 else idx = kChargeMBBB1BG1Int1;
9bd82f77 678 }
679 }
6bec7c7c 680 GetRawsData(idx)->Fill(offlineCh,MBCharge);
681 }
682
683 // Fill HPTDC Time Histograms
684
685 BBFlag = rawStream->GetBBFlag(iChannel, 10);
686 BGFlag = rawStream->GetBGFlag(iChannel, 10);
687 time = rawStream->GetTime(iChannel);
688 width = rawStream->GetWidth(iChannel);
689
690 if(time>0.){
691 if (offlineCh<32) {
692 itimeV0C++;
693 timeV0C += time;
694 }else{
695 itimeV0A++;
696 timeV0A += time;
697 }
698 }
699 GetRawsData(kHPTDCTime)->Fill(offlineCh,time);
700 GetRawsData(kWidth)->Fill(offlineCh,width);
9bd82f77 701 if(BBFlag) {
6bec7c7c 702 GetRawsData(kHPTDCTimeBB)->Fill(offlineCh,time);
703 GetRawsData(kWidthBB)->Fill(offlineCh,width);
9bd82f77 704 }
6bec7c7c 705 if(BGFlag) {
706 GetRawsData(kHPTDCTimeBG)->Fill(offlineCh,time);
707 GetRawsData(kWidthBG)->Fill(offlineCh,width);
9bd82f77 708 }
709
6bec7c7c 710 // Fill Flag and Charge Versus LHC-Clock histograms
711
d62942e8 712 for(Int_t iEvent=0; iEvent<21; iEvent++){
6bec7c7c 713 charge = rawStream->GetPedestal(iChannel,iEvent);
714 integrator = rawStream->GetIntegratorFlag(iChannel,iEvent);
715 BBFlag = rawStream->GetBBFlag(iChannel, iEvent);
716 BGFlag = rawStream->GetBGFlag(iChannel,iEvent );
717
718 ((TH2*) GetRawsData((integrator == 0 ? kChargeVsClockInt0 : kChargeVsClockInt1 )))->Fill(offlineCh,(float)iEvent-10,(float)charge);
719 ((TH2*) GetRawsData(kBBFlagVsClock))->Fill(offlineCh,(float)iEvent-10,(float)BBFlag);
720 ((TH2*) GetRawsData(kBGFlagVsClock))->Fill(offlineCh,(float)iEvent-10,(float)BGFlag);
9bd82f77 721 }
722
6bec7c7c 723 }// END of Loop over channels
9bd82f77 724
6bec7c7c 725 if(itimeV0A>0) timeV0A /= (itimeV0A * 10); // itimeV0A Channels and divide by 10 to have the result in ns because 1 TDC Channel = 100 ps
726 else timeV0A = -1.;
727 if(itimeV0C>0) timeV0C /= (itimeV0C * 10);
728 else timeV0C = -1.;
729 if(timeV0A<0. || timeV0C<0.) diffTime = -10000.;
730 else diffTime = timeV0A - timeV0C;
9bd82f77 731
6bec7c7c 732 GetRawsData(kV0ATime)->Fill(timeV0A);
733 GetRawsData(kV0CTime)->Fill(timeV0C);
734 GetRawsData(kDiffTime)->Fill(diffTime);
9bd82f77 735
6bec7c7c 736 GetRawsData(kMultiV0A)->Fill(mulV0A);
737 GetRawsData(kMultiV0C)->Fill(mulV0C);
9bd82f77 738
6bec7c7c 739 GetRawsData(kChargeV0A)->Fill(chargeV0A);
740 GetRawsData(kChargeV0C)->Fill(chargeV0C);
741 GetRawsData(kChargeV0)->Fill(chargeV0A + chargeV0C);
9bd82f77 742
6bec7c7c 743 GetRawsData(kRawMIPV0A)->Fill(mipV0A);
744 GetRawsData(kRawMIPV0C)->Fill(mipV0C);
745 GetRawsData(kRawMIPV0)->Fill(mipV0A + mipV0C);
746 break;
747
748 } // END of SWITCH : EVENT TYPE
9bd82f77 749
750 fEvent++;
4e25ac79 751 TParameter<double> * p = dynamic_cast<TParameter<double>*>(GetParameterList()->FindObject(Form("%s_%s_%s", GetName(), AliQAv1::GetTaskName(AliQAv1::kRAWS).Data(), GetRawsData(kMultiV0A)->GetName()))) ;
719e870c 752 if (p) p->SetVal((double)mulV0A) ;
9bd82f77 753
4e25ac79 754 p = dynamic_cast<TParameter<double>*>(GetParameterList()->FindObject(Form("%s_%s_%s", GetName(), AliQAv1::GetTaskName(AliQAv1::kRAWS).Data(), GetRawsData(kMultiV0C)->GetName()))) ;
719e870c 755 if (p) p->SetVal((double)mulV0C) ;
9bd82f77 756
4e25ac79 757 p = dynamic_cast<TParameter<double>*>(GetParameterList()->FindObject(Form("%s_%s_%s", GetName(), AliQAv1::GetTaskName(AliQAv1::kRAWS).Data(), GetRawsData(kChargeV0A)->GetName()))) ;
719e870c 758 if (p) p->SetVal((double)chargeV0A) ;
9bd82f77 759
4e25ac79 760 p = dynamic_cast<TParameter<double>*>(GetParameterList()->FindObject(Form("%s_%s_%s", GetName(), AliQAv1::GetTaskName(AliQAv1::kRAWS).Data(), GetRawsData(kChargeV0C)->GetName()))) ;
719e870c 761 if (p) p->SetVal((double)chargeV0C) ;
9bd82f77 762
4e25ac79 763 p = dynamic_cast<TParameter<double>*>(GetParameterList()->FindObject(Form("%s_%s_%s", GetName(), AliQAv1::GetTaskName(AliQAv1::kRAWS).Data(), GetRawsData(kChargeV0)->GetName()))) ;
719e870c 764 if (p) p->SetVal((double)(chargeV0A + chargeV0C)) ;
9bd82f77 765
4e25ac79 766 p = dynamic_cast<TParameter<double>*>(GetParameterList()->FindObject(Form("%s_%s_%s", GetName(), AliQAv1::GetTaskName(AliQAv1::kRAWS).Data(), GetRawsData(kRawMIPV0A)->GetName()))) ;
719e870c 767 if (p) p->SetVal((double)mipV0A) ;
9bd82f77 768
4e25ac79 769 p = dynamic_cast<TParameter<double>*>(GetParameterList()->FindObject(Form("%s_%s_%s", GetName(), AliQAv1::GetTaskName(AliQAv1::kRAWS).Data(), GetRawsData(kRawMIPV0C)->GetName()))) ;
719e870c 770 if (p) p->SetVal((double)mipV0C) ;
9bd82f77 771
4e25ac79 772 p = dynamic_cast<TParameter<double>*>(GetParameterList()->FindObject(Form("%s_%s_%s", GetName(), AliQAv1::GetTaskName(AliQAv1::kRAWS).Data(), GetRawsData(kRawMIPV0)->GetName()))) ;
719e870c 773 if (p) p->SetVal((double)(mipV0A + mipV0C)) ;
9bd82f77 774
4e25ac79 775 p = dynamic_cast<TParameter<double>*>(GetParameterList()->FindObject(Form("%s_%s_%s", GetName(), AliQAv1::GetTaskName(AliQAv1::kRAWS).Data(), GetRawsData(kV0ATime)->GetName()))) ;
719e870c 776 if (p) p->SetVal((double)timeV0A) ;
9bd82f77 777
4e25ac79 778 p = dynamic_cast<TParameter<double>*>(GetParameterList()->FindObject(Form("%s_%s_%s", GetName(), AliQAv1::GetTaskName(AliQAv1::kRAWS).Data(), GetRawsData(kV0CTime)->GetName()))) ;
719e870c 779 if (p) p->SetVal((double)timeV0C) ;
9bd82f77 780
4e25ac79 781 p = dynamic_cast<TParameter<double>*>(GetParameterList()->FindObject(Form("%s_%s_%s", GetName(), AliQAv1::GetTaskName(AliQAv1::kRAWS).Data(), GetRawsData(kDiffTime)->GetName()))) ;
719e870c 782 if (p) p->SetVal((double)diffTime) ;
9bd82f77 783
784 delete rawStream; rawStream = 0x0;
785
786
4da80b8c 787 }
508b9fc0 788
789//____________________________________________________________________________
790void AliVZEROQADataMakerRec::StartOfDetectorCycle()
791{
792 // Detector specific actions at start of cycle
793
6bec7c7c 794 // Reset of the histogram used - to have the trend versus time -
e6d13307 795
796 fCalibData = GetCalibData();
6bec7c7c 797
9bd82f77 798 TH1* h;
6bec7c7c 799 h = GetRawsData(kPedestalCycleInt0);
9bd82f77 800 if(h) h->Reset();
6bec7c7c 801 h = GetRawsData(kPedestalCycleInt1);
9bd82f77 802 if(h) h->Reset();
6bec7c7c 803 h = GetRawsData(kChargeEoICycleInt0);
9bd82f77 804 if(h) h->Reset();
6bec7c7c 805 h = GetRawsData(kChargeEoICycleInt1);
9bd82f77 806 if(h) h->Reset();
807
508b9fc0 808}