8 #include <svd/calibration/SVDTimeValidationAlgorithm.h>
10 #include <svd/dbobjects/SVDCoGCalibrationFunction.h>
11 #include <svd/calibration/SVDCoGTimeCalibrations.h>
16 #include <framework/logging/Logger.h>
19 #include <TFitResult.h>
24 SVDTimeValidationAlgorithm::SVDTimeValidationAlgorithm() :
33 gROOT->SetBatch(
true);
35 auto hEventT0 = getObjectPtr<TH1F>(
"hEventT0");
36 float eventT0_mean = 0;
37 float eventT0_rms = 0;
39 eventT0_mean = hEventT0->GetMean();
40 eventT0_rms = hEventT0->GetRMS();
42 B2ERROR(
"Histogram with Event T0 not found");
44 B2DEBUG(27,
"Histogram: " << hEventT0->GetName() <<
45 " Entries (n. clusters): " << hEventT0->GetEntries() <<
46 " Mean: " << eventT0_mean);
50 for (
auto ladder : geoCache.getLadders(layer)) {
56 auto layer_num = sensor.getLayerNumber();
57 auto ladder_num = sensor.getLadderNumber();
58 auto sensor_num = sensor.getSensorNumber();
59 auto hClsTimeOnTracks = getObjectPtr<TH1F>(Form(
"clsTimeOnTracks__L%dL%dS%d%c", layer_num, ladder_num, sensor_num, side));
60 float clsTimeOnTracks_mean = 0.;
62 clsTimeOnTracks_mean = hClsTimeOnTracks->GetMean();
64 B2ERROR(
"Histogram " << Form(
"clsTimeOnTracks__L%dL%dS%d%c", layer_num, ladder_num, sensor_num, side) <<
" not found");
65 auto deviation = (clsTimeOnTracks_mean - eventT0_mean) / eventT0_rms;
67 B2DEBUG(27,
"Histogram: " << hClsTimeOnTracks->GetName() <<
68 " Entries (n. clusters): " << hClsTimeOnTracks->GetEntries() <<
69 " Mean: " << clsTimeOnTracks_mean <<
70 " Deviation: " << deviation <<
" EventT0 RMS");
72 B2ERROR(
"Histogram: " << hClsTimeOnTracks->GetName() <<
" deviates from EventT0 by" << deviation <<
" times the EventT0 RMS");
Base class for calibration algorithms.
void setDescription(const std::string &description)
Set algorithm description (in constructor)
EResult
The result of calibration.
@ c_OK
Finished successfuly =0 in Python.
template class for SVd histograms
float m_allowedDeviationMean
Allowed deviation of clsOnTracks histo wrt EventT0 histo in number of EventT0 RMS.
virtual EResult calibrate() override
Run algo on data.
Class to faciliate easy access to sensor information of the VXD like coordinate transformations or pi...
static GeoCache & getInstance()
Return a reference to the singleton instance.
Class to uniquely identify a any structure of the PXD and SVD.
Abstract base class for different kinds of events.