-
- for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++) {
- if ( !AliQAv1::Instance()->IsEventSpecieSet(specie) )
- continue ;
- if(fTPCdataQA[specie] != NULL) { // do the final step of the QA for Raw data
-
- fTPCdataQA[specie]->Analyse(); // 31/1-08 Analyse is now protected against
- // RAW data files with no TPC data
-
- SetEventSpecie(AliRecoParam::ConvertIndex(specie)) ;
- TH1F * histRawsOccupancy = (TH1F*)GetRawsData(kRawsOccupancy) ;
- TH1F * histRawsOccupancyVsSector = (TH1F*)GetRawsData(kRawsOccupancyVsSector) ;
- TH1F * histRawsNClustersPerEventVsSector = (TH1F*)GetRawsData(kRawsNClustersPerEventVsSector) ;
- TH1F * histRawsQVsSector = (TH1F*)GetRawsData(kRawsQVsSector) ;
- TH1F * histRawsQmaxVsSector = (TH1F*)GetRawsData(kRawsQmaxVsSector) ;
- TH1F * histRawsOccupancyVsEvent = (TH1F*)GetRawsData(kRawsOccupancyVsEvent) ;
- TH1F * histRawsNclustersVsEvent = (TH1F*)GetRawsData(kRawsNclustersVsEvent) ;
- if ( !histRawsOccupancy ||
- !histRawsOccupancyVsSector ||
- !histRawsNClustersPerEventVsSector ||
- !histRawsQVsSector ||
- !histRawsQmaxVsSector ||
- !histRawsOccupancyVsEvent ||
- !histRawsNclustersVsEvent ) {
- AliError("Something very wrong here, corrupted memory ?????. Please check\n") ;
- continue ;
- }
-
- //Add2RawsList(fTPCdataQA, 0);
- // get the histograms and add them to the output
- // 31/8-08 Histogram is only added if the Calibration class
- // receives TPC data
- const Int_t eventCounter = fTPCdataQA[specie]->GetEventCounter();
- if(eventCounter>0) { // some TPC data has been processed
-
- // Reset histograms and refill them
- histRawsOccupancy->Reset();
- histRawsOccupancyVsSector->Reset();
- histRawsNClustersPerEventVsSector->Reset();
- histRawsQVsSector->Reset();
- histRawsQmaxVsSector->Reset();
-
- TH1F* hNormOcc = new TH1F("hNormOcc", 0, 72, 0, 72);
- hNormOcc->Sumw2();
- TH1F* hNormNclusters = new TH1F("hNormNclusters", 0, 72, 0, 72);
- hNormNclusters->Sumw2();
-
- for (Int_t iSec = 0; iSec < 72; iSec++) {
-
- AliTPCCalROC* occupancyROC =
- fTPCdataQA[specie]->GetNoThreshold()->GetCalROC(iSec);
- AliTPCCalROC* nclusterROC =
- fTPCdataQA[specie]->GetNLocalMaxima()->GetCalROC(iSec);
- AliTPCCalROC* qROC =
- fTPCdataQA[specie]->GetMeanCharge()->GetCalROC(iSec);
- AliTPCCalROC* qmaxROC =
- fTPCdataQA[specie]->GetMaxCharge()->GetCalROC(iSec);
-
- const Int_t nRows = occupancyROC->GetNrows();
- for (Int_t iRow = 0; iRow < nRows; iRow++) {
-
- const Int_t nPads = occupancyROC->GetNPads(iRow);
- for (Int_t iPad = 0; iPad < nPads; iPad++) {
-
- histRawsOccupancy->Fill(occupancyROC->GetValue(iRow, iPad));
- hNormOcc->Fill(iSec);
- histRawsOccupancyVsSector
- ->Fill(iSec, occupancyROC->GetValue(iRow, iPad));
-
- const Int_t nClusters = TMath::Nint(nclusterROC->GetValue(iRow, iPad));
-
- if(nClusters>0) {
-
- hNormNclusters->Fill(iSec,nClusters);
- histRawsNClustersPerEventVsSector->Fill(iSec, nClusters);
- histRawsQVsSector->Fill(iSec,
- nClusters*qROC->GetValue(iRow, iPad));
- histRawsQmaxVsSector->Fill(iSec,
- nClusters*qmaxROC->GetValue(iRow, iPad));
- }
- }
- }
- } // end loop over sectors
-
- // update event histograms - copy info from TPDdataQA histos
- const TH1F* hQAOccVsEvent = fTPCdataQA[specie]->GetHistOccupancyVsEvent();
- const TH1F* hQANclVsEvent = fTPCdataQA[specie]->GetHistNclustersVsEvent();
-
- // In case the histogram limits have changed we have to update
- // them here
- if(histRawsOccupancy->GetXaxis()->GetXmax()!=
- hQAOccVsEvent->GetXaxis()->GetXmax()) {
-
- histRawsOccupancyVsEvent->GetXaxis()->Set(histRawsOccupancyVsEvent->GetXaxis()->GetNbins(), hQAOccVsEvent->GetXaxis()->GetXmin(), hQAOccVsEvent->GetXaxis()->GetXmax());
-
- histRawsNclustersVsEvent->GetXaxis()->Set(histRawsOccupancyVsEvent->GetXaxis()->GetNbins(), hQANclVsEvent->GetXaxis()->GetXmin(), hQANclVsEvent->GetXaxis()->GetXmax());
- }
-
- // reset the number of entries
- histRawsOccupancyVsEvent->SetEntries(0);
- histRawsNclustersVsEvent->SetEntries(0);
-
- // the two event histograms should have the same number of bins
- const Int_t nBins = hQAOccVsEvent->GetXaxis()->GetNbins();
- for(Int_t bin = 1; bin <= nBins; bin++) {
-
- histRawsOccupancyVsEvent->SetBinContent(bin, hQAOccVsEvent->GetBinContent(bin));
- histRawsNclustersVsEvent->SetBinContent(bin, hQANclVsEvent->GetBinContent(bin));
- }
-
- // Normalize histograms
- histRawsOccupancyVsSector->Divide(hNormOcc);
- histRawsNClustersPerEventVsSector->Scale(1.0/Float_t(eventCounter));
- histRawsQVsSector->Divide(hNormNclusters);
- histRawsQmaxVsSector->Divide(hNormNclusters);
- delete hNormOcc;
- delete hNormNclusters;
-
- }
- }
- }