24 latencyCode_(latencyCode),
60 <<
" NULL pointer to Analysis object!";
68 <<
" NULL pointer to derived Analysis object!";
73 if (histos.size() != 1 && histos.size() != 2) {
78 if (!histos.empty()) {
83 std::vector<TH1*>::const_iterator ihis = histos.begin();
84 for (; ihis != histos.end(); ihis++) {
106 histo_.second = (*ihis)->GetName();
116 <<
" NULL pointer to derived Analysis object!";
120 TProfile* prof = (TProfile*)(
histo_.first);
127 prof->SetErrorOption(
" ");
131 for (
int i = 0;
i < prof->GetNbinsX(); ++
i) {
132 if (prof->GetBinEntries(
i) > 0)
133 prof->SetBinError(
i, prof->GetBinError(
i) /
sqrt(prof->GetBinEntries(
i)));
148 float max = prof->GetBinCenter(prof->GetMaximumBin());
149 float ampl = prof->GetMaximum();
150 peak_fitterA_->SetParameters(0., 50 - max, ampl / 20., 50, 10);
163 float max = prof->GetBinCenter(prof->GetMaximumBin());
164 float ampl = prof->GetMaximum();
166 peak_fitterB_->SetParameters(0., 50 - max, ampl / 20., 50, 10);
189 uint32_t
nbins = profile->GetNbinsX();
192 max = max < profile->GetBinEntries(
bin) ? uint32_t(profile->GetBinEntries(
bin)) : max;
194 uint32_t
min = max / 10;
196 if (profile->GetBinEntries(
bin) <
min) {
197 profile->SetBinContent(
bin, 0.);
198 profile->SetBinError(
bin, 0.);
205 prof->GetXaxis()->SetLimits(prof->GetXaxis()->GetXmin() - prof->GetBinWidth(1) / 2.,
206 prof->GetXaxis()->GetXmax() - prof->GetBinWidth(1) / 2.);
215 uint32_t
nbins = profile->GetNbinsX();
218 if (profile->GetBinContent(
bin) <
min) {
219 profile->SetBinContent(
bin, 0.);
220 profile->SetBinError(
bin, 0.);
221 profile->SetBinEntries(
bin, 0);
223 profile->SetBinContent(
void correctBinning(TProfile *prof) const
static const char unexpectedTask_[]
Analysis for latency run.
double fdeconv_convoluted(double *x, double *par)
const uint32_t & fedKey() const
Utility class that holds histogram title.
sistrip::RunType runType_
static const char numberOfHistos_[]
float limit(float SoNcut) const
double fpeak_convoluted(double *x, double *par)
uint32_t extractFedKey(const TH1 *const)
static const char mlCommissioning_[]
void correctProfile(TProfile *profile, float SoNcut=3.) const
virtual void addErrorCode(const std::string &error)
float correctMeasurement(float mean, float SoNcut=3.) const
void pruneProfile(TProfile *profile) const
Abstract base for derived classes that provide analysis of commissioning histograms.
void extract(const std::vector< TH1 * > &) override
sistrip::Granularity granularity_
CommissioningAnalysis *const anal() const