85 std::ostringstream oss;
89 dqmStore->setCurrentFolder(
"ChannelStatusPlots");
92 std::vector<std::string> subDetName;
93 std::vector<unsigned int>
nLayers;
95 subDetName.push_back(
"");
96 subDetName.push_back(
"TIB");
97 subDetName.push_back(
"TID");
98 subDetName.push_back(
"TOB");
99 subDetName.push_back(
"TEC");
117 TH2F* medianVsAbsoluteOccupancy[5][10];
118 TH1F* medianOccupancy[5][10];
119 TH1F* absoluteOccupancy[5][10];
120 for (
unsigned int i = 0;
i < subDetName.size();
i++) {
122 histoName =
"medianVsAbsoluteOccupancy" + subDetName[
i];
128 histoTitle =
"Median APV occupancy vs. absolute APV occupancy";
130 histoTitle +=
" in " + subDetName[
i];
132 histoTitle +=
" " +
layerName[
i] +
" " + oss.str();
135 medianVsAbsoluteOccupancy[
i][
j] =
tmp->getTH2F();
136 medianVsAbsoluteOccupancy[
i][
j]->Rebin2D(10, 10);
137 medianVsAbsoluteOccupancy[
i][
j]->GetXaxis()->SetTitle(
"log_{10}(Abs. Occupancy)");
138 medianVsAbsoluteOccupancy[
i][
j]->GetYaxis()->SetTitle(
"log_{10}(Median Occupancy)");
140 histoName =
"medianOccupancy" + subDetName[
i];
146 histoTitle =
"Median APV occupancy";
148 histoTitle +=
" in " + subDetName[
i];
150 histoTitle +=
" " +
layerName[
i] +
" " + oss.str();
153 medianOccupancy[
i][
j] =
tmp->getTH1F();
154 medianOccupancy[
i][
j]->GetXaxis()->SetTitle(
"log_{10}(Occupancy)");
155 medianOccupancy[
i][
j]->GetYaxis()->SetTitle(
"APVs");
157 histoName =
"absoluteOccupancy" + subDetName[
i];
163 histoTitle =
"Absolute APV occupancy";
165 histoTitle +=
" in " + subDetName[
i];
167 histoTitle +=
" " +
layerName[
i] +
" " + oss.str();
170 absoluteOccupancy[
i][
j] =
tmp->getTH1F();
171 absoluteOccupancy[
i][
j]->GetXaxis()->SetTitle(
"log_{10}(Occupancy)");
172 absoluteOccupancy[
i][
j]->GetYaxis()->SetTitle(
"APVs");
177 TTree* intree = (TTree*)
infile->Get(
"moduleOccupancy");
185 Int_t IsExternalString;
187 Int_t RodStringPetal;
189 Int_t ModulePosition;
190 Int_t NumberOfStrips;
191 Float_t APVGlobalPositionX;
192 Float_t APVGlobalPositionY;
193 Float_t APVGlobalPositionZ;
195 Int_t APVAbsoluteOccupancy;
196 Double_t APVMedianOccupancy;
197 intree->SetBranchAddress(
"DetRawId", &DetRawId);
198 intree->SetBranchAddress(
"SubDetId", &SubDetId);
199 intree->SetBranchAddress(
"Layer_Ring", &Layer_Ring);
200 intree->SetBranchAddress(
"Disc", &Disc);
201 intree->SetBranchAddress(
"IsBack", &IsBack);
202 intree->SetBranchAddress(
"IsExternalString", &IsExternalString);
203 intree->SetBranchAddress(
"IsZMinusSide", &IsZMinusSide);
204 intree->SetBranchAddress(
"RodStringPetal", &RodStringPetal);
205 intree->SetBranchAddress(
"IsStereo", &IsStereo);
206 intree->SetBranchAddress(
"ModuleNumber", &ModulePosition);
207 intree->SetBranchAddress(
"NumberOfStrips", &NumberOfStrips);
208 intree->SetBranchAddress(
"APVGlobalPositionX", &APVGlobalPositionX);
209 intree->SetBranchAddress(
"APVGlobalPositionY", &APVGlobalPositionY);
210 intree->SetBranchAddress(
"APVGlobalPositionZ", &APVGlobalPositionZ);
211 intree->SetBranchAddress(
"APVNumber", &APVNumber);
212 intree->SetBranchAddress(
"APVAbsoluteOccupancy", &APVAbsoluteOccupancy);
213 intree->SetBranchAddress(
"APVMedianOccupancy", &APVMedianOccupancy);
215 for (
int i = 0;
i < intree->GetEntries();
i++) {
218 double logMedianOccupancy = -1;
219 double logAbsoluteOccupancy = -1;
221 if (APVMedianOccupancy > 0)
222 logMedianOccupancy = log10(APVMedianOccupancy);
223 if (APVAbsoluteOccupancy > 0)
224 logAbsoluteOccupancy = log10(APVAbsoluteOccupancy);
227 unsigned int layer = 0;
228 if (SubDetId == 3 || SubDetId == 5)
234 medianVsAbsoluteOccupancy[0][0]->Fill(logAbsoluteOccupancy, logMedianOccupancy);
235 medianOccupancy[0][0]->Fill(logMedianOccupancy);
236 absoluteOccupancy[0][0]->Fill(logAbsoluteOccupancy);
238 medianVsAbsoluteOccupancy[SubDetId - 2][0]->Fill(logAbsoluteOccupancy, logMedianOccupancy);
239 medianOccupancy[SubDetId - 2][0]->Fill(logMedianOccupancy);
240 absoluteOccupancy[SubDetId - 2][0]->Fill(logAbsoluteOccupancy);
242 medianVsAbsoluteOccupancy[SubDetId - 2][
layer]->Fill(logAbsoluteOccupancy, logMedianOccupancy);
243 medianOccupancy[SubDetId - 2][
layer]->Fill(logMedianOccupancy);
244 absoluteOccupancy[SubDetId - 2][
layer]->Fill(logAbsoluteOccupancy);