X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;f=VZERO%2FAliVZEROQADataMakerRec.cxx;h=5df8888871218e05aa4b872c9ec571da522cf19e;hb=ba3bf74ee1879ea3a99e075fe5433a575d913e3d;hp=e58d59086378cde7fddfadd0e5c18fda22652a96;hpb=5192f264b2a092d47ffce16193099e99f31a4b2c;p=u%2Fmrichter%2FAliRoot.git diff --git a/VZERO/AliVZEROQADataMakerRec.cxx b/VZERO/AliVZEROQADataMakerRec.cxx index e58d5908637..5df88888712 100644 --- a/VZERO/AliVZEROQADataMakerRec.cxx +++ b/VZERO/AliVZEROQADataMakerRec.cxx @@ -28,6 +28,7 @@ #include #include #include +#include // --- Standard library --- @@ -43,6 +44,8 @@ #include "AliVZERORawStream.h" #include "AliVZEROdigit.h" #include "AliVZEROReconstructor.h" +#include "AliVZEROTrending.h" +#include "AliVZEROCalibData.h" #include "event.h" @@ -52,16 +55,32 @@ ClassImp(AliVZEROQADataMakerRec) AliVZEROQADataMakerRec::AliVZEROQADataMakerRec() : AliQADataMakerRec(AliQAv1::GetDetName(AliQAv1::kVZERO), "VZERO Quality Assurance Data Maker"), fCalibData(0x0), - fEvent(0) + fEvent(0), + fNTotEvents(0), + fNSubEvents(0), + fTrendingUpdateEvent(0), + fNTrendingUpdates(0), + fTrendingUpdateTime(0), + fCycleStartTime(0), + fCycleStopTime(0), + fMonitorRate(0.) { // Constructor AliDebug(AliQAv1::GetQADebugLevel(), "Construct VZERO QA Object"); - + for(Int_t i=0;i<8;i++){ + fChargePerRing[i] = 0.; + fFlagPerRing[i] = 0.; + } for(Int_t i=0; i<64; i++){ fEven[i] = 0; - fOdd[i] = 0; } + fOdd[i] = 0; + fChargePerChannel[i] = 0.; + fFlagPerChannel[i] = 0.; + fMeanChargePerChannel[i] = 0.; + fMeanFlagPerChannel[i] = 0.; + } for(Int_t i=0; i<128; i++){ fADCmean[i] = 0.0; } @@ -71,7 +90,15 @@ ClassImp(AliVZEROQADataMakerRec) AliVZEROQADataMakerRec::AliVZEROQADataMakerRec(const AliVZEROQADataMakerRec& qadm) : AliQADataMakerRec(), fCalibData(0x0), - fEvent(0) + fEvent(0), + fNTotEvents(0), + fNSubEvents(0), + fTrendingUpdateEvent(0), + fNTrendingUpdates(0), + fTrendingUpdateTime(0), + fCycleStartTime(0), + fCycleStopTime(0), + fMonitorRate(0.) { // Copy constructor @@ -125,8 +152,26 @@ void AliVZEROQADataMakerRec::EndOfDetectorCycle(AliQAv1::TASKINDEX_t task, TObjA // Does the QA checking AliQAChecker::Instance()->Run(AliQAv1::kVZERO, task, list) ; + + if(task == AliQAv1::kRAWS){ + TTimeStamp currentTime; + fCycleStopTime = currentTime.GetSec(); + if(fCycleStopTime-fCycleStartTime>0.) fMonitorRate = fNTotEvents/(fCycleStopTime-fCycleStartTime); + //printf("%d event have been monitored -> Monitoring Rate = %f Hz\n",fNTotEvents,fMonitorRate); + Bool_t update = kFALSE; + if(!fTrendingUpdateEvent) { + update = kTRUE; + } else if ((TMath::Abs(fTrendingUpdateTime * fMonitorRate - fTrendingUpdateEvent) / fTrendingUpdateEvent) > 0.1){ + update = kTRUE; + } + if(update) fTrendingUpdateEvent = (size_t)(fTrendingUpdateTime * fMonitorRate); + //printf("Update trending information every %d events\n",fTrendingUpdateEvent); + + } for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++) { + if (! IsValidEventSpecie(specie, list)) + continue ; SetEventSpecie(AliRecoParam::ConvertIndex(specie)) ; if(task == AliQAv1::kRAWS){ int nMaxBin = GetRawsData(kPedestalTimeInt0)->GetNbinsY(); @@ -168,55 +213,40 @@ void AliVZEROQADataMakerRec::InitESDs() TH1I * h1i; TH1D * h1d; - h1i = new TH1I("H1I_Cell_Multiplicity_V0A", "Cell Multiplicity in V0A", 35, 0, 35) ; - h1i->GetXaxis()->SetTitle("Multiplicity (Nb of Cell)"); + h1i = new TH1I("H1I_Cell_Multiplicity_V0A", "Cell Multiplicity in V0A;Multiplicity (Nb of Cell);Counts", 35, 0, 35) ; Add2ESDsList(h1i, kCellMultiV0A, !expert, image) ; - h1i = new TH1I("H1I_Cell_Multiplicity_V0C", "Cell Multiplicity in V0C", 35, 0, 35) ; - h1i->GetXaxis()->SetTitle("Multiplicity (Nb of Cell)"); + h1i = new TH1I("H1I_Cell_Multiplicity_V0C", "Cell Multiplicity in V0;Multiplicity (Nb of Cell);Counts", 35, 0, 35) ; Add2ESDsList(h1i, kCellMultiV0C, !expert, image) ; - h1d = new TH1D("H1D_MIP_Multiplicity_V0A", "MIP Multiplicity in V0A", 1000, 0, 1000) ; - h1d->GetXaxis()->SetTitle("Multiplicity (Nb of MIP)"); + h1d = new TH1D("H1D_MIP_Multiplicity_V0A", "MIP Multiplicity in V0A;Multiplicity (Nb of MIP);Counts", 1000, 0, 1000) ; Add2ESDsList(h1d, kMIPMultiV0A, !expert, image) ; - h1d = new TH1D("H1D_MIP_Multiplicity_V0C", "MIP Multiplicity in V0C", 1000, 0, 1000) ; - h1d->GetXaxis()->SetTitle("Multiplicity (Nb of MIP)"); + h1d = new TH1D("H1D_MIP_Multiplicity_V0C", "MIP Multiplicity in V0C;Multiplicity (Nb of MIP);Counts", 1000, 0, 1000) ; Add2ESDsList(h1d, kMIPMultiV0C, !expert, image) ; - h2d = new TH2D("H2D_MIP_Multiplicity_Channel", "MIP Multiplicity per Channel",64, 0, 64, 100, 0, 100) ; - h2d->GetXaxis()->SetTitle("Channel"); - h2d->GetYaxis()->SetTitle("Multiplicity (Nb of MIP)"); + h2d = new TH2D("H2D_MIP_Multiplicity_Channel", "MIP Multiplicity per Channel;Channel;Multiplicity (Nb of MIP)",64, 0, 64, 100, 0, 100) ; Add2ESDsList(h2d, kMIPMultiChannel, !expert, image) ; - h1d = new TH1D("H1D_BBFlag_Counters", "BB Flag Counters",64, 0, 64) ; - h1d->GetXaxis()->SetTitle("Channel"); + h1d = new TH1D("H1D_BBFlag_Counters", "BB Flag Counters;Channel;Counts",64, 0, 64) ; Add2ESDsList(h1d, kBBFlag, !expert, image) ; - h1d = new TH1D("H1D_BGFlag_Counters", "BG Flag Counters",64, 0, 64) ; - h1d->GetXaxis()->SetTitle("Channel"); + h1d = new TH1D("H1D_BGFlag_Counters", "BG Flag Counters;Channel;Counts",64, 0, 64) ; Add2ESDsList(h1d, kBGFlag, !expert, image) ; - h2d = new TH2D("H2D_Charge_Channel", "ADC Charge per channel",64, 0, 64, 1024, 0, 1024) ; - h2d->GetXaxis()->SetTitle("Channel"); - h2d->GetYaxis()->SetTitle("Charge (ADC counts)"); + h2d = new TH2D("H2D_Charge_Channel", "ADC Charge per channel;Channel;Charge (ADC counts)",64, 0, 64, 1024, 0, 1024) ; Add2ESDsList(h2d, kChargeChannel, !expert, image) ; - h2d = new TH2D("H2D_Time_Channel", "Time per channel",64, 0, 64, 820, 0, 410) ; - h2d->GetXaxis()->SetTitle("Channel"); - h2d->GetYaxis()->SetTitle("Time (ns)"); + h2d = new TH2D("H2D_Time_Channel", "Time per channel;Channel;Time (ns)",64, 0, 64, 820, 0, 410) ; Add2ESDsList(h2d, kTimeChannel, !expert, image) ; - h1d = new TH1D("H1D_V0A_Time", "Mean V0A Time",2048, 0., 409.6); - h1d->GetXaxis()->SetTitle("Time (ns)"); + h1d = new TH1D("H1D_V0A_Time", "Mean V0A Time;Time (ns);Counts",2048, 0., 409.6); Add2ESDsList(h1d,kESDV0ATime, !expert, image); - h1d = new TH1D("H1D_V0C_Time", "Mean V0C Time",2048, 0., 409.6); - h1d->GetXaxis()->SetTitle("Time (ns)"); + h1d = new TH1D("H1D_V0C_Time", "Mean V0C Time;Time (ns);Counts",2048, 0., 409.6); Add2ESDsList(h1d,kESDV0CTime, !expert, image); - h1d = new TH1D("H1D_Diff_Time", "Diff Time V0A - V0C",2*2048, -409.6, 409.6); - h1d->GetXaxis()->SetTitle("Diff Time V0A - V0C (ns)"); + h1d = new TH1D("H1D_Diff_Time", "Diff Time V0A - V0C;Diff Time V0A - V0C (ns);Counts",2*2048, -409.6, 409.6); Add2ESDsList(h1d,kESDDiffTime, !expert, image); } @@ -225,7 +255,7 @@ void AliVZEROQADataMakerRec::InitESDs() void AliVZEROQADataMakerRec::InitRaws() { // Creates RAW histograms in Raws subdir - + const Bool_t expert = kTRUE ; const Bool_t saveCorr = kTRUE ; const Bool_t image = kTRUE ; @@ -258,84 +288,85 @@ void AliVZEROQADataMakerRec::InitESDs() TH2D * h2d; TH1I * h1i; TH1D * h1d; + AliVZEROTrending * trend; int iHisto =0; // Creation of Cell Multiplicity Histograms - h1i = new TH1I("H1I_Multiplicity_V0A", "Cell Multiplicity in V0A", 35, 0, 35) ; - Add2RawsList(h1i,kMultiV0A, !expert, image, saveCorr); iHisto++; - h1i = new TH1I("H1I_Multiplicity_V0C", "Cell Multiplicity in V0C", 35, 0, 35) ; - Add2RawsList(h1i,kMultiV0C, !expert, image, saveCorr); iHisto++; + h1i = new TH1I("H1I_Multiplicity_V0A", "Cell Multiplicity in V0A;# of Cells;Entries", 35, 0, 35) ; + Add2RawsList(h1i,kMultiV0A, expert, image, saveCorr); iHisto++; + h1i = new TH1I("H1I_Multiplicity_V0C", "Cell Multiplicity in V0C;# of Cells;Entries", 35, 0, 35) ; + Add2RawsList(h1i,kMultiV0C, expert, image, saveCorr); iHisto++; // Creation of Total Charge Histograms - h1d = new TH1D("H1D_Charge_V0A", "Total Charge in V0A", 2048, 0, 32768) ; - Add2RawsList(h1d,kChargeV0A, !expert, image, saveCorr); iHisto++; - h1d = new TH1D("H1D_Charge_V0C", "Total Charge in V0C", 2048, 0, 32768) ; - Add2RawsList(h1d,kChargeV0C, !expert, image, saveCorr); iHisto++; - h1d = new TH1D("H1D_Charge_V0", "Total Charge in V0", 2048, 0, 65536) ; - Add2RawsList(h1d,kChargeV0, !expert, image, saveCorr); iHisto++; + h1d = new TH1D("H1D_Charge_V0A", "Total Charge in V0A;Charge [ADC counts];Counts", 2048, 0, 32768) ; + Add2RawsList(h1d,kChargeV0A, expert, image, saveCorr); iHisto++; + h1d = new TH1D("H1D_Charge_V0C", "Total Charge in V0C;Charge [ADC counts];Counts", 2048, 0, 32768) ; + Add2RawsList(h1d,kChargeV0C, expert, image, saveCorr); iHisto++; + h1d = new TH1D("H1D_Charge_V0", "Total Charge in V0;Charge [ADC counts];Counts", 2048, 0, 65536) ; + Add2RawsList(h1d,kChargeV0, expert, image, saveCorr); iHisto++; // Creation of MIP Histograms - h1d = new TH1D("H1D_MIP_V0A", "Total MIP in V0A", 2*kNMIPBins,kMIPMin ,32*kMIPMax) ; - Add2RawsList(h1d,kRawMIPV0A, !expert, image, saveCorr); iHisto++; - h1d = new TH1D("H1D_MIP_V0C", "Total MIP in V0C", 2*kNMIPBins,kMIPMin ,32*kMIPMax) ; - Add2RawsList(h1d,kRawMIPV0C, !expert, image, saveCorr); iHisto++; - h1d = new TH1D("H1D_MIP_V0", "Total MIP in V0", 2*kNMIPBins,kMIPMin ,32*kMIPMax) ; - Add2RawsList(h1d,kRawMIPV0, !expert, image, saveCorr); iHisto++; - h2d = new TH2D("H2D_MIP_Channel", "Nb of MIP per channel", kNChannelBins, kChannelMin, kChannelMax,kNMIPBins,kMIPMin ,kMIPMax) ; + h1d = new TH1D("H1D_MIP_V0A", "Total MIP in V0A;Charge [MIP];Counts", 2*kNMIPBins,kMIPMin ,32*kMIPMax) ; + Add2RawsList(h1d,kRawMIPV0A, expert, image, saveCorr); iHisto++; + h1d = new TH1D("H1D_MIP_V0C", "Total MIP in V0C;Charge [MIP];Counts", 2*kNMIPBins,kMIPMin ,32*kMIPMax) ; + Add2RawsList(h1d,kRawMIPV0C, expert, image, saveCorr); iHisto++; + h1d = new TH1D("H1D_MIP_V0", "Total MIP in V0;Charge [MIP];Counts", 2*kNMIPBins,kMIPMin ,32*kMIPMax) ; + Add2RawsList(h1d,kRawMIPV0, expert, image, saveCorr); iHisto++; + h2d = new TH2D("H2D_MIP_Channel", "Nb of MIP per channel;Channel;# of Mips", kNChannelBins, kChannelMin, kChannelMax,kNMIPBins,kMIPMin ,kMIPMax) ; Add2RawsList(h2d,kRawMIPChannel, expert, !image, !saveCorr); iHisto++; for(Int_t iInt=0;iIntSetFillColor(29); + h1d->SetLineWidth(2); + h1d->GetXaxis()->SetLabelSize(0.06); + h1d->GetXaxis()->SetNdivisions(808,kFALSE); + h1d->GetXaxis()->SetBinLabel(4, "V0C");h1d->GetXaxis()->SetBinLabel(5, "R0"); + h1d->GetXaxis()->SetBinLabel(12, "V0C");h1d->GetXaxis()->SetBinLabel(13, "R1"); + h1d->GetXaxis()->SetBinLabel(20, "V0C");h1d->GetXaxis()->SetBinLabel(21, "R2"); + h1d->GetXaxis()->SetBinLabel(28, "V0C");h1d->GetXaxis()->SetBinLabel(29, "R3"); + h1d->GetXaxis()->SetBinLabel(36, "V0A");h1d->GetXaxis()->SetBinLabel(37, "R0"); + h1d->GetXaxis()->SetBinLabel(44, "V0A");h1d->GetXaxis()->SetBinLabel(45, "R1"); + h1d->GetXaxis()->SetBinLabel(52, "V0A");h1d->GetXaxis()->SetBinLabel(53, "R2"); + h1d->GetXaxis()->SetBinLabel(60, "V0A");h1d->GetXaxis()->SetBinLabel(61, "R3"); + h1d->GetXaxis()->CenterTitle(); + h1d->GetXaxis()->SetTitleOffset(0.8); + h1d->GetXaxis()->SetNdivisions(808,kFALSE); + Add2RawsList(h1d,kRawDQMFlag, !expert, image, !saveCorr); iHisto++; + + sprintf(name,"H1D_DQMCharge"); + sprintf(title,"Current Charge per Event / Mean Charge per Event "); + h1d = new TH1D(name, title, kNChannelBins, kChannelMin, kChannelMax); + h1d->SetFillColor(29); + h1d->SetLineWidth(2); + h1d->GetXaxis()->SetLabelSize(0.06); + h1d->GetXaxis()->SetNdivisions(808,kFALSE); + h1d->GetXaxis()->SetBinLabel(4, "V0C");h1d->GetXaxis()->SetBinLabel(5, "R0"); + h1d->GetXaxis()->SetBinLabel(12, "V0C");h1d->GetXaxis()->SetBinLabel(13, "R1"); + h1d->GetXaxis()->SetBinLabel(20, "V0C");h1d->GetXaxis()->SetBinLabel(21, "R2"); + h1d->GetXaxis()->SetBinLabel(28, "V0C");h1d->GetXaxis()->SetBinLabel(29, "R3"); + h1d->GetXaxis()->SetBinLabel(36, "V0A");h1d->GetXaxis()->SetBinLabel(37, "R0"); + h1d->GetXaxis()->SetBinLabel(44, "V0A");h1d->GetXaxis()->SetBinLabel(45, "R1"); + h1d->GetXaxis()->SetBinLabel(52, "V0A");h1d->GetXaxis()->SetBinLabel(53, "R2"); + h1d->GetXaxis()->SetBinLabel(60, "V0A");h1d->GetXaxis()->SetBinLabel(61, "R3"); + h1d->GetXaxis()->CenterTitle(); + h1d->GetXaxis()->SetTitleOffset(0.8); + h1d->GetXaxis()->SetNdivisions(808,kFALSE); + Add2RawsList(h1d,kRawDQMCharge, !expert, image, !saveCorr); iHisto++; + AliDebug(AliQAv1::GetQADebugLevel(), Form("%d Histograms has been added to the Raws List",iHisto)); } @@ -443,18 +524,18 @@ void AliVZEROQADataMakerRec::InitDigits() char texte[100]; // create Digits histograms in Digits subdir - TH1I * h0 = new TH1I("hDigitMultiplicity", "Digits multiplicity distribution in VZERO", 100, 0, 99) ; + TH1I * h0 = new TH1I("hDigitMultiplicity", "Digits multiplicity distribution in VZERO;# of Digits;Entries", 100, 0, 99) ; h0->Sumw2() ; Add2DigitsList(h0, 0, !expert, image) ; for (Int_t i=0; i<64; i++) { sprintf(TDCname, "hDigitTDC%d", i); - sprintf(texte,"Digit TDC in cell %d",i); + sprintf(texte,"Digit TDC in cell %d; TDC value;Entries",i); fhDigTDC[i] = new TH1I(TDCname,texte,300,0.,149.); sprintf(ADCname,"hDigitADC%d",i); - sprintf(texte,"Digit ADC in cell %d",i); + sprintf(texte,"Digit ADC in cell %d;ADC value;Entries",i); fhDigADC[i]= new TH1I(ADCname,texte,1024,0.,1023.); Add2DigitsList(fhDigTDC[i],i+1, !expert, image); @@ -463,12 +544,12 @@ void AliVZEROQADataMakerRec::InitDigits() } //____________________________________________________________________________ -void AliVZEROQADataMakerRec::MakeDigits(TClonesArray * digits) +void AliVZEROQADataMakerRec::MakeDigits() { // makes data from Digits - - GetDigitsData(0)->Fill(digits->GetEntriesFast()) ; - TIter next(digits) ; + + GetDigitsData(0)->Fill(fDigitsArray->GetEntriesFast()) ; + TIter next(fDigitsArray) ; AliVZEROdigit *VZERODigit ; while ( (VZERODigit = dynamic_cast(next())) ) { Int_t PMNumber = VZERODigit->PMNumber(); @@ -483,15 +564,18 @@ void AliVZEROQADataMakerRec::MakeDigits(TTree *digitTree) { // makes data from Digit Tree - TClonesArray * digits = new TClonesArray("AliVZEROdigit", 1000) ; + if ( fDigitsArray ) + fDigitsArray->Clear() ; + else + fDigitsArray = new TClonesArray("AliVZEROdigit", 1000) ; TBranch * branch = digitTree->GetBranch("VZERODigit") ; if ( ! branch ) { AliWarning("VZERO branch in Digit Tree not found") ; } else { - branch->SetAddress(&digits) ; + branch->SetAddress(&fDigitsArray) ; branch->GetEntry(0) ; - MakeDigits(digits) ; + MakeDigits() ; } } @@ -557,10 +641,14 @@ void AliVZEROQADataMakerRec::MakeESDs(AliESDEvent * esd) { // Fills histograms with Raws, computes average ADC values dynamically (pedestal subtracted) - rawReader->Reset() ; + // Check id histograms already created for this Event Specie + if ( ! GetRawsData(kPedestalInt0) ) + InitRaws() ; + + rawReader->Reset() ; AliVZERORawStream* rawStream = new AliVZERORawStream(rawReader); - rawStream->Next(); - + if(!(rawStream->Next())) return; + eventTypeType eventType = rawReader->GetType(); Int_t mulV0A = 0 ; @@ -575,13 +663,21 @@ void AliVZEROQADataMakerRec::MakeESDs(AliESDEvent * esd) switch (eventType){ case PHYSICS_EVENT: + + fNTotEvents++; + + if(fNSubEvents++>=fTrendingUpdateEvent && fTrendingUpdateEvent>0) { + fNSubEvents=0; + AddTrendingEntry(); + } Int_t iFlag=0; Int_t pedestal; Int_t integrator; Bool_t BBFlag; Bool_t BGFlag; - UInt_t time, width; - Int_t MBCharge, charge; + Float_t time, width; + Int_t MBCharge; + Float_t charge; Int_t offlineCh; TH1D * hProj; @@ -597,7 +693,7 @@ void AliVZEROQADataMakerRec::MakeESDs(AliESDEvent * esd) if(iFlag == 0){ //No Flag found for(Int_t j=15; j<21; j++){ - pedestal=rawStream->GetPedestal(iChannel, j); + pedestal= (Int_t) rawStream->GetPedestal(iChannel, j); integrator = rawStream->GetIntegratorFlag(iChannel, j); GetRawsData((integrator == 0 ? kPedestalInt0 : kPedestalInt1))->Fill(offlineCh,pedestal); @@ -610,7 +706,7 @@ void AliVZEROQADataMakerRec::MakeESDs(AliESDEvent * esd) // Look for the maximum in the LHC clock train charge = 0; Int_t iClock = 0; - Int_t iCharge = 0; + Float_t iCharge = 0; for(Int_t iEvent=0; iEvent<21; iEvent++){ iCharge = rawStream->GetPedestal(iChannel,iEvent); if(iCharge>charge) { @@ -637,8 +733,16 @@ void AliVZEROQADataMakerRec::MakeESDs(AliESDEvent * esd) // Calculation of the number of MIP Double_t mipEoI = chargeEoI * fCalibData->GetMIPperADC(offlineCh); - + int side = offlineCh/32; + int ring = (offlineCh - 32*side) / 8; + if(BBFlag) { + fFlagPerRing[side*4 + ring] += 1; + fFlagPerChannel[offlineCh] += 1; + } + if(charge<1023 && chargeEoI > 5.*sigma){ + fChargePerRing[side*4 + ring] += chargeEoI; + fChargePerChannel[offlineCh] += chargeEoI; ((TH2I*)GetRawsData((integrator == 0 ? kChargeEoICycleInt0 : kChargeEoICycleInt1)))->Fill(offlineCh,chargeEoI); ((TH2D*)GetRawsData(kRawMIPChannel))->Fill(offlineCh,mipEoI); if(offlineCh<32) { @@ -805,5 +909,58 @@ void AliVZEROQADataMakerRec::StartOfDetectorCycle() if(h) h->Reset(); h = GetRawsData(kChargeEoICycleInt1); if(h) h->Reset(); + + TTimeStamp currentTime; + fCycleStartTime = currentTime.GetSec(); + + fNTotEvents = 0; +} + +//------------------------------------------------------------------------------------------------- +void AliVZEROQADataMakerRec::AddTrendingEntry(){ + //printf("AddTrendingEntry\n"); + fNTrendingUpdates++; + + // Normalize to the number of events + for(int i=0; i<8;i++){ +// fChargePerRing[i] *= TMath::Power(10.,i)/fTrendingUpdateEvent; +// fFlagPerRing[i] *= TMath::Power(10.,i)/fTrendingUpdateEvent; + fChargePerRing[i] /= fTrendingUpdateEvent; + fFlagPerRing[i] /= fTrendingUpdateEvent; + } + + GetRawsData(kRawDQMCharge)->Reset(); + GetRawsData(kRawDQMFlag)->Reset(); + for(int i=0; i<64;i++){ + fChargePerChannel[i] /= fTrendingUpdateEvent; + fFlagPerChannel[i] /= fTrendingUpdateEvent; + + if(fMeanChargePerChannel[i]) GetRawsData(kRawDQMCharge)->Fill(i,fChargePerChannel[i]/fMeanChargePerChannel[i]); + else GetRawsData(kRawDQMCharge)->Fill(i,0.); + + if(fMeanFlagPerChannel[i]) GetRawsData(kRawDQMFlag)->Fill(i,fFlagPerChannel[i]/fMeanFlagPerChannel[i]); + else GetRawsData(kRawDQMFlag)->Fill(i,0.); + + fMeanChargePerChannel[i] = (fMeanChargePerChannel[i] * (fNTrendingUpdates-1) + fChargePerChannel[i]) / fNTrendingUpdates; + fMeanFlagPerChannel[i] = (fMeanFlagPerChannel[i] * (fNTrendingUpdates-1) + fFlagPerChannel[i]) / fNTrendingUpdates; + + } + + TTimeStamp currentTime; + ((AliVZEROTrending*)GetRawsData(kRawMeanChargePerRing))->AddEntry(fChargePerRing, currentTime.GetSec()); + ((AliVZEROTrending*)GetRawsData(kRawMeanFlagPerRing))->AddEntry(fFlagPerRing, currentTime.GetSec()); + //moMeanFlagPerRing->AddEntry(fFlagPerRing, currentTime.GetSec()); + + // Put back counters to zero + for(int i=0; i<8;i++){ + fChargePerRing[i] = 0.; + fFlagPerRing[i] = 0.; + } + for(int i=0; i<64;i++){ + fChargePerChannel[i] = 0.; + fFlagPerChannel[i] = 0.; + } + } +