#include <TBox.h>
#include <TLine.h>
#include <TAxis.h>
+#include <TH1.h>
+#include <TProfile.h>
+#include <TProfile2D.h>
// --- Standard library ---
#include "AliTPCClustersRow.h"
#include "AliTPCclusterMI.h"
#include "AliSimDigits.h"
+#include <AliDetectorRecoParam.h>
ClassImp(AliTPCQADataMakerRec)
histRawsOccupancyVsSector->SetMarkerStyle(20);
histRawsOccupancyVsSector->SetOption("P");
histRawsOccupancyVsSector->SetStats(kFALSE);
- Add2RawsList(histRawsOccupancyVsSector, kRawsOccupancyVsSector, !expert, image, !saveCorr);
-
+ if ( GetRecoParam()->GetEventSpecie() == AliRecoParam::kCalib )
+ Add2RawsList(histRawsOccupancyVsSector, kRawsOccupancyVsSector, expert, image, !saveCorr);
+ else
+ Add2RawsList(histRawsOccupancyVsSector, kRawsOccupancyVsSector, !expert, image, !saveCorr);
+
TProfile * histRawsQVsSector =
new TProfile("hRawsQVsSector", "<Q> vs sector; Sector; <Q>",
72, 0, 72);
histRawsQmaxVsSector->SetMarkerStyle(20);
histRawsQmaxVsSector->SetOption("P");
histRawsQmaxVsSector->SetStats(kFALSE);
- Add2RawsList(histRawsQmaxVsSector, kRawsQmaxVsSector, !expert, image, !saveCorr);
+ if ( GetRecoParam()->GetEventSpecie() == AliRecoParam::kCalib )
+ Add2RawsList(histRawsQmaxVsSector, kRawsQmaxVsSector, expert, image, !saveCorr);
+ else
+ Add2RawsList(histRawsQmaxVsSector, kRawsQmaxVsSector, !expert, image, !saveCorr);
+
+ TProfile2D * histRawsOccupancy2dVsSector =
+ new TProfile2D("hRawsOccupancy2dVsSector", "Occupancy vs sector; Sector; Patch",
+ 72, 0, 36, 6, 0, 6);
+ histRawsOccupancy2dVsSector->SetOption("COLZ");
+ histRawsOccupancy2dVsSector->SetStats(kFALSE);
+ if ( GetRecoParam()->GetEventSpecie() == AliRecoParam::kCalib )
+ Add2RawsList(histRawsOccupancy2dVsSector, kRawsOccupancy2dVsSector, expert, image, !saveCorr);
+ else
+ Add2RawsList(histRawsOccupancy2dVsSector, kRawsOccupancy2dVsSector, !expert, image, !saveCorr);
+
//
ClonePerTrigClass(AliQAv1::kRAWS); // this should be the last line
}
TProfile* hRawsOccupancyVsSector = dynamic_cast<TProfile*>(arrRW->At(ih));
if (hRawsOccupancyVsSector) hRawsOccupancyVsSector->Add(fTPCdataQA->GetHistOccVsSector());
}
+ arrRW = GetMatchingRawsData(kRawsOccupancy2dVsSector);
+ for (int ih=arrRW->GetEntriesFast();ih--;) {
+ TProfile2D* hRawsOccupancy2dVsSector = dynamic_cast<TProfile2D*>(arrRW->At(ih));
+ if (hRawsOccupancy2dVsSector) hRawsOccupancy2dVsSector->Add(fTPCdataQA->GetHistOcc2dVsSector());
+ }
arrRW = GetMatchingRawsData(kRawsQVsSector);
for (int ih=arrRW->GetEntriesFast();ih--;) {
TProfile* hRawsQVsSector = dynamic_cast<TProfile*>(arrRW->At(ih));
#include "AliTPCdataQA.h"
#include "AliLog.h"
+
ClassImp(AliTPCdataQA)
AliTPCdataQA::AliTPCdataQA() : /*FOLD00*/
fTimeBinsMax(0),
fIsDQM(kFALSE),
fHistOccVsSector(0x0),
+ fHistOcc2dVsSector(0x0),
fHistQVsSector(0x0),
fHistQmaxVsSector(0x0),
fOccVec(0x0),
- fOccMaxVec(0x0)
+ fOccMaxVec(0x0),
+ fOccVecFine(0x0),
+ fOccMaxVecFine(0x0)
{
//
// default constructor
fTimeBinsMax(0),
fIsDQM(ped.GetIsDQM()),
fHistOccVsSector(0x0),
+ fHistOcc2dVsSector(0x0),
fHistQVsSector(0x0),
fHistQmaxVsSector(0x0),
fOccVec(0x0),
- fOccMaxVec(0x0)
+ fOccMaxVec(0x0),
+ fOccVecFine(0x0),
+ fOccMaxVecFine(0x0)
{
//
// copy constructor
fTimeBinsMax(0),
fIsDQM(kFALSE),
fHistOccVsSector(0x0),
+ fHistOcc2dVsSector(0x0),
fHistQVsSector(0x0),
fHistQmaxVsSector(0x0),
fOccVec(0x0),
- fOccMaxVec(0x0)
+ fOccMaxVec(0x0),
+ fOccVecFine(0x0),
+ fOccMaxVecFine(0x0)
{
//
// default constructor
// DQM
delete fHistOccVsSector;
+ delete fHistOcc2dVsSector;
delete fHistQVsSector;
delete fHistQmaxVsSector;
delete fOccVec;
delete fOccMaxVec;
+ delete fOccVecFine;
+ delete fOccMaxVecFine;
for (Int_t iRow = 0; iRow < fRowsMax; iRow++) {
delete [] fAllBins[iRow];
Int_t iSector = rawStreamV3->GetSector(); // current sector
Int_t iRow = rawStreamV3->GetRow(); // current row
Int_t iPad = rawStreamV3->GetPad(); // current pad
+ Int_t iPatch = rawStreamV3->GetPatchIndex(); // current patch
+ Int_t iBranch = rawStreamV3->GetBranch(); // current branch
if (iRow<0 || iPad<0) continue;
// Call local maxima finder if the data is in a new sector
if(iSector != lastSector) {
for (Int_t iTimeBin = 0; iTimeBin<bunchlength; iTimeBin++){
Float_t signal=(Float_t)sig[iTimeBin];
- nSignals += Update(iSector,iRow,iPad,startTbin--,signal);
+ nSignals += Update(iSector,iRow,iPad,startTbin--,signal, iPatch, iBranch);
withInput = kTRUE;
}
}
//
// Event processing loop - AliRawReader
//
- AliTPCRawStreamV3 rawStreamV3(rawReader, (AliAltroMapping**)fMapping);
+ AliTPCRawStreamV3 rawStreamV3(rawReader,(AliAltroMapping**)fMapping);
Bool_t res=ProcessEvent(&rawStreamV3);
if(res) {
fEventCounter++; // only increment event counter if there is TPC data
const Int_t iRow,
const Int_t iPad,
const Int_t iTimeBin,
- Float_t signal)
+ Float_t signal,
+ const Int_t iPatch,
+ const Int_t iBranch)
{
//
// Signal filling method
fHistOccVsSector = new TProfile("hOccVsSector", "Occupancy vs sector; Sector; Occupancy", 72, 0, 72);
fHistOccVsSector->SetDirectory(0);
+ fHistOcc2dVsSector = new TProfile2D("hOcc2dVsSector", "Occupancy vs sector and patch; Sector; Patch", 72, 0, 36, 6, 0, 6);
+ fHistOcc2dVsSector->SetDirectory(0);
+
fHistQVsSector = new TProfile("hQVsSector", "Q vs sector; Sector; Q [ADC ch]", 72, 0, 72);
fHistQVsSector->SetDirectory(0);
fOccVec->GetArray()[i] = 0;
fOccMaxVec = new TArrayD(72);
- Double_t nTimeBins = fLastTimeBin - fFirstTimeBin +1;
+ const Double_t nTimeBins = fLastTimeBin - fFirstTimeBin +1;
for(Int_t i = 0; i < 72; i++)
if(i<36) // IROCs (5504 pads)
fOccMaxVec->GetArray()[i] = nTimeBins*5504;
else // OROCs (9984 pads)
fOccMaxVec->GetArray()[i] = nTimeBins*9984;
+
+ // 12 branches for each full sector
+ const Int_t nBranches = 36*12;
+ fOccVecFine = new TArrayD(nBranches);
+ for(Int_t i = 0; i < nBranches; i++)
+ fOccVecFine->GetArray()[i] = 0;
+
+ // Pads per patch same for all sectors
+ Int_t nPads0[6] = {1152, 1536, 1152, 1280, 1280, 1280};
+ Int_t nPads1[6] = {1152, 1664, 1152, 1280, 1280, 1280};
+
+ fOccMaxVecFine = new TArrayD(nBranches);
+ for(Int_t i = 0; i < nBranches; i++) {
+
+ const Int_t fullSector = Int_t(i/12);
+ Int_t branch = i - fullSector*12;
+ R__ASSERT(branch>=0 && branch<12);
+
+ const Int_t patch = Int_t(branch/2);
+ branch -= patch*2;
+
+ R__ASSERT(branch>=0 && branch<2);
+ if(branch == 0)
+ fOccMaxVecFine->GetArray()[i] = nTimeBins*nPads0[patch];
+ else // OROCs (9984 pads)
+ fOccMaxVecFine->GetArray()[i] = nTimeBins*nPads1[patch];
+ }
}
}
// Make the arrays for expanding the data
if(fIsDQM) {
fOccVec->GetArray()[iSector] += 1.0;
+ // To change before committing
+ if(iPatch>=0 && iBranch>=0 && iPatch<=5 && iBranch <= 1)
+ fOccVecFine->GetArray()[(iSector%36)*12+iPatch*2+iBranch] += 1.0;
} else {
// In fNoThreshold we fill all data to estimate the ZS volume
Float_t count = fNoThreshold->GetCalROC(iSector)->GetValue(iRow, iPad);
fOccVec->GetArray()[i] /= fOccMaxVec->GetArray()[i];
fHistOccVsSector->Fill(i, fOccVec->GetArray()[i]);
}
+
+ const Int_t nBranches = 36*12;
+ for(Int_t i = 0; i < nBranches; i++) {
+
+ fOccVecFine->GetArray()[i] /= fOccMaxVecFine->GetArray()[i];
+
+ const Int_t fullSector = Int_t(i/12);
+
+ Int_t branch = i - fullSector*12;
+ const Int_t patch = Int_t(branch/2);
+
+ branch -= patch*2;
+
+ fHistOcc2dVsSector->Fill(fullSector+0.5*branch+0.1, patch+0.5, fOccVecFine->GetArray()[i]);
+ }
}
//____________________________________________________________________________________________
fHistQmaxVsSector->Reset();
if(fHistOccVsSector)
fHistOccVsSector->Reset();
+ if(fHistOcc2dVsSector)
+ fHistOcc2dVsSector->Reset();
if(fOccVec)
for(Int_t i = 0; i < 72; i++)
fOccVec->GetArray()[i] = 0.0;
+ if(fOccVecFine)
+ for(Int_t i = 0; i < 36*12; i++)
+ fOccVecFine->GetArray()[i] = 0.0;
}
#include <TH1F.h>
-class TProfile;
+#include <TProfile.h>
+#include <TProfile2D.h>
#include "AliRecoParam.h"
#include <TArray.h>
// DQM output
TProfile* GetHistOccVsSector() const { return fHistOccVsSector; }
+ TProfile2D* GetHistOcc2dVsSector() const { return fHistOcc2dVsSector; }
TProfile* GetHistQVsSector() const { return fHistQVsSector; }
TProfile* GetHistQmaxVsSector() const { return fHistQmaxVsSector; }
private:
Int_t Update(const Int_t iSector, const Int_t iRow, const Int_t iPad,
- const Int_t iTimeBin, Float_t signal);
+ const Int_t iTimeBin, Float_t signal,
+ const Int_t iPatch=-1, const Int_t iBranch=-1);
void FindLocalMaxima(const Int_t iSector);
void MakeArrays(); // Create arrays for random data acces
// DQM variables
Bool_t fIsDQM; //! Is DQM -> Simple output (no 2D!)
TProfile* fHistOccVsSector; //! Occ vs sector (for DQM only)
+ TProfile2D* fHistOcc2dVsSector; //! Occ vs sector 2D (for DQM only)
TProfile* fHistQVsSector; //! Q vs sector (for DQM only)
TProfile* fHistQmaxVsSector; //! QMax vs sector (for DQM only)
TArrayD* fOccVec; //! Occupancy help counter for DQM
TArrayD* fOccMaxVec; //! Occupancy help normlization for DQM
+ TArrayD* fOccVecFine; //! "2D" occupancy help counter for DQM
+ TArrayD* fOccMaxVecFine; //! "2D" occupancy help normlization for DQM
ClassDef(AliTPCdataQA, 5) // Implementation of the TPC Raw QA