72 std::ostringstream oss;
76 dqmStore->setCurrentFolder(
"ChannelStatusPlots");
79 std::vector<std::string> subDetName;
80 std::vector<unsigned int>
nLayers;
81 std::vector<std::string> layerName;
82 subDetName.push_back(
"");
83 subDetName.push_back(
"TIB");
84 subDetName.push_back(
"TID");
85 subDetName.push_back(
"TOB");
86 subDetName.push_back(
"TEC");
92 layerName.push_back(
"");
93 layerName.push_back(
"Layer");
94 layerName.push_back(
"Disk");
95 layerName.push_back(
"Layer");
96 layerName.push_back(
"Disk");
104 TH2F* medianVsAbsoluteOccupancy[5][10];
105 TH1F* medianOccupancy[5][10];
106 TH1F* absoluteOccupancy[5][10];
107 for (
unsigned int i = 0;
i < subDetName.size();
i++) {
109 histoName =
"medianVsAbsoluteOccupancy" + subDetName[
i];
115 histoTitle =
"Median APV occupancy vs. absolute APV occupancy";
117 histoTitle +=
" in " + subDetName[
i];
119 histoTitle +=
" " + layerName[
i] +
" " + oss.str();
122 medianVsAbsoluteOccupancy[
i][
j] =
tmp->getTH2F();
123 medianVsAbsoluteOccupancy[
i][
j]->Rebin2D(10, 10);
124 medianVsAbsoluteOccupancy[
i][
j]->GetXaxis()->SetTitle(
"log_{10}(Abs. Occupancy)");
125 medianVsAbsoluteOccupancy[
i][
j]->GetYaxis()->SetTitle(
"log_{10}(Median Occupancy)");
127 histoName =
"medianOccupancy" + subDetName[
i];
133 histoTitle =
"Median APV occupancy";
135 histoTitle +=
" in " + subDetName[
i];
137 histoTitle +=
" " + layerName[
i] +
" " + oss.str();
140 medianOccupancy[
i][
j] =
tmp->getTH1F();
141 medianOccupancy[
i][
j]->GetXaxis()->SetTitle(
"log_{10}(Occupancy)");
142 medianOccupancy[
i][
j]->GetYaxis()->SetTitle(
"APVs");
144 histoName =
"absoluteOccupancy" + subDetName[
i];
150 histoTitle =
"Absolute APV occupancy";
152 histoTitle +=
" in " + subDetName[
i];
154 histoTitle +=
" " + layerName[
i] +
" " + oss.str();
157 absoluteOccupancy[
i][
j] =
tmp->getTH1F();
158 absoluteOccupancy[
i][
j]->GetXaxis()->SetTitle(
"log_{10}(Occupancy)");
159 absoluteOccupancy[
i][
j]->GetYaxis()->SetTitle(
"APVs");
172 Int_t IsExternalString;
174 Int_t RodStringPetal;
176 Int_t ModulePosition;
177 Int_t NumberOfStrips;
178 Float_t APVGlobalPositionX;
179 Float_t APVGlobalPositionY;
180 Float_t APVGlobalPositionZ;
182 Int_t APVAbsoluteOccupancy;
183 Double_t APVMedianOccupancy;
184 intree->SetBranchAddress(
"DetRawId", &DetRawId);
185 intree->SetBranchAddress(
"SubDetId", &SubDetId);
186 intree->SetBranchAddress(
"Layer_Ring", &Layer_Ring);
187 intree->SetBranchAddress(
"Disc", &Disc);
188 intree->SetBranchAddress(
"IsBack", &IsBack);
189 intree->SetBranchAddress(
"IsExternalString", &IsExternalString);
190 intree->SetBranchAddress(
"IsZMinusSide", &IsZMinusSide);
191 intree->SetBranchAddress(
"RodStringPetal", &RodStringPetal);
192 intree->SetBranchAddress(
"IsStereo", &IsStereo);
193 intree->SetBranchAddress(
"ModuleNumber", &ModulePosition);
194 intree->SetBranchAddress(
"NumberOfStrips", &NumberOfStrips);
195 intree->SetBranchAddress(
"APVGlobalPositionX", &APVGlobalPositionX);
196 intree->SetBranchAddress(
"APVGlobalPositionY", &APVGlobalPositionY);
197 intree->SetBranchAddress(
"APVGlobalPositionZ", &APVGlobalPositionZ);
198 intree->SetBranchAddress(
"APVNumber", &APVNumber);
199 intree->SetBranchAddress(
"APVAbsoluteOccupancy", &APVAbsoluteOccupancy);
200 intree->SetBranchAddress(
"APVMedianOccupancy", &APVMedianOccupancy);
202 for (
int i = 0;
i <
intree->GetEntries();
i++) {
205 double logMedianOccupancy = -1;
206 double logAbsoluteOccupancy = -1;
208 if (APVMedianOccupancy > 0)
209 logMedianOccupancy = log10(APVMedianOccupancy);
210 if (APVAbsoluteOccupancy > 0)
211 logAbsoluteOccupancy = log10(APVAbsoluteOccupancy);
214 unsigned int layer = 0;
215 if (SubDetId == 3 || SubDetId == 5)
221 medianVsAbsoluteOccupancy[0][0]->Fill(logAbsoluteOccupancy, logMedianOccupancy);
222 medianOccupancy[0][0]->Fill(logMedianOccupancy);
223 absoluteOccupancy[0][0]->Fill(logAbsoluteOccupancy);
225 medianVsAbsoluteOccupancy[SubDetId - 2][0]->Fill(logAbsoluteOccupancy, logMedianOccupancy);
226 medianOccupancy[SubDetId - 2][0]->Fill(logMedianOccupancy);
227 absoluteOccupancy[SubDetId - 2][0]->Fill(logAbsoluteOccupancy);
229 medianVsAbsoluteOccupancy[SubDetId - 2][
layer]->Fill(logAbsoluteOccupancy, logMedianOccupancy);
230 medianOccupancy[SubDetId - 2][
layer]->Fill(logMedianOccupancy);
231 absoluteOccupancy[SubDetId - 2][
layer]->Fill(logAbsoluteOccupancy);
const std::string infilename
const std::string outfilename