10 #include <vxd/dataobjects/VxdID.h>
40 for (
int view = VIndex ; view < UIndex + 1; view++) {
54 enum E_side { VIndex = 0, UIndex = 1 };
65 B2WARNING(
"Unexpected view: " << view);
90 float getValue(
int layer,
int ladder,
int sensor,
int view)
103 void fill(
int layer,
int ladder,
int sensor,
int view,
float value)
124 int view = isU ? UIndex : VIndex;
136 std::string view = isU ?
"U" :
"V" ;
137 base = std::regex_replace(base, std::regex(
"[@]view"), view);
138 std::string side = isU ?
"P" :
"N" ;
139 base = std::regex_replace(base, std::regex(
"[@]side"), side);
161 return 2 + 1 + sensor;
163 return 6 + 1 + sensor;
165 return 11 + 1 + sensor;
179 TString Ylabels[nY] = {
"",
"L3.x.1",
"L3.x.2",
180 "",
"L4.x.1",
"L4.x.2",
"L4.x.3",
181 "",
"L5.x.1",
"L5.x.2",
"L5.x.3",
"L5.x.4",
182 "",
"L6.x.1",
"L6.x.2",
"L6.x.3",
"L6.x.4",
"L6.x.5",
""
185 histogram.SetMarkerSize(1.1);
186 histogram.GetXaxis()->SetTitle(
"ladder number");
187 histogram.GetXaxis()->SetLabelSize(0.04);
188 for (
unsigned short i = 0; i < nY; i++)
189 histogram.GetYaxis()->SetBinLabel(i + 1, Ylabels[i].Data());
191 bool isU = view == UIndex;
192 std::string name = histogram.GetName();
194 histogram.SetName(name.c_str());
196 std::string title = histogram.GetTitle();
198 histogram.SetTitle(title.c_str());
200 std::string xAxis = histogram.GetXaxis()->GetTitle();
202 histogram.SetXTitle(xAxis.c_str());
204 std::string yAxis = histogram.GetYaxis()->GetTitle();
206 histogram.SetYTitle(yAxis.c_str());
208 std::string zAxis = histogram.GetZaxis()->GetTitle();
210 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 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
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
E_side
This enumeration assure the same semantic of the isU methods defined by Peter Kv.
ClassDef(SVDSummaryPlots, 1)
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.