- Int_t iCh = iChamber + AliMpConstants::NofTrackingChambers();
-
- if(task==AliQA::kRECPOINTS){
- histoDisplayStrips = (TH2F*)GetRecPointsData(kTriggerDigitsDisplay + 4*iCath + iChamber);
- histoDisplayBoards = (TH2F*)GetRecPointsData(kTriggerBoardsDisplay);
- }
- else if(task==AliQA::kRAWS){
- histoDisplayStrips = (TH2F*)GetRawsData(kTriggerScalersDisplay + 4*iCath + iChamber);
- }
-
- for(Int_t iBoard=1; iBoard<=234; iBoard++){
- // get detElemId
- detElemId = AliMpDDLStore::Instance()->GetDEfromLocalBoard(iBoard, iCh);
-
- if (!detElemId) continue;
-
- AliMpLocalBoard* localBoard = AliMpDDLStore::Instance()->GetLocalBoard(iBoard, false);
-
- // skip copy cards
- if( !localBoard->IsNotified())
- continue;
-
- const AliMpVSegmentation* seg
- = AliMpSegmentation::Instance()
- ->GetMpSegmentation(detElemId, AliMp::GetCathodType(iCath));
-
- // loop over strips
- for (Int_t ibitxy = 0; ibitxy < 16; ++ibitxy)
- {
- AliMpPad pad = seg->PadByLocation(AliMpIntPair(iBoard,ibitxy),kFALSE);
-
- if (!pad.IsValid())
- continue;
-
- if(iCath==0){ // Geometry info from bending plane only
- if(ibitxy==0) {
- xLocal1 = pad.Position().X();
- yLocal1 = pad.Position().Y();
- xWidth = pad.Dimensions().X();
- yWidth = pad.Dimensions().Y();
- }
- xLocal2 = pad.Position().X();
- yLocal2 = pad.Position().Y();
- }
-
- Float_t dimX = pad.Dimensions().X();
- Float_t dimY = pad.Dimensions().Y();
-
- Float_t stripX = pad.Position().X();
- Float_t stripY = pad.Position().Y();
-
- transform.Local2Global(detElemId, stripX, stripY, 0, xg1, yg1, zg1);
-
- x1Int = histoDisplayStrips->GetXaxis()->FindBin(xg1 - dimX + kShift);
- y1Int = histoDisplayStrips->GetYaxis()->FindBin(yg1 - dimY + kShift);
- x2Int = histoDisplayStrips->GetXaxis()->FindBin(xg1 + dimX - kShift);
- y2Int = histoDisplayStrips->GetYaxis()->FindBin(yg1 + dimY - kShift);
-
- binCh = histoStrips->GetXaxis()->FindBin(iCh+1);
- binBoard = histoStrips->GetYaxis()->FindBin(iBoard);
- binStrip = histoStrips->GetZaxis()->FindBin(ibitxy);
- binContent = histoStrips->GetBinContent(binCh, binBoard, binStrip);
-
- if(binContent==0) continue;
-
- for(Int_t binX=x1Int; binX<=x2Int; binX++){
- for(Int_t binY=y1Int; binY<=y2Int; binY++){
- histoDisplayStrips->SetBinContent(binX, binY, binContent);
- }
- }
- }// ibitxy
-
- if(task != AliQA::kRECPOINTS) continue;
- if(iCath>0 || iChamber>0) continue; // Geometry info from bending plane only
- transform.Local2Global(detElemId, xLocal1, yLocal1, 0, xg1, yg1, zg1);
- transform.Local2Global(detElemId, xLocal2, yLocal2, 0, xg2, yg2, zg2);
-
- // Per board
- x1Label = TMath::Min(xg1,xg2) - xWidth + kShift;
- y1Label = TMath::Min(yg1,yg2) - yWidth + kShift;
- x2Label = TMath::Max(xg1,xg2) + xWidth - kShift;
- y2Label = TMath::Max(yg1,yg2) + yWidth - kShift;
-
- x1Int = histoDisplayBoards->GetXaxis()->FindBin(x1Label);
- y1Int = histoDisplayBoards->GetYaxis()->FindBin(y1Label);
- x2Int = histoDisplayBoards->GetXaxis()->FindBin(x2Label);
- y2Int = histoDisplayBoards->GetYaxis()->FindBin(y2Label);
-
- binBoard = histoBoards->GetXaxis()->FindBin(iBoard);
- binContent = histoBoards->GetBinContent(binBoard);
-
- if(binContent==0) continue;
-
- for(Int_t binX=x1Int; binX<=x2Int; binX++){
- for(Int_t binY=y1Int; binY<=y2Int; binY++){
- histoDisplayBoards->SetBinContent(binX, binY, binContent);
- }
- }
- } // iBoard
- } // iChamber
- } // iCath
-}
-
-
-//____________________________________________________________________________
-Bool_t AliMUONQADataMakerRec::InitDisplayHistos(AliQA::TASKINDEX_t task)
-{
- //
- /// Initialize trigger information display histograms,
- /// using mapping and geometry
- //
- AliMpCDB::LoadDDLStore();
-
- const Int_t kNumOfBoards = AliMpConstants::NofLocalBoards();
-
- AliMUONGeometryTransformer transform;
- transform.LoadGeometryData();
-
- TString cathCode[2] = {"BendPlane", "NonBendPlane"};
-
- TArrayF xLocal1[4], yLocal1[4], xLocal2[4], yLocal2[4], xWidth[4], yWidth[4];
-
- TArrayF xAxisStrip[8];
- TArrayF yAxisStrip[8];
- TArrayF xAxisBoard[8];
- TArrayF yAxisBoard[8];
-
- TH2F* histoStrips=0x0;
- TH2F* histoBoards=0x0;
-
- const Float_t kResetValue=1234567.;
-
- for(Int_t ch=0; ch<4; ch++){
- xLocal1[ch].Set(kNumOfBoards);
- yLocal1[ch].Set(kNumOfBoards);
- xLocal2[ch].Set(kNumOfBoards);
- yLocal2[ch].Set(kNumOfBoards);
- xWidth[ch].Set(kNumOfBoards);
- yWidth[ch].Set(kNumOfBoards);
- }
-
- for(Int_t cath=0; cath<2; cath++){
- for(Int_t ch=0; ch<4; ch++){
- Int_t chCath = 4*cath + ch;
- xAxisBoard[chCath].Set(60);
- xAxisBoard[chCath].Reset(kResetValue);
- yAxisBoard[chCath].Set(60);
- yAxisBoard[chCath].Reset(kResetValue);
-
- xAxisStrip[chCath].Set(700);
- xAxisStrip[chCath].Reset(kResetValue);
- yAxisStrip[chCath].Set(700);
- yAxisStrip[chCath].Reset(kResetValue);