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>
31 #include <TParameter.h>
32 #include <TTimeStamp.h>
34 // --- Standard library ---
36 // --- AliRoot header files ---
37 #include "AliESDEvent.h"
39 #include "AliCDBManager.h"
40 #include "AliCDBStorage.h"
41 #include "AliCDBEntry.h"
42 #include "AliADQADataMakerRec.h"
43 #include "AliQAChecker.h"
44 #include "AliRawReader.h"
45 #include "AliADRawStream.h"
46 #include "AliADdigit.h"
47 #include "AliADConst.h"
48 #include "AliADReconstructor.h"
49 //#include "AliADTrending.h"
50 #include "AliADCalibData.h"
51 #include "AliCTPTimeParams.h"
54 ClassImp(AliADQADataMakerRec)
56 //____________________________________________________________________________
57 AliADQADataMakerRec::AliADQADataMakerRec() :
58 AliQADataMakerRec(AliQAv1::GetDetName(AliQAv1::kAD), "AD Quality Assurance Data Maker"),
60 fTrendingUpdateTime(0),
68 AliDebug(AliQAv1::GetQADebugLevel(), "Construct AD QA Object");
70 for(Int_t i=0; i<16; i++){
75 for(Int_t i=0; i<32; i++){
79 //____________________________________________________________________________
80 AliADQADataMakerRec::AliADQADataMakerRec(const AliADQADataMakerRec& qadm) :
83 fTrendingUpdateTime(0),
91 SetName((const char*)qadm.GetName()) ;
92 SetTitle((const char*)qadm.GetTitle());
95 //__________________________________________________________________
96 AliADQADataMakerRec& AliADQADataMakerRec::operator = (const AliADQADataMakerRec& qadm )
100 this->~AliADQADataMakerRec();
101 new(this) AliADQADataMakerRec(qadm);
105 //____________________________________________________________________________
106 AliADCalibData* AliADQADataMakerRec::GetCalibData() const
109 AliCDBManager *man = AliCDBManager::Instance();
111 AliCDBEntry *entry=0;
113 //entry = man->Get("AD/Calib/Data",fRun);
115 //AliWarning("Load of calibration data from default storage failed!");
116 //AliWarning("Calibration data will be loaded from local storage ($ALICE_ROOT)");
118 man->SetDefaultStorage("local://$ALICE_ROOT/OCDB");
119 entry = man->Get("AD/Calib/Data",fRun);
121 // Retrieval of data in directory AD/Calib/Data:
123 AliADCalibData *calibdata = 0;
125 if (entry) calibdata = (AliADCalibData*) entry->GetObject();
126 if (!calibdata) AliFatal("No calibration data from calibration database !");
130 //____________________________________________________________________________
131 void AliADQADataMakerRec::StartOfDetectorCycle()
133 // Detector specific actions at start of cycle
135 // Reset of the histogram used - to have the trend versus time -
137 fCalibData = GetCalibData();
139 AliCDBEntry *entry = AliCDBManager::Instance()->Get("GRP/CTP/CTPtiming");
140 if (!entry) AliFatal("CTP timing parameters are not found in OCDB !");
141 AliCTPTimeParams *ctpParams = (AliCTPTimeParams*)entry->GetObject();
142 Float_t l1Delay = (Float_t)ctpParams->GetDelayL1L0()*25.0;
144 AliCDBEntry *entry1 = AliCDBManager::Instance()->Get("GRP/CTP/TimeAlign");
145 if (!entry1) AliFatal("CTP time-alignment is not found in OCDB !");
146 AliCTPTimeParams *ctpTimeAlign = (AliCTPTimeParams*)entry1->GetObject();
147 l1Delay += ((Float_t)ctpTimeAlign->GetDelayL1L0()*25.0);
149 AliCDBEntry *entry2 = AliCDBManager::Instance()->Get("AD/Calib/TimeDelays");
150 if (!entry2) AliFatal("AD time delays are not found in OCDB !");
151 TH1F *delays = (TH1F*)entry2->GetObject();
153 AliCDBEntry *entry3 = AliCDBManager::Instance()->Get("AD/Calib/TimeSlewing");
154 if (!entry3) AliFatal("AD time slewing function is not found in OCDB !");
155 fTimeSlewing = (TF1*)entry3->GetObject();
158 for(Int_t i = 0 ; i < 16; ++i) {
159 //Int_t board = AliADCalibData::GetBoardNumber(i);
161 // ((Float_t)fCalibData->GetTriggerCountOffset(board) -
162 // (Float_t)fCalibData->GetRollOver(board))*25.0 +
163 // fCalibData->GetTimeOffset(i) -
165 //delays->GetBinContent(i+1)//+
169 // AliInfo(Form(" fTimeOffset[%d] = %f kV0offset %f",i,fTimeOffset[i],kV0Offset));
176 TTimeStamp currentTime;
177 fCycleStartTime = currentTime.GetSec();
181 //____________________________________________________________________________
182 void AliADQADataMakerRec::EndOfDetectorCycle(AliQAv1::TASKINDEX_t task, TObjArray ** list)
184 // Detector specific actions at end of cycle
185 // Does the QA checking
186 ResetEventTrigClasses();
188 AliQAChecker::Instance()->Run(AliQAv1::kAD, task, list) ;
190 if(task == AliQAv1::kRAWS){
191 TTimeStamp currentTime;
192 fCycleStopTime = currentTime.GetSec();
195 for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++) {
196 if (! IsValidEventSpecie(specie, list)) continue ;
197 SetEventSpecie(AliRecoParam::ConvertIndex(specie));
198 if(task == AliQAv1::kRAWS) {
199 } else if (task == AliQAv1::kESDS) {
204 //____________________________________________________________________________
205 void AliADQADataMakerRec::InitESDs()
207 // Creates histograms to control ESDs
210 //____________________________________________________________________________
211 void AliADQADataMakerRec::InitDigits()
216 //____________________________________________________________________________
217 void AliADQADataMakerRec::MakeDigits()
222 //____________________________________________________________________________
223 void AliADQADataMakerRec::MakeDigits(TTree* /*digitTree*/)
229 //____________________________________________________________________________
230 void AliADQADataMakerRec::MakeESDs(AliESDEvent* /*esd*/)
235 //____________________________________________________________________________
236 void AliADQADataMakerRec::InitRaws()
238 // Creates RAW histograms in Raws subdir
240 const Bool_t expert = kTRUE ;
241 const Bool_t saveCorr = kTRUE ;
242 const Bool_t image = kTRUE ;
244 const Int_t kNintegrator = 2;
246 const Int_t kNTdcTimeBins = 1280;
247 const Float_t kTdcTimeMin = 0.;
248 const Float_t kTdcTimeMax = 75.;
249 const Int_t kNTdcWidthBins = 256;
250 const Float_t kTdcWidthMin = 0;
251 const Float_t kTdcWidthMax = 200.;
252 const Int_t kNChargeBins = 1024;
253 const Float_t kChargeMin = 0;
254 const Float_t kChargeMax = 1024;
255 const Int_t kNChannelBins = 16;
256 const Float_t kChannelMin = 0;
257 const Float_t kChannelMax = 16;
258 const Int_t kNPedestalBins = 200;
259 const Float_t kPedestalMin = 0;
260 const Float_t kPedestalMax = 200;
261 const Int_t kNPairBins = 8;
262 const Float_t kPairMin = 0;
263 const Float_t kPairMax = 8;
272 // Creation of Cell Multiplicity Histograms
273 h1i = new TH1I("H1I_Multiplicity_ADA", "Number of fired cells in ADA;# of Cells;Entries", 10, 0, 10) ;
274 Add2RawsList(h1i,kMultiADA, !expert, image, saveCorr); iHisto++;
275 h1i = new TH1I("H1I_Multiplicity_ADC", "Number of fired cells in ADC;# of Cells;Entries", 10, 0, 10) ;
276 Add2RawsList(h1i,kMultiADC, !expert, image, saveCorr); iHisto++;
278 // Creation of Total Charge Histograms
279 h1d = new TH1F("H1D_Charge_ADA", "Total Charge in ADA;Charge [ADC counts];Counts", 4000, 0, 30000) ;
280 Add2RawsList(h1d,kChargeADA, !expert, image, saveCorr); iHisto++;
281 h1d = new TH1F("H1D_Charge_ADC", "Total Charge in ADC;Charge [ADC counts];Counts", 4000, 0, 50000) ;
282 Add2RawsList(h1d,kChargeADC, !expert, image, saveCorr); iHisto++;
283 h1d = new TH1F("H1D_Charge_AD", "Total Charge in AD;Charge [ADC counts];Counts", 4000, 0, 80000) ;
284 Add2RawsList(h1d,kChargeAD, !expert, image, saveCorr); iHisto++;
287 // Creation of Charge EoI histogram
288 h2d = new TH2F("H2D_ChargeEoI", "Charge Event of Interest;Channel Number;Charge [ADC counts]"
289 ,kNChannelBins, kChannelMin, kChannelMax, kNChargeBins, kChargeMin, 2.*kChargeMax);
290 Add2RawsList(h2d,kChargeEoI, !expert, image, saveCorr); iHisto++;
292 for(Int_t iInt=0;iInt<kNintegrator;iInt++){
293 // Creation of Pedestal histograms
294 h2i = new TH2I(Form("H2I_Pedestal_Int%d",iInt), Form("Pedestal (Int%d);Channel;Pedestal [ADC counts]",iInt)
295 ,kNChannelBins, kChannelMin, kChannelMax,kNPedestalBins,kPedestalMin ,kPedestalMax );
296 Add2RawsList(h2i,(iInt == 0 ? kPedestalInt0 : kPedestalInt1), !expert, image, saveCorr); iHisto++;
299 // Creation of Charge EoI histograms
300 h2i = new TH2I(Form("H2I_ChargeEoI_Int%d",iInt), Form("Charge EoI (Int%d);Channel;Charge [ADC counts]",iInt)
301 ,kNChannelBins, kChannelMin, kChannelMax, kNChargeBins, kChargeMin, kChargeMax);
302 Add2RawsList(h2i,(iInt == 0 ? kChargeEoIInt0 : kChargeEoIInt1), !expert, image, saveCorr); iHisto++;
306 // Creation of Time histograms
307 h2i = new TH2I("H2I_Width", "HPTDC Width;Channel;Width [ns]",kNChannelBins, kChannelMin, kChannelMax, kNTdcWidthBins, kTdcWidthMin, kTdcWidthMax);
308 Add2RawsList(h2i,kWidth, !expert, image, saveCorr); iHisto++;
310 h2i = new TH2I("H2I_HPTDCTime", "HPTDC Time;Channel;Leading Time [ns]",kNChannelBins, kChannelMin, kChannelMax, kNTdcTimeBins, kTdcTimeMin, kTdcTimeMax);
311 Add2RawsList(h2i,kHPTDCTime, !expert, image, saveCorr); iHisto++;
313 h1d = new TH1F("H1D_ADA_Time", "ADA Time;Time [ns];Counts",kNTdcTimeBins, kTdcTimeMin, kTdcTimeMax);
314 Add2RawsList(h1d,kADATime, !expert, image, saveCorr); iHisto++;
316 h1d = new TH1F("H1D_ADC_Time", "ADC Time;Time [ns];Counts",kNTdcTimeBins, kTdcTimeMin, kTdcTimeMax);
317 Add2RawsList(h1d,kADCTime, !expert, image, saveCorr); iHisto++;
319 h1d = new TH1F("H1D_Diff_Time","Diff ADA-ADC Time;Time [ns];Counts",kNTdcTimeBins, -50., 50.);
320 Add2RawsList(h1d,kDiffTime, !expert, image, saveCorr); iHisto++;
322 h2d = new TH2F("H2D_TimeADA_ADC", "Mean Time in ADC versus ADA;Time ADA [ns];Time ADC [ns]", kNTdcTimeBins/8, kTdcTimeMin,kTdcTimeMax,kNTdcTimeBins/8, kTdcTimeMin,kTdcTimeMax) ;
323 Add2RawsList(h2d,kTimeADAADC, !expert, image, saveCorr); iHisto++;
325 //Creation of pair coincidence histograms
326 h1i = new TH1I("H1I_MultiCoincidence_ADA", "Number of coincidences in ADA;# of Coincidences;Entries", 5, 0, 5) ;
327 Add2RawsList(h1i,kNCoincADA, !expert, image, saveCorr); iHisto++;
328 h1i = new TH1I("H1I_MultiCoincidence_ADC", "Number of coincidences in ADC;# of Coincidences;Entries", 5, 0, 5) ;
329 Add2RawsList(h1i,kNCoincADC, !expert, image, saveCorr); iHisto++;
331 h2d = new TH2F("H2D_Pair_Diff_Time","Diff Pair Time;Pair number;Time [ns]",kNPairBins, kPairMin, kPairMax,kNTdcTimeBins, -50., 50.);
332 Add2RawsList(h2d,kPairDiffTime, !expert, image, saveCorr); iHisto++;
334 h2d = new TH2F("H2D_Pair_Diff_Charge","Diff Pair Charge;Pair number;Charge [ADC counts]",kNPairBins, kPairMin, kPairMax, 2*kNChargeBins, -kChargeMax, kChargeMax);
335 Add2RawsList(h2d,kPairDiffCharge, !expert, image, saveCorr); iHisto++;
338 AliDebug(AliQAv1::GetQADebugLevel(), Form("%d Histograms has been added to the Raws List",iHisto));
340 ClonePerTrigClass(AliQAv1::kRAWS); // this should be the last line
343 //____________________________________________________________________________
344 void AliADQADataMakerRec::MakeRaws(AliRawReader* rawReader)
346 // Fills histograms with Raws, computes average ADC values dynamically (pedestal subtracted)
349 // Check id histograms already created for this Event Specie
350 if ( ! GetRawsData(kPedestalInt0) )
354 AliADRawStream* rawStream = new AliADRawStream(rawReader);
355 if(!(rawStream->Next())) return;
357 eventTypeType eventType = rawReader->GetType();
361 Double_t timeADA =0., timeADC = 0.;
362 Double_t weightADA =0., weightADC = 0.;
363 UInt_t itimeADA=0, itimeADC=0;
364 Double_t chargeADA=0., chargeADC=0.;
366 Double_t diffTime=-100000.;
370 Double_t pDiffTime =-100000.;
376 // fNTotEvents++; // Use framework counters instead
380 Int_t integrator[16];
385 Float_t adc[16], time[16], width[16], timeCorr[16];
388 for(Int_t iChannel=0; iChannel<16; iChannel++) { // BEGIN : Loop over channels
390 offlineCh = rawStream->GetOfflineChannel(iChannel);
392 // Fill Pedestal histograms
394 for(Int_t j=15; j<21; j++) {
395 if((rawStream->GetBGFlag(iChannel,j) || rawStream->GetBBFlag(iChannel,j))) iFlag++;
398 if(iFlag == 0){ //No Flag found
399 for(Int_t j=15; j<21; j++){
400 pedestal= (Int_t) rawStream->GetPedestal(iChannel, j);
401 integrator[offlineCh] = rawStream->GetIntegratorFlag(iChannel, j);
403 FillRawsData((integrator[offlineCh] == 0 ? kPedestalInt0 : kPedestalInt1),offlineCh,pedestal);
407 // Fill Charge EoI histograms
409 adc[offlineCh] = 0.0;
411 // Search for the maximum charge in the train of 21 LHC clocks
412 // regardless of the integrator which has been operated:
415 Float_t adcPedSub[21];
416 for(Int_t iClock=0; iClock<21; iClock++){
417 Bool_t iIntegrator = rawStream->GetIntegratorFlag(iChannel,iClock);
418 Int_t k = offlineCh+16*iIntegrator;
420 //printf(Form("clock = %d adc = %f ped %f\n",iClock,rawStream->GetPedestal(iChannel,iClock),fPedestal[k]));
422 adcPedSub[iClock] = rawStream->GetPedestal(iChannel,iClock) - fCalibData->GetPedestal(k);
423 // if(adcPedSub[iClock] <= GetRecoParam()->GetNSigmaPed()*fCalibData->GetSigma(k)) {
424 if(adcPedSub[iClock] <= 2.*fCalibData->GetSigma(k)) {
425 adcPedSub[iClock] = 0;
428 // if(iClock < GetRecoParam()->GetStartClock() || iClock > GetRecoParam()->GetEndClock()) continue;
429 if(iClock < 8 || iClock > 12) continue;
430 if(adcPedSub[iClock] > maxadc) {
431 maxadc = adcPedSub[iClock];
435 //printf(Form("Channel %d (online), %d (offline)\n",iChannel,j));
437 // Int_t start = imax - GetRecoParam()->GetNPreClocks();
438 Int_t start = imax - 2;
439 if (start < 0) start = 0;
440 // Int_t end = imax + GetRecoParam()->GetNPostClocks();
441 Int_t end = imax + 1;
442 if (end > 20) end = 20;
443 for(Int_t iClock = start; iClock <= end; iClock++) {
444 adc[offlineCh] += adcPedSub[iClock];
450 charge = rawStream->GetPedestal(iChannel,iClock); // Charge at the maximum
452 integrator[offlineCh] = rawStream->GetIntegratorFlag(iChannel,iClock);
453 flagBB[offlineCh] = rawStream->GetBBFlag(iChannel, iClock);
454 flagBG[offlineCh] = rawStream->GetBGFlag(iChannel,iClock );
455 Int_t board = AliADCalibData::GetBoardNumber(offlineCh);
456 time[offlineCh] = rawStream->GetTime(iChannel)*fCalibData->GetTimeResolution(board);
457 width[offlineCh] = rawStream->GetWidth(iChannel)*fCalibData->GetWidthResolution(board);
459 if (time[offlineCh] >= 1e-6) FillRawsData(kChargeEoI,offlineCh,adc[offlineCh]);
461 FillRawsData((integrator[offlineCh] == 0 ? kChargeEoIInt0 : kChargeEoIInt1),offlineCh,charge);
463 Float_t sigma = fCalibData->GetSigma(offlineCh+16*integrator[offlineCh]);
465 if((adc[offlineCh] > 2.*sigma) && !(time[offlineCh] <1.e-6)){
468 chargeADC += adc[offlineCh];
472 chargeADA += adc[offlineCh];
477 // Fill HPTDC Time Histograms
478 timeCorr[offlineCh] = CorrectLeadingTime(offlineCh,time[offlineCh],adc[offlineCh]);
480 //const Float_t p1 = 2.50; // photostatistics term in the time resolution
481 //const Float_t p2 = 3.00; // sleewing related term in the time resolution
482 if(timeCorr[offlineCh]>-1024 + 1.e-6){
483 //Float_t nphe = adc[offlineCh]*kChargePerADC/(fCalibData->GetGain(offlineCh)*TMath::Qe());
486 if (nphe>1.e-6) timeErr = TMath::Sqrt(kIntTimeRes*kIntTimeRes+
488 p2*p2*(fTimeSlewing->GetParameter(0)*fTimeSlewing->GetParameter(1))*(fTimeSlewing->GetParameter(0)*fTimeSlewing->GetParameter(1))*
489 TMath::Power(adc[offlineCh]/fCalibData->GetCalibDiscriThr(offlineCh,kTRUE),2.*(fTimeSlewing->GetParameter(1)-1.))/
490 (fCalibData->GetCalibDiscriThr(offlineCh,kTRUE)*fCalibData->GetCalibDiscriThr(offlineCh,kTRUE)));/*/
495 timeADC += timeCorr[offlineCh]/(timeErr*timeErr);
496 weightADC += 1./(timeErr*timeErr);
499 timeADA += timeCorr[offlineCh]/(timeErr*timeErr);
500 weightADA += 1./(timeErr*timeErr);
504 FillRawsData(kHPTDCTime,offlineCh,timeCorr[offlineCh]);
505 FillRawsData(kWidth,offlineCh,width[offlineCh]);
507 }// END of Loop over channels
509 for(Int_t iChannel=0; iChannel<4; iChannel++) {//Loop over pairs ADC
510 offlineCh = rawStream->GetOfflineChannel(iChannel);
511 Float_t sigma = fCalibData->GetSigma(offlineCh+16*integrator[offlineCh]);
512 Float_t sigma4 = fCalibData->GetSigma(offlineCh+4+16*integrator[offlineCh]);
513 if( ((adc[offlineCh] > 2.*sigma) && !(time[offlineCh] <1.e-6)) && ((adc[offlineCh+4] > 2.*sigma4) && !(time[offlineCh+4] <1.e-6)) ){
515 if(timeCorr[offlineCh]<-1024.+1.e-6 || timeCorr[offlineCh+4]<-1024.+1.e-6) pDiffTime = -1024.;
516 else pDiffTime = timeCorr[offlineCh+4] - timeCorr[offlineCh];
517 FillRawsData(kPairDiffTime,iPair,pDiffTime);
519 FillRawsData(kPairDiffCharge,iPair,TMath::Abs(adc[offlineCh]-adc[offlineCh+4]));
522 for(Int_t iChannel=8; iChannel<12; iChannel++) {//Loop over pairs ADA
523 offlineCh = rawStream->GetOfflineChannel(iChannel);
524 Float_t sigma = fCalibData->GetSigma(offlineCh+16*integrator[offlineCh]);
525 Float_t sigma4 = fCalibData->GetSigma(offlineCh+4+16*integrator[offlineCh]);
526 if( ((adc[offlineCh] > 2.*sigma) && !(time[offlineCh] <1.e-6)) && ((adc[offlineCh+4] > 2.*sigma4) && !(time[offlineCh+4] <1.e-6)) ){
528 if(timeCorr[offlineCh]<-1024.+1.e-6 || timeCorr[offlineCh+4]<-1024.+1.e-6) pDiffTime = -1024.;
529 else pDiffTime = timeCorr[offlineCh+4] - timeCorr[offlineCh];
530 FillRawsData(kPairDiffTime,iPair,pDiffTime);
532 FillRawsData(kPairDiffCharge,iPair,TMath::Abs(adc[offlineCh]-adc[offlineCh+4]));
535 FillRawsData(kNCoincADA,pmulADA);
536 FillRawsData(kNCoincADC,pmulADC);
539 if(weightADA>1.e-6) timeADA /= weightADA;
540 else timeADA = -1024.;
541 if(weightADC>1.e-6) timeADC /= weightADC;
542 else timeADC = -1024.;
543 if(timeADA<-1024.+1.e-6 || timeADC<-1024.+1.e-6) diffTime = -1024.;
544 else diffTime = timeADA - timeADC;
548 FillRawsData(kADATime,timeADA);
549 FillRawsData(kADCTime,timeADC);
550 FillRawsData(kDiffTime,diffTime);
551 FillRawsData(kTimeADAADC,timeADA,timeADC);
553 FillRawsData(kMultiADA,mulADA);
554 FillRawsData(kMultiADC,mulADC);
556 FillRawsData(kChargeADA,chargeADA);
557 FillRawsData(kChargeADC,chargeADC);
558 FillRawsData(kChargeAD,chargeADA + chargeADC);
561 } // END of SWITCH : EVENT TYPE
563 TParameter<double> * p = dynamic_cast<TParameter<double>*>(GetParameterList()->FindObject(Form("%s_%s_%s", GetName(), AliQAv1::GetTaskName(AliQAv1::kRAWS).Data(), GetRawsData(kMultiADA)->GetName()))) ;
564 if (p) p->SetVal((double)mulADA) ;
566 p = dynamic_cast<TParameter<double>*>(GetParameterList()->FindObject(Form("%s_%s_%s", GetName(), AliQAv1::GetTaskName(AliQAv1::kRAWS).Data(), GetRawsData(kMultiADC)->GetName()))) ;
567 if (p) p->SetVal((double)mulADC) ;
569 p = dynamic_cast<TParameter<double>*>(GetParameterList()->FindObject(Form("%s_%s_%s", GetName(), AliQAv1::GetTaskName(AliQAv1::kRAWS).Data(), GetRawsData(kChargeADA)->GetName()))) ;
570 if (p) p->SetVal((double)chargeADA) ;
572 p = dynamic_cast<TParameter<double>*>(GetParameterList()->FindObject(Form("%s_%s_%s", GetName(), AliQAv1::GetTaskName(AliQAv1::kRAWS).Data(), GetRawsData(kChargeADC)->GetName()))) ;
573 if (p) p->SetVal((double)chargeADC) ;
575 p = dynamic_cast<TParameter<double>*>(GetParameterList()->FindObject(Form("%s_%s_%s", GetName(), AliQAv1::GetTaskName(AliQAv1::kRAWS).Data(), GetRawsData(kChargeAD)->GetName()))) ;
576 if (p) p->SetVal((double)(chargeADA + chargeADC)) ;
578 p = dynamic_cast<TParameter<double>*>(GetParameterList()->FindObject(Form("%s_%s_%s", GetName(), AliQAv1::GetTaskName(AliQAv1::kRAWS).Data(), GetRawsData(kADATime)->GetName()))) ;
579 if (p) p->SetVal((double)timeADA) ;
581 p = dynamic_cast<TParameter<double>*>(GetParameterList()->FindObject(Form("%s_%s_%s", GetName(), AliQAv1::GetTaskName(AliQAv1::kRAWS).Data(), GetRawsData(kADCTime)->GetName()))) ;
582 if (p) p->SetVal((double)timeADC) ;
584 p = dynamic_cast<TParameter<double>*>(GetParameterList()->FindObject(Form("%s_%s_%s", GetName(), AliQAv1::GetTaskName(AliQAv1::kRAWS).Data(), GetRawsData(kDiffTime)->GetName()))) ;
585 if (p) p->SetVal((double)diffTime) ;
587 delete rawStream; rawStream = 0x0;
589 IncEvCountCycleRaws();
590 IncEvCountTotalRaws();
594 //____________________________________________________________________________
595 Float_t AliADQADataMakerRec::CorrectLeadingTime(Int_t /*i*/, Float_t time, Float_t /*adc*/) const
597 // Correct the leading time
598 // for slewing effect and
599 // misalignment of the channels
600 if (time < 1e-6) return -1024;
602 // Channel alignment and general offset subtraction
603 // if (i < 32) time -= kV0CDelayCables;
604 // time -= fTimeOffset[i];
605 //AliInfo(Form("time-offset %f", time));
607 // In case of pathological signals
608 //if (adc < 1e-6) return time;
610 // Slewing correction
611 //Float_t thr = fCalibData->GetCalibDiscriThr(i,kTRUE);
612 //AliInfo(Form("adc %f thr %f dtime %f ", adc,thr,fTimeSlewing->Eval(adc/thr)));
613 //time -= fTimeSlewing->Eval(adc/thr);