13 #include <vxd/dataobjects/VxdID.h>
26 class SVDSummaryPlots:
public TObject {
40 for (
int view = VIndex ; view < UIndex + 1; view++) {
54 enum E_side { VIndex = 0 , UIndex = 1 };
65 B2WARNING(
"Unexpected view: " << view);
74 float getValue(
const VxdID& vxdID,
int view)
76 int layer = vxdID.getLayerNumber();
77 int ladder = vxdID.getLadderNumber();
78 int sensor = vxdID.getSensorNumber();
85 float getValue(
int layer,
int ladder,
int sensor,
int view)
92 void fill(
int layer,
int ladder,
int sensor,
int view,
float value)
98 void fill(
const VxdID& vxdID,
int view,
float value)
109 void fill(
const VxdID& vxdID,
bool isU,
float value)
111 int view = isU ? UIndex : VIndex;
123 std::string view = isU ?
"U" :
"V" ;
124 base = std::regex_replace(base, std::regex(
"[@]view") , view);
125 std::string side = isU ?
"P" :
"N" ;
126 base = std::regex_replace(base, std::regex(
"[@]side") , side);
142 Int_t
findBinY(Int_t layer, Int_t sensor)
148 return 2 + 1 + sensor;
150 return 6 + 1 + sensor;
152 return 11 + 1 + sensor;
162 void customize(TH2F& histogram,
int view)
166 TString Ylabels[nY] = {
"",
"L3.x.1",
"L3.x.2",
167 "",
"L4.x.1",
"L4.x.2",
"L4.x.3",
168 "",
"L5.x.1",
"L5.x.2",
"L5.x.3",
"L5.x.4",
169 "",
"L6.x.1",
"L6.x.2",
"L6.x.3",
"L6.x.4",
"L6.x.5",
""
172 histogram.SetMarkerSize(1.1);
173 histogram.GetXaxis()->SetTitle(
"ladder number");
174 histogram.GetXaxis()->SetLabelSize(0.04);
175 for (
unsigned short i = 0; i < nY; i++)
176 histogram.GetYaxis()->SetBinLabel(i + 1, Ylabels[i].Data());
178 bool isU = view == UIndex;
179 std::string name = histogram.GetName();
181 histogram.SetName(name.c_str());
183 std::string title = histogram.GetTitle();
185 histogram.SetTitle(title.c_str());
187 std::string xAxis = histogram.GetXaxis()->GetTitle();
189 histogram.SetXTitle(xAxis.c_str());
191 std::string yAxis = histogram.GetYaxis()->GetTitle();
193 histogram.SetYTitle(yAxis.c_str());
195 std::string zAxis = histogram.GetZaxis()->GetTitle();
197 histogram.SetZTitle(zAxis.c_str());