void readDAQDBEntry(const char* filename) { //This macro allows to visualize the bad channels in the DAQ DB //The filename is the name of the DAQ DB file that you have to have //in the working directory gStyle->SetPalette(1,0); BadChannelMap(filename); } //_______________________________________// void BadChannelMap(const char* filename) { const Int_t fgkSSDMODULES = 1698; const Int_t fgkSSDSTRIPSPERMODULE = 1536; static const Int_t fgkDefaultNStripsSSD = 768; TH2F *fHistPSideBadChannelMapLayer5 = new TH2F("fHistPSideBadChannelMapLayer5", "Layer 5;N_{module};N_{ladder}", 22,1,23, 34,500,534); fHistPSideBadChannelMapLayer5->GetXaxis()->SetTitleColor(1); fHistPSideBadChannelMapLayer5->SetStats(kFALSE); fHistPSideBadChannelMapLayer5->GetYaxis()->SetTitleOffset(1.8); fHistPSideBadChannelMapLayer5->GetXaxis()->SetNdivisions(22); fHistPSideBadChannelMapLayer5->GetYaxis()->SetNdivisions(34); fHistPSideBadChannelMapLayer5->GetXaxis()->SetLabelSize(0.03); fHistPSideBadChannelMapLayer5->GetYaxis()->SetLabelSize(0.03); fHistPSideBadChannelMapLayer5->GetZaxis()->SetTitleOffset(1.6); fHistPSideBadChannelMapLayer5->GetZaxis()->SetTitle("Bad channels (p-side)[%]"); TH2F *fHistNSideBadChannelMapLayer5 = new TH2F("fHistNSideBadChannelMapLayer5", "Layer 5;N_{module};N_{ladder}", 22,1,23, 34,500,534); fHistNSideBadChannelMapLayer5->GetXaxis()->SetTitleColor(1); fHistNSideBadChannelMapLayer5->SetStats(kFALSE); fHistNSideBadChannelMapLayer5->GetYaxis()->SetTitleOffset(1.8); fHistNSideBadChannelMapLayer5->GetXaxis()->SetNdivisions(22); fHistNSideBadChannelMapLayer5->GetYaxis()->SetNdivisions(34); fHistNSideBadChannelMapLayer5->GetXaxis()->SetLabelSize(0.03); fHistNSideBadChannelMapLayer5->GetYaxis()->SetLabelSize(0.03); fHistNSideBadChannelMapLayer5->GetZaxis()->SetTitleOffset(1.6); fHistNSideBadChannelMapLayer5->GetZaxis()->SetTitle("Bad channels (n-side)[%]"); TH2F *fHistPSideBadChannelMapLayer6 = new TH2F("fHistPSideBadChannelMapLayer6", "Layer 6;N_{module};N_{ladder}", 25,1,26, 38,600,638); fHistPSideBadChannelMapLayer6->GetXaxis()->SetTitleColor(1); fHistPSideBadChannelMapLayer6->SetStats(kFALSE); fHistPSideBadChannelMapLayer6->GetYaxis()->SetTitleOffset(1.8); fHistPSideBadChannelMapLayer6->GetXaxis()->SetNdivisions(25); fHistPSideBadChannelMapLayer6->GetYaxis()->SetNdivisions(38); fHistPSideBadChannelMapLayer6->GetXaxis()->SetLabelSize(0.03); fHistPSideBadChannelMapLayer6->GetYaxis()->SetLabelSize(0.03); fHistPSideBadChannelMapLayer6->GetZaxis()->SetTitleOffset(1.6); fHistPSideBadChannelMapLayer6->GetZaxis()->SetTitle("Bad channels (p-side)[%]"); TH2F *fHistNSideBadChannelMapLayer6 = new TH2F("fHistNSideBadChannelMapLayer6", "Layer 6;N_{module};N_{ladder}", 25,1,26, 38,600,638); fHistNSideBadChannelMapLayer6->GetXaxis()->SetTitleColor(1); fHistNSideBadChannelMapLayer6->SetStats(kFALSE); fHistNSideBadChannelMapLayer6->GetYaxis()->SetTitleOffset(1.8); fHistNSideBadChannelMapLayer6->GetXaxis()->SetNdivisions(25); fHistNSideBadChannelMapLayer6->GetYaxis()->SetNdivisions(38); fHistNSideBadChannelMapLayer6->GetXaxis()->SetLabelSize(0.03); fHistNSideBadChannelMapLayer6->GetYaxis()->SetLabelSize(0.03); fHistNSideBadChannelMapLayer6->GetZaxis()->SetTitleOffset(1.6); fHistNSideBadChannelMapLayer6->GetZaxis()->SetTitle("Bad channels (n-side)[%]"); TFile *f = TFile::Open(filename); AliITSBadChannelsSSD *badchannelsSSD = (AliITSBadChannelsSSD *)f->Get("AliITSBadChannelsSSD"); Int_t nPSideChannelsTotal = 0, nNSideChannelsTotal = 0; Int_t nBadPSideChannelsTotal = 0, nBadNSideChannelsTotal = 0; Int_t nBadPSideChannels = 0, nBadNSideChannels = 0; Int_t layer = 0, ladder = 0, module = 0; Int_t nPSideChannelsLayer5 = 0, nNSideChannelsLayer5 = 0; Int_t nPSideChannelsLayer6 = 0, nNSideChannelsLayer6 = 0; for(Int_t i = 0; i < fgkSSDMODULES; i++) { //for(Int_t i = 0; i < 22; i++) { AliITSgeomTGeo::GetModuleId(i+500,layer,ladder,module); nBadPSideChannels = 0, nBadNSideChannels = 0; nPSideChannelsLayer5 = 0, nNSideChannelsLayer5 = 0; nPSideChannelsLayer6 = 0, nNSideChannelsLayer6 = 0; Int_t badChannel = 0; for(Int_t j = 0; j < fgkDefaultNStripsSSD; j++) { badChannel = (Int_t)(badchannelsSSD->GetBadChannelP(i,j)); //cout<<"Module: "<GetBadChannelN(i,j)); //cout<<"Module: "< 0) fHistPSideBadChannelMapLayer5->Fill(module,499+ladder, 100.*nPSideChannelsLayer5/fgkDefaultNStripsSSD); else fHistPSideBadChannelMapLayer5->Fill(module,499+ladder,0.0001); if(nNSideChannelsLayer5 > 0) fHistNSideBadChannelMapLayer5->Fill(module,499+ladder, 100.*nNSideChannelsLayer5/fgkDefaultNStripsSSD); else fHistNSideBadChannelMapLayer5->Fill(module,499+ladder,0.0001); }//layer 5 if(layer == 6) { if(nPSideChannelsLayer6 > 0) fHistPSideBadChannelMapLayer6->Fill(module,599+ladder, 100.*nPSideChannelsLayer6/fgkDefaultNStripsSSD); else fHistPSideBadChannelMapLayer6->Fill(module,599+ladder,0.0001); if(nNSideChannelsLayer6 > 0) fHistNSideBadChannelMapLayer6->Fill(module,599+ladder, 100.*nNSideChannelsLayer6/fgkDefaultNStripsSSD); else fHistNSideBadChannelMapLayer6->Fill(module,599+ladder,0.0001); }//layer 6 nBadPSideChannelsTotal += nBadPSideChannels; nBadNSideChannelsTotal += nBadNSideChannels; nPSideChannelsTotal += fgkDefaultNStripsSSD; nNSideChannelsTotal += fgkDefaultNStripsSSD; /*cout<<"Module: "<SetHighLightColor(10); cBadChannel->SetFillColor(10); cBadChannel->Divide(2,2); cBadChannel->cd(1)->SetBottomMargin(.2); cBadChannel->cd(1)->SetLeftMargin(.15); cBadChannel->cd(1)->SetRightMargin(.2); cBadChannel->cd(1)->SetGridx(); cBadChannel->cd(1)->SetGridy(); cBadChannel->cd(1); fHistPSideBadChannelMapLayer5->Draw("colz"); cBadChannel->cd(2)->SetBottomMargin(.2); cBadChannel->cd(2)->SetLeftMargin(.15); cBadChannel->cd(2)->SetRightMargin(.2); cBadChannel->cd(2)->SetGridx(); cBadChannel->cd(2)->SetGridy(); cBadChannel->cd(2); fHistPSideBadChannelMapLayer6->Draw("colz"); cBadChannel->cd(3)->SetBottomMargin(.2); cBadChannel->cd(3)->SetLeftMargin(.15); cBadChannel->cd(3)->SetRightMargin(.2); cBadChannel->cd(3)->SetGridx(); cBadChannel->cd(3)->SetGridy(); cBadChannel->cd(3); fHistNSideBadChannelMapLayer5->Draw("colz"); cBadChannel->cd(4)->SetBottomMargin(.2); cBadChannel->cd(4)->SetLeftMargin(.15); cBadChannel->cd(4)->SetRightMargin(.2); cBadChannel->cd(4)->SetGridx(); cBadChannel->cd(4)->SetGridy(); cBadChannel->cd(4); fHistNSideBadChannelMapLayer6->Draw("colz"); }