36 return "should never be here";
43 :
cond::payloadInspector::HistoryPlot<
BeamSpotObjects,
std::pair<double, double> >(
"x vs run number",
"x") {}
53 :
cond::payloadInspector::RunHistoryPlot<
BeamSpotObjects,
std::pair<double, double> >(
"x vs run number",
"x") {}
62 :
cond::payloadInspector::TimeHistoryPlot<
BeamSpotObjects,
std::pair<double, double> >(
"x vs time",
"x") {}
72 :
cond::payloadInspector::TimeHistoryPlot<
BeamSpotObjects,
std::pair<double, double> >(
"y vs time",
"y") {}
83 template <parameters my_param>
88 getStringFromParamEnum(my_param) +
" vs run number", getStringFromParamEnum(my_param)) {}
91 auto ret = std::make_pair<double, double>(-9999., -9999.);
95 return std::make_pair<double, double>(
payload.GetX(),
payload.GetXError());
97 return std::make_pair<double, double>(
payload.GetY(),
payload.GetYError());
99 return std::make_pair<double, double>(
payload.GetZ(),
payload.GetZError());
101 return std::make_pair<double, double>(
payload.GetBeamWidthX(),
payload.GetBeamWidthXError());
103 return std::make_pair<double, double>(
payload.GetBeamWidthY(),
payload.GetBeamWidthYError());
105 return std::make_pair<double, double>(
payload.GetSigmaZ(),
payload.GetSigmaZError());
107 return std::make_pair<double, double>(
payload.Getdxdz(),
payload.GetdxdzError());
109 return std::make_pair<double, double>(
payload.Getdydz(),
payload.GetdydzError());
118 typedef BeamSpot_history<X> BeamSpot_HistoryX;
119 typedef BeamSpot_history<Y> BeamSpot_HistoryY;
120 typedef BeamSpot_history<Z> BeamSpot_HistoryZ;
121 typedef BeamSpot_history<sigmaX> BeamSpot_HistorySigmaX;
122 typedef BeamSpot_history<sigmaY> BeamSpot_HistorySigmaY;
123 typedef BeamSpot_history<sigmaZ> BeamSpot_HistorySigmaZ;
124 typedef BeamSpot_history<dxdz> BeamSpot_HistorydXdZ;
125 typedef BeamSpot_history<dydz> BeamSpot_HistorydYdZ;
131 template <parameters my_param>
132 class BeamSpot_runhistory
135 BeamSpot_runhistory()
137 getStringFromParamEnum(my_param) +
" vs run number", getStringFromParamEnum(my_param)) {}
140 auto ret = std::make_pair<double, double>(-9999., -9999.);
144 return std::make_pair<double, double>(
payload.GetX(),
payload.GetXError());
146 return std::make_pair<double, double>(
payload.GetY(),
payload.GetYError());
148 return std::make_pair<double, double>(
payload.GetZ(),
payload.GetZError());
150 return std::make_pair<double, double>(
payload.GetBeamWidthX(),
payload.GetBeamWidthXError());
152 return std::make_pair<double, double>(
payload.GetBeamWidthY(),
payload.GetBeamWidthYError());
154 return std::make_pair<double, double>(
payload.GetSigmaZ(),
payload.GetSigmaZError());
156 return std::make_pair<double, double>(
payload.Getdxdz(),
payload.GetdxdzError());
158 return std::make_pair<double, double>(
payload.Getdydz(),
payload.GetdydzError());
167 typedef BeamSpot_runhistory<X> BeamSpot_RunHistoryX;
168 typedef BeamSpot_runhistory<Y> BeamSpot_RunHistoryY;
169 typedef BeamSpot_runhistory<Z> BeamSpot_RunHistoryZ;
170 typedef BeamSpot_runhistory<sigmaX> BeamSpot_RunHistorySigmaX;
171 typedef BeamSpot_runhistory<sigmaY> BeamSpot_RunHistorySigmaY;
172 typedef BeamSpot_runhistory<sigmaZ> BeamSpot_RunHistorySigmaZ;
173 typedef BeamSpot_runhistory<dxdz> BeamSpot_RunHistorydXdZ;
174 typedef BeamSpot_runhistory<dydz> BeamSpot_RunHistorydYdZ;
180 template <parameters my_param>
181 class BeamSpot_timehistory
184 BeamSpot_timehistory()
186 getStringFromParamEnum(my_param) +
" vs time", getStringFromParamEnum(my_param)) {}
189 auto ret = std::make_pair<double, double>(-9999., -9999.);
193 return std::make_pair<double, double>(
payload.GetX(),
payload.GetXError());
195 return std::make_pair<double, double>(
payload.GetY(),
payload.GetYError());
197 return std::make_pair<double, double>(
payload.GetZ(),
payload.GetZError());
199 return std::make_pair<double, double>(
payload.GetBeamWidthX(),
payload.GetBeamWidthXError());
201 return std::make_pair<double, double>(
payload.GetBeamWidthY(),
payload.GetBeamWidthYError());
203 return std::make_pair<double, double>(
payload.GetSigmaZ(),
payload.GetSigmaZError());
205 return std::make_pair<double, double>(
payload.Getdxdz(),
payload.GetdxdzError());
207 return std::make_pair<double, double>(
payload.Getdydz(),
payload.GetdydzError());
216 typedef BeamSpot_timehistory<X> BeamSpot_TimeHistoryX;
217 typedef BeamSpot_timehistory<Y> BeamSpot_TimeHistoryY;
218 typedef BeamSpot_timehistory<Z> BeamSpot_TimeHistoryZ;
219 typedef BeamSpot_timehistory<sigmaX> BeamSpot_TimeHistorySigmaX;
220 typedef BeamSpot_timehistory<sigmaY> BeamSpot_TimeHistorySigmaY;
221 typedef BeamSpot_timehistory<sigmaZ> BeamSpot_TimeHistorySigmaZ;
222 typedef BeamSpot_timehistory<dxdz> BeamSpot_TimeHistorydXdZ;
223 typedef BeamSpot_timehistory<dydz> BeamSpot_TimeHistorydYdZ;
242 BeamSpotParameters() :
cond::payloadInspector::PlotImage<
BeamSpotObjects>(
"Display of BeamSpot parameters") {
246 bool fill(
const std::vector<std::tuple<cond::Time_t, cond::Hash> >& iovs)
override {
247 auto iov = iovs.front();
250 TCanvas
canvas(
"Beam Spot Parameters Summary",
"BeamSpot Parameters summary", 1000, 1000);
253 canvas.SetTopMargin(0.07);
254 canvas.SetBottomMargin(0.06);
255 canvas.SetLeftMargin(0.15);
256 canvas.SetRightMargin(0.03);
260 auto h2_BSParameters =
261 std::unique_ptr<TH2F>(
new TH2F(
"Parameters",
"BeamSpot parameters summary", 2, 0.0, 2.0, 8, 0, 8.));
262 h2_BSParameters->SetStats(
false);
275 return payload->GetBeamWidthX();
277 return payload->GetBeamWidthY();
298 return payload->GetBeamWidthXError();
300 return payload->GetBeamWidthYError();
302 return payload->GetSigmaZError();
304 return payload->GetdxdzError();
306 return payload->GetdydzError();
315 h2_BSParameters->GetXaxis()->SetBinLabel(1,
"Value");
316 h2_BSParameters->GetXaxis()->SetBinLabel(2,
"Error");
318 unsigned int yBin = 8;
320 parameters param = static_cast<parameters>(foo);
322 h2_BSParameters->GetYaxis()->SetBinLabel(
yBin, theLabel.c_str());
323 h2_BSParameters->SetBinContent(1,
yBin, cutFunctor(param,
false));
324 h2_BSParameters->SetBinContent(2,
yBin, cutFunctor(param,
true));
328 h2_BSParameters->GetXaxis()->LabelsOption(
"h");
330 h2_BSParameters->GetYaxis()->SetLabelSize(0.05);
331 h2_BSParameters->GetXaxis()->SetLabelSize(0.05);
333 h2_BSParameters->SetMarkerSize(1.5);
334 h2_BSParameters->Draw(
"TEXT");
352 return "#sigma_{X} [cm]";
354 return "#sigma_{Y} [cm]";
356 return "#sigma_{Z} [cm]";
358 return "#frac{dX}{dZ} [rad]";
360 return "#frac{dY}{dZ} [rad]";
362 return "should never be here";