10 #include <vxd/dataobjects/VxdID.h>
40 for (
int view = VIndex ; view < UIndex + 1; view++) {
41 std::string hname = name.Data();
42 bool isU = (view == UIndex);
44 m_histos[view] =
new TH2F(hname.c_str(), title.Data(),
58 enum E_side { VIndex = 0, UIndex = 1 };
69 B2WARNING(
"Unexpected view: " << view);
94 float getValue(
int layer,
int ladder,
int sensor,
int view)
107 void fill(
int layer,
int ladder,
int sensor,
int view,
float value)
129 for (
int view = VIndex ; view < UIndex + 1; view++) {
131 if (!
m_Title[view].EndsWith(
" "))
142 for (
int view = VIndex ; view < UIndex + 1; view++)
151 for (
int view = VIndex ; view < UIndex + 1; view++)
158 int view = isU ? UIndex : VIndex;
170 std::string view = isU ?
"U" :
"V" ;
171 base = std::regex_replace(base, std::regex(
"[@]view"), view);
172 std::string side = isU ?
"P" :
"N" ;
173 base = std::regex_replace(base, std::regex(
"[@]side"), side);
193 return 2 + 1 + sensor;
195 return 6 + 1 + sensor;
197 return 11 + 1 + sensor;
213 TString Ylabels[nY] = {
"",
"L3.x.1",
"L3.x.2",
214 " ",
"L4.x.1",
"L4.x.2",
"L4.x.3",
215 " ",
"L5.x.1",
"L5.x.2",
"L5.x.3",
"L5.x.4",
216 " ",
"L6.x.1",
"L6.x.2",
"L6.x.3",
"L6.x.4",
"L6.x.5",
" "
219 histogram.SetMarkerSize(1.1);
220 histogram.GetXaxis()->SetTitle(
"ladder number");
221 histogram.GetXaxis()->SetLabelSize(0.04);
222 for (
unsigned short i = 0; i < nY; i++)
223 histogram.GetYaxis()->SetBinLabel(i + 1, Ylabels[i].Data());
225 bool isU = view == UIndex;
226 std::string title = histogram.GetTitle();
228 histogram.SetTitle(title.c_str());
230 std::string xAxis = histogram.GetXaxis()->GetTitle();
232 histogram.SetXTitle(xAxis.c_str());
234 std::string yAxis = histogram.GetYaxis()->GetTitle();
236 histogram.SetYTitle(yAxis.c_str());
238 std::string zAxis = histogram.GetZaxis()->GetTitle();
240 histogram.SetZTitle(zAxis.c_str());
class to summarize SVD quantities per sensor and side
TH2F * m_histos[2]
vector containing the U and V histograms
void fill(const VxdID &vxdID, int view, float value)
fill the histogram for
~SVDSummaryPlots()
clean everything in the destructor
void clean()
delete pointers
Int_t findBinY(Int_t layer, Int_t sensor)
find the Y bin given the layer and sensor number
void setStats(bool stats=true)
set histograms stat
void customizeString(std::string &base, bool isU)
replaces layer ladder sensor view and apv with the current numbers
SVDSummaryPlots(TString name, TString title)
this is the default constructor
float getValue(const VxdID &vxdID, int view)
get the value contained in the corresponding bin, given VxdID and view
void fill(int layer, int ladder, int sensor, int view, float value)
fill the histogram for
void fill(const VxdID &vxdID, bool isU, float value)
fill the histogram for
TH2F * getHistogram(int view)
get a reference to the histogram for
TString m_Title[2]
Base title.
SVDSummaryPlots()
Default constructor.
float getValue(int layer, int ladder, int sensor, int view)
get the value contained in the corresponding bin, given
void customize(TH2F &histogram, int view)
customize the histogram with the sensor, view
TH2F * m_defaultHistogram
default histograms
void setRunID(const TString &runID)
set run ids in title
void reset()
Reset histograms.
E_side
This enumeration assure the same semantic of the isU methods defined by Peter Kv.
ClassDef(SVDSummaryPlots, 2)
needed by root
Class to uniquely identify a any structure of the PXD and SVD.
baseType getSensorNumber() const
Get the sensor id.
baseType getLadderNumber() const
Get the ladder id.
baseType getLayerNumber() const
Get the layer id.
Abstract base class for different kinds of events.